clawup 1.0.5 → 1.0.6
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 +8 -3
- package/dist/bin.js.map +2 -2
- package/dist/lib/workspace.js +15 -7
- package/dist/lib/workspace.js.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -5237,19 +5237,24 @@ 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
|
+
}
|
|
5240
5245
|
function cliVersion() {
|
|
5241
|
-
const pkgPath = path2.join(__dirname, "..", "..", "package.json");
|
|
5242
5246
|
try {
|
|
5247
|
+
const pkgPath = path2.join(getCliPackageRoot(), "package.json");
|
|
5243
5248
|
return JSON.parse(fs2.readFileSync(pkgPath, "utf-8")).version;
|
|
5244
5249
|
} catch {
|
|
5245
5250
|
return "unknown";
|
|
5246
5251
|
}
|
|
5247
5252
|
}
|
|
5248
5253
|
function getBundledInfraDir() {
|
|
5249
|
-
return path2.join(
|
|
5254
|
+
return path2.join(getCliPackageRoot(), "infra");
|
|
5250
5255
|
}
|
|
5251
5256
|
function isDevMode() {
|
|
5252
|
-
const repoRoot = path2.resolve(
|
|
5257
|
+
const repoRoot = path2.resolve(getCliPackageRoot(), "..");
|
|
5253
5258
|
return fs2.existsSync(path2.join(repoRoot, "Pulumi.yaml")) && fs2.existsSync(path2.join(repoRoot, "node_modules", "@pulumi"));
|
|
5254
5259
|
}
|
|
5255
5260
|
function getWorkspaceDir() {
|