@shell-shock/plugin-update 0.1.66 → 0.1.68

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 (52) hide show
  1. package/README.md +16 -7
  2. package/dist/components/index.cjs +1 -2
  3. package/dist/components/index.mjs +2 -2
  4. package/dist/components/update-builtin.cjs +143 -236
  5. package/dist/components/update-builtin.d.cts +1 -2
  6. package/dist/components/update-builtin.d.cts.map +1 -1
  7. package/dist/components/update-builtin.d.mts +1 -2
  8. package/dist/components/update-builtin.mjs +11 -101
  9. package/dist/components/update-command.cjs +16 -21
  10. package/dist/components/update-command.d.cts.map +1 -1
  11. package/dist/components/update-command.mjs +5 -10
  12. package/dist/generator.cjs +33 -0
  13. package/dist/generator.d.cts +10 -0
  14. package/dist/generator.d.cts.map +1 -0
  15. package/dist/generator.d.mts +10 -0
  16. package/dist/generator.d.mts.map +1 -0
  17. package/dist/generator.mjs +32 -0
  18. package/dist/generator.mjs.map +1 -0
  19. package/dist/index.cjs +21 -34
  20. package/dist/index.d.cts +2 -2
  21. package/dist/index.d.cts.map +1 -1
  22. package/dist/index.d.mts +2 -2
  23. package/dist/index.mjs +20 -32
  24. package/dist/schemas/env.cjs +27 -0
  25. package/dist/schemas/env.d.cts +145 -0
  26. package/dist/schemas/env.d.cts.map +1 -0
  27. package/dist/schemas/env.d.mts +145 -0
  28. package/dist/{types → schemas}/env.d.mts.map +1 -1
  29. package/dist/schemas/env.mjs +27 -0
  30. package/dist/schemas/index.cjs +4 -0
  31. package/dist/schemas/index.d.cts +2 -0
  32. package/dist/schemas/index.d.mts +2 -0
  33. package/dist/schemas/index.mjs +3 -0
  34. package/dist/types/index.cjs +2 -7
  35. package/dist/types/index.mjs +3 -3
  36. package/dist/types/package-manager.cjs +1 -12
  37. package/dist/types/package-manager.d.cts.map +1 -1
  38. package/dist/types/package-manager.mjs +1 -10
  39. package/dist/types/plugin.cjs +0 -75
  40. package/dist/types/plugin.d.cts +0 -1
  41. package/dist/types/plugin.d.cts.map +1 -1
  42. package/dist/types/plugin.d.mts +0 -1
  43. package/dist/types/plugin.mjs +1 -71
  44. package/package.json +58 -31
  45. package/dist/_virtual/_rolldown/runtime.cjs +0 -29
  46. package/dist/types/env.cjs +0 -12
  47. package/dist/types/env.d.cts +0 -12
  48. package/dist/types/env.d.cts.map +0 -1
  49. package/dist/types/env.d.mts +0 -12
  50. package/dist/types/env.mjs +0 -11
  51. package/dist/types/plugin.mjs.map +0 -1
  52. /package/dist/{types → schemas}/env.mjs.map +0 -0
@@ -1,5 +1,4 @@
1
- import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
2
-
1
+ import { BuiltinFileProps } from "@shell-shock/core/contexts/power-plant";
3
2
  //#region src/components/update-builtin.d.ts
