pinme 2.0.0-beta.2 → 2.0.0-beta.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/dist/index.js CHANGED
@@ -1523,7 +1523,7 @@ var import_chalk21 = __toESM(require("chalk"));
1523
1523
  var import_figlet5 = __toESM(require("figlet"));
1524
1524
 
1525
1525
  // package.json
1526
- var version = "2.0.0-beta.2";
1526
+ var version = "2.0.0-beta.4";
1527
1527
 
1528
1528
  // bin/upload.ts
1529
1529
  var import_path7 = __toESM(require("path"));
@@ -5137,7 +5137,7 @@ var AUTH_FILE2 = import_path6.default.join(CONFIG_DIR2, "auth.json");
5137
5137
  var DEFAULT_OPTIONS = {
5138
5138
  apiBaseUrl: "https://pinme.dev/api/v4",
5139
5139
  webBaseUrl: process.env.PINME_WEB_URL || "http://localhost:5173",
5140
- callbackPort: 3e3,
5140
+ callbackPort: 34567,
5141
5141
  callbackPath: "/cli/callback"
5142
5142
  };
5143
5143
  var WebLoginManager = class {
@@ -5288,72 +5288,140 @@ Login failed: ${error.message}`));
5288
5288
  <head>
5289
5289
  <title>Login Success - PinMe</title>
5290
5290
  <style>
5291
+ * { margin: 0; padding: 0; box-sizing: border-box; }
5291
5292
  body {
5292
5293
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
5293
5294
  display: flex;
5294
5295
  justify-content: center;
5295
5296
  align-items: center;
5296
- height: 100vh;
5297
- margin: 0;
5298
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
5297
+ min-height: 100vh;
5298
+ background: #000;
5299
+ overflow: hidden;
5300
+ }
5301
+ .bg {
5302
+ position: fixed;
5303
+ top: 0;
5304
+ left: 0;
5305
+ width: 100%;
5306
+ height: 100%;
5307
+ background:
5308
+ radial-gradient(ellipse at 20% 80%, rgba(120, 0, 255, 0.3) 0%, transparent 50%),
5309
+ radial-gradient(ellipse at 80% 20%, rgba(0, 200, 255, 0.3) 0%, transparent 50%),
5310
+ radial-gradient(ellipse at 50% 50%, rgba(255, 0, 150, 0.15) 0%, transparent 60%);
5311
+ animation: bgPulse 6s ease-in-out infinite;
5312
+ }
5313
+ @keyframes bgPulse {
5314
+ 0%, 100% { opacity: 1; transform: scale(1); }
5315
+ 50% { opacity: 0.8; transform: scale(1.05); }
5316
+ }
5317
+ .grid {
5318
+ position: fixed;
5319
+ top: 0;
5320
+ left: 0;
5321
+ width: 200%;
5322
+ height: 200%;
5323
+ background-image:
5324
+ linear-gradient(rgba(0, 200, 255, 0.03) 1px, transparent 1px),
5325
+ linear-gradient(90deg, rgba(0, 200, 255, 0.03) 1px, transparent 1px);
5326
+ background-size: 50px 50px;
5327
+ transform: perspective(500px) rotateX(60deg) translateY(-50%) translateZ(-200px);
5328
+ animation: gridMove 20s linear infinite;
5329
+ }
5330
+ @keyframes gridMove {
5331
+ 0% { transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px); }
5332
+ 100% { transform: perspective(500px) rotateX(60deg) translateY(50px) translateZ(-200px); }
5299
5333
  }
5300
5334
  .container {
5301
- background: white;
5302
- padding: 3rem;
5303
- border-radius: 12px;
5304
- box-shadow: 0 20px 60px rgba(0,0,0,0.3);
5335
+ position: relative;
5336
+ z-index: 10;
5337
+ background: linear-gradient(135deg, rgba(20, 20, 40, 0.9) 0%, rgba(10, 10, 30, 0.95) 100%);
5338
+ padding: 3.5rem 4rem;
5339
+ border-radius: 32px;
5340
+ box-shadow:
5341
+ 0 0 60px rgba(0, 200, 255, 0.15),
5342
+ 0 25px 50px rgba(0, 0, 0, 0.5),
5343
+ inset 0 1px 0 rgba(255, 255, 255, 0.1),
5344
+ inset 0 -1px 0 rgba(0, 200, 255, 0.1);
5305
5345
  text-align: center;
5306
- max-width: 400px;
5346
+ border: 1px solid rgba(0, 200, 255, 0.2);
5347
+ max-width: 440px;
5348
+ backdrop-filter: blur(30px);
5349
+ }
5350
+ .container::before {
5351
+ content: '';
5352
+ position: absolute;
5353
+ top: -1px;
5354
+ left: -1px;
5355
+ right: -1px;
5356
+ bottom: -1px;
5357
+ border-radius: 32px;
5358
+ background: linear-gradient(135deg, rgba(0, 200, 255, 0.5), rgba(255, 0, 150, 0.5), rgba(120, 0, 255, 0.5));
5359
+ z-index: -1;
5360
+ opacity: 0.5;
5361
+ animation: borderGlow 3s ease-in-out infinite;
5362
+ }
5363
+ @keyframes borderGlow {
5364
+ 0%, 100% { opacity: 0.3; }
5365
+ 50% { opacity: 0.7; }
5307
5366
  }
5308
5367
  .success-icon {
5309
- font-size: 4rem;
5310
- margin-bottom: 1rem;
5368
+ font-size: 5rem;
5369
+ margin-bottom: 1.5rem;
5370
+ animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
5371
+ filter: drop-shadow(0 0 20px rgba(0, 200, 255, 0.5));
5372
+ }
5373
+ @keyframes bounceIn {
5374
+ 0% { transform: scale(0); opacity: 0; }
5375
+ 50% { transform: scale(1.2); }
5376
+ 100% { transform: scale(1); opacity: 1; }
5311
5377
  }
5312
5378
  h1 {
5313
- color: #1f2937;
5314
- margin: 0 0 1rem 0;
5379
+ color: #fff;
5380
+ font-size: 2.2rem;
5381
+ font-weight: 700;
5382
+ margin: 0 0 0.75rem 0;
5383
+ background: linear-gradient(90deg, #fff, #00d4ff);
5384
+ -webkit-background-clip: text;
5385
+ -webkit-text-fill-color: transparent;
5386
+ background-clip: text;
5315
5387
  }
5316
5388
  p {
5317
- color: #6b7280;
5389
+ color: rgba(255, 255, 255, 0.6);
5390
+ font-size: 1.1rem;
5318
5391
  margin: 0 0 2rem 0;
5319
- }
5320
- .close-btn {
5321
- background: #3b82f6;
5322
- color: white;
5323
- border: none;
5324
- padding: 0.75rem 2rem;
5325
- border-radius: 6px;
5326
- font-size: 1rem;
5327
- cursor: pointer;
5328
- transition: background 0.2s;
5329
- }
5330
- .close-btn:hover {
5331
- background: #2563eb;
5392
+ line-height: 1.6;
5393
+ }
5394
+ .highlight { color: #00d4ff; font-weight: 600; }
5395
+ .sparkle {
5396
+ position: absolute;
5397
+ width: 4px;
5398
+ height: 4px;
5399
+ background: #00d4ff;
5400
+ border-radius: 50%;
5401
+ animation: sparkle 2s ease-in-out infinite;
5402
+ }
5403
+ .sparkle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
5404
+ .sparkle:nth-child(2) { top: 30%; right: 15%; animation-delay: 0.5s; }
5405
+ .sparkle:nth-child(3) { bottom: 25%; left: 20%; animation-delay: 1s; }
5406
+ .sparkle:nth-child(4) { bottom: 35%; right: 10%; animation-delay: 1.5s; }
5407
+ @keyframes sparkle {
5408
+ 0%, 100% { opacity: 0; transform: scale(0); }
5409
+ 50% { opacity: 1; transform: scale(1); }
5332
5410
  }
5333
5411
  </style>
5334
5412
  </head>
5335
5413
  <body>
5414
+ <div class="bg"></div>
5415
+ <div class="grid"></div>
5336
5416
  <div class="container">
5337
- <div class="success-icon">\u2705</div>
5338
- <h1>Login Successful!</h1>
5339
- <p>You have successfully logged in to PinMe CLI.</p>
5340
- <p>You can close this window and return to the command line.</p>
5341
- <button id="closeBtn" class="close-btn">Close Window</button>
5342
- <p id="message" style="color: #6b7280; margin-top: 1rem;"></p>
5417
+ <div class="sparkle"></div>
5418
+ <div class="sparkle"></div>
5419
+ <div class="sparkle"></div>
5420
+ <div class="sparkle"></div>
5421
+ <div class="success-icon">\u{1F389}</div>
5422
+ <h1>Welcome to PinMe</h1>
5423
+ <p>You are now logged in! <span class="highlight">\u{1F680}</span><br>Return to your terminal to continue.</p>
5343
5424
  </div>
5344
- <script>
5345
- // For redirected pages, show message instead of auto-close
5346
- document.addEventListener('DOMContentLoaded', function() {
5347
- document.getElementById('closeBtn').addEventListener('click', function() {
5348
- // Try to close, fallback to showing message
5349
- try {
5350
- window.close();
5351
- } catch (e) {
5352
- document.getElementById('message').textContent = 'You can close this window manually.';
5353
- }
5354
- });
5355
- });
5356
- </script>
5357
5425
  </body>
5358
5426
  </html>`;
5359
5427
  }
