@swell/cli 2.6.0 → 2.7.0

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 (42) hide show
  1. package/dist/commands/app/frontend/dev.js +18 -0
  2. package/dist/commands/inspect/content.d.ts +25 -14
  3. package/dist/commands/inspect/content.js +34 -144
  4. package/dist/commands/inspect/functions.d.ts +48 -0
  5. package/dist/commands/inspect/functions.js +83 -0
  6. package/dist/commands/inspect/index.js +8 -7
  7. package/dist/commands/inspect/models.d.ts +17 -2
  8. package/dist/commands/inspect/models.js +114 -47
  9. package/dist/commands/inspect/notifications.d.ts +31 -0
  10. package/dist/commands/inspect/notifications.js +125 -0
  11. package/dist/commands/inspect/settings.d.ts +28 -0
  12. package/dist/commands/inspect/settings.js +82 -0
  13. package/dist/commands/inspect/webhooks.d.ts +34 -0
  14. package/dist/commands/inspect/webhooks.js +61 -0
  15. package/dist/create-app-command.d.ts +7 -0
  16. package/dist/create-app-command.js +66 -3
  17. package/dist/inspect-resource-command.d.ts +91 -0
  18. package/dist/inspect-resource-command.js +232 -0
  19. package/dist/lib/apps/index.d.ts +2 -1
  20. package/dist/lib/apps/index.js +43 -6
  21. package/dist/lib/apps/inspect-scope.d.ts +58 -0
  22. package/dist/lib/apps/inspect-scope.js +60 -0
  23. package/dist/lib/apps/object-id.d.ts +7 -0
  24. package/dist/lib/apps/object-id.js +9 -0
  25. package/dist/lib/apps/paths.js +8 -1
  26. package/dist/lib/apps/resolve.d.ts +16 -0
  27. package/dist/lib/apps/resolve.js +39 -0
  28. package/dist/lib/apps/slug.d.ts +29 -0
  29. package/dist/lib/apps/slug.js +12 -0
  30. package/dist/lib/inspect/content.d.ts +39 -0
  31. package/dist/lib/inspect/content.js +76 -0
  32. package/dist/lib/inspect/notifications.d.ts +115 -0
  33. package/dist/lib/inspect/notifications.js +173 -0
  34. package/dist/lib/inspect/settings.d.ts +61 -0
  35. package/dist/lib/inspect/settings.js +56 -0
  36. package/dist/lib/inspect/table.d.ts +29 -0
  37. package/dist/lib/inspect/table.js +61 -0
  38. package/dist/push-app-command.js +3 -2
  39. package/dist/swell-api-command.d.ts +0 -4
  40. package/dist/swell-api-command.js +2 -18
  41. package/oclif.manifest.json +328 -35
  42. package/package.json +1 -1
@@ -858,16 +858,18 @@
858
858
  ],