4
3
  /**
5
4
  * The `locatePackageJson` handler function declaration code for the Shell Shock project.
@@ -1 +1 @@
1
- {"version":3,"file":"update-builtin.d.cts","names":[],"sources":["../../src/components/update-builtin.tsx"],"mappings":";;;;;AA6CA;iBAAgB,oCAAA,6BAAoC,QAAA;;;AAAA;iBA8FpC,iCAAA,6BAAiC,QAAA;;;;iBAsFjC,oCAAA,6BAAoC,QAAA;AAApD;;;AAAA,iBA0IgB,kCAAA,6BAAkC,QAAA;AA1IE;AA0IpD;;AA1IoD,iBAiTpC,mCAAA,6BAAmC,QAAA;;AAvKD;AAuKlD;iBA2CgB,mCAAA,6BAAmC,QAAA;;;AA3CA;iBAoHnC,yBAAA,6BAAyB,QAAA;;;;iBAuFzB,yCAAA,6BAAyC,QAAA;AAvFzD;;;AAAA,iBAoHgB,4CAAA,6BAA4C,QAAA;AApHnB;AAuFzC;;AAvFyC,iBA2KzB,kCAAA,6BAAkC,QAAA;;AApFO;AA6BzD;iBA4LgB,+BAAA,6BAA+B,QAAA;AAAA,UAmH9B,kBAAA,SAA2B,IAAI,CAC9C,gBAAA;AAhT0D;AAuD5D;;AAvD4D,iBAuT5C,aAAA,CAAc,KAAA,EAAO,kBAAkB,4BAAA,QAAA"}
1
+ {"version":3,"file":"update-builtin.d.cts","names":[],"sources":["../../src/components/update-builtin.tsx"],"mappings":";;;;;iBA+CgB,iEAAoC;;;;iBA8FpC,8DAAiC;;;;iBAsFjC,iEAAoC;;;;iBA0IpC,+DAAkC;;;;iBAuKlC,gEAAmC;;;;iBA2CnC,gEAAmC;;;;iBAyEnC,sDAAyB;;;;iBAuFzB,sEAAyC;;;;iBA6BzC,yEAA4C;;;;iBAuD5C,+DAAkC;;;;iBAqIlC,4DAA+B;UAmH9B,2BAA2B,KAC1C;;;;iBAOc,cAAc,OAAO,8CAAkB"}
@@ -1,5 +1,4 @@
1
- import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
2
-
1
+ import { BuiltinFileProps } from "@shell-shock/core/contexts/power-plant";
3
2
  //#region src/components/update-builtin.d.ts
4
3
  /**
5
4
  * The `locatePackageJson` handler function declaration code for the Shell Shock project.
@@ -1,38 +1,17 @@
1
+ import { defu } from "defu";
1
2
  import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
2
- import defu from "defu";
3
3
  import { Show, code, splitProps } from "@alloy-js/core";
4
4
  import { ElseClause, ElseIfClause, FunctionDeclaration, IfStatement, InterfaceDeclaration, VarDeclaration } from "@alloy-js/typescript";
5
- import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
6
- import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
7
- import { InterfaceMember, TSDoc, TSDocParam, TSDocRemarks, TSDocReturns, TypeDeclaration } from "@powerlines/plugin-alloy/typescript";
8
- import { BuiltinFile } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
5
+ import { Spacing } from "@power-plant/alloy-js/core/components/spacing";
6
+ import { InterfaceMember, TSDoc, TSDocParam, TSDocRemarks, TSDocReturns, TypeDeclaration } from "@power-plant/alloy-js/typescript";
7
+ import { BuiltinFile, usePowerlines } from "@shell-shock/core/contexts/power-plant";
9
8
 
10
9
  //#region src/components/update-builtin.tsx
11
- const __ΩOmit = [
12
- "T",
13
- "K",
14
- () => __ΩPick,
15
- () => __ΩExclude,
16
- "Omit",
17
- "b!b\"e!!e!!ge!\"o$#o##w%y"
18
- ];
19
- const __ΩPick = [
20
- "T",
21
- "K",
22
- "Pick",
23
- "l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
24
- ];
25
- const __ΩExclude = [
26
- "T",
27
- "U",
28
- "Exclude",
29
- "l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
30
- ];
31
10
  /**
32
11
  * The `locatePackageJson` handler function declaration code for the Shell Shock project.
33
12
  */
34
13
  function LocatePackageJsonFunctionDeclaration() {
35
- const context = (usePowerlines.Ω = [["UpdatePluginContext", "\"w!"]], usePowerlines());
14
+ const context = usePowerlines();
36
15
  return [
37
16
  createComponent(InterfaceDeclaration, {
38
17
  "export": true,
@@ -130,11 +109,6 @@ function LocatePackageJsonFunctionDeclaration() {
130
109
  })
131
110
  ];
132
111
  }
133
- LocatePackageJsonFunctionDeclaration.__type = [
134
- "LocatePackageJsonFunctionDeclaration",
135
- "The `locatePackageJson` handler function declaration code for the Shell Shock project.",
136
- "P\"/!?\""
137
- ];
138
112
  /**
139
113
  * The `locateLockfile` handler function declaration code for the Shell Shock project.
140
114
  */
@@ -223,11 +197,6 @@ function LocateLockfileFunctionDeclaration() {
223
197
  })
224
198
  ];
225
199
  }
