pinme 2.0.0-beta.1 → 2.0.0-beta.3

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 (2) hide show
  1. package/dist/index.js +289 -71
  2. package/package.json +1 -1
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.1";
1526
+ var version = "2.0.0-beta.3";
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,10 @@ 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";
6939
7116
  async function createCmd(options) {
6940
7117
  var _a, _b, _c, _d, _e, _f;
6941
7118
  try {
@@ -7058,6 +7235,47 @@ Directory "${projectName}" already exists.`));
7058
7235
  import_fs_extra6.default.writeFileSync(envPath, envContent);
7059
7236
  console.log(import_chalk16.default.green(` Created frontend/.env file`));
7060
7237
  }
7238
+ console.log(import_chalk16.default.blue("\n4. Building frontend..."));
7239
+ try {
7240
+ (0, import_child_process2.execSync)("npm install", {
7241
+ cwd: targetDir,
7242
+ stdio: "inherit"
7243
+ });
7244
+ console.log(import_chalk16.default.green(" Root dependencies installed"));
7245
+ } catch (error) {
7246
+ console.log(import_chalk16.default.yellow(" Warning: Root dependencies install failed, continuing..."));
7247
+ }
7248
+ const frontendDir = import_path11.default.join(targetDir, "frontend");
7249
+ if (import_fs_extra6.default.existsSync(frontendDir)) {
7250
+ try {
7251
+ (0, import_child_process2.execSync)("npm install", {
7252
+ cwd: frontendDir,
7253
+ stdio: "inherit"
7254
+ });
7255
+ console.log(import_chalk16.default.green(" Frontend dependencies installed"));
7256
+ } catch (error) {
7257
+ console.log(import_chalk16.default.yellow(" Warning: Frontend dependencies install failed, continuing..."));
7258
+ }
7259
+ try {
7260
+ (0, import_child_process2.execSync)("npm run build", {
7261
+ cwd: frontendDir,
7262
+ stdio: "inherit"
7263
+ });
7264
+ console.log(import_chalk16.default.green(" Frontend built"));
7265
+ } catch (error) {
7266
+ throw new Error(`Frontend build failed: ${error.message}`);
7267
+ }
7268
+ console.log(import_chalk16.default.blue(" Uploading to IPFS..."));
7269
+ try {
7270
+ (0, import_child_process2.execSync)("pinme upload ./dist", {
7271
+ cwd: frontendDir,
7272
+ stdio: "inherit"
7273
+ });
7274
+ console.log(import_chalk16.default.green(" Frontend uploaded to IPFS"));
7275
+ } catch (error) {
7276
+ console.log(import_chalk16.default.yellow(" Warning: IPFS upload failed, you can upload manually later"));
7277
+ }
7278
+ }
7061
7279
  console.log(import_chalk16.default.green("\n\u2705 Project created successfully!"));
7062
7280
  console.log(import_chalk16.default.gray(`
7063
7281
  Project Details:`));
@@ -7066,7 +7284,7 @@ Project Details:`));
7066
7284
  console.log(import_chalk16.default.gray(`
7067
7285
  Next steps:`));
7068
7286
  console.log(import_chalk16.default.gray(` cd ${projectName}`));
7069
- console.log(import_chalk16.default.gray(` npm install`));
7287
+ console.log(import_chalk16.default.gray(` pinme save # \u9996\u6B21\u90E8\u7F72\u540E\u7AEF + \u524D\u7AEF`));
7070
7288
  process.exit(0);
