@shell-shock/preset-script 0.6.65 → 0.6.67

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 (35) hide show
  1. package/dist/components/bin-entry.cjs +1 -1
  2. package/dist/components/bin-entry.d.cts.map +1 -1
  3. package/dist/components/bin-entry.d.mts.map +1 -1
  4. package/dist/components/bin-entry.mjs +1 -1
  5. package/dist/components/bin-entry.mjs.map +1 -1
  6. package/dist/components/command-entry.cjs +1 -1
  7. package/dist/components/command-entry.d.mts.map +1 -1
  8. package/dist/components/command-entry.mjs +1 -1
  9. package/dist/components/command-entry.mjs.map +1 -1
  10. package/dist/components/command-router.cjs +1 -2
  11. package/dist/components/command-router.d.cts.map +1 -1
  12. package/dist/components/command-router.d.mts.map +1 -1
  13. package/dist/components/command-router.mjs +1 -1
  14. package/dist/components/command-router.mjs.map +1 -1
  15. package/dist/components/exit-function-declaration.cjs +0 -1
  16. package/dist/components/exit-function-declaration.d.cts +1 -3
  17. package/dist/components/exit-function-declaration.d.cts.map +1 -1
  18. package/dist/components/exit-function-declaration.d.mts +1 -3
  19. package/dist/components/exit-function-declaration.d.mts.map +1 -1
  20. package/dist/components/exit-function-declaration.mjs.map +1 -1
  21. package/dist/components/virtual-command-entry.cjs +2 -2
  22. package/dist/components/virtual-command-entry.d.mts.map +1 -1
  23. package/dist/components/virtual-command-entry.mjs +2 -2
  24. package/dist/components/virtual-command-entry.mjs.map +1 -1
  25. package/dist/helpers/get-global-options.cjs +10 -12
  26. package/dist/helpers/get-global-options.d.cts.map +1 -1
  27. package/dist/helpers/get-global-options.d.mts.map +1 -1
  28. package/dist/helpers/get-global-options.mjs +10 -12
  29. package/dist/helpers/get-global-options.mjs.map +1 -1
  30. package/dist/index.cjs +2 -2
  31. package/dist/index.d.mts.map +1 -1
  32. package/dist/index.mjs +2 -2
  33. package/dist/index.mjs.map +1 -1
  34. package/dist/types/plugin.d.mts.map +1 -1
  35. package/package.json +17 -17
@@ -114,7 +114,7 @@ function BinEntry(props) {
114
114
  input: { file: bin }
115
115
  },