226
- LocateLockfileFunctionDeclaration.__type = [
227
- "LocateLockfileFunctionDeclaration",
228
- "The `locateLockfile` handler function declaration code for the Shell Shock project.",
229
- "P\"/!?\""
230
- ];
231
200
  /**
232
201
  * The `getPackageManager` handler function declaration code for the Shell Shock project.
233
202
  */
@@ -378,11 +347,6 @@ function GetPackageManagerFunctionDeclaration() {
378
347
  })
379
348
  ];
380
349
  }
381
- GetPackageManagerFunctionDeclaration.__type = [
382
- "GetPackageManagerFunctionDeclaration",
383
- "The `getPackageManager` handler function declaration code for the Shell Shock project.",
384
- "P\"/!?\""
385
- ];
386
350
  /**
387
351
  * The `fetchNpmPackage` handler function declaration code for the Shell Shock project.
388
352
  */
@@ -567,16 +531,11 @@ function FetchNpmPackageFunctionDeclaration() {
567
531
  })
568
532
  ];
569
533
  }
570
- FetchNpmPackageFunctionDeclaration.__type = [
571
- "FetchNpmPackageFunctionDeclaration",
572
- "The `fetchNpmPackage` handler function declaration code for the Shell Shock project.",
573
- "P\"/!?\""
574
- ];
575
534
  /**
576
535
  * The `getLatestVersion` handler function declaration code for the Shell Shock project.
577
536
  */
578
537
  function GetLatestVersionFunctionDeclaration() {
579
- const context = (usePowerlines.Ω = [["UpdatePluginContext", "\"w!"]], usePowerlines());
538
+ const context = usePowerlines();
580
539
  return [createComponent(TSDoc, {
581
540
  heading: "Get the latest version of the application from the npm registry.",
582
541
  get children() {
@@ -614,16 +573,11 @@ function GetLatestVersionFunctionDeclaration() {
614
573
  }
615
574
  })];
616
575
  }
617
- GetLatestVersionFunctionDeclaration.__type = [
618
- "GetLatestVersionFunctionDeclaration",
619
- "The `getLatestVersion` handler function declaration code for the Shell Shock project.",
620
- "P\"/!?\""
621
- ];
622
576
  /**
623
577
  * The `update` handler function declaration code for the Shell Shock project.
624
578
  */
625
579
  function GetUpdateCommandFunctionDeclaration() {
626
- const context = (usePowerlines.Ω = [["UpdatePluginContext", "\"w!"]], usePowerlines());
580
+ const context = usePowerlines();
627
581
  return [createComponent(TSDoc, {
628
582
  heading: "A function to get the update command for a specific package manager.",
629
583
  get children() {
@@ -695,11 +649,6 @@ function GetUpdateCommandFunctionDeclaration() {
695
649
  }
696
650
  })];
697
651
  }
698
- GetUpdateCommandFunctionDeclaration.__type = [
699
- "GetUpdateCommandFunctionDeclaration",
700
- "The `update` handler function declaration code for the Shell Shock project.",
701
- "P\"/!?\""
702
- ];
703
652
  /**
704
653
  * The `update` handler function declaration code for the Shell Shock project.
705
654
  */
@@ -798,11 +747,6 @@ function UpdateFunctionDeclaration() {
798
747
  })
799
748
  ];
800
749
  }
801
- UpdateFunctionDeclaration.__type = [
802
- "UpdateFunctionDeclaration",
803
- "The `update` handler function declaration code for the Shell Shock project.",
804
- "P\"/!?\""
805
- ];
806
750
  /**
807
751
  * The `updateVersionCheckFile` handler function declaration code for the Shell Shock project.
808
752
  */
@@ -829,16 +773,11 @@ function UpdateVersionCheckFileFunctionDeclaration() {
829
773
  }
830
774
  })];
831
775
  }
832
- UpdateVersionCheckFileFunctionDeclaration.__type = [
833
- "UpdateVersionCheckFileFunctionDeclaration",
834
- "The `updateVersionCheckFile` handler function declaration code for the Shell Shock project.",
835
- "P\"/!?\""
836
- ];
837
776
  /**
838
777
  * The `isCheckForUpdatesRequired` handler function declaration code for the Shell Shock project.
839
778
  */
