@lumerahq/cli 0.30.9 → 0.30.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/dist/{chunk-LDDGLPAZ.js → chunk-ROARJJVX.js} +5 -3
- package/dist/{functions-NE5PVRQU.js → functions-G37WQWTG.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/{project-M4PV6OBO.js → project-GAVODH6S.js} +42 -6
- package/package.json +1 -1
- package/templates/default/package.json +1 -1
- package/templates/default/pnpm-lock.yaml +5 -5
- package/templates/default/pyproject.toml +1 -1
|
@@ -5,9 +5,11 @@ import { join, resolve } from "path";
|
|
|
5
5
|
import pc from "picocolors";
|
|
6
6
|
|
|
7
7
|
// src/lib/functions-sdk.ts
|
|
8
|
-
var FUNCTIONS_SDK_VERSION_RANGE = ">=0.
|
|
9
|
-
var
|
|
10
|
-
var
|
|
8
|
+
var FUNCTIONS_SDK_VERSION_RANGE = ">=0.36.2,<0.37.0";
|
|
9
|
+
var FUNCTIONS_SDK_COMPATIBILITY_RANGE = ">=0.34.0,<0.37.0";
|
|
10
|
+
var FUNCTIONS_SDK_REQUIREMENT = `lumera[functions]${FUNCTIONS_SDK_COMPATIBILITY_RANGE}`;
|
|
11
|
+
var DEFAULT_FUNCTIONS_SDK_REQUIREMENT = `lumera[functions]${FUNCTIONS_SDK_VERSION_RANGE}`;
|
|
12
|
+
var RELEASE_SDK_REQUIREMENT = `lumera[release]${FUNCTIONS_SDK_COMPATIBILITY_RANGE}`;
|
|
11
13
|
|
|
12
14
|
// src/commands/functions.ts
|
|
13
15
|
var SUPPORTED_SUBCOMMANDS = /* @__PURE__ */ new Set(["list", "inspect", "invoke", "test"]);
|
package/dist/index.js
CHANGED
|
@@ -268,12 +268,12 @@ async function main() {
|
|
|
268
268
|
await import("./run-EBTA3FKD.js").then((m) => m.run(args.slice(1)));
|
|
269
269
|
break;
|
|
270
270
|
case "functions":
|
|
271
|
-
await import("./functions-
|
|
271
|
+
await import("./functions-G37WQWTG.js").then(
|
|
272
272
|
(m) => m.functions(subcommand, args.slice(2))
|
|
273
273
|
);
|
|
274
274
|
break;
|
|
275
275
|
case "project":
|
|
276
|
-
await import("./project-
|
|
276
|
+
await import("./project-GAVODH6S.js").then(
|
|
277
277
|
(m) => m.project(subcommand, args.slice(2))
|
|
278
278
|
);
|
|
279
279
|
break;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RELEASE_SDK_REQUIREMENT,
|
|
3
3
|
findFunctionsProjectRoot
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ROARJJVX.js";
|
|
5
5
|
import "./chunk-PNKVD2UK.js";
|
|
6
6
|
|
|
7
7
|
// src/commands/project.ts
|
|
8
8
|
import { spawn } from "child_process";
|
|
9
|
+
import { mkdirSync } from "fs";
|
|
10
|
+
import { join } from "path";
|
|
9
11
|
import pc from "picocolors";
|
|
10
12
|
var RELEASE_PROTOCOL_VERSION = 1;
|
|
11
13
|
var RELEASE_COMMANDS = /* @__PURE__ */ new Set([
|
|
@@ -15,6 +17,32 @@ var RELEASE_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
15
17
|
"deploy",
|
|
16
18
|
"deploy-runtime"
|
|
17
19
|
]);
|
|
20
|
+
function releaseCommandOutput(command, args, result) {
|
|
21
|
+
if (command !== "deploy" || !result.envelope.ok || result.envelope.activation_required === true) {
|
|
22
|
+
return result.raw;
|
|
23
|
+
}
|
|
24
|
+
const deployment = result.envelope.deployment;
|
|
25
|
+
const release = typeof deployment === "object" && deployment !== null ? deployment.release : void 0;
|
|
26
|
+
const releaseId = typeof release === "object" && release !== null ? String(release.id ?? "") : "";
|
|
27
|
+
const projectIndex = args.indexOf("--project");
|
|
28
|
+
const projectRef = projectIndex >= 0 ? String(args[projectIndex + 1] ?? "") : "";
|
|
29
|
+
if (!releaseId || !projectRef) return result.raw;
|
|
30
|
+
return `${JSON.stringify({
|
|
31
|
+
...result.envelope,
|
|
32
|
+
activation_required: true,
|
|
33
|
+
message: "Release uploaded but inactive; deploy it before invoking Functions.",
|
|
34
|
+
next_command: [
|
|
35
|
+
"lumera",
|
|
36
|
+
"project",
|
|
37
|
+
"release",
|
|
38
|
+
"deploy-runtime",
|
|
39
|
+
releaseId,
|
|
40
|
+
"--project",
|
|
41
|
+
projectRef
|
|
42
|
+
]
|
|
43
|
+
})}
|
|
44
|
+
`;
|
|
45
|
+
}
|
|
18
46
|
function showHelp() {
|
|
19
47
|
console.log(`
|
|
20
48
|
${pc.dim("Usage:")}
|
|
@@ -26,7 +54,8 @@ ${pc.dim("Usage:")}
|
|
|
26
54
|
|
|
27
55
|
${pc.dim("Description:")}
|
|
28
56
|
Build, verify, and contract-test immutable Python 3.13/Linux/ARM64 project
|
|
29
|
-
releases
|
|
57
|
+
releases. The deploy command uploads an inactive resource and reports the
|
|
58
|
+
required deploy-runtime command that activates it.
|
|
30
59
|
`);
|
|
31
60
|
}
|
|
32
61
|
function buildReleaseRunnerArgs(command, args, projectRoot) {
|
|
@@ -47,11 +76,17 @@ function buildReleaseRunnerArgs(command, args, projectRoot) {
|
|
|
47
76
|
...args
|
|
48
77
|
];
|
|
49
78
|
}
|
|
50
|
-
async function runReleaseRunner(runnerArgs, projectRoot, spawnRunner = (command, args, options) => spawn(command, args, options)) {
|
|
79
|
+
async function runReleaseRunner(runnerArgs, projectRoot, releaseCommand, spawnRunner = (command, args, options) => spawn(command, args, options)) {
|
|
80
|
+
let runnerEnvironment = process.env;
|
|
81
|
+
if (releaseCommand === "build") {
|
|
82
|
+
const releaseTempRoot = join(projectRoot, ".lumera", "tmp");
|
|
83
|
+
mkdirSync(releaseTempRoot, { recursive: true, mode: 448 });
|
|
84
|
+
runnerEnvironment = { ...process.env, TMPDIR: releaseTempRoot };
|
|
85
|
+
}
|
|
51
86
|
return await new Promise((resolvePromise, reject) => {
|
|
52
87
|
const child = spawnRunner("uv", runnerArgs, {
|
|
53
88
|
cwd: projectRoot,
|
|
54
|
-
env:
|
|
89
|
+
env: runnerEnvironment,
|
|
55
90
|
shell: false,
|
|
56
91
|
stdio: ["inherit", "pipe", "inherit"]
|
|
57
92
|
});
|
|
@@ -95,9 +130,10 @@ async function project(subcommand, args, dependencies = {}) {
|
|
|
95
130
|
const projectRoot = findProjectRoot();
|
|
96
131
|
const result = await runRunner(
|
|
97
132
|
buildReleaseRunnerArgs(releaseCommand, releaseArgs, projectRoot),
|
|
98
|
-
projectRoot
|
|
133
|
+
projectRoot,
|
|
134
|
+
releaseCommand
|
|
99
135
|
);
|
|
100
|
-
writeOutput(result
|
|
136
|
+
writeOutput(releaseCommandOutput(releaseCommand, releaseArgs, result));
|
|
101
137
|
if (result.code !== 0) process.exitCode = result.code;
|
|
102
138
|
} catch (error) {
|
|
103
139
|
writeOutput(
|
package/package.json
CHANGED
|
@@ -12,8 +12,8 @@ importers:
|
|
|
12
12
|
.:
|
|
13
13
|
dependencies:
|
|
14
14
|
'@lumerahq/ui':
|
|
15
|
-
specifier: ^0.19.
|
|
16
|
-
version: 0.19.
|
|
15
|
+
specifier: ^0.19.2
|
|
16
|
+
version: 0.19.2(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
|
|
17
17
|
'@tanstack/react-query':
|
|
18
18
|
specifier: ^5.90.11
|
|
19
19
|
version: 5.101.0(react@19.2.7)
|
|
@@ -457,8 +457,8 @@ packages:
|
|
|
457
457
|
'@jridgewell/trace-mapping@0.3.31':
|
|
458
458
|
resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
|
|
459
459
|
|
|
460
|
-
'@lumerahq/ui@0.19.
|
|
461
|
-
resolution: {integrity: sha512-
|
|
460
|
+
'@lumerahq/ui@0.19.2':
|
|
461
|
+
resolution: {integrity: sha512-B87CSipRwasMTtt3bWDj4hl5nwDfOd6BiLcvwPDr2wHRfuadAmJPvT0ABv3a1mHQt96mLz1aYfReZCgAEGym0g==}
|
|
462
462
|
peerDependencies:
|
|
463
463
|
react: ^18.0.0 || ^19.0.0
|
|
464
464
|
react-dom: ^18.0.0 || ^19.0.0
|
|
@@ -2311,7 +2311,7 @@ snapshots:
|
|
|
2311
2311
|
'@jridgewell/resolve-uri': 3.1.2
|
|
2312
2312
|
'@jridgewell/sourcemap-codec': 1.5.5
|
|
2313
2313
|
|
|
2314
|
-
'@lumerahq/ui@0.19.
|
|
2314
|
+
'@lumerahq/ui@0.19.2(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)':
|
|
2315
2315
|
dependencies:
|
|
2316
2316
|
'@base-ui/react': 1.5.0(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
|
|
2317
2317
|
'@tanstack/react-query': 5.101.0(react@19.2.7)
|