@swell/cli 2.3.4 → 2.4.1
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/commands/api/delete.d.ts +1 -0
- package/dist/commands/api/delete.js +8 -1
- package/dist/commands/api/get.d.ts +1 -0
- package/dist/commands/api/get.js +9 -2
- package/dist/commands/api/index.js +4 -2
- package/dist/commands/api/post.d.ts +1 -0
- package/dist/commands/api/post.js +9 -2
- package/dist/commands/api/put.d.ts +1 -0
- package/dist/commands/api/put.js +9 -2
- package/dist/commands/app/dev.js +6 -2
- package/dist/commands/app/frontend/dev.js +6 -3
- package/dist/commands/create/app.js +2 -2
- package/dist/commands/create/frontend.js +2 -2
- package/dist/commands/create/tests.js +5 -2
- package/dist/commands/inspect/models.d.ts +0 -1
- package/dist/commands/inspect/models.js +2 -15
- package/dist/commands/theme/dev.js +10 -7
- package/dist/create-app-command.d.ts +8 -2
- package/dist/create-app-command.js +137 -79
- package/dist/env/local.d.ts +1 -0
- package/dist/env/local.js +1 -0
- package/dist/env/production.d.ts +1 -0
- package/dist/env/production.js +1 -0
- package/dist/env/review.d.ts +1 -0
- package/dist/env/review.js +1 -0
- package/dist/env/staging.d.ts +1 -0
- package/dist/env/staging.js +1 -0
- package/dist/lib/api.d.ts +5 -2
- package/dist/lib/api.js +60 -9
- package/dist/lib/apps/index.d.ts +11 -0
- package/dist/lib/apps/index.js +45 -46
- package/dist/lib/constants.d.ts +1 -0
- package/dist/lib/constants.js +5 -0
- package/dist/lib/create/tests.js +1 -1
- package/dist/lib/package-manager.d.ts +86 -0
- package/dist/lib/package-manager.js +186 -0
- package/dist/push-app-command.js +13 -6
- package/dist/swell-api-command.js +8 -2
- package/oclif.manifest.json +76 -15
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -381,10 +381,11 @@
|
|
|
381
381
|
"required": true
|
|
382
382
|
}
|
|
383
383
|
},
|
|
384
|
-
"description": "Remove existing resources from the Swell
|
|
384
|
+
"description": "Remove existing resources from the Swell API.\n Use --api frontend for public key authentication scoped to your app or user.",
|
|
385
385
|
"examples": [
|
|
386
386
|
"swell api delete /products/abc123",
|
|
387
|
-
"swell api delete /functions/my-app/clear-cache"
|
|
387
|
+
"swell api delete /functions/my-app/clear-cache",
|
|
388
|
+
"swell api delete /products/abc123 --api frontend"
|
|
388
389
|
],
|
|
389
390
|
"flags": {
|
|
390
391
|
"live": {
|
|
@@ -392,6 +393,18 @@
|
|
|
392
393
|
"name": "live",
|
|
393
394
|
"allowNo": false,
|
|
394
395
|
"type": "boolean"
|
|
396
|
+
},
|
|
397
|
+
"api": {
|
|
398
|
+
"description": "Use frontend or backend API (frontend uses public key auth).",
|
|
399
|
+
"name": "api",
|
|
400
|
+
"default": "backend",
|
|
401
|
+
"hasDynamicHelp": false,
|
|
402
|
+
"multiple": false,
|
|
403
|
+
"options": [
|
|
404
|
+
"backend",
|
|
405
|
+
"frontend"
|
|
406
|
+
],
|
|
407
|
+
"type": "option"
|
|
395
408
|
}
|
|
396
409
|
},
|
|
397
410
|
"hasDynamicHelp": false,
|
|
@@ -419,12 +432,13 @@
|
|
|
419
432
|
"required": true
|
|
420
433
|
}
|
|
421
434
|
},
|
|
422
|
-
"description": "Retrieve data from the Swell
|
|
435
|
+
"description": "Retrieve data from the Swell API.\n The command performs a GET request to the specified endpoint path.\n Use --api frontend for public key authentication scoped to your app or user.",
|
|
423
436
|
"examples": [
|
|
424
437
|
"swell api get /products",
|
|
425
438
|
"swell api get \"/products?limit=10&category=shoes\"",
|
|
426
439
|
"swell api get /products/abc123",
|
|
427
|
-
"swell api get /functions/my-app/get-inventory"
|
|
440
|
+
"swell api get /functions/my-app/get-inventory",
|
|
441
|
+
"swell api get /products --api frontend"
|
|
428
442
|
],
|
|
429
443
|
"flags": {
|
|
430
444
|
"live": {
|
|
@@ -432,6 +446,18 @@
|
|
|
432
446
|
"name": "live",
|
|
433
447
|
"allowNo": false,
|
|
434
448
|
"type": "boolean"
|
|
449
|
+
},
|
|
450
|
+
"api": {
|
|
451
|
+
"description": "Use frontend or backend API (frontend uses public key auth).",
|
|
452
|
+
"name": "api",
|
|
453
|
+
"default": "backend",
|
|
454
|
+
"hasDynamicHelp": false,
|
|
455
|
+
"multiple": false,
|
|
456
|
+
"options": [
|
|
457
|
+
"backend",
|
|
458
|
+
"frontend"
|
|
459
|
+
],
|
|
460
|
+
"type": "option"
|
|
435
461
|
}
|
|
436
462
|
},
|
|
437
463
|
"hasDynamicHelp": false,
|
|
@@ -453,14 +479,15 @@
|
|
|
453
479
|
"api": {
|
|
454
480
|
"aliases": [],
|
|
455
481
|
"args": {},
|
|
456
|
-
"description": "Run Swell API requests directly from the command line.\n
|
|
482
|
+
"description": "Run Swell API requests directly from the command line.\n Supports GET, POST, PUT, and DELETE methods with optional test/live environments.\n Use --api frontend for public key authentication via the frontend API.\n Call app functions via /functions/<app_id>/<function_name> paths.",
|
|
457
483
|
"examples": [
|
|
458
484
|
"swell api get /products",
|
|
459
485
|
"swell api post /products --body '{\"name\":\"New product\"}'",
|
|
460
486
|
"swell api put /products/abc123 --body ./update.json",
|
|
461
487
|
"swell api delete /products/abc123",
|
|
462
488
|
"swell api get /functions/my-app/get-inventory",
|
|
463
|
-
"swell api post /functions/my-app/create-order --body '{\"items\":[\"sku-1\"]}'"
|
|
489
|
+
"swell api post /functions/my-app/create-order --body '{\"items\":[\"sku-1\"]}'",
|
|
490
|
+
"swell api get /products --api frontend"
|
|
464
491
|
],
|
|
465
492
|
"flags": {},
|
|
466
493
|
"hasDynamicHelp": false,
|
|
@@ -489,11 +516,12 @@
|
|
|
489
516
|
"required": true
|
|
490
517
|
}
|
|
491
518
|
},
|
|
492
|
-
"description": "Create new resources in the Swell
|
|
519
|
+
"description": "Create new resources in the Swell API.\n You can provide a JSON body directly or specify a file path containing JSON data.\n Use --api frontend for public key authentication scoped to your app or user.",
|
|
493
520
|
"examples": [
|
|
494
521
|
"swell api post /products --body '{\"name\": \"Product\", \"price\": 100}'",
|
|
495
522
|
"swell api post /products --body ./product.json",
|
|
496
|
-
"swell api post /functions/my-app/create-order --body '{\"items\":[\"sku-1\"]}'"
|
|
523
|
+
"swell api post /functions/my-app/create-order --body '{\"items\":[\"sku-1\"]}'",
|
|
524
|
+
"swell api post /products --body '{\"name\": \"Product\"}' --api frontend"
|
|
497
525
|
],
|
|
498
526
|
"flags": {
|
|
499
527
|
"body": {
|
|
@@ -508,6 +536,18 @@
|
|
|
508
536
|
"name": "live",
|
|
509
537
|
"allowNo": false,
|
|
510
538
|
"type": "boolean"
|
|
539
|
+
},
|
|
540
|
+
"api": {
|
|
541
|
+
"description": "Use frontend or backend API (frontend uses public key auth).",
|
|
542
|
+
"name": "api",
|
|
543
|
+
"default": "backend",
|
|
544
|
+
"hasDynamicHelp": false,
|
|
545
|
+
"multiple": false,
|
|
546
|
+
"options": [
|
|
547
|
+
"backend",
|
|
548
|
+
"frontend"
|
|
549
|
+
],
|
|
550
|
+
"type": "option"
|
|
511
551
|
}
|
|
512
552
|
},
|
|
513
553
|
"hasDynamicHelp": false,
|
|
@@ -535,11 +575,12 @@
|
|
|
535
575
|
"required": true
|
|
536
576
|
}
|
|
537
577
|
},
|
|
538
|
-
"description": "Update existing resources in the Swell
|
|
578
|
+
"description": "Update existing resources in the Swell API.\n You can provide a JSON body directly or specify a file path containing JSON data.\n Use --api frontend for public key authentication scoped to your app or user.",
|
|
539
579
|
"examples": [
|
|
540
580
|
"swell api put /products/{id} --body '{\"id\": \"abc123\", \"name\": \"Updated\"}'",
|
|
541
581
|
"swell api put /products/abc123 --body ./product.json",
|
|
542
|
-
"swell api put /functions/my-app/update-stock --body '{\"sku\":\"abc\",\"qty\":10}'"
|
|
582
|
+
"swell api put /functions/my-app/update-stock --body '{\"sku\":\"abc\",\"qty\":10}'",
|
|
583
|
+
"swell api put /products/abc123 --body '{\"name\": \"Updated\"}' --api frontend"
|
|
543
584
|
],
|
|
544
585
|
"flags": {
|
|
545
586
|
"body": {
|
|
@@ -554,6 +595,18 @@
|
|
|
554
595
|
"name": "live",
|
|
555
596
|
"allowNo": false,
|
|
556
597
|
"type": "boolean"
|
|
598
|
+
},
|
|
599
|
+
"api": {
|
|
600
|
+
"description": "Use frontend or backend API (frontend uses public key auth).",
|
|
601
|
+
"name": "api",
|
|
602
|
+
"default": "backend",
|
|
603
|
+
"hasDynamicHelp": false,
|
|
604
|
+
"multiple": false,
|
|
605
|
+
"options": [
|
|
606
|
+
"backend",
|
|
607
|
+
"frontend"
|
|
608
|
+
],
|
|
609
|
+
"type": "option"
|
|
557
610
|
}
|
|
558
611
|
},
|
|
559
612
|
"hasDynamicHelp": false,
|
|
@@ -812,7 +865,7 @@
|
|
|
812
865
|
},
|
|
813
866
|
"pkg": {
|
|
814
867
|
"char": "p",
|
|
815
|
-
"description": "Package manager: npm | yarn | none",
|
|
868
|
+
"description": "Package manager: npm | yarn | pnpm | bun | none",
|
|
816
869
|
"name": "pkg",
|
|
817
870
|
"default": "npm",
|
|
818
871
|
"hasDynamicHelp": false,
|
|
@@ -820,6 +873,8 @@
|
|
|
820
873
|
"options": [
|
|
821
874
|
"npm",
|
|
822
875
|
"yarn",
|
|
876
|
+
"pnpm",
|
|
877
|
+
"bun",
|
|
823
878
|
"none"
|
|
824
879
|
],
|
|
825
880
|
"type": "option"
|
|
@@ -1368,7 +1423,7 @@
|
|
|
1368
1423
|
},
|
|
1369
1424
|
"pkg": {
|
|
1370
1425
|
"char": "p",
|
|
1371
|
-
"description": "Package manager: npm | yarn | none",
|
|
1426
|
+
"description": "Package manager: npm | yarn | pnpm | bun | none",
|
|
1372
1427
|
"name": "pkg",
|
|
1373
1428
|
"default": "npm",
|
|
1374
1429
|
"hasDynamicHelp": false,
|
|
@@ -1376,6 +1431,8 @@
|
|
|
1376
1431
|
"options": [
|
|
1377
1432
|
"npm",
|
|
1378
1433
|
"yarn",
|
|
1434
|
+
"pnpm",
|
|
1435
|
+
"bun",
|
|
1379
1436
|
"none"
|
|
1380
1437
|
],
|
|
1381
1438
|
"type": "option"
|
|
@@ -1635,7 +1692,7 @@
|
|
|
1635
1692
|
},
|
|
1636
1693
|
"pkg": {
|
|
1637
1694
|
"char": "p",
|
|
1638
|
-
"description": "
|
|
1695
|
+
"description": "Package manager: npm | yarn | pnpm | bun | none",
|
|
1639
1696
|
"name": "pkg",
|
|
1640
1697
|
"default": "npm",
|
|
1641
1698
|
"hasDynamicHelp": false,
|
|
@@ -1643,6 +1700,8 @@
|
|
|
1643
1700
|
"options": [
|
|
1644
1701
|
"npm",
|
|
1645
1702
|
"yarn",
|
|
1703
|
+
"pnpm",
|
|
1704
|
+
"bun",
|
|
1646
1705
|
"none"
|
|
1647
1706
|
],
|
|
1648
1707
|
"type": "option"
|
|
@@ -2511,7 +2570,7 @@
|
|
|
2511
2570
|
},
|
|
2512
2571
|
"pkg": {
|
|
2513
2572
|
"char": "p",
|
|
2514
|
-
"description": "Package manager: npm | yarn | none",
|
|
2573
|
+
"description": "Package manager: npm | yarn | pnpm | bun | none",
|
|
2515
2574
|
"name": "pkg",
|
|
2516
2575
|
"default": "npm",
|
|
2517
2576
|
"hasDynamicHelp": false,
|
|
@@ -2519,6 +2578,8 @@
|
|
|
2519
2578
|
"options": [
|
|
2520
2579
|
"npm",
|
|
2521
2580
|
"yarn",
|
|
2581
|
+
"pnpm",
|
|
2582
|
+
"bun",
|
|
2522
2583
|
"none"
|
|
2523
2584
|
],
|
|
2524
2585
|
"type": "option"
|
|
@@ -2876,5 +2937,5 @@
|
|
|
2876
2937
|
]
|
|
2877
2938
|
}
|
|
2878
2939
|
},
|
|
2879
|
-
"version": "2.
|
|
2940
|
+
"version": "2.4.1"
|
|
2880
2941
|
}
|