840
779
  function IsCheckForUpdatesRequiredFunctionDeclaration() {
841
- const context = (usePowerlines.Ω = [["UpdatePluginContext", "\"w!"]], usePowerlines());
780
+ const context = usePowerlines();
842
781
  return [createComponent(TSDoc, {
843
782
  heading: "A helper function that verifies if a check for updates is required.",
844
783
  get children() {
@@ -894,16 +833,11 @@ function IsCheckForUpdatesRequiredFunctionDeclaration() {
894
833
  }
895
834
  })];
896
835
  }
897
- IsCheckForUpdatesRequiredFunctionDeclaration.__type = [
898
- "IsCheckForUpdatesRequiredFunctionDeclaration",
899
- "The `isCheckForUpdatesRequired` handler function declaration code for the Shell Shock project.",
900
- "P\"/!?\""
901
- ];
902
836
  /**
903
837
  * The `checkForUpdates` handler function declaration code for the Shell Shock project.
904
838
  */
905
839
  function CheckForUpdatesFunctionDeclaration() {
906
- const context = (usePowerlines.Ω = [["UpdatePluginContext", "\"w!"]], usePowerlines());
840
+ const context = usePowerlines();
907
841
  return [
908
842
  createComponent(InterfaceDeclaration, {
909
843
  "export": true,
@@ -1045,16 +979,11 @@ function CheckForUpdatesFunctionDeclaration() {
1045
979
  })
1046
980
  ];
1047
981
  }
1048
- CheckForUpdatesFunctionDeclaration.__type = [
1049
- "CheckForUpdatesFunctionDeclaration",
1050
- "The `checkForUpdates` handler function declaration code for the Shell Shock project.",
1051
- "P\"/!?\""
1052
- ];
1053
982
  /**
1054
983
  * The `getChangelog` handler function declaration code for the Shell Shock project.
1055
984
  */
1056
985
  function GetChangelogFunctionDeclaration() {
1057
- const context = (usePowerlines.Ω = [["UpdatePluginContext", "\"w!"]], usePowerlines());
986
+ const context = usePowerlines();
1058
987
  return [
1059
988
  createComponent(InterfaceDeclaration, {
1060
989
  "export": true,
@@ -1170,18 +1099,6 @@ function GetChangelogFunctionDeclaration() {
1170
1099
  })
1171
1100
  ];
1172
1101
  }
1173
- GetChangelogFunctionDeclaration.__type = [
1174
- "GetChangelogFunctionDeclaration",
1175
- "The `getChangelog` handler function declaration code for the Shell Shock project.",
1176
- "P\"/!?\""
1177
- ];
1178
- const __ΩUpdateBuiltinProps = [
1179
- () => __ΩOmit,
1180
- "id",
1181
- "description",
1182
- "UpdateBuiltinProps",
1183
- "P!P.\".#Jo!#Mw$y"
1184
- ];
1185
1102
  /**
1186
1103
  * A built-in update module for Shell Shock.
1187
1104
  */
@@ -1276,14 +1193,7 @@ function UpdateBuiltin(props) {
1276
1193
  }
1277
1194
  }));
1278
1195
  }
1279
- UpdateBuiltin.__type = [
1280
- () => __ΩUpdateBuiltinProps,
1281
- "props",
1282
- "UpdateBuiltin",
1283
- "A built-in update module for Shell Shock.",
1284
- "Pn!2\"\"/#?$"
1285
- ];
1286
1196
 
1287
1197
  //#endregion
1288
- export { CheckForUpdatesFunctionDeclaration, FetchNpmPackageFunctionDeclaration, GetChangelogFunctionDeclaration, GetLatestVersionFunctionDeclaration, GetPackageManagerFunctionDeclaration, GetUpdateCommandFunctionDeclaration, IsCheckForUpdatesRequiredFunctionDeclaration, LocateLockfileFunctionDeclaration, LocatePackageJsonFunctionDeclaration, UpdateBuiltin, UpdateFunctionDeclaration, UpdateVersionCheckFileFunctionDeclaration, __ΩUpdateBuiltinProps };
1198
+ export { CheckForUpdatesFunctionDeclaration, FetchNpmPackageFunctionDeclaration, GetChangelogFunctionDeclaration, GetLatestVersionFunctionDeclaration, GetPackageManagerFunctionDeclaration, GetUpdateCommandFunctionDeclaration, IsCheckForUpdatesRequiredFunctionDeclaration, LocateLockfileFunctionDeclaration, LocatePackageJsonFunctionDeclaration, UpdateBuiltin, UpdateFunctionDeclaration, UpdateVersionCheckFileFunctionDeclaration };
1289
1199
  //# sourceMappingURL=update-builtin.mjs.map
