@swell/cli 2.0.1-alpha.16 → 2.0.1-alpha.18

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 (86) hide show
  1. package/dist/app-command.d.ts +1 -1
  2. package/dist/app-command.js +9 -9
  3. package/dist/commands/app/dev.d.ts +16 -0
  4. package/dist/commands/app/dev.js +28 -0
  5. package/dist/commands/app/frontend/deploy.d.ts +15 -0
  6. package/dist/commands/app/frontend/deploy.js +41 -0
  7. package/dist/commands/app/frontend/dev.d.ts +19 -0
  8. package/dist/commands/app/frontend/dev.js +108 -0
  9. package/dist/commands/app/info.js +14 -9
  10. package/dist/commands/app/init.d.ts +12 -0
  11. package/dist/commands/app/init.js +34 -0
  12. package/dist/commands/app/install.d.ts +0 -3
  13. package/dist/commands/app/install.js +12 -21
  14. package/dist/commands/app/pull.d.ts +15 -0
  15. package/dist/commands/app/pull.js +50 -0
  16. package/dist/commands/app/push.d.ts +9 -12
  17. package/dist/commands/app/push.js +57 -131
  18. package/dist/commands/app/release.d.ts +13 -0
  19. package/dist/commands/app/release.js +148 -0
  20. package/dist/commands/app/version.d.ts +5 -4
  21. package/dist/commands/app/version.js +60 -39
  22. package/dist/commands/app/watch.d.ts +2 -4
  23. package/dist/commands/app/watch.js +3 -83
  24. package/dist/commands/create/app.d.ts +35 -11
  25. package/dist/commands/create/app.js +131 -128
  26. package/dist/commands/create/frontend.d.ts +12 -0
  27. package/dist/commands/create/frontend.js +38 -0
  28. package/dist/commands/create/function.d.ts +2 -2
  29. package/dist/commands/create/function.js +2 -2
  30. package/dist/commands/create/notification.d.ts +2 -2
  31. package/dist/commands/create/notification.js +2 -2
  32. package/dist/commands/env.d.ts +12 -0
  33. package/dist/commands/env.js +31 -0
  34. package/dist/commands/login.js +7 -7
  35. package/dist/commands/logs.js +0 -3
  36. package/dist/commands/theme/dev.d.ts +21 -0
  37. package/dist/commands/theme/dev.js +164 -0
  38. package/dist/commands/theme/init.d.ts +9 -0
  39. package/dist/commands/theme/init.js +15 -0
  40. package/dist/commands/theme/pull.d.ts +20 -0
  41. package/dist/commands/theme/pull.js +65 -0
  42. package/dist/commands/theme/push.d.ts +19 -0
  43. package/dist/commands/theme/push.js +89 -0
  44. package/dist/create-app-command.d.ts +20 -0
  45. package/dist/create-app-command.js +253 -0
  46. package/dist/create-collection-command.d.ts +3 -3
  47. package/dist/create-collection-command.js +4 -4
  48. package/dist/{create-command.d.ts → create-config-command.d.ts} +1 -1
  49. package/dist/{create-command.js → create-config-command.js} +3 -5
  50. package/dist/env/local.d.ts +8 -0
  51. package/dist/env/local.js +7 -0
  52. package/dist/env/production.d.ts +8 -0
  53. package/dist/env/production.js +7 -0
  54. package/dist/env/review.d.ts +8 -0
  55. package/dist/env/review.js +7 -0
  56. package/dist/env/staging.d.ts +8 -0
  57. package/dist/env/staging.js +7 -0
  58. package/dist/lib/api.d.ts +1 -0
  59. package/dist/lib/api.js +39 -13
  60. package/dist/lib/app-config.d.ts +12 -5
  61. package/dist/lib/app-config.js +57 -21
  62. package/dist/lib/apps/app-config.d.ts +17 -3
  63. package/dist/lib/apps/app-config.js +194 -66
  64. package/dist/lib/apps/index.d.ts +92 -12
  65. package/dist/lib/apps/index.js +145 -47
  66. package/dist/lib/apps/paths.d.ts +14 -7
  67. package/dist/lib/apps/paths.js +73 -28
  68. package/dist/lib/config.d.ts +9 -2
  69. package/dist/lib/config.js +49 -1
  70. package/dist/lib/constants.d.ts +5 -0
  71. package/dist/lib/constants.js +23 -4
  72. package/dist/lib/create/content.d.ts +1 -1
  73. package/dist/lib/create/index.js +5 -1
  74. package/dist/lib/info.js +2 -2
  75. package/dist/lib/stores.d.ts +5 -3
  76. package/dist/lib/stores.js +7 -5
  77. package/dist/lib/style.d.ts +2 -0
  78. package/dist/lib/style.js +2 -0
  79. package/dist/push-app-command.d.ts +73 -0
  80. package/dist/push-app-command.js +754 -0
  81. package/dist/remote-app-command.d.ts +35 -9
  82. package/dist/remote-app-command.js +417 -159
  83. package/oclif.manifest.json +817 -71
  84. package/package.json +13 -1
  85. package/dist/commands/app/_pull.d.ts +0 -8
  86. package/dist/commands/app/_pull.js +0 -45
