@elaraai/east-node-std 0.0.1-beta.0 → 0.0.1-beta.10

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
@@ -123,13 +123,40 @@ Dual-licensed:
123
123
  - **Open Source**: [AGPL-3.0](LICENSE.md) - Free for open source use
124
124
  - **Commercial**: Available for proprietary use - contact support@elara.ai
125
125
 
126
+
127
+ ### Ecosystem
128
+
129
+ - **[East Node](https://github.com/elaraai/east-node)**: Node.js platform functions for I/O, databases, and system operations. Connect East programs to filesystems, SQL/NoSQL databases, cloud storage, and network services.
130
+ - [@elaraai/east-node-std](https://www.npmjs.com/package/@elaraai/east-node-std): Filesystem, console, HTTP fetch, crypto, random distributions, timestamps
131
+ - [@elaraai/east-node-io](https://www.npmjs.com/package/@elaraai/east-node-io): SQLite, PostgreSQL, MySQL, MongoDB, S3, FTP, SFTP
132
+ - [@elaraai/east-node-cli](https://www.npmjs.com/package/@elaraai/east-node-cli): CLI for running East IR programs in Node.js
133
+
134
+ - **[East Python](https://github.com/elaraai/east-py)**: Python runtime and platform functions for data science and machine learning. Execute East programs with access to optimization solvers, gradient boosting, neural networks, and model explainability.
135
+ - [@elaraai/east-py-datascience](https://www.npmjs.com/package/@elaraai/east-py-datascience): TypeScript types for optimization, gradient boosting, neural networks, explainability
136
+
137
+ - **[East UI](https://github.com/elaraai/east-ui)**: East types and expressions for building dashboards and interactive layouts. Define UIs as data structures that render consistently across React, web, and other environments.
138
+ - [@elaraai/east-ui](https://www.npmjs.com/package/@elaraai/east-ui): 50+ typed UI components for layouts, forms, charts, tables, dialogs
139
+ - [@elaraai/east-ui-components](https://www.npmjs.com/package/@elaraai/east-ui-components): React renderer with Chakra UI styling
140
+
141
+ - **[e3 - East Execution Engine](https://github.com/elaraai/e3)**: Durable execution engine for running East pipelines at scale. Features Git-like content-addressable storage, automatic memoization, task queuing, and real-time monitoring.
142
+ - [@elaraai/e3](https://www.npmjs.com/package/@elaraai/e3): SDK for authoring e3 packages with typed tasks and pipelines
143
+ - [@elaraai/e3-core](https://www.npmjs.com/package/@elaraai/e3-core): Git-like object store, task queue, result caching
144
+ - [@elaraai/e3-types](https://www.npmjs.com/package/@elaraai/e3-types): Shared type definitions for e3 packages
145
+ - [@elaraai/e3-cli](https://www.npmjs.com/package/@elaraai/e3-cli): `e3 init`, `e3 run`, `e3 logs` commands for managing and monitoring tasks
146
+ - [@elaraai/e3-api-client](https://www.npmjs.com/package/@elaraai/e3-api-client): HTTP client for remote e3 servers
147
+ - [@elaraai/e3-api-server](https://www.npmjs.com/package/@elaraai/e3-api-server): REST API server for e3 repositories
148
+
126
149
  ## Links
127
150
 
128
151
  - **Website**: [https://elaraai.com/](https://elaraai.com/)
129
152
  - **East Repository**: [https://github.com/elaraai/East](https://github.com/elaraai/East)
130
- - **Issues**: [https://github.com/elaraai/East/issues](https://github.com/elaraai/East/issues)
153
+ - **Issues**: [https://github.com/elaraai/east-node/issues](https://github.com/elaraai/east-node/issues)
131
154
  - **Email**: support@elara.ai
132
155
 
156
+ ## About Elara
157
+
158
+ East is developed by [Elara AI Pty Ltd](https://elaraai.com/), an AI-powered platform that creates economic digital twins of businesses that optimize performance. Elara combines business objectives, decisions and data to help organizations make data-driven decisions across operations, purchasing, sales and customer engagement, and project and investment planning. East powers the computational layer of Elara solutions, enabling the expression of complex business logic and data in a simple, type-safe and portable language.
159
+
133
160
  ---
134
161
 
135
- *Developed by [Elara AI Pty Ltd](https://elaraai.com/) - Powering the computational layer of AI-driven business optimization.*
162
+ *Developed by [Elara AI Pty Ltd](https://elaraai.com/)*
package/dist/console.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
4
  */
5
5
  import { StringType, NullType } from "@elaraai/east";
6
- import type { PlatformFunction, PlatformFunctionDef } from "@elaraai/east/internal";
6
+ import type { PlatformFunction } from "@elaraai/east/internal";
7
7
  /**
8
8
  * Writes a message to stdout with a newline.
9
9
  *
@@ -25,7 +25,7 @@ import type { PlatformFunction, PlatformFunctionDef } from "@elaraai/east/intern
25
25
  * });
26
26
  * ```
27
27
  */
28
- export declare const console_log: PlatformFunctionDef<[typeof StringType], typeof NullType>;
28
+ export declare const console_log: import("@elaraai/east").PlatformDefinition<[StringType], NullType>;
29
29
  /**
30
30
  * Writes a message to stderr with a newline.
31
31
  *
@@ -47,7 +47,7 @@ export declare const console_log: PlatformFunctionDef<[typeof StringType], typeo
47
47
  * });
48
48
  * ```
49
49
  */
50
- export declare const console_error: PlatformFunctionDef<[typeof StringType], typeof NullType>;
50
+ export declare const console_error: import("@elaraai/east").PlatformDefinition<[StringType], NullType>;
51
51
  /**
52
52
  * Writes a message to stdout without a newline.
53
53
  *
@@ -70,7 +70,7 @@ export declare const console_error: PlatformFunctionDef<[typeof StringType], typ
70
70
  * });
71
71
  * ```
72
72
  */
73
- export declare const console_write: PlatformFunctionDef<[typeof StringType], typeof NullType>;
73
+ export declare const console_write: import("@elaraai/east").PlatformDefinition<[StringType], NullType>;
74
74
  /**
75
75
  * Node.js implementation of console platform functions.
76
76
  *
@@ -118,7 +118,7 @@ export declare const Console: {
118
118
  * await compiled(); // Outputs: Hello, World!
119
119
  * ```
120
120
  */
121
- readonly log: PlatformFunctionDef<[StringType], NullType>;
121
+ readonly log: import("@elaraai/east").PlatformDefinition<[StringType], NullType>;
122
122
  /**
123
123
  * Writes a message to stderr with a newline.
124
124
  *
@@ -139,7 +139,7 @@ export declare const Console: {
139
139
  * await compiled(); // Outputs to stderr: Error: Invalid input
140
140
  * ```
141
141
  */
142
- readonly error: PlatformFunctionDef<[StringType], NullType>;
142
+ readonly error: import("@elaraai/east").PlatformDefinition<[StringType], NullType>;
143
143
  /**
144
144
  * Writes a message to stdout without a newline.
145
145
  *
@@ -161,7 +161,7 @@ export declare const Console: {
161
161
  * await compiled(); // Outputs: Processing... done!
162
162
  * ```
163
163
  */
164
- readonly write: PlatformFunctionDef<[StringType], NullType>;
164
+ readonly write: import("@elaraai/east").PlatformDefinition<[StringType], NullType>;
165
165
  /**
166
166
  * Node.js implementation of console platform functions.
167
167
  *
@@ -1 +1 @@
1
- {"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../src/console.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAQ,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAIpF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,WAAW,EAAE,mBAAmB,CAAC,CAAC,OAAO,UAAU,CAAC,EAAE,OAAO,QAAQ,CAC1B,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,aAAa,EAAE,mBAAmB,CAAC,CAAC,OAAO,UAAU,CAAC,EAAE,OAAO,QAAQ,CAC1B,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,aAAa,EAAE,mBAAmB,CAAC,CAAC,OAAO,UAAU,CAAC,EAAE,OAAO,QAAQ,CAC1B,CAAC;AAE3D;;;;GAIG;AACH,QAAA,MAAM,WAAW,EAAE,gBAAgB,EA+BlC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,OAAO;IAChB;;;;;;;;;;;;;;;;;;;OAmBG;;IAGH;;;;;;;;;;;;;;;;;;;OAmBG;;IAGH;;;;;;;;;;;;;;;;;;;;OAoBG;;IAGH;;;;OAIG;;CAEG,CAAC;AAGX,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB;;;;;;;;;;;;;;;;;;GAkBG"}
1
+ {"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../src/console.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAQ,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK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L,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACnB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,GAAG,EAAE,WAAW;IAEhB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,EAAE,aAAa;IAEpB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,KAAK,EAAE,aAAa;IAEpB;;;;OAIG;IACH,cAAc,EAAE,WAAW;CACrB,CAAC;AAEX,qCAAqC;AACrC,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB;;;;;;;;;;;;;;;;;;GAkBG"}
package/dist/crypto.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
4
  */
5
5
  import { StringType, IntegerType, BlobType } from "@elaraai/east";
6
- import type { PlatformFunction, PlatformFunctionDef } from "@elaraai/east/internal";
6
+ import type { PlatformFunction } from "@elaraai/east/internal";
7
7
  /**
8
8
  * Generates cryptographically secure random bytes.
9
9
  *
@@ -28,7 +28,7 @@ import type { PlatformFunction, PlatformFunctionDef } from "@elaraai/east/intern
28
28
  * });
29
29
  * ```
30
30
  */
31
- export declare const crypto_random_bytes: PlatformFunctionDef<[typeof IntegerType], typeof BlobType>;
31
+ export declare const crypto_random_bytes: import("@elaraai/east").PlatformDefinition<[IntegerType], BlobType>;
32
32
  /**
33
33
  * Computes SHA-256 hash of a string.
34
34
  *
@@ -50,7 +50,7 @@ export declare const crypto_random_bytes: PlatformFunctionDef<[typeof IntegerTyp
50
50
  * });
51
51
  * ```
52
52
  */
53
- export declare const crypto_hash_sha256: PlatformFunctionDef<[typeof StringType], typeof StringType>;
53
+ export declare const crypto_hash_sha256: import("@elaraai/east").PlatformDefinition<[StringType], StringType>;
54
54
  /**
55
55
  * Computes SHA-256 hash of binary data.
56
56
  *
@@ -72,7 +72,7 @@ export declare const crypto_hash_sha256: PlatformFunctionDef<[typeof StringType]
72
72
  * });
73
73
  * ```
74
74
  */
75
- export declare const crypto_hash_sha256_bytes: PlatformFunctionDef<[typeof BlobType], typeof BlobType>;
75
+ export declare const crypto_hash_sha256_bytes: import("@elaraai/east").PlatformDefinition<[BlobType], BlobType>;
76
76
  /**
77
77
  * Generates a random UUID v4.
78
78
  *
@@ -94,7 +94,7 @@ export declare const crypto_hash_sha256_bytes: PlatformFunctionDef<[typeof BlobT
94
94
  * });
95
95
  * ```
96
96
  */
97
- export declare const crypto_uuid: PlatformFunctionDef<[], typeof StringType>;
97
+ export declare const crypto_uuid: import("@elaraai/east").PlatformDefinition<[], StringType>;
98
98
  /**
99
99
  * Node.js implementation of cryptographic platform functions.
100
100
  *
@@ -140,7 +140,7 @@ export declare const Crypto: {
140
140
  * compiled(); // Uint8Array(32) [...]
141
141
  * ```
142
142
  */
143
- readonly randomBytes: PlatformFunctionDef<[IntegerType], BlobType>;
143
+ readonly randomBytes: import("@elaraai/east").PlatformDefinition<[IntegerType], BlobType>;
144
144
  /**
145
145
  * Computes SHA-256 hash of a string.
146
146
  *
@@ -160,7 +160,7 @@ export declare const Crypto: {
160
160
  * compiled("password"); // "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8"
161
161
  * ```
162
162
  */
163
- readonly hashSha256: PlatformFunctionDef<[StringType], StringType>;
163
+ readonly hashSha256: import("@elaraai/east").PlatformDefinition<[StringType], StringType>;
164
164
  /**
165
165
  * Computes SHA-256 hash of binary data.
166
166
  *
@@ -181,7 +181,7 @@ export declare const Crypto: {
181
181
  * compiled(fileData); // Uint8Array(32) [...]
182
182
  * ```
183
183
  */
184
- readonly hashSha256Bytes: PlatformFunctionDef<[BlobType], BlobType>;
184
+ readonly hashSha256Bytes: import("@elaraai/east").PlatformDefinition<[BlobType], BlobType>;
185
185
  /**
186
186
  * Generates a random UUID v4.
187
187
  *
@@ -200,7 +200,7 @@ export declare const Crypto: {
200
200
  * compiled(); // "550e8400-e29b-41d4-a716-446655440000"
201
201
  * ```
202
202
  */
203
- readonly uuid: PlatformFunctionDef<[], StringType>;
203
+ readonly uuid: import("@elaraai/east").PlatformDefinition<[], StringType>;
204
204
  /**
205
205
  * Node.js implementation of cryptographic platform functions.
206
206
  *
@@ -1 +1 @@
1
- {"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../src/crypto.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAQ,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAIpF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,CAAC,OAAO,WAAW,CAAC,EAAE,OAAO,QAAQ,CAAiE,CAAC;AAE7J;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,kBAAkB,EAAE,mBAAmB,CAAC,CAAC,OAAO,UAAU,CAAC,EAAE,OAAO,UAAU,CAAiE,CAAC;AAE7J;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,wBAAwB,EAAE,mBAAmB,CAAC,CAAC,OAAO,QAAQ,CAAC,EAAE,OAAO,QAAQ,CAAmE,CAAC;AAEjK;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,WAAW,EAAE,mBAAmB,CAAC,EAAE,EAAE,OAAO,UAAU,CAAgD,CAAC;AAEpH;;;;GAIG;AACH,QAAA,MAAM,UAAU,EAAE,gBAAgB,EAyCjC,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,MAAM;IACf;;;;;;;;;;;;;;;;;;;OAmBG;;IAGH;;;;;;;;;;;;;;;;;;OAkBG;;IAGH;;;;;;;;;;;;;;;;;;;OAmBG;;IAGH;;;;;;;;;;;;;;;;;OAiBG;;IAGH;;;;OAIG;;CAEG,CAAC;AAGX,OAAO,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../src/crypto.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAQ,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI/D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,mBAAmB,qEAAgE,CAAC;AAEjG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,kBAAkB,sEAAgE,CAAC;AAEhG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,wBAAwB,kEAAkE,CAAC;AAExG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,WAAW,4DAA+C,CAAC;AACxE;;;;GAIG;AACH,QAAA,MAAM,UAAU,EAAE,gBAAgB,EAyCjC,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,MAAM;IACf;;;;;;;;;;;;;;;;;;;OAmBG;;IAGH;;;;;;;;;;;;;;;;;;OAkBG;;IAGH;;;;;;;;;;;;;;;;;;;OAmBG;;IAGH;;;;;;;;;;;;;;;;;OAiBG;;IAGH;;;;OAIG;;CAEG,CAAC;AAGX,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"crypto.js","sourceRoot":"","sources":["../src/crypto.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAExE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC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AM,EAAE,EAAE,EAAE;gBACxE,KAAK,EAAE,GAAG;aACb,CAAC,CAAC;QACP,CAAC;IACL,CAAC,CAAC;IACF,WAAW,CAAC,SAAS,CAAC,GAAG,EAAE;QACvB,IAAI,CAAC;YACD,OAAO,UAAU,EAAE,CAAC;QACxB,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAChB,MAAM,IAAI,SAAS,CAAC,4BAA4B,GAAG,CAAC,OAAO,EAAE,EAAE;gBAC3D,QAAQ,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;gBAC3D,KAAK,EAAE,GAAG;aACb,CAAC,CAAC;QACP,CAAC;IACL,CAAC,CAAC;CACL,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,WAAW,EAAE,mBAAmB;IAEhC;;;;;;;;;;;;;;;;;;OAkBG;IACH,UAAU,EAAE,kBAAkB;IAE9B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,eAAe,EAAE,wBAAwB;IAEzC;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,EAAE,WAAW;IAEjB;;;;OAIG;IACH,cAAc,EAAE,UAAU;CACpB,CAAC;AAEX,qCAAqC;AACrC,OAAO,EAAE,UAAU,EAAE,CAAC"}
package/dist/fetch.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
4
  */
5
5
  import { StringType, IntegerType, BooleanType, DictType, OptionType, VariantType, NullType, StructType } from "@elaraai/east";
6
- import type { PlatformFunction, PlatformFunctionDef } from "@elaraai/east/internal";
6
+ import type { PlatformFunction } from "@elaraai/east/internal";
7
7
  /**
8
8
  * HTTP method variant type.
9
9
  *
@@ -78,7 +78,7 @@ export declare const FetchResponse: StructType<{
78
78
  * });
79
79
  * ```
80
80
  */
81
- export declare const fetch_get: PlatformFunctionDef<[typeof StringType], typeof StringType>;
81
+ export declare const fetch_get: import("@elaraai/east").AsyncPlatformDefinition<[StringType], StringType>;
82
82
  /**
83
83
  * Performs an HTTP POST request with a string body.
84
84
  *
@@ -107,7 +107,7 @@ export declare const fetch_get: PlatformFunctionDef<[typeof StringType], typeof
107
107
  * });
108
108
  * ```
109
109
  */
110
- export declare const fetch_post: PlatformFunctionDef<[typeof StringType, typeof StringType], typeof StringType>;
110
+ export declare const fetch_post: import("@elaraai/east").AsyncPlatformDefinition<[StringType, StringType], StringType>;
111
111
  /**
112
112
  * Performs a full HTTP request with custom configuration.
113
113
  *
@@ -137,7 +137,26 @@ export declare const fetch_post: PlatformFunctionDef<[typeof StringType, typeof
137
137
  * });
138
138
  * ```
139
139
  */
140
- export declare const fetch_request: PlatformFunctionDef<[typeof FetchRequestConfig], typeof FetchResponse>;
140
+ export declare const fetch_request: import("@elaraai/east").AsyncPlatformDefinition<[StructType<{
141
+ url: StringType;
142
+ method: VariantType<{
143
+ GET: NullType;
144
+ POST: NullType;
145
+ PUT: NullType;
146
+ DELETE: NullType;
147
+ PATCH: NullType;
148
+ HEAD: NullType;
149
+ OPTIONS: NullType;
150
+ }>;
151
+ headers: DictType<StringType, StringType>;
152
+ body: OptionType<StringType>;
153
+ }>], StructType<{
154
+ status: IntegerType;
155
+ statusText: StringType;
156
+ headers: DictType<StringType, StringType>;
157
+ body: StringType;
158
+ ok: BooleanType;
159
+ }>>;
141
160
  /**
142
161
  * Node.js implementation of fetch platform functions.
143
162
  *
@@ -184,7 +203,7 @@ export declare const Fetch: {
184
203
  * await compiled(); // Returns: response body as string
185
204
  * ```
186
205
  */
187
- readonly get: PlatformFunctionDef<[StringType], StringType>;
206
+ readonly get: import("@elaraai/east").AsyncPlatformDefinition<[StringType], StringType>;
188
207
  /**
189
208
  * Performs an HTTP POST request with a string body.
190
209
  *
@@ -207,7 +226,7 @@ export declare const Fetch: {
207
226
  * await compiled(); // Returns: response body as string
208
227
  * ```
209
228
  */
210
- readonly post: PlatformFunctionDef<[StringType, StringType], StringType>;
229
+ readonly post: import("@elaraai/east").AsyncPlatformDefinition<[StringType, StringType], StringType>;
211
230
  /**
212
231
  * Performs a full HTTP request with custom configuration.
213
232
  *
@@ -235,7 +254,7 @@ export declare const Fetch: {
235
254
  * const response = await compiled(); // Returns: FetchResponse object
236
255
  * ```
237
256
  */
238
- readonly request: PlatformFunctionDef<[StructType<{
257
+ readonly request: import("@elaraai/east").AsyncPlatformDefinition<[StructType<{
239
258
  url: StringType;
240
259
  method: VariantType<{
241
260
  GET: NullType;
@@ -1 +1 @@
1
- {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAQ,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAoB,MAAM,eAAe,CAAC;AACtJ,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAGpF;;;;;GAKG;AACH,eAAO,MAAM,WAAW;;;;;;;;EAQtB,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;EAK7B,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;;;EAMxB,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,SAAS,EAAE,mBAAmB,CAAC,CAAC,OAAO,UAAU,CAAC,EAAE,OAAO,UAAU,CAAwD,CAAC;AAE3I;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,UAAU,EAAE,mBAAmB,CAAC,CAAC,OAAO,UAAU,EAAE,OAAO,UAAU,CAAC,EAAE,OAAO,UAAU,CAAqE,CAAC;AAE5K;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG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;;;;;;;;;;;;;;;;GAA2E,CAAC;AAEtG;;;;GAIG;AACH,QAAA,MAAM,SAAS,EAAE,gBAAgB,EA+EhC,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,KAAK;IACd;;;;;;;;;;;;;;;;;;;OAmBG;;IAGH;;;;;;;;;;;;;;;;;;;;;OAqBG;;IAGH;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;;;;;;;;;;;;;;;;;;;;;IAGH;;;;OAIG;;IAGH;;OAEG;;QAEC;;WAEG;;;;;;;;;;QAGH;;WAEG;;;;;;;;;;;;;;;QAGH;;WAEG;;;;;;;;;CAGD,CAAC;AAGX,OAAO,EAAE,SAAS,EAAE,CAAC"}
package/dist/fetch.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2025 Elara AI Pty Ltd
3
3
  * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
4
  */
5
- import { East, StringType, IntegerType, BooleanType, DictType, OptionType, VariantType, NullType, StructType } from "@elaraai/east";
5
+ import { East, StringType, IntegerType, BooleanType, DictType, OptionType, VariantType, NullType, StructType, SortedMap } from "@elaraai/east";
6
6
  import { EastError } from "@elaraai/east/internal";
7
7
  /**
8
8
  * HTTP method variant type.
@@ -70,7 +70,7 @@ export const FetchResponse = StructType({
70
70
  * });
71
71
  * ```
72
72
  */
73
- export const fetch_get = East.platform("fetch_get", [StringType], StringType);
73
+ export const fetch_get = East.asyncPlatform("fetch_get", [StringType], StringType);
74
74
  /**
75
75
  * Performs an HTTP POST request with a string body.
76
76
  *
@@ -99,7 +99,7 @@ export const fetch_get = East.platform("fetch_get", [StringType], StringType);
99
99
  * });
100
100
  * ```
101
101
  */
102
- export const fetch_post = East.platform("fetch_post", [StringType, StringType], StringType);
102
+ export const fetch_post = East.asyncPlatform("fetch_post", [StringType, StringType], StringType);
103
103
  /**
104
104
  * Performs a full HTTP request with custom configuration.
105
105
  *
@@ -129,14 +129,14 @@ export const fetch_post = East.platform("fetch_post", [StringType, StringType],
129
129
  * });
130
130
  * ```
131
131
  */
132
- export const fetch_request = East.platform("fetch_request", [FetchRequestConfig], FetchResponse);
132
+ export const fetch_request = East.asyncPlatform("fetch_request", [FetchRequestConfig], FetchResponse);
133
133
  /**
134
134
  * Node.js implementation of fetch platform functions.
135
135
  *
136
136
  * Pass this array to {@link East.compileAsync} to enable fetch operations.
137
137
  */
138
138
  const FetchImpl = [
139
- fetch_get.implementAsync(async (url) => {
139
+ fetch_get.implement(async (url) => {
140
140
  try {
141
141
  const response = await fetch(url);
142
142
  if (!response.ok) {
@@ -155,7 +155,7 @@ const FetchImpl = [
155
155
  });
156
156
  }
157
157
  }),
158
- fetch_post.implementAsync(async (url, body) => {
158
+ fetch_post.implement(async (url, body) => {
159
159
  try {
160
160
  const response = await fetch(url, {
161
161
  method: 'POST',
@@ -180,7 +180,7 @@ const FetchImpl = [
180
180
  });
181
181
  }
182
182
  }),
183
- fetch_request.implementAsync(async (config) => {
183
+ fetch_request.implement(async (config) => {
184
184
  const url = config.url;
185
185
  const method = config.method.type.toUpperCase(); // Get the variant tag
186
186
  const headers = {};
@@ -194,7 +194,7 @@ const FetchImpl = [
194
194
  headers,
195
195
  body: config.body.value,
196
196
  });
197
- const responseHeaders = new Map();
197
+ const responseHeaders = new SortedMap();
198
198
  response.headers.forEach((value, key) => {
199
199
  responseHeaders.set(key, value);
200
200
  });
package/dist/fetch.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"fetch.js","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAoB,MAAM,eAAe,CAAC;AAEtJ,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,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EAAE,kBAAkB;QAEjC;;WAEG;QACH,QAAQ,EAAE,aAAa;KAC1B;CACK,CAAC;AAEX,qCAAqC;AACrC,OAAO,EAAE,SAAS,EAAE,CAAC"}
package/dist/fs.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
4
  */
5
5
  import { StringType, NullType, BooleanType, ArrayType, BlobType } from "@elaraai/east";
6
- import type { PlatformFunction, PlatformFunctionDef } from "@elaraai/east/internal";
6
+ import type { PlatformFunction } from "@elaraai/east/internal";
7
7
  /**
8
8
  * Reads a file as a UTF-8 string.
9
9
  *
@@ -29,7 +29,7 @@ import type { PlatformFunction, PlatformFunctionDef } from "@elaraai/east/intern
29
29
  * });
30
30
  * ```
31
31
  */
32
- export declare const fs_read_file: PlatformFunctionDef<[typeof StringType], typeof StringType>;
32
+ export declare const fs_read_file: import("@elaraai/east").PlatformDefinition<[StringType], StringType>;
33
33
  /**
34
34
  * Writes a string to a file (overwrites existing content).
35
35
  *
@@ -55,7 +55,7 @@ export declare const fs_read_file: PlatformFunctionDef<[typeof StringType], type
55
55
  * });
56
56
  * ```
57
57
  */
58
- export declare const fs_write_file: PlatformFunctionDef<[typeof StringType, typeof StringType], typeof NullType>;
58
+ export declare const fs_write_file: import("@elaraai/east").PlatformDefinition<[StringType, StringType], NullType>;
59
59
  /**
60
60
  * Appends a string to a file.
61
61
  *
@@ -80,7 +80,7 @@ export declare const fs_write_file: PlatformFunctionDef<[typeof StringType, type
80
80
  * });
81
81
  * ```
82
82
  */
83
- export declare const fs_append_file: PlatformFunctionDef<[typeof StringType, typeof StringType], typeof NullType>;
83
+ export declare const fs_append_file: import("@elaraai/east").PlatformDefinition<[StringType, StringType], NullType>;
84
84
  /**
85
85
  * Deletes a file from the file system.
86
86
  *
@@ -105,7 +105,7 @@ export declare const fs_append_file: PlatformFunctionDef<[typeof StringType, typ
105
105
  * });
106
106
  * ```
107
107
  */
108
- export declare const fs_delete_file: PlatformFunctionDef<[typeof StringType], typeof NullType>;
108
+ export declare const fs_delete_file: import("@elaraai/east").PlatformDefinition<[StringType], NullType>;
109
109
  /**
110
110
  * Checks if a file or directory exists at the given path.
111
111
  *
@@ -126,7 +126,7 @@ export declare const fs_delete_file: PlatformFunctionDef<[typeof StringType], ty
126
126
  * });
127
127
  * ```
128
128
  */
129
- export declare const fs_exists: PlatformFunctionDef<[typeof StringType], typeof BooleanType>;
129
+ export declare const fs_exists: import("@elaraai/east").PlatformDefinition<[StringType], BooleanType>;
130
130
  /**
131
131
  * Checks if a path exists and is a regular file.
132
132
  *
@@ -147,7 +147,7 @@ export declare const fs_exists: PlatformFunctionDef<[typeof StringType], typeof
147
147
  * });
148
148
  * ```
149
149
  */
150
- export declare const fs_is_file: PlatformFunctionDef<[typeof StringType], typeof BooleanType>;
150
+ export declare const fs_is_file: import("@elaraai/east").PlatformDefinition<[StringType], BooleanType>;
151
151
  /**
152
152
  * Checks if a path exists and is a directory.
153
153
  *
@@ -168,7 +168,7 @@ export declare const fs_is_file: PlatformFunctionDef<[typeof StringType], typeof
168
168
  * });
169
169
  * ```
170
170
  */
171
- export declare const fs_is_directory: PlatformFunctionDef<[typeof StringType], typeof BooleanType>;
171
+ export declare const fs_is_directory: import("@elaraai/east").PlatformDefinition<[StringType], BooleanType>;
172
172
  /**
173
173
  * Creates a directory, including any necessary parent directories.
174
174
  *
@@ -193,7 +193,7 @@ export declare const fs_is_directory: PlatformFunctionDef<[typeof StringType], t
193
193
  * });
194
194
  * ```
195
195
  */
196
- export declare const fs_create_directory: PlatformFunctionDef<[typeof StringType], typeof NullType>;
196
+ export declare const fs_create_directory: import("@elaraai/east").PlatformDefinition<[StringType], NullType>;
197
197
  /**
198
198
  * Lists the names of all files and directories within a directory.
199
199
  *
@@ -220,7 +220,7 @@ export declare const fs_create_directory: PlatformFunctionDef<[typeof StringType
220
220
  * });
221
221
  * ```
222
222
  */
223
- export declare const fs_read_directory: PlatformFunctionDef<[typeof StringType], ReturnType<typeof ArrayType<typeof StringType>>>;
223
+ export declare const fs_read_directory: import("@elaraai/east").PlatformDefinition<[StringType], ArrayType<StringType>>;
224
224
  /**
225
225
  * Reads a file as binary data without any encoding.
226
226
  *
@@ -246,7 +246,7 @@ export declare const fs_read_directory: PlatformFunctionDef<[typeof StringType],
246
246
  * });
247
247
  * ```
248
248
  */
249
- export declare const fs_read_file_bytes: PlatformFunctionDef<[StringType], BlobType>;
249
+ export declare const fs_read_file_bytes: import("@elaraai/east").PlatformDefinition<[StringType], BlobType>;
250
250
  /**
251
251
  * Writes binary data to a file (overwrites existing content).
252
252
  *
@@ -273,7 +273,7 @@ export declare const fs_read_file_bytes: PlatformFunctionDef<[StringType], BlobT
273
273
  * });
274
274
  * ```
275
275
  */
276
- export declare const fs_write_file_bytes: PlatformFunctionDef<[typeof StringType, typeof BlobType], typeof NullType>;
276
+ export declare const fs_write_file_bytes: import("@elaraai/east").PlatformDefinition<[StringType, BlobType], NullType>;
277
277
  /**
278
278
  * Node.js implementation of file system platform functions.
279
279
  *
@@ -321,7 +321,7 @@ export declare const FileSystem: {
321
321
  * await compiled(); // Returns file content as string
322
322
  * ```
323
323
  */
324
- readonly readFile: PlatformFunctionDef<[StringType], StringType>;
324
+ readonly readFile: import("@elaraai/east").PlatformDefinition<[StringType], StringType>;
325
325
  /**
326
326
  * Writes a string to a file (overwrites existing content).
327
327
  *
@@ -343,7 +343,7 @@ export declare const FileSystem: {
343
343
  * await compiled(); // File written successfully
344
344
  * ```
345
345
  */
346
- readonly writeFile: PlatformFunctionDef<[StringType, StringType], NullType>;
346
+ readonly writeFile: import("@elaraai/east").PlatformDefinition<[StringType, StringType], NullType>;
347
347
  /**
348
348
  * Appends a string to a file.
349
349
  *
@@ -362,7 +362,7 @@ export declare const FileSystem: {
362
362
  * });
363
363
  * ```
364
364
  */
365
- readonly appendFile: PlatformFunctionDef<[StringType, StringType], NullType>;
365
+ readonly appendFile: import("@elaraai/east").PlatformDefinition<[StringType, StringType], NullType>;
366
366
  /**
367
367
  * Deletes a file from the file system.
368
368
  *
@@ -380,7 +380,7 @@ export declare const FileSystem: {
380
380
  * });
381
381
  * ```
382
382
  */
383
- readonly deleteFile: PlatformFunctionDef<[StringType], NullType>;
383
+ readonly deleteFile: import("@elaraai/east").PlatformDefinition<[StringType], NullType>;
384
384
  /**
385
385
  * Checks if a file or directory exists at the given path.
386
386
  *
@@ -397,7 +397,7 @@ export declare const FileSystem: {
397
397
  * });
398
398
  * ```
399
399
  */
400
- readonly exists: PlatformFunctionDef<[StringType], BooleanType>;
400
+ readonly exists: import("@elaraai/east").PlatformDefinition<[StringType], BooleanType>;
401
401
  /**
402
402
  * Checks if a path exists and is a regular file.
403
403
  *
@@ -414,7 +414,7 @@ export declare const FileSystem: {
414
414
  * });
415
415
  * ```
416
416
  */
417
- readonly isFile: PlatformFunctionDef<[StringType], BooleanType>;
417
+ readonly isFile: import("@elaraai/east").PlatformDefinition<[StringType], BooleanType>;
418
418
  /**
419
419
  * Checks if a path exists and is a directory.
420
420
  *
@@ -431,7 +431,7 @@ export declare const FileSystem: {
431
431
  * });
432
432
  * ```
433
433
  */
434
- readonly isDirectory: PlatformFunctionDef<[StringType], BooleanType>;
434
+ readonly isDirectory: import("@elaraai/east").PlatformDefinition<[StringType], BooleanType>;
435
435
  /**
436
436
  * Creates a directory, including any necessary parent directories.
437
437
  *
@@ -449,7 +449,7 @@ export declare const FileSystem: {
449
449
  * });
450
450
  * ```
451
451
  */
452
- readonly createDirectory: PlatformFunctionDef<[StringType], NullType>;
452
+ readonly createDirectory: import("@elaraai/east").PlatformDefinition<[StringType], NullType>;
453
453
  /**
454
454
  * Lists the names of all files and directories within a directory.
455
455
  *
@@ -467,7 +467,7 @@ export declare const FileSystem: {
467
467
  * });
468
468
  * ```
469
469
  */
470
- readonly readDirectory: PlatformFunctionDef<[StringType], ArrayType<StringType>>;
470
+ readonly readDirectory: import("@elaraai/east").PlatformDefinition<[StringType], ArrayType<StringType>>;
471
471
  /**
472
472
  * Reads a file as binary data without any encoding.
473
473
  *
@@ -485,7 +485,7 @@ export declare const FileSystem: {
485
485
  * });
486
486
  * ```
487
487
  */
488
- readonly readFileBytes: PlatformFunctionDef<[StringType], BlobType>;
488
+ readonly readFileBytes: import("@elaraai/east").PlatformDefinition<[StringType], BlobType>;
489
489
  /**
490
490
  * Writes binary data to a file (overwrites existing content).
491
491
  *
@@ -508,7 +508,7 @@ export declare const FileSystem: {
508
508
  * await compiled(binaryData); // Binary data written to file
509
509
  * ```
510
510
  */
511
- readonly writeFileBytes: PlatformFunctionDef<[StringType, BlobType], NullType>;
511
+ readonly writeFileBytes: import("@elaraai/east").PlatformDefinition<[StringType, BlobType], NullType>;
512
512
  /**
513
513
  * Node.js implementation of file system platform functions.
514
514
  *
package/dist/fs.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAQ,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAapF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,YAAY,EAAE,mBAAmB,CAAC,CAAC,OAAO,UAAU,CAAC,EAAE,OAAO,UAAU,CAA2D,CAAC;AAEjJ;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,aAAa,EAAE,mBAAmB,CAAC,CAAC,OAAO,UAAU,EAAE,OAAO,UAAU,CAAC,EAAE,OAAO,QAAQ,CAAsE,CAAC;AAE9K;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,cAAc,EAAE,mBAAmB,CAAC,CAAC,OAAO,UAAU,EAAE,OAAO,UAAU,CAAC,EAAE,OAAO,QAAQ,CAAuE,CAAC;A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AmBG;AACH,eAAO,MAAM,eAAe,uEAA8D,CAAC;AAE3F;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,mBAAmB,oEAA+D,CAAC;AAEhG;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,iBAAiB,iFAA0E,CAAC;AAEzG;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,kBAAkB,oEAA8D,CAAC;AAE9F;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,mBAAmB,8EAAyE,CAAC;AAE1G;;;;GAIG;AACH,QAAA,MAAM,cAAc,EAAE,gBAAgB,EAmGrC,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,UAAU;IACnB;;;;;;;;;;;;;;;;;;;;OAoBG;;IAGH;;;;;;;;;;;;;;;;;;;;OAoBG;;IAGH;;;;;;;;;;;;;;;;;OAiBG;;IAGH;;;;;;;;;;;;;;;;OAgBG;;IAGH;;;;;;;;;;;;;;;OAeG;;IAGH;;;;;;;;;;;;;;;OAeG;;IAGH;;;;;;;;;;;;;;;OAeG;;IAGH;;;;;;;;;;;;;;;;OAgBG;;IAGH;;;;;;;;;;;;;;;;OAgBG;;IAGH;;;;;;;;;;;;;;;;OAgBG;;IAGH;;;;;;;;;;;;;;;;;;;;;OAqBG;;IAGH;;;;OAIG;;CAEG,CAAC;AAGX,OAAO,EAAE,cAAc,EAAE,CAAC"}
package/dist/fs.js CHANGED
@@ -368,7 +368,8 @@ const FileSystemImpl = [
368
368
  }),
369
369
  fs_read_file_bytes.implement((path) => {
370
370
  try {
371
- return readFileSync(path);
371
+ const buffer = readFileSync(path);
372
+ return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
372
373
  }
373
374
  catch (err) {
374
375
  throw new EastError(`Failed to read file bytes ${path}: ${err.message}`, {