@loxtep/sdk 0.9.10 → 0.9.11
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/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,18 @@ and this project adheres to
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.9.11] - 2026-08-12
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **`createRStreamsSdk` / stream I/O** — restore top-level
|
|
16
|
+
`createRequire(import.meta.url)` in `leo-runtime.ts`. The 0.9.7
|
|
17
|
+
`new Function('return import.meta.url')` workaround always throws
|
|
18
|
+
`SyntaxError: Cannot use 'import.meta' outside a module` (Function bodies
|
|
19
|
+
are Scripts, never Modules), breaking `get_writer()` / `get_reader()` for
|
|
20
|
+
every consumer from 0.9.7–0.9.10. Jest maps the module to a CJS-safe stub
|
|
21
|
+
(and excludes it from coverage) instead of breaking the real runtime.
|
|
22
|
+
|
|
11
23
|
## [0.9.10] - 2026-08-12
|
|
12
24
|
|
|
13
25
|
### Fixed
|
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
* IMPORTANT: do not statically `import 'leo-sdk'`. leo-sdk's `leoConfigure.js` runs
|
|
5
5
|
* `build(process.cwd())` at module load and calls `fs.existsSync({})` when there is no
|
|
6
6
|
* Leo system directory (DEP0187). REST-only CLI commands must not pay that cost or warning.
|
|
7
|
-
*
|
|
8
|
-
* Lazy load must not use a bare `import.meta` in this file — Jest's CJS transform
|
|
9
|
-
* rejects it. Resolve the module URL via Function so ESM runtime still works.
|
|
10
7
|
*/
|
|
11
8
|
import type { ConfigurationResources, RStreamsSdk } from 'leo-sdk';
|
|
12
9
|
export declare function createRStreamsSdk(config: ConfigurationResources): RStreamsSdk;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leo-runtime.d.ts","sourceRoot":"","sources":["../../src/rstreams/leo-runtime.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"leo-runtime.d.ts","sourceRoot":"","sources":["../../src/rstreams/leo-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAInE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,sBAAsB,GAAG,WAAW,CAc7E;AAED,YAAY,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACnE,2EAA2E;AAC3E,YAAY,EAAE,WAAW,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -4,20 +4,12 @@
|
|
|
4
4
|
* IMPORTANT: do not statically `import 'leo-sdk'`. leo-sdk's `leoConfigure.js` runs
|
|
5
5
|
* `build(process.cwd())` at module load and calls `fs.existsSync({})` when there is no
|
|
6
6
|
* Leo system directory (DEP0187). REST-only CLI commands must not pay that cost or warning.
|
|
7
|
-
*
|
|
8
|
-
* Lazy load must not use a bare `import.meta` in this file — Jest's CJS transform
|
|
9
|
-
* rejects it. Resolve the module URL via Function so ESM runtime still works.
|
|
10
7
|
*/
|
|
11
8
|
import { createRequire } from 'node:module';
|
|
12
|
-
|
|
13
|
-
// Hide import.meta from static transforms (Jest); evaluate only in real ESM.
|
|
14
|
-
const moduleUrl = new Function('return import.meta.url')();
|
|
15
|
-
const requireCjs = createRequire(moduleUrl);
|
|
16
|
-
return requireCjs('leo-sdk');
|
|
17
|
-
}
|
|
9
|
+
const require = createRequire(import.meta.url);
|
|
18
10
|
export function createRStreamsSdk(config) {
|
|
19
11
|
// Lazy CJS require — only when a stream reader/writer is actually constructed.
|
|
20
|
-
const StreamRuntime =
|
|
12
|
+
const StreamRuntime = require('leo-sdk');
|
|
21
13
|
const defaultExport = StreamRuntime.default;
|
|
22
14
|
const SDK = (StreamRuntime.RStreamsSdk || defaultExport?.RStreamsSdk);
|
|
23
15
|
if (!SDK || typeof SDK !== 'function') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leo-runtime.js","sourceRoot":"","sources":["../../src/rstreams/leo-runtime.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"leo-runtime.js","sourceRoot":"","sources":["../../src/rstreams/leo-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,MAAM,UAAU,iBAAiB,CAAC,MAA8B;IAC9D,+EAA+E;IAC/E,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CAGtC,CAAC;IACF,MAAM,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC;IAC5C,MAAM,GAAG,GAAG,CAAC,aAAa,CAAC,WAAW,IAAI,aAAa,EAAE,WAAW,CAEvD,CAAC;IACd,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC5E,CAAC;IACD,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;AACzB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loxtep/sdk",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.11",
|
|
4
4
|
"description": "Loxtep SDK for Node.js — the Enterprise Context Layer: data products, workflows, projects, queues, and machine-usable context for AI",
|
|
5
5
|
"author": "Loxtep <engineering@loxtep.io>",
|
|
6
6
|
"homepage": "https://loxtep.io",
|