@bytecodealliance/jco 1.16.1 → 1.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  <strong>JavaScript toolchain for working with <a href="https://github.com/WebAssembly/component-model">WebAssembly Components</a></strong>
6
6
  </p>
7
7
 
8
- <strong>A <a href="https://bytecodealliance.org/">Bytecode Alliance</a> project</strong>
8
+ <strong>A <a href="https://bytecodealliance.org/">Bytecode Alliance</a> project</strong>
9
9
 
10
10
  <p>
11
11
  <a href="https://github.com/bytecodealliance/jco/actions?query=workflow%3ACI"><img src="https://github.com/bytecodealliance/jco/workflows/CI/badge.svg" alt="build status" /></a>
@@ -24,11 +24,11 @@ Jco provides a fully native JS toolchain for working with [WebAssembly Component
24
24
 
25
25
  Features include:
26
26
 
27
- * "Transpiling" Wasm Component binaries into ES modules that can run in any JS environment.
28
- * WASI Preview2 support in Node.js & browsers (experimental).
29
- * Component builds of [Wasm Tools](https://github.com/bytecodealliance/wasm-tools) helpers, available for use as a library or CLI commands for use in native JS environments, as well as optimization helper for Components via Binaryen.
30
- * Run and serve commands like Wasmtime, as JS implementations of the Command and HTTP Proxy worlds.
31
- * "Componentize" command to easily create components written in JavaScript (wrapper of [ComponentizeJS](https://github.com/bytecodealliance/ComponentizeJS)).
27
+ - "Transpiling" Wasm Component binaries into ES modules that can run in any JS environment.
28
+ - WASI Preview2 support in Node.js & browsers (experimental).
29
+ - Component builds of [Wasm Tools](https://github.com/bytecodealliance/wasm-tools) helpers, available for use as a library or CLI commands for use in native JS environments, as well as optimization helper for Components via Binaryen.
30
+ - Run and serve commands like Wasmtime, as JS implementations of the Command and HTTP Proxy worlds.
31
+ - "Componentize" command to easily create components written in JavaScript (wrapper of [ComponentizeJS](https://github.com/bytecodealliance/ComponentizeJS)).
32
32
 
33
33
  For creating components in other languages, see the [Component Model Book](https://component-model.bytecodealliance.org/language-support.html) and [Wit Bindgen](https://github.com/bytecodealliance/wit-bindgen) for various guest bindgen helpers.
34
34
 
@@ -1,25 +1,13 @@
1
1
  /** @module Interface wasi:filesystem/types@0.2.3 **/
2
2
  export function filesystemErrorCode(err: Error): ErrorCode | undefined;
3
- /**
4
- * # Variants
5
- *
6
- * ## `"unknown"`
7
- *
8
- * ## `"block-device"`
9
- *
10
- * ## `"character-device"`
11
- *
12
- * ## `"directory"`
13
- *
14
- * ## `"fifo"`
15
- *
16
- * ## `"symbolic-link"`
17
- *
18
- * ## `"regular-file"`
19
- *
20
- * ## `"socket"`
21
- */
22
- export type DescriptorType = 'unknown' | 'block-device' | 'character-device' | 'directory' | 'fifo' | 'symbolic-link' | 'regular-file' | 'socket';
3
+ export interface DescriptorFlags {
4
+ read?: boolean,
5
+ write?: boolean,
6
+ fileIntegritySync?: boolean,
7
+ dataIntegritySync?: boolean,
8
+ requestedWriteSync?: boolean,
9
+ mutateDirectory?: boolean,
10
+ }
23
11
  /**
24
12
  * # Variants
25
13
  *
@@ -98,6 +86,26 @@ export type DescriptorType = 'unknown' | 'block-device' | 'character-device' | '
98
86
  * ## `"cross-device"`
99
87
  */
100
88
  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';
89
+ /**
90
+ * # Variants
91
+ *
92
+ * ## `"unknown"`
93
+ *
94
+ * ## `"block-device"`
95
+ *
96
+ * ## `"character-device"`
97
+ *
98
+ * ## `"directory"`
99
+ *
100
+ * ## `"fifo"`
101
+ *
102
+ * ## `"symbolic-link"`
103
+ *
104
+ * ## `"regular-file"`
105
+ *
106
+ * ## `"socket"`
107
+ */
108
+ export type DescriptorType = 'unknown' | 'block-device' | 'character-device' | 'directory' | 'fifo' | 'symbolic-link' | 'regular-file' | 'socket';
101
109
  export interface MetadataHashValue {
102
110
  lower: bigint,
103
111
  upper: bigint,
@@ -125,14 +133,6 @@ export interface OpenFlags {
125
133
  exclusive?: boolean,
126
134
  truncate?: boolean,
127
135
  }
128
- export interface DescriptorFlags {
129
- read?: boolean,
130
- write?: boolean,
131
- fileIntegritySync?: boolean,
132
- dataIntegritySync?: boolean,
133
- requestedWriteSync?: boolean,
134
- mutateDirectory?: boolean,
135
- }
136
136
  export interface DirectoryEntry {
137
137
  type: DescriptorType,
138
138
  name: string,
@@ -146,6 +146,7 @@ export class Descriptor {
146
146
  readViaStream(offset: Filesize): InputStream;
147
147
  writeViaStream(offset: Filesize): OutputStream;
148
148
  appendViaStream(): OutputStream;
149
+ getFlags(): DescriptorFlags;
149
150
  getType(): DescriptorType;
150
151
  readDirectory(): DirectoryEntryStream;
151
152
  stat(): DescriptorStat;