7071
7289
  } catch (error) {
7072
7290
  console.error(import_chalk16.default.red(`
@@ -7079,9 +7297,9 @@ Error: ${error.message || error}`));
7079
7297
  var import_chalk17 = __toESM(require("chalk"));
7080
7298
  var import_fs_extra7 = __toESM(require("fs-extra"));
7081
7299
  var import_path12 = __toESM(require("path"));
7082
- var import_child_process2 = require("child_process");
7300
+ var import_child_process3 = require("child_process");
7083
7301
  var PROJECT_DIR2 = process.cwd();
7084
- var API_BASE2 = "https://pinme.benny1996.win/api/v4";
7302
+ var API_BASE2 = "https://pinme.dev/api/v4";
7085
7303
  function loadConfig() {
7086
7304
  const configPath = import_path12.default.join(PROJECT_DIR2, "pinme.toml");
7087
7305
  if (!import_fs_extra7.default.existsSync(configPath)) {
@@ -7104,7 +7322,7 @@ function getMetadata() {
7104
7322
  function buildWorker() {
7105
7323
  console.log(import_chalk17.default.blue("Building worker..."));
7106
7324
  try {
7107
- (0, import_child_process2.execSync)("npm run build:worker", {
7325
+ (0, import_child_process3.execSync)("npm run build:worker", {
7108
7326
  cwd: PROJECT_DIR2,
7109
7327
  stdio: "inherit"
7110
7328
  });
@@ -7116,7 +7334,7 @@ function buildWorker() {
7116
7334
  function installDependencies() {
7117
7335
  console.log(import_chalk17.default.blue("Installing dependencies..."));
7118
7336
  try {
7119
- (0, import_child_process2.execSync)("npm install", {
7337
+ (0, import_child_process3.execSync)("npm install", {
7120
7338
  cwd: PROJECT_DIR2,
7121
7339
  stdio: "inherit"
7122
7340
  });
@@ -7127,7 +7345,7 @@ function installDependencies() {
7127
7345
  const backendDir = import_path12.default.join(PROJECT_DIR2, "backend");
7128
7346
  if (import_fs_extra7.default.existsSync(import_path12.default.join(backendDir, "package.json"))) {
7129
7347
  try {
7130
- (0, import_child_process2.execSync)("npm install", {
7348
+ (0, import_child_process3.execSync)("npm install", {
7131
7349
  cwd: backendDir,
7132
7350
  stdio: "inherit"
7133
7351
  });
@@ -7139,7 +7357,7 @@ function installDependencies() {
7139
7357
  const frontendDir = import_path12.default.join(PROJECT_DIR2, "frontend");
7140
7358
  if (import_fs_extra7.default.existsSync(import_path12.default.join(frontendDir, "package.json"))) {
7141
7359
  try {
7142
- (0, import_child_process2.execSync)("npm install", {
7360
+ (0, import_child_process3.execSync)("npm install", {
7143
7361
  cwd: frontendDir,
7144
7362
  stdio: "inherit"
7145
7363
  });
@@ -7237,7 +7455,7 @@ async function saveWorker(workerJsPath, modulePaths, sqlFiles, metadata, project
7237
7455
  function buildFrontend() {
7238
7456
  console.log(import_chalk17.default.blue("Building frontend..."));
7239
7457
  try {
7240
- (0, import_child_process2.execSync)("npm run build:frontend", {
7458
+ (0, import_child_process3.execSync)("npm run build:frontend", {
7241
7459
  cwd: PROJECT_DIR2,
7242
7460
  stdio: "inherit"
7243
7461
  });
@@ -7249,7 +7467,7 @@ function buildFrontend() {
7249
7467
  function deployFrontend() {
7250
7468
  console.log(import_chalk17.default.blue("Deploying frontend to IPFS..."));
7251
7469
  try {
7252
- (0, import_child_process2.execSync)("pinme upload ./frontend/dist", {
7470
+ (0, import_child_process3.execSync)("pinme upload ./frontend/dist", {
7253
7471
  cwd: PROJECT_DIR2,
7254
7472
  stdio: "inherit"
7255
7473
  });
@@ -7309,7 +7527,7 @@ var import_chalk18 = __toESM(require("chalk"));
7309
7527
  var import_fs_extra8 = __toESM(require("fs-extra"));
7310
7528
  var import_path13 = __toESM(require("path"));
7311
7529
  var PROJECT_DIR3 = process.cwd();
7312
- var API_BASE3 = "https://pinme.benny1996.win/api/v4";
7530
+ var API_BASE3 = "https://pinme.dev/api/v4";
7313
7531
  function loadConfig2() {
7314
7532
  const configPath = import_path13.default.join(PROJECT_DIR3, "pinme.toml");
7315
7533
  if (!import_fs_extra8.default.existsSync(configPath)) {
@@ -7424,9 +7642,9 @@ async function updateDbCmd(options) {
7424
7642
  var import_chalk19 = __toESM(require("chalk"));
7425
7643
  var import_fs_extra9 = __toESM(require("fs-extra"));
7426
7644
  var import_path14 = __toESM(require("path"));
7427
- var import_child_process3 = require("child_process");
7645
+ var import_child_process4 = require("child_process");
7428
7646
  var PROJECT_DIR4 = process.cwd();
7429
- var API_BASE4 = "https://pinme.benny1996.win/api/v4";
7647
+ var API_BASE4 = "https://pinme.dev/api/v4";
7430
7648
  function loadConfig3() {
7431
7649
  const configPath = import_path14.default.join(PROJECT_DIR4, "pinme.toml");
7432
7650
  if (!import_fs_extra9.default.existsSync(configPath)) {
@@ -7448,7 +7666,7 @@ function getMetadata2() {
7448
7666
  function buildWorker2() {
7449
7667
  console.log(import_chalk19.default.blue("Building worker..."));
7450
7668
  try {
7451
- (0, import_child_process3.execSync)("npm run build:worker", {
7669
+ (0, import_child_process4.execSync)("npm run build:worker", {
7452
7670
  cwd: PROJECT_DIR4,
7453
7671
  stdio: "inherit"
7454
7672
  });
@@ -7588,7 +7806,7 @@ async function updateWorkerCmd(options) {
7588
7806
  var import_chalk20 = __toESM(require("chalk"));
7589
7807
  var import_fs_extra10 = __toESM(require("fs-extra"));
7590
7808
  var import_path15 = __toESM(require("path"));
7591
- var import_child_process4 = require("child_process");
7809
+ var import_child_process5 = require("child_process");
7592
7810
  var PROJECT_DIR5 = process.cwd();
7593
7811
  function loadConfig4() {
7594
7812
  const configPath = import_path15.default.join(PROJECT_DIR5, "pinme.toml");
@@ -7604,7 +7822,7 @@ function loadConfig4() {
7604
7822
  function buildFrontend2() {
7605
7823
  console.log(import_chalk20.default.blue("Building frontend..."));
7606
7824
  try {
7607
- (0, import_child_process4.execSync)("npm run build:frontend", {
7825
+ (0, import_child_process5.execSync)("npm run build:frontend", {
7608
7826
  cwd: PROJECT_DIR5,
7609
7827
  stdio: "inherit"
7610
7828
  });
@@ -7616,7 +7834,7 @@ function buildFrontend2() {
7616
7834
  function deployFrontend2() {
7617
7835
  console.log(import_chalk20.default.blue("Deploying frontend to IPFS..."));
7618
7836
  try {
7619
- (0, import_child_process4.execSync)("pinme upload ./frontend/dist", {
7837
+ (0, import_child_process5.execSync)("pinme upload ./frontend/dist", {
7620
7838
  cwd: PROJECT_DIR5,
7621
7839
  stdio: "inherit"
7622
7840
  });
@@ -7684,7 +7902,7 @@ program.command("logout").description("log out and clear authentication").action
7684
7902
  program.command("show-appkey").alias("appkey").description("show current AppKey information (masked)").action(() => showAppKeyCmd());
7685
7903
  program.command("my-domains").alias("domain").description("List domains owned by current account").action(() => myDomainsCmd());
7686
7904
  program.command("bind").description("Upload and bind to a domain (requires VIP)").option("-d, --domain <name>", "Domain name to bind").option("--dns", "Force DNS domain mode").action(() => bindCmd());
7687
- program.command("create").description("Create a new project from template").option("-n, --name <name>", "Project name").action((options) => createCmd(options));
7905
+ program.command("create").description("Create a new project from template").argument("[name]", "Project name").option("-f, --force", "Overwrite if exists").action((name, options) => createCmd({ name, force: options == null ? void 0 : options.force }));
7688
7906
  program.command("save").description("Deploy the project (frontend + backend)").action((options) => saveCmd(options));
7689
7907
  program.command("update-db").description("Execute database migration").action(() => updateDbCmd());
7690
7908
  program.command("update-worker").description("Execute worker migration").action(() => updateWorkerCmd());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinme",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },