clawup 1.0.6 → 1.0.7
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/bin.js +9 -8
- package/dist/bin.js.map +2 -2
- package/dist/lib/workspace.js +15 -15
- package/dist/lib/workspace.js.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -5237,24 +5237,19 @@ var init_exec = __esm({
|
|
|
5237
5237
|
});
|
|
5238
5238
|
|
|
5239
5239
|
// lib/workspace.ts
|
|
5240
|
-
function getCliPackageRoot() {
|
|
5241
|
-
const oneUp = path2.resolve(__dirname, "..");
|
|
5242
|
-
if (fs2.existsSync(path2.join(oneUp, "package.json"))) return oneUp;
|
|
5243
|
-
return path2.resolve(__dirname, "..", "..");
|
|
5244
|
-
}
|
|
5245
5240
|
function cliVersion() {
|
|
5241
|
+
const pkgPath = path2.join(__dirname, "..", "..", "package.json");
|
|
5246
5242
|
try {
|
|
5247
|
-
const pkgPath = path2.join(getCliPackageRoot(), "package.json");
|
|
5248
5243
|
return JSON.parse(fs2.readFileSync(pkgPath, "utf-8")).version;
|
|
5249
5244
|
} catch {
|
|
5250
5245
|
return "unknown";
|
|
5251
5246
|
}
|
|
5252
5247
|
}
|
|
5253
5248
|
function getBundledInfraDir() {
|
|
5254
|
-
return path2.join(
|
|
5249
|
+
return path2.join(__dirname, "..", "..", "infra");
|
|
5255
5250
|
}
|
|
5256
5251
|
function isDevMode() {
|
|
5257
|
-
const repoRoot = path2.resolve(
|
|
5252
|
+
const repoRoot = path2.resolve(__dirname, "..", "..", "..");
|
|
5258
5253
|
return fs2.existsSync(path2.join(repoRoot, "Pulumi.yaml")) && fs2.existsSync(path2.join(repoRoot, "node_modules", "@pulumi"));
|
|
5259
5254
|
}
|
|
5260
5255
|
function getWorkspaceDir() {
|
|
@@ -5307,6 +5302,12 @@ function ensureWorkspace() {
|
|
|
5307
5302
|
${msg}`
|
|
5308
5303
|
};
|
|
5309
5304
|
}
|
|
5305
|
+
const bundledCore = path2.join(bundled, "node_modules", "@clawup", "core");
|
|
5306
|
+
if (fs2.existsSync(bundledCore)) {
|
|
5307
|
+
const destCore = path2.join(WORKSPACE_DIR, "node_modules", "@clawup", "core");
|
|
5308
|
+
fs2.mkdirSync(destCore, { recursive: true });
|
|
5309
|
+
copyDirSync(bundledCore, destCore);
|
|
5310
|
+
}
|
|
5310
5311
|
fs2.writeFileSync(versionFile, version, "utf-8");
|
|
5311
5312
|
return { ok: true };
|
|
5312
5313
|
}
|