@@ -1,5 +1,38 @@
1
1
  {
2
2
  "commands": {
3
+ "env": {
4
+ "aliases": [],
5
+ "args": {
6
+ "name": {
7
+ "description": "name of the environment (production, staging, local, review)",
8
+ "name": "name"
9
+ },
10
+ "reviewBranch": {
11
+ "description": "name of a review branch",
12
+ "name": "reviewBranch"
13
+ }
14
+ },
15
+ "description": "Internal: Display the current environment configuration.",
16
+ "examples": [
17
+ "<%= config.bin %> <%= command.id %>"
18
+ ],
19
+ "flags": {},
20
+ "hasDynamicHelp": false,
21
+ "hidden": true,
22
+ "hiddenAliases": [],
23
+ "id": "env",
24
+ "pluginAlias": "@swell/cli",
25
+ "pluginName": "@swell/cli",
26
+ "pluginType": "core",
27
+ "strict": true,
28
+ "enableJsonFlag": false,
29
+ "isESM": true,
30
+ "relativePath": [
31
+ "dist",
32
+ "commands",
33
+ "env.js"
34
+ ]
35
+ },
3
36
  "login": {
4
37
  "aliases": [],
5
38
  "args": {},
@@ -258,83 +291,111 @@
258
291
  "whoami.js"
259
292
  ]
260
293
  },
261
- "app:_pull": {
294
+ "app:_uninstall": {
262
295
  "aliases": [],
263
- "args": {
264
- "appId": {
265
- "description": "app id to pull",
266
- "name": "appId"
267
- }
268
- },
296
+ "args": {},
297
+ "description": "Uninstalls an existing App",
269
298
  "examples": [
270
299
  "<%= config.bin %> <%= command.id %>"
271
300
  ],
272
301
  "flags": {
273
302
  "app-path": {
274
- "description": "path to the app directory",
303
+ "description": "path to your app directory",
275
304
  "name": "app-path",
276
305
  "hasDynamicHelp": false,
277
306
  "multiple": false,
278
307
  "type": "option"
308
+ },
309
+ "env": {
310
+ "description": "environment to uninstall the app from",
311
+ "name": "env",
312
+ "default": "test",
313
+ "hasDynamicHelp": false,
314
+ "multiple": false,
315
+ "type": "option"
316
+ },
317
+ "store": {
318
+ "char": "s",
319
+ "description": "store id to uninstall the app from",
320
+ "name": "store",
321
+ "hasDynamicHelp": false,
322
+ "multiple": false,
323
+ "type": "option"
279
324
  }
280
325
  },
281
326
  "hasDynamicHelp": false,
282
327
  "hiddenAliases": [],
283
- "id": "app:_pull",
328
+ "id": "app:_uninstall",
284
329
  "pluginAlias": "@swell/cli",
285
330
  "pluginName": "@swell/cli",
286
331
  "pluginType": "core",
287
332
  "strict": true,
288
- "summary": "Pull app configuration from remote.",
289
333
  "enableJsonFlag": false,
334
+ "delayOrientation": false,
335
+ "orientation": {
336
+ "env": "test"
337
+ },
290
338
  "isESM": true,
291
339
  "relativePath": [
292
340
  "dist",
293
341
  "commands",
294
342
  "app",
295
- "_pull.js"
343
+ "_uninstall.js"
296
344
  ]
297
345
  },
298
- "app:_uninstall": {
346
+ "app:dev": {
299
347
  "aliases": [],
300
348
  "args": {},
301
- "description": "Uninstalls an existing App",
302
349
  "examples": [
303
- "<%= config.bin %> <%= command.id %>"
350
+ "swell app dev",
351
+ "swell app dev --storefront-id <id>",
352
+ "swell app dev --port 3000"
304
353
  ],
305
354
  "flags": {
306
355
  "app-path": {
307
- "description": "path to the app directory",
356
+ "description": "path to your app directory",
308
357
  "name": "app-path",
309
358
  "hasDynamicHelp": false,
310
359
  "multiple": false,
311
360
  "type": "option"
312
361
  },
313
- "env": {
314
- "description": "environment to uninstall the app from",
315
- "name": "env",
316
- "default": "test",
362
+ "no-push": {
363
+ "description": "skip pushing app files initially",
364
+ "name": "no-push",
365
+ "allowNo": false,
366
+ "type": "boolean"
367
+ },
368
+ "port": {
369
+ "char": "p",
370
+ "description": "override the default port to run the app locally",
371
+ "name": "port",
317
372
  "hasDynamicHelp": false,
318
373
  "multiple": false,
319
374
  "type": "option"
320
375
  },
321
- "store": {
322
- "char": "s",
323
- "description": "store id to uninstall the app from",
324
- "name": "store",
376
+ "storefront-id": {
377
+ "description": "for storefront apps, identify a storefront to preview and push theme files to",
378
+ "name": "storefront-id",
325
379
  "hasDynamicHelp": false,
326
380
  "multiple": false,
327
381
  "type": "option"
382
+ },
383
+ "storefront-select": {
384
+ "description": "for storefront apps, prompt to select a storefront to preview",
385
+ "name": "storefront-select",
386
+ "allowNo": false,
387
+ "type": "boolean"
328
388
  }
329
389
  },
330
390
  "hasDynamicHelp": false,
331
391
  "hiddenAliases": [],
332
- "id": "app:_uninstall",
392
+ "id": "app:dev",
333
393
  "pluginAlias": "@swell/cli",
334
394
  "pluginName": "@swell/cli",
335
395
  "pluginType": "core",
336
396
  "strict": true,
337
- "enableJsonFlag": false,
397
+ "summary": "Run an app in dev mode from your local machine.",
398
+ "delayOrientation": true,
338
399
  "orientation": {
339
400
  "env": "test"
340
401
  },
@@ -343,7 +404,7 @@
343
404
  "dist",
344
405
  "commands",
345
406
  "app",
346
- "_uninstall.js"
407
+ "dev.js"
347
408
  ]
348
409
  },
349
410
  "app:info": {
@@ -367,7 +428,7 @@
367
428
  ],
368
429
  "flags": {
369
430
  "app-path": {
370
- "description": "path to the app directory",
431
+ "description": "path to your app directory",
371
432
  "name": "app-path",
372
433
  "hasDynamicHelp": false,
373
434
  "multiple": false,
@@ -383,6 +444,7 @@
383
444
  "strict": true,
384
445
  "summary": "Show information about your Swell app.",
385
446
  "enableJsonFlag": false,
447
+ "delayOrientation": false,
386
448
  "isESM": true,
387
449
  "relativePath": [
388
450
  "dist",
@@ -391,18 +453,81 @@
391
453
  "info.js"
392
454
  ]
393
455
  },
456
+ "app:init": {
457
+ "aliases": [],
458
+ "args": {
459
+ "id": {
460
+ "default": "",
461
+ "description": "id of the app to create",
462
+ "name": "id"
463
+ }
464
+ },
465
+ "description": "Initialize app swell.json in the current directory.",
466
+ "examples": [
467
+ {
468
+ "command": "swell app init",
469
+ "description": "Initialize app following command prompts."
470
+ },
471
+ {
472
+ "command": "swell app init -y",
473
+ "description": "Initialize app and accept all default values."
474
+ }
475
+ ],
476
+ "flags": {
477
+ "frontend": {
478
+ "description": "create a starter framework for a hosted frontend",
479
+ "name": "frontend",
480
+ "hasDynamicHelp": false,
481
+ "multiple": false,
482
+ "options": [
483
+ "nextjs",
484
+ "astro"
485
+ ],
486
+ "type": "option"
487
+ },
488
+ "storefront-app": {
489
+ "description": "id of an installed storefront app to create a theme for, if applicable",
490
+ "name": "storefront-app",
491
+ "hasDynamicHelp": false,
492
+ "multiple": false,
493
+ "type": "option"
494
+ },
495
+ "yes": {
496
+ "char": "y",
497
+ "description": "accept all default values",
498
+ "name": "yes",
499
+ "allowNo": false,
500
+ "type": "boolean"
501
+ }
502
+ },
503
+ "hasDynamicHelp": false,
504
+ "hiddenAliases": [],
505
+ "id": "app:init",
506
+ "pluginAlias": "@swell/cli",
507
+ "pluginName": "@swell/cli",
508
+ "pluginType": "core",
509
+ "strict": true,
510
+ "enableJsonFlag": false,
511
+ "isESM": true,
512
+ "relativePath": [
513
+ "dist",
514
+ "commands",
515
+ "app",
516
+ "init.js"
517
+ ]
518
+ },
394
519
  "app:install": {
395
520
  "aliases": [],
396
521
  "args": {},
397
522
  "description": "Without a version specified, install the latest version of the app.\n\nWithout a store specified, install the app in the Live environment of the current store.",
398
523
  "examples": [
399
- "swell install",
400
- "swell install -v 3.2.7",
401
- "swell install -v 1.0.0 -s my-store-id"
524
+ "swell app install",
525
+ "swell app install -v 3.2.7",
526
+ "swell app install -v 1.0.0 -s my-store-id"
402
527
  ],
403
528
  "flags": {
404
529
  "app-path": {
405
- "description": "path to the app directory",
530
+ "description": "path to your app directory",
406
531
  "name": "app-path",
407
532
  "hasDynamicHelp": false,
408
533
  "multiple": false,
@@ -442,6 +567,7 @@
442
567
  "strict": true,
443
568
  "summary": "Install an existing app in another store environment.",
444
569
  "enableJsonFlag": false,
570
+ "delayOrientation": false,
445
571
  "orientation": {
446
572
  "env": "test"
447
573
  },
@@ -453,35 +579,91 @@
453
579
  "install.js"
454
580
  ]
455
581
  },
456
- "app:push": {
582
+ "app:pull": {
457
583
  "aliases": [],
458
584
  "args": {
459
- "file": {
460
- "description": "relative path to a configuration file or directory to push",
461
- "name": "file"
585
+ "appId": {
586
+ "default": "",
587
+ "description": "app id to pull",
588
+ "name": "appId"
589
+ },
590
+ "targetPath": {
591
+ "default": "",
592
+ "description": "path to download app files into",
593
+ "name": "targetPath"
462
594
  }
463
595
  },
464
- "description": "Push all app configurations, a specific file, or a specific configuration\ntype to an app in your store's test environment. If the app does not exist yet,\nit will be created and its global ID saved to a .swellrc file.\n\n- If no file is specified, all configuration files will be pushed to the store.\n This includes the app icon (assets/icon.png) and swell.json.\n- If a file is specified, only that file will be pushed to the store.\n- If a directory is specified, only files in that directory will be pushed.\n\nApp configuration directories:\nassets/\ncontent/\nfunctions/\nmodels/\nnotifications/\nsettings/\nwebhooks/",
596
+ "description": "Pull all app files, a specific file, or a specific configuration\ntype from an app in your store's test environment to your local machine.\n\nIf APPID is not specified, you will be prompted with a list of apps to choose from.\n\nApp file directories:\nassets/\ncontent/\nfrontend/\nfunctions/\nmodels/\nnotifications/\nsettings/\ntheme/\nwebhooks/\nfrontend/",
465
597
  "examples": [
466
- "swell app push",
467
- "swell app push -f content",
468
- "swell app push -f models/products.json"
598
+ "swell app pull",
599
+ "swell app pull example_app",
600
+ "swell app pull example_app example-folder",
601
+ "swell app pull --force"
469
602
  ],
470
603
  "flags": {
471
604
  "app-path": {
472
- "description": "path to the app directory",
605
+ "description": "path to your app directory",
473
606
  "name": "app-path",
474
607
  "hasDynamicHelp": false,
475
608
  "multiple": false,
476
609
  "type": "option"
477
610
  },
611
+ "force": {
612
+ "description": "force pull all files",
613
+ "name": "force",
614
+ "allowNo": false,
615
+ "type": "boolean"
616
+ }
617
+ },
618
+ "hasDynamicHelp": false,
619
+ "hiddenAliases": [],
620
+ "id": "app:pull",
621
+ "pluginAlias": "@swell/cli",
622
+ "pluginName": "@swell/cli",
623
+ "pluginType": "core",
624
+ "strict": true,
625
+ "summary": "Pull app files from Swell to your local machine.",
626
+ "isESM": true,
627
+ "relativePath": [
628
+ "dist",
629
+ "commands",
630
+ "app",
631
+ "pull.js"
632
+ ]
633
+ },
634
+ "app:push": {
635
+ "aliases": [],
636
+ "args": {
478
637
  "file": {
479
- "char": "f",
480
638
  "description": "relative path to a configuration file or directory to push",
481
- "name": "file",
639
+ "name": "file"
640
+ }
641
+ },
642
+ "description": "Push all app files, a specific file, or a specific configuration\ntype to an app in your store's test environment.\n\nIf the app does not exist, it will be created and its global ID saved to a .swellrc file.\n\n- If no file is specified, all configuration files will be pushed to the store.\n This includes the app icon (assets/icon.png) and swell.json.\n- If a file is specified, only that file will be pushed to the store.\n- If a directory is specified, only files in that directory will be pushed.\n\nApp file directories:\nassets/\ncontent/\nfrontend/\nfunctions/\nmodels/\nnotifications/\nsettings/\ntheme/\nwebhooks/",
643
+ "examples": [
644
+ "swell app push",
645
+ "swell app push content",
646
+ "swell app push models/products.json"
647
+ ],
648
+ "flags": {
649
+ "app-path": {
650
+ "description": "path to your app directory",
651
+ "name": "app-path",
482
652
  "hasDynamicHelp": false,
483
653
  "multiple": false,
484
654
  "type": "option"
655
+ },
656
+ "force": {
657
+ "description": "force push all configurations",
658
+ "name": "force",
659
+ "allowNo": false,
660
+ "type": "boolean"
661
+ },
662
+ "no-deploy": {
663
+ "description": "skip deploying app frontend",
664
+ "name": "no-deploy",
665
+ "allowNo": false,
666
+ "type": "boolean"
485
667
  }
486
668
  },
487
669
  "hasDynamicHelp": false,
@@ -491,8 +673,8 @@
491
673
  "pluginName": "@swell/cli",
492
674
  "pluginType": "core",
493
675
  "strict": true,
494
- "summary": "Push configuration files to your Swell app.",
495
- "enableJsonFlag": false,
676
+ "summary": "Push local files to your Swell app.",
677
+ "delayOrientation": true,
496
678
  "orientation": {
497
679
  "env": "test"
498
680
  },
@@ -504,6 +686,78 @@
504
686
  "push.js"
505
687
  ]
506
688
  },
689
+ "app:release": {
690
+ "aliases": [],
691
+ "args": {
692
+ "version": {
693
+ "description": "semver version to release",
694
+ "name": "version"
695
+ }
696
+ },
697
+ "description": "App released are reviewed by the Swell team for quality and functionality before publishing.\n\nIf the version does not exist, you will be prompted to create it.\n\nUse the --amend flag to update the description or release notes of an existing release version.\n\nUse the --supported=false flag to indicate the version is not officially supported by the developer.\n \nThe app must be connected to a partner account with access to publish.",
698
+ "examples": [
699
+ "swell app release",
700
+ "swell app release 2.0.0",
701
+ "swell app release 2.0.0 --amend --release-notes ./releases/v2.0.0.md"
702
+ ],
703
+ "flags": {
704
+ "app-path": {
705
+ "description": "path to your app directory",
706
+ "name": "app-path",
707
+ "hasDynamicHelp": false,
708
+ "multiple": false,
709
+ "type": "option"
710
+ },
711
+ "amend": {
712
+ "description": "amend the description or release notes of an existing release",
713
+ "name": "amend",
714
+ "allowNo": false,
715
+ "type": "boolean"
716
+ },
717
+ "message": {
718
+ "char": "m",
719
+ "description": "description of the changes in this version for internal use",
720
+ "name": "message",
721
+ "hasDynamicHelp": false,
722
+ "multiple": false,
723
+ "type": "option"
724
+ },
725
+ "no-git-tag": {
726
+ "description": "if the version is being created, do not create a git tag",
727
+ "name": "no-git-tag",
728
+ "allowNo": false,
729
+ "type": "boolean"
730
+ },
731
+ "not-supported": {
732
+ "description": "indicates the version is not officially supported by the developer",
733
+ "name": "not-supported",
734
+ "allowNo": false,
735
+ "type": "boolean"
736
+ },
737
+ "release-notes": {
738
+ "description": "relative path to a file containing release notes",
739
+ "name": "release-notes",
740
+ "hasDynamicHelp": false,
741
+ "multiple": false,
742
+ "type": "option"
743
+ }
744
+ },
745
+ "hasDynamicHelp": false,
746
+ "hiddenAliases": [],
747
+ "id": "app:release",
748
+ "pluginAlias": "@swell/cli",
749
+ "pluginName": "@swell/cli",
750
+ "pluginType": "core",
751
+ "strict": true,
752
+ "summary": "Release a new version of your an app for publishing to the App Store.",
753
+ "isESM": true,
754
+ "relativePath": [
755
+ "dist",
756
+ "commands",
757
+ "app",
758
+ "release.js"
759
+ ]
760
+ },
507
761
  "app:version": {
508
762
  "aliases": [],
509
763
  "args": {
@@ -512,7 +766,7 @@
512
766
  "name": "nextVersion"
513
767
  }
514
768
  },
515
- "description": "When executed without specifying NEXTVERSION, the command will display the current\nversion of your app.\n\nIf a NEXTVERSION is provided, the command will validate and compute the version\naccording to Semver rules by only allowing incremental updates.\n\nThe version change will be committed to the Git repository using the provided\nmessage or a default similar to the tag, e.g. \"v1.0.1\".\n\nBy default, it creates a Git tag for the specified version. You can disable this\nbehavior by using the --git-tag=false option.",
769
+ "description": "When executed without specifying NEXTVERSION, the command will display the current\nversion of your app.\n\nIf a NEXTVERSION is provided, the command will validate and compute the version\naccording to Semver rules by only allowing incremental updates.\n\nThe version change will be committed to the Git repository using the provided\nmessage or a default similar to the tag, e.g. \"v1.0.1\".\n\nBy default, it creates a Git tag for the specified version. You can disable this\nbehavior by using the --no-git-tag option.",
516
770
  "examples": [
517
771
  "swell app version",
518
772
  "swell app version minor",
@@ -520,25 +774,31 @@
520
774
  ],
521
775
  "flags": {
522
776
  "app-path": {
523
- "description": "path to the app directory",
777
+ "description": "path to your app directory",
524
778
  "name": "app-path",
525
779
  "hasDynamicHelp": false,
526
780
  "multiple": false,
527
781
  "type": "option"
528
782
  },
529
- "git-tag": {
530
- "description": "create a git tag for this version (default true)",
531
- "name": "git-tag",
783
+ "amend": {
784
+ "description": "amend the description an existing version",
785
+ "name": "amend",
532
786
  "allowNo": false,
533
787
  "type": "boolean"
534
788
  },
535
789
  "message": {
536
790
  "char": "m",
537
- "description": "description of the changes in this version",
791
+ "description": "description of the changes in this version for internal use",
538
792
  "name": "message",
539
793
  "hasDynamicHelp": false,
540
794
  "multiple": false,
541
795
  "type": "option"
796
+ },
797
+ "no-git-tag": {
798
+ "description": "do not create a git tag for this version",
799
+ "name": "no-git-tag",
800
+ "allowNo": false,
801
+ "type": "boolean"
542
802
  }
543
803
  },
544
804
  "hasDynamicHelp": false,
@@ -549,7 +809,6 @@
549
809
  "pluginType": "core",
550
810
  "strict": true,
551
811
  "summary": "Increment the version of your Swell app.",
552
- "enableJsonFlag": false,
553
812
  "isESM": true,
554
813
  "relativePath": [
555
814
  "dist",
@@ -569,7 +828,7 @@
569
828
  ],
570
829
  "flags": {
571
830
  "app-path": {
572
- "description": "path to the app directory",
831
+ "description": "path to your app directory",
573
832
  "name": "app-path",
574
833
  "hasDynamicHelp": false,
575
834
  "multiple": false,
@@ -591,7 +850,6 @@
591
850
  "pluginType": "core",
592
851
  "strict": true,
593
852
  "summary": "Watch for changes and push app configurations.",
594
- "enableJsonFlag": false,
595
853
  "orientation": {
596
854
  "env": "test"
597
855
  },
@@ -612,7 +870,7 @@
612
870
  "name": "id"
613
871
  }
614
872
  },
615
- "description": "Initialize an app with config file and folder structure.",
873
+ "description": "Create an app.",
616
874
  "examples": [
617
875
  {
618
876
  "command": "swell create app",
@@ -632,6 +890,31 @@
632
890
  }
633
891
  ],
634
892
  "flags": {
893
+ "frontend": {
894
+ "description": "create a starter framework for a hosted frontend",
895
+ "name": "frontend",
896
+ "hasDynamicHelp": false,
897
+ "multiple": false,
898
+ "options": [
899
+ "nextjs",
900
+ "astro"
901
+ ],
902
+ "type": "option"
903
+ },
904
+ "storefront-app": {
905
+ "description": "id of an installed storefront app to create a theme for, if applicable",
906
+ "name": "storefront-app",
907
+ "hasDynamicHelp": false,
908
+ "multiple": false,
909
+ "type": "option"
910
+ },
911
+ "yes": {
912
+ "char": "y",
913
+ "description": "accept all default values",
914
+ "name": "yes",
915
+ "allowNo": false,
916
+ "type": "boolean"
917
+ },
635
918
  "pkg": {
636
919
  "char": "p",
637
920
  "description": "use npm or yarn to install default dependencies, or none to disable",
@@ -646,18 +929,25 @@
646
929
  ],
647
930
  "type": "option"
648
931
  },
649
- "yes": {
650
- "char": "y",
651
- "description": "accept all default values",
652
- "name": "yes",
653
- "allowNo": false,
654
- "type": "boolean"
655
- }
656
- },
657
- "hasDynamicHelp": false,
658
- "hiddenAliases": [],
659
- "id": "create:app",
660
- "pluginAlias": "@swell/cli",
932
+ "type": {
933
+ "char": "t",
934
+ "description": "create a specific app type",
935
+ "name": "type",
936
+ "hasDynamicHelp": false,
937
+ "multiple": false,
938
+ "options": [
939
+ "admin",
940
+ "integration",
941
+ "storefront",
942
+ "theme"
943
+ ],
944
+ "type": "option"
945
+ }
946
+ },
947
+ "hasDynamicHelp": false,
948
+ "hiddenAliases": [],
949
+ "id": "create:app",
950
+ "pluginAlias": "@swell/cli",
661
951
  "pluginName": "@swell/cli",
662
952
  "pluginType": "core",
663
953
  "strict": true,
@@ -700,7 +990,7 @@
700
990
  ],
701
991
  "flags": {
702
992
  "app-path": {
703
- "description": "path to the app directory",
993
+ "description": "path to your app directory",
704
994
  "name": "app-path",
705
995
  "hasDynamicHelp": false,
706
996
  "multiple": false,
@@ -764,6 +1054,77 @@
764
1054
  "content.js"
765
1055
  ]
766
1056
  },
1057
+ "create:frontend": {
1058
+ "aliases": [],
1059
+ "args": {},
1060
+ "description": "Initialize a frontend app framework and folder structure.",
1061
+ "examples": [
1062
+ {
1063
+ "command": "swell create frontend",
1064
+ "description": "Create frontend app following command prompts."
1065
+ },
1066
+ {
1067
+ "command": "swell create frontend -y",
1068
+ "description": "Create frontend app and accept all default values."
1069
+ }
1070
+ ],
1071
+ "flags": {
1072
+ "frontend": {
1073
+ "description": "create a starter framework for a hosted frontend",
1074
+ "name": "frontend",
1075
+ "hasDynamicHelp": false,
1076
+ "multiple": false,
1077
+ "options": [
1078
+ "nextjs",
1079
+ "astro"
1080
+ ],
1081
+ "type": "option"
1082
+ },
1083
+ "storefront-app": {
1084
+ "description": "id of an installed storefront app to create a theme for, if applicable",
1085
+ "name": "storefront-app",
1086
+ "hasDynamicHelp": false,
1087
+ "multiple": false,
1088
+ "type": "option"
1089
+ },
1090
+ "yes": {
1091
+ "char": "y",
1092
+ "description": "accept all default values",
1093
+ "name": "yes",
1094
+ "allowNo": false,
1095
+ "type": "boolean"
1096
+ },
1097
+ "pkg": {
1098
+ "char": "p",
1099
+ "description": "use npm or yarn to install default dependencies, or none to disable",
1100
+ "name": "pkg",
1101
+ "default": "npm",
1102
+ "hasDynamicHelp": false,
1103
+ "multiple": false,
1104
+ "options": [
1105
+ "npm",
1106
+ "yarn",
1107
+ "none"
1108
+ ],
1109
+ "type": "option"
1110
+ }
1111
+ },
1112
+ "hasDynamicHelp": false,
1113
+ "hiddenAliases": [],
1114
+ "id": "create:frontend",
1115
+ "pluginAlias": "@swell/cli",
1116
+ "pluginName": "@swell/cli",
1117
+ "pluginType": "core",
1118
+ "strict": true,
1119
+ "enableJsonFlag": false,
1120
+ "isESM": true,
1121
+ "relativePath": [
1122
+ "dist",
1123
+ "commands",
1124
+ "create",
1125
+ "frontend.js"
1126
+ ]
1127
+ },
767
1128
  "create:function": {
768
1129
  "aliases": [],
769
1130
  "args": {
@@ -802,7 +1163,7 @@
802
1163
  ],
803
1164
  "flags": {
804
1165
  "app-path": {
805
- "description": "path to the app directory",
1166
+ "description": "path to your app directory",
806
1167
  "name": "app-path",
807
1168
  "hasDynamicHelp": false,
808
1169
  "multiple": false,
@@ -925,7 +1286,7 @@
925
1286
  ],
926
1287
  "flags": {
927
1288
  "app-path": {
928
- "description": "path to the app directory",
1289
+ "description": "path to your app directory",
929
1290
  "name": "app-path",
930
1291
  "hasDynamicHelp": false,
931
1292
  "multiple": false,
@@ -1018,7 +1379,7 @@
1018
1379
  ],
1019
1380
  "flags": {
1020
1381
  "app-path": {
1021
- "description": "path to the app directory",
1382
+ "description": "path to your app directory",
1022
1383
  "name": "app-path",
1023
1384
  "hasDynamicHelp": false,
1024
1385
  "multiple": false,
@@ -1087,7 +1448,392 @@
1087
1448
  "create",
1088
1449
  "notification.js"
1089
1450
  ]
1451
+ },
1452
+ "theme:dev": {
1453
+ "aliases": [],
1454
+ "args": {},
1455
+ "examples": [
1456
+ "swell theme dev",
1457
+ "swell theme dev --local",
1458
+ "swell theme dev --bundle",
1459
+ "swell theme dev --storefront-select",
1460
+ "swell theme dev --storefront-id <id>"
1461
+ ],
1462
+ "flags": {
1463
+ "app-path": {
1464
+ "description": "path to your app directory",
1465
+ "name": "app-path",
1466
+ "hasDynamicHelp": false,
1467
+ "multiple": false,
1468
+ "type": "option"
1469
+ },
1470
+ "bundle": {
1471
+ "description": "bundle assets",
1472
+ "name": "bundle",
1473
+ "allowNo": false,
1474
+ "type": "boolean"
1475
+ },
1476
+ "local": {
1477
+ "description": "connect to a running local storefront app dev server",
1478
+ "name": "local",
1479
+ "allowNo": false,
1480
+ "type": "boolean"
1481
+ },
1482
+ "no-push": {
1483
+ "description": "skip pushing theme files initially",
1484
+ "name": "no-push",
1485
+ "allowNo": false,
1486
+ "type": "boolean"
1487
+ },
1488
+ "storefront-id": {
1489
+ "description": "identify a storefront to preview and push theme files to",
1490
+ "name": "storefront-id",
1491
+ "hasDynamicHelp": false,
1492
+ "multiple": false,
1493
+ "type": "option"
1494
+ },
1495
+ "storefront-select": {
1496
+ "description": "prompt to select a storefront to preview and push theme files to",
1497
+ "name": "storefront-select",
1498
+ "allowNo": false,
1499
+ "type": "boolean"
1500
+ }
1501
+ },
1502
+ "hasDynamicHelp": false,
1503
+ "hiddenAliases": [],
1504
+ "id": "theme:dev",
1505
+ "pluginAlias": "@swell/cli",
1506
+ "pluginName": "@swell/cli",
1507
+ "pluginType": "core",
1508
+ "strict": true,
1509
+ "summary": "Run a theme in dev mode from your local machine.",
1510
+ "orientation": {
1511
+ "env": "test"
1512
+ },
1513
+ "isESM": true,
1514
+ "relativePath": [
1515
+ "dist",
1516
+ "commands",
1517
+ "theme",
1518
+ "dev.js"
1519
+ ]
1520
+ },
1521
+ "theme:init": {
1522
+ "aliases": [],
1523
+ "args": {
1524
+ "id": {
1525
+ "default": "",
1526
+ "description": "id of the app to create",
1527
+ "name": "id"
1528
+ }
1529
+ },
1530
+ "description": "Initialize theme swell.json in the current directory.",
1531
+ "examples": [
1532
+ {
1533
+ "command": "swell theme init",
1534
+ "description": "Initialize theme following command prompts."
1535
+ },
1536
+ {
1537
+ "command": "swell theme init -y",
1538
+ "description": "Initialize theme and accept all default values."
1539
+ }
1540
+ ],
1541
+ "flags": {
1542
+ "frontend": {
1543
+ "description": "create a starter framework for a hosted frontend",
1544
+ "name": "frontend",
1545
+ "hasDynamicHelp": false,
1546
+ "multiple": false,
1547
+ "options": [
1548
+ "nextjs",
1549
+ "astro"
1550
+ ],
1551
+ "type": "option"
1552
+ },
1553
+ "storefront-app": {
1554
+ "description": "id of an installed storefront app to create a theme for, if applicable",
1555
+ "name": "storefront-app",
1556
+ "hasDynamicHelp": false,
1557
+ "multiple": false,
1558
+ "type": "option"
1559
+ },
1560
+ "yes": {
1561
+ "char": "y",
1562
+ "description": "accept all default values",
1563
+ "name": "yes",
1564
+ "allowNo": false,
1565
+ "type": "boolean"
1566
+ }
1567
+ },
1568
+ "hasDynamicHelp": false,
1569
+ "hiddenAliases": [],
1570
+ "id": "theme:init",
1571
+ "pluginAlias": "@swell/cli",
1572
+ "pluginName": "@swell/cli",
1573
+ "pluginType": "core",
1574
+ "strict": true,
1575
+ "enableJsonFlag": false,
1576
+ "isESM": true,
1577
+ "relativePath": [
1578
+ "dist",
1579
+ "commands",
1580
+ "theme",
1581
+ "init.js"
1582
+ ]
1583
+ },
1584
+ "theme:pull": {
1585
+ "aliases": [],
1586
+ "args": {
1587
+ "appId": {
1588
+ "default": "",
1589
+ "description": "theme app id to pull",
1590
+ "name": "appId"
1591
+ },
1592
+ "targetPath": {
1593
+ "default": "",
1594
+ "description": "path to download theme files into",
1595
+ "name": "targetPath"
1596
+ }
1597
+ },
1598
+ "description": "Pull all theme files, a specific file, or a specific configuration\ntype from a theme in your store's test environment to your local machine.\n\nIf APPID is not specified, you will be prompted with a list of themes to choose from.\n\nTheme file directories:\nassets/\ntheme/",
1599
+ "examples": [
1600
+ "swell theme pull",
1601
+ "swell theme pull mytheme",
1602
+ "swell theme pull mytheme mytheme-folder",
1603
+ "swell theme pull --force",
1604
+ "swell theme pull --storefront-select",
1605
+ "swell theme pull --storefront-id <id>"
1606
+ ],
1607
+ "flags": {
1608
+ "force": {
1609
+ "description": "force pull all theme files",
1610
+ "name": "force",
1611
+ "allowNo": false,
1612
+ "type": "boolean"
1613
+ },
1614
+ "storefront-id": {
1615
+ "description": "identify a storefront to pull theme files from",
1616
+ "name": "storefront-id",
1617
+ "hasDynamicHelp": false,
1618
+ "multiple": false,
1619
+ "type": "option"
1620
+ },
1621
+ "storefront-select": {
1622
+ "description": "prompt to select a storefront to pull theme files to",
1623
+ "name": "storefront-select",
1624
+ "allowNo": false,
1625
+ "type": "boolean"
1626
+ },
1627
+ "sync-app": {
1628
+ "description": "pull app files in addition to theme files to",
1629
+ "name": "sync-app",
1630
+ "allowNo": false,
1631
+ "type": "boolean"
1632
+ }
1633
+ },
1634
+ "hasDynamicHelp": false,
1635
+ "hiddenAliases": [],
1636
+ "id": "theme:pull",
1637
+ "pluginAlias": "@swell/cli",
1638
+ "pluginName": "@swell/cli",
1639
+ "pluginType": "core",
1640
+ "summary": "Pull theme files from Swell to your local machine.",
1641
+ "isESM": true,
1642
+ "relativePath": [
1643
+ "dist",
1644
+ "commands",
1645
+ "theme",
1646
+ "pull.js"
1647
+ ],
1648
+ "delayOrientation": true,
1649
+ "orientation": {}
1650
+ },
1651
+ "theme:push": {
1652
+ "aliases": [],
1653
+ "args": {
1654
+ "file": {
1655
+ "description": "relative path to a configuration file or directory to push",
1656
+ "name": "file"
1657
+ }
1658
+ },
1659
+ "description": "Push all theme files, a specific file, or a specific configuration\ntype to an theme in your store's test environment.\n\nIf the theme does not exist, it will be created and its global ID saved to a .swellrc file.\n\n- If no file is specified, all configuration files will be pushed to the store.\n This includes the theme icon (assets/icon.png) and swell.json.\n- If a file is specified, only that file will be pushed to the store.\n- If a directory is specified, only files in that directory will be pushed.\n\nTheme file directories:\nassets/\ntheme/",
1660
+ "examples": [
1661
+ "swell theme push",
1662
+ "swell theme push assets",
1663
+ "swell theme push theme/sections",
1664
+ "swell theme push --sync-app",
1665
+ "swell theme push --force",
1666
+ "swell theme push --storefront-select",
1667
+ "swell theme push --storefront-id <id>"
1668
+ ],
1669
+ "flags": {
1670
+ "force": {
1671
+ "description": "force push all files",
1672
+ "name": "force",
1673
+ "allowNo": false,
1674
+ "type": "boolean"
1675
+ },
1676
+ "storefront-id": {
1677
+ "description": "identify a storefront to push theme files to",
1678
+ "name": "storefront-id",
1679
+ "hasDynamicHelp": false,
1680
+ "multiple": false,
1681
+ "type": "option"
1682
+ },
1683
+ "storefront-select": {
1684
+ "description": "prompt to select a storefront to push theme files to",
1685
+ "name": "storefront-select",
1686
+ "allowNo": false,
1687
+ "type": "boolean"
1688
+ },
1689
+ "sync-app": {
1690
+ "description": "push app files in addition to theme files",
1691
+ "name": "sync-app",
1692
+ "allowNo": false,
1693
+ "type": "boolean"
1694
+ }
1695
+ },
1696
+ "hasDynamicHelp": false,
1697
+ "hiddenAliases": [],
1698
+ "id": "theme:push",
1699
+ "pluginAlias": "@swell/cli",
1700
+ "pluginName": "@swell/cli",
1701
+ "pluginType": "core",
1702
+ "summary": "Push local files to your Swell theme.",
1703
+ "delayOrientation": true,
1704
+ "orientation": {},
1705
+ "isESM": true,
1706
+ "relativePath": [
1707
+ "dist",
1708
+ "commands",
1709
+ "theme",
1710
+ "push.js"
1711
+ ]
1712
+ },
1713
+ "app:frontend:deploy": {
1714
+ "aliases": [],
1715
+ "args": {},
1716
+ "description": "Creates a new build using the relevant command depending on your frontend framework.\nOnce the build succeeds, this command will invoke Cloudflare Wrangler to upload\nbuild assets using your own Cloudflare account. Once complete, Swell will update\nthe app's deployment URL and push the updated frontend files.",
1717
+ "examples": [
1718
+ "swell app frontend deploy",
1719
+ "swell app frontend deploy --force",
1720
+ "swell app frontend deploy --storefront-select",
1721
+ "swell app frontend deploy --storefront-id <id>"
1722
+ ],
1723
+ "flags": {
1724
+ "app-path": {
1725
+ "description": "path to your app directory",
1726
+ "name": "app-path",
1727
+ "hasDynamicHelp": false,
1728
+ "multiple": false,
1729
+ "type": "option"
1730
+ },
1731
+ "force": {
1732
+ "description": "force push and build all frontend files",
1733
+ "name": "force",
1734
+ "allowNo": false,
1735
+ "type": "boolean"
1736
+ },
1737
+ "storefront-id": {
1738
+ "description": "identify a storefront to preview deployment with",
1739
+ "name": "storefront-id",
1740
+ "hasDynamicHelp": false,
1741
+ "multiple": false,
1742
+ "type": "option"
1743
+ },
1744
+ "storefront-select": {
1745
+ "description": "prompt to select a storefront to preview deployment with",
1746
+ "name": "storefront-select",
1747
+ "allowNo": false,
1748
+ "type": "boolean"
1749
+ }
1750
+ },
1751
+ "hasDynamicHelp": false,
1752
+ "hiddenAliases": [],
1753
+ "id": "app:frontend:deploy",
1754
+ "pluginAlias": "@swell/cli",
1755
+ "pluginName": "@swell/cli",
1756
+ "pluginType": "core",
1757
+ "strict": true,
1758
+ "summary": "Push frontend files to your Swell app.",
1759
+ "orientation": {
1760
+ "env": "test"
1761
+ },
1762
+ "isESM": true,
1763
+ "relativePath": [
1764
+ "dist",
1765
+ "commands",
1766
+ "app",
1767
+ "frontend",
1768
+ "deploy.js"
1769
+ ]
1770
+ },
1771
+ "app:frontend:dev": {
1772
+ "aliases": [],
1773
+ "args": {},
1774
+ "examples": [
1775
+ "swell app frontend dev",
1776
+ "swell app frontend dev --no-push",
1777
+ "swell app frontend dev --port 3000",
1778
+ "swell app frontend dev --storefront-select",
1779
+ "swell app frontend dev --storefront-id <id>"
1780
+ ],
1781
+ "flags": {
1782
+ "app-path": {
1783
+ "description": "path to your app directory",
1784
+ "name": "app-path",
1785
+ "hasDynamicHelp": false,
1786
+ "multiple": false,
1787
+ "type": "option"
1788
+ },
1789
+ "no-push": {
1790
+ "description": "skip pushing app files initially",
1791
+ "name": "no-push",
1792
+ "allowNo": false,
1793
+ "type": "boolean"
1794
+ },
1795
+ "port": {
1796
+ "char": "p",
1797
+ "description": "override the default port to run the app locally",
1798
+ "name": "port",
1799
+ "hasDynamicHelp": false,
1800
+ "multiple": false,
1801
+ "type": "option"
1802
+ },
1803
+ "storefront-id": {
1804
+ "description": "identify a storefront to preview with and push theme files to",
1805
+ "name": "storefront-id",
1806
+ "hasDynamicHelp": false,
1807
+ "multiple": false,
1808
+ "type": "option"
1809
+ },
1810
+ "storefront-select": {
1811
+ "description": "prompt to select a storefront to preview with",
1812
+ "name": "storefront-select",
1813
+ "allowNo": false,
1814
+ "type": "boolean"
1815
+ }
1816
+ },
1817
+ "hasDynamicHelp": false,
1818
+ "hiddenAliases": [],
1819
+ "id": "app:frontend:dev",
1820
+ "pluginAlias": "@swell/cli",
1821
+ "pluginName": "@swell/cli",
1822
+ "pluginType": "core",
1823
+ "strict": true,
1824
+ "summary": "Run a frontend app in dev mode from your local machine.",
1825
+ "orientation": {
1826
+ "env": "test"
1827
+ },
1828
+ "isESM": true,
1829
+ "relativePath": [
1830
+ "dist",
1831
+ "commands",
1832
+ "app",
1833
+ "frontend",
1834
+ "dev.js"
1835
+ ]
1090
1836
  }
1091
1837
  },
1092
- "version": "2.0.1-alpha.16"
1838
+ "version": "2.0.1-alpha.18"
1093
1839
  }