@elaraai/east-node-std 0.0.1-beta.9 → 1.0.0

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.
Files changed (157) hide show
  1. package/CLA.md +1 -1
  2. package/CONTRIBUTING.md +3 -3
  3. package/LICENSE.md +31 -0
  4. package/README.md +55 -19
  5. package/dist/src/console.d.ts.map +1 -0
  6. package/dist/{console.js → src/console.js} +3 -3
  7. package/dist/src/console.js.map +1 -0
  8. package/dist/src/crypto.d.ts.map +1 -0
  9. package/dist/{crypto.js → src/crypto.js} +4 -4
  10. package/dist/src/crypto.js.map +1 -0
  11. package/dist/{fetch.d.ts → src/fetch.d.ts} +129 -79
  12. package/dist/src/fetch.d.ts.map +1 -0
  13. package/dist/{fetch.js → src/fetch.js} +76 -6
  14. package/dist/src/fetch.js.map +1 -0
  15. package/dist/src/fs.d.ts.map +1 -0
  16. package/dist/{fs.js → src/fs.js} +8 -8
  17. package/dist/src/fs.js.map +1 -0
  18. package/dist/src/index.d.ts.map +1 -0
  19. package/dist/src/index.js.map +1 -0
  20. package/dist/src/path.d.ts.map +1 -0
  21. package/dist/{path.js → src/path.js} +5 -5
  22. package/dist/src/path.js.map +1 -0
  23. package/dist/src/platform.d.ts.map +1 -0
  24. package/dist/src/platform.js.map +1 -0
  25. package/dist/src/random/crypto-rng.d.ts.map +1 -0
  26. package/dist/src/random/crypto-rng.js.map +1 -0
  27. package/dist/src/random/distributions/bates.d.ts.map +1 -0
  28. package/dist/src/random/distributions/bates.js.map +1 -0
  29. package/dist/src/random/distributions/bernoulli.d.ts.map +1 -0
  30. package/dist/src/random/distributions/bernoulli.js.map +1 -0
  31. package/dist/src/random/distributions/binomial.d.ts.map +1 -0
  32. package/dist/src/random/distributions/binomial.js.map +1 -0
  33. package/dist/src/random/distributions/exponential.d.ts.map +1 -0
  34. package/dist/src/random/distributions/exponential.js.map +1 -0
  35. package/dist/src/random/distributions/geometric.d.ts.map +1 -0
  36. package/dist/src/random/distributions/geometric.js.map +1 -0
  37. package/dist/src/random/distributions/irwin-hall.d.ts.map +1 -0
  38. package/dist/src/random/distributions/irwin-hall.js.map +1 -0
  39. package/dist/src/random/distributions/log-normal.d.ts.map +1 -0
  40. package/dist/src/random/distributions/log-normal.js.map +1 -0
  41. package/dist/src/random/distributions/normal.d.ts.map +1 -0
  42. package/dist/src/random/distributions/normal.js.map +1 -0
  43. package/dist/src/random/distributions/pareto.d.ts.map +1 -0
  44. package/dist/src/random/distributions/pareto.js.map +1 -0
  45. package/dist/src/random/distributions/poisson.d.ts.map +1 -0
  46. package/dist/src/random/distributions/poisson.js.map +1 -0
  47. package/dist/src/random/distributions/uniform-int.d.ts.map +1 -0
  48. package/dist/src/random/distributions/uniform-int.js.map +1 -0
  49. package/dist/src/random/distributions/uniform.d.ts.map +1 -0
  50. package/dist/src/random/distributions/uniform.js.map +1 -0
  51. package/dist/src/random/rng.d.ts.map +1 -0
  52. package/dist/src/random/rng.js.map +1 -0
  53. package/dist/src/random/xorshift128.d.ts.map +1 -0
  54. package/dist/src/random/xorshift128.js.map +1 -0
  55. package/dist/{random.d.ts → src/random.d.ts} +2 -1
  56. package/dist/src/random.d.ts.map +1 -0
  57. package/dist/{random.js → src/random.js} +13 -13
  58. package/dist/src/random.js.map +1 -0
  59. package/dist/{test.d.ts → src/test.d.ts} +8 -1
  60. package/dist/src/test.d.ts.map +1 -0
  61. package/dist/src/test.js +364 -0
  62. package/dist/src/test.js.map +1 -0
  63. package/dist/{time.d.ts → src/time.d.ts} +50 -2
  64. package/dist/src/time.d.ts.map +1 -0
  65. package/dist/{time.js → src/time.js} +100 -4
  66. package/dist/src/time.js.map +1 -0
  67. package/package.json +24 -47
  68. package/dist/console.d.ts.map +0 -1
  69. package/dist/console.js.map +0 -1
  70. package/dist/crypto.d.ts.map +0 -1
  71. package/dist/crypto.js.map +0 -1
  72. package/dist/fetch.d.ts.map +0 -1
  73. package/dist/fetch.js.map +0 -1
  74. package/dist/fs.d.ts.map +0 -1
  75. package/dist/fs.js.map +0 -1
  76. package/dist/index.d.ts.map +0 -1
  77. package/dist/index.js.map +0 -1
  78. package/dist/path.d.ts.map +0 -1
  79. package/dist/path.js.map +0 -1
  80. package/dist/platform.d.ts.map +0 -1
  81. package/dist/platform.js.map +0 -1
  82. package/dist/random/crypto-rng.d.ts.map +0 -1
  83. package/dist/random/crypto-rng.js.map +0 -1
  84. package/dist/random/distributions/bates.d.ts.map +0 -1
  85. package/dist/random/distributions/bates.js.map +0 -1
  86. package/dist/random/distributions/bernoulli.d.ts.map +0 -1
  87. package/dist/random/distributions/bernoulli.js.map +0 -1
  88. package/dist/random/distributions/binomial.d.ts.map +0 -1
  89. package/dist/random/distributions/binomial.js.map +0 -1
  90. package/dist/random/distributions/exponential.d.ts.map +0 -1
  91. package/dist/random/distributions/exponential.js.map +0 -1
  92. package/dist/random/distributions/geometric.d.ts.map +0 -1
  93. package/dist/random/distributions/geometric.js.map +0 -1
  94. package/dist/random/distributions/irwin-hall.d.ts.map +0 -1
  95. package/dist/random/distributions/irwin-hall.js.map +0 -1
  96. package/dist/random/distributions/log-normal.d.ts.map +0 -1
  97. package/dist/random/distributions/log-normal.js.map +0 -1
  98. package/dist/random/distributions/normal.d.ts.map +0 -1
  99. package/dist/random/distributions/normal.js.map +0 -1
  100. package/dist/random/distributions/pareto.d.ts.map +0 -1
  101. package/dist/random/distributions/pareto.js.map +0 -1
  102. package/dist/random/distributions/poisson.d.ts.map +0 -1
  103. package/dist/random/distributions/poisson.js.map +0 -1
  104. package/dist/random/distributions/uniform-int.d.ts.map +0 -1
  105. package/dist/random/distributions/uniform-int.js.map +0 -1
  106. package/dist/random/distributions/uniform.d.ts.map +0 -1
  107. package/dist/random/distributions/uniform.js.map +0 -1
  108. package/dist/random/rng.d.ts.map +0 -1
  109. package/dist/random/rng.js.map +0 -1
  110. package/dist/random/xorshift128.d.ts.map +0 -1
  111. package/dist/random/xorshift128.js.map +0 -1
  112. package/dist/random.d.ts.map +0 -1
  113. package/dist/random.js.map +0 -1
  114. package/dist/test.d.ts.map +0 -1
  115. package/dist/test.js +0 -828
  116. package/dist/test.js.map +0 -1
  117. package/dist/time.d.ts.map +0 -1
  118. package/dist/time.js.map +0 -1
  119. package/dist/tsconfig.tsbuildinfo +0 -1
  120. /package/dist/{console.d.ts → src/console.d.ts} +0 -0
  121. /package/dist/{crypto.d.ts → src/crypto.d.ts} +0 -0
  122. /package/dist/{fs.d.ts → src/fs.d.ts} +0 -0
  123. /package/dist/{index.d.ts → src/index.d.ts} +0 -0
  124. /package/dist/{index.js → src/index.js} +0 -0
  125. /package/dist/{path.d.ts → src/path.d.ts} +0 -0
  126. /package/dist/{platform.d.ts → src/platform.d.ts} +0 -0
  127. /package/dist/{platform.js → src/platform.js} +0 -0
  128. /package/dist/{random → src/random}/crypto-rng.d.ts +0 -0
  129. /package/dist/{random → src/random}/crypto-rng.js +0 -0
  130. /package/dist/{random → src/random}/distributions/bates.d.ts +0 -0
  131. /package/dist/{random → src/random}/distributions/bates.js +0 -0
  132. /package/dist/{random → src/random}/distributions/bernoulli.d.ts +0 -0
  133. /package/dist/{random → src/random}/distributions/bernoulli.js +0 -0
  134. /package/dist/{random → src/random}/distributions/binomial.d.ts +0 -0
  135. /package/dist/{random → src/random}/distributions/binomial.js +0 -0
  136. /package/dist/{random → src/random}/distributions/exponential.d.ts +0 -0
  137. /package/dist/{random → src/random}/distributions/exponential.js +0 -0
  138. /package/dist/{random → src/random}/distributions/geometric.d.ts +0 -0
  139. /package/dist/{random → src/random}/distributions/geometric.js +0 -0
  140. /package/dist/{random → src/random}/distributions/irwin-hall.d.ts +0 -0
  141. /package/dist/{random → src/random}/distributions/irwin-hall.js +0 -0
  142. /package/dist/{random → src/random}/distributions/log-normal.d.ts +0 -0
  143. /package/dist/{random → src/random}/distributions/log-normal.js +0 -0
  144. /package/dist/{random → src/random}/distributions/normal.d.ts +0 -0
  145. /package/dist/{random → src/random}/distributions/normal.js +0 -0
  146. /package/dist/{random → src/random}/distributions/pareto.d.ts +0 -0
  147. /package/dist/{random → src/random}/distributions/pareto.js +0 -0
  148. /package/dist/{random → src/random}/distributions/poisson.d.ts +0 -0
  149. /package/dist/{random → src/random}/distributions/poisson.js +0 -0
  150. /package/dist/{random → src/random}/distributions/uniform-int.d.ts +0 -0
  151. /package/dist/{random → src/random}/distributions/uniform-int.js +0 -0
  152. /package/dist/{random → src/random}/distributions/uniform.d.ts +0 -0
  153. /package/dist/{random → src/random}/distributions/uniform.js +0 -0
  154. /package/dist/{random → src/random}/rng.d.ts +0 -0
  155. /package/dist/{random → src/random}/rng.js +0 -0
  156. /package/dist/{random → src/random}/xorshift128.d.ts +0 -0
  157. /package/dist/{random → src/random}/xorshift128.js +0 -0