@@ -5365,17 +5433,125 @@ Login failed: ${error.message}`));
5365
5433
  <head>
5366
5434
  <title>Login Failed - PinMe</title>
5367
5435
  <style>
5368
- body { font-family: sans-serif; padding: 2rem; text-align: center; background: #f3f4f6; }
5369
- .container { background: white; padding: 2rem; border-radius: 12px; max-width: 400px; margin: 0 auto; }
5370
- .error { color: #dc2626; font-size: 1.25rem; margin: 1rem 0; }
5371
- button { padding: 0.5rem 1rem; cursor: pointer; background: #3b82f6; color: white; border: none; border-radius: 6px; }
5436
+ * { margin: 0; padding: 0; box-sizing: border-box; }
5437
+ body {
5438
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
5439
+ display: flex;
5440
+ justify-content: center;
5441
+ align-items: center;
5442
+ min-height: 100vh;
5443
+ background: #000;
5444
+ overflow: hidden;
5445
+ }
5446
+ .bg {
5447
+ position: fixed;
5448
+ top: 0;
5449
+ left: 0;
5450
+ width: 100%;
5451
+ height: 100%;
5452
+ background:
5453
+ radial-gradient(ellipse at 20% 80%, rgba(255, 50, 50, 0.2) 0%, transparent 50%),
5454
+ radial-gradient(ellipse at 80% 20%, rgba(255, 100, 50, 0.2) 0%, transparent 50%),
5455
+ radial-gradient(ellipse at 50% 50%, rgba(100, 0, 50, 0.15) 0%, transparent 60%);
5456
+ animation: bgPulse 6s ease-in-out infinite;
5457
+ }
5458
+ @keyframes bgPulse {
5459
+ 0%, 100% { opacity: 1; transform: scale(1); }
5460
+ 50% { opacity: 0.8; transform: scale(1.05); }
5461
+ }
5462
+ .grid {
5463
+ position: fixed;
5464
+ top: 0;
5465
+ left: 0;
5466
+ width: 200%;
5467
+ height: 200%;
5468
+ background-image:
5469
+ linear-gradient(rgba(255, 80, 80, 0.03) 1px, transparent 1px),
5470
+ linear-gradient(90deg, rgba(255, 80, 80, 0.03) 1px, transparent 1px);
5471
+ background-size: 50px 50px;
5472
+ transform: perspective(500px) rotateX(60deg) translateY(-50%) translateZ(-200px);
5473
+ animation: gridMove 20s linear infinite;
5474
+ }
5475
+ @keyframes gridMove {
5476
+ 0% { transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px); }
5477
+ 100% { transform: perspective(500px) rotateX(60deg) translateY(50px) translateZ(-200px); }
5478
+ }
5479
+ .container {
5480
+ position: relative;
5481
+ z-index: 10;
5482
+ background: linear-gradient(135deg, rgba(40, 20, 20, 0.9) 0%, rgba(30, 10, 10, 0.95) 100%);
5483
+ padding: 3.5rem 4rem;
5484
+ border-radius: 32px;
5485
+ box-shadow:
5486
+ 0 0 60px rgba(255, 50, 50, 0.15),
5487
+ 0 25px 50px rgba(0, 0, 0, 0.5),
5488
+ inset 0 1px 0 rgba(255, 255, 255, 0.1),
5489
+ inset 0 -1px 0 rgba(255, 50, 50, 0.1);
5490
+ text-align: center;
5491
+ border: 1px solid rgba(255, 50, 50, 0.2);
5492
+ max-width: 440px;
5493
+ backdrop-filter: blur(30px);
5494
+ }
5495
+ .container::before {
5496
+ content: '';
5497
+ position: absolute;
5498
+ top: -1px;
5499
+ left: -1px;
5500
+ right: -1px;
5501
+ bottom: -1px;
5502
+ border-radius: 32px;
5503
+ background: linear-gradient(135deg, rgba(255, 50, 50, 0.5), rgba(255, 150, 50, 0.5), rgba(150, 0, 50, 0.5));
5504
+ z-index: -1;
5505
+ opacity: 0.5;
5506
+ animation: borderGlow 3s ease-in-out infinite;
5507
+ }
5508
+ @keyframes borderGlow {
5509
+ 0%, 100% { opacity: 0.3; }
5510
+ 50% { opacity: 0.7; }
5511
+ }
5512
+ .error-icon {
5513
+ font-size: 5rem;
5514
+ margin-bottom: 1.5rem;
5515
+ animation: shake 0.5s ease-in-out;
5516
+ filter: drop-shadow(0 0 20px rgba(255, 50, 50, 0.5));
5517
+ }
5518
+ @keyframes shake {
5519
+ 0%, 100% { transform: translateX(0); }
5520
+ 20% { transform: translateX(-10px) rotate(-5deg); }
5521
+ 40% { transform: translateX(10px) rotate(5deg); }
5522
+ 60% { transform: translateX(-10px) rotate(-5deg); }
5523
+ 80% { transform: translateX(10px) rotate(5deg); }
5524
+ }
5525
+ h1 {
5526
+ color: #fff;
5527
+ font-size: 2.2rem;
5528
+ font-weight: 700;
5529
+ margin: 0 0 0.75rem 0;
5530
+ background: linear-gradient(90deg, #fff, #ff5050);
5531
+ -webkit-background-clip: text;
5532
+ -webkit-text-fill-color: transparent;
5533
+ background-clip: text;
5534
+ }
5535
+ .error {
5536
+ color: #ff6b6b;
5537
+ font-size: 1rem;
5538
+ margin: 0 0 2rem 0;
5539
+ padding: 1.25rem;
5540
+ background: rgba(255, 50, 50, 0.1);
5541
+ border-radius: 16px;
5542
+ border: 1px solid rgba(255, 50, 50, 0.2);
5543
+ font-weight: 500;
5544
+ box-shadow: 0 0 20px rgba(255, 50, 50, 0.1);
5545
+ }
5372
5546
  </style>
5373
5547
  </head>
5374
5548
  <body>
5549
+ <div class="bg"></div>
5550
+ <div class="grid"></div>
5375
5551
  <div class="container">
5376
- <h2>Login Failed</h2>
5552
+ <div class="error-icon">\u{1F635}</div>
5553
+ <h1>Oops!</h1>
5377
5554
  <div class="error">${error}</div>
5378
- <button onclick="window.close()">Close</button>
5379
5555
  </div>
5380
5556
  </body>
5381
5557
  </html>`;