859
859
  "flags": {
860
860
  "frontend": {
861
- "description": "Framework: astro | angular | hono | nuxt | nextjs | none",
861
+ "description": "Framework: nextjs | astro | nuxt | react | hono | angular | react-storefront | none",
862
862
  "name": "frontend",
863
863
  "hasDynamicHelp": false,
864
864
  "multiple": false,
865
865
  "options": [
866
+ "nextjs",
866
867
  "astro",
867
- "angular",
868
- "hono",
869
868
  "nuxt",
870
- "nextjs",
869
+ "react",
870
+ "hono",
871
+ "angular",
872
+ "react-storefront",
871
873
  "none"
872
874
  ],
873
875
  "type": "option"
@@ -1416,16 +1418,18 @@
1416
1418
  ],
1417
1419
  "flags": {
1418
1420
  "frontend": {
1419
- "description": "Framework: astro | angular | hono | nuxt | nextjs | none",
1421
+ "description": "Framework: nextjs | astro | nuxt | react | hono | angular | react-storefront | none",
1420
1422
  "name": "frontend",
1421
1423
  "hasDynamicHelp": false,
1422
1424
  "multiple": false,
1423
1425
  "options": [
1426
+ "nextjs",
1424
1427
  "astro",
1425
- "angular",
1426
- "hono",
1427
1428
  "nuxt",
1428
- "nextjs",
1429
+ "react",
1430
+ "hono",
1431
+ "angular",
1432
+ "react-storefront",
1429
1433
  "none"
1430
1434
  ],
1431
1435
  "type": "option"
@@ -1685,16 +1689,18 @@
1685
1689
  ],
1686
1690
  "flags": {
1687
1691
  "frontend": {
1688
- "description": "Framework: astro | angular | hono | nuxt | nextjs | none",
1692
+ "description": "Framework: nextjs | astro | nuxt | react | hono | angular | react-storefront | none",
1689
1693
  "name": "frontend",
1690
1694
  "hasDynamicHelp": false,
1691
1695
  "multiple": false,
1692
1696
  "options": [
1697
+ "nextjs",
1693
1698
  "astro",
1694
- "angular",
1695
- "hono",
1696
1699
  "nuxt",
1697
- "nextjs",
1700
+ "react",
1701
+ "hono",
1702
+ "angular",
1703
+ "react-storefront",
1698
1704
  "none"
1699
1705
  ],
1700
1706
  "type": "option"
@@ -2343,29 +2349,45 @@
2343
2349
  "inspect:content": {
2344
2350
  "aliases": [],
2345
2351
  "args": {
2346
- "content-id": {
2347
- "description": "Optional content view ID. Example: custom.admin.products, app.myapp.products",
2348
- "name": "content-id",
2352
+ "identifier": {
2353
+ "description": "Resource identifier see \"Identifier forms\" below.",
2354
+ "name": "identifier",
2349
2355
  "required": false
2350
2356
  }
2351
2357
  },
2352
- "description": "\nView content view extensions available in your Swell store.\n\nWithout a content ID, this command lists all available content views.\nWith a content ID, it retrieves the configuration for that specific content view in JSON format.\n",
2358
+ "description": "Lists content view extensions across all apps plus platform 'custom' sources, grouped by owner. Pass --app=<slug> or --app=. (current swell.json) to scope.\n\nPass an identifier to view a single record as JSON.\n\nIdentifier forms:\n app.<app>.<name> — app-owned view (list column 1)\n custom.<source>.<name> — platform custom view (e.g. custom.admin.products)\n <name> — requires --app= scope\n",
2353
2359
  "examples": [
2354
2360
  "swell inspect content",
2355
- "swell inspect content custom.admin.products",
2361
+ "swell inspect content --app=my-app",
2356
2362
  "swell inspect content app.honest_reviews.reviews",
2357
- "swell inspect content app.myapp.products --live"
2363
+ "swell inspect content custom.admin.products",
2364
+ "swell inspect content reviews --app=honest_reviews",
2365
+ "swell inspect content --live"
2358
2366
  ],
2359
2367
  "flags": {
2368
+ "app": {
2369
+ "description": "Filter by app slug, or \".\" for current swell.json.",
2370
+ "name": "app",
2371
+ "hasDynamicHelp": false,
2372
+ "multiple": false,
2373
+ "type": "option"
2374
+ },
2360
2375
  "live": {
2361
- "description": "Use the live environment instead of test (default: test).",
2376
+ "description": "Use live environment (default: test).",
2362
2377
  "name": "live",
2363
2378
  "allowNo": false,
2364
2379
  "type": "boolean"
2365
2380
  },
2381
+ "json": {
2382
+ "description": "Emit pure JSON without the \"Next steps\" footer. Detail mode only.",
2383
+ "name": "json",
2384
+ "allowNo": false,
2385
+ "type": "boolean"
2386
+ },
2366
2387
  "yes": {
2367
2388
  "char": "y",
2368
- "description": "Accept all prompts automatically (for agent compatibility; no functional effect).",
2389
+ "description": "No-op; accepted for agent compatibility.",
2390
+ "hidden": true,
2369
2391
  "name": "yes",
2370
2392
  "allowNo": false,
2371
2393
  "type": "boolean"
@@ -2378,8 +2400,7 @@
2378
2400
  "pluginName": "@swell/cli",
2379
2401
  "pluginType": "core",
2380
2402
  "strict": true,
2381
- "summary": "Inspect content view extensions deployed in your store.",
2382
- "enableJsonFlag": false,
2403
+ "summary": "App and platform content views.",
2383
2404
  "isESM": true,
2384
2405
  "relativePath": [
2385
2406
  "dist",
@@ -2388,14 +2409,79 @@
2388
2409
  "content.js"
2389
2410
  ]
2390
2411
  },
2412
+ "inspect:functions": {
2413
+ "aliases": [],
2414
+ "args": {
2415
+ "identifier": {
2416
+ "description": "Resource identifier — see \"Identifier forms\" below.",
2417
+ "name": "identifier",
2418
+ "required": false
2419
+ }
2420
+ },
2421
+ "description": "Lists functions across all apps, grouped by app. Pass --app=<slug> or --app=. (current swell.json) to scope.\n\nList output: paste-back key + status (disabled, trigger, next cron run, last failure).\n\nPass an identifier to view a single record as JSON.\n\nIdentifier forms:\n app.<app>.<name> — full paste-back key (list column 1)\n <name> — requires --app= scope\n <24-char id> — any scope\n",
2422
+ "examples": [
2423
+ "swell inspect functions",
2424
+ "swell inspect functions --app=my-app",
2425
+ "swell inspect functions app.my-app.payment-sync",
2426
+ "swell inspect functions payment-sync --app=my-app",
2427
+ "swell inspect functions --live"
2428
+ ],
2429
+ "flags": {
2430
+ "app": {
2431
+ "description": "Filter by app slug, or \".\" for current swell.json.",
2432
+ "name": "app",
2433
+ "hasDynamicHelp": false,
2434
+ "multiple": false,
2435
+ "type": "option"
2436
+ },
2437
+ "live": {
2438
+ "description": "Use live environment (default: test).",
2439
+ "name": "live",
2440
+ "allowNo": false,
2441
+ "type": "boolean"
2442
+ },
2443
+ "json": {
2444
+ "description": "Emit pure JSON without the \"Next steps\" footer. Detail mode only.",
2445
+ "name": "json",
2446
+ "allowNo": false,
2447
+ "type": "boolean"
2448
+ },
2449
+ "yes": {
2450
+ "char": "y",
2451
+ "description": "No-op; accepted for agent compatibility.",
2452
+ "hidden": true,
2453
+ "name": "yes",
2454
+ "allowNo": false,
2455
+ "type": "boolean"
2456
+ }
2457
+ },
2458
+ "hasDynamicHelp": false,
2459
+ "hiddenAliases": [],
2460
+ "id": "inspect:functions",
2461
+ "pluginAlias": "@swell/cli",
2462
+ "pluginName": "@swell/cli",
2463
+ "pluginType": "core",
2464
+ "strict": true,
2465
+ "summary": "Functions with scheduling and trigger state.",
2466
+ "isESM": true,
2467
+ "relativePath": [
2468
+ "dist",
2469
+ "commands",
2470
+ "inspect",
2471
+ "functions.js"
2472
+ ]
2473
+ },
2391
2474
  "inspect": {
2392
2475
  "aliases": [],
2393
2476
  "args": {},
2394
- "description": "View configuration and data for deployed resources.\n\nInspect models, content views, and other deployed artifacts in your Swell store.",
2477
+ "description": "Subcommands list globally and group by app. Pass --app=<slug> or --app=. (current swell.json) to scope. Pass an identifier to print the full record as JSON, followed by a \"Next steps\" footer of related commands. Use --json to omit the footer for piping.\n",
2395
2478
  "examples": [
2396
- "swell inspect models",
2397
2479
  "swell inspect models /products",
2398
- "swell inspect models /apps/myapp/orders"
2480
+ "swell inspect content app.honest_reviews.reviews",
2481
+ "swell inspect webhooks --app=my-app",
2482
+ "swell inspect functions app.my-app.payment-sync",
2483
+ "swell inspect notifications com.orders.receipt.v2",
2484
+ "swell inspect settings app.my-app"
2399
2485
  ],
2400
2486
  "flags": {},
2401
2487
  "hasDynamicHelp": false,
@@ -2424,24 +2510,40 @@
2424
2510
  "required": false
2425
2511
  }
2426
2512
  },
2427
- "description": "\nView models for collections available in your Swell store.\n\nWithout a collection path, this command lists all available collections grouped by type.\nWith a collection path, it retrieves the model for that specific collection in JSON format.\n",
2513
+ "description": "Lists all collections grouped by type. Pass --app=<slug> or --app=. (current swell.json) to filter to one app's models.\n\nPass a collection path to view a single model as JSON. Paths are fully qualified, so --app is ignored in detail mode.\n",
2428
2514
  "examples": [
2429
2515
  "swell inspect models",
2516
+ "swell inspect models --app=my-app",
2517
+ "swell inspect models --live",
2430
2518
  "swell inspect models /products",
2431
2519
  "swell inspect models /content/blogs",
2432
2520
  "swell inspect models /apps/myapp/orders",
2433
- "swell inspect models /orders --live"
2521
+ "swell inspect models /products --json"
2434
2522
  ],
2435
2523
  "flags": {
2524
+ "app": {
2525
+ "description": "Filter by app slug, or \".\" for current swell.json.",
2526
+ "name": "app",
2527
+ "hasDynamicHelp": false,
2528
+ "multiple": false,
2529
+ "type": "option"
2530
+ },
2436
2531
  "live": {
2437
- "description": "Use the live environment instead of test (default: test).",
2532
+ "description": "Use live environment (default: test).",
2438
2533
  "name": "live",
2439
2534
  "allowNo": false,
2440
2535
  "type": "boolean"
2441
2536
  },
2537
+ "json": {
2538
+ "description": "Emit pure JSON without the \"Next steps\" footer. Detail mode only.",
2539
+ "name": "json",
2540
+ "allowNo": false,
2541
+ "type": "boolean"
2542
+ },
2442
2543
  "yes": {
2443
2544
  "char": "y",
2444
- "description": "Accept all prompts automatically (for agent compatibility; no functional effect).",
2545
+ "description": "No-op; accepted for agent compatibility.",
2546
+ "hidden": true,
2445
2547
  "name": "yes",
2446
2548
  "allowNo": false,
2447
2549
  "type": "boolean"
@@ -2454,7 +2556,7 @@
2454
2556
  "pluginName": "@swell/cli",
2455
2557
  "pluginType": "core",
2456
2558
  "strict": true,
2457
- "summary": "Inspect models for collections deployed in your store.",
2559
+ "summary": "Collection models and fields (hierarchical).",
2458
2560
  "enableJsonFlag": false,
2459
2561
  "isESM": true,
2460
2562
  "relativePath": [
@@ -2464,6 +2566,195 @@
2464
2566
  "models.js"
2465
2567
  ]
2466
2568
  },
2569
+ "inspect:notifications": {
2570
+ "aliases": [],
2571
+ "args": {
2572
+ "identifier": {
2573
+ "description": "Resource identifier — see \"Identifier forms\" below.",
2574
+ "name": "identifier",
2575
+ "required": false
2576
+ }
2577
+ },
2578
+ "description": "Lists notifications across all apps plus platform 'com.*' system records, grouped by owner. Pass --app=<slug> or --app=. (current swell.json) to scope.\n\nApp keys include the model (app.<slug>.<model>.<name>) since identity is (api, model, name, app_id?) — two notifications in one app can share a name on different models. Own-app prefix apps/<own>/... is stripped in display.\n\nPass an identifier to view a single record as JSON.\n\nIdentifier forms:\n com.<model>.<name> — platform record\n app.<app>.<model>.<name> — app record (full key)\n app.<app>.<name> — legacy; ambiguous → errors with candidates\n <name> — requires --app= scope\n <24-char id> — any scope\n",
2579
+ "examples": [
2580
+ "swell inspect notifications",
2581
+ "swell inspect notifications --app=my-app",
2582
+ "swell inspect notifications com.orders.receipt.v2",
2583
+ "swell inspect notifications app.notify_me.subscriptions.back-in-stock",
2584
+ "swell inspect notifications back-in-stock --app=notify_me",
2585
+ "swell inspect notifications --live"
2586
+ ],
2587
+ "flags": {
2588
+ "app": {
2589
+ "description": "Filter by app slug, or \".\" for current swell.json.",
2590
+ "name": "app",
2591
+ "hasDynamicHelp": false,
2592
+ "multiple": false,
2593
+ "type": "option"
2594
+ },
2595
+ "live": {
2596
+ "description": "Use live environment (default: test).",
2597
+ "name": "live",
2598
+ "allowNo": false,
2599
+ "type": "boolean"
2600
+ },
2601
+ "json": {
2602
+ "description": "Emit pure JSON without the \"Next steps\" footer. Detail mode only.",
2603
+ "name": "json",
2604
+ "allowNo": false,
2605
+ "type": "boolean"
2606
+ },
2607
+ "yes": {
2608
+ "char": "y",
2609
+ "description": "No-op; accepted for agent compatibility.",
2610
+ "hidden": true,
2611
+ "name": "yes",
2612
+ "allowNo": false,
2613
+ "type": "boolean"
2614
+ }
2615
+ },
2616
+ "hasDynamicHelp": false,
2617
+ "hiddenAliases": [],
2618
+ "id": "inspect:notifications",
2619
+ "pluginAlias": "@swell/cli",
2620
+ "pluginName": "@swell/cli",
2621
+ "pluginType": "core",
2622
+ "strict": true,
2623
+ "summary": "Notifications across apps and platform.",
2624
+ "isESM": true,
2625
+ "relativePath": [
2626
+ "dist",
2627
+ "commands",
2628
+ "inspect",
2629
+ "notifications.js"
2630
+ ]
2631
+ },
2632
+ "inspect:settings": {
2633
+ "aliases": [],
2634
+ "args": {
2635
+ "identifier": {
2636
+ "description": "Resource identifier — see \"Identifier forms\" below.",
2637
+ "name": "identifier",
2638
+ "required": false
2639
+ }
2640
+ },
2641
+ "description": "Lists app settings records plus platform 'com.*' system records, grouped by owner. Pass --app=<slug> or --app=. (current swell.json) to scope.\n\nEach app collapses to one settings record at push time, so the list shows one row per app.\n\nPass an identifier to view a single record as JSON.\n\nIdentifier forms:\n <name> — system record (e.g. taxes, payments)\n app.<slug> — app record\n com.<name> — full system id\n <24-char id> — direct fetch\n\nDeprecated records (general, admin) are filtered from the list but remain reachable by name.\n",
2642
+ "examples": [
2643
+ "swell inspect settings",
2644
+ "swell inspect settings --app=my-app",
2645
+ "swell inspect settings taxes",
2646
+ "swell inspect settings app.notify_me",
2647
+ "swell inspect settings com.payments",
2648
+ "swell inspect settings --live",
2649
+ "swell inspect settings taxes --json"
2650
+ ],
2651
+ "flags": {
2652
+ "app": {
2653
+ "description": "Filter by app slug, or \".\" for current swell.json.",
2654
+ "name": "app",
2655
+ "hasDynamicHelp": false,
2656
+ "multiple": false,
2657
+ "type": "option"
2658
+ },
2659
+ "live": {
2660
+ "description": "Use live environment (default: test).",
2661
+ "name": "live",
2662
+ "allowNo": false,
2663
+ "type": "boolean"
2664
+ },
2665
+ "json": {
2666
+ "description": "Emit pure JSON without the \"Next steps\" footer. Detail mode only.",
2667
+ "name": "json",
2668
+ "allowNo": false,
2669
+ "type": "boolean"
2670
+ },
2671
+ "yes": {
2672
+ "char": "y",
2673
+ "description": "No-op; accepted for agent compatibility.",
2674
+ "hidden": true,
2675
+ "name": "yes",
2676
+ "allowNo": false,
2677
+ "type": "boolean"
2678
+ }
2679
+ },
2680
+ "hasDynamicHelp": false,
2681
+ "hiddenAliases": [],
2682
+ "id": "inspect:settings",
2683
+ "pluginAlias": "@swell/cli",
2684
+ "pluginName": "@swell/cli",
2685
+ "pluginType": "core",
2686
+ "strict": true,
2687
+ "summary": "App and platform settings records.",
2688
+ "isESM": true,
2689
+ "relativePath": [
2690
+ "dist",
2691
+ "commands",
2692
+ "inspect",
2693
+ "settings.js"
2694
+ ]
2695
+ },
2696
+ "inspect:webhooks": {
2697
+ "aliases": [],
2698
+ "args": {
2699
+ "identifier": {
2700
+ "description": "Resource identifier — see \"Identifier forms\" below.",
2701
+ "name": "identifier",
2702
+ "required": false
2703
+ }
2704
+ },
2705
+ "description": "Lists webhooks across all apps, grouped by app. Pass --app=<slug> or --app=. (current swell.json) to scope.\n\nList output: paste-back key + status (disabled, events, failures since date).\n\nPass an identifier to view a single record as JSON.\n\nIdentifier forms:\n app.<app>.<alias> — full paste-back key (list column 1)\n <alias> — requires --app= scope\n <24-char id> — any scope\n",
2706
+ "examples": [
2707
+ "swell inspect webhooks",
2708
+ "swell inspect webhooks --app=my-app",
2709
+ "swell inspect webhooks app.my-app.order-sync",
2710
+ "swell inspect webhooks order-sync --app=my-app",
2711
+ "swell inspect webhooks --live"
2712
+ ],
2713
+ "flags": {
2714
+ "app": {
2715
+ "description": "Filter by app slug, or \".\" for current swell.json.",
2716
+ "name": "app",
2717
+ "hasDynamicHelp": false,
2718
+ "multiple": false,
2719
+ "type": "option"
2720
+ },
2721
+ "live": {
2722
+ "description": "Use live environment (default: test).",
2723
+ "name": "live",
2724
+ "allowNo": false,
2725
+ "type": "boolean"
2726
+ },
2727
+ "json": {
2728
+ "description": "Emit pure JSON without the \"Next steps\" footer. Detail mode only.",
2729
+ "name": "json",
2730
+ "allowNo": false,
2731
+ "type": "boolean"
2732
+ },
2733
+ "yes": {
2734
+ "char": "y",
2735
+ "description": "No-op; accepted for agent compatibility.",
2736
+ "hidden": true,
2737
+ "name": "yes",
2738
+ "allowNo": false,
2739
+ "type": "boolean"
2740
+ }
2741
+ },
2742
+ "hasDynamicHelp": false,
2743
+ "hiddenAliases": [],
2744
+ "id": "inspect:webhooks",
2745
+ "pluginAlias": "@swell/cli",
2746
+ "pluginName": "@swell/cli",
2747
+ "pluginType": "core",
2748
+ "strict": true,
2749
+ "summary": "Webhooks with delivery state.",
2750
+ "isESM": true,
2751
+ "relativePath": [
2752
+ "dist",
2753
+ "commands",
2754
+ "inspect",
2755
+ "webhooks.js"
2756
+ ]
2757
+ },
2467
2758
  "theme:dev": {
2468
2759
  "aliases": [],
2469
2760
  "args": {},
@@ -2570,16 +2861,18 @@
2570
2861
  ],
2571
2862
  "flags": {
2572
2863
  "frontend": {
2573
- "description": "Framework: astro | angular | hono | nuxt | nextjs | none",
2864
+ "description": "Framework: nextjs | astro | nuxt | react | hono | angular | react-storefront | none",
2574
2865
  "name": "frontend",
2575
2866
  "hasDynamicHelp": false,
2576
2867
  "multiple": false,
2577
2868
  "options": [
2869
+ "nextjs",
2578
2870
  "astro",
2579
- "angular",
2580
- "hono",
2581
2871
  "nuxt",
2582
- "nextjs",
2872
+ "react",
2873
+ "hono",
2874
+ "angular",
2875
+ "react-storefront",
2583
2876
  "none"
2584
2877
  ],
2585
2878
  "type": "option"
@@ -3005,5 +3298,5 @@
3005
3298
  ]
3006
3299
  }
3007
3300
  },
3008
- "version": "2.6.0"
3301
+ "version": "2.7.0"
3009
3302
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swell/cli",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "type": "module",
5
5
  "description": "Swell's command line interface/utility",
6
6
  "keywords": [