@@ -2,10 +2,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
3
  let _alloy_js_core = require("@alloy-js/core");
4
4
  let _alloy_js_typescript = require("@alloy-js/typescript");
5
- let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
6
- let _powerlines_plugin_alloy_typescript = require("@powerlines/plugin-alloy/typescript");
7
- let _powerlines_plugin_alloy_core = require("@powerlines/plugin-alloy/core");
8
- let _powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
5
+ let _power_plant_alloy_js_typescript = require("@power-plant/alloy-js/typescript");
6
+ let _shell_shock_core_contexts_power_plant = require("@shell-shock/core/contexts/power-plant");
7
+ let _power_plant_alloy_js_core = require("@power-plant/alloy-js/core");
8
+ let _power_plant_alloy_js_typescript_components_tsdoc = require("@power-plant/alloy-js/typescript/components/tsdoc");
9
9
  let _stryke_path = require("@stryke/path");
10
10
 
11
11
  //#region src/components/update-command.tsx
@@ -13,8 +13,8 @@ let _stryke_path = require("@stryke/path");
13
13
  * The Update command's handler wrapper for the Shell Shock project.
14
14
  */
15
15
  function UpdateCommand() {
16
- const context = (_powerlines_plugin_alloy_core_contexts_context.usePowerlines.Ω = [["UpdatePluginContext", "\"w!"]], (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)());
17
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.TypescriptFile, {
16
+ const context = (0, _shell_shock_core_contexts_power_plant.usePowerlines)();
17
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.TypescriptFile, {
18
18
  get path() {
19
19
  return (0, _stryke_path.joinPaths)(context.entryPath, "update", "command.ts");
20
20
  },
@@ -32,44 +32,44 @@ function UpdateCommand() {
32
32
  ] },
33
33
  get children() {
34
34
  return [
35
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, { heading: "Options for the Update command." }),
35
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, { heading: "Options for the Update command." }),
36
36
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
37
37
  "export": true,
38
38
  name: "UpdateOptions",
39
39
  get children() {
40
40
  return [
41
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
41
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
42
42
  heading: "Whether to update to the latest version.",
43
43
  get children() {
44
- return [(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `If set to \`true\`, the command will attempt to update to the latest version. This option takes precedence over the \`version\` option.` }), (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocDefaultValue, {
44
+ return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `If set to \`true\`, the command will attempt to update to the latest version. This option takes precedence over the \`version\` option.` }), (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocDefaultValue, {
45
45
  type: "boolean",
46
46
  defaultValue: false
47
47
  })];
48
48
  }
49
49
  }),
50
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.InterfaceMember, {
50
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.InterfaceMember, {
51
51
  name: "latest",
52
52
  type: "boolean"
53
53
  }),
54
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core.Spacing, {}),
55
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
54
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core.Spacing, {}),
55
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
56
56
  heading: "A specific application version to update to.",
57
57
  get children() {
58
- return [(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `The command will attempt to update to the specified version. The version should be a valid semantic version string, or \`latest\` to update to the latest version.` }), (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocDefaultValue, {
58
+ return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `The command will attempt to update to the specified version. The version should be a valid semantic version string, or \`latest\` to update to the latest version.` }), (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocDefaultValue, {
59
59
  type: "string",
60
60
  defaultValue: "latest"
61
61
  })];
62
62
  }
63
63
  }),
64
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.InterfaceMember, {
64
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.InterfaceMember, {
65
65
  name: "version",
66
66
  type: "string"
67
67
  })
68
68
  ];
69
69
  }
70
70
  }),
71
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core.Spacing, {}),
72
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, { heading: "Handler logic for the \\`update\\` command." }),
71
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core.Spacing, {}),
72
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, { heading: "Handler logic for the \\`update\\` command." }),
73
73
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
74
74
  "export": true,
75
75
  "default": true,
@@ -85,11 +85,6 @@ function UpdateCommand() {
85
85
  }
86
86
  });
87
87
  }
88
- UpdateCommand.__type = [
89
- "UpdateCommand",
90
- "The Update command's handler wrapper for the Shell Shock project.",
91
- "P\"/!?\""
92
- ];
93
88
 
