pinme 2.0.0-beta.17 → 2.0.0-beta.18
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/index.js +18 -46
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1775,7 +1775,7 @@ var import_chalk23 = __toESM(require("chalk"));
|
|
|
1775
1775
|
var import_figlet5 = __toESM(require("figlet"));
|
|
1776
1776
|
|
|
1777
1777
|
// package.json
|
|
1778
|
-
var version = "2.0.0-beta.
|
|
1778
|
+
var version = "2.0.0-beta.18";
|
|
1779
1779
|
|
|
1780
1780
|
// bin/upload.ts
|
|
1781
1781
|
var import_path7 = __toESM(require("path"));
|
|
@@ -6772,7 +6772,7 @@ async function uploadToIpfsSplit_default(filePath, importAsCar = false) {
|
|
|
6772
6772
|
}
|
|
6773
6773
|
return null;
|
|
6774
6774
|
} catch (error) {
|
|
6775
|
-
|
|
6775
|
+
throw error;
|
|
6776
6776
|
}
|
|
6777
6777
|
}
|
|
6778
6778
|
|
|
@@ -7247,6 +7247,9 @@ var upload_default = async (options) => {
|
|
|
7247
7247
|
console.log(import_chalk5.default.blue(`uploading ${absolutePath} to ipfs...`));
|
|
7248
7248
|
try {
|
|
7249
7249
|
const result = await uploadToIpfsSplit_default(absolutePath);
|
|
7250
|
+
if (!result) {
|
|
7251
|
+
throw new Error("Upload failed without a result");
|
|
7252
|
+
}
|
|
7250
7253
|
if (result) {
|
|
7251
7254
|
console.log(
|
|
7252
7255
|
import_chalk5.default.cyan(
|
|
@@ -7335,6 +7338,9 @@ var upload_default = async (options) => {
|
|
|
7335
7338
|
console.log(import_chalk5.default.blue(`uploading ${absolutePath} to ipfs...`));
|
|
7336
7339
|
try {
|
|
7337
7340
|
const result = await uploadToIpfsSplit_default(absolutePath);
|
|
7341
|
+
if (!result) {
|
|
7342
|
+
throw new Error("Upload failed without a result");
|
|
7343
|
+
}
|
|
7338
7344
|
if (result) {
|
|
7339
7345
|
console.log(
|
|
7340
7346
|
import_chalk5.default.cyan(
|
|
@@ -8625,29 +8631,23 @@ Directory "${projectName}" already exists.`));
|
|
|
8625
8631
|
cwd: targetDir,
|
|
8626
8632
|
stdio: "inherit"
|
|
8627
8633
|
});
|
|
8628
|
-
console.log(import_chalk17.default.green("
|
|
8634
|
+
console.log(import_chalk17.default.green(" Project dependencies installed"));
|
|
8629
8635
|
} catch (error) {
|
|
8630
|
-
|
|
8636
|
+
throw createCommandError("project dependency install", "npm install", error, [
|
|
8637
|
+
"Check network connectivity and npm registry availability.",
|
|
8638
|
+
"Inspect the generated workspace `package.json` files for dependency conflicts."
|
|
8639
|
+
]);
|
|
8631
8640
|
}
|
|
8632
8641
|
const frontendDir = import_path11.default.join(targetDir, "frontend");
|
|
8633
8642
|
if (import_fs_extra6.default.existsSync(frontendDir)) {
|
|
8634
8643
|
try {
|
|
8635
|
-
(0, import_child_process2.execSync)("npm
|
|
8636
|
-
cwd:
|
|
8637
|
-
stdio: "inherit"
|
|
8638
|
-
});
|
|
8639
|
-
console.log(import_chalk17.default.green(" Frontend dependencies installed"));
|
|
8640
|
-
} catch (error) {
|
|
8641
|
-
console.log(import_chalk17.default.yellow(" Warning: Frontend dependencies install failed, continuing..."));
|
|
8642
|
-
}
|
|
8643
|
-
try {
|
|
8644
|
-
(0, import_child_process2.execSync)("npm run build", {
|
|
8645
|
-
cwd: frontendDir,
|
|
8644
|
+
(0, import_child_process2.execSync)("npm run build:frontend", {
|
|
8645
|
+
cwd: targetDir,
|
|
8646
8646
|
stdio: "inherit"
|
|
8647
8647
|
});
|
|
8648
8648
|
console.log(import_chalk17.default.green(" Frontend built"));
|
|
8649
8649
|
} catch (error) {
|
|
8650
|
-
throw createCommandError("frontend build", "npm run build", error, [
|
|
8650
|
+
throw createCommandError("frontend build", "npm run build:frontend", error, [
|
|
8651
8651
|
"Fix the frontend build error shown above, then rerun `pinme create`."
|
|
8652
8652
|
]);
|
|
8653
8653
|
}
|
|
@@ -8732,41 +8732,13 @@ function installDependencies() {
|
|
|
8732
8732
|
cwd: PROJECT_DIR2,
|
|
8733
8733
|
stdio: "inherit"
|
|
8734
8734
|
});
|
|
8735
|
-
console.log(import_chalk18.default.green("
|
|
8735
|
+
console.log(import_chalk18.default.green("Project dependencies installed"));
|
|
8736
8736
|
} catch (error) {
|
|
8737
|
-
throw createCommandError("
|
|
8737
|
+
throw createCommandError("project dependency install", "npm install", error, [
|
|
8738
8738
|
"Check network connectivity and npm registry availability.",
|
|
8739
8739
|
"If `package-lock.json` is stale or conflicted, resolve that before retrying."
|
|
8740
8740
|
]);
|
|
8741
8741
|
}
|
|
8742
|
-
const backendDir = import_path12.default.join(PROJECT_DIR2, "backend");
|
|
8743
|
-
if (import_fs_extra7.default.existsSync(import_path12.default.join(backendDir, "package.json"))) {
|
|
8744
|
-
try {
|
|
8745
|
-
(0, import_child_process3.execSync)("npm install", {
|
|
8746
|
-
cwd: backendDir,
|
|
8747
|
-
stdio: "inherit"
|
|
8748
|
-
});
|
|
8749
|
-
console.log(import_chalk18.default.green("Backend dependencies installed"));
|
|
8750
|
-
} catch (error) {
|
|
8751
|
-
throw createCommandError("backend dependency install", "npm install", error, [
|
|
8752
|
-
"Inspect `backend/package.json` and the npm output above for the failing package."
|
|
8753
|
-
]);
|
|
8754
|
-
}
|
|
8755
|
-
}
|
|
8756
|
-
const frontendDir = import_path12.default.join(PROJECT_DIR2, "frontend");
|
|
8757
|
-
if (import_fs_extra7.default.existsSync(import_path12.default.join(frontendDir, "package.json"))) {
|
|
8758
|
-
try {
|
|
8759
|
-
(0, import_child_process3.execSync)("npm install", {
|
|
8760
|
-
cwd: frontendDir,
|
|
8761
|
-
stdio: "inherit"
|
|
8762
|
-
});
|
|
8763
|
-
console.log(import_chalk18.default.green("Frontend dependencies installed"));
|
|
8764
|
-
} catch (error) {
|
|
8765
|
-
throw createCommandError("frontend dependency install", "npm install", error, [
|
|
8766
|
-
"Inspect `frontend/package.json` and the npm output above for the failing package."
|
|
8767
|
-
]);
|
|
8768
|
-
}
|
|
8769
|
-
}
|
|
8770
8742
|
}
|
|
8771
8743
|
function getBuiltWorker() {
|
|
8772
8744
|
const distWorkerDir = import_path12.default.join(PROJECT_DIR2, "dist-worker");
|