Socket
Book a DemoSign in
Socket

@bytecodealliance/componentize-js

Package Overview
Dependencies
Maintainers
3
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bytecodealliance/componentize-js - npm Package Compare versions

Comparing version
0.7.0
to
0.7.1
+1
-1
lib/interfaces/wasi-cli-stderr.d.ts
export namespace WasiCliStderr {
export function getStderr(): OutputStream;
}
import type { OutputStream } from '../interfaces/wasi-io-streams.js';
import type { OutputStream } from './wasi-io-streams.js';
export { OutputStream };
export namespace WasiCliStdin {
export function getStdin(): InputStream;
}
import type { InputStream } from '../interfaces/wasi-io-streams.js';
import type { InputStream } from './wasi-io-streams.js';
export { InputStream };
export namespace WasiCliStdout {
export function getStdout(): OutputStream;
}
import type { OutputStream } from '../interfaces/wasi-io-streams.js';
import type { OutputStream } from './wasi-io-streams.js';
export { OutputStream };
export namespace WasiCliTerminalStderr {
export function getTerminalStderr(): TerminalOutput | undefined;
}
import type { TerminalOutput } from '../interfaces/wasi-cli-terminal-output.js';
import type { TerminalOutput } from './wasi-cli-terminal-output.js';
export { TerminalOutput };
export namespace WasiCliTerminalStdin {
export function getTerminalStdin(): TerminalInput | undefined;
}
import type { TerminalInput } from '../interfaces/wasi-cli-terminal-input.js';
import type { TerminalInput } from './wasi-cli-terminal-input.js';
export { TerminalInput };
export namespace WasiCliTerminalStdout {
export function getTerminalStdout(): TerminalOutput | undefined;
}
import type { TerminalOutput } from '../interfaces/wasi-cli-terminal-output.js';
import type { TerminalOutput } from './wasi-cli-terminal-output.js';
export { TerminalOutput };
export namespace WasiFilesystemPreopens {
export function getDirectories(): [Descriptor, string][];
}
import type { Descriptor } from '../interfaces/wasi-filesystem-types.js';
import type { Descriptor } from './wasi-filesystem-types.js';
export { Descriptor };

@@ -7,3 +7,3 @@ export namespace WasiFilesystemTypes {

export type Filesize = bigint;
import type { InputStream } from '../interfaces/wasi-io-streams.js';
import type { InputStream } from './wasi-io-streams.js';
export { InputStream };

@@ -88,3 +88,3 @@ /**

export type ErrorCode = 'access' | 'would-block' | 'already' | 'bad-descriptor' | 'busy' | 'deadlock' | 'quota' | 'exist' | 'file-too-large' | 'illegal-byte-sequence' | 'in-progress' | 'interrupted' | 'invalid' | 'io' | 'is-directory' | 'loop' | 'too-many-links' | 'message-size' | 'name-too-long' | 'no-device' | 'no-entry' | 'no-lock' | 'insufficient-memory' | 'insufficient-space' | 'not-directory' | 'not-empty' | 'not-recoverable' | 'unsupported' | 'no-tty' | 'no-such-device' | 'overflow' | 'not-permitted' | 'pipe' | 'read-only' | 'invalid-seek' | 'text-file-busy' | 'cross-device';
import type { OutputStream } from '../interfaces/wasi-io-streams.js';
import type { OutputStream } from './wasi-io-streams.js';
export { OutputStream };

@@ -112,3 +112,3 @@ /**

export type LinkCount = bigint;
import type { Datetime } from '../interfaces/wasi-clocks-wall-clock.js';
import type { Datetime } from './wasi-clocks-wall-clock.js';
export { Datetime };

@@ -148,5 +148,9 @@ export interface DescriptorStat {

}
import type { Error } from '../interfaces/wasi-io-streams.js';
import type { Error } from './wasi-io-streams.js';
export { Error };
export class DirectoryEntryStream {
readDirectoryEntry(): DirectoryEntry | undefined;
}
export class Descriptor {

@@ -164,5 +168,1 @@ readViaStream(offset: Filesize): InputStream;

}
export class DirectoryEntryStream {
readDirectoryEntry(): DirectoryEntry | undefined;
}

@@ -5,3 +5,3 @@ export namespace WasiIoStreams {

}
import type { Error } from '../interfaces/wasi-io-error.js';
import type { Error } from './wasi-io-error.js';
export { Error };

@@ -8,0 +8,0 @@ export type StreamError = StreamErrorLastOperationFailed | StreamErrorClosed;

{
"name": "@bytecodealliance/componentize-js",
"version": "0.7.0",
"version": "0.7.1",
"homepage": "https://github.com/bytecodealliance/componentize-js#readme",

@@ -12,3 +12,3 @@ "type": "module",

"dependencies": {
"@bytecodealliance/jco": "^1.0.0",
"@bytecodealliance/jco": "^1.0.2",
"@bytecodealliance/wizer": "^3.0.1"

@@ -15,0 +15,0 @@ },

@@ -78,6 +78,9 @@ <div align="center">

const { component } = await componentize(`
export function fn () {}
export function hello (name) {
return \`Hello \${name}\`;
}
`, `
default world test {
export fn: func()
package local:hello;
world hello {
export hello: func(name: string) -> string;
}

@@ -84,0 +87,0 @@ `);

@@ -46,3 +46,3 @@ import wizer from "@bytecodealliance/wizer";

console.log('--- JS Bindings ---');
console.log(jsBindings);
console.log(jsBindings.split('\n').map((ln, idx) => `${(idx + 1).toString().padStart(4, ' ')} | ${ln}`).join('\n'));
console.log('--- JS Imports ---');

@@ -49,0 +49,0 @@ console.log(imports);

export namespace Exports {
export function spliceBindings(sourceName: string | null, spidermonkeyEngine: Uint8Array | ArrayBuffer, witWorld: string | null, witPath: string | null, worldName: string | null): SpliceResult;
export function stubWasi(engine: Uint8Array | ArrayBuffer): Uint8Array;
}
/**
* # Variants
*
* ## `"i32"`
*
* ## `"i64"`
*
* ## `"f32"`
*
* ## `"f64"`
*/
export type CoreTy = 'i32' | 'i64' | 'f32' | 'f64';
export interface CoreFn {
params: CoreTy[],
ret?: CoreTy,
retptr: boolean,
retsize: number,
paramptr: boolean,
}
export interface SpliceResult {
wasm: Uint8Array,
jsBindings: string,
exports: [string, CoreFn][],
importWrappers: [string, string][],
imports: [string, string, number][],
}
export namespace WasiSocketsTcp {
export { TcpSocket };
}
export class TcpSocket {
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display