94
89
  //#endregion
95
90
  exports.UpdateCommand = UpdateCommand;
@@ -1 +1 @@
1
- {"version":3,"file":"update-command.d.cts","names":[],"sources":["../../src/components/update-command.tsx"],"mappings":";;AAwCA;;iBAAgB,aAAA,6BAAa,QAAA"}
1
+ {"version":3,"file":"update-command.d.cts","names":[],"sources":["../../src/components/update-command.tsx"],"mappings":";;;;iBAwCgB,0CAAa"}
@@ -1,10 +1,10 @@
1
1
  import { createComponent } from "@alloy-js/core/jsx-runtime";
2
2
  import { code } from "@alloy-js/core";
3
3
  import { FunctionDeclaration, InterfaceDeclaration } from "@alloy-js/typescript";
4
- import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
5
- import { InterfaceMember, TypescriptFile } from "@powerlines/plugin-alloy/typescript";
6
- import { Spacing } from "@powerlines/plugin-alloy/core";
7
- import { TSDoc as TSDoc$1, TSDocDefaultValue, TSDocRemarks as TSDocRemarks$1 } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
4
+ import { InterfaceMember, TypescriptFile } from "@power-plant/alloy-js/typescript";
5
+ import { usePowerlines } from "@shell-shock/core/contexts/power-plant";
6
+ import { Spacing } from "@power-plant/alloy-js/core";
7
+ import { TSDoc as TSDoc$1, TSDocDefaultValue, TSDocRemarks as TSDocRemarks$1 } from "@power-plant/alloy-js/typescript/components/tsdoc";
8
8
  import { joinPaths } from "@stryke/path";
9
9
 
10
10
  //#region src/components/update-command.tsx
@@ -12,7 +12,7 @@ import { joinPaths } from "@stryke/path";
12
12
  * The Update command's handler wrapper for the Shell Shock project.
13
13
  */
