@elaraai/e3 1.0.109 → 1.0.111
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/dist/src/environment-capture.d.ts +27 -57
- package/dist/src/environment-capture.d.ts.map +1 -1
- package/dist/src/environment-capture.js +87 -456
- package/dist/src/environment-capture.js.map +1 -1
- package/dist/src/environment-capture.spec.js +280 -5
- package/dist/src/environment-capture.spec.js.map +1 -1
- package/dist/src/environment-npm-lock.d.ts +77 -0
- package/dist/src/environment-npm-lock.d.ts.map +1 -0
- package/dist/src/environment-npm-lock.js +209 -0
- package/dist/src/environment-npm-lock.js.map +1 -0
- package/dist/src/environment-uv-lock.d.ts +373 -0
- package/dist/src/environment-uv-lock.d.ts.map +1 -0
- package/dist/src/environment-uv-lock.js +588 -0
- package/dist/src/environment-uv-lock.js.map +1 -0
- package/dist/src/export.d.ts.map +1 -1
- package/dist/src/export.js +12 -3
- package/dist/src/export.js.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/runner.d.ts +14 -2
- package/dist/src/runner.d.ts.map +1 -1
- package/dist/src/runner.js +16 -4
- package/dist/src/runner.js.map +1 -1
- package/dist/src/stock-platforms.spec.js +7 -1
- package/dist/src/stock-platforms.spec.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
interface NpmLockEntry {
|
|
6
|
+
name?: string;
|
|
7
|
+
link?: boolean;
|
|
8
|
+
resolved?: string;
|
|
9
|
+
dependencies?: Record<string, string>;
|
|
10
|
+
devDependencies?: Record<string, string>;
|
|
11
|
+
optionalDependencies?: Record<string, string>;
|
|
12
|
+
peerDependencies?: Record<string, string>;
|
|
13
|
+
workspaces?: string[];
|
|
14
|
+
}
|
|
15
|
+
/** An npm lock, for what a capture reads of it. */
|
|
16
|
+
export interface NpmLock {
|
|
17
|
+
lockfileVersion?: number;
|
|
18
|
+
packages?: Record<string, NpmLockEntry>;
|
|
19
|
+
}
|
|
20
|
+
/** Walk up from `start` to the nearest npm lockfile (not pnpm/yarn); null if none.
|
|
21
|
+
* @internal */
|
|
22
|
+
export declare function findNpmRoot(start: string): {
|
|
23
|
+
root: string;
|
|
24
|
+
lock: NpmLock;
|
|
25
|
+
} | null;
|
|
26
|
+
/**
|
|
27
|
+
* The local npm-workspace member a name refers to — the package a `{ custom }`
|
|
28
|
+
* platform or an `East.importFunction(pkg, …)` names (#652) — resolved the
|
|
29
|
+
* way `captureAutoEnvironment` resolves it: the governing npm lockfile
|
|
30
|
+
* above `anchorDir`, matched by `package.json` name, workspace members only
|
|
31
|
+
* (never an installed dependency). The python twin is
|
|
32
|
+
* `pythonWorkspaceMember`.
|
|
33
|
+
*
|
|
34
|
+
* @param name - The package name as referenced (`@scope/name` or bare)
|
|
35
|
+
* @param anchorDir - Directory the workspace is resolved from (the export cwd)
|
|
36
|
+
* @returns The member's directory and its `package.json` version, or null
|
|
37
|
+
* when there is no npm workspace above `anchorDir` or the name is not a
|
|
38
|
+
* local member (a registry package, a typo)
|
|
39
|
+
*/
|
|
40
|
+
export declare function nodeWorkspaceMember(name: string, anchorDir: string): {
|
|
41
|
+
dir: string;
|
|
42
|
+
version: string | null;
|
|
43
|
+
} | null;
|
|
44
|
+
/**
|
|
45
|
+
* Detect whether `project` is a self-contained node project or an npm
|
|
46
|
+
* workspace member, and locate the governing root.
|
|
47
|
+
*
|
|
48
|
+
* @internal
|
|
49
|
+
* @throws {Error} N1 (no lockfile anywhere), N8 (pnpm workspace — unsupported
|
|
50
|
+
* yet), N3 (project is the workspace root), N2 (not a member of the workspace)
|
|
51
|
+
*/
|
|
52
|
+
export declare function discoverNodeRoot(project: string, owner: string): {
|
|
53
|
+
mode: 'single';
|
|
54
|
+
lockName: string;
|
|
55
|
+
} | {
|
|
56
|
+
mode: 'workspace';
|
|
57
|
+
root: string;
|
|
58
|
+
lock: NpmLock;
|
|
59
|
+
subject: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* The transitive closure of LOCAL workspace members reachable from `subject`,
|
|
63
|
+
* with export-time lock validation.
|
|
64
|
+
*
|
|
65
|
+
* @internal
|
|
66
|
+
* @returns Closure members (workspace-relative path + package name), sorted by path
|
|
67
|
+
* @throws {Error} N4 (a member's on-disk manifest drifted from the lock — npm
|
|
68
|
+
* ci would silently install unlocked deps), N5 (a dep shadows a workspace
|
|
69
|
+
* member name from the registry), N6 (root depends on a member), N7 (a local
|
|
70
|
+
* dep resolves outside the workspace)
|
|
71
|
+
*/
|
|
72
|
+
export declare function npmClosure(lock: NpmLock, root: string, subject: string, owner: string): Array<{
|
|
73
|
+
path: string;
|
|
74
|
+
name: string;
|
|
75
|
+
}>;
|
|
76
|
+
export {};
|
|
77
|
+
//# sourceMappingURL=environment-npm-lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment-npm-lock.d.ts","sourceRoot":"","sources":["../../src/environment-npm-lock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkCH,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,UAAU,CAAC,EAAE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/**
|
|
6
|
+
* What an export reads of an npm lock: the governing root of a node project,
|
|
7
|
+
* the workspace member a name refers to, and the local members a member's
|
|
8
|
+
* environment carries, with the lock checked against them. Pure reads of the
|
|
9
|
+
* lock and the manifests: nothing is packed here (`environment-capture.ts`
|
|
10
|
+
* packs what these name).
|
|
11
|
+
*/
|
|
12
|
+
import * as fs from 'node:fs';
|
|
13
|
+
import * as path from 'node:path';
|
|
14
|
+
import { StringType, compareFor } from '@elaraai/east';
|
|
15
|
+
/** Orders the paths a lock holds through East, by code point. */
|
|
16
|
+
const byCodePoint = compareFor(StringType);
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
// Node (npm workspace) dependency-closure capture (#280)
|
|
19
|
+
//
|
|
20
|
+
// A `{ node: { project } }` declaration is either a self-contained project
|
|
21
|
+
// (its own lockfile — captured byte-identically to before) or an npm
|
|
22
|
+
// workspace member. For a member we capture the ROOT package.json + lockfile
|
|
23
|
+
// plus an `npm pack` tarball per LOCAL closure member; the materializer
|
|
24
|
+
// (#276) reconstructs a closure-only workspace and `npm ci`s it.
|
|
25
|
+
//
|
|
26
|
+
// Unlike python's `uv pip check`, `npm ci` is NOT a loud oracle — it will
|
|
27
|
+
// silently install a member's unlocked deps from the registry — so the
|
|
28
|
+
// closure walk validates the lock at export (N4/N5) rather than relying on
|
|
29
|
+
// a run-time gate. pnpm workspaces are refused here (N8) until #284.
|
|
30
|
+
// ---------------------------------------------------------------------------
|
|
31
|
+
const NODE_LOCKFILES = ['package-lock.json', 'npm-shrinkwrap.json', 'pnpm-lock.yaml'];
|
|
32
|
+
/** Walk up from `start` to the nearest npm lockfile (not pnpm/yarn); null if none.
|
|
33
|
+
* @internal */
|
|
34
|
+
export function findNpmRoot(start) {
|
|
35
|
+
const names = ['package-lock.json', 'npm-shrinkwrap.json'];
|
|
36
|
+
let dir = start;
|
|
37
|
+
for (;;) {
|
|
38
|
+
const found = names.find((f) => fs.existsSync(path.join(dir, f)));
|
|
39
|
+
if (found)
|
|
40
|
+
return { root: dir, lock: JSON.parse(fs.readFileSync(path.join(dir, found), 'utf-8')) };
|
|
41
|
+
const parent = path.dirname(dir);
|
|
42
|
+
if (parent === dir)
|
|
43
|
+
return null;
|
|
44
|
+
dir = parent;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The local npm-workspace member a name refers to — the package a `{ custom }`
|
|
49
|
+
* platform or an `East.importFunction(pkg, …)` names (#652) — resolved the
|
|
50
|
+
* way `captureAutoEnvironment` resolves it: the governing npm lockfile
|
|
51
|
+
* above `anchorDir`, matched by `package.json` name, workspace members only
|
|
52
|
+
* (never an installed dependency). The python twin is
|
|
53
|
+
* `pythonWorkspaceMember`.
|
|
54
|
+
*
|
|
55
|
+
* @param name - The package name as referenced (`@scope/name` or bare)
|
|
56
|
+
* @param anchorDir - Directory the workspace is resolved from (the export cwd)
|
|
57
|
+
* @returns The member's directory and its `package.json` version, or null
|
|
58
|
+
* when there is no npm workspace above `anchorDir` or the name is not a
|
|
59
|
+
* local member (a registry package, a typo)
|
|
60
|
+
*/
|
|
61
|
+
export function nodeWorkspaceMember(name, anchorDir) {
|
|
62
|
+
const found = findNpmRoot(anchorDir);
|
|
63
|
+
if (!found)
|
|
64
|
+
return null;
|
|
65
|
+
const entry = Object.entries(found.lock.packages ?? {}).find(([p, v]) => p !== '' && !p.includes('node_modules/') && v.name === name && v.link !== true);
|
|
66
|
+
if (!entry)
|
|
67
|
+
return null;
|
|
68
|
+
const dir = path.join(found.root, ...entry[0].split('/'));
|
|
69
|
+
let version = null;
|
|
70
|
+
try {
|
|
71
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf-8'));
|
|
72
|
+
if (typeof pkg.version === 'string')
|
|
73
|
+
version = pkg.version;
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
/* no readable package.json: the exporter records its own default */
|
|
77
|
+
}
|
|
78
|
+
return { dir, version };
|
|
79
|
+
}
|
|
80
|
+
/** Workspace-relative POSIX path from the root to a dir. */
|
|
81
|
+
function posixRel(root, dir) {
|
|
82
|
+
return path.relative(root, dir).split(path.sep).join('/');
|
|
83
|
+
}
|
|
84
|
+
/** The union of every dependency section's package names. */
|
|
85
|
+
function allDepNames(e) {
|
|
86
|
+
if (!e)
|
|
87
|
+
return [];
|
|
88
|
+
return [
|
|
89
|
+
...Object.keys(e.dependencies ?? {}),
|
|
90
|
+
...Object.keys(e.devDependencies ?? {}),
|
|
91
|
+
...Object.keys(e.optionalDependencies ?? {}),
|
|
92
|
+
...Object.keys(e.peerDependencies ?? {}),
|
|
93
|
+
];
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Detect whether `project` is a self-contained node project or an npm
|
|
97
|
+
* workspace member, and locate the governing root.
|
|
98
|
+
*
|
|
99
|
+
* @internal
|
|
100
|
+
* @throws {Error} N1 (no lockfile anywhere), N8 (pnpm workspace — unsupported
|
|
101
|
+
* yet), N3 (project is the workspace root), N2 (not a member of the workspace)
|
|
102
|
+
*/
|
|
103
|
+
export function discoverNodeRoot(project, owner) {
|
|
104
|
+
const ownLock = NODE_LOCKFILES.find((f) => fs.existsSync(path.join(project, f)));
|
|
105
|
+
if (ownLock) {
|
|
106
|
+
// A workspace ROOT also has its own lockfile — but capturing it packs the
|
|
107
|
+
// (usually code-less) root, not a member. Reject: the environment belongs
|
|
108
|
+
// on a member.
|
|
109
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(project, 'package.json'), 'utf-8'));
|
|
110
|
+
if (Array.isArray(pkg.workspaces) && pkg.workspaces.length > 0) {
|
|
111
|
+
throw new Error(`Environment for '${owner}': declare the environment on a workspace member, not the workspace root '${project}'`);
|
|
112
|
+
}
|
|
113
|
+
return { mode: 'single', lockName: ownLock };
|
|
114
|
+
}
|
|
115
|
+
let dir = path.dirname(project);
|
|
116
|
+
for (;;) {
|
|
117
|
+
const found = NODE_LOCKFILES.find((f) => fs.existsSync(path.join(dir, f)));
|
|
118
|
+
if (found) {
|
|
119
|
+
if (found === 'pnpm-lock.yaml') {
|
|
120
|
+
throw new Error(`Environment for '${owner}': pnpm workspaces are not yet supported as environments — use npm workspaces or a single-project env`);
|
|
121
|
+
}
|
|
122
|
+
const root = dir;
|
|
123
|
+
if (path.resolve(root) === path.resolve(project)) {
|
|
124
|
+
throw new Error(`Environment for '${owner}': declare the environment on a workspace member, not the workspace root '${root}'`);
|
|
125
|
+
}
|
|
126
|
+
const lock = JSON.parse(fs.readFileSync(path.join(root, found), 'utf-8'));
|
|
127
|
+
const subject = posixRel(root, project);
|
|
128
|
+
if (!lock.packages || !(subject in lock.packages)) {
|
|
129
|
+
throw new Error(`Environment for '${owner}': '${project}' is not a member of the workspace at '${root}' — add it to "workspaces" and refresh the lockfile, or run 'npm install' in '${project}' for a standalone env`);
|
|
130
|
+
}
|
|
131
|
+
return { mode: 'workspace', root, lock, subject };
|
|
132
|
+
}
|
|
133
|
+
const parent = path.dirname(dir);
|
|
134
|
+
if (parent === dir)
|
|
135
|
+
break;
|
|
136
|
+
dir = parent;
|
|
137
|
+
}
|
|
138
|
+
throw new Error(`Environment for '${owner}': no lockfile in '${project}' or any parent — run 'npm install' there, or add it to a workspace and lock at the root`);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The transitive closure of LOCAL workspace members reachable from `subject`,
|
|
142
|
+
* with export-time lock validation.
|
|
143
|
+
*
|
|
144
|
+
* @internal
|
|
145
|
+
* @returns Closure members (workspace-relative path + package name), sorted by path
|
|
146
|
+
* @throws {Error} N4 (a member's on-disk manifest drifted from the lock — npm
|
|
147
|
+
* ci would silently install unlocked deps), N5 (a dep shadows a workspace
|
|
148
|
+
* member name from the registry), N6 (root depends on a member), N7 (a local
|
|
149
|
+
* dep resolves outside the workspace)
|
|
150
|
+
*/
|
|
151
|
+
export function npmClosure(lock, root, subject, owner) {
|
|
152
|
+
const pkgs = lock.packages ?? {};
|
|
153
|
+
const memberNames = new Set(Object.entries(pkgs)
|
|
154
|
+
.filter(([p, e]) => p !== '' && !p.includes('node_modules/') && typeof e.name === 'string')
|
|
155
|
+
.map(([, e]) => e.name));
|
|
156
|
+
// N6: the root manifest must not depend on a workspace member.
|
|
157
|
+
for (const dep of allDepNames(pkgs[''])) {
|
|
158
|
+
if (memberNames.has(dep)) {
|
|
159
|
+
throw new Error(`Environment for '${owner}': the workspace root depends on member '${dep}' — move member deps into the members that need them`);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
const resolveDep = (fromPath, dep) => {
|
|
163
|
+
let dir = fromPath;
|
|
164
|
+
for (;;) {
|
|
165
|
+
const key = `${dir ? dir + '/' : ''}node_modules/${dep}`;
|
|
166
|
+
if (pkgs[key])
|
|
167
|
+
return pkgs[key];
|
|
168
|
+
if (!dir)
|
|
169
|
+
return null;
|
|
170
|
+
dir = dir.split('/').slice(0, -1).join('/');
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
const included = new Map(); // memberPath -> name
|
|
174
|
+
const seen = new Set();
|
|
175
|
+
const queue = [subject];
|
|
176
|
+
while (queue.length > 0) {
|
|
177
|
+
const memberPath = queue.shift();
|
|
178
|
+
if (seen.has(memberPath))
|
|
179
|
+
continue;
|
|
180
|
+
seen.add(memberPath);
|
|
181
|
+
const entry = pkgs[memberPath];
|
|
182
|
+
if (!entry)
|
|
183
|
+
continue;
|
|
184
|
+
included.set(memberPath, entry.name ?? path.basename(memberPath));
|
|
185
|
+
// N4: the locked dep sections must match the on-disk manifest.
|
|
186
|
+
const onDisk = JSON.parse(fs.readFileSync(path.join(root, ...memberPath.split('/'), 'package.json'), 'utf-8'));
|
|
187
|
+
for (const section of ['dependencies', 'devDependencies', 'optionalDependencies', 'peerDependencies']) {
|
|
188
|
+
if (JSON.stringify(onDisk[section] ?? {}) !== JSON.stringify(entry[section] ?? {})) {
|
|
189
|
+
throw new Error(`Environment for '${owner}': '${memberPath}/package.json' ${section} differ from the lockfile — run 'npm install' to refresh the lock before exporting`);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
for (const dep of allDepNames(entry)) {
|
|
193
|
+
const resolved = resolveDep(memberPath, dep);
|
|
194
|
+
if (resolved?.link) {
|
|
195
|
+
const target = resolved.resolved ?? '';
|
|
196
|
+
if (target === '' || target.startsWith('..') || path.isAbsolute(target)) {
|
|
197
|
+
throw new Error(`Environment for '${owner}': local dependency '${dep}' of '${memberPath}' resolves outside the workspace ('${target}')`);
|
|
198
|
+
}
|
|
199
|
+
queue.push(target);
|
|
200
|
+
}
|
|
201
|
+
else if (memberNames.has(dep)) {
|
|
202
|
+
// N5: name collides with a workspace member but came from the registry.
|
|
203
|
+
throw new Error(`Environment for '${owner}': '${dep}' in '${memberPath}' is satisfied from the registry, not the workspace — align its version to the workspace member (or rename)`);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return [...included.entries()].map(([p, name]) => ({ path: p, name })).sort((a, b) => byCodePoint(a.path, b.path));
|
|
208
|
+
}
|
|
209
|
+
//# sourceMappingURL=environment-npm-lock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment-npm-lock.js","sourceRoot":"","sources":["../../src/environment-npm-lock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEvD,iEAAiE;AACjE,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;AAE3C,8EAA8E;AAC9E,yDAAyD;AACzD,EAAE;AACF,2EAA2E;AAC3E,qEAAqE;AACrE,6EAA6E;AAC7E,wEAAwE;AACxE,iEAAiE;AACjE,EAAE;AACF,0EAA0E;AAC1E,uEAAuE;AACvE,2EAA2E;AAC3E,qEAAqE;AACrE,8EAA8E;AAE9E,MAAM,cAAc,GA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