@le-space/node 0.1.12 → 0.1.13
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/index.d.ts +2 -1
- package/index.js +9 -4
- package/package.json +4 -4
package/index.d.ts
CHANGED
|
@@ -412,9 +412,10 @@ interface RunResult {
|
|
|
412
412
|
stderr: string;
|
|
413
413
|
exitCode: number;
|
|
414
414
|
}
|
|
415
|
+
declare function parseLastJsonObject(text: string): Record<string, unknown>;
|
|
415
416
|
declare function runSitePublishMode(env?: NodeJS.ProcessEnv): Promise<void>;
|
|
416
417
|
declare function runProbeMode(env?: NodeJS.ProcessEnv): Promise<void>;
|
|
417
418
|
declare function runBootstrapEnvMode(env?: NodeJS.ProcessEnv): Promise<void>;
|
|
418
419
|
declare function runSiteMode(env?: NodeJS.ProcessEnv): Promise<void>;
|
|
419
420
|
|
|
420
|
-
export { type DeployConfigurationResult, type DeployExecutorDependencies, type DeployMetadataResult, type DeployOutputResult, type DeployPlan, type ParsedRootfsRunnerInputs, type PrivateKeyIdentity, type RunResult, actionLog, appendGithubOutput, appendGithubSummary, booleanEnv, buildScaffoldDeployResult, createPrivateKeyIdentity, createPrivateKeySigner, emitDeployOutputs, emitGeocodedCrnOutputs, emitRootfsOutputs, executeDeployPlan, integerEnv, jsonEnv, main, optionalEnv, parseDeployPlan, parseRootfsRunnerInputs, requiredEnv, rootfsMain, runActionMode, runBootstrapEnvMode, runLocalCommand, runProbeMode, runRootfsMode, runSiteMode, runSitePublishMode };
|
|
421
|
+
export { type DeployConfigurationResult, type DeployExecutorDependencies, type DeployMetadataResult, type DeployOutputResult, type DeployPlan, type ParsedRootfsRunnerInputs, type PrivateKeyIdentity, type RunResult, actionLog, appendGithubOutput, appendGithubSummary, booleanEnv, buildScaffoldDeployResult, createPrivateKeyIdentity, createPrivateKeySigner, emitDeployOutputs, emitGeocodedCrnOutputs, emitRootfsOutputs, executeDeployPlan, integerEnv, jsonEnv, main, optionalEnv, parseDeployPlan, parseLastJsonObject, parseRootfsRunnerInputs, requiredEnv, rootfsMain, runActionMode, runBootstrapEnvMode, runLocalCommand, runProbeMode, runRootfsMode, runSiteMode, runSitePublishMode };
|
package/index.js
CHANGED
|
@@ -2849,11 +2849,15 @@ async function runCapture(command, args, options = {}) {
|
|
|
2849
2849
|
});
|
|
2850
2850
|
}
|
|
2851
2851
|
function parseLastJsonObject(text) {
|
|
2852
|
-
const lines = text.split(/\r?\n/).
|
|
2852
|
+
const lines = text.split(/\r?\n/).filter((line) => line.trim().length > 0);
|
|
2853
2853
|
for (let index = lines.length - 1; index >= 0; index -= 1) {
|
|
2854
|
-
const
|
|
2855
|
-
if (!
|
|
2856
|
-
|
|
2854
|
+
const candidate = lines[index]?.trimStart() ?? "";
|
|
2855
|
+
if (!candidate.startsWith("{")) continue;
|
|
2856
|
+
const suffix = lines.slice(index).join("\n");
|
|
2857
|
+
try {
|
|
2858
|
+
return JSON.parse(suffix);
|
|
2859
|
+
} catch {
|
|
2860
|
+
}
|
|
2857
2861
|
}
|
|
2858
2862
|
throw new Error(`Could not parse JSON object from output: ${text}`);
|
|
2859
2863
|
}
|
|
@@ -2988,6 +2992,7 @@ export {
|
|
|
2988
2992
|
main,
|
|
2989
2993
|
optionalEnv,
|
|
2990
2994
|
parseDeployPlan,
|
|
2995
|
+
parseLastJsonObject,
|
|
2991
2996
|
parseRootfsRunnerInputs,
|
|
2992
2997
|
requiredEnv,
|
|
2993
2998
|
rootfsMain,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@le-space/node",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "Node and GitHub Actions adapters for shared Aleph tooling.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@le-space/core": "0.1.
|
|
20
|
-
"@le-space/shared-types": "0.1.
|
|
21
|
-
"@le-space/rootfs": "0.1.
|
|
19
|
+
"@le-space/core": "0.1.13",
|
|
20
|
+
"@le-space/shared-types": "0.1.13",
|
|
21
|
+
"@le-space/rootfs": "0.1.13",
|
|
22
22
|
"ethers": "^6.15.0"
|
|
23
23
|
}
|
|
24
24
|
}
|