116
116
  get imports() {
117
- return (0, defu.default)(imports ?? {}, Object.entries(context.commands).filter(([, command]) => command.isVirtual).reduce((ret, [name, command]) => {
117
+ return (0, defu.default)(imports ?? {}, Object.entries(context.commands).filter(([, command]) => command.virtual).reduce((ret, [name, command]) => {
118
118
  ret[`./${command.name}`] = [{
119
119
  name: "handler",
120
120
  alias: `handle${(0, _stryke_string_format_pascal_case.pascalCase)(name)}`
@@ -1 +1 @@
1
- {"version":3,"file":"bin-entry.d.cts","names":[],"sources":["../../src/components/bin-entry.tsx"],"mappings":";;;;;;AA4CA;iBAAgB,cAAA,CAAA,GAAc,QAAA;AAAA,UA4Eb,aAAA,SAAsB,IAAA,CACrC,cAAA;EAGA,MAAA,GAAS,QAAA;EACT,OAAA,GAAU,QAAA;EACV,QAAA,EAAU,QAAA;AAAA;;;;iBAMI,QAAA,CAAS,KAAA,EAAO,aAAA,GAAa,QAAA"}
1
+ {"version":3,"file":"bin-entry.d.cts","names":[],"sources":["../../src/components/bin-entry.tsx"],"mappings":";;;;;;AA4CA;iBAAgB,cAAA,IAAc,QAAA;AAAA,UA4Eb,aAAA,SAAsB,IAAA,CACrC,cAAA;EAGA,MAAA,GAAS,QAAA;EACT,OAAA,GAAU,QAAA;EACV,QAAA,EAAU,QAAA;AAAA;;;;iBAMI,QAAA,CAAS,KAAA,EAAO,aAAA,GAAa,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"bin-entry.d.mts","names":[],"sources":["../../src/components/bin-entry.tsx"],"mappings":";;;;;;AA4CA;iBAAgB,cAAA,CAAA,GAAc,QAAA;AAAA,UA4Eb,aAAA,SAAsB,IAAA,CACrC,cAAA;EAGA,MAAA,GAAS,QAAA;EACT,OAAA,GAAU,QAAA;EACV,QAAA,EAAU,QAAA;AAAA;;;;iBAMI,QAAA,CAAS,KAAA,EAAO,aAAA,GAAa,QAAA"}
1
+ {"version":3,"file":"bin-entry.d.mts","names":[],"sources":["../../src/components/bin-entry.tsx"],"mappings":""}
@@ -111,7 +111,7 @@ function BinEntry(props) {
111
111
  input: { file: bin }
112
112
  },
113
113
  get imports() {
114
- return defu(imports ?? {}, Object.entries(context.commands).filter(([, command]) => command.isVirtual).reduce((ret, [name, command]) => {
114
+ return defu(imports ?? {}, Object.entries(context.commands).filter(([, command]) => command.virtual).reduce((ret, [name, command]) => {
115
115
  ret[`./${command.name}`] = [{
116
116
  name: "handler",
117
117
  alias: `handle${pascalCase(name)}`
@@ -1 +1 @@
1
- {"version":3,"file":"bin-entry.mjs","names":[],"sources":["../../src/components/bin-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 type { Children } from \"@alloy-js/core\";\nimport { code, computed, For, Show } from \"@alloy-js/core\";\nimport { FunctionDeclaration, 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 { TypescriptFileImports } from \"@powerlines/plugin-alloy/types/components\";\nimport type { EntryFileProps } from \"@powerlines/plugin-alloy/typescript/components/entry-file\";\nimport { EntryFile } from \"@powerlines/plugin-alloy/typescript/components/entry-file\";\nimport {\n TSDoc,\n TSDocRemarks,\n TSDocReturns\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport type { CommandTree } from \"@shell-shock/core/types/command\";\nimport { getUnique } from \"@stryke/helpers/get-unique\";\nimport { findFileName } from \"@stryke/path/file-path-fns\";\nimport { replaceExtension } from \"@stryke/path/replace\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport defu from \"defu\";\nimport type { ScriptPresetContext } from \"../types/plugin\";\nimport { ExitFunctionDeclaration } from \"./exit-function-declaration\";\n\n/**\n * Runs the application main logic with proper exit handling.\n */\nexport function RunApplication() {\n return (\n <>\n <Spacing />\n {code`// Run the application main logic inside an asynchronous IIFE\n (async () => {\n const startDate = new Date();\n try {\n process.on(\"exit\", () => exit({\n startDate,\n skipProcessExit: true,\n isSynchronous: true,\n signal: 0\n }));\n process.on(\"beforeExit\", () => exit({\n startDate,\n signal: 0\n }));\n process.on(\"message\", message => {\n if (message === 'shutdown') {\n exit({\n startDate,\n isSynchronous: true,\n signal: -128\n });\n }\n });\n\n process.once(\"SIGTERM\", () => exit({\n startDate,\n signal: 15\n }));\n process.once(\"SIGINT\", () => exit({\n startDate,\n signal: 2\n }));\n process.once(\"SIGUSR2\", () => {\n verbose(\"The application was terminated by the user\");\n return exit({\n startDate,\n signal: 12\n });\n });\n process.once(\"SIGQUIT\", () => {\n verbose(\"The application was terminated by the user\");\n return exit({\n startDate,\n signal: 12\n });\n });\n\n for (const type of [\"unhandledRejection\", \"uncaughtException\"]) {\n process.on(type, err => exit({\n startDate,\n exception: err || new Error(\\`An \\${type === \"unhandledRejection\" ? \"unhandled promise rejection\" : \"uncaught exception\"} occurred during processing - the application is shutting down.\\`)\n }));\n }\n\n await withGlobal(async () => {\n const result = await main();\n if (result?.error) {\n error(result.error);\n }\n });\n\n exit({ startDate });\n } catch (err) {\n exit({ startDate, exception: err as Error });\n }\n })();\n `}\n <hbr />\n </>\n );\n}\n\nexport interface BinEntryProps extends Omit<\n EntryFileProps,\n \"path\" | \"hashbang\"\n> {\n prefix?: Children;\n postfix?: Children;\n children: Children;\n}\n\n/**\n * The binary entry point for the Shell Shock project.\n */\nexport function BinEntry(props: BinEntryProps) {\n const { prefix, postfix, builtinImports, imports, children, ...rest } = props;\n\n const context = usePowerlines<ScriptPresetContext>();\n const bins = computed<string[]>(() =>\n getUnique(Object.values(context.config.bin))\n );\n\n return (\n <For each={bins.value}>\n {bin => (\n <EntryFile\n {...rest}\n path={findFileName(replaceExtension(bin))}\n typeDefinition={{\n file: bin,\n output: \"bin\",\n input: {\n file: bin\n }\n }}\n imports={defu(\n imports ?? {},\n Object.entries(context.commands as Record<string, CommandTree>)\n .filter(([, command]) => command.isVirtual)\n .reduce((ret, [name, command]) => {\n ret[`./${command.name}`] = [\n { name: \"handler\", alias: `handle${pascalCase(name)}` }\n ];\n\n return ret;\n }, {} as TypescriptFileImports)\n )}\n builtinImports={defu(builtinImports ?? {}, {\n env: [\"env\", \"isDevelopment\", \"isDebug\"],\n console: [\n \"verbose\",\n \"table\",\n \"writeLine\",\n \"borderColors\",\n \"textColors\",\n \"stripAnsi\",\n \"error\",\n \"warn\"\n ],\n utils: [\"isUnicodeSupported\", \"findSuggestions\"],\n state: [\"withGlobal\", \"useGlobal\", \"hasFlag\"],\n help: [\"showHelp\"],\n banner: [\"showBanner\"]\n })}>\n <ExitFunctionDeclaration />\n <Spacing />\n <Show when={Boolean(prefix)}>\n {prefix}\n <Spacing />\n </Show>\n <TSDoc\n heading={`Binary entry point for the ${getAppTitle(\n context,\n true\n )} command-line interface application.`}>\n <TSDocRemarks>\n {`This file serves as the main entry point for the binary executable of the ${getAppTitle(\n context,\n true\n )} command-line interface application. It sets up the necessary environment and runs the application logic with proper exit handling. The main function is defined within this file, and the application is executed inside an asynchronous IIFE to allow for the use of async/await syntax. The file also includes signal handling for graceful shutdowns and error handling for uncaught exceptions and unhandled promise rejections.`}\n </TSDocRemarks>\n <TSDocReturns>\n {`Returns a promise that resolves to either a successful result or an error object.`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n async\n returnType=\"any | { error: string | Error }\"\n name=\"main\">\n <IfStatement condition={code`hasFlag([\"version\", \"v\"])`}>\n {code`console.log(${\n context?.packageJson.version\n ? `\"${context?.packageJson.version}\"`\n : \"0.0.1\"\n });\n return; `}\n </IfStatement>\n <Spacing />\n {children}\n <hbr />\n </FunctionDeclaration>\n <hbr />\n <hbr />\n <hbr />\n <Show when={Boolean(postfix)} fallback={<RunApplication />}>\n {postfix}\n </Show>\n <hbr />\n </EntryFile>\n )}\n </For>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAoCA,SAAS,iBAAoB;AAC7B,QAAO;EAAA,gBAAgB,SAAA,EAAA,CAAA;EAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkEd,gBAAkB,OAAM,EAAA,CAAI;EAAC;;;;;;CAMpC,MAAM,EACJ,QACA,SACA,gBACA,SACA,UACA,GAAG,SACD;CACJ,MAAC,UAAA,eAAA;CACH,MAAA,OAAA,eAAA,UAAA,OAAA,OAAA,QAAA,OAAA,IAAA,CAAA,CAAA;;EAEA,IAAO,OAAA;AACL,UAAA,KAAc;;EAEd,WAAA,QAAA,gBAAA,WAAA,WAAA,MAAA;GACA,IAAQ,OAAC;AACT,WAAU,aAAQ,iBAAA,IAAA,CAAA;;GAEpB,gBAAA;;IAEE,QAAA;IACK,OAAO,EACZ,MAAA,KACK;IACA;;AAEC,WAAO,KAAG,WAAa,EAAC,EAAA,OAAA,QAAA,QAAsB,SAAA,CAAA,QAAA,GAAA,aAAA,QAAA,UAAA,CAAA,QAAA,KAAA,CAAA,MAAA,aAAA;AAC9C,SAAM,KAAC,QAAS,UAAa,CAAC;MAClC,MAAU;MACX,OAAA,SAAA,WAAA,KAAA;;AAEM,YAAA;OACA,EAAI,CAAC,CAAC;;GAET,IAAG,iBAAA;AACD,WAAM,KAAI,kBAAA,EAAA,EAAA;KACR,KAAK;MAAC;MAAA;MAAa;MAAqB;KACxC,SAAA;MAAA;MAAgB;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAA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"}
1
+ {"version":3,"file":"bin-entry.mjs","names":[],"sources":[],"mappings":""}
@@ -188,7 +188,7 @@ function CommandEntry(props) {
188
188
  },
189
189
  children: (child) => (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
190
190
  get when() {
191
- return child.isVirtual;
191
+ return child.virtual;
192
192
  },
193
193
  get fallback() {
194
194
  return (0, _alloy_js_core_jsx_runtime.createComponent)(CommandEntry, { command: child });
@@ -1 +1 @@
1
- {"version":3,"file":"command-entry.d.mts","names":[],"sources":["../../src/components/command-entry.tsx"],"mappings":";;;;;iBA0DgB,iBAAA,CAAkB,KAAA;EAAS,OAAA,EAAS,WAAA;AAAA,IAAa,QAAA;AAAA,UAyBhD,8BAAA;EACf,OAAA,EAAS,WAAA;EACT,MAAA,GAAS,QAAA;EACT,QAAA,GAAW,QAAA;AAAA;;;;iBAMG,yBAAA,CACd,KAAA,EAAO,8BAAA,GAA8B,QAAA;AAAA,UAqFtB,iBAAA,SAA0B,IAAA,CACzC,cAAA;EAGA,OAAA,EAAS,WAAA;AAAA;;;;iBAMK,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAiB,QAAA"}
1
+ {"version":3,"file":"command-entry.d.mts","names":[],"sources":["../../src/components/command-entry.tsx"],"mappings":""}
@@ -185,7 +185,7 @@ function CommandEntry(props) {
185
185
  },
186
186
  children: (child) => createComponent(Show, {
187
187
  get when() {
188
- return child.isVirtual;
188
+ return child.virtual;
189
189
  },
190
190
  get fallback() {
191
191
  return createComponent(CommandEntry, { command: child });
@@ -1 +1 @@
1
- {"version":3,"file":"command-entry.mjs","names":[],"sources":["../../src/components/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 type { Children } from \"@alloy-js/core\";\nimport { code, computed, For, Show } from \"@alloy-js/core\";\nimport {\n ElseClause,\n FunctionDeclaration,\n IfStatement\n} from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { EntryFileProps } from \"@powerlines/plugin-alloy/typescript/components/entry-file\";\nimport { EntryFile } from \"@powerlines/plugin-alloy/typescript/components/entry-file\";\nimport {\n TSDoc,\n TSDocParam,\n TSDocRemarks,\n TSDocTitle\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport type { CommandTree } from \"@shell-shock/core\";\nimport { CommandValidationLogic } from \"@shell-shock/core/components/command-validation-logic\";\nimport { IsDebug } from \"@shell-shock/core/components/helpers\";\nimport {\n CommandParserLogic,\n OptionsInterfaceDeclaration\n} from \"@shell-shock/core/components/options-parser-logic\";\nimport {\n getAppBin,\n getDynamicPathSegmentName,\n isDynamicPathSegment\n} from \"@shell-shock/core/plugin-utils\";\nimport { findFilePath, relativePath } from \"@stryke/path/find\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { replaceExtension } from \"@stryke/path/replace\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { constantCase } from \"@stryke/string-format/constant-case\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport defu from \"defu\";\nimport type { ScriptPresetContext } from \"../types/plugin\";\nimport { VirtualCommandEntry } from \"./virtual-command-entry\";\n\nexport function CommandInvocation(props: { command: CommandTree }) {\n const { command } = props;\n\n return (\n <>\n {code` return withCommand(\"${command.path}\", [${command.segments\n .map(segment =>\n isDynamicPathSegment(segment)\n ? camelCase(getDynamicPathSegmentName(segment))\n : `\"${segment}\"`\n )\n .join(\", \")}], [${\n Object.keys(command.options).length > 0 ? `options` : \"\"\n }${\n command.args.length > 0\n ? `${\n Object.keys(command.options).length > 0 ? \", \" : \"\"\n }${command.args.map(arg => camelCase(arg.name)).join(\", \")}`\n : \"\"\n }], handle${pascalCase(command.name)}); `}\n <hbr />\n </>\n );\n}\n\nexport interface CommandHandlerDeclarationProps {\n command: CommandTree;\n banner?: Children;\n children?: Children;\n}\n\n/**\n * A component that generates the `handler` function declaration for a command.\n */\nexport function CommandHandlerDeclaration(\n props: CommandHandlerDeclarationProps\n) {\n const { command, banner, children } = props;\n\n const context = usePowerlines<ScriptPresetContext>();\n\n return (\n <>\n <OptionsInterfaceDeclaration command={command} />\n <Spacing />\n <TSDoc\n heading={`The ${command.title} (${getAppBin(context)} ${command.segments\n .map(segment =>\n isDynamicPathSegment(segment)\n ? `[${constantCase(getDynamicPathSegmentName(segment))}]`\n : segment\n )\n .join(\" \")}) command.`}>\n <TSDocRemarks>{`${command.description.replace(/\\.+$/, \"\")}.`}</TSDocRemarks>\n <hbr />\n <TSDocTitle>{command.title}</TSDocTitle>\n <TSDocParam name=\"args\">{`The command-line arguments passed to the command.`}</TSDocParam>\n </TSDoc>\n <FunctionDeclaration\n export\n async\n name=\"handler\"\n parameters={[{ name: \"args\", type: \"string[]\", default: \"useArgs()\" }]}>\n <CommandParserLogic\n command={command}\n appSpecificEnvPrefix={context.config.appSpecificEnvPrefix}\n isCaseSensitive={context.config.isCaseSensitive}\n />\n <Spacing />\n <Show when={Boolean(banner)}>{banner}</Show>\n <Spacing />\n {code`writeLine(\"\");`}\n <IfStatement condition={<IsDebug />}>\n {code`writeLine(textColors.body.tertiary(\"Debug mode is enabled. Additional debug information may be logged to the console.\"));\n writeLine(\"\");\n debug(\\`Command path: ${command.segments\n .map(segment =>\n isDynamicPathSegment(segment)\n ? `\\${${camelCase(getDynamicPathSegmentName(segment))}}`\n : segment\n )\n .join(\" / \")} \\\\n\\\\nOptions: \\\\n${Object.values(command.options)\n .map(\n option =>\n ` - ${kebabCase(option.name)}: \\${options.${camelCase(\n option.name\n )} === undefined ? \"\" : JSON.stringify(options.${camelCase(\n option.name\n )})}`\n )\n .join(\"\\\\n\")}${\n command.args.length > 0\n ? ` \\\\n\\\\nArguments: \\\\n${command.args\n .map(\n arg =>\n ` - ${kebabCase(arg.name)}: \\${${camelCase(\n arg.name\n )} === undefined ? \"\" : JSON.stringify(${camelCase(\n arg.name\n )})}`\n )\n .join(\"\\\\n\")}`\n : \"\"\n }\\`); `}\n </IfStatement>\n <Spacing />\n {children}\n <Spacing />\n <IfStatement condition={code`options.help`}>\n {code`return showHelp(); `}\n </IfStatement>\n <ElseClause>\n <hbr />\n <CommandInvocation command={command} />\n </ElseClause>\n </FunctionDeclaration>\n </>\n );\n}\n\nexport interface CommandEntryProps extends Omit<\n EntryFileProps,\n \"path\" | \"typeDefinition\"\n> {\n command: CommandTree;\n}\n\n/**\n * The command entry point for the Shell Shock project.\n */\nexport function CommandEntry(props: CommandEntryProps) {\n const { command, imports, builtinImports, ...rest } = props;\n\n const context = usePowerlines<ScriptPresetContext>();\n const filePath = computed(() =>\n joinPaths(\n command.segments\n .filter(segment => !isDynamicPathSegment(segment))\n .join(\"/\"),\n \"index.ts\"\n )\n );\n const commandSourcePath = computed(() =>\n replaceExtension(\n relativePath(\n joinPaths(context.entryPath, findFilePath(filePath.value)),\n command.entry.input?.file || command.entry.file\n )\n )\n );\n const typeDefinition = computed(() => ({\n ...command.entry,\n output: command.id\n }));\n\n return (\n <>\n <EntryFile\n {...rest}\n path={filePath.value}\n typeDefinition={typeDefinition.value}\n imports={defu(imports ?? {}, {\n [commandSourcePath.value.startsWith(\".\")\n ? commandSourcePath.value\n : `./${commandSourcePath.value}`]:\n `handle${pascalCase(command.name)}`\n })}\n builtinImports={defu(builtinImports ?? {}, {\n env: [\"env\", \"isDevelopment\", \"isDebug\"],\n console: [\"debug\", \"warn\", \"error\", \"writeLine\", \"textColors\"],\n utils: [\"isMinimal\", \"isUnicodeSupported\"],\n state: [\n { name: \"GlobalOptions\", type: true },\n \"useGlobal\",\n \"useGlobalOptions\",\n \"useArgs\",\n \"hasFlag\",\n \"withCommand\"\n ],\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 <OptionsInterfaceDeclaration command={command} />\n <Spacing />\n <CommandHandlerDeclaration\n command={command}\n banner={code`await showBanner(); `}>\n <CommandValidationLogic command={command} />\n <IfStatement condition={code`failures.length > 0`}>\n {code`error(\\`The following validation failures were found while processing the user provided input, and must be corrected before the \\${italic(\"${\n command.title\n }\")} command can be executed: \\\\n\\\\n\\${failures.map(failure => \" - \" + failure).join(\"\\\\n\")}\\`);\n options.help = true; `}\n </IfStatement>\n </CommandHandlerDeclaration>\n </EntryFile>\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":";;;;;;;;;;;;;;;;;;;;;;AAsCA,SAAO,kBAAA,OAAA;CACL,MAAA,EACA,YACI;AACN,QAAO,CAAA,WAAA,IAAA,wBAAA,QAAA,KAAA,MAAA,QAAA,SAAA,KAAA,YAAA,qBAAA,QAAA,GAAA,UAAA,0BAAA,QAAA,CAAA,GAAA,IAAA,QAAA,GAAA,CAAA,KAAA,KAAA,CAAA,MAAA,OAAA,KAAA,QAAA,QAAA,CAAA,SAAA,IAAA,YAAA,KAAA,QAAA,KAAA,SAAA,IAAA,GAAA,OAAA,KAAA,QAAA,QAAA,CAAA,SAAA,IAAA,OAAA,KAAA,QAAA,KAAA,KAAA,QAAA,UAAA,IAAA,KAAA,CAAA,CAAA,KAAA,KAAA,KAAA,GAAA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AGpB,IAAA,OAAA;AACK,WAAQ,MAAM;;GAEf,IAAC,WAAS;AACR,WAAE,gBAAkB,cAAmB,kBAEvC,CAAA;;GAEJ,IAAA,WAAS;AACP,WAAQ,gBAAA,qBAAA,EACL,SAAO,OACP,CAAA;;GAEL,CAAA;EACD,CAAA,CAAA"}
1
+ {"version":3,"file":"command-entry.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");
@@ -16,7 +15,7 @@ function CommandRouterRoute() {
16
15
  return [
17
16
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
18
17
  get when() {
19
- return !command.isVirtual;
18
+ return !command.virtual;
20
19
  },
21
20
  get children() {
22
21
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_dynamic_import_statement.DynamicImportStatement, {
@@ -1 +1 @@
1
- {"version":3,"file":"command-router.d.cts","names":[],"sources":["../../src/components/command-router.tsx"],"mappings":";;;;iBAkCgB,kBAAA,CAAA,GAAkB,QAAA;AAAA,UAuBjB,kBAAA;EACf,QAAA;EACA,QAAA,GAAW,MAAA,SAAe,WAAA;EAC1B,KAAA,GAAQ,QAAA;AAAA;;AAHV;;iBASgB,aAAA,CAAc,KAAA,EAAO,kBAAA,GAAkB,QAAA;;;;iBAmCvC,iBAAA,CAAkB,KAAA,EAAO,kBAAA,GAAkB,QAAA"}
1
+ {"version":3,"file":"command-router.d.cts","names":[],"sources":["../../src/components/command-router.tsx"],"mappings":";;;;iBAkCgB,kBAAA,IAAkB,QAAA;AAAA,UAuBjB,kBAAA;EACf,QAAA;EACA,QAAA,GAAW,MAAA,SAAe,WAAA;EAC1B,KAAA,GAAQ,QAAA;AAAA;AA1BwB;AAuBlC;;AAvBkC,iBAgClB,aAAA,CAAc,KAAA,EAAO,kBAAA,GAAkB,QAAA;;;;iBAmCvC,iBAAA,CAAkB,KAAA,EAAO,kBAAA,GAAkB,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"command-router.d.mts","names":[],"sources":["../../src/components/command-router.tsx"],"mappings":";;;;iBAkCgB,kBAAA,CAAA,GAAkB,QAAA;AAAA,UAuBjB,kBAAA;EACf,QAAA;EACA,QAAA,GAAW,MAAA,SAAe,WAAA;EAC1B,KAAA,GAAQ,QAAA;AAAA;;AAHV;;iBASgB,aAAA,CAAc,KAAA,EAAO,kBAAA,GAAkB,QAAA;;;;iBAmCvC,iBAAA,CAAkB,KAAA,EAAO,kBAAA,GAAkB,QAAA"}
1
+ {"version":3,"file":"command-router.d.mts","names":[],"sources":["../../src/components/command-router.tsx"],"mappings":""}
@@ -14,7 +14,7 @@ function CommandRouterRoute() {
14
14
  return [
15
15
  createComponent(Show, {
16
16
  get when() {
17
- return !command.isVirtual;
17
+ return !command.virtual;
18
18
  },
19
19
  get children() {
20
20
  return createComponent(DynamicImportStatement, {
@@ -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 type { Children } from \"@alloy-js/core\";\nimport { code, computed, For, Show } from \"@alloy-js/core\";\nimport {\n ElseIfClause,\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 { DynamicImportStatement } from \"@powerlines/plugin-alloy/typescript/components/dynamic-import-statement\";\nimport { CommandContext, useCommand } from \"@shell-shock/core/contexts/command\";\nimport { isDynamicPathSegment } from \"@shell-shock/core/plugin-utils\";\nimport type { CommandTree } from \"@shell-shock/core/types/command\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport type { ScriptPresetContext } from \"../types/plugin\";\n\nexport function CommandRouterRoute() {\n const command = useCommand();\n\n return (\n <>\n <Show when={!command.isVirtual}>\n <DynamicImportStatement\n name={`handle${pascalCase(command.name)}`}\n importPath={`./${\n command.segments.filter(segment => !isDynamicPathSegment(segment))[\n command.segments.filter(segment => !isDynamicPathSegment(segment))\n .length - 1\n ]\n }`}\n exportName=\"handler\"\n />\n </Show>\n <hbr />\n {code`return handle${pascalCase(command.name)}(args);`}\n </>\n );\n}\n\nexport interface CommandRouterProps {\n segments: string[];\n commands?: Record<string, CommandTree>;\n route?: Children;\n}\n\n/**\n * The command router component.\n */\nexport function CommandRouter(props: CommandRouterProps) {\n const { segments, commands, route } = props;\n\n const index = computed(() => 2 + (segments.length ?? 0));\n\n return (\n <Show when={commands && Object.keys(commands).length > 0}>\n <VarDeclaration\n let\n name=\"command\"\n type=\"string\"\n initializer={code`\"\";`}\n />\n <Spacing />\n <Show when={commands && Object.keys(commands).length > 0}>\n <IfStatement\n condition={code`args.length > ${\n index.value\n } && args[${index.value}]`}>{code`command = args[${\n index.value\n }];`}</IfStatement>\n <Spacing />\n </Show>\n <CommandRouterBody\n segments={segments}\n commands={commands}\n route={route}\n />\n </Show>\n );\n}\n\n/**\n * The internal command router body logic component.\n */\nexport function CommandRouterBody(props: CommandRouterProps) {\n const { commands, route } = props;\n\n const context = usePowerlines<ScriptPresetContext>();\n\n return (\n <Show when={commands && Object.keys(commands).length > 0}>\n <IfStatement condition={code`!command.startsWith(\"-\")`}>\n <For each={Object.values(commands ?? {})}>\n {(subcommand, idx) => (\n <CommandContext.Provider value={subcommand}>\n <Show\n when={Boolean(idx)}\n fallback={\n <IfStatement\n condition={code`${\n context.config.isCaseSensitive\n ? \"command\"\n : 'command.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")'\n } === \"${\n context.config.isCaseSensitive\n ? subcommand.name\n : subcommand.name\n .toLowerCase()\n .replaceAll(\"-\", \"\")\n .replaceAll(\"_\", \"\")\n }\"${\n subcommand.alias && subcommand.alias.length > 0\n ? ` || ${subcommand.alias\n .map(\n alias =>\n `${context.config.isCaseSensitive ? \"command\" : 'command.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")'} === \"${\n context.config.isCaseSensitive\n ? alias\n : alias\n .toLowerCase()\n .replaceAll(\"-\", \"\")\n .replaceAll(\"_\", \"\")\n }\"`\n )\n .join(\" || \")}`\n : \"\"\n }`}>\n <Show\n when={Boolean(route)}\n fallback={<CommandRouterRoute />}>\n {route}\n </Show>\n </IfStatement>\n }>\n <ElseIfClause\n condition={code`${\n context.config.isCaseSensitive\n ? \"command\"\n : 'command.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")'\n } === \"${\n context.config.isCaseSensitive\n ? subcommand.name\n : subcommand.name\n .toLowerCase()\n .replaceAll(\"-\", \"\")\n .replaceAll(\"_\", \"\")\n }\"${\n subcommand.alias && subcommand.alias.length > 0\n ? ` || ${subcommand.alias\n .map(\n alias =>\n `${context.config.isCaseSensitive ? \"command\" : 'command.toLowerCase().replaceAll(\"-\", \"\").replaceAll(\"_\", \"\")'} === \"${\n context.config.isCaseSensitive\n ? alias\n : alias\n .toLowerCase()\n .replaceAll(\"-\", \"\")\n .replaceAll(\"_\", \"\")\n }\"`\n )\n .join(\" || \")}`\n : \"\"\n }`}>\n <Show when={Boolean(route)} fallback={<CommandRouterRoute />}>\n {route}\n </Show>\n </ElseIfClause>\n </Show>\n </CommandContext.Provider>\n )}\n </For>\n <ElseIfClause\n condition={code`Boolean(command) && !command.startsWith(\"-\")`}>{code`const suggestions = findSuggestions(command, [${Object.values(\n commands ?? {}\n )\n .map(\n cmd =>\n `\"${cmd.name}\"${(cmd.alias ?? []).map(alias => `, \"${alias}\"`).join(\"\")}`\n )\n .join(\", \")}]).slice(0, 3);\n error(\\`Unknown command: \"\\${command}\"\\${suggestions && suggestions.length > 0 ? \\`, did you mean: \\${suggestions.length === 1 ? \\`\"\\${suggestions[0]}\"\\` : suggestions.map((suggestion, i) => i < suggestions.length - 1 ? \\`\"\\${suggestion}\", \\` : \\`or \"\\${suggestion}\"\\`)}?\\` : \"\"} \\`);`}</ElseIfClause>\n </IfStatement>\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;AA2BA,SAAS,qBAAyB;CAClC,MAAQ,UAAC,YAAgB;AACzB,QAAS;EAAA,gBAAA,MAAuB;GAChC,IAAO,OAAO;AACR,WAAG,CAAA,QAAa;;;AAGhB,WAAC,gBAAS,wBAAqB;KAC7B,IAAA,OAAU;;;KAGb,IAAA,aAAA;AACE,aAAU,KAAE,QAAQ,SAAU,QAAA,YAAA,CAAA,qBAAA,QAAA,CAAA,CAAA,QAAA,SAAA,QAAA,YAAA,CAAA,qBAAA,QAAA,CAAA,CAAA,SAAA;;KAE7B,YAAS;KACV,CAAC;;GAEL,CAAC;EAAE,gBAAgB,OAAS,EAAA,CAAA;EAAA,WAAkB,IAAC,gBAAA,WAA6B,QAAA,KAAA,CAAA,SAAA;EAAA;;;;;AAK/E,SAAS,cAAA,OAAA;CACP,MAAM,EACJ,UACA,UACA,UACD;CACH,MAAA,QAAA,eAAA,KAAA,SAAA,UAAA,GAAA;;EAEA,IAAO,OAAA;AACL,UAAU,YAAQ,OAAA,KAAA,SAAA,CAAA,SAAA;;EAElB,IAAM,WAAU;AAClB,UAAA;IAAA,gBAAA,gBAAA;;KAEE,MAAA;KACK,MAAO;KACZ,aAAA,IAA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.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");
@@ -1,10 +1,8 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
-
3
1
  //#region src/components/exit-function-declaration.d.ts
4
2
  /**
5
3
  * The `exit` handler function declaration code for the Shell Shock project.
6
4
  */
7
- declare function ExitFunctionDeclaration(): _$_alloy_js_core0.Children;
5
+ declare function ExitFunctionDeclaration(): import("@alloy-js/core").Children;
8
6
  //#endregion
9
7
  export { ExitFunctionDeclaration };
10
8
  //# sourceMappingURL=exit-function-declaration.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exit-function-declaration.d.cts","names":[],"sources":["../../src/components/exit-function-declaration.tsx"],"mappings":";;;;;;iBAmCgB,uBAAA,CAAA,GAAuB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"exit-function-declaration.d.cts","names":[],"sources":["../../src/components/exit-function-declaration.tsx"],"mappings":";;AAmCA;;iBAAgB,uBAAA,6BAAuB,QAAA"}
@@ -1,10 +1,8 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
-
3
1
  //#region src/components/exit-function-declaration.d.ts
4
2
  /**
5
3
  * The `exit` handler function declaration code for the Shell Shock project.
6
4
  */
7
- declare function ExitFunctionDeclaration(): _$_alloy_js_core0.Children;
5
+ declare function ExitFunctionDeclaration(): import("@alloy-js/core").Children;
8
6
  //#endregion
9
7
  export { ExitFunctionDeclaration };
10
8
  //# sourceMappingURL=exit-function-declaration.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exit-function-declaration.d.mts","names":[],"sources":["../../src/components/exit-function-declaration.tsx"],"mappings":";;;;;;iBAmCgB,uBAAA,CAAA,GAAuB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"exit-function-declaration.d.mts","names":[],"sources":["../../src/components/exit-function-declaration.tsx"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"exit-function-declaration.mjs","names":[],"sources":["../../src/components/exit-function-declaration.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 } from \"@alloy-js/core\";\nimport {\n FunctionDeclaration,\n IfStatement,\n InterfaceDeclaration,\n InterfaceMember,\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 { IsVerbose } from \"@shell-shock/core/components/helpers\";\nimport { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport type { ScriptPresetContext } from \"../types/plugin\";\n\n/**\n * The `exit` handler function declaration code for the Shell Shock project.\n */\nexport function ExitFunctionDeclaration() {\n const context = usePowerlines<ScriptPresetContext>();\n\n return (\n <>\n <InterfaceDeclaration\n export\n name=\"ExitOptions\"\n doc=\"Options for the exit handler function.\">\n <InterfaceMember\n name=\"exception\"\n optional\n type=\"string | Error\"\n doc=\"An optional exception that caused the exit. This can be a string message or an Error object.\"\n />\n <hbr />\n <InterfaceMember\n name=\"skipProcessExit\"\n optional\n type=\"boolean\"\n doc=\"Indicates whether the exit function should manually exit the process or not. If set to true, the exit function will not call process.exit() and will allow the application to continue running. If set to false or not specified, the exit function will call process.exit() to terminate the application.\"\n />\n <hbr />\n <InterfaceMember\n name=\"isSynchronous\"\n optional\n type=\"boolean\"\n doc=\"Indicates whether the exit function should perform synchronous operations only. If set to true, the exit function will avoid any asynchronous operations during exit. If set to false or not specified, the exit function may perform asynchronous operations as needed.\"\n />\n <hbr />\n <InterfaceMember\n name=\"signal\"\n optional\n type=\"number\"\n doc=\"The signal number that triggered the exit. This is typically used when the shutdown is initiated by a system signal (e.g., SIGINT, SIGTERM).\"\n />\n <hbr />\n <InterfaceMember\n name=\"startDate\"\n optional\n type=\"Date\"\n doc=\"A Date object representing the timestamp when the process started. This can be used to measure the duration of the shutdown process.\"\n />\n </InterfaceDeclaration>\n <Spacing />\n <VarDeclaration\n let\n name=\"isExiting\"\n type=\"boolean\"\n initializer={code`false;`}\n />\n <VarDeclaration\n const\n name=\"callbackAsyncQueue\"\n type=\"Array<[(code: number | string) => Promise<void> | void, number]>\"\n initializer={code`[];`}\n />\n <VarDeclaration\n const\n name=\"callbackSyncQueue\"\n type=\"Array<(code: number | string) => void>\"\n initializer={code`[];`}\n />\n <Spacing />\n <FunctionDeclaration\n export\n async\n name=\"exit\"\n parameters={[\n {\n name: \"options\",\n type: \"ExitOptions\",\n default: \"{}\"\n }\n ]}>\n {code`\n try {\n if (isExiting) {\n return;\n }\n\n isExiting = true;\n\n let exitCode: number | string = 0;\n if ((options.signal !== undefined && options.signal > 0) || options.exception) {\n exitCode = 128 + (options.signal ?? 1);\n } else if (typeof process.exitCode === \"number\" || typeof process.exitCode === \"string\") {\n exitCode = process.exitCode;\n }\n\n if (options.exception) {\n error({ message: \\`A fatal error occured while running the application - please contact the ${getAppTitle(\n context\n )} support team\\${options.exception && typeof options.exception !== \"symbol\" ? \\`: \\\\n\\\\n\\${typeof options.exception === \"string\" ? options.exception : options.exception.message}\\` : \".\"}\\`,\n ...(options.exception && typeof options.exception === \"object\" ? { stack: (options.exception as { message: string; stack?: string }).stack } : {})\n });\n }\n\n const terminate = (force = false) => { `}\n <IfStatement\n condition={<IsVerbose />}>{code`writeLine(\"\");`}</IfStatement>\n <hbr />\n {code`\n verbose(\\`The ${getAppTitle(\n context,\n true\n )} application exited \\${options.exception ? \\`early due to an exception\\` : \"successfully\"}\\${options.startDate ? \\`. Total processing time is \\${Date.now() - options.startDate.getTime() > 5000 ? Math.floor((Date.now() - options.startDate.getTime()) / 1000) : Date.now() - options.startDate.getTime()} \\${Date.now() - options.startDate.getTime() > 5000 ? \"seconds\" : \"milliseconds\"}\\` : \"\"}...\\`);\n if (!options.skipProcessExit) {\n process.nextTick(() => process.exit(exitCode));\n }\n };\n\n for (const callbackSync of callbackSyncQueue) {\n callbackSync(exitCode);\n }\n\n if (!options.isSynchronous) {\n const promises = [];\n let forceAfter = 0;\n for (const [callbackAsync, wait] of callbackAsyncQueue) {\n forceAfter = Math.max(forceAfter, wait);\n promises.push(Promise.resolve(callbackAsync(exitCode)));\n }\n\n const asyncTimer = setTimeout(() => {\n terminate(true);\n }, forceAfter);\n await Promise.all(promises);\n clearTimeout(asyncTimer);\n }\n\n terminate();\n } catch (err) {\n error(\\`The exit process failed to complete\\${(err as Error)?.message ? \\` - \\${(err as Error).message}\\` : \"\"}. Please contact the ${getAppTitle(\n context,\n true\n )} support team.\\`);\n\n if (!options.skipProcessExit) {\n process.nextTick(() => process.exit(1));\n }\n }\n `}\n </FunctionDeclaration>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA4BA,SAAS,0BAA+B;CACxC,MAAQ,UAAC,eAAqB;AAC9B,QAAO;EAAA,gBAAO,sBAAoC;;GAEhD,MAAA;GACC,KAAK;GACN,IAAA,WAAA;AACI,WAAC;KAAA,gBAAS,iBAA0B;MAClC,MAAA;;MAEA,MAAC;MACJ,KAAA;MACE,CAAA;KAAA,gBAAA,OAAA,EAAA,CAAA;KAAA,gBAAA,iBAAA;MACC,MAAA;MACA,UAAM;MACN,MAAK;MACL,KAAC;MACF,CAAC;KAAE,gBAAe,OAAA,EAAA,CAAA;KAAA,gBAAA,iBAAA;MACjB,MAAE;MACF,UAAQ;MACR,MAAM;MACN,KAAC;MACF,CAAC;KAAC,gBAAK,OAAA,EAAA,CAAA;KAAA,gBAAA,iBAAA;MACN,MAAC;MACD,UAAQ;MACR,MAAE;MACF,KAAE;MACH,CAAC;KAAE,gBAAe,OAAQ,EAAI,CAAA;KAAA,gBAAqB,iBAAiB;MACnE,MAAC;MACD,UAAM;MACN,MAAC;MACD,KAAE;MACH,CAAC;KAAC;;GAEN,CAAC;EAAE,gBAAkB,SAAS,EAAA,CAAG;EAAC,gBAAc,gBAAe;GAC9D,OAAK;GACL,MAAK;GACL,MAAK;GACL,aAAY,IAAA;GACb,CAAC;EAAE,gBAAI,gBAAA;GACN,SAAM;GACN,MAAM;GACN,MAAK;GACL,aAAU,IAAA;GACX,CAAC;EAAE,gBAAG,gBAAA;GACL,SAAM;GACN,MAAM;GACN,MAAM;GACN,aAAa,IAAI;GAClB,CAAC;EAAE,gBAAG,SAAA,EAAA,CAAA;EAAA,gBAAA,qBAAA;GACL,UAAI;GACJ,OAAG;GACH,MAAG;GACH,YAAI,CAAA;IACF,MAAM;IACN,MAAM;IACN,SAAE;IACH,CAAC;GACF,IAAG,WAAA;AACD,WAAE;KAAA,WAAA,IAAA;;;;;;;;;;;;;;;;4GAgBY,YAAA,QAAA,CAAA;;;;;qDAKV;KAAA,gBAAA,aAAA;MACF,IAAE,YAAA;AACD,cAAI,gBAAA,WAAA,EAAA,CAAA;;MAEL,UAAQ,IAAA;MACT,CAAC;KAAE,gBAAU,OAAA,EAAA,CAAA;KAAA,WAAA,IAAA;8BACR,YAAA,SAAA,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;kJA2B+H,YAAmB,SAAQ,KAAM,CAAC;;;;;;UAMnK;KAAC;;GAER,CAAC;EAAC"}
1
+ {"version":3,"file":"exit-function-declaration.mjs","names":[],"sources":[],"mappings":""}
@@ -80,7 +80,7 @@ function VirtualCommandEntry(props) {
80
80
  return filePath.value;
81
81
  },
82
82
  get imports() {
83
- return (0, defu.default)(imports ?? {}, Object.entries(command.children).filter(([, child]) => child.isVirtual).reduce((ret, [name, child]) => {
83
+ return (0, defu.default)(imports ?? {}, Object.entries(command.children).filter(([, child]) => child.virtual).reduce((ret, [name, child]) => {
84
84
  ret[`./${child.name}`] = [{
85
85
  name: "handler",
86
86
  alias: `handle${(0, _stryke_string_format_pascal_case.pascalCase)(name)}`
@@ -139,7 +139,7 @@ function VirtualCommandEntry(props) {
139
139
  },
140
140
  children: (child) => (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
141
141
  get when() {
142
- return child.isVirtual;
142
+ return child.virtual;
143
143
  },
144
144
  get fallback() {
145
145
  return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_command_entry.CommandEntry, { command: child });
@@ -1 +1 @@
1
- {"version":3,"file":"virtual-command-entry.d.mts","names":[],"sources":["../../src/components/virtual-command-entry.tsx"],"mappings":";;;;;UA8CiB,qCAAA;EACf,OAAA,EAAS,WAAA;EACT,MAAA,GAAS,QAAA;EACT,QAAA,GAAW,QAAA;AAAA;;;;iBAMG,gCAAA,CACd,KAAA,EAAO,qCAAA,GAAqC,QAAA;AAAA,UAqC7B,wBAAA,SAAiC,IAAA,CAChD,cAAA;EAGA,OAAA,EAAS,WAAA;AAAA;;;;iBAMK,mBAAA,CAAoB,KAAA,EAAO,wBAAA,GAAwB,QAAA"}
1
+ {"version":3,"file":"virtual-command-entry.d.mts","names":[],"sources":["../../src/components/virtual-command-entry.tsx"],"mappings":""}
@@ -77,7 +77,7 @@ function VirtualCommandEntry(props) {
77
77
  return filePath.value;
78
78
  },
79
79
  get imports() {
80
- return defu(imports ?? {}, Object.entries(command.children).filter(([, child]) => child.isVirtual).reduce((ret, [name, child]) => {
80
+ return defu(imports ?? {}, Object.entries(command.children).filter(([, child]) => child.virtual).reduce((ret, [name, child]) => {
81
81
  ret[`./${child.name}`] = [{
82
82
  name: "handler",
83
83
  alias: `handle${pascalCase(name)}`
@@ -136,7 +136,7 @@ function VirtualCommandEntry(props) {
136
136
  },
137
137
  children: (child) => createComponent(Show, {
138
138
  get when() {
139
- return child.isVirtual;
139
+ return child.virtual;
140
140
  },
141
141
  get fallback() {
142
142
  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 type { Children } from \"@alloy-js/core\";\nimport { code, computed, For, Show } from \"@alloy-js/core\";\nimport { FunctionDeclaration } from \"@alloy-js/typescript\";\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 {\n TSDoc,\n TSDocParam,\n TSDocRemarks,\n TSDocTitle\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { TypescriptFile } from \"@powerlines/plugin-alloy/typescript/components/typescript-file\";\nimport {\n getAppBin,\n getDynamicPathSegmentName,\n isDynamicPathSegment\n} from \"@shell-shock/core/plugin-utils\";\nimport type { CommandTree } from \"@shell-shock/core/types/command\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { constantCase } from \"@stryke/string-format/constant-case\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport defu from \"defu\";\nimport type { ScriptPresetContext } from \"../types/plugin\";\nimport { CommandEntry } from \"./command-entry\";\nimport { CommandRouter } from \"./command-router\";\n\nexport interface VirtualCommandHandlerDeclarationProps {\n command: CommandTree;\n banner?: Children;\n children?: Children;\n}\n\n/**\n * A component that generates the `handler` function declaration for a command.\n */\nexport function VirtualCommandHandlerDeclaration(\n props: VirtualCommandHandlerDeclarationProps\n) {\n const { command, children, banner } = props;\n\n const context = usePowerlines<ScriptPresetContext>();\n\n return (\n <>\n <TSDoc\n heading={`The ${command.title} (${getAppBin(context)} ${command.segments\n .map(segment =>\n isDynamicPathSegment(segment)\n ? `[${constantCase(getDynamicPathSegmentName(segment))}]`\n : segment\n )\n .join(\" \")}) virtual command.`}>\n <TSDocRemarks>{`${command.description.replace(/\\.+$/, \"\")}.`}</TSDocRemarks>\n <hbr />\n <TSDocTitle>{command.title}</TSDocTitle>\n <TSDocParam name=\"args\">{`The command-line arguments passed to the command.`}</TSDocParam>\n </TSDoc>\n <FunctionDeclaration\n export\n async\n name=\"handler\"\n parameters={[{ name: \"args\", type: \"string[]\", default: \"useArgs()\" }]}>\n <Spacing />\n {children}\n <Spacing />\n <Show when={Boolean(banner)}>{banner}</Show>\n <Spacing />\n {code`return showHelp(); `}\n </FunctionDeclaration>\n </>\n );\n}\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<ScriptPresetContext>();\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: [\"warn\", \"error\", \"writeLine\", \"textColors\"],\n utils: [\"isMinimal\", \"isUnicodeSupported\", \"findSuggestions\"],\n state: [\n { name: \"GlobalOptions\", type: true },\n \"useGlobal\",\n \"useGlobalOptions\",\n \"withCommand\",\n \"useArgs\",\n \"hasFlag\"\n ],\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\n command={command}\n banner={code`await showBanner(); `}>\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":";;;;;;;;;;;;;;;;;;;AAmCA,SAAE,iCAAA,OAAA;CACA,MAAM,EACR,SACA,UACA,WACM;CACN,MAAO,UAAW,eAAK;AACvB,QAAO,CAAA,gBAAO,OAAqB;EACnC,IAAQ,UAAC;AACH,UAAG,OAAA,QAAgB,MAAQ,IAAA,UAAe,QAAA,CAAA,GAAA,QAAA,SAAA,KAAA,YAAA,qBAAA,QAAA,GAAA,IAAA,aAAA,0BAAA,QAAA,CAAA,CAAA,KAAA,QAAA,CAAA,KAAA,IAAA,CAAA;;EAEhD,IAAO,WAAU;AACf,UAAS;IAAA,gBAAW,cAAA,EACd,IAAG,WAAQ;AACT,YAAG,GAAA,QAAQ,YAAA,QAAA,QA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A;KAAA;KAAA;KAAA;KACX,UAAQ,QAAA,GAAA,QAAA,SAAA,QAAA,YAAA,CAAA,qBAAA,QAAA,CAAA,CAAA,GAAA,CAAA,WAAA;KACX,UAAA,UAAA,GAAA,QAAA,SAAA,QAAA,YAAA,CAAA,qBAAA,QAAA,CAAA,CAAA,GAAA,CAAA,aAAA;IACD,CAAA;;EAED,IAAM,WAAC;AACJ,UAAA,CAAA,gBAAA,SAAA,EAAA,CAAA,EAAA,gBAAA,kCAAA;IACE;IACC,QAAQ,IAAA;IACR,IAAI,WAAW;AACf,YAAS,gBAAI,eAAA;MACX,IAAA,WAAa;AACb,cAAO,QAAQ;;MAEb,IAAC,WAAc;AACb,cAAO,QAAQ;;MAElB,CAAC;;IAEL,CAAC,CAAC;;EAEN,CAAC,CAAC,EAAE,gBAAE,KAAA;EACL,IAAI,OAAA;AACF,UAAO,OAAI,OAAA,QAAiB,SAAS;;EAEvC,WAAM,UAAS,gBAAa,MAAA;GAC1B,IAAI,OAAO;AACT,WAAM,MAAO;;GAEf,IAAI,WAAG;AACL,WAAK,gBAAY,cAAA,EACf,SAAG,OACJ,CAAC;;GAEJ,IAAI,WAAU;AACZ,WAAK,gBAAK,qBAAA,EACR,SAAK,OACN,CAAC;;GAEL,CAAC;EACH,CAAC,CAAC"}
1
+ {"version":3,"file":"virtual-command-entry.mjs","names":[],"sources":[],"mappings":""}
@@ -1,6 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
- let _shell_shock_core = require("@shell-shock/core");
4
2
 
5
3
  //#region src/helpers/get-global-options.ts
6
4
  /**
@@ -16,8 +14,8 @@ function getGlobalOptions() {
16
14
  description: "Show help information.",
17
15
  env: false,
18
16
  alias: ["h", "?"],
19
- kind: _shell_shock_core.CommandParameterKinds.boolean,
20
- optional: true,
17
+ type: "boolean",
18
+ required: false,
21
19
  default: false,
22
20
  variadic: false,
23
21
  skipAddingNegative: true
@@ -28,8 +26,8 @@ function getGlobalOptions() {
28
26
  description: "Show the version of the application.",
29
27
  env: false,
30
28
  alias: ["v"],
31
- kind: _shell_shock_core.CommandParameterKinds.boolean,
32
- optional: true,
29
+ type: "boolean",
30
+ required: false,
33
31
  default: false,
34
32
  variadic: false,
35
33
  skipAddingNegative: true
@@ -40,8 +38,8 @@ function getGlobalOptions() {
40
38
  description: "Enable verbose output.",
41
39
  env: "VERBOSE",
42
40
  alias: ["V"],
43
- kind: _shell_shock_core.CommandParameterKinds.boolean,
44
- optional: true,
41
+ type: "boolean",
42
+ required: false,
45
43
  default: false,
46
44
  variadic: false,
47
45
  skipAddingNegative: true
@@ -52,8 +50,8 @@ function getGlobalOptions() {
52
50
  description: "Enable colored terminal output.",
53
51
  env: "COLOR",
54
52
  alias: ["colors"],
55
- kind: _shell_shock_core.CommandParameterKinds.boolean,
56
- optional: true,
53
+ type: "boolean",
54
+ required: false,
57
55
  variadic: false,
58
56
  skipAddingNegative: false
59
57
  },
@@ -63,8 +61,8 @@ function getGlobalOptions() {
63
61
  description: "Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline.",
64
62
  env: "NO_BANNER",
65
63
  alias: ["hide-banner"],
66
- kind: _shell_shock_core.CommandParameterKinds.boolean,
67
- optional: true,
64
+ type: "boolean",
65
+ required: false,
68
66
  variadic: false,
69
67
  default: false
70
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"get-global-options.d.cts","names":[],"sources":["../../src/helpers/get-global-options.ts"],"mappings":";;;;;AA0BA;;;iBAAgB,gBAAA,CAAA,GAAoB,aAAA"}
1
+ {"version":3,"file":"get-global-options.d.cts","names":[],"sources":["../../src/helpers/get-global-options.ts"],"mappings":";;;;;AAyBA;;;iBAAgB,gBAAA,IAAoB,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-global-options.d.mts","names":[],"sources":["../../src/helpers/get-global-options.ts"],"mappings":";;;;;AA0BA;;;iBAAgB,gBAAA,CAAA,GAAoB,aAAA"}
1
+ {"version":3,"file":"get-global-options.d.mts","names":[],"sources":["../../src/helpers/get-global-options.ts"],"mappings":""}
@@ -1,5 +1,3 @@
1
- import { CommandParameterKinds } from "@shell-shock/core";
2
-
3
1
  //#region src/helpers/get-global-options.ts
4
2
  /**
5
3
  * Get the default command options.
@@ -14,8 +12,8 @@ function getGlobalOptions() {
14
12
  description: "Show help information.",
15
13
  env: false,
16
14
  alias: ["h", "?"],
17
- kind: CommandParameterKinds.boolean,
18
- optional: true,
15
+ type: "boolean",
16
+ required: false,
19
17
  default: false,
20
18
  variadic: false,
21
19
  skipAddingNegative: true
@@ -26,8 +24,8 @@ function getGlobalOptions() {
26
24
  description: "Show the version of the application.",
27
25
  env: false,
28
26
  alias: ["v"],
29
- kind: CommandParameterKinds.boolean,
30
- optional: true,
27
+ type: "boolean",
28
+ required: false,
31
29
  default: false,
32
30
  variadic: false,
33
31
  skipAddingNegative: true
@@ -38,8 +36,8 @@ function getGlobalOptions() {
38
36
  description: "Enable verbose output.",
39
37
  env: "VERBOSE",
40
38
  alias: ["V"],
41
- kind: CommandParameterKinds.boolean,
42
- optional: true,
39
+ type: "boolean",
40
+ required: false,
43
41
  default: false,
44
42
  variadic: false,
45
43
  skipAddingNegative: true
@@ -50,8 +48,8 @@ function getGlobalOptions() {
50
48
  description: "Enable colored terminal output.",
51
49
  env: "COLOR",
52
50
  alias: ["colors"],
53
- kind: CommandParameterKinds.boolean,
54
- optional: true,
51
+ type: "boolean",
52
+ required: false,
55
53
  variadic: false,
56
54
  skipAddingNegative: false
57
55
  },
@@ -61,8 +59,8 @@ function getGlobalOptions() {
61
59
  description: "Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline.",
62
60
  env: "NO_BANNER",
63
61
  alias: ["hide-banner"],
64
- kind: CommandParameterKinds.boolean,
65
- optional: true,
62
+ type: "boolean",
63
+ required: false,
66
64
  variadic: false,
67
65
  default: false
68
66
  }
@@ -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 { CommandOption } from \"@shell-shock/core\";\nimport { CommandParameterKinds } from \"@shell-shock/core\";\n\n/**\n * Get the default command options.\n *\n * @returns The default command options.\n */\nexport function getGlobalOptions(): CommandOption[] {\n return [\n {\n name: \"help\",\n title: \"Help\",\n description: \"Show help information.\",\n env: false,\n alias: [\"h\", \"?\"],\n kind: CommandParameterKinds.boolean,\n optional: true,\n default: false,\n variadic: false,\n skipAddingNegative: true\n },\n {\n name: \"version\",\n title: \"Version\",\n description: \"Show the version of the application.\",\n env: false,\n alias: [\"v\"],\n kind: CommandParameterKinds.boolean,\n optional: true,\n default: false,\n variadic: false,\n skipAddingNegative: true\n },\n {\n name: \"verbose\",\n title: \"Verbose\",\n description: \"Enable verbose output.\",\n env: \"VERBOSE\",\n alias: [\"V\"],\n kind: CommandParameterKinds.boolean,\n optional: true,\n default: false,\n variadic: false,\n skipAddingNegative: true\n },\n {\n name: \"color\",\n title: \"Color\",\n description: \"Enable colored terminal output.\",\n env: \"COLOR\",\n alias: [\"colors\"],\n kind: CommandParameterKinds.boolean,\n optional: true,\n variadic: false,\n skipAddingNegative: false\n },\n {\n name: \"no-banner\",\n title: \"Hide Banner\",\n description:\n \"Do not display the application banner displayed while running the CLI - will be set to true if running in a CI pipeline.\",\n env: \"NO_BANNER\",\n alias: [\"hide-banner\"],\n kind: CommandParameterKinds.boolean,\n optional: true,\n variadic: false,\n default: false\n }\n ];\n}\n"],"mappings":";;;;;;;;AAyBA,SAAE,mBAAA;AACF,QAAO;EAAA;GACL,MAAO;GACL,OAAA;GACA,aAAa;GACb,KAAE;GACF,OAAE,CAAA,KAAW,IAAG;GAChB,MAAM,sBAAM;GACZ,UAAU;GACV,SAAQ;GACR,UAAU;GACV,oBAAgB;GACjB;EAAE;GACD,MAAE;GACF,OAAC;GACD,aAAA;GACA,KAAE;GACF,OAAO,CAAC,IAAE;GACV,MAAE,sBAAuB;GACzB,UAAO;GACP,SAAS;GACT,UAAQ;GACR,oBAAgB;GACjB;EAAE;GACD,MAAE;GACF,OAAE;GACF,aAAC;GACD,KAAA;GACA,OAAO,CAAC,IAAC;GACT,MAAE,sBAAgB;GAClB,UAAE;GACF,SAAQ;GACR,UAAU;GACV,oBAAQ;GACT;EAAE;GACD,MAAE;GACF,OAAE;GACF,aAAE;GACF,KAAC;GACD,OAAA,CAAA,SAAA;GACA,MAAM,sBAAS;GACf,UAAU;GACV,UAAE;GACF,oBAAc;GACf;EAAE;GACD,MAAM;GACN,OAAE;GACF,aAAY;GACZ,KAAE;GACF,OAAC,CAAA,cAAA;GACD,MAAA,sBAAA;GACA,UAAS;GACT,UAAU;GACV,SAAE;GACH;EAAC"}
1
+ {"version":3,"file":"get-global-options.mjs","names":[],"sources":[],"mappings":""}
package/dist/index.cjs CHANGED
@@ -27,7 +27,7 @@ const plugin = (options = {}) => {
27
27
  ...(0, _shell_shock_plugin_help.default)(options),
28
28
  ...(0, _shell_shock_plugin_banner.default)(options.banner),
29
29
  {
30
- name: "shell-shock:script-preset",
30
+ name: "shell-shock/script-preset",
31
31
  config() {
32
32
  this.debug("Providing default configuration for the Shell Shock `script` preset.");
33
33
  return {
@@ -100,7 +100,7 @@ const plugin = (options = {}) => {
100
100
  doubleHardline: true,
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 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AAqCA;cAAa,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":""}
package/dist/index.mjs CHANGED
@@ -22,7 +22,7 @@ const plugin = (options = {}) => {
22
22
  ...help(options),
23
23
  ...banner(options.banner),
24
24
  {
25
- name: "shell-shock:script-preset",
25
+ name: "shell-shock/script-preset",
26
26
  config() {
27
27
  this.debug("Providing default configuration for the Shell Shock `script` preset.");
28
28
  return {
@@ -95,7 +95,7 @@ const plugin = (options = {}) => {
95
95
  doubleHardline: true,
96
96
  children: (child) => createComponent(Show, {
97
97
  get when() {
98
- return child.isVirtual;
98
+ return child.virtual;
99
99
  },
100
100
  get fallback() {
101
101
  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 type { CommandTree } from \"@shell-shock/core/types/command\";\nimport banner from \"@shell-shock/plugin-banner\";\nimport console from \"@shell-shock/plugin-console\";\nimport help from \"@shell-shock/plugin-help\";\nimport type { Plugin } from \"powerlines\";\nimport { BinEntry } from \"./components/bin-entry\";\nimport { CommandEntry } from \"./components/command-entry\";\nimport { CommandRouter } from \"./components/command-router\";\nimport { VirtualCommandEntry } from \"./components/virtual-command-entry\";\nimport { getGlobalOptions } from \"./helpers/get-global-options\";\nimport type { ScriptPresetContext, ScriptPresetOptions } from \"./types/plugin\";\n\n/**\n * The Shell Shock base plugin.\n */\nexport const plugin = <\n TContext extends ScriptPresetContext = ScriptPresetContext\n>(\n options: ScriptPresetOptions = {}\n): Plugin<TContext>[] => {\n return [\n ...console<TContext>(options),\n ...help<TContext>(options),\n ...banner<TContext>(options.banner),\n {\n name: \"shell-shock:script-preset\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `script` preset.\"\n );\n\n return {\n globalOptions: getGlobalOptions,\n isCaseSensitive: false,\n ...options\n };\n },\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\n \"Rendering entrypoint modules for the Shell Shock `script` preset.\"\n );\n\n return render(\n this,\n <>\n <BinEntry\n builtinImports={{\n console: [\n \"divider\",\n \"stripAnsi\",\n \"writeLine\",\n \"splitText\",\n \"help\"\n ],\n utils: [\"isMinimal\"],\n state: [\"useArgs\", \"hasFlag\", \"isHelp\"]\n }}>\n <Show when={Object.keys(this.commands).length > 0}>\n <VarDeclaration\n const\n name=\"args\"\n type=\"string[]\"\n initializer={code`useArgs();`}\n />\n <hbr />\n <CommandRouter segments={[]} commands={this.commands ?? {}} />\n <hbr />\n </Show>\n <Spacing />\n {code`await showBanner();`}\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 <VirtualCommand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AA,OAAA,SAAA;;QAEN,gBAAY;QACZ,WAAM,UAAa,gBAAgB,MAAA;SACjC,IAAG,OAAA;AACD,iBAAM,MAAA;;SAER,IAAG,WAAK;AACN,iBAAI,gBAAA,cAAA,EACL,SAAS,OACT,CAAA;;SAED,IAAC,WAAY;AACb,iBAAQ,gBAAA,qBAAA,EACJ,SAAM,OACT,CAAA;;SAEF,CAAC;QACH,CAAC;;MAEL,CAAC,CAAC,CAAC;;IAEP;GACF;EAAC"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;KAoDY,mBAAA,GAAsB,IAAA,CAAK,OAAA,qBACrC,kBAAA,GACA,oBAAA,GACA,iBAAA;;AAHF;;;;;;;;;;EAeI,aAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;EAAA;;;EAM/C,MAAA,GAAS,IAAA,CAAK,mBAAA;AAAA;AAAA,KAGN,sBAAA,GAAyB,UAAA,GACnC,mBAAA,GACA,qBAAA,GACA,uBAAA,GACA,oBAAA,GACA,sBAAA;AAAA,KAEU,0BAAA,GAA6B,cAAA,GACvC,mBAAA,GACA,yBAAA,GACA,2BAAA,GACA,wBAAA,GACA,0BAAA;AAAA,KAEU,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,kBAAA,CAAmB,eAAA,IACrB,OAAA,CAAQ,eAAA,IACR,kBAAA,CAAmB,eAAA,IACnB,oBAAA,CAAqB,eAAA,IACrB,iBAAA,CAAkB,eAAA,IAClB,mBAAA,CAAoB,eAAA"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shell-shock/preset-script",
3
- "version": "0.6.65",
3
+ "version": "0.6.67",
4
4
  "private": false,
5
5
  "description": "A Shell Shock preset that generates a fully-featured script application.",
6
6
  "keywords": [
@@ -193,23 +193,23 @@
193
193
  "typings": "dist/index.d.mts",
194
194
  "files": ["dist/**/*"],
195
195
  "dependencies": {
196
- "@alloy-js/core": "0.23.0-dev.8",
197
- "@alloy-js/typescript": "0.23.0-dev.4",
198
- "@powerlines/deepkit": "^0.8.64",
199
- "@powerlines/plugin-alloy": "^0.26.84",
200
- "@powerlines/plugin-plugin": "^0.12.416",
201
- "@shell-shock/core": "^0.17.10",
202
- "@shell-shock/plugin-banner": "^0.1.37",
203
- "@shell-shock/plugin-console": "^0.2.14",
204
- "@shell-shock/plugin-help": "^0.2.28",
205
- "@shell-shock/plugin-theme": "^0.4.23",
206
- "@stryke/helpers": "^0.10.12",
207
- "@stryke/path": "^0.28.2",
208
- "@stryke/string-format": "^0.17.13",
196
+ "@alloy-js/core": "^0.23.1",
197
+ "@alloy-js/typescript": "^0.23.0",
198
+ "@powerlines/deepkit": "^0.9.80",
199
+ "@powerlines/plugin-alloy": "^0.26.219",
200
+ "@powerlines/plugin-plugin": "^0.12.538",
201
+ "@shell-shock/core": "0.17.12",
202
+ "@shell-shock/plugin-banner": "0.1.39",
203
+ "@shell-shock/plugin-console": "0.2.16",
204
+ "@shell-shock/plugin-help": "0.2.30",
205
+ "@shell-shock/plugin-theme": "0.4.25",
206
+ "@stryke/helpers": "^0.10.24",
207
+ "@stryke/path": "^0.29.11",
208
+ "@stryke/string-format": "^0.17.26",
209
209
  "defu": "^6.1.7",
210
- "powerlines": "^0.47.4"
210
+ "powerlines": "^0.47.126"
211
211
  },
212
- "devDependencies": { "@types/node": "^25.6.0" },
212
+ "devDependencies": { "@types/node": "^25.9.1" },
213
213
  "publishConfig": { "access": "public" },
214
- "gitHead": "7b4030fd6be000c960e8cc4c4f7b4db205054e69"
214
+ "gitHead": "3c10901dd3fbbc3c9d6d1a3373f01cc5f56d3321"
215
215
  }