@walkeros/cli 1.4.0-next-1771279991849 → 1.4.0-next-1771332305084
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/CHANGELOG.md +3 -3
- package/dist/cli.js +17 -20
- package/dist/index.js +17 -20
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/walker.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @walkeros/cli
|
|
2
2
|
|
|
3
|
-
## 1.4.0-next-
|
|
3
|
+
## 1.4.0-next-1771332305084
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
- 1ae6972: Fix missing trailing newline in JSON output
|
|
12
12
|
- Updated dependencies [7b2d750]
|
|
13
|
-
- @walkeros/core@1.4.0-next-
|
|
14
|
-
- @walkeros/server-core@1.0.6-next-
|
|
13
|
+
- @walkeros/core@1.4.0-next-1771332305084
|
|
14
|
+
- @walkeros/server-core@1.0.6-next-1771332305084
|
|
15
15
|
|
|
16
16
|
## 1.3.0
|
|
17
17
|
|
package/dist/cli.js
CHANGED
|
@@ -798,7 +798,7 @@ async function resolveDependencies(pkg, packageDir, logger2, visited = /* @__PUR
|
|
|
798
798
|
}
|
|
799
799
|
return dependencies;
|
|
800
800
|
}
|
|
801
|
-
async function downloadPackages(packages, targetDir, logger2, useCache = true, configDir) {
|
|
801
|
+
async function downloadPackages(packages, targetDir, logger2, useCache = true, configDir, tmpDir) {
|
|
802
802
|
const packagePaths = /* @__PURE__ */ new Map();
|
|
803
803
|
const downloadQueue = [...packages];
|
|
804
804
|
const processed = /* @__PURE__ */ new Set();
|
|
@@ -841,8 +841,8 @@ async function downloadPackages(packages, targetDir, logger2, useCache = true, c
|
|
|
841
841
|
}
|
|
842
842
|
const packageSpec = `${pkg.name}@${pkg.version}`;
|
|
843
843
|
const packageDir = getPackageDirectory(targetDir, pkg.name, pkg.version);
|
|
844
|
-
const cachedPath = await getCachedPackagePath(pkg);
|
|
845
|
-
if (useCache && await isPackageCached(pkg)) {
|
|
844
|
+
const cachedPath = await getCachedPackagePath(pkg, tmpDir);
|
|
845
|
+
if (useCache && await isPackageCached(pkg, tmpDir)) {
|
|
846
846
|
if (userSpecifiedPackages.has(pkg.name)) {
|
|
847
847
|
logger2.debug(`Downloading ${packageSpec} (cached)`);
|
|
848
848
|
}
|
|
@@ -866,7 +866,7 @@ async function downloadPackages(packages, targetDir, logger2, useCache = true, c
|
|
|
866
866
|
}
|
|
867
867
|
try {
|
|
868
868
|
await fs6.ensureDir(path7.dirname(packageDir));
|
|
869
|
-
const cacheDir = process.env.NPM_CACHE_DIR || getTmpPath(
|
|
869
|
+
const cacheDir = process.env.NPM_CACHE_DIR || getTmpPath(tmpDir, "cache", "npm");
|
|
870
870
|
await withTimeout(
|
|
871
871
|
pacote.extract(packageSpec, packageDir, {
|
|
872
872
|
// Force npm registry download, prevent workspace resolution
|
|
@@ -1050,9 +1050,9 @@ async function bundleCore(flowConfig, buildOptions, logger2, showStats = false)
|
|
|
1050
1050
|
const TEMP_DIR = buildOptions.tempDir || getTmpPath();
|
|
1051
1051
|
if (buildOptions.cache !== false) {
|
|
1052
1052
|
const configContent = generateCacheKeyContent(flowConfig, buildOptions);
|
|
1053
|
-
const cached = await isBuildCached(configContent);
|
|
1053
|
+
const cached = await isBuildCached(configContent, TEMP_DIR);
|
|
1054
1054
|
if (cached) {
|
|
1055
|
-
const cachedBuild = await getCachedBuild(configContent);
|
|
1055
|
+
const cachedBuild = await getCachedBuild(configContent, TEMP_DIR);
|
|
1056
1056
|
if (cachedBuild) {
|
|
1057
1057
|
logger2.debug("Using cached build");
|
|
1058
1058
|
const outputPath = path9.resolve(buildOptions.output);
|
|
@@ -1105,8 +1105,9 @@ async function bundleCore(flowConfig, buildOptions, logger2, showStats = false)
|
|
|
1105
1105
|
TEMP_DIR,
|
|
1106
1106
|
logger2,
|
|
1107
1107
|
buildOptions.cache,
|
|
1108
|
-
buildOptions.configDir
|
|
1108
|
+
buildOptions.configDir,
|
|
1109
1109
|
// For resolving relative local paths
|
|
1110
|
+
TEMP_DIR
|
|
1110
1111
|
);
|
|
1111
1112
|
for (const [pkgName, pkgPath] of packagePaths.entries()) {
|
|
1112
1113
|
if (pkgName.startsWith("@walkeros/")) {
|
|
@@ -1166,7 +1167,7 @@ async function bundleCore(flowConfig, buildOptions, logger2, showStats = false)
|
|
|
1166
1167
|
if (buildOptions.cache !== false) {
|
|
1167
1168
|
const configContent = generateCacheKeyContent(flowConfig, buildOptions);
|
|
1168
1169
|
const buildOutput = await fs8.readFile(outputPath, "utf-8");
|
|
1169
|
-
await cacheBuild(configContent, buildOutput);
|
|
1170
|
+
await cacheBuild(configContent, buildOutput, TEMP_DIR);
|
|
1170
1171
|
logger2.debug("Build cached for future use");
|
|
1171
1172
|
}
|
|
1172
1173
|
let stats;
|
|
@@ -2420,7 +2421,7 @@ async function simulateCommand(options) {
|
|
|
2420
2421
|
const stdinContent = await readStdin();
|
|
2421
2422
|
const fs15 = await import("fs-extra");
|
|
2422
2423
|
const path15 = await import("path");
|
|
2423
|
-
const tmpPath =
|
|
2424
|
+
const tmpPath = getTmpPath(void 0, "stdin-simulate.json");
|
|
2424
2425
|
await fs15.default.ensureDir(path15.default.dirname(tmpPath));
|
|
2425
2426
|
await fs15.default.writeFile(tmpPath, stdinContent, "utf-8");
|
|
2426
2427
|
config = tmpPath;
|
|
@@ -2559,7 +2560,7 @@ async function pushCommand(options) {
|
|
|
2559
2560
|
let config;
|
|
2560
2561
|
if (isStdinPiped() && !options.config) {
|
|
2561
2562
|
const stdinContent = await readStdin();
|
|
2562
|
-
const tmpPath =
|
|
2563
|
+
const tmpPath = getTmpPath(void 0, "stdin-push.json");
|
|
2563
2564
|
await fs12.ensureDir(path12.dirname(tmpPath));
|
|
2564
2565
|
await fs12.writeFile(tmpPath, stdinContent, "utf-8");
|
|
2565
2566
|
config = tmpPath;
|
|
@@ -2632,9 +2633,8 @@ async function executeConfigPush(options, validatedEvent, logger2, setTempDir) {
|
|
|
2632
2633
|
const platform = getPlatform4(flowConfig);
|
|
2633
2634
|
logger2.debug("Bundling flow configuration");
|
|
2634
2635
|
const configDir = buildOptions.configDir || process.cwd();
|
|
2635
|
-
const tempDir =
|
|
2636
|
-
|
|
2637
|
-
".tmp",
|
|
2636
|
+
const tempDir = getTmpPath(
|
|
2637
|
+
void 0,
|
|
2638
2638
|
`push-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`
|
|
2639
2639
|
);
|
|
2640
2640
|
setTempDir(tempDir);
|
|
@@ -2672,9 +2672,8 @@ async function executeConfigPush(options, validatedEvent, logger2, setTempDir) {
|
|
|
2672
2672
|
}
|
|
2673
2673
|
}
|
|
2674
2674
|
async function executeBundlePush(bundleContent, platform, validatedEvent, logger2, setTempDir, context = {}) {
|
|
2675
|
-
const tempDir =
|
|
2676
|
-
|
|
2677
|
-
".tmp",
|
|
2675
|
+
const tempDir = getTmpPath(
|
|
2676
|
+
void 0,
|
|
2678
2677
|
`push-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`
|
|
2679
2678
|
);
|
|
2680
2679
|
setTempDir(tempDir);
|
|
@@ -2922,10 +2921,8 @@ function validatePort(port) {
|
|
|
2922
2921
|
import path13 from "path";
|
|
2923
2922
|
import fs13 from "fs-extra";
|
|
2924
2923
|
async function prepareBundleForRun(configPath, options) {
|
|
2925
|
-
const
|
|
2926
|
-
|
|
2927
|
-
configDir,
|
|
2928
|
-
".tmp",
|
|
2924
|
+
const tempDir = getTmpPath(
|
|
2925
|
+
void 0,
|
|
2929
2926
|
`run-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`
|
|
2930
2927
|
);
|
|
2931
2928
|
await fs13.ensureDir(tempDir);
|
package/dist/index.js
CHANGED
|
@@ -758,7 +758,7 @@ async function resolveDependencies(pkg, packageDir, logger2, visited = /* @__PUR
|
|
|
758
758
|
}
|
|
759
759
|
return dependencies;
|
|
760
760
|
}
|
|
761
|
-
async function downloadPackages(packages, targetDir, logger2, useCache = true, configDir) {
|
|
761
|
+
async function downloadPackages(packages, targetDir, logger2, useCache = true, configDir, tmpDir) {
|
|
762
762
|
const packagePaths = /* @__PURE__ */ new Map();
|
|
763
763
|
const downloadQueue = [...packages];
|
|
764
764
|
const processed = /* @__PURE__ */ new Set();
|
|
@@ -801,8 +801,8 @@ async function downloadPackages(packages, targetDir, logger2, useCache = true, c
|
|
|
801
801
|
}
|
|
802
802
|
const packageSpec = `${pkg.name}@${pkg.version}`;
|
|
803
803
|
const packageDir = getPackageDirectory(targetDir, pkg.name, pkg.version);
|
|
804
|
-
const cachedPath = await getCachedPackagePath(pkg);
|
|
805
|
-
if (useCache && await isPackageCached(pkg)) {
|
|
804
|
+
const cachedPath = await getCachedPackagePath(pkg, tmpDir);
|
|
805
|
+
if (useCache && await isPackageCached(pkg, tmpDir)) {
|
|
806
806
|
if (userSpecifiedPackages.has(pkg.name)) {
|
|
807
807
|
logger2.debug(`Downloading ${packageSpec} (cached)`);
|
|
808
808
|
}
|
|
@@ -826,7 +826,7 @@ async function downloadPackages(packages, targetDir, logger2, useCache = true, c
|
|
|
826
826
|
}
|
|
827
827
|
try {
|
|
828
828
|
await fs6.ensureDir(path7.dirname(packageDir));
|
|
829
|
-
const cacheDir = process.env.NPM_CACHE_DIR || getTmpPath(
|
|
829
|
+
const cacheDir = process.env.NPM_CACHE_DIR || getTmpPath(tmpDir, "cache", "npm");
|
|
830
830
|
await withTimeout(
|
|
831
831
|
pacote.extract(packageSpec, packageDir, {
|
|
832
832
|
// Force npm registry download, prevent workspace resolution
|
|
@@ -1010,9 +1010,9 @@ async function bundleCore(flowConfig, buildOptions, logger2, showStats = false)
|
|
|
1010
1010
|
const TEMP_DIR = buildOptions.tempDir || getTmpPath();
|
|
1011
1011
|
if (buildOptions.cache !== false) {
|
|
1012
1012
|
const configContent = generateCacheKeyContent(flowConfig, buildOptions);
|
|
1013
|
-
const cached = await isBuildCached(configContent);
|
|
1013
|
+
const cached = await isBuildCached(configContent, TEMP_DIR);
|
|
1014
1014
|
if (cached) {
|
|
1015
|
-
const cachedBuild = await getCachedBuild(configContent);
|
|
1015
|
+
const cachedBuild = await getCachedBuild(configContent, TEMP_DIR);
|
|
1016
1016
|
if (cachedBuild) {
|
|
1017
1017
|
logger2.debug("Using cached build");
|
|
1018
1018
|
const outputPath = path9.resolve(buildOptions.output);
|
|
@@ -1065,8 +1065,9 @@ async function bundleCore(flowConfig, buildOptions, logger2, showStats = false)
|
|
|
1065
1065
|
TEMP_DIR,
|
|
1066
1066
|
logger2,
|
|
1067
1067
|
buildOptions.cache,
|
|
1068
|
-
buildOptions.configDir
|
|
1068
|
+
buildOptions.configDir,
|
|
1069
1069
|
// For resolving relative local paths
|
|
1070
|
+
TEMP_DIR
|
|
1070
1071
|
);
|
|
1071
1072
|
for (const [pkgName, pkgPath] of packagePaths.entries()) {
|
|
1072
1073
|
if (pkgName.startsWith("@walkeros/")) {
|
|
@@ -1126,7 +1127,7 @@ async function bundleCore(flowConfig, buildOptions, logger2, showStats = false)
|
|
|
1126
1127
|
if (buildOptions.cache !== false) {
|
|
1127
1128
|
const configContent = generateCacheKeyContent(flowConfig, buildOptions);
|
|
1128
1129
|
const buildOutput = await fs8.readFile(outputPath, "utf-8");
|
|
1129
|
-
await cacheBuild(configContent, buildOutput);
|
|
1130
|
+
await cacheBuild(configContent, buildOutput, TEMP_DIR);
|
|
1130
1131
|
logger2.debug("Build cached for future use");
|
|
1131
1132
|
}
|
|
1132
1133
|
let stats;
|
|
@@ -2396,7 +2397,7 @@ async function simulateCommand(options) {
|
|
|
2396
2397
|
const stdinContent = await readStdin();
|
|
2397
2398
|
const fs14 = await import("fs-extra");
|
|
2398
2399
|
const path15 = await import("path");
|
|
2399
|
-
const tmpPath =
|
|
2400
|
+
const tmpPath = getTmpPath(void 0, "stdin-simulate.json");
|
|
2400
2401
|
await fs14.default.ensureDir(path15.default.dirname(tmpPath));
|
|
2401
2402
|
await fs14.default.writeFile(tmpPath, stdinContent, "utf-8");
|
|
2402
2403
|
config = tmpPath;
|
|
@@ -2548,7 +2549,7 @@ async function pushCommand(options) {
|
|
|
2548
2549
|
let config;
|
|
2549
2550
|
if (isStdinPiped() && !options.config) {
|
|
2550
2551
|
const stdinContent = await readStdin();
|
|
2551
|
-
const tmpPath =
|
|
2552
|
+
const tmpPath = getTmpPath(void 0, "stdin-push.json");
|
|
2552
2553
|
await fs12.ensureDir(path12.dirname(tmpPath));
|
|
2553
2554
|
await fs12.writeFile(tmpPath, stdinContent, "utf-8");
|
|
2554
2555
|
config = tmpPath;
|
|
@@ -2634,9 +2635,8 @@ async function executeConfigPush(options, validatedEvent, logger2, setTempDir) {
|
|
|
2634
2635
|
const platform = getPlatform4(flowConfig);
|
|
2635
2636
|
logger2.debug("Bundling flow configuration");
|
|
2636
2637
|
const configDir = buildOptions.configDir || process.cwd();
|
|
2637
|
-
const tempDir =
|
|
2638
|
-
|
|
2639
|
-
".tmp",
|
|
2638
|
+
const tempDir = getTmpPath(
|
|
2639
|
+
void 0,
|
|
2640
2640
|
`push-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`
|
|
2641
2641
|
);
|
|
2642
2642
|
setTempDir(tempDir);
|
|
@@ -2674,9 +2674,8 @@ async function executeConfigPush(options, validatedEvent, logger2, setTempDir) {
|
|
|
2674
2674
|
}
|
|
2675
2675
|
}
|
|
2676
2676
|
async function executeBundlePush(bundleContent, platform, validatedEvent, logger2, setTempDir, context = {}) {
|
|
2677
|
-
const tempDir =
|
|
2678
|
-
|
|
2679
|
-
".tmp",
|
|
2677
|
+
const tempDir = getTmpPath(
|
|
2678
|
+
void 0,
|
|
2680
2679
|
`push-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`
|
|
2681
2680
|
);
|
|
2682
2681
|
setTempDir(tempDir);
|
|
@@ -2924,10 +2923,8 @@ function validatePort(port) {
|
|
|
2924
2923
|
import path13 from "path";
|
|
2925
2924
|
import fs13 from "fs-extra";
|
|
2926
2925
|
async function prepareBundleForRun(configPath, options) {
|
|
2927
|
-
const
|
|
2928
|
-
|
|
2929
|
-
configDir,
|
|
2930
|
-
".tmp",
|
|
2926
|
+
const tempDir = getTmpPath(
|
|
2927
|
+
void 0,
|
|
2931
2928
|
`run-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`
|
|
2932
2929
|
);
|
|
2933
2930
|
await fs13.ensureDir(tempDir);
|