Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions scripts/sputnik.polyfills.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -88,47 +88,47 @@ const resources = [
},
{
src: '/awslabs/llrt/refs/heads/main/modules/llrt_buffer/src/blob.rs',
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/blob/llrt/polyfill.rs'),
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/llrt/buffer/blob.rs'),
transform: transformLlrtBlob
},
{
src: '/awslabs/llrt/refs/heads/main/modules/llrt_buffer/src/file.rs',
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/blob/llrt/file.rs'),
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/llrt/buffer/file.rs'),
transform: transformLlrtBlob
},
{
src: '/awslabs/llrt/refs/heads/main/libs/llrt_utils/src/time.rs',
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/blob/llrt/utils/time.rs'),
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/llrt/utils/time.rs'),
transform: transformLlrtUtils
},
{
src: '/awslabs/llrt/refs/heads/main/libs/llrt_utils/src/result.rs',
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/blob/llrt/utils/result.rs'),
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/llrt/utils/result.rs'),
transform: transformLlrtUtils
},
{
src: '/awslabs/llrt/refs/heads/main/libs/llrt_utils/src/primordials.rs',
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/blob/llrt/utils/primordials.rs'),
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/llrt/utils/primordials.rs'),
transform: transformLlrtUtils
},
{
src: '/awslabs/llrt/refs/heads/main/libs/llrt_utils/src/class.rs',
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/blob/llrt/utils/class.rs'),
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/llrt/utils/class.rs'),
transform: transformLlrtUtils
},
{
src: '/awslabs/llrt/refs/heads/main/libs/llrt_utils/src/object.rs',
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/blob/llrt/utils/object.rs'),
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/llrt/utils/object.rs'),
transform: transformLlrtUtils
},
{
src: '/awslabs/llrt/refs/heads/main/libs/llrt_utils/src/error_messages.rs',
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/blob/llrt/utils/error_messages.rs'),
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/llrt/utils/error_messages.rs'),
transform: transformLlrtUtils
},
{
src: '/awslabs/llrt/refs/heads/main/libs/llrt_utils/src/bytes.rs',
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/blob/llrt/utils/bytes.rs'),
dest: join(process.cwd(), 'src/sputnik/src/js/apis/node/llrt/utils/bytes.rs'),
transform: transformLlrtUtils
}
];
Expand Down
6 changes: 0 additions & 6 deletions src/sputnik/src/js/apis/node/blob/llrt/mod.rs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
use std::ops::RangeInclusive;

use crate::js::apis::node::blob::llrt::utils::{
use crate::js::apis::node::llrt::utils::{
bytes::ObjectBytes,
primordials::{BasePrimordials, Primordial},
result::ResultExt,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use crate::js::apis::node::blob::llrt::utils::time;
use crate::js::apis::node::llrt::utils::time;
use rquickjs::{
atom::PredefinedAtom, class::Trace, function::Opt, ArrayBuffer, Coerced, Ctx, Exception,
IntoJs, Object, Result, Value,
};

use super::polyfill::Blob;
use super::blob::Blob;

#[rquickjs::class]
#[derive(Trace, Clone, rquickjs::JsLifetime)]
Expand Down
4 changes: 4 additions & 0 deletions src/sputnik/src/js/apis/node/llrt/buffer/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mod file;
pub mod blob;

pub use crate::js::apis::node::llrt::utils::primordials::{BasePrimordials, Primordial};
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
mod llrt;
mod buffer;
#[rustfmt::skip]
mod utils;

use crate::js::apis::node::blob::llrt::polyfill::Blob;
use crate::js::apis::node::blob::llrt::{BasePrimordials, Primordial};
use crate::js::apis::node::llrt::buffer::blob::Blob;
use crate::js::apis::node::llrt::buffer::{BasePrimordials, Primordial};
use rquickjs::{atom::PredefinedAtom, prelude::Func, Class, Ctx, Error as JsError};

// ===========================================================================================
Expand Down
4 changes: 2 additions & 2 deletions src/sputnik/src/js/apis/node/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod blob;
mod llrt;
mod javy;

use crate::js::apis::node::blob::init_blob;
use crate::js::apis::node::llrt::init_blob;
use crate::js::apis::node::javy::init_text_encoding;
use rquickjs::{Ctx, Error as JsError};

Expand Down
Loading