14
14
  function UpdateCommand() {
15
- const context = (usePowerlines.Ω = [["UpdatePluginContext", "\"w!"]], usePowerlines());
15
+ const context = usePowerlines();
16
16
  return createComponent(TypescriptFile, {
17
17
  get path() {
18
18
  return joinPaths(context.entryPath, "update", "command.ts");
@@ -84,11 +84,6 @@ function UpdateCommand() {
84
84
  }
85
85
  });
86
86
  }
87
- UpdateCommand.__type = [
88
- "UpdateCommand",
89
- "The Update command's handler wrapper for the Shell Shock project.",
90
- "P\"/!?\""
91
- ];
92
87
 
93
88
  //#endregion
94
89
  export { UpdateCommand };
@@ -0,0 +1,33 @@
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_components_update_builtin = require('./components/update-builtin.cjs');
3
+ const require_components_update_command = require('./components/update-command.cjs');
4
+ require('./components/index.cjs');
5
+ let _shell_shock_core_helpers_power_plant = require("@shell-shock/core/helpers/power-plant");
6
+ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
7
+
8
+ //#region src/generator.tsx
9
+ /**
10
+ * Power Plant generator for Shell Shock update builtins and commands.
11
+ *
12
+ * @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
13
+ */
14
+ const updateGenerator = (0, _shell_shock_core_helpers_power_plant.defineCommandGenerator)({
15
+ meta: {
16
+ name: "shell-shock-update",
17
+ title: "Shell Shock Update Generator",
18
+ description: "Generates update built-in and command modules from the Shell Shock command tree specification.",
19
+ version: "1.0",
20
+ tags: [
21
+ "shell-shock",
22
+ "update",
23
+ "alloy-js"
24
+ ]
25
+ },
26
+ generator: async (_commands, options) => {
27
+ await (0, _shell_shock_core_helpers_power_plant.renderCommandTemplate)(options, [(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_update_builtin.UpdateBuiltin, {}), (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_update_command.UpdateCommand, {})]);
28
+ }
29
+ });
30
+
31
+ //#endregion
32
+ exports.default = updateGenerator;
33
+ exports.updateGenerator = updateGenerator;
@@ -0,0 +1,10 @@
1
+ //#region src/generator.d.ts
2
+ /**
3
+ * Power Plant generator for Shell Shock update builtins and commands.
4
+ *
5
+ * @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
6
+ */
7
+ declare const updateGenerator: import("@power-plant/core").GeneratorConfigObject<Record<string, import("@shell-shock/schema").SerializedCommandTree>, import("@shell-shock/core/helpers/power-plant").CommandGeneratorOptions, void>;
8
+ //#endregion
9
+ export { updateGenerator as default, updateGenerator };
10
+ //# sourceMappingURL=generator.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.cts","names":[],"sources":["../src/generator.tsx"],"mappings":";;;;;;cA6Ba,6CAAe,sBAAA,6CAAA,wEAAA"}
@@ -0,0 +1,10 @@
1
+ //#region src/generator.d.ts
2
+ /**
3
+ * Power Plant generator for Shell Shock update builtins and commands.
4
+ *
5
+ * @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
6
+ */
7
+ declare const updateGenerator: import("@power-plant/core").GeneratorConfigObject<Record<string, import("@shell-shock/schema").SerializedCommandTree>, import("@shell-shock/core/helpers/power-plant").CommandGeneratorOptions, void>;
8
+ //#endregion
9
+ export { updateGenerator as default, updateGenerator };
10
+ //# sourceMappingURL=generator.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.mts","names":[],"sources":["../src/generator.tsx"],"mappings":""}
@@ -0,0 +1,32 @@
1
+ import { UpdateBuiltin } from "./components/update-builtin.mjs";
2
+ import { UpdateCommand } from "./components/update-command.mjs";
3
+ import "./components/index.mjs";
4
+ import { defineCommandGenerator, renderCommandTemplate } from "@shell-shock/core/helpers/power-plant";
5
+ import { createComponent } from "@alloy-js/core/jsx-runtime";
6
+
7
+ //#region src/generator.tsx
8
+ /**
9
+ * Power Plant generator for Shell Shock update builtins and commands.
10
+ *
11
+ * @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
12
+ */
13
+ const updateGenerator = defineCommandGenerator({
14
+ meta: {
15
+ name: "shell-shock-update",
16
+ title: "Shell Shock Update Generator",
17
+ description: "Generates update built-in and command modules from the Shell Shock command tree specification.",
18
+ version: "1.0",
19
+ tags: [
20
+ "shell-shock",
21
+ "update",
22
+ "alloy-js"
23
+ ]
24
+ },
25
+ generator: async (_commands, options) => {
26
+ await renderCommandTemplate(options, [createComponent(UpdateBuiltin, {}), createComponent(UpdateCommand, {})]);
27
+ }
28
+ });
29
+
30
+ //#endregion
31
+ export { updateGenerator as default, updateGenerator };
32
+ //# sourceMappingURL=generator.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.mjs","names":[],"sources":[],"mappings":""}
package/dist/index.cjs CHANGED
@@ -1,48 +1,40 @@
1
1
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
- const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
- const require_components_update_builtin = require('./components/update-builtin.cjs');
4
- const require_components_update_command = require('./components/update-command.cjs');
5
- require('./components/index.cjs');
6
- let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
7
- let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
2
+ const require_generator = require('./generator.cjs');
3
+ let _shell_shock_core_helpers_power_plant = require("@shell-shock/core/helpers/power-plant");
8
4
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
9
5
  let _stryke_path_join = require("@stryke/path/join");
10
6
  let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
11
7
  let defu = require("defu");
12
- defu = require_runtime.__toESM(defu, 1);
8
+ let node_module = require("node:module");
13
9
 
14
10
  //#region src/index.tsx
15
- function __assignType(fn, args) {
16
- fn.__type = args;
17
- return fn;
18
- }
11
+ const require$1 = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
19
12
  /**
20
13
  * The Update - Shell Shock plugin to add version check functionality and update commands to a Shell Shock application.
21
14
  */
22
- const plugin = __assignType((options = {}) => {
15
+ const plugin = (options = {}) => {
23
16
  return {
24
17
  name: "shell-shock/update",
25
- config: __assignType(function config() {
18
+ config() {
26
19
  this.debug("Providing default configuration for the Shell Shock `update` plugin.");
27
20
  return {
28
- update: (0, defu.default)({ command: { name: (0, _stryke_type_checks_is_set_string.isSetString)(options.command) ? options.command : "update" } }, options, {
21
+ update: (0, defu.defu)({ command: { name: (0, _stryke_type_checks_is_set_string.isSetString)(options.command) ? options.command : "update" } }, options, {
29
22
  type: "confirm",
30
- staleTime: 2160 * 60 * 1e3
23
+ staleTime: 1296e5
31
24
  }),
32
25
  env: {
33
- config: "@shell-shock/plugin-update/types/env#ShellShockUpdateEnv",
26
+ config: {
27
+ file: require$1.resolve("@shell-shock/plugin-update/schemas/env"),
28
+ export: "envSchema"
29
+ },
34
30
  validate: false
35
31
  }
36
32
  };
37
- }, ["config", "P\"/!"]),
33
+ },
38
34
  configResolved() {
39
35
  this.debug("Adding the CLI update commands to the application context.");
40
36
  this.inputs ??= [];
41
- if (this.inputs.some(__assignType((input) => input.id === this.config.update.command.name, [
42
- "input",
43
- "",
44
- "P\"2!\"/\""
45
- ]))) this.info("The `update` command already exists in the commands list. If you would like the update command to be managed by the `@shell-shock/plugin-update` package, please remove or rename the command.");
37
+ if (this.inputs.some((input) => input.id === this.config.update.command.name)) this.info("The `update` command already exists in the commands list. If you would like the update command to be managed by the `@shell-shock/plugin-update` package, please remove or rename the command.");
46
38
  else this.inputs.push({
47
39
  id: this.config.update.command.name,
48
40
  alias: ["upgrade"],
@@ -60,19 +52,14 @@ const plugin = __assignType((options = {}) => {
60
52
  ...this.config.update.command
61
53
  });
62
54
  },
63
- prepare: __assignType(async function prepare() {
64
- this.debug("Rendering update built-in and command modules for the Shell Shock `update` plugin.");
65
- return (0, _powerlines_plugin_alloy_render.render)(this, [(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_update_builtin.UpdateBuiltin, {}), (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_update_command.UpdateCommand, {})]);
66
- }, ["prepare", "P\"/!"])
55
+ async prepare() {
56
+ this.debug("Rendering update built-in and command modules via Power Plant for the Shell Shock `update` plugin.");
57
+ return (0, _shell_shock_core_helpers_power_plant.executeCommandGenerator)(this, require_generator.default);
58
+ }
67
59
  };
68
- }, [
69
- "UpdatePluginOptions",
70
- "options",
71
- () => ({}),
72
- "",
73
- "P\"w!2\">#!/$"
74
- ]);
60
+ };
75
61
 
76
62
  //#endregion
77
63
  exports.default = plugin;
78
- exports.plugin = plugin;
64
+ exports.plugin = plugin;
65
+ exports.updateGenerator = require_generator.default;
package/dist/index.d.cts CHANGED
@@ -1,11 +1,11 @@
1
+ import updateGenerator from "./generator.cjs";
1
2
  import { UpdatePluginContext, UpdatePluginOptions } from "./types/plugin.cjs";
2
3
  import { Plugin } from "powerlines";
3
-
4
4
  //#region src/index.d.ts
5
5
  /**
6
6
  * The Update - Shell Shock plugin to add version check functionality and update commands to a Shell Shock application.
7
7
  */
8
8
  declare const plugin: <TContext extends UpdatePluginContext = UpdatePluginContext>(options?: UpdatePluginOptions) => Plugin<TContext>;
9
9
  //#endregion
10
- export { plugin as default, plugin };
10
+ export { plugin as default, plugin, updateGenerator };
11
11
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AA8BA;cAAa,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;cAmCa,SACX,iBAAiB,sBAAsB,qBAEvC,UAAS,wBACR,OAAO"}
package/dist/index.d.mts CHANGED
@@ -1,11 +1,11 @@
1
+ import updateGenerator from "./generator.mjs";
1
2
  import { UpdatePluginContext, UpdatePluginOptions } from "./types/plugin.mjs";
2
3
  import { Plugin } from "powerlines";
3
-
4
4
  //#region src/index.d.ts
5
5
  /**
6
6
  * The Update - Shell Shock plugin to add version check functionality and update commands to a Shell Shock application.
7
7
  */
8
8
  declare const plugin: <TContext extends UpdatePluginContext = UpdatePluginContext>(options?: UpdatePluginOptions) => Plugin<TContext>;
9
9
  //#endregion
10
- export { plugin as default, plugin };
10
+ export { plugin as default, plugin, updateGenerator };
11
11
  //# sourceMappingURL=index.d.mts.map