@loxtep/sdk 0.9.5 → 0.9.6
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,16 @@ and this project adheres to
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.9.6] - 2026-08-10
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **CLI `DEP0187` warning** — stop eagerly importing `leo-sdk` on every command.
|
|
16
|
+
REST-only commands (e.g. `loxtep data-products list`) no longer load the stream
|
|
17
|
+
runtime, avoiding Node's `fs.existsSync` deprecation from leo-sdk's
|
|
18
|
+
`leoConfigure` side effect. `leo-sdk` is still required lazily when constructing
|
|
19
|
+
a stream reader/writer.
|
|
20
|
+
|
|
11
21
|
## [0.9.5] - 2026-08-10
|
|
12
22
|
|
|
13
23
|
### Fixed
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Loxtep stream runtime factory for the Node SDK data plane (ESM interop with the underlying runtime).
|
|
3
|
+
*
|
|
4
|
+
* IMPORTANT: do not statically `import 'leo-sdk'`. leo-sdk's `leoConfigure.js` runs
|
|
5
|
+
* `build(process.cwd())` at module load and calls `fs.existsSync({})` when there is no
|
|
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.
|
|
3
10
|
*/
|
|
4
|
-
import
|
|
5
|
-
export declare function createRStreamsSdk(config:
|
|
11
|
+
import type { ConfigurationResources, RStreamsSdk } from 'leo-sdk';
|
|
12
|
+
export declare function createRStreamsSdk(config: ConfigurationResources): RStreamsSdk;
|
|
6
13
|
export type { ConfigurationResources, RStreamsSdk } from 'leo-sdk';
|
|
7
14
|
/** Loxtep stream runtime handle (injected in tests or advanced wiring). */
|
|
8
15
|
export type { RStreamsSdk as LoxtepStreamRuntime } from 'leo-sdk';
|
|
@@ -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;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAcnE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,sBAAsB,GAAG,WAAW,CAW7E;AAED,YAAY,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACnE,2EAA2E;AAC3E,YAAY,EAAE,WAAW,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Loxtep stream runtime factory for the Node SDK data plane (ESM interop with the underlying runtime).
|
|
3
|
+
*
|
|
4
|
+
* IMPORTANT: do not statically `import 'leo-sdk'`. leo-sdk's `leoConfigure.js` runs
|
|
5
|
+
* `build(process.cwd())` at module load and calls `fs.existsSync({})` when there is no
|
|
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.
|
|
3
10
|
*/
|
|
4
|
-
import
|
|
11
|
+
import { createRequire } from 'node:module';
|
|
12
|
+
function loadLeoSdk() {
|
|
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
|
+
}
|
|
5
18
|
export function createRStreamsSdk(config) {
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
19
|
+
// Lazy CJS require — only when a stream reader/writer is actually constructed.
|
|
20
|
+
const StreamRuntime = loadLeoSdk();
|
|
21
|
+
const defaultExport = StreamRuntime.default;
|
|
22
|
+
const SDK = (StreamRuntime.RStreamsSdk || defaultExport?.RStreamsSdk);
|
|
9
23
|
if (!SDK || typeof SDK !== 'function') {
|
|
10
24
|
throw new Error('Failed to resolve RStreamsSdk constructor from leo-sdk');
|
|
11
25
|
}
|
|
@@ -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;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQ5C,SAAS,UAAU;IACjB,6EAA6E;IAC7E,MAAM,SAAS,GAAG,IAAI,QAAQ,CAAC,wBAAwB,CAAC,EAAY,CAAC;IACrE,MAAM,UAAU,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;IAC5C,OAAO,UAAU,CAAC,SAAS,CAAiB,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAA8B;IAC9D,+EAA+E;IAC/E,MAAM,aAAa,GAAG,UAAU,EAAE,CAAC;IACnC,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.6",
|
|
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",
|