pinme 2.0.0-beta.6 → 2.0.0-beta.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.
Files changed (3) hide show
  1. package/README.md +14 -14
  2. package/dist/index.js +39 -46
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <a href="https://pinme.eth.limo/">
2
+ <a href="https://pinme.dev/">
3
3
  <img src="https://2egc5b44.pinit.eth.limo/" height="92">
4
4
  <h3 align="center">PinMe</h3>
5
5
  </a>
@@ -13,7 +13,7 @@
13
13
 
14
14
  # PinMe
15
15
 
16
- [PinMe](https://pinme.eth.limo/) is a zero-config frontend deployment tool.
16
+ [PinMe](https://pinme.dev/) is a zero-config frontend deployment tool.
17
17
  No servers. No accounts. No setup.
18
18
 
19
19
  Build a static site, generate a page with AI, export your frontend, or import CAR files — then deploy instantly with a single command.
@@ -23,7 +23,7 @@ PinMe publishes your site as verifiable content, making silent tampering and acc
23
23
  You don’t manage servers, regions, or uptime.
24
24
  PinMe handles availability and persistence for you.
25
25
 
26
- Website: [https://pinme.eth.limo/](https://pinme.eth.limo/)
26
+ Website: [https://pinme.dev/](https://pinme.dev/)
27
27
 
28
28
  ---
29
29
 
@@ -79,7 +79,7 @@ pinme upload dist
79
79
  pinme upload build
80
80
  ```
81
81
 
82
- That's it! You'll get a preview URL like `https://pinme.eth.limo/#/preview/*`
82
+ That's it! You'll get a preview URL like `https://pinme.dev/#/preview/*`
83
83
 
84
84
  ---
85
85
 
@@ -130,7 +130,7 @@ This section provides AI-specific instructions for deploying websites using PinM
130
130
  ```
131
131
 
132
132
  6. **Return Result**
133
- - Only return final preview page URL: `https://pinme.eth.limo/#/preview/*`
133
+ - Only return final preview page URL: `https://pinme.dev/#/preview/*`
134
134
  - Do not output additional logs or intermediate steps
135
135
 
136
136
  #### Prohibited Operations
@@ -161,7 +161,7 @@ For easy AI tool parsing:
161
161
  "total_directory": "1GB"
162
162
  },
163
163
  "output": "preview_url",
164
- "preview_url_format": "https://pinme.eth.limo/#/preview/*",
164
+ "preview_url_format": "https://pinme.dev/#/preview/*",
165
165
  "fixed_domain_format": "https://*.pinit.eth.limo",
166
166
  "other_commands": {
167
167
  "version": "pinme --version",
@@ -188,7 +188,7 @@ For easy AI tool parsing:
188
188
  > 2. Check if pinme is installed, install if not
189
189
  > 3. Identify the static file directory for the website to deploy
190
190
  > 4. Execute deployment command
191
- > 5. Return preview page link: `https://pinme.eth.limo/#/preview/*`
191
+ > 5. Return preview page link: `https://pinme.dev/#/preview/*`
192
192
 
193
193
  ---
194
194
 
@@ -409,7 +409,7 @@ pinme bind ./dist --domain my-site --dns
409
409
  - DNS domain: `https://<your-domain>`
410
410
 
411
411
  **DNS Setup:**
412
- After successful DNS domain binding, visit the [DNS Configuration Guide](https://pinme.eth.limo/#/docs?id=custom-domain) to complete DNS setup.
412
+ After successful DNS domain binding, visit the [DNS Configuration Guide](https://pinme.dev/#/docs?id=custom-domain) to complete DNS setup.
413
413
 
414
414
  ### `upload`
415
415
 
@@ -535,7 +535,7 @@ Set AppKey for authentication and automatically merge anonymous upload history t
535
535
  pinme set-appkey [AppKey]
536
536
  ```
537
537
 
538
- **Note:** Fixed domain binding requires AppKey and Plus membership. Get your AppKey from [PinMe website](https://pinme.eth.limo/).
538
+ **Note:** Fixed domain binding requires AppKey and Plus membership. Get your AppKey from [PinMe website](https://pinme.dev/).
539
539
 
540
540
  ### `show-appkey` / `appkey`
541
541
 
@@ -574,7 +574,7 @@ Domain binding (both Pinme subdomains and custom DNS domains) requires VIP membe
574
574
  **Before using domain binding:**
575
575
 
576
576
  1. **Upgrade to VIP**
577
- - Visit [PinMe website](https://pinme.eth.limo/) to upgrade
577
+ - Visit [PinMe website](https://pinme.dev/) to upgrade
578
578
 
579
579
  2. **Set AppKey**
580
580
  ```bash
@@ -592,7 +592,7 @@ Domain binding (both Pinme subdomains and custom DNS domains) requires VIP membe
592
592
 
593
593
  ### Checking VIP Status
594
594
 
595
- If you attempt to bind a domain without VIP, you'll see an error message. You can check your VIP status on the [PinMe website](https://pinme.eth.limo/).
595
+ If you attempt to bind a domain without VIP, you'll see an error message. You can check your VIP status on the [PinMe website](https://pinme.dev/).
596
596
 
597
597
  ---
598
598
 
@@ -649,7 +649,7 @@ Uploaded files are stored on the IPFS network and accessible through the Glitter
649
649
 
650
650
  **After successful upload, you receive:**
651
651
  1. IPFS content hash
652
- 2. Preview page URL: `https://pinme.eth.limo/#/preview/*`
652
+ 2. Preview page URL: `https://pinme.dev/#/preview/*`
653
653
  3. Fixed domain option: `https://*.pinit.eth.limo`
654
654
 
655
655
  ### Log Locations
@@ -662,7 +662,7 @@ Uploaded files are stored on the IPFS network and accessible through the Glitter
662
662
  ## PinMe Platform Features
663
663
 
664
664
  ### Preview Page
665
- - Access uploaded website via preview link: `https://pinme.eth.limo/#/preview/*`
665
+ - Access uploaded website via preview link: `https://pinme.dev/#/preview/*`
666
666
  - Get fixed domain: `https://*.pinit.eth.limo`
667
667
 
668
668
  ### Login and Management
@@ -832,7 +832,7 @@ If you have questions or suggestions, please contact us through:
832
832
 
833
833
  - GitHub Issues: [https://github.com/glitternetwork/pinme/issues](https://github.com/glitternetwork/pinme/issues)
834
834
  - Email: [pinme@glitterprotocol.io](mailto:pinme@glitterprotocol.io)
835
- - Website: [https://pinme.eth.limo/](https://pinme.eth.limo/)
835
+ - Website: [https://pinme.dev/](https://pinme.dev/)
836
836
 
837
837
  ---
838
838
 
package/dist/index.js CHANGED
@@ -1523,7 +1523,7 @@ var import_chalk22 = __toESM(require("chalk"));
1523
1523
  var import_figlet5 = __toESM(require("figlet"));
1524
1524
 
1525
1525
  // package.json
1526
- var version = "2.0.0-beta.6";
1526
+ var version = "2.0.0-beta.7";
1527
1527
 
1528
1528
  // bin/upload.ts
1529
1529
  var import_path7 = __toESM(require("path"));
@@ -5957,7 +5957,7 @@ async function bindDomain(domain, contentHash, isDns, authConfig) {
5957
5957
  }
5958
5958
  console.log(import_chalk5.default.green(`DNS bind success: ${displayDomain}`));
5959
5959
  console.log(import_chalk5.default.white(`Visit: https://${displayDomain}`));
5960
- console.log(import_chalk5.default.cyan("\n\u{1F4DA} DNS Setup Guide: https://pinme.eth.limo/#/docs?id=custom-domain"));
5960
+ console.log(import_chalk5.default.cyan("\n\u{1F4DA} DNS Setup Guide: https://pinme.dev/#/docs?id=custom-domain"));
5961
5961
  } else {
5962
5962
  console.log(import_chalk5.default.blue("Binding Pinme subdomain..."));
5963
5963
  const ok = await bindPinmeDomain(displayDomain, contentHash);
@@ -7039,7 +7039,7 @@ async function bindCmd() {
7039
7039
  }
7040
7040
  console.log(import_chalk14.default.green(`DNS bind success: ${displayDomain}`));
7041
7041
  console.log(import_chalk14.default.white(`Visit: https://${displayDomain}`));
7042
- console.log(import_chalk14.default.cyan("\n\u{1F4DA} DNS Setup Guide: https://pinme.eth.limo/#/docs?id=custom-domain"));
7042
+ console.log(import_chalk14.default.cyan("\n\u{1F4DA} DNS Setup Guide: https://pinme.dev/#/docs?id=custom-domain"));
7043
7043
  } else {
7044
7044
  console.log(import_chalk14.default.blue("Binding Pinme subdomain..."));
7045
7045
  const ok = await bindPinmeDomain(displayDomain, up.contentHash);
@@ -7066,7 +7066,7 @@ var import_chalk15 = __toESM(require("chalk"));
7066
7066
  var ENV_URLS = {
7067
7067
  dev: "http://localhost:5173",
7068
7068
  test: "http://test-pinme.pinit.eth.limo",
7069
- prod: "https://pinme.eth.limo"
7069
+ prod: "https://pinme.dev"
7070
7070
  };
7071
7071
  async function loginCmd(options = {}) {
7072
7072
  try {
@@ -7112,7 +7112,8 @@ var import_inquirer8 = __toESM(require("inquirer"));
7112
7112
  var import_child_process2 = require("child_process");
7113
7113
  var PROJECT_DIR = process.cwd();
7114
7114
  var API_BASE = "https://pinme.dev/api/v4";
7115
- var TEMPLATE_REPO = "https://github.com/glitternetwork/pinme-worker-template.git";
7115
+ var TEMPLATE_REPO = "glitternetwork/pinme-worker-template";
7116
+ var TEMPLATE_ZIP_URL = `https://github.com/${TEMPLATE_REPO}/archive/refs/heads/main.zip`;
7116
7117
  async function createCmd(options) {
7117
7118
  var _a, _b, _c, _d, _e, _f;
7118
7119
  try {
@@ -7188,19 +7189,42 @@ Directory "${projectName}" already exists.`));
7188
7189
  const errorMsg = ((_d = (_c = (_b = error.response) == null ? void 0 : _b.data) == null ? void 0 : _c.data) == null ? void 0 : _d.error) || ((_f = (_e = error.response) == null ? void 0 : _e.data) == null ? void 0 : _f.msg) || error.message || "Failed to create worker";
7189
7190
  throw new Error(errorMsg);
7190
7191
  }
7191
- console.log(import_chalk16.default.blue("\n2. Cloning template from repository..."));
7192
+ console.log(import_chalk16.default.blue("\n2. Downloading template from repository..."));
7193
+ const zipPath = import_path11.default.join(PROJECT_DIR, "template.zip");
7194
+ let downloadSuccess = false;
7195
+ for (let attempt = 1; attempt <= 3 && !downloadSuccess; attempt++) {
7196
+ try {
7197
+ console.log(import_chalk16.default.gray(` Download attempt ${attempt}/3...`));
7198
+ (0, import_child_process2.execSync)(`curl -L --retry 3 --retry-delay 2 -o "${zipPath}" "${TEMPLATE_ZIP_URL}"`, {
7199
+ stdio: "inherit"
7200
+ });
7201
+ if (!import_fs_extra6.default.existsSync(zipPath) || import_fs_extra6.default.statSync(zipPath).size < 100) {
7202
+ throw new Error("Downloaded file is too small or empty");
7203
+ }
7204
+ downloadSuccess = true;
7205
+ } catch (downloadError) {
7206
+ console.log(import_chalk16.default.yellow(` Attempt ${attempt} failed: ${downloadError.message}`));
7207
+ if (import_fs_extra6.default.existsSync(zipPath)) {
7208
+ import_fs_extra6.default.removeSync(zipPath);
7209
+ }
7210
+ if (attempt === 3) {
7211
+ throw new Error(`Failed to download template after 3 attempts: ${downloadError.message}`);
7212
+ }
7213
+ }
7214
+ }
7192
7215
  try {
7193
- (0, import_child_process2.execSync)(`git clone --depth 1 ${TEMPLATE_REPO} ${targetDir}`, {
7216
+ (0, import_child_process2.execSync)(`unzip -o "${zipPath}" -d "${PROJECT_DIR}"`, {
7194
7217
  stdio: "inherit"
7195
7218
  });
7196
- console.log(import_chalk16.default.green(` Template cloned to: ${targetDir}`));
7197
- const gitDir = import_path11.default.join(targetDir, ".git");
7198
- if (import_fs_extra6.default.existsSync(gitDir)) {
7199
- import_fs_extra6.default.removeSync(gitDir);
7200
- console.log(import_chalk16.default.gray(" .git directory removed"));
7219
+ const subDir = import_path11.default.join(PROJECT_DIR, "pinme-worker-template-main");
7220
+ if (import_fs_extra6.default.existsSync(subDir)) {
7221
+ import_fs_extra6.default.copySync(subDir, targetDir);
7222
+ import_fs_extra6.default.removeSync(subDir);
7201
7223
  }
7224
+ import_fs_extra6.default.removeSync(zipPath);
7225
+ console.log(import_chalk16.default.green(` Template downloaded to: ${targetDir}`));
7202
7226
  } catch (error) {
7203
- throw new Error(`Failed to clone template: ${error.message}`);
7227
+ throw new Error(`Failed to extract template: ${error.message}`);
7204
7228
  }
7205
7229
  console.log(import_chalk16.default.blue("\n3. Updating configuration..."));
7206
7230
  const configPath = import_path11.default.join(targetDir, "pinme.toml");
@@ -7209,29 +7233,6 @@ Directory "${projectName}" already exists.`));
7209
7233
  /project_name = ".*"/,
7210
7234
  `project_name = "${workerData.project_name}"`
7211
7235
  );
7212
- updatedConfig = updatedConfig.replace(
7213
- /^VITE_WORKER_URL = ".*"$/m,
7214
- `VITE_WORKER_URL = "${workerData.api_domain}"`
7215
- );
7216
- updatedConfig = updatedConfig.replace(
7217
- /# database_id = ".*"/,
7218
- `database_id = "${workerData.uuid}"`
7219
- );
7220
- if (workerData.api_key) {
7221
- console.log(import_chalk16.default.gray(` API Key: ${workerData.api_key.slice(0, 8)}...`));
7222
- updatedConfig = updatedConfig.replace(
7223
- /^# api_key = ".*"$/m,
7224
- `api_key = "${workerData.api_key}"`
7225
- );
7226
- if (!updatedConfig.includes(`api_key = "${workerData.api_key}"`)) {
7227
- updatedConfig = updatedConfig.replace(
7228
- /^api_key = ".*"$/m,
7229
- `api_key = "${workerData.api_key}"`
7230
- );
7231
- }
7232
- } else {
7233
- console.log(import_chalk16.default.yellow(" Warning: No API Key returned from API"));
7234
- }
7235
7236
  import_fs_extra6.default.writeFileSync(configPath, updatedConfig);
7236
7237
  console.log(import_chalk16.default.green(` Updated pinme.toml`));
7237
7238
  console.log(import_chalk16.default.gray(` metadata: ${workerData.metadata}`));
@@ -7249,8 +7250,8 @@ Directory "${projectName}" already exists.`));
7249
7250
  if (import_fs_extra6.default.existsSync(wranglerPath) && workerData.api_key) {
7250
7251
  let wranglerContent = import_fs_extra6.default.readFileSync(wranglerPath, "utf-8");
7251
7252
  wranglerContent = wranglerContent.replace(
7252
- /^API_KEY = ".*"$/m,
7253
- `API_KEY = "${workerData.api_key}"`
7253
+ /^name = ".*"$/m,
7254
+ `name = "${workerData.project_name}"`
7254
7255
  );
7255
7256
  import_fs_extra6.default.writeFileSync(wranglerPath, wranglerContent);
7256
7257
  console.log(import_chalk16.default.green(` Updated backend/wrangler.toml API_KEY`));
@@ -7260,18 +7261,10 @@ Directory "${projectName}" already exists.`));
7260
7261
  if (import_fs_extra6.default.existsSync(envExamplePath)) {
7261
7262
  let envContent = import_fs_extra6.default.readFileSync(envExamplePath, "utf-8");
7262
7263
  envContent = envContent.replace(/your-project/g, workerData.project_name);
7263
- envContent = envContent.replace(
7264
- /^VITE_WORKER_URL=.*$/m,
7265
- `VITE_WORKER_URL=${workerData.api_domain}`
7266
- );
7267
7264
  envContent = envContent.replace(
7268
7265
  /^VITE_API_URL=.*$/m,
7269
7266
  `VITE_API_URL=${workerData.api_domain}`
7270
7267
  );
7271
- envContent = envContent.replace(
7272
- /^VITE_API_URL=.*$/m,
7273
- `VITE_API_KEY=${workerData.api_key}`
7274
- );
7275
7268
  import_fs_extra6.default.writeFileSync(envPath, envContent);
7276
7269
  console.log(import_chalk16.default.green(` Created frontend/.env file`));
7277
7270
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinme",
3
- "version": "2.0.0-beta.6",
3
+ "version": "2.0.0-beta.7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },