@shell-shock/preset-cli 0.9.22 → 0.9.23

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 (47) hide show
  1. package/dist/components/banner-builtin.cjs +0 -1
  2. package/dist/components/banner-builtin.d.cts +2 -3
  3. package/dist/components/banner-builtin.d.cts.map +1 -1
  4. package/dist/components/banner-builtin.d.mts +3 -4
  5. package/dist/components/banner-builtin.d.mts.map +1 -1
  6. package/dist/components/banner-builtin.mjs.map +1 -1
  7. package/dist/components/command-entry.cjs +21 -22
  8. package/dist/components/command-entry.d.cts +1 -2
  9. package/dist/components/command-entry.d.cts.map +1 -1
  10. package/dist/components/command-entry.d.mts +1 -2
  11. package/dist/components/command-entry.d.mts.map +1 -1
  12. package/dist/components/command-entry.mjs +21 -22
  13. package/dist/components/command-entry.mjs.map +1 -1
  14. package/dist/components/command-router.cjs +1 -2
  15. package/dist/components/command-router.d.cts +2 -3
  16. package/dist/components/command-router.d.cts.map +1 -1
  17. package/dist/components/command-router.d.mts +3 -4
  18. package/dist/components/command-router.d.mts.map +1 -1
  19. package/dist/components/command-router.mjs +1 -1
  20. package/dist/components/command-router.mjs.map +1 -1
  21. package/dist/components/upgrade-builtin.cjs +2 -3
  22. package/dist/components/upgrade-builtin.d.cts +2 -3
  23. package/dist/components/upgrade-builtin.d.cts.map +1 -1
  24. package/dist/components/upgrade-builtin.d.mts +2 -3
  25. package/dist/components/upgrade-builtin.d.mts.map +1 -1
  26. package/dist/components/upgrade-builtin.mjs +2 -2
  27. package/dist/components/upgrade-builtin.mjs.map +1 -1
  28. package/dist/components/virtual-command-entry.cjs +3 -3
  29. package/dist/components/virtual-command-entry.d.cts +1 -2
  30. package/dist/components/virtual-command-entry.d.cts.map +1 -1
  31. package/dist/components/virtual-command-entry.d.mts +1 -2
  32. package/dist/components/virtual-command-entry.d.mts.map +1 -1
  33. package/dist/components/virtual-command-entry.mjs +3 -3
  34. package/dist/components/virtual-command-entry.mjs.map +1 -1
  35. package/dist/helpers/get-global-options.cjs +4 -6
  36. package/dist/helpers/get-global-options.mjs +4 -5
  37. package/dist/helpers/get-global-options.mjs.map +1 -1
  38. package/dist/index.cjs +13 -6
  39. package/dist/index.d.cts.map +1 -1
  40. package/dist/index.d.mts.map +1 -1
  41. package/dist/index.mjs +12 -6
  42. package/dist/index.mjs.map +1 -1
  43. package/dist/types/plugin.d.cts +11 -3
  44. package/dist/types/plugin.d.cts.map +1 -1
  45. package/dist/types/plugin.d.mts +12 -4
  46. package/dist/types/plugin.d.mts.map +1 -1
  47. package/package.json +24 -23
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
2
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
3
  let _alloy_js_core = require("@alloy-js/core");
5
4
  let _alloy_js_typescript = require("@alloy-js/typescript");
@@ -18,7 +17,7 @@ function CommandRouterSelectOptions(props) {
18
17
  },
19
18
  joiner: ",",
20
19
  hardline: true,
