pinme 1.2.2 → 1.2.4
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/README.md +2 -2
- package/dist/index.js +25 -26
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ Website: [https://pinme.eth.limo/](https://pinme.eth.limo/)
|
|
|
30
30
|
## Table of Contents
|
|
31
31
|
|
|
32
32
|
- [Quick Start](#quick-start)
|
|
33
|
-
- [For AI
|
|
33
|
+
- [For AI](#for-ai)
|
|
34
34
|
- [Installation](#installation)
|
|
35
35
|
- [Usage](#usage)
|
|
36
36
|
- [Common Static File Directories](#common-static-file-directories)
|
|
@@ -80,7 +80,7 @@ That's it! You'll get a preview URL like `https://pinme.eth.limo/#/preview/*`
|
|
|
80
80
|
|
|
81
81
|
---
|
|
82
82
|
|
|
83
|
-
## For AI
|
|
83
|
+
## For AI
|
|
84
84
|
|
|
85
85
|
This section provides AI-specific instructions for deploying websites using PinMe CLI.
|
|
86
86
|
|
package/dist/index.js
CHANGED
|
@@ -98,7 +98,7 @@ var require_main = __commonJS({
|
|
|
98
98
|
"node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
99
99
|
var fs9 = require("fs");
|
|
100
100
|
var path9 = require("path");
|
|
101
|
-
var
|
|
101
|
+
var os4 = require("os");
|
|
102
102
|
var crypto2 = require("crypto");
|
|
103
103
|
var packageJson = require_package();
|
|
104
104
|
var version2 = packageJson.version;
|
|
@@ -216,7 +216,7 @@ var require_main = __commonJS({
|
|
|
216
216
|
return null;
|
|
217
217
|
}
|
|
218
218
|
function _resolveHome(envPath) {
|
|
219
|
-
return envPath[0] === "~" ? path9.join(
|
|
219
|
+
return envPath[0] === "~" ? path9.join(os4.homedir(), envPath.slice(1)) : envPath;
|
|
220
220
|
}
|
|
221
221
|
function _configVault(options) {
|
|
222
222
|
const debug = Boolean(options && options.debug);
|
|
@@ -810,7 +810,7 @@ var require_has_flag = __commonJS({
|
|
|
810
810
|
var require_supports_color = __commonJS({
|
|
811
811
|
"node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports2, module2) {
|
|
812
812
|
"use strict";
|
|
813
|
-
var
|
|
813
|
+
var os4 = require("os");
|
|
814
814
|
var hasFlag = require_has_flag();
|
|
815
815
|
var env = process.env;
|
|
816
816
|
var forceColor;
|
|
@@ -848,7 +848,7 @@ var require_supports_color = __commonJS({
|
|
|
848
848
|
}
|
|
849
849
|
const min = forceColor ? 1 : 0;
|
|
850
850
|
if (process.platform === "win32") {
|
|
851
|
-
const osRelease =
|
|
851
|
+
const osRelease = os4.release().split(".");
|
|
852
852
|
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
853
853
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
854
854
|
}
|
|
@@ -1523,7 +1523,7 @@ var import_chalk13 = __toESM(require("chalk"));
|
|
|
1523
1523
|
var import_figlet5 = __toESM(require("figlet"));
|
|
1524
1524
|
|
|
1525
1525
|
// package.json
|
|
1526
|
-
var version = "1.2.
|
|
1526
|
+
var version = "1.2.4";
|
|
1527
1527
|
|
|
1528
1528
|
// bin/upload.ts
|
|
1529
1529
|
var import_path6 = __toESM(require("path"));
|
|
@@ -5148,7 +5148,7 @@ var import_crypto_js = __toESM(require("crypto-js"));
|
|
|
5148
5148
|
|
|
5149
5149
|
// bin/utils/pinmeApi.ts
|
|
5150
5150
|
var import_chalk3 = __toESM(require("chalk"));
|
|
5151
|
-
var DEFAULT_BASE =
|
|
5151
|
+
var DEFAULT_BASE = "https://pinme.dev/api/v4";
|
|
5152
5152
|
function createClient() {
|
|
5153
5153
|
const headers = getAuthHeaders();
|
|
5154
5154
|
return axios_default.create({
|
|
@@ -5216,7 +5216,7 @@ async function getMyDomains() {
|
|
|
5216
5216
|
}
|
|
5217
5217
|
return [];
|
|
5218
5218
|
}
|
|
5219
|
-
var CAR_API_BASE = process.env.CAR_API_BASE ||
|
|
5219
|
+
var CAR_API_BASE = process.env.CAR_API_BASE || "https://pinme.dev/api/v4";
|
|
5220
5220
|
function createCarClient() {
|
|
5221
5221
|
let headers = {};
|
|
5222
5222
|
try {
|
|
@@ -5620,7 +5620,6 @@ var importCar_default = async (options) => {
|
|
|
5620
5620
|
|
|
5621
5621
|
// bin/exportCar.ts
|
|
5622
5622
|
var import_path8 = __toESM(require("path"));
|
|
5623
|
-
var import_os4 = __toESM(require("os"));
|
|
5624
5623
|
var import_chalk6 = __toESM(require("chalk"));
|
|
5625
5624
|
var import_inquirer3 = __toESM(require("inquirer"));
|
|
5626
5625
|
var import_figlet3 = __toESM(require("figlet"));
|
|
@@ -5701,9 +5700,8 @@ function getCidFromArgs() {
|
|
|
5701
5700
|
}
|
|
5702
5701
|
return null;
|
|
5703
5702
|
}
|
|
5704
|
-
function
|
|
5705
|
-
|
|
5706
|
-
return import_path8.default.join(homeDir, "Downloads");
|
|
5703
|
+
function getCurrentDirectory() {
|
|
5704
|
+
return process.cwd();
|
|
5707
5705
|
}
|
|
5708
5706
|
function getOutputPathFromArgs() {
|
|
5709
5707
|
const args = process.argv.slice(2);
|
|
@@ -5748,32 +5746,33 @@ var exportCar_default = async () => {
|
|
|
5748
5746
|
console.log(import_chalk6.default.red("Invalid CID format. CID should start with Qm, bafy, bafk, or bafz"));
|
|
5749
5747
|
return;
|
|
5750
5748
|
}
|
|
5751
|
-
let
|
|
5752
|
-
if (!
|
|
5753
|
-
const
|
|
5754
|
-
const defaultFileName = `${cid}.car`;
|
|
5755
|
-
const defaultPath = import_path8.default.join(downloadsDir, defaultFileName);
|
|
5749
|
+
let outputDir = getOutputPathFromArgs();
|
|
5750
|
+
if (!outputDir) {
|
|
5751
|
+
const currentDir = getCurrentDirectory();
|
|
5756
5752
|
const answer = await import_inquirer3.default.prompt([
|
|
5757
5753
|
{
|
|
5758
5754
|
type: "input",
|
|
5759
5755
|
name: "output",
|
|
5760
|
-
message: `Output
|
|
5761
|
-
default:
|
|
5756
|
+
message: `Output directory (default: ${currentDir}): `,
|
|
5757
|
+
default: currentDir
|
|
5762
5758
|
}
|
|
5763
5759
|
]);
|
|
5764
|
-
|
|
5760
|
+
outputDir = answer.output.trim() || currentDir;
|
|
5765
5761
|
}
|
|
5766
|
-
|
|
5767
|
-
const outputDir = import_path8.default.dirname(outputPath);
|
|
5762
|
+
outputDir = import_path8.default.resolve(outputDir);
|
|
5768
5763
|
if (!import_fs4.default.existsSync(outputDir)) {
|
|
5769
5764
|
import_fs4.default.mkdirSync(outputDir, { recursive: true });
|
|
5765
|
+
} else if (!import_fs4.default.statSync(outputDir).isDirectory()) {
|
|
5766
|
+
console.log(import_chalk6.default.red(`Error: ${outputDir} exists but is not a directory.`));
|
|
5767
|
+
return;
|
|
5770
5768
|
}
|
|
5771
|
-
|
|
5769
|
+
const finalOutputPath = import_path8.default.join(outputDir, `${cid}.car`);
|
|
5770
|
+
if (import_fs4.default.existsSync(finalOutputPath)) {
|
|
5772
5771
|
const answer = await import_inquirer3.default.prompt([
|
|
5773
5772
|
{
|
|
5774
5773
|
type: "confirm",
|
|
5775
5774
|
name: "overwrite",
|
|
5776
|
-
message: `File ${
|
|
5775
|
+
message: `File ${finalOutputPath} already exists. Overwrite?`,
|
|
5777
5776
|
default: false
|
|
5778
5777
|
}
|
|
5779
5778
|
]);
|
|
@@ -5799,9 +5798,9 @@ var exportCar_default = async () => {
|
|
|
5799
5798
|
console.log(import_chalk6.default.red("Export failed or timed out."));
|
|
5800
5799
|
return;
|
|
5801
5800
|
}
|
|
5802
|
-
const success = await downloadCarFile(downloadUrl,
|
|
5801
|
+
const success = await downloadCarFile(downloadUrl, finalOutputPath);
|
|
5803
5802
|
if (success) {
|
|
5804
|
-
const fileSize = import_fs4.default.statSync(
|
|
5803
|
+
const fileSize = import_fs4.default.statSync(finalOutputPath).size;
|
|
5805
5804
|
const fileSizeMB = (fileSize / (1024 * 1024)).toFixed(2);
|
|
5806
5805
|
console.log(
|
|
5807
5806
|
import_chalk6.default.cyan(
|
|
@@ -5810,7 +5809,7 @@ var exportCar_default = async () => {
|
|
|
5810
5809
|
);
|
|
5811
5810
|
console.log(import_chalk6.default.green(`
|
|
5812
5811
|
\u{1F389} Export successful!`));
|
|
5813
|
-
console.log(import_chalk6.default.cyan(`File: ${
|
|
5812
|
+
console.log(import_chalk6.default.cyan(`File: ${finalOutputPath}`));
|
|
5814
5813
|
console.log(import_chalk6.default.cyan(`Size: ${fileSizeMB} MB`));
|
|
5815
5814
|
console.log(import_chalk6.default.cyan(`CID: ${cid}`));
|
|
5816
5815
|
} else {
|