package/CLA.md CHANGED
@@ -23,4 +23,4 @@ You represent that:
23
23
 
24
24
  ## Agreement
25
25
 
26
- By signing this Agreement through CLA Assistant or by submitting a Contribution, you accept and agree to the terms of this Agreement.
26
+ By signing this Agreement through CLA Assistant or by submitting a Contribution, you accept and agree to the terms of this Agreement.
package/CONTRIBUTING.md CHANGED
@@ -1,4 +1,4 @@
1
- # Contributing to East
1
+ # Contributing to east-node-std
2
2
 
3
3
  Thank you for your interest in contributing! We welcome contributions from the community.
4
4
 
@@ -15,7 +15,7 @@ When you submit your first pull request, the CLA Assistant bot will automaticall
15
15
 
16
16
  ## Contributing Process
17
17
 
18
- 1. Fork the repository
18
+ 1. Fork the [east-workspace monorepo](https://github.com/elaraai/east-workspace)
19
19
  2. Create a feature branch (`git checkout -b feature/amazing-feature`)
20
20
  3. Make your changes
21
21
  4. Commit your changes (`git commit -m 'Add amazing feature'`)
@@ -25,4 +25,4 @@ When you submit your first pull request, the CLA Assistant bot will automaticall
25
25
 
26
26
  ## Questions?
27
27
 
28
- Contact us at support@elara.ai
28
+ Contact us at support@elara.ai
package/LICENSE.md ADDED
@@ -0,0 +1,31 @@
1
+ Copyright (c) 2025 Elara AI Pty Ltd
2
+
3
+ # Dual License — AGPL-3.0 / Commercial
4
+
5
+ This software is available under two licenses. You may choose which license applies to your use:
6
+
7
+ ## Option 1: AGPL-3.0 (Open Source)
8
+
9
+ You may use, modify, and distribute this software under the terms of the GNU Affero General Public License v3.0.
10
+
11
+ This requires that if you use this software in a network service, you must make your complete source code available under AGPL-3.0.
12
+
13
+ Full text: https://www.gnu.org/licenses/agpl-3.0.html
14
+
15
+ ## Option 2: Commercial License
16
+
17
+ If you wish to use this software without the source code disclosure requirements of AGPL-3.0, you must obtain a commercial license from Elara AI Pty Ltd.
18
+
19
+ Contact: support@elara.ai
20
+
21
+ ## Contributions
22
+
23
+ Contributions are welcome. By submitting a pull request, you agree to license your contribution under both AGPL-3.0 and our commercial license terms.
24
+
25
+ ## Governing Law
26
+
27
+ This license is governed by the laws of New South Wales, Australia.
28
+
29
+ ---
30
+
31
+ *Elara AI Pty Ltd*
package/README.md CHANGED
@@ -5,19 +5,19 @@
5
5
  [![License](https://img.shields.io/badge/license-AGPL--3.0-blue.svg)](LICENSE.md)
6
6
  [![Node Version](https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen.svg)](https://nodejs.org)
7
7
 
8
- **East Node** provides Node.js platform integration for the [East language](https://github.com/elaraai/East). It enables East programs to interact with the Node.js runtime through platform functions for file system operations, console I/O, HTTP requests, cryptography, and more.
8
+ **East Node** provides Node.js platform integration for the [East language](https://github.com/elaraai/east-workspace/tree/main/libs/east). It enables East programs to interact with the Node.js runtime through platform functions for file system operations, console I/O, HTTP requests, cryptography, and more.
9
9
 
10
10
  ## Features
11
11
 
12
12
  - **📁 File System** - Read/write files, manage directories
13
13
  - **🖥️ Console I/O** - stdout/stderr output, stdin input
14
14
  - **🌐 HTTP Client** - Modern Fetch API for HTTP requests
15
- - **🔐 Cryptography** - Random bytes, SHA-256, UUID generation
15
+ - **Cryptography** - Random bytes, SHA-256, UUID generation
16
16
  - **🎲 Random** - Random number generation with 14 statistical distributions
17
17
  - **⏱️ Time Operations** - Timestamps and sleep
18
18
  - **🛤️ Path Utilities** - Cross-platform path manipulation
19
19
  - **🧪 Test Framework** - Built-in testing utilities
20
- - **🛡️ Type-Safe** - Full TypeScript support with EastError handling
20
+ - **Type-Safe** - Full TypeScript support with EastError handling
21
21
 
22
22
  ## Installation
23
23
 
@@ -76,7 +76,7 @@ const compiled = East.compile(myFunction.toIR(), [...Console.Implementation, ...
76
76
  ## Documentation
77
77
 
78
78
  - **[USAGE.md](USAGE.md)** - Comprehensive guide with examples for all platform functions
79
- - **[East Documentation](https://github.com/elaraai/East)** - Core East language documentation
79
+ - **[East Documentation](https://github.com/elaraai/east-workspace/tree/main/libs/east)** - Core East language documentation
80
80
 
81
81
  ## Testing
82
82
 
@@ -114,8 +114,24 @@ Platform functions are intentionally limited for sandbox security:
114
114
 
115
115
  - ❌ No process access (exit, environment variables, command-line arguments)
116
116
  - ❌ No arbitrary command execution
117
- - Controlled I/O operations only
118
- - All operations are type-checked
117
+ - Controlled I/O operations only
118
+ - All operations are type-checked
119
+
120
+ ## Claude Code plugin
121
+
122
+ The East ecosystem also ships a [Claude Code](https://claude.com/claude-code) plugin — East language skills, example search, and preemptive diagnostics for East code — installed separately from the `elaraai` marketplace:
123
+
124
+ ```text
125
+ # Inside Claude Code
126
+ /plugin marketplace add elaraai/east-workspace
127
+ /plugin install east@elaraai
128
+ ```
129
+
130
+ ```bash
131
+ # From a terminal
132
+ claude plugin marketplace add elaraai/east-workspace
133
+ claude plugin install east@elaraai
134
+ ```
119
135
 
120
136
  ## License
121
137
 
@@ -126,31 +142,47 @@ Dual-licensed:
126
142
 
127
143
  ### Ecosystem
128
144
 
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
145
+ - **[East](https://github.com/elaraai/east-workspace/tree/main/libs/east)**: Statically typed, expression-based language with serializable IR. Run portable logic across TypeScript, Python, C, and other runtimes.
146
+ - [@elaraai/east](https://www.npmjs.com/package/@elaraai/east): Core language SDK with type system, expressions, and reference JS compiler
147
+
148
+ - **[East Node](https://github.com/elaraai/east-workspace/tree/main/libs/east-node)**: Node.js platform functions for I/O, databases, and system operations.
149
+ - [@elaraai/east-node-std](https://www.npmjs.com/package/@elaraai/east-node-std): Console, FileSystem, Fetch, Crypto, Time, Path, Random
150
+ - [@elaraai/east-node-io](https://www.npmjs.com/package/@elaraai/east-node-io): SQLite, PostgreSQL, MySQL, MongoDB, Redis, S3, FTP, SFTP, XLSX, XML, compression
132
151
  - [@elaraai/east-node-cli](https://www.npmjs.com/package/@elaraai/east-node-cli): CLI for running East IR programs in Node.js
133
152
 
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
153
+ - **[East C](https://github.com/elaraai/east-workspace/tree/main/libs/east-c)**: C11 native runtime for executing East IR. Tarballed for `linux-x64` and `linux-arm64`, attached to each GitHub Release.
154
+ - `east-c`: Core runtime type system, IR interpreter, 200+ builtins, serialization (Beast2, JSON, CSV, East text)
155
+ - `east-c-std`: Console, FileSystem, Fetch, Crypto, Time, Path, Random
156
+ - `east-c-cli`: CLI for running East IR programs natively
157
+
158
+ - **[East Python](https://github.com/elaraai/east-workspace/tree/main/libs/east-py)**: Python runtime, standard platform, I/O, and data-science platform functions. Published to PyPI.
159
+ - [east-py](https://pypi.org/project/east-py/): Core Python runtime — type system, IR compiler, 212+ builtins, Cython-accelerated hot paths
160
+ - [east-py-std](https://pypi.org/project/east-py-std/): Console, FileSystem, Fetch, Crypto, Time, Path, Random
161
+ - [east-py-io](https://pypi.org/project/east-py-io/): SQLite, PostgreSQL, MySQL, MongoDB, Redis, S3, FTP, SFTP, XLSX, XML, compression
162
+ - [east-py-cli](https://pypi.org/project/east-py-cli/): CLI for running East IR programs in Python
163
+ - [east-py-datascience](https://pypi.org/project/east-py-datascience/) (PyPI) + [@elaraai/east-py-datascience](https://www.npmjs.com/package/@elaraai/east-py-datascience) (npm): Optimization (MADS, Optuna, ALNS, GoogleOR), ML (XGBoost, LightGBM, NGBoost, PyTorch, Lightning, GP), Bayesian inference (PyMC), explainability (SHAP), conformal prediction (MAPIE)
136
164
 
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.
165
+ - **[East UI](https://github.com/elaraai/east-workspace/tree/main/libs/east-ui)**: Typed UI component definitions and React renderer, plus VS Code preview.
138
166
  - [@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
167
+ - [@elaraai/east-ui-components](https://www.npmjs.com/package/@elaraai/east-ui-components): React renderer with Chakra UI v3 styling
168
+ - [@elaraai/e3-ui](https://www.npmjs.com/package/@elaraai/e3-ui): e3 + UI bridge — Data bindings, `e3.ui()` task, manifest
169
+ - [@elaraai/e3-ui-components](https://www.npmjs.com/package/@elaraai/e3-ui-components): React Query hooks and preview components for the e3 API
170
+ - [east-ui-preview](https://marketplace.visualstudio.com/items?itemName=ElaraAI.east-ui-preview): VS Code extension for live East UI component preview
140
171
 
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.
172
+ - **[e3 East Execution Engine](https://github.com/elaraai/east-workspace/tree/main/libs/e3)**: Durable execution engine for running East pipelines at scale. Git-like content-addressable storage, automatic memoization, reactive dataflow, real-time monitoring.
142
173
  - [@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
174
+ - [@elaraai/e3-core](https://www.npmjs.com/package/@elaraai/e3-core): Object store, dataflow orchestrator, execution state
144
175
  - [@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
176
+ - [@elaraai/e3-cli](https://www.npmjs.com/package/@elaraai/e3-cli): `e3 repo`, `e3 package`, `e3 workspace`, `e3 start`, `e3 watch`, `e3 logs` commands
177
+ - [@elaraai/e3-api-client](https://www.npmjs.com/package/@elaraai/e3-api-client): HTTP client for remote e3 repositories
147
178
  - [@elaraai/e3-api-server](https://www.npmjs.com/package/@elaraai/e3-api-server): REST API server for e3 repositories
179
+ - [@elaraai/e3-api-tests](https://www.npmjs.com/package/@elaraai/e3-api-tests): Shared API compliance test suites
148
180
 
149
181
  ## Links
150
182
 
151
183
  - **Website**: [https://elaraai.com/](https://elaraai.com/)
152
- - **East Repository**: [https://github.com/elaraai/East](https://github.com/elaraai/East)
153
- - **Issues**: [https://github.com/elaraai/east-node/issues](https://github.com/elaraai/east-node/issues)
184
+ - **East Repository**: [https://github.com/elaraai/east-workspace/tree/main/libs/east](https://github.com/elaraai/east-workspace/tree/main/libs/east)
185
+ - **Issues**: [https://github.com/elaraai/east-workspace/issues](https://github.com/elaraai/east-workspace/issues)
154
186
  - **Email**: support@elara.ai
155
187
 
156
188
  ## About Elara
@@ -159,4 +191,8 @@ East is developed by [Elara AI Pty Ltd](https://elaraai.com/), an AI-powered pla
159
191
 
160
192
  ---
161
193
 
194
+ *Developed by [Elara AI Pty Ltd](https://elaraai.com/).*
195
+
196
+ ---
197
+
162
198
  *Developed by [Elara AI Pty Ltd](https://elaraai.com/)*
@@ -0,0 +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,MAAM,wBAAwB,CAAC;AAI/D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,WAAW,oEAAuD,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,aAAa,oEAAyD,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,aAAa,oEAAyD,CAAC;AAEpF;;;;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"}
@@ -84,7 +84,7 @@ const ConsoleImpl = [
84
84
  }
85
85
  catch (err) {
86
86
  throw new EastError(`Failed to write to stdout: ${err.message}`, {
87
- location: { filename: "console_log", line: 0n, column: 0n },
87
+ location: [{ filename: "console_log", line: 0n, column: 0n }],
88
88
  cause: err
89
89
  });
90
90
  }
@@ -95,7 +95,7 @@ const ConsoleImpl = [
95
95
  }
96
96
  catch (err) {
97
97
  throw new EastError(`Failed to write to stderr: ${err.message}`, {
98
- location: { filename: "console_error", line: 0n, column: 0n },
98
+ location: [{ filename: "console_error", line: 0n, column: 0n }],
99
99
  cause: err
100
100
  });
101
101
  }
@@ -106,7 +106,7 @@ const ConsoleImpl = [
106
106
  }
107
107
  catch (err) {
108
108
  throw new EastError(`Failed to write to stdout: ${err.message}`, {
109
- location: { filename: "console_write", line: 0n, column: 0n },
109
+ location: [{ filename: "console_write", line: 0n, column: 0n }],
110
110
  cause: err
111
111
  });
112
112
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"console.js","sourceRoot":"","sources":["../../src/console.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAC;AAEpF;;;;GAIG;AACH,MAAM,WAAW,GAAuB;IACpC,WAAW,CAAC,SAAS,CAAC,CAAC,GAAW,EAAE,EAAE;QAClC,IAAI,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAChB,MAAM,IAAI,SAAS,CAAC,8BAA8B,GAAG,CAAC,OAAO,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;;;;;;;;;;;;;;;;OAoBG;IACH,KAAK,EAAE,aAAa;IAEpB;;;;OAIG;IACH,cAAc,EAAE,WAAW;CACrB,CAAC;AAEX,qCAAqC;AACrC,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB;;;;;;;;;;;;;;;;;;GAkBG"}
@@ -0,0 +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,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"}
@@ -108,7 +108,7 @@ const CryptoImpl = [
108
108
  }
109
109
  catch (err) {
110
110
  throw new EastError(`Failed to generate random bytes: ${err.message}`, {
111
- location: { filename: "crypto_random_bytes", line: 0n, column: 0n },
111
+ location: [{ filename: "crypto_random_bytes", line: 0n, column: 0n }],
112
112
  cause: err
113
113
  });
114
114
  }
@@ -119,7 +119,7 @@ const CryptoImpl = [
119
119
  }
120
120
  catch (err) {
121
121
  throw new EastError(`Failed to compute SHA-256 hash: ${err.message}`, {
122
- location: { filename: "crypto_hash_sha256", line: 0n, column: 0n },
122
+ location: [{ filename: "crypto_hash_sha256", line: 0n, column: 0n }],
123
123
  cause: err
124
124
  });
125
125
  }
@@ -130,7 +130,7 @@ const CryptoImpl = [
130
130
  }
131
131
  catch (err) {
132
132
  throw new EastError(`Failed to compute SHA-256 hash: ${err.message}`, {
133
- location: { filename: "crypto_hash_sha256_bytes", line: 0n, column: 0n },
133
+ location: [{ filename: "crypto_hash_sha256_bytes", line: 0n, column: 0n }],
134
134
  cause: err
135
135
  });
136
136
  }
@@ -141,7 +141,7 @@ const CryptoImpl = [
141
141
  }
142
142
  catch (err) {
143
143
  throw new EastError(`Failed to generate UUID: ${err.message}`, {
144
- location: { filename: "crypto_uuid", line: 0n, column: 0n },
144
+ location: [{ filename: "crypto_uuid", line: 0n, column: 0n }],
145
145
  cause: err
146
146
  });
147
147
  }
@@ -0,0 +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,MAAM,mBAAmB,GAAG,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC;AAEjG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,C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G;IACH,IAAI,EAAE,WAAW;IAEjB;;;;OAIG;IACH,cAAc,EAAE,UAAU;CACpB,CAAC;AAEX,qCAAqC;AACrC,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -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 { StringType, IntegerType, BooleanType, DictType, OptionType, VariantType, NullType, StructType } from "@elaraai/east";
5
+ import { StringType, IntegerType, BooleanType, DictType, OptionType, VariantType, NullType, StructType, BlobType } from "@elaraai/east";
6
6
  import type { PlatformFunction } from "@elaraai/east/internal";
7
7
  /**
8
8
  * HTTP method variant type.
@@ -11,13 +11,13 @@ import type { PlatformFunction } from "@elaraai/east/internal";
11
11
  * Supports standard HTTP methods: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS.
12
12
  */
13
13
  export declare const FetchMethod: VariantType<{
14
- GET: NullType;
15
- POST: NullType;
16
- PUT: NullType;
17
- DELETE: NullType;
18
- PATCH: NullType;
19
- HEAD: NullType;
20
- OPTIONS: NullType;
14
+ readonly GET: NullType;
15
+ readonly POST: NullType;
16
+ readonly PUT: NullType;
17
+ readonly DELETE: NullType;
18
+ readonly PATCH: NullType;
19
+ readonly HEAD: NullType;
20
+ readonly OPTIONS: NullType;
21
21
  }>;
22
22
  /**
23
23
  * HTTP request configuration structure.
@@ -26,18 +26,18 @@ export declare const FetchMethod: VariantType<{
26
26
  * headers, and optional body content.
27
27
  */
28
28
  export declare const FetchRequestConfig: StructType<{
29
- url: StringType;
30
- method: VariantType<{
31
- GET: NullType;
32
- POST: NullType;
33
- PUT: NullType;
34
- DELETE: NullType;
35
- PATCH: NullType;
36
- HEAD: NullType;
37
- OPTIONS: NullType;
29
+ readonly url: StringType;
30
+ readonly method: VariantType<{
31
+ readonly GET: NullType;
32
+ readonly POST: NullType;
33
+ readonly PUT: NullType;
34
+ readonly DELETE: NullType;
35
+ readonly PATCH: NullType;
36
+ readonly HEAD: NullType;
37
+ readonly OPTIONS: NullType;
38
38
  }>;
39
- headers: DictType<StringType, StringType>;
40
- body: OptionType<StringType>;
39
+ readonly headers: DictType<StringType, StringType>;
40
+ readonly body: OptionType<StringType>;
41
41
  }>;
42
42
  /**
43
43
  * HTTP response structure.
@@ -46,11 +46,11 @@ export declare const FetchRequestConfig: StructType<{
46
46
  * The `ok` field is true for status codes in the 200-299 range.
47
47
  */
48
48
  export declare const FetchResponse: StructType<{
49
- status: IntegerType;
50
- statusText: StringType;
51
- headers: DictType<StringType, StringType>;
52
- body: StringType;
53
- ok: BooleanType;
49
+ readonly status: IntegerType;
50
+ readonly statusText: StringType;
51
+ readonly headers: DictType<StringType, StringType>;
52
+ readonly body: StringType;
53
+ readonly ok: BooleanType;
54
54
  }>;
55
55
  /**
56
56
  * Performs an HTTP GET request and returns the response body as a string.
@@ -79,6 +79,34 @@ export declare const FetchResponse: StructType<{
79
79
  * ```
80
80
  */
81
81
  export declare const fetch_get: import("@elaraai/east").AsyncPlatformDefinition<[StringType], StringType>;
82
+ /**
83
+ * Performs an HTTP GET request and returns the response body as binary data.
84
+ *
85
+ * Makes a simple GET request to the specified URL and returns the response body
86
+ * as raw bytes (Blob/Uint8Array). Useful for downloading binary files like images,
87
+ * PDFs, or database files.
88
+ * Throws an error if the response status is not in the 200-299 range.
89
+ *
90
+ * This is a platform function for the East language, enabling binary HTTP GET requests
91
+ * in East programs running on Node.js.
92
+ *
93
+ * @param url - The URL to fetch (must be a valid HTTP/HTTPS URL)
94
+ * @returns The response body as binary data (Blob)
95
+ *
96
+ * @throws {EastError} When request fails:
97
+ * - Invalid URL
98
+ * - Network error
99
+ * - Non-2xx HTTP status code
100
+ *
101
+ * @example
102
+ * ```ts
103
+ * const downloadFile = East.function([], BlobType, $ => {
104
+ * const data = $.let(Fetch.getBytes("https://example.com/file.bin"));
105
+ * return data;
106
+ * });
107
+ * ```
108
+ */
109
+ export declare const fetch_get_bytes: import("@elaraai/east").AsyncPlatformDefinition<[StringType], BlobType>;
82
110
  /**
83
111
  * Performs an HTTP POST request with a string body.
84
112
  *
@@ -138,24 +166,24 @@ export declare const fetch_post: import("@elaraai/east").AsyncPlatformDefinition
138
166
  * ```
139
167
  */
140
168
  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;
169
+ readonly url: StringType;
170
+ readonly method: VariantType<{
171
+ readonly GET: NullType;
172
+ readonly POST: NullType;
173
+ readonly PUT: NullType;
174
+ readonly DELETE: NullType;
175
+ readonly PATCH: NullType;
176
+ readonly HEAD: NullType;
177
+ readonly OPTIONS: NullType;
150
178
  }>;
151
- headers: DictType<StringType, StringType>;
152
- body: OptionType<StringType>;
179
+ readonly headers: DictType<StringType, StringType>;
180
+ readonly body: OptionType<StringType>;
153
181
  }>], StructType<{
154
- status: IntegerType;
155
- statusText: StringType;
156
- headers: DictType<StringType, StringType>;
157
- body: StringType;
158
- ok: BooleanType;
182
+ readonly status: IntegerType;
183
+ readonly statusText: StringType;
184
+ readonly headers: DictType<StringType, StringType>;
185
+ readonly body: StringType;
186
+ readonly ok: BooleanType;
159
187
  }>>;
160
188
  /**
161
189
  * Node.js implementation of fetch platform functions.
@@ -204,6 +232,28 @@ export declare const Fetch: {
204
232
  * ```
205
233
  */
206
234
  readonly get: import("@elaraai/east").AsyncPlatformDefinition<[StringType], StringType>;
235
+ /**
236
+ * Performs an HTTP GET request and returns the response body as binary data.
237
+ *
238
+ * Makes a simple GET request to the specified URL and returns the response body
239
+ * as raw bytes (Blob/Uint8Array). Useful for downloading binary files.
240
+ * Throws an error if the response status is not in the 200-299 range.
241
+ *
242
+ * @param url - The URL to fetch
243
+ * @returns The response body as binary data (Blob)
244
+ * @throws {EastError} When request fails or status is not 2xx
245
+ *
246
+ * @example
247
+ * ```ts
248
+ * const downloadFile = East.function([], BlobType, $ => {
249
+ * return Fetch.getBytes("https://example.com/file.bin");
250
+ * });
251
+ *
252
+ * const compiled = await East.compileAsync(downloadFile.toIR(), Fetch.Implementation);
253
+ * await compiled(); // Returns: binary data as Uint8Array
254
+ * ```
255
+ */
256
+ readonly getBytes: import("@elaraai/east").AsyncPlatformDefinition<[StringType], BlobType>;
207
257
  /**
208
258
  * Performs an HTTP POST request with a string body.
209
259
  *
@@ -255,24 +305,24 @@ export declare const Fetch: {
255
305
  * ```
256
306
  */
257
307
  readonly request: import("@elaraai/east").AsyncPlatformDefinition<[StructType<{
258
- url: StringType;
259
- method: VariantType<{
260
- GET: NullType;
261
- POST: NullType;
262
- PUT: NullType;
263
- DELETE: NullType;
264
- PATCH: NullType;
265
- HEAD: NullType;
266
- OPTIONS: NullType;
308
+ readonly url: StringType;
309
+ readonly method: VariantType<{
310
+ readonly GET: NullType;
311
+ readonly POST: NullType;
312
+ readonly PUT: NullType;
313
+ readonly DELETE: NullType;
314
+ readonly PATCH: NullType;
315
+ readonly HEAD: NullType;
316
+ readonly OPTIONS: NullType;
267
317
  }>;
268
- headers: DictType<StringType, StringType>;
269
- body: OptionType<StringType>;
318
+ readonly headers: DictType<StringType, StringType>;
319
+ readonly body: OptionType<StringType>;
270
320
  }>], StructType<{
271
- status: IntegerType;
272
- statusText: StringType;
273
- headers: DictType<StringType, StringType>;
274
- body: StringType;
275
- ok: BooleanType;
321
+ readonly status: IntegerType;
322
+ readonly statusText: StringType;
323
+ readonly headers: DictType<StringType, StringType>;
324
+ readonly body: StringType;
325
+ readonly ok: BooleanType;
276
326
  }>>;
277
327
  /**
278
328
  * Node.js implementation of fetch platform functions.
@@ -288,40 +338,40 @@ export declare const Fetch: {
288
338
  * HTTP method variant type (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS).
289
339
  */
290
340
  readonly Method: VariantType<{
291
- GET: NullType;
292
- POST: NullType;
293
- PUT: NullType;
294
- DELETE: NullType;
295
- PATCH: NullType;
296
- HEAD: NullType;
297
- OPTIONS: NullType;
341
+ readonly GET: NullType;
342
+ readonly POST: NullType;
343
+ readonly PUT: NullType;
344
+ readonly DELETE: NullType;
345
+ readonly PATCH: NullType;
346
+ readonly HEAD: NullType;
347
+ readonly OPTIONS: NullType;
298
348
  }>;
299
349
  /**
300
350
  * HTTP request configuration structure.
301
351
  */
302
352
  readonly RequestConfig: StructType<{
303
- url: StringType;
304
- method: VariantType<{
305
- GET: NullType;
306
- POST: NullType;
307
- PUT: NullType;
308
- DELETE: NullType;
309
- PATCH: NullType;
310
- HEAD: NullType;
311
- OPTIONS: NullType;
353
+ readonly url: StringType;
354
+ readonly method: VariantType<{
355
+ readonly GET: NullType;
356
+ readonly POST: NullType;
357
+ readonly PUT: NullType;
358
+ readonly DELETE: NullType;
359
+ readonly PATCH: NullType;
360
+ readonly HEAD: NullType;
361
+ readonly OPTIONS: NullType;
312
362
  }>;
313
- headers: DictType<StringType, StringType>;
314
- body: OptionType<StringType>;
363
+ readonly headers: DictType<StringType, StringType>;
364
+ readonly body: OptionType<StringType>;
315
365
  }>;
316
366
  /**
317
367
  * HTTP response structure.
318
368
  */
319
369
  readonly Response: StructType<{
320
- status: IntegerType;
321
- statusText: StringType;
322
- headers: DictType<StringType, StringType>;
323
- body: StringType;
324
- ok: BooleanType;
370
+ readonly status: IntegerType;
371
+ readonly statusText: StringType;
372
+ readonly headers: DictType<StringType, StringType>;
373
+ readonly body: StringType;
374
+ readonly ok: BooleanType;
325
375
  }>;
326
376
  };
327
377
  };
@@ -0,0 +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,EAAE,QAAQ,EAA+B,MAAM,eAAe,CAAC;AAC3K,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