21
- children: (command) => command.isVirtual ? (0, _alloy_js_core_jsx_runtime.createComponent)(CommandRouterSelectOptions, { get commands() {
20
+ children: (command) => command.virtual ? (0, _alloy_js_core_jsx_runtime.createComponent)(CommandRouterSelectOptions, { get commands() {
22
21
  return command.children ?? {};
23
22
  } }) : _alloy_js_core.code`{ value: [${command.segments.map((segment) => `"${segment}"`).join(", ")}], label: "${command.title}", description: \`(${(0, _shell_shock_core_plugin_utils.getAppBin)(context)} ${command.segments.join(" ")})\`${command.icon ? `, icon: "${command.icon.trim()}"` : ""} }`
24
23
  });
@@ -1,4 +1,3 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
1
  import { CommandTree } from "@shell-shock/core";
3
2
  import { CommandRouterProps } from "@shell-shock/preset-script/components";
4
3
 
@@ -6,11 +5,11 @@ import { CommandRouterProps } from "@shell-shock/preset-script/components";
6
5
  interface CommandRouterSelectOptionsProps {
7
6
  commands?: Record<string, CommandTree>;
8
7
  }
9
- declare function CommandRouterSelectOptions(props: CommandRouterSelectOptionsProps): _$_alloy_js_core0.Children;
8
+ declare function CommandRouterSelectOptions(props: CommandRouterSelectOptionsProps): import("@alloy-js/core").Children;
10
9
  /**
11
10
  * A component that renders a command router interface, allowing users to select and execute commands from a provided list of commands and segments. This component serves as a wrapper around the base CommandRouter, adding additional UI elements and logic for command selection.
12
11
  */
13
- declare function CommandRouter(props: CommandRouterProps): _$_alloy_js_core0.Children;
12
+ declare function CommandRouter(props: CommandRouterProps): import("@alloy-js/core").Children;
14
13
  //#endregion
15
14
  export { CommandRouter, CommandRouterSelectOptions, CommandRouterSelectOptionsProps };
16
15
  //# sourceMappingURL=command-router.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"command-router.d.cts","names":[],"sources":["../../src/components/command-router.tsx"],"mappings":";;;;;UA+BiB,+BAAA;EACf,QAAA,GAAW,MAAA,SAAe,WAAA;AAAA;AAAA,iBAGZ,0BAAA,CACd,KAAA,EAAO,+BAAA,GAA+B,iBAAA,CAAA,QAAA;;;;iBA8BxB,aAAA,CAAc,KAAA,EAAO,kBAAA,GAAkB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"command-router.d.cts","names":[],"sources":["../../src/components/command-router.tsx"],"mappings":";;;;UA+BiB,+BAAA;EACf,QAAA,GAAW,MAAM,SAAS,WAAA;AAAA;AAAA,iBAGZ,0BAAA,CACd,KAAA,EAAO,+BAA+B,4BAAA,QAAA;;;;iBA8BxB,aAAA,CAAc,KAAA,EAAO,kBAAkB,4BAAA,QAAA"}
@@ -1,16 +1,15 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
- import { CommandTree } from "@shell-shock/core";
3
1
  import { CommandRouterProps } from "@shell-shock/preset-script/components";
2
+ import { CommandTree } from "@shell-shock/core";
4
3
 
5
4
  //#region src/components/command-router.d.ts
6
5
  interface CommandRouterSelectOptionsProps {
7
6
  commands?: Record<string, CommandTree>;
8
7
  }
9
- declare function CommandRouterSelectOptions(props: CommandRouterSelectOptionsProps): _$_alloy_js_core0.Children;
8
+ declare function CommandRouterSelectOptions(props: CommandRouterSelectOptionsProps): import("@alloy-js/core").Children;
10
9
  /**
11
10
  * A component that renders a command router interface, allowing users to select and execute commands from a provided list of commands and segments. This component serves as a wrapper around the base CommandRouter, adding additional UI elements and logic for command selection.
12
11
  */
13
- declare function CommandRouter(props: CommandRouterProps): _$_alloy_js_core0.Children;
12
+ declare function CommandRouter(props: CommandRouterProps): import("@alloy-js/core").Children;
14
13
  //#endregion
15
14
  export { CommandRouter, CommandRouterSelectOptions, CommandRouterSelectOptionsProps };
16
15
  //# sourceMappingURL=command-router.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"command-router.d.mts","names":[],"sources":["../../src/components/command-router.tsx"],"mappings":";;;;;UA+BiB,+BAAA;EACf,QAAA,GAAW,MAAA,SAAe,WAAA;AAAA;AAAA,iBAGZ,0BAAA,CACd,KAAA,EAAO,+BAAA,GAA+B,iBAAA,CAAA,QAAA;;;;iBA8BxB,aAAA,CAAc,KAAA,EAAO,kBAAA,GAAkB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"command-router.d.mts","names":[],"sources":["../../src/components/command-router.tsx"],"mappings":""}
@@ -16,7 +16,7 @@ function CommandRouterSelectOptions(props) {
16
16
  },
17
17
  joiner: ",",
18
18
  hardline: true,
19
- children: (command) => command.isVirtual ? createComponent(CommandRouterSelectOptions, { get commands() {
19
+ children: (command) => command.virtual ? createComponent(CommandRouterSelectOptions, { get commands() {
20
20
  return command.children ?? {};
21
21
  } }) : code`{ value: [${command.segments.map((segment) => `"${segment}"`).join(", ")}], label: "${command.title}", description: \`(${getAppBin(context)} ${command.segments.join(" ")})\`${command.icon ? `, icon: "${command.icon.trim()}"` : ""} }`
22
22
  });
@@ -1 +1 @@
1
- {"version":3,"file":"command-router.mjs","names":[],"sources":["../../src/components/command-router.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, For } from \"@alloy-js/core\";\nimport { IfStatement } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { CommandTree } from \"@shell-shock/core\";\nimport { getAppBin } from \"@shell-shock/core/plugin-utils\";\nimport type { CommandRouterProps } from \"@shell-shock/preset-script/components\";\nimport {\n CommandRouter as BaseCommandRouter,\n CommandRouterBody\n} from \"@shell-shock/preset-script/components\";\nimport type { CLIPresetContext } from \"../types\";\n\nexport interface CommandRouterSelectOptionsProps {\n commands?: Record<string, CommandTree>;\n}\n\nexport function CommandRouterSelectOptions(\n props: CommandRouterSelectOptionsProps\n) {\n const { commands } = props;\n\n const context = usePowerlines<CLIPresetContext>();\n\n return (\n <For each={Object.values(commands ?? {})} joiner=\",\" hardline>\n {command =>\n command.isVirtual ? (\n <CommandRouterSelectOptions commands={command.children ?? {}} />\n ) : (\n code`{ value: [${command.segments\n .map(segment => `\"${segment}\"`)\n .join(\n \", \"\n )}], label: \"${command.title}\", description: \\`(${getAppBin(\n context\n )} ${command.segments.join(\" \")})\\`${\n command.icon ? `, icon: \"${command.icon.trim()}\"` : \"\"\n } }`\n )\n }\n </For>\n );\n}\n\n/**\n * A component that renders a command router interface, allowing users to select and execute commands from a provided list of commands and segments. This component serves as a wrapper around the base CommandRouter, adding additional UI elements and logic for command selection.\n */\nexport function CommandRouter(props: CommandRouterProps) {\n const { segments, commands } = props;\n\n return (\n <>\n <BaseCommandRouter {...props} segments={segments} commands={commands} />\n <Spacing />\n <IfStatement condition={code`isInteractive && !isHelp()`}>\n {code`await showBanner();\n\n let segments = await select({\n message: \"Which command would you like to execute?\",\n options: [ `}\n <CommandRouterSelectOptions commands={commands} />\n {` ],\n });\n if (isCancel(segments)) {\n return;\n }\n\n let dynamics = {} as Record<string, string>;\n for (const dynamic of segments.filter(segment => segment.startsWith(\"[\") && segment.endsWith(\"]\"))) {\n const value = await text({\n message: \\`Please provide a value for \\${dynamic.replace(/^\\[+/, \"\").replace(/\\]+$/, \"\")}:\\`,\n });\n if (isCancel(value)) {\n return;\n }\n dynamics[dynamic] = value;\n }\n\n segments = segments.map(segment => dynamics[segment] || segment);\n const context = useGlobal();\n if (context) {\n context.inputArgs = [args.length > 0 ? args[0] : undefined, args.length > 1 ? args[1] : undefined, ...segments, ...args.slice(${\n segments.length + 2\n })].filter(Boolean) as string[];\n }\n\n command = segments[0];\n args = context.inputArgs; `}\n <CommandRouterBody {...props} segments={segments} commands={commands} />\n </IfStatement>\n <Spacing />\n </>\n );\n}\n"],"mappings":";;;;;;;;;AAyBA,SAAO,2BAAA,OAAA;CACL,MAAA,EACA,aACI;CACN,MAAO,UAAO,eAAmB;;EAEjC,IAAO,OAAA;AACL,UAAW,OAAO,OAAO,YAAY,EAAC,CAAA;;;EAGxC,UAAO;EACL,WAAO,YAAA,QAAA,YAAA,gBAAA,4BAAA,EACP,IAAA,WAAA;AACM,UAAE,QAAa,YAAK,EAAA;KAE1B,CAAA,GAAM,IAAA,aAAU,QAAc,SAAA,KAAA,YAAmB,IAAA,QAAA,GAAA,CAAA,KAAA,KAAA,CAAA,aAAA,QAAA,MAAA,qBAAA,UAAA,QAAA,CAAA,GAAA,QAAA,SAAA,KAAA,IAAA,CAAA,KAAA,QAAA,OAAA,YAAA,QAAA,KAAA,MAAA,CAAA,KAAA,GAAA;;;;;;AAOnD,SAAY,cAAA,OAAA;CACV,MAAM,EACJ,UACA,aACE;AACJ,QAAO;EAAC,gBAAiB,iBAAiB,WAAgB,OAAE;GAClD;GACE;GACX,CAAC,CAAC;EAAE,gBAAkB,SAAS,EAAE,CAAC;EAAE,gBAAkB,aAAQ;GAC7D,WAAS,IAAA;GACT,IAAI,WAAA;AACF,WAAA;KAAA,IAAA;;;;;mDAKJ,UACG,CAAA;KAAA,WAAe;;;;;;;;;;;;;;;;;;;;0IAoBZ,SAAA,SAAA,EAAA;;;;oCAI2B;KAAA,gBAAA,mBAAA,WAAA,OAAA;MACvB;MACA;MACL,CAAC,CAAC;KAAC;;GAEP,CAAC;EAAE,gBAAI,SAAA,EAAA,CAAA;EAAA"}
1
+ {"version":3,"file":"command-router.mjs","names":[],"sources":[],"mappings":""}
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
2
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
3
  let _alloy_js_core = require("@alloy-js/core");
5
4
  let _alloy_js_typescript = require("@alloy-js/typescript");
@@ -67,7 +66,7 @@ function ExecuteUpgradeFunctionDeclaration() {
67
66
  spinner.success("Update successful! Please restart the application to apply the update.");
68
67
 
69
68
  writeLine("");
70
- help(\`You can view the changelog for this release at any time by running the \${inlineCode("${(0, _shell_shock_core_plugin_utils.getAppBin)(context)} changelog --latest")} command.\`);
69
+ help(\`The changelog for this release can be viewed by running the \${inlineCode("${(0, _shell_shock_core_plugin_utils.getAppBin)(context)} changelog")} command.\`);
71
70
 
72
71
  writeLine("");
73
72
  writeLine("Press any key to exit the application...");
@@ -106,7 +105,7 @@ function ExecuteUpgradeFunctionDeclaration() {
106
105
  spinner.success("Update successful! Please restart the application to apply the update.");
107
106
 
108
107
  writeLine("");
109
- help(\`You can view the changelog for this release at any time by running the \${inlineCode("${(0, _shell_shock_core_plugin_utils.getAppBin)(context)} changelog --latest")} command.\`);
108
+ help(\`The changelog for this release can be viewed by running the \${inlineCode("${(0, _shell_shock_core_plugin_utils.getAppBin)(context)} changelog")} command.\`);
110
109
 
111
110
  writeLine("");
112
111
  writeLine("Press any key to exit the application...");
@@ -1,15 +1,14 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
1
  import { UpgradeBuiltinProps } from "@shell-shock/plugin-upgrade/components/upgrade-builtin";
3
2
 
4
3
  //#region src/components/upgrade-builtin.d.ts
5
4
  /**
6
5
  * A component to generate the `executeUpgrade` function in the `shell-shock:upgrade` builtin module.
7
6
  */
8
- declare function ExecuteUpgradeFunctionDeclaration(): _$_alloy_js_core0.Children;
7
+ declare function ExecuteUpgradeFunctionDeclaration(): import("@alloy-js/core").Children;
9
8
  /**
10
9
  * A built-in upgrade module for Shell Shock.
11
10
  */
12
- declare function UpgradeBuiltin(props: UpgradeBuiltinProps): _$_alloy_js_core0.Children;
11
+ declare function UpgradeBuiltin(props: UpgradeBuiltinProps): import("@alloy-js/core").Children;
13
12
  //#endregion
14
13
  export { ExecuteUpgradeFunctionDeclaration, UpgradeBuiltin };
15
14
  //# sourceMappingURL=upgrade-builtin.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-builtin.d.cts","names":[],"sources":["../../src/components/upgrade-builtin.tsx"],"mappings":";;;;;;;iBAqCgB,iCAAA,CAAA,GAAiC,iBAAA,CAAA,QAAA;;;;iBAuJjC,cAAA,CAAe,KAAA,EAAO,mBAAA,GAAmB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"upgrade-builtin.d.cts","names":[],"sources":["../../src/components/upgrade-builtin.tsx"],"mappings":";;;;;AAqCA;iBAAgB,iCAAA,6BAAiC,QAAA;;;AAAA;iBAuJjC,cAAA,CAAe,KAAA,EAAO,mBAAmB,4BAAA,QAAA"}
@@ -1,15 +1,14 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
1
  import { UpgradeBuiltinProps } from "@shell-shock/plugin-upgrade/components/upgrade-builtin";
3
2
 
4
3
  //#region src/components/upgrade-builtin.d.ts
5
4
  /**
6
5
  * A component to generate the `executeUpgrade` function in the `shell-shock:upgrade` builtin module.
7
6
  */
8
- declare function ExecuteUpgradeFunctionDeclaration(): _$_alloy_js_core0.Children;
7
+ declare function ExecuteUpgradeFunctionDeclaration(): import("@alloy-js/core").Children;
9
8
  /**
10
9
  * A built-in upgrade module for Shell Shock.
11
10
  */
12
- declare function UpgradeBuiltin(props: UpgradeBuiltinProps): _$_alloy_js_core0.Children;
11
+ declare function UpgradeBuiltin(props: UpgradeBuiltinProps): import("@alloy-js/core").Children;
13
12
  //#endregion
14
13
  export { ExecuteUpgradeFunctionDeclaration, UpgradeBuiltin };
15
14
  //# sourceMappingURL=upgrade-builtin.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-builtin.d.mts","names":[],"sources":["../../src/components/upgrade-builtin.tsx"],"mappings":";;;;;;;iBAqCgB,iCAAA,CAAA,GAAiC,iBAAA,CAAA,QAAA;;;;iBAuJjC,cAAA,CAAe,KAAA,EAAO,mBAAA,GAAmB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"upgrade-builtin.d.mts","names":[],"sources":["../../src/components/upgrade-builtin.tsx"],"mappings":""}
@@ -65,7 +65,7 @@ function ExecuteUpgradeFunctionDeclaration() {
65
65
  spinner.success("Update successful! Please restart the application to apply the update.");
66
66
 
67
67
  writeLine("");
68
- help(\`You can view the changelog for this release at any time by running the \${inlineCode("${getAppBin(context)} changelog --latest")} command.\`);
68
+ help(\`The changelog for this release can be viewed by running the \${inlineCode("${getAppBin(context)} changelog")} command.\`);
69
69
 
70
70
  writeLine("");
71
71
  writeLine("Press any key to exit the application...");
@@ -104,7 +104,7 @@ function ExecuteUpgradeFunctionDeclaration() {
104
104
  spinner.success("Update successful! Please restart the application to apply the update.");
105
105
 
106
106
  writeLine("");
107
- help(\`You can view the changelog for this release at any time by running the \${inlineCode("${getAppBin(context)} changelog --latest")} command.\`);
107
+ help(\`The changelog for this release can be viewed by running the \${inlineCode("${getAppBin(context)} changelog")} command.\`);
108
108
 
109
109
  writeLine("");
110
110
  writeLine("Press any key to exit the application...");
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-builtin.mjs","names":[],"sources":["../../src/components/upgrade-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, Show, splitProps } from \"@alloy-js/core\";\nimport {\n ElseClause,\n ElseIfClause,\n FunctionDeclaration,\n IfStatement,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { getAppBin, getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport type { UpgradeBuiltinProps } from \"@shell-shock/plugin-upgrade/components/upgrade-builtin\";\nimport { UpgradeBuiltin as BaseUpgradeBuiltin } from \"@shell-shock/plugin-upgrade/components/upgrade-builtin\";\nimport { defu } from \"defu\";\nimport type { CLIPresetContext } from \"../types/plugin\";\n\n/**\n * A component to generate the `executeUpgrade` function in the `shell-shock:upgrade` builtin module.\n */\nexport function ExecuteUpgradeFunctionDeclaration() {\n const context = usePowerlines<CLIPresetContext>();\n\n return (\n <Show when={context.config.upgradeType !== false}>\n <FunctionDeclaration\n export\n async\n name=\"executeUpgrade\"\n doc={`Run upgrade processing for the ${getAppTitle(\n context,\n true\n )} application.`}>\n <IfStatement condition={code`await isCheckForUpdatesRequired()`}>\n <VarDeclaration\n const\n name=\"spinner\"\n initializer={code`createSpinner({\n message: \"Checking for updates...\"\n }).start(); `}\n />\n <VarDeclaration\n const\n name=\"result\"\n initializer={code`await checkForUpdates({ force: true }); `}\n />\n <IfStatement\n condition={code`(result as CheckForUpdatesErrorResult)?.isError`}>\n {code`spinner.error(\\`An error occurred while checking for ${getAppTitle(\n context,\n true\n )} application updates. Please try again later - if the problem persists, please contact support.\\`);\n debug((result as CheckForUpdatesErrorResult).error); `}\n </IfStatement>\n <ElseIfClause\n condition={code`!(result as CheckForUpdatesSuccessResult)?.isUpToDate`}>\n <Show\n when={\n context.config.upgradeType !== false &&\n (context.config.upgradeType === \"confirm\" ||\n context.config.upgradeType === \"manual\")\n }\n fallback={\n <>\n {code`spinner.stop();\n info(\\`A new version of ${getAppTitle(\n context,\n true\n )} is available: \\${red(\\`v\\${(result as CheckForUpdatesSuccessResult).currentVersion}\\`)} \\${textColors.body.tertiary(\"➜\")} \\${green(\\`v\\${(result as CheckForUpdatesSuccessResult).latestVersion}\\`)}\\${(result as CheckForUpdatesSuccessResult).package?.date ? textColors.body.tertiary(\\` (updated on \\${(result as CheckForUpdatesSuccessResult).package?.date})\\`) : \"\"}\\`);\n\n try {\n await upgrade();\n spinner.success(\"Update successful! Please restart the application to apply the update.\");\n\n writeLine(\"\");\n help(\\`You can view the changelog for this release at any time by running the \\${inlineCode(\"${getAppBin(\n context\n )} changelog --latest\")} command.\\`);\n\n writeLine(\"\");\n writeLine(\"Press any key to exit the application...\");\n\n await waitForKeyPress();\n return;\n } catch (err) {\n spinner.error(\\`An error occurred while updating ${getAppTitle(\n context,\n true\n )} to v\\${(result as CheckForUpdatesSuccessResult).latestVersion}. Please try again later - if the problem persists, please contact support.\\`);\n debug(err);\n } `}\n <Spacing />\n </>\n }>\n {code`spinner.stop();\n warn(\\`A new version of ${getAppTitle(\n context,\n true\n )} is available: \\${red(\\`v\\${(result as CheckForUpdatesSuccessResult).currentVersion}\\`)} \\${textColors.body.tertiary(\"➜\")} \\${green(\\`v\\${(result as CheckForUpdatesSuccessResult).latestVersion}\\`)}\\${(result as CheckForUpdatesSuccessResult).package.date ? textColors.body.tertiary(\\` (updated on \\${(result as CheckForUpdatesSuccessResult).package.date})\\`) : \"\"}${\n context.config.upgradeType !== false &&\n context.config.upgradeType === \"manual\"\n ? ` \\\\nPlease run \\`${getAppBin(\n context\n )} upgrade\\` to upgrade to the latest version.`\n : \"\"\n }\\`); `}\n <Spacing />\n <Show\n when={\n context.config.upgradeType !== false &&\n context.config.upgradeType === \"confirm\"\n }>\n {code`const willUpgradeNow = await confirm({\n message: \\`Would you like to update to v\\${(result as CheckForUpdatesSuccessResult).latestVersion} now?\\`,\n initialValue: true\n });\n if (isCancel(willUpgradeNow)) {\n return;\n }\n\n if (willUpgradeNow) {\n spinner.text = \\`Updating ${getAppTitle(\n context,\n true\n )} to v\\${(result as CheckForUpdatesSuccessResult).latestVersion}...\\`;\n spinner.start();\n\n try {\n await upgrade();\n spinner.success(\"Update successful! Please restart the application to apply the update.\");\n\n writeLine(\"\");\n help(\\`You can view the changelog for this release at any time by running the \\${inlineCode(\"${getAppBin(\n context\n )} changelog --latest\")} command.\\`);\n\n writeLine(\"\");\n writeLine(\"Press any key to exit the application...\");\n\n await waitForKeyPress();\n return;\n } catch (err) {\n spinner.error(\\`An error occurred while updating ${getAppTitle(\n context,\n true\n )} to v\\${(result as CheckForUpdatesSuccessResult).latestVersion}. Please try again later - if the problem persists, please contact support.\\`);\n return { error: err };\n }\n } else {\n help(\"Updates can be performed at any time by running the \\`${getAppBin(\n context\n )} upgrade\\` command. Please remember that keeping your application up to date is important for ensuring you have the latest features, performance improvements, and security patches.\");\n } `}\n </Show>\n </Show>\n </ElseIfClause>\n <ElseClause>{code`spinner.success(\"Currently running the latest version of ${getAppTitle(\n context,\n true\n )}.\");\n writeLine(\"\");\n `}</ElseClause>\n </IfStatement>\n </FunctionDeclaration>\n </Show>\n );\n}\n\n/**\n * A built-in upgrade module for Shell Shock.\n */\nexport function UpgradeBuiltin(props: UpgradeBuiltinProps) {\n const [{ children, builtinImports }, rest] = splitProps(props, [\n \"children\",\n \"builtinImports\"\n ]);\n\n return (\n <BaseUpgradeBuiltin\n {...rest}\n builtinImports={defu(builtinImports ?? {}, {\n console: [\"createSpinner\", \"debug\", \"info\"],\n prompts: [\"waitForKeyPress\"]\n })}>\n <ExecuteUpgradeFunctionDeclaration />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BaseUpgradeBuiltin>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA6BA,SAAc,oCAAmC;CACjD,MAAQ,UAAC,eAAkB;AAC3B,QAAS,gBAAkB,MAAA;EAC3B,IAAO,OAAO;;;EAGV,IAAC,WAAa;AAChB,UAAA,gBAAA,qBAAA;IACK,UAAS;IACR,OAAO;;IAEP,IAAC,MAAA;AACC,YAAM,kCAA+B,YAAM,SAAA,KAAA,CAAA;;IAE7C,IAAA,WAAA;AACA,YAAA,gBAAA,aAAA;MACI,WAAE,IAAA;MACF,IAAE,WAAY;AAChB,cAAO;QAAA,gBAAA,gBAAA;SACP,SAAA;SACC,MAAW;SACb,aAAY,IAAW;;;SAGpB,CAAI;QAAE,gBAAO,gBAAA;SACb,SAAa;SACT,MAAA;SACA,aAAW,IAAA;SAChB,CAAA;QAAA,gBAAA,aAAA;SACA,WAAA,IAAA;SACC,IAAA,WAAA;AACM,iBAAM,IAAA,wDAAA,YAAA,SAAA,KAAA,CAAA;;;SAGb,CAAA;QAAA,gBAAA,cAAA;SACC,WAAe,IAAE;SAChB,IAAK,WAAa;AACjB,iBAAO,gBAAA,MAAA;WACP,IAAA,OAAA;AACC,mBAAY,QAAS,OAAO,gBAAiB,UAAQ,QAAQ,OAAS,gBAAgB,aAAW,QAAA,OAAA,gBAAA;;WAEpG,IAAW,WAAA;AACZ,mBAAA,CAAA,WAAA,IAAA;8CAC6B,YAAA,SAAA,KAA+B,CAAA;;;;;;;qHAOhD,UAAA,QAAA,CAAA;;;;;;;;y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_js_core = require("@alloy-js/core");
7
7
  let _powerlines_plugin_alloy_core_components = require("@powerlines/plugin-alloy/core/components");
8
8
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
9
- let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
10
9
  let _stryke_path_join = require("@stryke/path/join");
10
+ let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
11
11
  let _stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
12
12
  let defu = require("defu");
13
13
  defu = require_runtime.__toESM(defu);
@@ -27,7 +27,7 @@ function VirtualCommandEntry(props) {
27
27
  return filePath.value;
28
28
  },
29
29
  get imports() {
30
- return (0, defu.default)(imports ?? {}, Object.entries(command.children).filter(([, child]) => child.isVirtual).reduce((ret, [name, child]) => {
30
+ return (0, defu.default)(imports ?? {}, Object.entries(command.children).filter(([, child]) => child.virtual).reduce((ret, [name, child]) => {
31
31
  ret[`./${child.name}`] = [{
32
32
  name: "handler",
33
33
  alias: `handle${(0, _stryke_string_format_pascal_case.pascalCase)(name)}`
@@ -100,7 +100,7 @@ function VirtualCommandEntry(props) {
100
100
  },
101
101
  children: (child) => (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
102
102
  get when() {
103
- return child.isVirtual;
103
+ return child.virtual;
104
104
  },
105
105
  get fallback() {
106
106
  return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_command_entry.CommandEntry, { command: child });
@@ -1,4 +1,3 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
1
  import { CommandTree } from "@shell-shock/core";
3
2
  import { EntryFileProps } from "@powerlines/plugin-alloy/typescript/components/entry-file";
4
3
 
@@ -9,7 +8,7 @@ interface VirtualCommandEntryProps extends Omit<EntryFileProps, "path" | "typeDe
9
8
  /**
10
9
  * The virtual command entry point for the Shell Shock project.
11
10
  */
12
- declare function VirtualCommandEntry(props: VirtualCommandEntryProps): _$_alloy_js_core0.Children;
11
+ declare function VirtualCommandEntry(props: VirtualCommandEntryProps): import("@alloy-js/core").Children;
13
12
  //#endregion
14
13
  export { VirtualCommandEntry, VirtualCommandEntryProps };
15
14
  //# sourceMappingURL=virtual-command-entry.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"virtual-command-entry.d.cts","names":[],"sources":["../../src/components/virtual-command-entry.tsx"],"mappings":";;;;;UAkCiB,wBAAA,SAAiC,IAAA,CAChD,cAAA;EAGA,OAAA,EAAS,WAAA;AAAA;AAJX;;;AAAA,iBAUgB,mBAAA,CAAoB,KAAA,EAAO,wBAAA,GAAwB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"virtual-command-entry.d.cts","names":[],"sources":["../../src/components/virtual-command-entry.tsx"],"mappings":";;;;UAkCiB,wBAAA,SAAiC,IAAA,CAChD,cAAA;EAGA,OAAA,EAAS,WAAA;AAAA;;;;iBAMK,mBAAA,CAAoB,KAAA,EAAO,wBAAwB,4BAAA,QAAA"}
@@ -1,4 +1,3 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
1
  import { EntryFileProps } from "@powerlines/plugin-alloy/typescript/components/entry-file";
3
2
  import { CommandTree } from "@shell-shock/core";
4
3
 
@@ -9,7 +8,7 @@ interface VirtualCommandEntryProps extends Omit<EntryFileProps, "path" | "typeDe
9
8
  /**
10
9
  * The virtual command entry point for the Shell Shock project.
11
10
  */
12
- declare function VirtualCommandEntry(props: VirtualCommandEntryProps): _$_alloy_js_core0.Children;
11
+ declare function VirtualCommandEntry(props: VirtualCommandEntryProps): import("@alloy-js/core").Children;
13
12
  //#endregion
14
13
  export { VirtualCommandEntry, VirtualCommandEntryProps };
15
14
  //# sourceMappingURL=virtual-command-entry.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"virtual-command-entry.d.mts","names":[],"sources":["../../src/components/virtual-command-entry.tsx"],"mappings":";;;;;UAkCiB,wBAAA,SAAiC,IAAA,CAChD,cAAA;EAGA,OAAA,EAAS,WAAA;AAAA;AAJX;;;AAAA,iBAUgB,mBAAA,CAAoB,KAAA,EAAO,wBAAA,GAAwB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"virtual-command-entry.d.mts","names":[],"sources":["../../src/components/virtual-command-entry.tsx"],"mappings":""}
@@ -4,8 +4,8 @@ import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
4
4
  import { For, Show, computed } from "@alloy-js/core";
5
5
  import { Spacing } from "@powerlines/plugin-alloy/core/components";
6
6
  import { isDynamicPathSegment } from "@shell-shock/core/plugin-utils";
7
- import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
8
7
  import { joinPaths } from "@stryke/path/join";
8
+ import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
9
9
  import { pascalCase } from "@stryke/string-format/pascal-case";
10
10
  import defu from "defu";
11
11
  import { TypescriptFile } from "@powerlines/plugin-alloy/typescript/components/typescript-file";
@@ -24,7 +24,7 @@ function VirtualCommandEntry(props) {
24
24
  return filePath.value;
25
25
  },
26
26
  get imports() {
27
- return defu(imports ?? {}, Object.entries(command.children).filter(([, child]) => child.isVirtual).reduce((ret, [name, child]) => {
27
+ return defu(imports ?? {}, Object.entries(command.children).filter(([, child]) => child.virtual).reduce((ret, [name, child]) => {
28
28
  ret[`./${child.name}`] = [{
29
29
  name: "handler",
30
30
  alias: `handle${pascalCase(name)}`
@@ -97,7 +97,7 @@ function VirtualCommandEntry(props) {
97
97
  },
98
98
  children: (child) => createComponent(Show, {
99
99
  get when() {
100
- return child.isVirtual;
100
+ return child.virtual;
101
101
  },
102
102
  get fallback() {
103
103
  return createComponent(CommandEntry, { command: child });
@@ -1 +1 @@
1
- {"version":3,"file":"virtual-command-entry.mjs","names":[],"sources":["../../src/components/virtual-command-entry.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { computed, For, Show } from \"@alloy-js/core\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { TypescriptFileImports } from \"@powerlines/plugin-alloy/types/components\";\nimport type { EntryFileProps } from \"@powerlines/plugin-alloy/typescript/components/entry-file\";\nimport { TypescriptFile } from \"@powerlines/plugin-alloy/typescript/components/typescript-file\";\nimport type { CommandTree } from \"@shell-shock/core\";\nimport { isDynamicPathSegment } from \"@shell-shock/core/plugin-utils\";\nimport { VirtualCommandHandlerDeclaration } from \"@shell-shock/preset-script/components/virtual-command-entry\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport defu from \"defu\";\nimport type { CLIPresetContext } from \"../types/plugin\";\nimport { CommandEntry } from \"./command-entry\";\nimport { CommandRouter } from \"./command-router\";\n\nexport interface VirtualCommandEntryProps extends Omit<\n EntryFileProps,\n \"path\" | \"typeDefinition\"\n> {\n command: CommandTree;\n}\n\n/**\n * The virtual command entry point for the Shell Shock project.\n */\nexport function VirtualCommandEntry(props: VirtualCommandEntryProps) {\n const { command, imports, builtinImports, ...rest } = props;\n\n const context = usePowerlines<CLIPresetContext>();\n const filePath = computed(() =>\n joinPaths(\n context.entryPath,\n command.segments\n .filter(segment => !isDynamicPathSegment(segment))\n .join(\"/\"),\n \"index.ts\"\n )\n );\n\n return (\n <>\n <TypescriptFile\n {...rest}\n path={filePath.value}\n imports={defu(\n imports ?? {},\n Object.entries(command.children)\n .filter(([, child]) => child.isVirtual)\n .reduce((ret, [name, child]) => {\n ret[`./${child.name}`] = [\n { name: \"handler\", alias: `handle${pascalCase(name)}` }\n ];\n\n return ret;\n }, {} as TypescriptFileImports)\n )}\n builtinImports={defu(builtinImports ?? {}, {\n env: [\"isDevelopment\", \"isDebug\"],\n console: [\n \"warn\",\n \"error\",\n \"info\",\n \"help\",\n \"table\",\n \"writeLine\",\n \"splitText\",\n \"textColors\",\n \"stripAnsi\"\n ],\n utils: [\n \"isMinimal\",\n \"isUnicodeSupported\",\n \"isInteractive\",\n \"findSuggestions\",\n \"sleep\"\n ],\n state: [\n { name: \"GlobalOptions\", type: true },\n \"useGlobal\",\n \"useGlobalOptions\",\n \"withCommand\",\n \"useArgs\",\n \"hasFlag\",\n \"isHelp\"\n ],\n prompts: [\"text\", \"numeric\", \"toggle\", \"select\", \"isCancel\"],\n [joinPaths(\n \"help\",\n ...command.segments.filter(\n segment => !isDynamicPathSegment(segment)\n )\n )]: [\"showHelp\"],\n [joinPaths(\n \"banner\",\n ...command.segments.filter(\n segment => !isDynamicPathSegment(segment)\n )\n )]: [\"showBanner\"]\n })}>\n <Spacing />\n <VirtualCommandHandlerDeclaration command={command}>\n <CommandRouter\n segments={command.segments}\n commands={command.children}\n />\n </VirtualCommandHandlerDeclaration>\n </TypescriptFile>\n <For each={Object.values(command.children)}>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;CAkCA,MAAO,EACL,SACC,SACD,gBACA,GAAA,SACF;;CAEE,MAAA,WAAA,eAAA,UAAA,QAAA,WAAA,QAAA,SAAA,QAAA,YAAA,CAAA,qBAAA,QAAA,CAAA,CAAA,KAAA,IAAA,EAAA,WAAA,CAAA;AACA,QAAK,CAAA,gBAAqB,gBAAe,WAAY,MAAO;EAC5D,IAAA,OAAA;AACI,UAAC,SAAS;;;AAGd,UAAM,KAAU,WAAA,EAAa,EAAC,OAAA,QAAgB,QAAG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,EACpB,SAAG,OACJ,CAAC;;GAEL,CAAC;EACH,CAAC,CAAC"}
1
+ {"version":3,"file":"virtual-command-entry.mjs","names":[],"sources":[],"mappings":""}
@@ -1,5 +1,3 @@
1
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
2
- let _shell_shock_core = require("@shell-shock/core");
3
1
  let _shell_shock_preset_script_helpers_get_global_options = require("@shell-shock/preset-script/helpers/get-global-options");
4
2
 
5
3
  //#region src/helpers/get-global-options.ts
@@ -18,8 +16,8 @@ function getGlobalOptions(context, _) {
18
16
  title: "Interactive",
19
17
  description: "Enable interactive mode - will be set to false if running in a CI pipeline.",
20
18
  alias: ["i", "interact"],
21
- kind: _shell_shock_core.CommandParameterKinds.boolean,
22
- optional: true,
19
+ type: "boolean",
20
+ required: false,
23
21
  default: context.config.interactive !== false
24
22
  },
25
23
  context.config.interactive !== "never" && context.config.interactive !== false && {
@@ -27,8 +25,8 @@ function getGlobalOptions(context, _) {
27
25
  title: "Non-Interactive",
28
26
  description: "Disable interactive mode - will be set to true if running in a CI pipeline.",
29
27
  alias: ["no-interactive"],
30
- kind: _shell_shock_core.CommandParameterKinds.boolean,
31
- optional: true,
28
+ type: "boolean",
29
+ required: false,
32
30
  default: false,
33
31
  isNegativeOf: "interactive"
34
32
  }
@@ -1,4 +1,3 @@
1
- import { CommandParameterKinds } from "@shell-shock/core";
2
1
  import { getGlobalOptions } from "@shell-shock/preset-script/helpers/get-global-options";
3
2
 
4
3
  //#region src/helpers/get-global-options.ts
@@ -17,8 +16,8 @@ function getGlobalOptions$1(context, _) {
17
16
  title: "Interactive",
18
17
  description: "Enable interactive mode - will be set to false if running in a CI pipeline.",
19
18
  alias: ["i", "interact"],
20
- kind: CommandParameterKinds.boolean,
21
- optional: true,
19
+ type: "boolean",
20
+ required: false,
22
21
  default: context.config.interactive !== false
23
22
  },
24
23
  context.config.interactive !== "never" && context.config.interactive !== false && {
@@ -26,8 +25,8 @@ function getGlobalOptions$1(context, _) {
26
25
  title: "Non-Interactive",
27
26
  description: "Disable interactive mode - will be set to true if running in a CI pipeline.",
28
27
  alias: ["no-interactive"],
29
- kind: CommandParameterKinds.boolean,
30
- optional: true,
28
+ type: "boolean",
29
+ required: false,
31
30
  default: false,
32
31
  isNegativeOf: "interactive"
33
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"get-global-options.mjs","names":[],"sources":["../../src/helpers/get-global-options.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { CommandBase, CommandOption } from \"@shell-shock/core\";\nimport { CommandParameterKinds } from \"@shell-shock/core\";\nimport { getGlobalOptions as _getGlobalOptions } from \"@shell-shock/preset-script/helpers/get-global-options\";\nimport type { CLIPresetContext } from \"../types\";\n\n/**\n * Get the default command options.\n *\n * @param context - The build context.\n * @param _ - The command input.\n * @returns The default command options.\n */\nexport function getGlobalOptions(\n context: CLIPresetContext,\n _: CommandBase\n): CommandOption[] {\n return [\n ..._getGlobalOptions(),\n context.config.interactive !== \"never\" &&\n context.config.interactive !== true && {\n name: \"interactive\",\n title: \"Interactive\",\n description:\n \"Enable interactive mode - will be set to false if running in a CI pipeline.\",\n alias: [\"i\", \"interact\"],\n kind: CommandParameterKinds.boolean,\n optional: true,\n default: context.config.interactive !== false\n },\n context.config.interactive !== \"never\" &&\n context.config.interactive !== false && {\n name: \"non-interactive\",\n title: \"Non-Interactive\",\n description:\n \"Disable interactive mode - will be set to true if running in a CI pipeline.\",\n alias: [\"no-interactive\"],\n kind: CommandParameterKinds.boolean,\n optional: true,\n default: false,\n isNegativeOf: \"interactive\"\n }\n ].filter(Boolean) as CommandOption[];\n}\n"],"mappings":";;;;;;;;;;;AA2BA,SAAc,mBAAiB,SAAA,GAAA;AAC7B,QAAE;EAAA,GAAQ,kBAAoB;EAAA,QAAO,OAAA,gBAAA,WAAA,QAAA,OAAA,gBAAA,QAAA;GACrC,MAAA;GACF,OAAO;GACL,aAAS;GACP,OAAC,CAAA,KAAA,WAAA;GACF,MAAA,sBAAgB;GACjB,UAAO;GACL,SAAG,QAAA,OAAmB,gBAAA;GACvB;EAAC,QAAQ,OAAO,gBAAiB,WAAQ,QAAA,OAAA,gBAAA,SAAA;GACxC,MAAE;GACF,OAAI;GACJ,aAAY;GACZ,OAAI,CAAA,iBAAW;GACf,MAAM,sBAAoB;GAC1B,UAAU;GACV,SAAS;GACT,cAAc;GACf;EAAC,CAAC,OAAG,QAAS"}
1
+ {"version":3,"file":"get-global-options.mjs","names":[],"sources":[],"mappings":""}
package/dist/index.cjs CHANGED
@@ -22,9 +22,15 @@ let _shell_shock_plugin_help = require("@shell-shock/plugin-help");
22
22
  _shell_shock_plugin_help = require_runtime.__toESM(_shell_shock_plugin_help);
23
23
  let _shell_shock_plugin_prompts = require("@shell-shock/plugin-prompts");
24
24
  _shell_shock_plugin_prompts = require_runtime.__toESM(_shell_shock_plugin_prompts);
25
+ let _shell_shock_plugin_skills = require("@shell-shock/plugin-skills");
26
+ _shell_shock_plugin_skills = require_runtime.__toESM(_shell_shock_plugin_skills);
25
27
  let _shell_shock_plugin_upgrade = require("@shell-shock/plugin-upgrade");
26
28
  _shell_shock_plugin_upgrade = require_runtime.__toESM(_shell_shock_plugin_upgrade);
27
29
  let _shell_shock_preset_script_components_bin_entry = require("@shell-shock/preset-script/components/bin-entry");
30
+ let _stryke_path_join = require("@stryke/path/join");
31
+ let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
32
+ let node_fs = require("node:fs");
33
+ let powerlines = require("powerlines");
28
34
 
29
35
  //#region src/index.tsx
30
36
  /**
@@ -38,11 +44,12 @@ const plugin = (options = {}) => {
38
44
  ...(0, _shell_shock_plugin_console.default)(options),
39
45
  ...(0, _shell_shock_plugin_help.default)(options),
40
46
  ...(0, _shell_shock_plugin_prompts.default)(options),
41
- ...options.changelog !== false ? [(0, _shell_shock_plugin_changelog.default)(options.changelog)] : [],
42
- ...options.completions !== false ? (0, _shell_shock_plugin_completions.default)(options.completions) : [],
47
+ ...(0, powerlines.enable)((0, _shell_shock_plugin_changelog.default)(options.changelog), options.changelog !== false),
48
+ ...(0, powerlines.enable)((0, _shell_shock_plugin_completions.default)(options.completions), options.completions !== false),
49
+ ...(0, powerlines.enable)((0, _shell_shock_plugin_skills.default)(options.skills), options.skills !== false && (0, node_fs.existsSync)((0, _stryke_type_checks_is_set_object.isSetObject)(options.skills) && options.skills.path ? options.skills.path : (0, _stryke_path_join.joinPaths)(process.cwd(), "skills"))),
43
50
  (0, _shell_shock_plugin_upgrade.default)(options),
44
51
  {
45
- name: "shell-shock:cli-preset",
52
+ name: "shell-shock/cli-preset:main",
46
53
  config() {
47
54
  this.debug("Providing default configuration for the Shell Shock `cli` preset.");
48
55
  return {
@@ -50,7 +57,7 @@ const plugin = (options = {}) => {
50
57
  isCaseSensitive: false,
51
58
  ...options,
52
59
  env: {
53
- types: "@shell-shock/plugin-upgrade/types/env#ShellShockUpgradeEnv",
60
+ config: "@shell-shock/plugin-upgrade/types/env#ShellShockUpgradeEnv",
54
61
  validate: false
55
62
  }
56
63
  };
@@ -79,7 +86,7 @@ const plugin = (options = {}) => {
79
86
  }
80
87
  },
81
88
  {
82
- name: "shell-shock:cli-preset:generate-entrypoint",
89
+ name: "shell-shock/cli-preset:generate-entrypoint",
83
90
  prepare: {
84
91
  order: "post",
85
92
  async handler() {
@@ -155,7 +162,7 @@ const plugin = (options = {}) => {
155
162
  doubleHardline: true,
156
163
  children: (child) => (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
157
164
  get when() {
158
- return child.isVirtual;
165
+ return child.virtual;
159
166
  },
160
167
  get fallback() {
161
168
  return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_command_entry.CommandEntry, { command: child });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AA8CA;;;;cAAa,MAAA,oBAA2B,gBAAA,GAAmB,gBAAA,EACzD,OAAA,GAAS,gBAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AAsDA;;;;cAAa,MAAA,oBAA2B,gBAAA,GAAmB,gBAAA,EACzD,OAAA,GAAS,gBAAA,KACR,MAAA,CAAO,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AA8CA;;;;cAAa,MAAA,oBAA2B,gBAAA,GAAmB,gBAAA,EACzD,OAAA,GAAS,gBAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":""}
package/dist/index.mjs CHANGED
@@ -15,8 +15,13 @@ import completions from "@shell-shock/plugin-completions";
15
15
  import console from "@shell-shock/plugin-console";
16
16
  import help from "@shell-shock/plugin-help";
17
17
  import prompts from "@shell-shock/plugin-prompts";
18
+ import skills from "@shell-shock/plugin-skills";
18
19
  import upgrade from "@shell-shock/plugin-upgrade";
19
20
  import { BinEntry } from "@shell-shock/preset-script/components/bin-entry";
21
+ import { joinPaths } from "@stryke/path/join";
22
+ import { isSetObject } from "@stryke/type-checks/is-set-object";
23
+ import { existsSync } from "node:fs";
24
+ import { enable } from "powerlines";
20
25
 
21
26
  //#region src/index.tsx
22
27
  /**
@@ -30,11 +35,12 @@ const plugin = (options = {}) => {
30
35
  ...console(options),
31
36
  ...help(options),
32
37
  ...prompts(options),
33
- ...options.changelog !== false ? [changelog(options.changelog)] : [],
34
- ...options.completions !== false ? completions(options.completions) : [],
38
+ ...enable(changelog(options.changelog), options.changelog !== false),
39
+ ...enable(completions(options.completions), options.completions !== false),
40
+ ...enable(skills(options.skills), options.skills !== false && existsSync(isSetObject(options.skills) && options.skills.path ? options.skills.path : joinPaths(process.cwd(), "skills"))),
35
41
  upgrade(options),
36
42
  {
37
- name: "shell-shock:cli-preset",
43
+ name: "shell-shock/cli-preset:main",
38
44
  config() {
39
45
  this.debug("Providing default configuration for the Shell Shock `cli` preset.");
40
46
  return {
@@ -42,7 +48,7 @@ const plugin = (options = {}) => {
42
48
  isCaseSensitive: false,
43
49
  ...options,
44
50
  env: {
45
- types: "@shell-shock/plugin-upgrade/types/env#ShellShockUpgradeEnv",
51
+ config: "@shell-shock/plugin-upgrade/types/env#ShellShockUpgradeEnv",
46
52
  validate: false
47
53
  }
48
54
  };
@@ -71,7 +77,7 @@ const plugin = (options = {}) => {
71
77
  }
72
78
  },
73
79
  {
74
- name: "shell-shock:cli-preset:generate-entrypoint",
80
+ name: "shell-shock/cli-preset:generate-entrypoint",
75
81
  prepare: {
76
82
  order: "post",
77
83
  async handler() {
@@ -147,7 +153,7 @@ const plugin = (options = {}) => {
147
153
  doubleHardline: true,
148
154
  children: (child) => createComponent(Show, {
149
155
  get when() {
150
- return child.isVirtual;
156
+ return child.virtual;
151
157
  },
152
158
  get fallback() {
153
159
  return createComponent(CommandEntry, { command: child });
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, For, Show } from \"@alloy-js/core\";\nimport { VarDeclaration } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { computeBin, getCommandList } from \"@shell-shock/core/plugin-utils\";\nimport type { CommandTree } from \"@shell-shock/core/types/command\";\nimport changelog from \"@shell-shock/plugin-changelog\";\nimport completions from \"@shell-shock/plugin-completions\";\nimport console from \"@shell-shock/plugin-console\";\nimport help from \"@shell-shock/plugin-help\";\nimport prompts from \"@shell-shock/plugin-prompts\";\nimport upgrade from \"@shell-shock/plugin-upgrade\";\nimport { BinEntry } from \"@shell-shock/preset-script/components/bin-entry\";\nimport type { Plugin } from \"powerlines\";\nimport { BannerBuiltin } from \"./components/banner-builtin\";\nimport { CommandEntry } from \"./components/command-entry\";\nimport { CommandRouter } from \"./components/command-router\";\nimport { UpgradeBuiltin } from \"./components/upgrade-builtin\";\nimport { VirtualCommandEntry } from \"./components/virtual-command-entry\";\nimport { getGlobalOptions } from \"./helpers/get-global-options\";\nimport type { CLIPresetContext, CLIPresetOptions } from \"./types/plugin\";\n\n/**\n * The Shell Shock CLI Preset plugin.\n *\n * @remarks\n * This preset includes a set of built-in modules and commands to create a CLI application, as well as configuration options to customize the generated code. It also includes the `prompts` plugin to provide interactive prompts in the CLI application, and the `upgrade` plugin to manage upgrading the local application's version.\n */\nexport const plugin = <TContext extends CLIPresetContext = CLIPresetContext>(\n options: CLIPresetOptions = {}\n): Plugin<TContext>[] => {\n return [\n ...console<TContext>(options),\n ...help<TContext>(options),\n ...prompts<TContext>(options),\n ...(options.changelog !== false\n ? [changelog<TContext>(options.changelog)]\n : []),\n ...(options.completions !== false\n ? completions<TContext>(options.completions)\n : []),\n upgrade<TContext>(options),\n {\n name: \"shell-shock:cli-preset\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `cli` preset.\"\n );\n\n return {\n globalOptions: getGlobalOptions,\n isCaseSensitive: false,\n ...options,\n env: {\n types: \"@shell-shock/plugin-upgrade/types/env#ShellShockUpgradeEnv\",\n validate: false\n }\n };\n },\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\"Rendering built-in modules.\");\n\n const commands = await getCommandList(this);\n this.debug(\n `Rendering \\`banner\\` built-ins for each of the ${\n commands.length\n } command modules.`\n );\n\n return render(\n this,\n <>\n <UpgradeBuiltin />\n <BannerBuiltin command={computeBin(this)} />\n <For\n each={commands.sort((a, b) => a.name.localeCompare(b.name))}\n doubleHardline>\n {command => <BannerBuiltin command={command} />}\n </For>\n </>\n );\n }\n }\n },\n {\n name: \"shell-shock:cli-preset:generate-entrypoint\",\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\n \"Rendering entrypoint modules for the Shell Shock `cli` preset.\"\n );\n\n return render(\n this,\n <>\n <BinEntry\n builtinImports={{\n console: [\n \"info\",\n \"debug\",\n \"warn\",\n \"help\",\n \"error\",\n \"cursor\",\n \"divider\",\n \"stripAnsi\",\n \"writeLine\",\n \"splitText\"\n ],\n utils: [\"isMinimal\", \"isInteractive\"],\n state: [\"useArgs\", \"isHelp\"],\n prompts: [\n \"text\",\n \"numeric\",\n \"toggle\",\n \"select\",\n \"confirm\",\n \"isCancel\"\n ],\n env: [\"env\", \"paths\"],\n upgrade: [\"executeUpgrade\"]\n }}>\n <Show when={Object.keys(this.commands).length > 0}>\n <VarDeclaration\n let\n name=\"args\"\n type=\"string[]\"\n initializer={code`useArgs();`}\n />\n <hbr />\n <CommandRouter segments={[]} commands={this.commands ?? {}} />\n <hbr />\n </Show>\n <hbr />\n {code`await showBanner(0);`}\n <Spacing />\n {code`return showHelp(); `}\n </BinEntry>\n <Show when={Object.values(this.commands).length > 0}>\n <For\n each={Object.values(\n this.commands as Record<string, CommandTree>\n )}\n doubleHardline>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </Show>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J,OAAC,CAAA,WAAA,SAAA;OACD,SAAG;QAAA;QAAe;QAAC;QAAA;QAAA;QAAA;QAAA;OACnB,KAAG,CAAA,OAAA,QAAc;OACjB,SAAG,CAAA,iBAAA;OACJ;MACD,IAAI,WAAE;AACJ,cAAK;QAAA,gBAAY,MAAc;SAC7B,IAAE,OAAG;AACL,iBAAA,OAAA,KAAA,QAAA,SAAA,CAAA,SAAA;;SAEN,IAAA,WAAA;AACF,iBAAA;WAAA,gBAAA,gBAAA;YACD,OAAA;YACD,MAAA;YACc,MAAM;YACT,aAAA,IAAA;YACC,CAAA;WAAI,gBAAC,OAAA,EAAA,CAAA;WAAA,gBAAA,eAAA;YACP,UAAU,EAAA;YACT,IAAK,WAAA;AACP,oBAAU,QAAW,YAAY,EAAG;;;;;;SAIrC,CAAA;QAAI,gBAAA,OAAA,EAAA,CAAA;QAAA,IAAA;QAAA,gBAAA,SAAA,EAAA,CAAA;QAAA,IAAA;QAAA;;MAEP,CAAC,EAAE,gBAAG,MAAA;MACL,IAAI,OAAE;AACJ,cAAM,OAAQ,OAAC,QAAA,SAAA,CAAA,SAAA;;MAEjB,IAAI,WAAO;AACT,cAAO,gBAAO,KAAA;QACZ,IAAI,OAAO;AACT,gBAAK,OAAM,OAAA,QAAA,SAAA;;QAEb,gBAAe;QACf,WAAO,UAAU,gBAAA,MAAA;SACf,IAAI,OAAC;AACH,iBAAG,MAAS;;SAEd,IAAE,WAAS;AACT,iBAAO,gBAAa,cAAQ,EAC5B,SAAS,OACR,CAAC;;SAEJ,IAAI,WAAQ;AACV,iBAAG,gBAAO,qBAAA,EACR,SAAS,OACV,CAAC;;SAEL,CAAC;QACH,CAAC;;MAEL,CAAC,CAAC,CAAC;;IAEP;GACF;EAAC"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":[],"mappings":""}
@@ -6,6 +6,7 @@ import { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginRe
6
6
  import { ConsolePluginContext, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
7
7
  import { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig } from "@shell-shock/plugin-help";
8
8
  import { PromptsPluginContext, PromptsPluginOptions, PromptsPluginResolvedConfig, PromptsPluginUserConfig } from "@shell-shock/plugin-prompts/types/plugin";
9
+ import { SkillsPluginContext, SkillsPluginOptions, SkillsPluginResolvedConfig, SkillsPluginUserConfig } from "@shell-shock/plugin-skills";
9
10
  import { ThemePluginContext, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme/types/plugin";
10
11
  import { UpgradePluginContext, UpgradePluginOptions, UpgradePluginResolvedConfig, UpgradePluginUserConfig } from "@shell-shock/plugin-upgrade/types/plugin";
11
12
  import { ScriptPresetOptions } from "@shell-shock/preset-script/types/plugin";
@@ -64,10 +65,17 @@ type CLIPresetOptions = Omit<ScriptPresetOptions, "globalOptions"> & HelpPluginO
64
65
  * Configuration options for the `changelog` plugin. This field allows you to customize the behavior of the `changelog` plugin, which provides commands for displaying the application's changelog. You can specify the path to the changelog file, the command name, and other related settings.
65
66
  */
66
67
  changelog?: ChangelogPluginOptions | false;
68
+ /**
69
+ * Configuration options for the `skills` plugin. This field allows you to customize the behavior of the `skills` plugin, which provides commands for managing and displaying the application's skills. You can specify the command name, and other related settings.
70
+ *
71
+ * @remarks
72
+ * If the `skills` plugin is enabled but the specified skills path does not exist, the plugin will be automatically disabled and a warning message will be logged. By default, the plugin looks for a `skills` directory in the current working directory.
73
+ */
74
+ skills?: SkillsPluginOptions | false;
67
75
  };
68
- type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUserConfig & PromptsPluginUserConfig & BannerPluginUserConfig & HelpPluginUserConfig & CompletionsPluginUserConfig & ChangelogPluginUserConfig & UpgradePluginUserConfig & CLIPresetOptions;
69
- type CLIPresetResolvedConfig = ResolvedConfig & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & BannerPluginResolvedConfig & HelpPluginResolvedConfig & CompletionsPluginResolvedConfig & ChangelogPluginResolvedConfig & UpgradePluginResolvedConfig & Required<CLIPresetOptions>;
70
- type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & PromptsPluginContext<TResolvedConfig> & BannerPluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & CompletionsPluginContext<TResolvedConfig> & ChangelogPluginContext<TResolvedConfig> & UpgradePluginContext<TResolvedConfig>;
76
+ type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUserConfig & PromptsPluginUserConfig & BannerPluginUserConfig & HelpPluginUserConfig & CompletionsPluginUserConfig & ChangelogPluginUserConfig & SkillsPluginUserConfig & UpgradePluginUserConfig & CLIPresetOptions;
77
+ type CLIPresetResolvedConfig = ResolvedConfig & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & BannerPluginResolvedConfig & HelpPluginResolvedConfig & CompletionsPluginResolvedConfig & ChangelogPluginResolvedConfig & SkillsPluginResolvedConfig & UpgradePluginResolvedConfig & Required<CLIPresetOptions>;
78
+ type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & PromptsPluginContext<TResolvedConfig> & BannerPluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & CompletionsPluginContext<TResolvedConfig> & ChangelogPluginContext<TResolvedConfig> & SkillsPluginContext<TResolvedConfig> & UpgradePluginContext<TResolvedConfig>;
71
79
  //#endregion
72
80
  export { CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpgradeType };
73
81
  //# sourceMappingURL=plugin.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;;;;;;KAyEY,WAAA;AAAA,KAEA,gBAAA,GAAmB,IAAA,CAAK,mBAAA,qBAClC,iBAAA,GACA,oBAAA,GACA,oBAAA;EALU;;;;;AAEZ;;;;;;EAeI,WAAA;EAZF;;;;;;;;;;;;;;EA4BE,aAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;EAhCjD;;;;;;;;;;;EA8CE,WAAA,GAAc,WAAA;EAAA;;;EAKd,MAAA,GAAS,IAAA,CAAK,mBAAA;EAKd;;;EAAA,WAAA,GAAc,IAAA,CAAK,wBAAA;EAKP;;;EAAZ,SAAA,GAAY,sBAAA;AAAA;AAAA,KAGJ,mBAAA,GAAsB,UAAA,GAChC,qBAAA,GACA,uBAAA,GACA,uBAAA,GACA,sBAAA,GACA,oBAAA,GACA,2BAAA,GACA,yBAAA,GACA,uBAAA,GACA,gBAAA;AAAA,KAEU,uBAAA,GAA0B,cAAA,GACpC,yBAAA,GACA,2BAAA,GACA,2BAAA,GACA,0BAAA,GACA,wBAAA,GACA,+BAAA,GACA,6BAAA,GACA,2BAAA,GACA,QAAA,CAAS,gBAAA;AAAA,KAEC,gBAAA,yBACc,uBAAA,GAA0B,uBAAA,IAChD,OAAA,CAAQ,eAAA,IACV,kBAAA,CAAmB,eAAA,IACnB,oBAAA,CAAqB,eAAA,IACrB,oBAAA,CAAqB,eAAA,IACrB,mBAAA,CAAoB,eAAA,IACpB,iBAAA,CAAkB,eAAA,IAClB,wBAAA,CAAyB,eAAA,IACzB,sBAAA,CAAuB,eAAA,IACvB,oBAAA,CAAqB,eAAA"}
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;;;;;;;KA+EY,WAAA;AAAA,KAEA,gBAAA,GAAmB,IAAA,CAAK,mBAAA,qBAClC,iBAAA,GACA,oBAAA,GACA,oBAAA;EALU;;;;AAAW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