buildwithnexus 0.4.1 → 0.4.2
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 +24 -10
- package/dist/nexus-release.tar.gz +0 -0
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -1155,11 +1155,18 @@ import crypto4 from "crypto";
|
|
|
1155
1155
|
import { fileURLToPath } from "url";
|
|
1156
1156
|
function getReleaseTarball() {
|
|
1157
1157
|
const dir = path6.dirname(fileURLToPath(import.meta.url));
|
|
1158
|
-
const
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1158
|
+
const possiblePaths = [
|
|
1159
|
+
// Current directory (dev)
|
|
1160
|
+
path6.join(dir, "nexus-release.tar.gz"),
|
|
1161
|
+
// dist folder (when built)
|
|
1162
|
+
path6.resolve(dir, "..", "dist", "nexus-release.tar.gz"),
|
|
1163
|
+
// node_modules location (when installed from npm)
|
|
1164
|
+
path6.resolve(dir, "..", "nexus-release.tar.gz")
|
|
1165
|
+
];
|
|
1166
|
+
for (const tarballPath of possiblePaths) {
|
|
1167
|
+
if (fs6.existsSync(tarballPath)) return tarballPath;
|
|
1168
|
+
}
|
|
1169
|
+
throw new Error("nexus-release.tar.gz not found. Run: npm install buildwithnexus@latest");
|
|
1163
1170
|
}
|
|
1164
1171
|
function getCloudInitTemplate() {
|
|
1165
1172
|
const dir = path6.dirname(fileURLToPath(import.meta.url));
|
|
@@ -1691,11 +1698,18 @@ init_qemu();
|
|
|
1691
1698
|
init_ssh();
|
|
1692
1699
|
function getReleaseTarball2() {
|
|
1693
1700
|
const dir = path9.dirname(fileURLToPath2(import.meta.url));
|
|
1694
|
-
const
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1701
|
+
const possiblePaths = [
|
|
1702
|
+
// Current directory (dev)
|
|
1703
|
+
path9.join(dir, "nexus-release.tar.gz"),
|
|
1704
|
+
// dist folder (when built)
|
|
1705
|
+
path9.resolve(dir, "..", "dist", "nexus-release.tar.gz"),
|
|
1706
|
+
// node_modules location (when installed from npm)
|
|
1707
|
+
path9.resolve(dir, "..", "nexus-release.tar.gz")
|
|
1708
|
+
];
|
|
1709
|
+
for (const tarballPath of possiblePaths) {
|
|
1710
|
+
if (fs8.existsSync(tarballPath)) return tarballPath;
|
|
1711
|
+
}
|
|
1712
|
+
throw new Error("nexus-release.tar.gz not found. Run: npm install buildwithnexus@latest");
|
|
1699
1713
|
}
|
|
1700
1714
|
var updateCommand = new Command7("update").description("Update NEXUS to the latest bundled release and restart").action(async () => {
|
|
1701
1715
|
const config = loadConfig();
|
|
Binary file
|