@@ -6933,9 +7109,11 @@ var import_chalk16 = __toESM(require("chalk"));
6933
7109
  var import_fs_extra6 = __toESM(require("fs-extra"));
6934
7110
  var import_path11 = __toESM(require("path"));
6935
7111
  var import_inquirer8 = __toESM(require("inquirer"));
7112
+ var import_child_process2 = require("child_process");
6936
7113
  var TEMPLATE_DIR = import_path11.default.join(__dirname, "../template");
6937
7114
  var PROJECT_DIR = process.cwd();
6938
- var API_BASE = "https://pinme.benny1996.win/api/v4";
7115
+ var API_BASE = "https://pinme.dev/api/v4";
7116
+ var TEMPLATE_REPO = "https://github.com/glitternetwork/pinme-worker-template.git";
6939
7117
  async function createCmd(options) {
6940
7118
  var _a, _b, _c, _d, _e, _f;
6941
7119
  try {
@@ -7011,9 +7189,20 @@ Directory "${projectName}" already exists.`));
7011
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";
7012
7190
  throw new Error(errorMsg);
7013
7191
  }
7014
- console.log(import_chalk16.default.blue("\n2. Copying template files..."));
7015
- import_fs_extra6.default.copySync(TEMPLATE_DIR, targetDir);
7016
- console.log(import_chalk16.default.green(` Template copied to: ${targetDir}`));
7192
+ console.log(import_chalk16.default.blue("\n2. Cloning template from repository..."));
7193
+ try {
7194
+ (0, import_child_process2.execSync)(`git clone --depth 1 ${TEMPLATE_REPO} ${targetDir}`, {
7195
+ stdio: "inherit"
7196
+ });
7197
+ console.log(import_chalk16.default.green(` Template cloned to: ${targetDir}`));
7198
+ const gitDir = import_path11.default.join(targetDir, ".git");
7199
+ if (import_fs_extra6.default.existsSync(gitDir)) {
7200
+ import_fs_extra6.default.removeSync(gitDir);
7201
+ console.log(import_chalk16.default.gray(" .git directory removed"));
7202
+ }
7203
+ } catch (error) {
7204
+ throw new Error(`Failed to clone template: ${error.message}`);
7205
+ }
7017
7206
  console.log(import_chalk16.default.blue("\n3. Updating configuration..."));
7018
7207
  const configPath = import_path11.default.join(targetDir, "pinme.toml");
7019
7208
  const config = import_fs_extra6.default.readFileSync(configPath, "utf-8");
@@ -7058,6 +7247,47 @@ Directory "${projectName}" already exists.`));
7058
7247
  import_fs_extra6.default.writeFileSync(envPath, envContent);
