@bytecodealliance/componentize-js
Advanced tools
| export namespace WasiCliEnvironment { | ||
| export function getEnvironment(): [string, string][]; | ||
| } |
| export namespace WasiCliExit { | ||
| export function exit(status: Result<void, void>): void; | ||
| } | ||
| export type Result<T, E> = { tag: 'ok', val: T } | { tag: 'err', val: E }; |
| export namespace WasiCliStderr { | ||
| export function getStderr(): OutputStream; | ||
| } | ||
| import type { OutputStream } from '../interfaces/wasi-io-streams'; | ||
| export { OutputStream }; |
| export namespace WasiCliStdin { | ||
| export function getStdin(): InputStream; | ||
| } | ||
| import type { InputStream } from '../interfaces/wasi-io-streams'; | ||
| export { InputStream }; |
| export namespace WasiCliStdout { | ||
| export function getStdout(): OutputStream; | ||
| } | ||
| import type { OutputStream } from '../interfaces/wasi-io-streams'; | ||
| export { OutputStream }; |
| export namespace WasiCliTerminalInput { | ||
| export function dropTerminalInput(this_: TerminalInput): void; | ||
| } | ||
| export type TerminalInput = number; |
| export namespace WasiCliTerminalOutput { | ||
| export function dropTerminalOutput(this_: TerminalOutput): void; | ||
| } | ||
| export type TerminalOutput = number; |
| export namespace WasiCliTerminalStderr { | ||
| export function getTerminalStderr(): TerminalOutput | undefined; | ||
| } | ||
| import type { TerminalOutput } from '../interfaces/wasi-cli-terminal-output'; | ||
| export { TerminalOutput }; |
| export namespace WasiCliTerminalStdin { | ||
| export function getTerminalStdin(): TerminalInput | undefined; | ||
| } | ||
| import type { TerminalInput } from '../interfaces/wasi-cli-terminal-input'; | ||
| export { TerminalInput }; |
| export namespace WasiCliTerminalStdout { | ||
| export function getTerminalStdout(): TerminalOutput | undefined; | ||
| } | ||
| import type { TerminalOutput } from '../interfaces/wasi-cli-terminal-output'; | ||
| export { TerminalOutput }; |
| export namespace WasiClocksWallClock { | ||
| } | ||
| export interface Datetime { | ||
| seconds: bigint, | ||
| nanoseconds: number, | ||
| } |
| export namespace WasiFilesystemPreopens { | ||
| export function getDirectories(): [Descriptor, string][]; | ||
| } | ||
| import type { Descriptor } from '../interfaces/wasi-filesystem-types'; | ||
| export { Descriptor }; |
| export namespace WasiFilesystemTypes { | ||
| export function readViaStream(this_: Descriptor, offset: Filesize): InputStream; | ||
| export function writeViaStream(this_: Descriptor, offset: Filesize): OutputStream; | ||
| export function appendViaStream(this_: Descriptor): OutputStream; | ||
| export function getType(this_: Descriptor): DescriptorType; | ||
| export function readDirectory(this_: Descriptor): DirectoryEntryStream; | ||
| export function stat(this_: Descriptor): DescriptorStat; | ||
| export function statAt(this_: Descriptor, pathFlags: PathFlags, path: string): DescriptorStat; | ||
| export function openAt(this_: Descriptor, pathFlags: PathFlags, path: string, openFlags: OpenFlags, flags: DescriptorFlags, modes: Modes): Descriptor; | ||
| export function dropDescriptor(this_: Descriptor): void; | ||
| export function readDirectoryEntry(this_: DirectoryEntryStream): DirectoryEntry | undefined; | ||
| export function dropDirectoryEntryStream(this_: DirectoryEntryStream): void; | ||
| export function metadataHash(this_: Descriptor): MetadataHashValue; | ||
| export function metadataHashAt(this_: Descriptor, pathFlags: PathFlags, path: string): MetadataHashValue; | ||
| } | ||
| export type Descriptor = number; | ||
| export type Filesize = bigint; | ||
| import type { InputStream } from '../interfaces/wasi-io-streams'; | ||
| export { InputStream }; | ||
| /** | ||
| * # Variants | ||
| * | ||
| * ## `"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"` | ||
| */ | ||
| 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'; | ||
| export { OutputStream }; | ||
| /** | ||
| * # Variants | ||
| * | ||
| * ## `"unknown"` | ||
| * | ||
| * ## `"block-device"` | ||
| * | ||
| * ## `"character-device"` | ||
| * | ||
| * ## `"directory"` | ||
| * | ||
| * ## `"fifo"` | ||
| * | ||
| * ## `"symbolic-link"` | ||
| * | ||
| * ## `"regular-file"` | ||
| * | ||
| * ## `"socket"` | ||
| */ | ||
| export type DescriptorType = 'unknown' | 'block-device' | 'character-device' | 'directory' | 'fifo' | 'symbolic-link' | 'regular-file' | 'socket'; | ||
| export type DirectoryEntryStream = number; | ||
| export type LinkCount = bigint; | ||
| import type { Datetime } from '../interfaces/wasi-clocks-wall-clock'; | ||
| export { Datetime }; | ||
| export interface DescriptorStat { | ||
| type: DescriptorType, | ||
| linkCount: LinkCount, | ||
| size: Filesize, | ||
| dataAccessTimestamp: Datetime, | ||
| dataModificationTimestamp: Datetime, | ||
| statusChangeTimestamp: Datetime, | ||
| } | ||
| export interface PathFlags { | ||
| symlinkFollow?: boolean, | ||
| } | ||
| export interface OpenFlags { | ||
| create?: boolean, | ||
| directory?: boolean, | ||
| exclusive?: boolean, | ||
| truncate?: boolean, | ||
| } | ||
| export interface DescriptorFlags { | ||
| read?: boolean, | ||
| write?: boolean, | ||
| fileIntegritySync?: boolean, | ||
| dataIntegritySync?: boolean, | ||
| requestedWriteSync?: boolean, | ||
| mutateDirectory?: boolean, | ||
| } | ||
| export interface Modes { | ||
| readable?: boolean, | ||
| writable?: boolean, | ||
| executable?: boolean, | ||
| } | ||
| export interface DirectoryEntry { | ||
| type: DescriptorType, | ||
| name: string, | ||
| } | ||
| export interface MetadataHashValue { | ||
| lower: bigint, | ||
| upper: bigint, | ||
| } |
| export namespace WasiIoStreams { | ||
| export function read(this_: InputStream, len: bigint): [Uint8Array, StreamStatus]; | ||
| export function blockingRead(this_: InputStream, len: bigint): [Uint8Array, StreamStatus]; | ||
| export function dropInputStream(this_: InputStream): void; | ||
| export function checkWrite(this_: OutputStream): bigint; | ||
| export function write(this_: OutputStream, contents: Uint8Array): void; | ||
| export function blockingWriteAndFlush(this_: OutputStream, contents: Uint8Array): void; | ||
| export function blockingFlush(this_: OutputStream): void; | ||
| export function dropOutputStream(this_: OutputStream): void; | ||
| } | ||
| export type InputStream = number; | ||
| /** | ||
| * # Variants | ||
| * | ||
| * ## `"open"` | ||
| * | ||
| * ## `"ended"` | ||
| */ | ||
| export type StreamStatus = 'open' | 'ended'; | ||
| export type OutputStream = number; | ||
| /** | ||
| * # Variants | ||
| * | ||
| * ## `"last-operation-failed"` | ||
| * | ||
| * ## `"closed"` | ||
| */ | ||
| export type WriteError = 'last-operation-failed' | 'closed'; |
| export namespace WasiRandomRandom { | ||
| export function getRandomBytes(len: bigint): Uint8Array; | ||
| } |
@@ -27,18 +27,18 @@ /** | ||
| } | ||
| import { WasiCliEnvironment1 } from './imports/wasi-cli-environment'; | ||
| import { WasiCliExit1 } from './imports/wasi-cli-exit'; | ||
| import { WasiCliStderr1 } from './imports/wasi-cli-stderr'; | ||
| import { WasiCliStdin1 } from './imports/wasi-cli-stdin'; | ||
| import { WasiCliStdout1 } from './imports/wasi-cli-stdout'; | ||
| import { WasiCliTerminalInput1 } from './imports/wasi-cli-terminal-input'; | ||
| import { WasiCliTerminalOutput1 } from './imports/wasi-cli-terminal-output'; | ||
| import { WasiCliTerminalStderr1 } from './imports/wasi-cli-terminal-stderr'; | ||
| import { WasiCliTerminalStdin1 } from './imports/wasi-cli-terminal-stdin'; | ||
| import { WasiCliTerminalStdout1 } from './imports/wasi-cli-terminal-stdout'; | ||
| import { WasiClocksWallClock1 } from './imports/wasi-clocks-wall-clock'; | ||
| import { WasiFilesystemPreopens1 } from './imports/wasi-filesystem-preopens'; | ||
| import { WasiFilesystemTypes1 } from './imports/wasi-filesystem-types'; | ||
| import { WasiIoStreams1 } from './imports/wasi-io-streams'; | ||
| import { WasiRandomRandom1 } from './imports/wasi-random-random'; | ||
| export function stubWasi(engine: Uint8Array | ArrayBuffer, stdout: boolean): Uint8Array; | ||
| export function spliceBindings(sourceName: string | null, spidermonkeyEngine: Uint8Array | ArrayBuffer, witWorld: string | null, witPath: string | null, worldName: string | null): SpliceResult; | ||
| import { WasiCliEnvironment } from './interfaces/wasi-cli-environment'; | ||
| import { WasiCliExit } from './interfaces/wasi-cli-exit'; | ||
| import { WasiCliStderr } from './interfaces/wasi-cli-stderr'; | ||
| import { WasiCliStdin } from './interfaces/wasi-cli-stdin'; | ||
| import { WasiCliStdout } from './interfaces/wasi-cli-stdout'; | ||
| import { WasiCliTerminalInput } from './interfaces/wasi-cli-terminal-input'; | ||
| import { WasiCliTerminalOutput } from './interfaces/wasi-cli-terminal-output'; | ||
| import { WasiCliTerminalStderr } from './interfaces/wasi-cli-terminal-stderr'; | ||
| import { WasiCliTerminalStdin } from './interfaces/wasi-cli-terminal-stdin'; | ||
| import { WasiCliTerminalStdout } from './interfaces/wasi-cli-terminal-stdout'; | ||
| import { WasiClocksWallClock } from './interfaces/wasi-clocks-wall-clock'; | ||
| import { WasiFilesystemPreopens } from './interfaces/wasi-filesystem-preopens'; | ||
| import { WasiFilesystemTypes } from './interfaces/wasi-filesystem-types'; | ||
| import { WasiIoStreams } from './interfaces/wasi-io-streams'; | ||
| import { WasiRandomRandom } from './interfaces/wasi-random-random'; | ||
| export function stubWasi(engine: Uint8Array, stdout: boolean): Uint8Array; | ||
| export function spliceBindings(sourceName: string | undefined, spidermonkeyEngine: Uint8Array, witWorld: string | undefined, witPath: string | undefined, worldName: string | undefined): SpliceResult; |
+3
-3
| { | ||
| "name": "@bytecodealliance/componentize-js", | ||
| "version": "0.2.0", | ||
| "version": "0.3.0", | ||
| "homepage": "https://github.com/bytecodealliance/componentize-js#readme", | ||
@@ -8,7 +8,7 @@ "type": "module", | ||
| "devDependencies": { | ||
| "@bytecodealliance/preview2-shim": "0.0.13", | ||
| "@bytecodealliance/preview2-shim": "0.0.16", | ||
| "mocha": "^10.2.0" | ||
| }, | ||
| "dependencies": { | ||
| "@bytecodealliance/jco": "^0.11.0", | ||
| "@bytecodealliance/jco": "^0.12.1", | ||
| "@bytecodealliance/wizer": "^3.0.1" | ||
@@ -15,0 +15,0 @@ }, |
| export namespace WasiCliEnvironment { | ||
| export function getEnvironment(): [string, string][]; | ||
| } |
| export namespace WasiCliExit { | ||
| export function exit(status: Result<void, void>): void; | ||
| } | ||
| export type Result<T, E> = { tag: 'ok', val: T } | { tag: 'err', val: E }; |
| export namespace WasiCliStderr { | ||
| export function getStderr(): OutputStream; | ||
| } | ||
| import type { OutputStream } from '../exports/wasi-io-streams'; | ||
| export { OutputStream }; |
| export namespace WasiCliStdin { | ||
| export function getStdin(): InputStream; | ||
| } | ||
| import type { InputStream } from '../exports/wasi-io-streams'; | ||
| export { InputStream }; |
| export namespace WasiCliStdout { | ||
| export function getStdout(): OutputStream; | ||
| } | ||
| import type { OutputStream } from '../exports/wasi-io-streams'; | ||
| export { OutputStream }; |
| export namespace WasiCliTerminalInput { | ||
| export function dropTerminalInput(this: TerminalInput): void; | ||
| } | ||
| export type TerminalInput = number; |
| export namespace WasiCliTerminalOutput { | ||
| export function dropTerminalOutput(this: TerminalOutput): void; | ||
| } | ||
| export type TerminalOutput = number; |
| export namespace WasiCliTerminalStderr { | ||
| export function getTerminalStderr(): TerminalOutput | null; | ||
| } | ||
| import type { TerminalOutput } from '../exports/wasi-cli-terminal-output'; | ||
| export { TerminalOutput }; |
| export namespace WasiCliTerminalStdin { | ||
| export function getTerminalStdin(): TerminalInput | null; | ||
| } | ||
| import type { TerminalInput } from '../exports/wasi-cli-terminal-input'; | ||
| export { TerminalInput }; |
| export namespace WasiCliTerminalStdout { | ||
| export function getTerminalStdout(): TerminalOutput | null; | ||
| } | ||
| import type { TerminalOutput } from '../exports/wasi-cli-terminal-output'; | ||
| export { TerminalOutput }; |
| export namespace WasiClocksWallClock { | ||
| } | ||
| export interface Datetime { | ||
| seconds: bigint, | ||
| nanoseconds: number, | ||
| } |
| export namespace WasiFilesystemPreopens { | ||
| export function getDirectories(): [Descriptor, string][]; | ||
| } | ||
| import type { Descriptor } from '../exports/wasi-filesystem-types'; | ||
| export { Descriptor }; |
| export namespace WasiFilesystemTypes { | ||
| export function readViaStream(this: Descriptor, offset: Filesize): InputStream; | ||
| export function writeViaStream(this: Descriptor, offset: Filesize): OutputStream; | ||
| export function appendViaStream(this: Descriptor): OutputStream; | ||
| export function getType(this: Descriptor): DescriptorType; | ||
| export function readDirectory(this: Descriptor): DirectoryEntryStream; | ||
| export function stat(this: Descriptor): DescriptorStat; | ||
| export function statAt(this: Descriptor, pathFlags: PathFlags, path: string): DescriptorStat; | ||
| export function openAt(this: Descriptor, pathFlags: PathFlags, path: string, openFlags: OpenFlags, flags: DescriptorFlags, modes: Modes): Descriptor; | ||
| export function dropDescriptor(this: Descriptor): void; | ||
| export function readDirectoryEntry(this: DirectoryEntryStream): DirectoryEntry | null; | ||
| export function dropDirectoryEntryStream(this: DirectoryEntryStream): void; | ||
| export function metadataHash(this: Descriptor): MetadataHashValue; | ||
| export function metadataHashAt(this: Descriptor, pathFlags: PathFlags, path: string): MetadataHashValue; | ||
| } | ||
| export type Descriptor = number; | ||
| export type Filesize = bigint; | ||
| import type { InputStream } from '../exports/wasi-io-streams'; | ||
| export { InputStream }; | ||
| /** | ||
| * # Variants | ||
| * | ||
| * ## `"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"` | ||
| */ | ||
| 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 '../exports/wasi-io-streams'; | ||
| export { OutputStream }; | ||
| /** | ||
| * # Variants | ||
| * | ||
| * ## `"unknown"` | ||
| * | ||
| * ## `"block-device"` | ||
| * | ||
| * ## `"character-device"` | ||
| * | ||
| * ## `"directory"` | ||
| * | ||
| * ## `"fifo"` | ||
| * | ||
| * ## `"symbolic-link"` | ||
| * | ||
| * ## `"regular-file"` | ||
| * | ||
| * ## `"socket"` | ||
| */ | ||
| export type DescriptorType = 'unknown' | 'block-device' | 'character-device' | 'directory' | 'fifo' | 'symbolic-link' | 'regular-file' | 'socket'; | ||
| export type DirectoryEntryStream = number; | ||
| export type LinkCount = bigint; | ||
| import type { Datetime } from '../exports/wasi-clocks-wall-clock'; | ||
| export { Datetime }; | ||
| export interface DescriptorStat { | ||
| type: DescriptorType, | ||
| linkCount: LinkCount, | ||
| size: Filesize, | ||
| dataAccessTimestamp: Datetime, | ||
| dataModificationTimestamp: Datetime, | ||
| statusChangeTimestamp: Datetime, | ||
| } | ||
| export interface PathFlags { | ||
| symlinkFollow?: boolean, | ||
| } | ||
| export interface OpenFlags { | ||
| create?: boolean, | ||
| directory?: boolean, | ||
| exclusive?: boolean, | ||
| truncate?: boolean, | ||
| } | ||
| export interface DescriptorFlags { | ||
| read?: boolean, | ||
| write?: boolean, | ||
| fileIntegritySync?: boolean, | ||
| dataIntegritySync?: boolean, | ||
| requestedWriteSync?: boolean, | ||
| mutateDirectory?: boolean, | ||
| } | ||
| export interface Modes { | ||
| readable?: boolean, | ||
| writable?: boolean, | ||
| executable?: boolean, | ||
| } | ||
| export interface DirectoryEntry { | ||
| type: DescriptorType, | ||
| name: string, | ||
| } | ||
| export interface MetadataHashValue { | ||
| lower: bigint, | ||
| upper: bigint, | ||
| } |
| export namespace WasiIoStreams { | ||
| export function read(this: InputStream, len: bigint): [Uint8Array, StreamStatus]; | ||
| export function blockingRead(this: InputStream, len: bigint): [Uint8Array, StreamStatus]; | ||
| export function dropInputStream(this: InputStream): void; | ||
| export function write(this: OutputStream, buf: Uint8Array | ArrayBuffer): [bigint, StreamStatus]; | ||
| export function blockingWrite(this: OutputStream, buf: Uint8Array | ArrayBuffer): [bigint, StreamStatus]; | ||
| export function dropOutputStream(this: OutputStream): void; | ||
| } | ||
| export type InputStream = number; | ||
| /** | ||
| * # Variants | ||
| * | ||
| * ## `"open"` | ||
| * | ||
| * ## `"ended"` | ||
| */ | ||
| export type StreamStatus = 'open' | 'ended'; | ||
| export type OutputStream = number; |
| export namespace WasiRandomRandom { | ||
| export function getRandomBytes(len: bigint): Uint8Array; | ||
| } |
| export namespace WasiCliEnvironment1 { | ||
| export function getEnvironment(): [string, string][]; | ||
| } |
| export namespace WasiCliExit1 { | ||
| export function exit(status: Result<void, void>): void; | ||
| } | ||
| export type Result<T, E> = { tag: 'ok', val: T } | { tag: 'err', val: E }; |
| export namespace WasiCliStderr1 { | ||
| export function getStderr(): OutputStream; | ||
| } | ||
| import type { OutputStream } from '../imports/wasi-io-streams'; | ||
| export { OutputStream }; |
| export namespace WasiCliStdin1 { | ||
| export function getStdin(): InputStream; | ||
| } | ||
| import type { InputStream } from '../imports/wasi-io-streams'; | ||
| export { InputStream }; |
| export namespace WasiCliStdout1 { | ||
| export function getStdout(): OutputStream; | ||
| } | ||
| import type { OutputStream } from '../imports/wasi-io-streams'; | ||
| export { OutputStream }; |
| export namespace WasiCliTerminalInput1 { | ||
| export function dropTerminalInput(this: TerminalInput): void; | ||
| } | ||
| export type TerminalInput = number; |
| export namespace WasiCliTerminalOutput1 { | ||
| export function dropTerminalOutput(this: TerminalOutput): void; | ||
| } | ||
| export type TerminalOutput = number; |
| export namespace WasiCliTerminalStderr1 { | ||
| export function getTerminalStderr(): TerminalOutput | null; | ||
| } | ||
| import type { TerminalOutput } from '../imports/wasi-cli-terminal-output'; | ||
| export { TerminalOutput }; |
| export namespace WasiCliTerminalStdin1 { | ||
| export function getTerminalStdin(): TerminalInput | null; | ||
| } | ||
| import type { TerminalInput } from '../imports/wasi-cli-terminal-input'; | ||
| export { TerminalInput }; |
| export namespace WasiCliTerminalStdout1 { | ||
| export function getTerminalStdout(): TerminalOutput | null; | ||
| } | ||
| import type { TerminalOutput } from '../imports/wasi-cli-terminal-output'; | ||
| export { TerminalOutput }; |
| export namespace WasiClocksWallClock1 { | ||
| } | ||
| export interface Datetime { | ||
| seconds: bigint, | ||
| nanoseconds: number, | ||
| } |
| export namespace WasiFilesystemPreopens1 { | ||
| export function getDirectories(): [Descriptor, string][]; | ||
| } | ||
| import type { Descriptor } from '../imports/wasi-filesystem-types'; | ||
| export { Descriptor }; |
| export namespace WasiFilesystemTypes1 { | ||
| export function readViaStream(this: Descriptor, offset: Filesize): InputStream; | ||
| export function writeViaStream(this: Descriptor, offset: Filesize): OutputStream; | ||
| export function appendViaStream(this: Descriptor): OutputStream; | ||
| export function getType(this: Descriptor): DescriptorType; | ||
| export function readDirectory(this: Descriptor): DirectoryEntryStream; | ||
| export function stat(this: Descriptor): DescriptorStat; | ||
| export function statAt(this: Descriptor, pathFlags: PathFlags, path: string): DescriptorStat; | ||
| export function openAt(this: Descriptor, pathFlags: PathFlags, path: string, openFlags: OpenFlags, flags: DescriptorFlags, modes: Modes): Descriptor; | ||
| export function dropDescriptor(this: Descriptor): void; | ||
| export function readDirectoryEntry(this: DirectoryEntryStream): DirectoryEntry | null; | ||
| export function dropDirectoryEntryStream(this: DirectoryEntryStream): void; | ||
| export function metadataHash(this: Descriptor): MetadataHashValue; | ||
| export function metadataHashAt(this: Descriptor, pathFlags: PathFlags, path: string): MetadataHashValue; | ||
| } | ||
| export type Descriptor = number; | ||
| export type Filesize = bigint; | ||
| import type { InputStream } from '../imports/wasi-io-streams'; | ||
| export { InputStream }; | ||
| /** | ||
| * # Variants | ||
| * | ||
| * ## `"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"` | ||
| */ | ||
| 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 '../imports/wasi-io-streams'; | ||
| export { OutputStream }; | ||
| /** | ||
| * # Variants | ||
| * | ||
| * ## `"unknown"` | ||
| * | ||
| * ## `"block-device"` | ||
| * | ||
| * ## `"character-device"` | ||
| * | ||
| * ## `"directory"` | ||
| * | ||
| * ## `"fifo"` | ||
| * | ||
| * ## `"symbolic-link"` | ||
| * | ||
| * ## `"regular-file"` | ||
| * | ||
| * ## `"socket"` | ||
| */ | ||
| export type DescriptorType = 'unknown' | 'block-device' | 'character-device' | 'directory' | 'fifo' | 'symbolic-link' | 'regular-file' | 'socket'; | ||
| export type DirectoryEntryStream = number; | ||
| export type LinkCount = bigint; | ||
| import type { Datetime } from '../imports/wasi-clocks-wall-clock'; | ||
| export { Datetime }; | ||
| export interface DescriptorStat { | ||
| type: DescriptorType, | ||
| linkCount: LinkCount, | ||
| size: Filesize, | ||
| dataAccessTimestamp: Datetime, | ||
| dataModificationTimestamp: Datetime, | ||
| statusChangeTimestamp: Datetime, | ||
| } | ||
| export interface PathFlags { | ||
| symlinkFollow?: boolean, | ||
| } | ||
| export interface OpenFlags { | ||
| create?: boolean, | ||
| directory?: boolean, | ||
| exclusive?: boolean, | ||
| truncate?: boolean, | ||
| } | ||
| export interface DescriptorFlags { | ||
| read?: boolean, | ||
| write?: boolean, | ||
| fileIntegritySync?: boolean, | ||
| dataIntegritySync?: boolean, | ||
| requestedWriteSync?: boolean, | ||
| mutateDirectory?: boolean, | ||
| } | ||
| export interface Modes { | ||
| readable?: boolean, | ||
| writable?: boolean, | ||
| executable?: boolean, | ||
| } | ||
| export interface DirectoryEntry { | ||
| type: DescriptorType, | ||
| name: string, | ||
| } | ||
| export interface MetadataHashValue { | ||
| lower: bigint, | ||
| upper: bigint, | ||
| } |
| export namespace WasiIoStreams1 { | ||
| export function read(this: InputStream, len: bigint): [Uint8Array | ArrayBuffer, StreamStatus]; | ||
| export function blockingRead(this: InputStream, len: bigint): [Uint8Array | ArrayBuffer, StreamStatus]; | ||
| export function dropInputStream(this: InputStream): void; | ||
| export function write(this: OutputStream, buf: Uint8Array): [bigint, StreamStatus]; | ||
| export function blockingWrite(this: OutputStream, buf: Uint8Array): [bigint, StreamStatus]; | ||
| export function dropOutputStream(this: OutputStream): void; | ||
| } | ||
| export type InputStream = number; | ||
| /** | ||
| * # Variants | ||
| * | ||
| * ## `"open"` | ||
| * | ||
| * ## `"ended"` | ||
| */ | ||
| export type StreamStatus = 'open' | 'ended'; | ||
| export type OutputStream = number; |
| export namespace WasiRandomRandom1 { | ||
| export function getRandomBytes(len: bigint): Uint8Array | ArrayBuffer; | ||
| } |
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
12330191
8.57%26
-36.59%3856
-3.5%+ Added
+ Added
- Removed
- Removed