@elaraai/e3 1.0.109 → 1.0.110
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 +86 -455
- package/dist/src/environment-capture.js.map +1 -1
- package/dist/src/environment-capture.spec.js +215 -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 +312 -0
- package/dist/src/environment-uv-lock.d.ts.map +1 -0
- package/dist/src/environment-uv-lock.js +494 -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
|
@@ -2,6 +2,9 @@
|
|
|
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 { type EnvironmentDecl } from './environment.js';
|
|
6
|
+
export { canonicalPythonName, pythonLeftOut, pythonLockSettings, pythonMemberSources, pythonRequires, pythonWorkspaceMember, readRequiredDistribution, type UvLock, type UvLockPackage } from './environment-uv-lock.js';
|
|
7
|
+
export { nodeWorkspaceMember } from './environment-npm-lock.js';
|
|
5
8
|
/**
|
|
6
9
|
* One environment-capture progress event (#311) — emitted after each member
|
|
7
10
|
* artifact build (`uv build --sdist` / `npm pack`), so callers can surface
|
|
@@ -17,63 +20,18 @@ export interface CaptureEvent {
|
|
|
17
20
|
}
|
|
18
21
|
/** Capture progress callback (#311). */
|
|
19
22
|
export type CaptureEventFn = (event: CaptureEvent) => void;
|
|
20
|
-
import { type EnvironmentDecl } from './environment.js';
|
|
21
23
|
/**
|
|
22
|
-
* The
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* @param anchorDir - Directory the workspace is resolved from (the export cwd)
|
|
29
|
-
* @param owner - The referencing task/function name, for error messages
|
|
30
|
-
* @returns The member's directory and its `pyproject.toml` version, or null
|
|
31
|
-
* when there is no uv workspace above `anchorDir` or the name is not a
|
|
32
|
-
* local member (a registry package, a typo)
|
|
33
|
-
*/
|
|
34
|
-
export declare function pythonWorkspaceMember(name: string, anchorDir: string, owner: string): {
|
|
35
|
-
dir: string;
|
|
36
|
-
version: string | null;
|
|
37
|
-
} | null;
|
|
38
|
-
/**
|
|
39
|
-
* Where a python workspace member's code can come from (#1459): the governing
|
|
40
|
-
* workspace's root — whose `uv.lock` and `pyproject.toml` pin everything else
|
|
41
|
-
* — and the directories of the member and of every local package it depends
|
|
42
|
-
* on, transitively, as {@link captureAutoEnvironment} walks them. What the
|
|
43
|
-
* export cache keys a member's manifests on.
|
|
44
|
-
*
|
|
45
|
-
* Unlike the environment's walk this refuses nothing: a virtual package's
|
|
46
|
-
* directory counts, and a registry or archive package is pinned by the lock.
|
|
47
|
-
*
|
|
48
|
-
* @param name - The package name as referenced (import-style or canonical)
|
|
49
|
-
* @param anchorDir - Directory the workspace is resolved from (the export cwd)
|
|
50
|
-
* @param owner - The referencing task/function name, for error messages
|
|
51
|
-
* @returns The workspace root and the closure's directories, sorted, or null
|
|
52
|
-
* when there is no uv workspace above `anchorDir` or the name is not a
|
|
53
|
-
* local member
|
|
54
|
-
*/
|
|
55
|
-
export declare function pythonMemberSources(name: string, anchorDir: string, owner: string): {
|
|
56
|
-
root: string;
|
|
57
|
-
dirs: string[];
|
|
58
|
-
} | null;
|
|
59
|
-
/**
|
|
60
|
-
* The local npm-workspace member a name refers to — the package a `{ custom }`
|
|
61
|
-
* platform or an `East.importFunction(pkg, …)` names (#652) — resolved the
|
|
62
|
-
* way {@link captureAutoEnvironment} resolves it: the governing npm lockfile
|
|
63
|
-
* above `anchorDir`, matched by `package.json` name, workspace members only
|
|
64
|
-
* (never an installed dependency). The python twin is
|
|
65
|
-
* {@link pythonWorkspaceMember}.
|
|
66
|
-
*
|
|
67
|
-
* @param name - The package name as referenced (`@scope/name` or bare)
|
|
68
|
-
* @param anchorDir - Directory the workspace is resolved from (the export cwd)
|
|
69
|
-
* @returns The member's directory and its `package.json` version, or null
|
|
70
|
-
* when there is no npm workspace above `anchorDir` or the name is not a
|
|
71
|
-
* local member (a registry package, a typo)
|
|
24
|
+
* The sdists an export built of each local python package, by the package's
|
|
25
|
+
* directory: built once in an export, however many environments it rides in.
|
|
26
|
+
* The environments of one declaration whose runners name different stock
|
|
27
|
+
* platforms differ in what they require, and share their members' builds, so
|
|
28
|
+
* one that names the same distributions is the same spec, byte for byte, even
|
|
29
|
+
* from a build backend whose sdists are not reproducible.
|
|
72
30
|
*/
|
|
73
|
-
export
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
31
|
+
export type BuiltSdists = Map<string, ReadonlyArray<{
|
|
32
|
+
filename: string;
|
|
33
|
+
hash: string;
|
|
34
|
+
}>>;
|
|
77
35
|
/**
|
|
78
36
|
* Derive an EnvironmentSpec from a task/function's RUNNER platform references,
|
|
79
37
|
* for tasks that declare no explicit `environment`. Resolves each `{ custom }`
|
|
@@ -88,10 +46,16 @@ export declare function nodeWorkspaceMember(name: string, anchorDir: string): {
|
|
|
88
46
|
* @param anchorDir - Directory the workspace is resolved from (the export cwd)
|
|
89
47
|
* @param owner - The declaring task/function name, for error messages
|
|
90
48
|
* @param addBlob - Stores a blob in the bundle's object store, returning its hash
|
|
49
|
+
* @param onEvent - Told each member's artifact as it is built
|
|
50
|
+
* @param platforms - The stock platform packages the runner names beside its
|
|
51
|
+
* custom ones (`east-py-std`): a python workspace member's environment
|
|
52
|
+
* installs their distributions too
|
|
53
|
+
* @param built - The sdists the export built already, which it adds to: each
|
|
54
|
+
* local python package is built once in an export ({@link BuiltSdists})
|
|
91
55
|
* @returns The beast2-encoded EnvironmentSpec, or null when nothing local is
|
|
92
56
|
* referenced (no workspace, or every platform is a registry/first-party package)
|
|
93
57
|
*/
|
|
94
|
-
export declare function captureAutoEnvironment(runtime: string, customNames: string[], anchorDir: string, owner: string, addBlob: (data: Buffer) => string, onEvent?: CaptureEventFn): Uint8Array | null;
|
|
58
|
+
export declare function captureAutoEnvironment(runtime: string, customNames: string[], anchorDir: string, owner: string, addBlob: (data: Buffer) => string, onEvent?: CaptureEventFn, platforms?: readonly string[], built?: BuiltSdists): Uint8Array | null;
|
|
95
59
|
/**
|
|
96
60
|
* Resolves an environment declaration to an encoded {@link EnvironmentSpec}
|
|
97
61
|
* at package export time.
|
|
@@ -104,8 +68,14 @@ export declare function captureAutoEnvironment(runtime: string, customNames: str
|
|
|
104
68
|
* @param decl - The declaration to resolve
|
|
105
69
|
* @param owner - The declaring task/function name, for error messages
|
|
106
70
|
* @param addBlob - Stores a blob in the bundle's object store, returning its hash
|
|
71
|
+
* @param onEvent - Told each member's artifact as it is built
|
|
72
|
+
* @param platforms - The stock platform packages the declaring task's runner
|
|
73
|
+
* names (`east-py-std`): the environment of a python workspace's member
|
|
74
|
+
* installs their distributions too
|
|
75
|
+
* @param built - The sdists the export built already, which it adds to: each
|
|
76
|
+
* local python package is built once in an export ({@link BuiltSdists})
|
|
107
77
|
* @returns The beast2-encoded EnvironmentSpec bytes
|
|
108
78
|
* @throws {Error} if the project is missing its manifest/lockfile or the build fails
|
|
109
79
|
*/
|
|
110
|
-
export declare function captureEnvironment(decl: EnvironmentDecl, owner: string, addBlob: (data: Buffer) => string, onEvent?: CaptureEventFn): Uint8Array;
|
|
80
|
+
export declare function captureEnvironment(decl: EnvironmentDecl, owner: string, addBlob: (data: Buffer) => string, onEvent?: CaptureEventFn, platforms?: readonly string[], built?: BuiltSdists): Uint8Array;
|
|
111
81
|
//# sourceMappingURL=environment-capture.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment-capture.d.ts","sourceRoot":"","sources":["../../src/environment-capture.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"environment-capture.d.ts","sourceRoot":"","sources":["../../src/environment-capture.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6BH,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAKjF,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,cAAc,EAAE,qBAAqB,EAAE,wBAAwB,EACnJ,KAAK,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wCAAwC;AACxC,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;AAO3D;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAAC;AA2KzF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EAAE,EACrB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EACjC,OAAO,CAAC,EAAE,cAAc,EACxB,SAAS,GAAE,SAAS,MAAM,EAAO,EACjC,KAAK,CAAC,EAAE,WAAW,GAClB,UAAU,GAAG,IAAI,CAQnB;AAgCD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,eAAe,EACrB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EACjC,OAAO,CAAC,EAAE,cAAc,EACxB,SAAS,GAAE,SAAS,MAAM,EAAO,EACjC,KAAK,CAAC,EAAE,WAAW,GAClB,UAAU,CAwFZ"}
|