7059
7248
  console.log(import_chalk16.default.green(` Created frontend/.env file`));
7060
7249
  }
7250
+ console.log(import_chalk16.default.blue("\n4. Building frontend..."));
7251
+ try {
7252
+ (0, import_child_process2.execSync)("npm install", {
7253
+ cwd: targetDir,
7254
+ stdio: "inherit"
7255
+ });
7256
+ console.log(import_chalk16.default.green(" Root dependencies installed"));
7257
+ } catch (error) {
7258
+ console.log(import_chalk16.default.yellow(" Warning: Root dependencies install failed, continuing..."));
7259
+ }
7260
+ const frontendDir = import_path11.default.join(targetDir, "frontend");
7261
+ if (import_fs_extra6.default.existsSync(frontendDir)) {
7262
+ try {
7263
+ (0, import_child_process2.execSync)("npm install", {
7264
+ cwd: frontendDir,
7265
+ stdio: "inherit"
7266
+ });
7267
+ console.log(import_chalk16.default.green(" Frontend dependencies installed"));
7268
+ } catch (error) {
7269
+ console.log(import_chalk16.default.yellow(" Warning: Frontend dependencies install failed, continuing..."));
7270
+ }
7271
+ try {
7272
+ (0, import_child_process2.execSync)("npm run build", {
7273
+ cwd: frontendDir,
7274
+ stdio: "inherit"
7275
+ });
7276
+ console.log(import_chalk16.default.green(" Frontend built"));
7277
+ } catch (error) {
7278
+ throw new Error(`Frontend build failed: ${error.message}`);
7279
+ }
7280
+ console.log(import_chalk16.default.blue(" Uploading to IPFS..."));
7281
+ try {
7282
+ (0, import_child_process2.execSync)("pinme upload ./dist", {
7283
+ cwd: frontendDir,
7284
+ stdio: "inherit"
7285
+ });
7286
+ console.log(import_chalk16.default.green(" Frontend uploaded to IPFS"));
7287
+ } catch (error) {
7288
+ console.log(import_chalk16.default.yellow(" Warning: IPFS upload failed, you can upload manually later"));
7289
+ }
7290
+ }
7061
7291
  console.log(import_chalk16.default.green("\n\u2705 Project created successfully!"));
