@elaraai/e3-cli 1.0.79 → 1.0.80
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/README.md +99 -25
- package/dist/src/cli.js +49 -9
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/budget.d.ts +32 -0
- package/dist/src/commands/budget.d.ts.map +1 -0
- package/dist/src/commands/budget.js +46 -0
- package/dist/src/commands/budget.js.map +1 -0
- package/dist/src/commands/call.d.ts +2 -1
- package/dist/src/commands/call.d.ts.map +1 -1
- package/dist/src/commands/call.js +5 -3
- package/dist/src/commands/call.js.map +1 -1
- package/dist/src/commands/compact.spec.js +7 -6
- package/dist/src/commands/compact.spec.js.map +1 -1
- package/dist/src/commands/history.d.ts +1 -0
- package/dist/src/commands/history.d.ts.map +1 -1
- package/dist/src/commands/history.js +30 -9
- package/dist/src/commands/history.js.map +1 -1
- package/dist/src/commands/logs.d.ts +2 -2
- package/dist/src/commands/logs.d.ts.map +1 -1
- package/dist/src/commands/logs.js +28 -28
- package/dist/src/commands/logs.js.map +1 -1
- package/dist/src/commands/logs.spec.js +4 -1
- package/dist/src/commands/logs.spec.js.map +1 -1
- package/dist/src/commands/mutate.d.ts +2 -1
- package/dist/src/commands/mutate.d.ts.map +1 -1
- package/dist/src/commands/mutate.js +42 -19
- package/dist/src/commands/mutate.js.map +1 -1
- package/dist/src/commands/reindex.d.ts +12 -0
- package/dist/src/commands/reindex.d.ts.map +1 -0
- package/dist/src/commands/reindex.js +67 -0
- package/dist/src/commands/reindex.js.map +1 -0
- package/dist/src/commands/repo.d.ts +4 -1
- package/dist/src/commands/repo.d.ts.map +1 -1
- package/dist/src/commands/repo.js +32 -16
- package/dist/src/commands/repo.js.map +1 -1
- package/dist/src/commands/run.d.ts +2 -1
- package/dist/src/commands/run.d.ts.map +1 -1
- package/dist/src/commands/run.js +15 -21
- package/dist/src/commands/run.js.map +1 -1
- package/dist/src/commands/set.d.ts.map +1 -1
- package/dist/src/commands/set.js +15 -15
- package/dist/src/commands/set.js.map +1 -1
- package/dist/src/commands/start.d.ts +2 -2
- package/dist/src/commands/start.d.ts.map +1 -1
- package/dist/src/commands/start.js +33 -27
- package/dist/src/commands/start.js.map +1 -1
- package/dist/src/commands/watch.d.ts +4 -2
- package/dist/src/commands/watch.d.ts.map +1 -1
- package/dist/src/commands/watch.js +35 -9
- package/dist/src/commands/watch.js.map +1 -1
- package/dist/src/commands/workspace.d.ts +25 -2
- package/dist/src/commands/workspace.d.ts.map +1 -1
- package/dist/src/commands/workspace.js +173 -21
- package/dist/src/commands/workspace.js.map +1 -1
- package/dist/src/format.d.ts +12 -0
- package/dist/src/format.d.ts.map +1 -1
- package/dist/src/format.js +19 -3
- package/dist/src/format.js.map +1 -1
- package/dist/src/path-resolver.d.ts.map +1 -1
- package/dist/src/path-resolver.js +3 -2
- package/dist/src/path-resolver.js.map +1 -1
- package/dist/src/utils.d.ts +15 -2
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +25 -7
- package/dist/src/utils.js.map +1 -1
- package/package.json +7 -7
- package/dist/src/commands/jobs.d.ts +0 -25
- package/dist/src/commands/jobs.d.ts.map +0 -1
- package/dist/src/commands/jobs.js +0 -39
- package/dist/src/commands/jobs.js.map +0 -1
package/dist/src/utils.js
CHANGED
|
@@ -12,7 +12,7 @@ export const HASH_DISPLAY_WIDTH = 12;
|
|
|
12
12
|
export function shortHash(hash) {
|
|
13
13
|
return `${hash.slice(0, HASH_DISPLAY_WIDTH)}...`;
|
|
14
14
|
}
|
|
15
|
-
import { repoGet } from '@elaraai/e3-core';
|
|
15
|
+
import { LocalStorage, repoGet, repositoryOpen } from '@elaraai/e3-core';
|
|
16
16
|
import { parseDatasetPath, parsePackageRef } from '@elaraai/e3-types';
|
|
17
17
|
import { ApiError } from '@elaraai/e3-api-client';
|
|
18
18
|
import { getValidToken } from './credentials.js';
|
|
@@ -49,6 +49,7 @@ export { parseDatasetPath, parsePackageRef };
|
|
|
49
49
|
*
|
|
50
50
|
* For remote locations, this function will load and validate the auth token.
|
|
51
51
|
* If not logged in or token is expired and cannot be refreshed, throws an error.
|
|
52
|
+
* A local repository is opened ({@link openRepo}).
|
|
52
53
|
*
|
|
53
54
|
* @returns For local: { type: 'local', path: '/absolute/path/to/repo' }
|
|
54
55
|
* For remote: { type: 'remote', baseUrl: 'https://example.com', repo: 'my_repo', token: '...' }
|
|
@@ -70,13 +71,14 @@ export async function parseRepoLocation(arg) {
|
|
|
70
71
|
token,
|
|
71
72
|
};
|
|
72
73
|
}
|
|
73
|
-
return { type: 'local', path:
|
|
74
|
+
return { type: 'local', path: await openRepo(arg) };
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
76
77
|
* Parse a repository location (synchronous, no auth).
|
|
77
78
|
*
|
|
78
79
|
* Use this only for operations that don't need authentication (e.g., local repos).
|
|
79
|
-
* For remote repos, use parseRepoLocation() instead.
|
|
80
|
+
* For remote repos, use parseRepoLocation() instead. A local repository is
|
|
81
|
+
* found, not opened: {@link openRepo} opens it.
|
|
80
82
|
*/
|
|
81
83
|
export function parseRepoLocationSync(arg) {
|
|
82
84
|
if (arg.startsWith('https://') || arg.startsWith('http://')) {
|
|
@@ -95,12 +97,27 @@ export function parseRepoLocationSync(arg) {
|
|
|
95
97
|
}
|
|
96
98
|
/**
|
|
97
99
|
* Resolve repository path from CLI argument.
|
|
98
|
-
* Supports `.` for current directory and relative/absolute paths.
|
|
100
|
+
* Supports `.` for current directory and relative/absolute paths. The
|
|
101
|
+
* repository is found, not opened: {@link openRepo} opens it.
|
|
99
102
|
*/
|
|
100
103
|
export function resolveRepo(repoArg) {
|
|
101
104
|
const absolutePath = resolve(repoArg);
|
|
102
105
|
return repoGet(absolutePath);
|
|
103
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Resolve a repository from a CLI argument and open it, as every way into a
|
|
109
|
+
* repository does: refused when this e3 cannot read it, and upgraded in place
|
|
110
|
+
* when an older release wrote it.
|
|
111
|
+
*
|
|
112
|
+
* @param repoArg - The repository argument
|
|
113
|
+
* @returns The repository's path
|
|
114
|
+
* @throws {RepoLayoutError} When this e3 cannot open the repository
|
|
115
|
+
*/
|
|
116
|
+
export async function openRepo(repoArg) {
|
|
117
|
+
const repoPath = resolveRepo(repoArg);
|
|
118
|
+
await repositoryOpen(new LocalStorage(), repoPath);
|
|
119
|
+
return repoPath;
|
|
120
|
+
}
|
|
104
121
|
/**
|
|
105
122
|
* Parse package specification: name[@version]
|
|
106
123
|
* Returns { name, version } where version defaults to 'latest' if not specified.
|
|
@@ -126,9 +143,10 @@ export function parsePackageSpec(spec) {
|
|
|
126
143
|
export function formatError(err) {
|
|
127
144
|
if (err instanceof ApiError) {
|
|
128
145
|
// A type mismatch carries the one line every door renders (declared type,
|
|
129
|
-
// given type, first differing field)
|
|
130
|
-
//
|
|
131
|
-
|
|
146
|
+
// given type, first differing field), and a refused name the line that
|
|
147
|
+
// says why. Print them verbatim, so a remote command reports exactly what a
|
|
148
|
+
// local one does.
|
|
149
|
+
if (err.code === 'dataset_type_mismatch' || err.code === 'invalid_name') {
|
|
132
150
|
const detail = err.details;
|
|
133
151
|
if (typeof detail?.message === 'string')
|
|
134
152
|
return detail.message;
|
package/dist/src/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,sEAAsE;AACtE,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAErC,8EAA8E;AAC9E,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC;AACnD,CAAC;AAED,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.js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AC;QACjF,IAAI,GAAG,CAAC,OAAO,IAAI,IAAI,EAAE,CAAC;YACxB,MAAM,MAAM,GAAG,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAC3F,OAAO,GAAG,OAAO,KAAK,MAAM,EAAE,CAAC;QACjC,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;QACzB,OAAO,GAAG,CAAC,OAAO,CAAC;IACrB,CAAC;IACD,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,OAAe;IACvC,OAAO,CAAC,KAAK,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC;IACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elaraai/e3-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.80",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "East Execution Engine CLI - Command-line tool for managing e3 repositories and tasks",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"commander": "^12.0.0",
|
|
43
43
|
"esbuild": "^0.27.2",
|
|
44
|
-
"@elaraai/e3": "1.0.
|
|
45
|
-
"@elaraai/e3-api-client": "1.0.
|
|
46
|
-
"@elaraai/e3-
|
|
47
|
-
"@elaraai/e3-
|
|
44
|
+
"@elaraai/e3": "1.0.80",
|
|
45
|
+
"@elaraai/e3-api-client": "1.0.80",
|
|
46
|
+
"@elaraai/e3-types": "1.0.80",
|
|
47
|
+
"@elaraai/e3-core": "1.0.80"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@elaraai/east": "1.0.
|
|
50
|
+
"@elaraai/east": "1.0.80"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^22.0.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "tsc",
|
|
62
|
-
"test": "npm run build && node --enable-source-maps --test-reporter=spec --test 'dist/src/**/*.spec.js'",
|
|
62
|
+
"test": "npm run build && node --enable-source-maps --test-reporter=spec --test-timeout=480000 --test 'dist/src/**/*.spec.js'",
|
|
63
63
|
"lint": "eslint .",
|
|
64
64
|
"lint:fix": "eslint . --fix",
|
|
65
65
|
"dev": "pnpm run build && node --enable-source-maps dist/src/cli.js",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
-
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
-
*/
|
|
5
|
-
/** The flags that name a jobs budget. */
|
|
6
|
-
export interface JobsFlags {
|
|
7
|
-
/** `--jobs <n>` / `-j <n>`. */
|
|
8
|
-
jobs?: string;
|
|
9
|
-
/** Deprecated `--concurrency <n>`: the same budget. */
|
|
10
|
-
concurrency?: string;
|
|
11
|
-
/** Deprecated `--partition-concurrency <n>`: the same budget. */
|
|
12
|
-
partitionConcurrency?: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Resolves the jobs budget of a run: `--jobs`, else a deprecated alias (with
|
|
16
|
-
* a warning), else `E3_JOBS`, else the CPUs available to e3.
|
|
17
|
-
*
|
|
18
|
-
* A value that is not a positive integer is an argument error: NaN would
|
|
19
|
-
* launch nothing and die later as "Dataflow stuck".
|
|
20
|
-
*
|
|
21
|
-
* @param flags - The parsed flags
|
|
22
|
-
* @returns The budget, a positive integer
|
|
23
|
-
*/
|
|
24
|
-
export declare function resolveJobs(flags: JobsFlags): number;
|
|
25
|
-
//# sourceMappingURL=jobs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../../src/commands/jobs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,yCAAyC;AACzC,MAAM,WAAW,SAAS;IACxB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAiBpD"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
-
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* The `--jobs` flag: the runner processes a local run keeps in flight at
|
|
7
|
-
* once, across the dataflow's tasks and the units of its partitioned tasks.
|
|
8
|
-
*/
|
|
9
|
-
import { defaultJobs } from '@elaraai/e3-core';
|
|
10
|
-
import { exitError } from '../utils.js';
|
|
11
|
-
/**
|
|
12
|
-
* Resolves the jobs budget of a run: `--jobs`, else a deprecated alias (with
|
|
13
|
-
* a warning), else `E3_JOBS`, else the CPUs available to e3.
|
|
14
|
-
*
|
|
15
|
-
* A value that is not a positive integer is an argument error: NaN would
|
|
16
|
-
* launch nothing and die later as "Dataflow stuck".
|
|
17
|
-
*
|
|
18
|
-
* @param flags - The parsed flags
|
|
19
|
-
* @returns The budget, a positive integer
|
|
20
|
-
*/
|
|
21
|
-
export function resolveJobs(flags) {
|
|
22
|
-
const given = flags.jobs !== undefined ? ['--jobs', flags.jobs]
|
|
23
|
-
: flags.concurrency !== undefined ? ['--concurrency', flags.concurrency]
|
|
24
|
-
: flags.partitionConcurrency !== undefined ? ['--partition-concurrency', flags.partitionConcurrency]
|
|
25
|
-
: process.env.E3_JOBS !== undefined && process.env.E3_JOBS !== '' ? ['E3_JOBS', process.env.E3_JOBS]
|
|
26
|
-
: null;
|
|
27
|
-
if (given === null)
|
|
28
|
-
return defaultJobs();
|
|
29
|
-
const [name, raw] = given;
|
|
30
|
-
const jobs = Number(raw.trim());
|
|
31
|
-
if (!Number.isInteger(jobs) || jobs < 1) {
|
|
32
|
-
exitError(`${name} must be a positive integer, got '${raw}'`);
|
|
33
|
-
}
|
|
34
|
-
if (name === '--concurrency' || name === '--partition-concurrency') {
|
|
35
|
-
console.error(`Warning: ${name} is deprecated — use --jobs (-j), one budget for tasks and partition units alike`);
|
|
36
|
-
}
|
|
37
|
-
return jobs;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=jobs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../../src/commands/jobs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAYxC;;;;;;;;;GASG;AACH,MAAM,UAAU,WAAW,CAAC,KAAgB;IAC1C,MAAM,KAAK,GACT,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC;QAC/C,CAAC,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,eAAe,EAAE,KAAK,CAAC,WAAW,CAAC;YACtE,CAAC,CAAC,KAAK,CAAC,oBAAoB,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,yBAAyB,EAAE,KAAK,CAAC,oBAAoB,CAAC;gBAClG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,KAAK,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