7062
7292
  console.log(import_chalk16.default.gray(`
7063
7293
  Project Details:`));
@@ -7066,7 +7296,7 @@ Project Details:`));
7066
7296
  console.log(import_chalk16.default.gray(`
7067
7297
  Next steps:`));
7068
7298
  console.log(import_chalk16.default.gray(` cd ${projectName}`));
7069
- console.log(import_chalk16.default.gray(` npm install`));
7299
+ console.log(import_chalk16.default.gray(` pinme save # \u9996\u6B21\u90E8\u7F72\u540E\u7AEF + \u524D\u7AEF`));
7070
7300
  process.exit(0);
7071
7301
  } catch (error) {
7072
7302
  console.error(import_chalk16.default.red(`
@@ -7079,9 +7309,9 @@ Error: ${error.message || error}`));
7079
7309
  var import_chalk17 = __toESM(require("chalk"));
7080
7310
  var import_fs_extra7 = __toESM(require("fs-extra"));
7081
7311
  var import_path12 = __toESM(require("path"));
7082
- var import_child_process2 = require("child_process");
7312
+ var import_child_process3 = require("child_process");
7083
7313
  var PROJECT_DIR2 = process.cwd();
7084
- var API_BASE2 = "https://pinme.benny1996.win/api/v4";
7314
+ var API_BASE2 = "https://pinme.dev/api/v4";
7085
7315
  function loadConfig() {
7086
7316
  const configPath = import_path12.default.join(PROJECT_DIR2, "pinme.toml");
7087
7317
  if (!import_fs_extra7.default.existsSync(configPath)) {
@@ -7104,7 +7334,7 @@ function getMetadata() {
7104
7334
  function buildWorker() {
7105
7335
  console.log(import_chalk17.default.blue("Building worker..."));
7106
7336
  try {
7107
- (0, import_child_process2.execSync)("npm run build:worker", {
7337
+ (0, import_child_process3.execSync)("npm run build:worker", {
7108
7338
  cwd: PROJECT_DIR2,
7109
7339
  stdio: "inherit"
7110
7340
  });
@@ -7116,7 +7346,7 @@ function buildWorker() {
7116
7346
  function installDependencies() {
7117
7347
  console.log(import_chalk17.default.blue("Installing dependencies..."));
7118
7348
  try {
7119
- (0, import_child_process2.execSync)("npm install", {
7349
+ (0, import_child_process3.execSync)("npm install", {
7120
7350
  cwd: PROJECT_DIR2,
7121
7351
  stdio: "inherit"
7122
7352
  });
@@ -7127,7 +7357,7 @@ function installDependencies() {
7127
7357
  const backendDir = import_path12.default.join(PROJECT_DIR2, "backend");
7128
7358
  if (import_fs_extra7.default.existsSync(import_path12.default.join(backendDir, "package.json"))) {
7129
7359
  try {
7130
- (0, import_child_process2.execSync)("npm install", {
7360
+ (0, import_child_process3.execSync)("npm install", {
7131
7361
  cwd: backendDir,
7132
7362
  stdio: "inherit"
7133
7363
  });
@@ -7139,7 +7369,7 @@ function installDependencies() {
7139
7369
  const frontendDir = import_path12.default.join(PROJECT_DIR2, "frontend");
7140
7370
  if (import_fs_extra7.default.existsSync(import_path12.default.join(frontendDir, "package.json"))) {
7141
7371
  try {
7142
- (0, import_child_process2.execSync)("npm install", {
7372
+ (0, import_child_process3.execSync)("npm install", {
7143
7373
  cwd: frontendDir,
7144
7374
  stdio: "inherit"
7145
7375
  });
@@ -7168,7 +7398,7 @@ function getBuiltWorker() {
7168
7398
  return { workerJsPath, modulePaths };
7169
7399
  }
7170
7400
  function getSqlFiles() {
7171
- const sqlDir = import_path12.default.join(PROJECT_DIR2, "backend", "schema");
7401
+ const sqlDir = import_path12.default.join(PROJECT_DIR2, "db");
7172
7402
  if (!import_fs_extra7.default.existsSync(sqlDir)) {
7173
7403
  return [];
7174
7404
  }
@@ -7237,7 +7467,7 @@ async function saveWorker(workerJsPath, modulePaths, sqlFiles, metadata, project
7237
7467
  function buildFrontend() {
7238
7468
  console.log(import_chalk17.default.blue("Building frontend..."));
7239
7469
  try {
7240
- (0, import_child_process2.execSync)("npm run build:frontend", {
7470
+ (0, import_child_process3.execSync)("npm run build:frontend", {
7241
7471
  cwd: PROJECT_DIR2,
7242
7472
  stdio: "inherit"
7243
7473
  });
@@ -7249,7 +7479,7 @@ function buildFrontend() {
7249
7479
  function deployFrontend() {
7250
7480
  console.log(import_chalk17.default.blue("Deploying frontend to IPFS..."));
7251
7481
  try {
7252
- (0, import_child_process2.execSync)("pinme upload ./frontend/dist", {
7482
+ (0, import_child_process3.execSync)("pinme upload ./frontend/dist", {
7253
7483
  cwd: PROJECT_DIR2,
7254
7484
  stdio: "inherit"
7255
7485
  });
@@ -7309,7 +7539,7 @@ var import_chalk18 = __toESM(require("chalk"));
7309
7539
  var import_fs_extra8 = __toESM(require("fs-extra"));
7310
7540
  var import_path13 = __toESM(require("path"));
7311
7541
  var PROJECT_DIR3 = process.cwd();
7312
- var API_BASE3 = "https://pinme.benny1996.win/api/v4";
7542
+ var API_BASE3 = "https://pinme.dev/api/v4";
7313
7543
  function loadConfig2() {
7314
7544
  const configPath = import_path13.default.join(PROJECT_DIR3, "pinme.toml");
7315
7545
  if (!import_fs_extra8.default.existsSync(configPath)) {
@@ -7322,13 +7552,13 @@ function loadConfig2() {
7322
7552
  };
7323
7553
  }
7324
7554
  function getSqlFiles2() {
7325
- const sqlDir = import_path13.default.join(PROJECT_DIR3, "backend", "schema");
7555
+ const sqlDir = import_path13.default.join(PROJECT_DIR3, "db");
7326
7556
  if (!import_fs_extra8.default.existsSync(sqlDir)) {
7327
- throw new Error("SQL directory not found: backend/schema");
7557
+ throw new Error("SQL directory not found: db");
7328
7558
  }
7329
7559
  const files = import_fs_extra8.default.readdirSync(sqlDir).filter((f) => f.endsWith(".sql")).sort();
7330
7560
  if (files.length === 0) {
7331
- throw new Error("No SQL files found in backend/schema");
7561
+ throw new Error("No SQL files found in db");
7332
7562
  }
7333
7563
  return files.map((f) => import_path13.default.join(sqlDir, f));
7334
7564
  }
@@ -7409,7 +7639,7 @@ async function updateDbCmd(options) {
7409
7639
  }
7410
7640
  console.log(import_chalk18.default.gray(`Project: ${projectName}`));
7411
7641
  const sqlFiles = getSqlFiles2();
7412
- console.log(import_chalk18.default.gray(`Found ${sqlFiles.length} SQL file(s) in backend/schema`));
7642
+ console.log(import_chalk18.default.gray(`Found ${sqlFiles.length} SQL file(s) in db`));
7413
7643
  await updateDb(sqlFiles, projectName);
7414
7644
  console.log(import_chalk18.default.green("\n\u2705 Database update complete!"));
7415
7645
  process.exit(0);
@@ -7424,9 +7654,9 @@ async function updateDbCmd(options) {
7424
7654
  var import_chalk19 = __toESM(require("chalk"));
7425
7655
  var import_fs_extra9 = __toESM(require("fs-extra"));
7426
7656
  var import_path14 = __toESM(require("path"));
7427
- var import_child_process3 = require("child_process");
7657
+ var import_child_process4 = require("child_process");
7428
7658
  var PROJECT_DIR4 = process.cwd();
7429
- var API_BASE4 = "https://pinme.benny1996.win/api/v4";
7659
+ var API_BASE4 = "https://pinme.dev/api/v4";
7430
7660
  function loadConfig3() {
7431
7661
  const configPath = import_path14.default.join(PROJECT_DIR4, "pinme.toml");
7432
7662
  if (!import_fs_extra9.default.existsSync(configPath)) {
@@ -7448,7 +7678,7 @@ function getMetadata2() {
7448
7678
  function buildWorker2() {
7449
7679
  console.log(import_chalk19.default.blue("Building worker..."));
7450
7680
  try {
7451
- (0, import_child_process3.execSync)("npm run build:worker", {
7681
+ (0, import_child_process4.execSync)("npm run build:worker", {
7452
7682
  cwd: PROJECT_DIR4,
7453
7683
  stdio: "inherit"
7454
7684
  });
@@ -7588,7 +7818,7 @@ async function updateWorkerCmd(options) {
7588
7818
  var import_chalk20 = __toESM(require("chalk"));
7589
7819
  var import_fs_extra10 = __toESM(require("fs-extra"));
7590
7820
  var import_path15 = __toESM(require("path"));
7591
- var import_child_process4 = require("child_process");
7821
+ var import_child_process5 = require("child_process");
7592
7822
  var PROJECT_DIR5 = process.cwd();
7593
7823
  function loadConfig4() {
7594
7824
  const configPath = import_path15.default.join(PROJECT_DIR5, "pinme.toml");
@@ -7604,7 +7834,7 @@ function loadConfig4() {
7604
7834
  function buildFrontend2() {
7605
7835
  console.log(import_chalk20.default.blue("Building frontend..."));
7606
7836
  try {
7607
- (0, import_child_process4.execSync)("npm run build:frontend", {
7837
+ (0, import_child_process5.execSync)("npm run build:frontend", {
7608
7838
  cwd: PROJECT_DIR5,
7609
7839
  stdio: "inherit"
7610
7840
  });
@@ -7616,7 +7846,7 @@ function buildFrontend2() {
7616
7846
  function deployFrontend2() {
7617
7847
  console.log(import_chalk20.default.blue("Deploying frontend to IPFS..."));
7618
7848
  try {
7619
- (0, import_child_process4.execSync)("pinme upload ./frontend/dist", {
7849
+ (0, import_child_process5.execSync)("pinme upload ./frontend/dist", {
7620
7850
  cwd: PROJECT_DIR5,
7621
7851
  stdio: "inherit"
7622
7852
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinme",
3
- "version": "2.0.0-beta.2",
3
+ "version": "2.0.0-beta.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -15,8 +15,7 @@
15
15
  "pinme": "./dist/index.js"
16
16
  },
17
17
  "files": [
18
- "dist",
19
- "template"
18
+ "dist"
20
19
  ],
21
20
  "keywords": [
22
21
  "ipfs",