@shell-shock/core 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +221 -0
- package/dist/_virtual/rolldown_runtime.cjs +29 -1
- package/dist/api.cjs +57 -1
- package/dist/api.cjs.map +1 -0
- package/dist/api.d.cts +9 -1
- package/dist/api.d.cts.map +1 -0
- package/dist/api.d.mts +9 -1
- package/dist/api.d.mts.map +1 -0
- package/dist/api.mjs +55 -1
- package/dist/api.mjs.map +1 -0
- package/dist/components/docs.cjs +105 -0
- package/dist/components/docs.cjs.map +1 -0
- package/dist/components/docs.d.cts +56 -0
- package/dist/components/docs.d.cts.map +1 -0
- package/dist/components/docs.d.mts +56 -0
- package/dist/components/docs.d.mts.map +1 -0
- package/dist/components/docs.mjs +102 -0
- package/dist/components/docs.mjs.map +1 -0
- package/dist/components/index.cjs +5 -0
- package/dist/components/index.d.cts +2 -0
- package/dist/components/index.d.mts +2 -0
- package/dist/components/index.mjs +3 -0
- package/dist/config.cjs +18 -1
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +2 -1
- package/dist/config.d.cts.map +1 -0
- package/dist/config.d.mts +2 -1
- package/dist/config.d.mts.map +1 -0
- package/dist/config.mjs +17 -1
- package/dist/config.mjs.map +1 -0
- package/dist/contexts/command.cjs +21 -0
- package/dist/contexts/command.cjs.map +1 -0
- package/dist/contexts/command.d.cts +18 -0
- package/dist/contexts/command.d.cts.map +1 -0
- package/dist/contexts/command.d.mts +18 -0
- package/dist/contexts/command.d.mts.map +1 -0
- package/dist/contexts/command.mjs +19 -0
- package/dist/contexts/command.mjs.map +1 -0
- package/dist/contexts/index.cjs +4 -0
- package/dist/contexts/index.d.cts +2 -0
- package/dist/contexts/index.d.mts +2 -0
- package/dist/contexts/index.mjs +3 -0
- package/dist/helpers/docs-helpers.cjs +17 -0
- package/dist/helpers/docs-helpers.cjs.map +1 -0
- package/dist/helpers/docs-helpers.mjs +16 -0
- package/dist/helpers/docs-helpers.mjs.map +1 -0
- package/dist/helpers/persistence.cjs +50 -1
- package/dist/helpers/persistence.cjs.map +1 -0
- package/dist/helpers/persistence.mjs +47 -1
- package/dist/helpers/persistence.mjs.map +1 -0
- package/dist/helpers/resolve-command.cjs +177 -1
- package/dist/helpers/resolve-command.cjs.map +1 -0
- package/dist/helpers/resolve-command.mjs +172 -1
- package/dist/helpers/resolve-command.mjs.map +1 -0
- package/dist/helpers/update-package-json.cjs +36 -1
- package/dist/helpers/update-package-json.cjs.map +1 -0
- package/dist/helpers/update-package-json.mjs +34 -1
- package/dist/helpers/update-package-json.mjs.map +1 -0
- package/dist/helpers/utilities.cjs +41 -1
- package/dist/helpers/utilities.cjs.map +1 -0
- package/dist/helpers/utilities.mjs +39 -1
- package/dist/helpers/utilities.mjs.map +1 -0
- package/dist/helpers/validations.cjs +97 -0
- package/dist/helpers/validations.cjs.map +1 -0
- package/dist/helpers/validations.mjs +97 -0
- package/dist/helpers/validations.mjs.map +1 -0
- package/dist/index.cjs +16 -1
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +7 -18
- package/dist/index.d.mts +6 -18
- package/dist/index.mjs +10 -1
- package/dist/index.mjs.map +1 -0
- package/dist/plugin-utils/context-helpers.cjs +86 -0
- package/dist/plugin-utils/context-helpers.cjs.map +1 -0
- package/dist/plugin-utils/context-helpers.d.cts +58 -0
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -0
- package/dist/plugin-utils/context-helpers.d.mts +58 -0
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -0
- package/dist/plugin-utils/context-helpers.mjs +79 -0
- package/dist/plugin-utils/context-helpers.mjs.map +1 -0
- package/dist/plugin-utils/get-command-tree.cjs +24 -0
- package/dist/plugin-utils/get-command-tree.cjs.map +1 -0
- package/dist/plugin-utils/get-command-tree.d.cts +16 -0
- package/dist/plugin-utils/get-command-tree.d.cts.map +1 -0
- package/dist/plugin-utils/get-command-tree.d.mts +16 -0
- package/dist/plugin-utils/get-command-tree.d.mts.map +1 -0
- package/dist/plugin-utils/get-command-tree.mjs +24 -0
- package/dist/plugin-utils/get-command-tree.mjs.map +1 -0
- package/dist/plugin-utils/index.cjs +16 -0
- package/dist/plugin-utils/index.d.cts +5 -0
- package/dist/plugin-utils/index.d.mts +5 -0
- package/dist/plugin-utils/index.mjs +6 -0
- package/dist/plugin-utils/reflect.cjs +25 -0
- package/dist/plugin-utils/reflect.cjs.map +1 -0
- package/dist/plugin-utils/reflect.d.cts +14 -0
- package/dist/plugin-utils/reflect.d.cts.map +1 -0
- package/dist/plugin-utils/reflect.d.mts +14 -0
- package/dist/plugin-utils/reflect.d.mts.map +1 -0
- package/dist/plugin-utils/reflect.mjs +24 -0
- package/dist/plugin-utils/reflect.mjs.map +1 -0
- package/dist/plugin-utils/traverse-command-tree.cjs +33 -0
- package/dist/plugin-utils/traverse-command-tree.cjs.map +1 -0
- package/dist/plugin-utils/traverse-command-tree.d.cts +23 -0
- package/dist/plugin-utils/traverse-command-tree.d.cts.map +1 -0
- package/dist/plugin-utils/traverse-command-tree.d.mts +23 -0
- package/dist/plugin-utils/traverse-command-tree.d.mts.map +1 -0
- package/dist/plugin-utils/traverse-command-tree.mjs +31 -0
- package/dist/plugin-utils/traverse-command-tree.mjs.map +1 -0
- package/dist/plugin.cjs +267 -0
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.d.cts +13 -0
- package/dist/plugin.d.cts.map +1 -0
- package/dist/plugin.d.mts +13 -0
- package/dist/plugin.d.mts.map +1 -0
- package/dist/plugin.mjs +261 -0
- package/dist/plugin.mjs.map +1 -0
- package/dist/types/command.d.cts +13 -4
- package/dist/types/command.d.cts.map +1 -0
- package/dist/types/command.d.mts +13 -4
- package/dist/types/command.d.mts.map +1 -0
- package/dist/types/command.mjs +1 -1
- package/dist/types/config.d.cts +71 -23
- package/dist/types/config.d.cts.map +1 -0
- package/dist/types/config.d.mts +71 -23
- package/dist/types/config.d.mts.map +1 -0
- package/dist/types/config.mjs +1 -1
- package/dist/types/context.d.cts +7 -3
- package/dist/types/context.d.cts.map +1 -0
- package/dist/types/context.d.mts +7 -3
- package/dist/types/context.d.mts.map +1 -0
- package/dist/types/context.mjs +1 -1
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.mjs +1 -1
- package/dist/types/internal.cjs +0 -0
- package/dist/types/internal.d.cts +24 -0
- package/dist/types/internal.d.cts.map +1 -0
- package/dist/types/internal.d.mts +24 -0
- package/dist/types/internal.d.mts.map +1 -0
- package/dist/types/internal.mjs +1 -0
- package/dist/types/options.d.cts +2 -1
- package/dist/types/options.d.cts.map +1 -0
- package/dist/types/options.d.mts +2 -1
- package/dist/types/options.d.mts.map +1 -0
- package/dist/types/options.mjs +1 -1
- package/package.json +230 -55
- package/dist/helpers/get-default-options.cjs +0 -1
- package/dist/helpers/get-default-options.d.cts +0 -15
- package/dist/helpers/get-default-options.d.mts +0 -15
- package/dist/helpers/get-default-options.mjs +0 -1
- package/dist/powerlines.cjs +0 -3
- package/dist/powerlines.d.cts +0 -12
- package/dist/powerlines.d.mts +0 -12
- package/dist/powerlines.mjs +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.mjs","names":["For","Show","render","nodejs","tsdown","toArray","chmodX","appendPath","findFilePath","isParentPath","joinPaths","replacePath","resolveParentPath","camelCase","constantCase","kebabCase","isSetObject","isSetString","defu","resolveEntries","CommandDocsFile","getCommandsPersistencePath","readCommandsPersistence","writeCommandsPersistence","findCommandsRoot","reflectCommandTree","resolveCommandId","resolveCommandName","resolveCommandPath","formatBinaryPath","updatePackageJsonBinary","formatCommandTree","getDefaultOptions","validateCommand","getAppDescription","getAppName","getAppTitle","isVariableCommandPath","getCommandTree","traverseCommands","MAX_DEPTH","plugin","options","name","config","debug","result","output","buildPath","projectRoot","title","description","envPrefix","env","prefix","automd","generators","isCaseSensitive","format","dts","entry","Array","isArray","length","sourceRoot","undefined","build","platform","nodeProtocol","unbundle","type","framework","includes","push","configResolved","order","handler","bin","packageJson","inputs","Object","values","id","path","value","segments","isVirtual","commandsPath","entries","reduce","ret","file","Error","some","existing","split","filter","Boolean","input","map","command","join","warn","cmd","depth","parentPath","sort","a","b","prepare","commands","skipCache","persistedMeta","checksum","meta","fs","existsSync","segment","option","alias","optional","fromEntries","isValid","failures","error","failure","code","details","info","outputOptions","banner","chunk","isEntry","entryPath","facadeModuleId","fileName","mode","buildEnd","Promise","all","workspaceConfig","workspaceRoot","docs","_$createComponent","each","doubleHardline","children","child","when","shellShock"],"sources":["../src/plugin.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 { For, Show } from \"@alloy-js/core/components\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport nodejs from \"@powerlines/plugin-nodejs\";\nimport tsdown from \"@powerlines/plugin-tsdown\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { chmodX } from \"@stryke/fs/chmod-x\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { findFilePath } from \"@stryke/path/file-path-fns\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { resolveParentPath } from \"@stryke/path/resolve-parent-path\";\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 { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { defu } from \"defu\";\nimport type { Plugin } from \"powerlines\";\nimport { resolveEntries } from \"powerlines/lib/entry\";\nimport type { RenderedChunk } from \"rolldown\";\nimport type { OutputOptions } from \"tsdown\";\nimport { CommandDocsFile } from \"./components/docs\";\nimport {\n getCommandsPersistencePath,\n readCommandsPersistence,\n writeCommandsPersistence\n} from \"./helpers/persistence\";\nimport {\n findCommandsRoot,\n reflectCommandTree,\n resolveCommandId,\n resolveCommandName,\n resolveCommandPath\n} from \"./helpers/resolve-command\";\nimport {\n formatBinaryPath,\n updatePackageJsonBinary\n} from \"./helpers/update-package-json\";\nimport { formatCommandTree, getDefaultOptions } from \"./helpers/utilities\";\nimport { validateCommand } from \"./helpers/validations\";\nimport {\n getAppDescription,\n getAppName,\n getAppTitle,\n isVariableCommandPath\n} from \"./plugin-utils/context-helpers\";\nimport { getCommandTree } from \"./plugin-utils/get-command-tree\";\nimport { traverseCommands } from \"./plugin-utils/traverse-command-tree\";\nimport type { CommandOption, CommandTree } from \"./types/command\";\nimport type { Options } from \"./types/config\";\nimport type { Context } from \"./types/context\";\n\nconst MAX_DEPTH = 50;\n\n/**\n * The core Powerlines plugin to build Shell Shock projects.\n */\nexport const plugin = <TContext extends Context = Context>(\n options: Options = {}\n) => {\n return [\n tsdown(),\n {\n name: \"shell-shock:config\",\n async config() {\n this.debug(\"Resolving the Shell Shock configuration.\");\n\n await updatePackageJsonBinary(this);\n\n const result = defu(\n {\n output: {\n buildPath: joinPaths(this.config.projectRoot, \"dist\")\n }\n },\n options,\n {\n name: getAppName(this),\n title: getAppTitle(this),\n description: getAppDescription(this),\n envPrefix: constantCase(getAppName(this)),\n env: {\n prefix: [] as string[]\n },\n automd: {\n generators: {}\n },\n isCaseSensitive: false,\n output: {\n format: \"esm\",\n dts: true\n },\n entry:\n !this.config.entry ||\n (Array.isArray(this.config.entry) &&\n this.config.entry.length === 0)\n ? [\n joinPaths(this.config.sourceRoot, \"**/*.ts\"),\n joinPaths(this.config.sourceRoot, \"**/*.tsx\")\n ]\n : undefined,\n build: {\n dts: false,\n platform: \"node\",\n nodeProtocol: true,\n unbundle: false\n },\n type: \"application\",\n framework: \"shell-shock\"\n }\n );\n if (!result.env.prefix.includes(result.envPrefix)) {\n result.env.prefix.push(result.envPrefix);\n }\n\n return result;\n },\n configResolved: {\n order: \"pre\",\n async handler() {\n this.debug(\"Shell Shock configuration has been resolved.\");\n\n this.config.bin = (isSetString(this.packageJson.bin)\n ? { [kebabCase(this.config.name)]: this.packageJson.bin }\n : this.packageJson.bin) ?? {\n [kebabCase(this.config.name)]: formatBinaryPath(\n this.config.output.format\n )\n };\n\n this.inputs ??= [];\n this.options = Object.values(\n getDefaultOptions(this, {\n id: null,\n name: this.config.name,\n title: this.config.title,\n description: this.config.description,\n path: {\n value: null,\n segments: []\n },\n isVirtual: false\n })\n );\n }\n }\n },\n ...nodejs<TContext>(),\n {\n name: \"shell-shock:inputs\",\n async configResolved() {\n this.debug(\"Finding command entry point files.\");\n\n this.commandsPath = findCommandsRoot(this);\n\n const entries = await resolveEntries(\n this,\n toArray(this.config.entry || [])\n );\n this.debug(\n `Found ${\n entries.length\n } entry points specified in the configuration options.`\n );\n\n this.inputs = entries.reduce((ret, entry) => {\n if (!isParentPath(entry.file, this.commandsPath)) {\n throw new Error(\n `Command entry point \"${\n entry.file\n }\" is not located within the commands root \"${\n this.commandsPath\n }\". Please ensure that all command entry points are located within the current project.`\n );\n }\n\n const id = resolveCommandId(this, entry.file);\n if (!ret.some(existing => existing.id === id)) {\n const path = resolveCommandPath(this, entry.file);\n const name = resolveCommandName(entry.file);\n\n ret.push({\n id,\n path: {\n value: path,\n segments: path.split(\"/\").filter(Boolean)\n },\n name,\n isVirtual: false,\n entry: {\n ...entry,\n file: entry.file,\n input: {\n file: entry.file,\n name: entry.name\n },\n output: name\n }\n });\n }\n\n return ret;\n }, this.inputs);\n\n this.debug(\n `Shell Shock will process ${\n this.inputs.length\n } command entry files: \\n${this.inputs\n .map(\n command =>\n ` - ${command.id}: ${replacePath(\n command.entry.file,\n this.commandsPath\n )}`\n )\n .join(\"\\n\")}`\n );\n }\n },\n {\n name: \"shell-shock:virtual-inputs\",\n configResolved: {\n order: \"post\",\n async handler() {\n if (this.inputs.length === 0) {\n this.warn(\n \"No commands were found in the project. Please ensure at least one command exists.\"\n );\n } else {\n this.debug(\n `Shell Shock will create an application with the following commands: \\n${this.inputs\n .filter(cmd => !cmd.isVirtual)\n .map(\n command =>\n ` - ${command.id}: ${replacePath(\n command.entry.file,\n this.commandsPath\n )}${command.isVirtual ? \" (virtual)\" : \"\"}`\n )\n .join(\"\\n\")}`\n );\n\n this.debug(\n \"Finding and adding virtual command inputs for each command previously found.\"\n );\n\n this.inputs = this.inputs\n .reduce((ret, command) => {\n let depth = 0;\n\n let parentPath = resolveParentPath(\n findFilePath(command.entry.file)\n );\n while (parentPath !== this.commandsPath) {\n if (depth++ > MAX_DEPTH) {\n throw new Error(\n `Maximum command virtual parent depth of ${\n MAX_DEPTH\n } exceeded while processing command: ${command.name}`\n );\n }\n\n if (\n !ret.some(\n existing =>\n findFilePath(existing.entry.file) === parentPath\n )\n ) {\n const file = joinPaths(parentPath, \"command.ts\");\n const id = resolveCommandId(this, file);\n if (!ret.some(existing => existing.id === id)) {\n const name = resolveCommandName(file);\n const path = resolveCommandPath(this, file);\n\n ret.push({\n id,\n path: {\n value: path,\n segments: path.split(\"/\").filter(Boolean)\n },\n name,\n isVirtual: true,\n entry: {\n file\n }\n });\n }\n }\n\n parentPath = resolveParentPath(parentPath);\n }\n\n return ret;\n }, this.inputs)\n .sort((a, b) => a.path.segments.length - b.path.segments.length);\n\n this.debug(\n `Final command input list: \\n${this.inputs\n .map(\n command =>\n ` - ${command.id}: ${replacePath(\n command.entry.file,\n this.commandsPath\n )}${command.isVirtual ? \" (virtual)\" : \"\"}`\n )\n .join(\"\\n\")}`\n );\n }\n }\n }\n },\n {\n name: \"shell-shock:reflect-commands\",\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\"Initializing the CLI application's command tree.\");\n this.commands = {};\n\n if (\n this.config.command !== \"prepare\" &&\n this.config.skipCache !== true &&\n this.persistedMeta?.checksum === this.meta.checksum &&\n this.fs.existsSync(getCommandsPersistencePath(this))\n ) {\n this.debug(\n `Skipping reflection initialization as the meta checksum has not changed.`\n );\n\n await readCommandsPersistence(this);\n } else {\n for (const input of this.inputs.filter(\n input =>\n input.path.segments.filter(\n segment => !isVariableCommandPath(segment)\n ).length === 1\n )) {\n this.commands[input.name] = await reflectCommandTree(this, input);\n }\n\n this.debug(\"Post-processing commands to ensure proper reflection.\");\n\n this.options = this.options.map(\n option =>\n ({\n ...option,\n name: camelCase(option.name),\n alias: option.alias ?? [],\n optional: option.optional ?? false\n }) as CommandOption\n );\n\n await traverseCommands(this, command => {\n command.options = Object.fromEntries(\n Object.entries(command.options).map(([name, option]) => [\n camelCase(name),\n {\n ...option,\n name: camelCase(name),\n alias: option.alias ?? [],\n optional: option.optional ?? false\n } as CommandOption\n ])\n );\n });\n\n await writeCommandsPersistence(this);\n }\n\n this.debug(\"Validating the CLI applications command tree.\");\n\n let isValid = true;\n await traverseCommands(this, command => {\n const failures = validateCommand(command);\n if (failures.length > 0) {\n this.error(\n `Found ${failures.length} issue${failures.length > 1 ? \"s\" : \"\"} with the ${\n command.title\n } command: \\n${failures\n .map(failure => ` - ${failure.code}: ${failure.details}`)\n .join(\"\\n\")}\\n`\n );\n isValid = false;\n }\n });\n if (!isValid) {\n throw new Error(\n `One or more commands in the command tree are invalid. Please review the errors above and correct them before proceeding.`\n );\n }\n\n this.info(\n `\\nCreating an application with the following command tree: \\n${formatCommandTree(\n this\n )}\\n`\n );\n }\n }\n },\n {\n name: \"shell-shock:chmod+x\",\n configResolved() {\n this.config.build.outputOptions ??= {} as OutputOptions;\n (this.config.build.outputOptions as OutputOptions).banner = (\n chunk: RenderedChunk\n ) => {\n if (\n chunk.isEntry &&\n joinPaths(this.entryPath, \"bin.ts\") === chunk.facadeModuleId\n ) {\n this.debug(\n `Adding hashbang to binary executable output file: ${chunk.fileName}`\n );\n\n return `#!/usr/bin/env ${\n this.config.mode === \"development\"\n ? \"-S NODE_OPTIONS=--enable-source-maps\"\n : \"\"\n } node\\n`;\n }\n return \"\";\n };\n },\n async buildEnd() {\n if (!isSetObject(this.config.bin)) {\n this.warn(\n `No binaries were found for the ${\n this.config.name\n } application. Please ensure the binaries are correctly configured in your Shell Shock configuration or package.json.`\n );\n } else {\n await Promise.all(\n Object.values(this.config.bin).map(async bin => {\n const path = appendPath(\n bin,\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.projectRoot\n )\n );\n\n if (this.fs.existsSync(path)) {\n this.debug(\n `Adding executable permissions (chmod+x) to binary executable output file: ${path}`\n );\n\n await chmodX(path);\n } else {\n this.warn(\n `Unable to locate the binary executable output file: ${path}. This may indicate either a misconfiguration in the package.json file or an issue with the build process.`\n );\n }\n })\n );\n }\n }\n },\n {\n name: \"shell-shock:docs\",\n async docs() {\n this.debug(\n \"Rendering entrypoint modules for the Shell Shock `script` preset.\"\n );\n\n const commands = this.inputs\n .map(input => getCommandTree(this, input.path.segments))\n .filter(Boolean) as CommandTree[];\n\n return render(\n this,\n <For each={Object.values(commands)} doubleHardline>\n {child => (\n <Show when={!child.isVirtual}>\n <CommandDocsFile command={child} />\n </Show>\n )}\n </For>\n );\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport { plugin as shellShock };\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,MAAMwC,YAAY;;;;AAKlB,MAAaC,UACXC,UAAmB,EAAE,KAClB;AACH,QAAO;EACLtC,QAAQ;EACR;GACEuC,MAAM;GACN,MAAMC,SAAS;AACb,SAAKC,MAAM,2CAA2C;AAEtD,UAAMf,wBAAwB,KAAK;IAEnC,MAAMgB,SAAS5B,KACb,EACE6B,QAAQ,EACNC,WAAWtC,UAAU,KAAKkC,OAAO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UACE,KAAKkI,gBAAgBC,eACrB,KAAKjG,OAAOK,YAEhB,CAAC;AAED,SAAI,KAAKkE,GAAGC,WAAWjC,KAAK,EAAE;AAC5B,WAAKtC,MACH,6EAA6EsC,OAC9E;AAED,YAAM7E,OAAO6E,KAAK;WAElB,MAAKmB,KACH,uDAAuDnB,KAAI,4GAC5D;MAGP,CAAC;;GAGN;EACD;GACExC,MAAM;GACN,MAAMmG,OAAO;AACX,SAAKjG,MACH,oEACD;IAED,MAAMiE,WAAW,KAAK/B,OACnBoB,KAAID,UAAS5D,eAAe,MAAM4D,MAAMf,KAAKE,SAAS,CAAC,CACvDW,OAAOC,QAAyB;AAEnC,WAAO/F,OACL,MAAI6I,gBACH/I,KAAG;KAAA,IAACgJ,OAAI;AAAA,aAAEhE,OAAOC,OAAO6B,SAAS;;KAAEmC,gBAAc;KAAAC,WAC/CC,UAAKJ,gBACH9I,MAAI;MAAA,IAACmJ,OAAI;AAAA,cAAE,CAACD,MAAM7D;;MAAS,IAAA4D,WAAA;AAAA,cAAAH,gBACzB3H,iBAAe,EAACgF,SAAS+C,OAAK,CAAA;;MAAA,CAAA;KAElC,CAEL,CAAC;;GAEJ;EACF;;AAIH,qBAAe1G"}
|
package/dist/types/command.d.cts
CHANGED
|
@@ -6,13 +6,13 @@ interface BaseCommandOption {
|
|
|
6
6
|
name: string;
|
|
7
7
|
kind: ReflectionKind;
|
|
8
8
|
title: string;
|
|
9
|
-
description
|
|
9
|
+
description: string;
|
|
10
10
|
alias: string[];
|
|
11
|
+
env: string | false;
|
|
11
12
|
optional: boolean;
|
|
12
13
|
}
|
|
13
14
|
interface StringCommandOption extends BaseCommandOption {
|
|
14
15
|
kind: ReflectionKind.string;
|
|
15
|
-
format?: "path" | "url" | "date" | "time" | "datetime" | "json" | "regex" | string;
|
|
16
16
|
default?: string;
|
|
17
17
|
variadic: boolean;
|
|
18
18
|
}
|
|
@@ -35,21 +35,29 @@ interface CommandParam {
|
|
|
35
35
|
optional: boolean;
|
|
36
36
|
variadic: boolean;
|
|
37
37
|
}
|
|
38
|
+
interface CommandPath {
|
|
39
|
+
value: string | null;
|
|
40
|
+
segments: string[];
|
|
41
|
+
}
|
|
38
42
|
interface CommandBase {
|
|
39
43
|
id: string | null;
|
|
40
44
|
name: string;
|
|
41
45
|
title?: string;
|
|
42
46
|
description?: string;
|
|
43
|
-
path:
|
|
47
|
+
path: CommandPath;
|
|
44
48
|
isVirtual: boolean;
|
|
45
49
|
}
|
|
46
50
|
interface CommandInput extends CommandBase {
|
|
47
51
|
id: string;
|
|
48
52
|
entry: ResolvedEntryTypeDefinition;
|
|
49
53
|
}
|
|
54
|
+
interface CommandTreePath extends CommandPath {
|
|
55
|
+
variables: Record<string, CommandParam>;
|
|
56
|
+
}
|
|
50
57
|
type CommandTree = CommandInput & {
|
|
51
58
|
title: string;
|
|
52
59
|
description: string;
|
|
60
|
+
path: CommandTreePath;
|
|
53
61
|
options: Record<string, CommandOption>;
|
|
54
62
|
params: CommandParam[];
|
|
55
63
|
parent: null | CommandTree;
|
|
@@ -60,4 +68,5 @@ type SerializedCommandTree = Omit<CommandTree, "parent" | "children"> & {
|
|
|
60
68
|
children: Record<string, SerializedCommandTree>;
|
|
61
69
|
};
|
|
62
70
|
//#endregion
|
|
63
|
-
export { BaseCommandOption, BooleanCommandOption, CommandBase, CommandInput, CommandOption, CommandParam, CommandTree, NumberCommandOption, SerializedCommandTree, StringCommandOption };
|
|
71
|
+
export { BaseCommandOption, BooleanCommandOption, CommandBase, CommandInput, CommandOption, CommandParam, CommandPath, CommandTree, CommandTreePath, NumberCommandOption, SerializedCommandTree, StringCommandOption };
|
|
72
|
+
//# sourceMappingURL=command.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.d.cts","names":[],"sources":["../../src/types/command.ts"],"sourcesContent":[],"mappings":";;;;UAqBiB,iBAAA;;EAAA,IAAA,EAET,cAF0B;EAUjB,KAAA,EAAA,MAAA;EAMA,WAAA,EAAA,MAAA;EAMA,KAAA,EAAA,MAAA,EAAA;EAOL,GAAA,EAAA,MAAA,GAAA,KAAa;EACrB,QAAA,EAAA,OAAA;;AAEA,UAtBa,mBAAA,SAA4B,iBAsBzC,CAAA;EAAoB,IAAA,EArBhB,cAAA,CAAe,MAqBC;EAEP,OAAA,CAAA,EAAA,MAAY;EAQZ,QAAA,EAAA,OAAW;AAK5B;AASiB,UAxCA,mBAAA,SAA4B,iBAwCP,CAAA;EAKrB,IAAA,EA5CT,cAAA,CAAe,MA4CU;EACL,OAAA,CAAA,EAAA,MAAA;EAAf,QAAA,EAAA,OAAA;;AADuC,UAvCnC,oBAAA,SAA6B,iBAuCM,CAAA;EAIxC,IAAA,EA1CJ,cAAA,CAAe,OA0CA;EAAG,OAAA,CAAA,EAAA,OAAA;EAGlB,YAAA,CAAA,EAAA,MAAA;EACkB,kBAAA,CAAA,EAAA,OAAA;;AAChB,KAzCE,aAAA,GACR,mBAwCM,GAvCN,mBAuCM,GAtCN,oBAsCM;AACO,UArCA,YAAA,CAqCA;EACU,IAAA,EAAA,MAAA;EAAf,WAAA,CAAA,EAAA,MAAA;EAAM,OAAA,CAAA,EAAA,MAAA;EAGN,QAAA,EAAA,OAAA;EAA6B,QAAA,EAAA,OAAA;;AAEd,UAnCV,WAAA,CAmCU;EAAf,KAAA,EAAA,MAAA,GAAA,IAAA;EAAM,QAAA,EAAA,MAAA,EAAA;;UA9BD,WAAA;;;;;QAKT;;;UAIS,YAAA,SAAqB;;SAE7B;;UAGQ,eAAA,SAAwB;aAC5B,eAAe;;KAGhB,WAAA,GAAc;;;QAGlB;WACG,eAAe;UAChB;iBACO;YACL,eAAe;;KAGf,qBAAA,GAAwB,KAAK;;YAE7B,eAAe"}
|
package/dist/types/command.d.mts
CHANGED
|
@@ -6,13 +6,13 @@ interface BaseCommandOption {
|
|
|
6
6
|
name: string;
|
|
7
7
|
kind: ReflectionKind;
|
|
8
8
|
title: string;
|
|
9
|
-
description
|
|
9
|
+
description: string;
|
|
10
10
|
alias: string[];
|
|
11
|
+
env: string | false;
|
|
11
12
|
optional: boolean;
|
|
12
13
|
}
|
|
13
14
|
interface StringCommandOption extends BaseCommandOption {
|
|
14
15
|
kind: ReflectionKind.string;
|
|
15
|
-
format?: "path" | "url" | "date" | "time" | "datetime" | "json" | "regex" | string;
|
|
16
16
|
default?: string;
|
|
17
17
|
variadic: boolean;
|
|
18
18
|
}
|
|
@@ -35,21 +35,29 @@ interface CommandParam {
|
|
|
35
35
|
optional: boolean;
|
|
36
36
|
variadic: boolean;
|
|
37
37
|
}
|
|
38
|
+
interface CommandPath {
|
|
39
|
+
value: string | null;
|
|
40
|
+
segments: string[];
|
|
41
|
+
}
|
|
38
42
|
interface CommandBase {
|
|
39
43
|
id: string | null;
|
|
40
44
|
name: string;
|
|
41
45
|
title?: string;
|
|
42
46
|
description?: string;
|
|
43
|
-
path:
|
|
47
|
+
path: CommandPath;
|
|
44
48
|
isVirtual: boolean;
|
|
45
49
|
}
|
|
46
50
|
interface CommandInput extends CommandBase {
|
|
47
51
|
id: string;
|
|
48
52
|
entry: ResolvedEntryTypeDefinition;
|
|
49
53
|
}
|
|
54
|
+
interface CommandTreePath extends CommandPath {
|
|
55
|
+
variables: Record<string, CommandParam>;
|
|
56
|
+
}
|
|
50
57
|
type CommandTree = CommandInput & {
|
|
51
58
|
title: string;
|
|
52
59
|
description: string;
|
|
60
|
+
path: CommandTreePath;
|
|
53
61
|
options: Record<string, CommandOption>;
|
|
54
62
|
params: CommandParam[];
|
|
55
63
|
parent: null | CommandTree;
|
|
@@ -60,4 +68,5 @@ type SerializedCommandTree = Omit<CommandTree, "parent" | "children"> & {
|
|
|
60
68
|
children: Record<string, SerializedCommandTree>;
|
|
61
69
|
};
|
|
62
70
|
//#endregion
|
|
63
|
-
export { BaseCommandOption, BooleanCommandOption, CommandBase, CommandInput, CommandOption, CommandParam, CommandTree, NumberCommandOption, SerializedCommandTree, StringCommandOption };
|
|
71
|
+
export { BaseCommandOption, BooleanCommandOption, CommandBase, CommandInput, CommandOption, CommandParam, CommandPath, CommandTree, CommandTreePath, NumberCommandOption, SerializedCommandTree, StringCommandOption };
|
|
72
|
+
//# sourceMappingURL=command.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.d.mts","names":[],"sources":["../../src/types/command.ts"],"sourcesContent":[],"mappings":";;;;UAqBiB,iBAAA;;EAAA,IAAA,EAET,cAF0B;EAUjB,KAAA,EAAA,MAAA;EAMA,WAAA,EAAA,MAAA;EAMA,KAAA,EAAA,MAAA,EAAA;EAOL,GAAA,EAAA,MAAA,GAAA,KAAa;EACrB,QAAA,EAAA,OAAA;;AAEA,UAtBa,mBAAA,SAA4B,iBAsBzC,CAAA;EAAoB,IAAA,EArBhB,cAAA,CAAe,MAqBC;EAEP,OAAA,CAAA,EAAA,MAAY;EAQZ,QAAA,EAAA,OAAW;AAK5B;AASiB,UAxCA,mBAAA,SAA4B,iBAwCP,CAAA;EAKrB,IAAA,EA5CT,cAAA,CAAe,MA4CU;EACL,OAAA,CAAA,EAAA,MAAA;EAAf,QAAA,EAAA,OAAA;;AADuC,UAvCnC,oBAAA,SAA6B,iBAuCM,CAAA;EAIxC,IAAA,EA1CJ,cAAA,CAAe,OA0CA;EAAG,OAAA,CAAA,EAAA,OAAA;EAGlB,YAAA,CAAA,EAAA,MAAA;EACkB,kBAAA,CAAA,EAAA,OAAA;;AAChB,KAzCE,aAAA,GACR,mBAwCM,GAvCN,mBAuCM,GAtCN,oBAsCM;AACO,UArCA,YAAA,CAqCA;EACU,IAAA,EAAA,MAAA;EAAf,WAAA,CAAA,EAAA,MAAA;EAAM,OAAA,CAAA,EAAA,MAAA;EAGN,QAAA,EAAA,OAAA;EAA6B,QAAA,EAAA,OAAA;;AAEd,UAnCV,WAAA,CAmCU;EAAf,KAAA,EAAA,MAAA,GAAA,IAAA;EAAM,QAAA,EAAA,MAAA,EAAA;;UA9BD,WAAA;;;;;QAKT;;;UAIS,YAAA,SAAqB;;SAE7B;;UAGQ,eAAA,SAAwB;aAC5B,eAAe;;KAGhB,WAAA,GAAc;;;QAGlB;WACG,eAAe;UAChB;iBACO;YACL,eAAe;;KAGf,qBAAA,GAAwB,KAAK;;YAE7B,eAAe"}
|
package/dist/types/command.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
export { };
|
package/dist/types/config.d.cts
CHANGED
|
@@ -1,40 +1,88 @@
|
|
|
1
1
|
import { CommandBase, CommandOption } from "./command.cjs";
|
|
2
2
|
import { Context } from "./context.cjs";
|
|
3
|
-
import {
|
|
3
|
+
import { OutputConfig as OutputConfig$1 } from "powerlines/types/config";
|
|
4
|
+
import { NodeJsPluginResolvedConfig } from "@powerlines/plugin-nodejs/types/plugin";
|
|
5
|
+
import { TsdownPluginResolvedConfig, TsdownPluginUserConfig } from "@powerlines/plugin-tsdown/types/plugin";
|
|
4
6
|
|
|
5
7
|
//#region src/types/config.d.ts
|
|
6
|
-
|
|
8
|
+
type BaseConfig = Pick<TsdownPluginUserConfig, "root" | "name" | "title" | "description" | "logLevel" | "mode" | "skipCache" | "autoInstall" | "entry" | "plugins" | "tsconfig" | "tsconfigRaw">;
|
|
9
|
+
/**
|
|
10
|
+
* The plugin options for Shell Shock.
|
|
11
|
+
*/
|
|
12
|
+
type Options = Partial<BaseConfig> & {
|
|
7
13
|
/**
|
|
8
|
-
*
|
|
14
|
+
* A set of default command options to apply to each command.
|
|
9
15
|
*
|
|
10
16
|
* @remarks
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
* To disable the addition of these default options, set this property to `false`, or provide a custom set of options/a function that returns them.
|
|
18
|
+
*/
|
|
19
|
+
defaultOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
|
|
20
|
+
/**
|
|
21
|
+
* Determines whether commands' name and option names are treated as case-sensitive.
|
|
15
22
|
*
|
|
16
|
-
* @defaultValue `
|
|
23
|
+
* @defaultValue `false`
|
|
17
24
|
*/
|
|
18
|
-
|
|
25
|
+
isCaseSensitive?: boolean;
|
|
19
26
|
/**
|
|
20
|
-
*
|
|
27
|
+
* The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | "bin" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).
|
|
21
28
|
*
|
|
22
29
|
* @remarks
|
|
23
|
-
*
|
|
24
|
-
* - `--help` (`-h`, `-?`): Show help information.
|
|
25
|
-
* - `--version` (`-v`): Show the version of the application.
|
|
30
|
+
* If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.
|
|
26
31
|
*
|
|
27
|
-
*
|
|
32
|
+
* @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin
|
|
33
|
+
* @see https://yarnpkg.com/cli/bin
|
|
34
|
+
* @see https://pnpm.io/package_json#bin
|
|
28
35
|
*/
|
|
29
|
-
|
|
36
|
+
bin?: string | string[];
|
|
37
|
+
/**
|
|
38
|
+
* An application specific prefix to check for environment variables.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* If not provided, Shell Shock will convert {@link Options.name | name} to {@link https://stringcase.org/cases/constant/ | constant case} format and append an underscore (`_`). If the provided {@link Options.name | name} is `"my-app"`, environment variables starting with `"MY_APP_"` will be used - for example: `"MY_APP_CONFIG_NAME"`. If a trailing underscore already exists in the user provided value, it will result in two consecutive underscores - for example: `"MY_APP__CONFIG_NAME"` (this was done intentionally so that users who specifically want multiple underscores have a way to do so).
|
|
42
|
+
*
|
|
43
|
+
* @see https://medium.com/chingu/an-introduction-to-environment-variables-and-how-to-use-them-f602f66d15fa
|
|
44
|
+
* @see https://stringcase.org/cases/constant/
|
|
45
|
+
*/
|
|
46
|
+
envPrefix?: string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* The output configuration options for Shell Shock.
|
|
50
|
+
*/
|
|
51
|
+
type OutputConfig = Pick<OutputConfig$1, "outputPath" | "assets" | "storage"> & {
|
|
30
52
|
/**
|
|
31
|
-
*
|
|
53
|
+
* An indicator specifying whether to generate TypeScript declaration files (.d.ts) during the build process.
|
|
32
54
|
*/
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
55
|
+
dts?: false;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The user configuration options for Shell Shock.
|
|
59
|
+
*/
|
|
60
|
+
type UserConfig = Options & {
|
|
61
|
+
/**
|
|
62
|
+
* Configuration for the output of the build process
|
|
63
|
+
*/
|
|
64
|
+
output?: OutputConfig;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The resolved configuration options for Shell Shock.
|
|
68
|
+
*/
|
|
69
|
+
type ResolvedConfig = TsdownPluginResolvedConfig & NodeJsPluginResolvedConfig & Required<Omit<Options, "bin">> & {
|
|
70
|
+
/**
|
|
71
|
+
* The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | "bin" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.
|
|
75
|
+
*
|
|
76
|
+
* @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin
|
|
77
|
+
* @see https://yarnpkg.com/cli/bin
|
|
78
|
+
* @see https://pnpm.io/package_json#bin
|
|
79
|
+
*/
|
|
80
|
+
bin: Record<string, string>;
|
|
81
|
+
/**
|
|
82
|
+
* The user configuration for the Shell Shock process.
|
|
83
|
+
*/
|
|
84
|
+
userConfig: UserConfig & NodeJsPluginResolvedConfig;
|
|
85
|
+
};
|
|
39
86
|
//#endregion
|
|
40
|
-
export { Options, ResolvedConfig, UserConfig };
|
|
87
|
+
export { BaseConfig, Options, OutputConfig, ResolvedConfig, UserConfig };
|
|
88
|
+
//# sourceMappingURL=config.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.cts","names":[],"sources":["../../src/types/config.ts"],"sourcesContent":[],"mappings":";;;;;;;KA2BY,UAAA,GAAa,KACvB;;AADF;AAmBA;AAA8B,KAAlB,OAAA,GAAU,OAAQ,CAAA,UAAA,CAAA,GAAA;EAAR;;;;;;EA8CV,cAAA,CAAY,EAtClB,aAuCJ,EAAA,GAAA,CAAA,CAAA,OADyB,EArCV,OAqCc,EAAA,KAAA,EArCE,WAqCF,EAAA,GArCkB,aAqClB,EAAA,CAAA,GAAA,KAAA;EAanB;AAUZ;;;;EAEW,eAAA,CAAA,EAAA,OAAA;EAAT;;;;;;;;;;;;;;;;;;;;;;;;;KAzBU,YAAA,GAAe,KACzB;;;;;;;;;KAYU,UAAA,GAAa;;;;WAId;;;;;KAMC,cAAA,GAAiB,6BAC3B,6BACA,SAAS,KAAK;;;;;;;;;;;OAWP;;;;cAKO,aAAa"}
|
package/dist/types/config.d.mts
CHANGED
|
@@ -1,40 +1,88 @@
|
|
|
1
1
|
import { CommandBase, CommandOption } from "./command.mjs";
|
|
2
2
|
import { Context } from "./context.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { OutputConfig as OutputConfig$1 } from "powerlines/types/config";
|
|
4
|
+
import { NodeJsPluginResolvedConfig } from "@powerlines/plugin-nodejs/types/plugin";
|
|
5
|
+
import { TsdownPluginResolvedConfig, TsdownPluginUserConfig } from "@powerlines/plugin-tsdown/types/plugin";
|
|
4
6
|
|
|
5
7
|
//#region src/types/config.d.ts
|
|
6
|
-
|
|
8
|
+
type BaseConfig = Pick<TsdownPluginUserConfig, "root" | "name" | "title" | "description" | "logLevel" | "mode" | "skipCache" | "autoInstall" | "entry" | "plugins" | "tsconfig" | "tsconfigRaw">;
|
|
9
|
+
/**
|
|
10
|
+
* The plugin options for Shell Shock.
|
|
11
|
+
*/
|
|
12
|
+
type Options = Partial<BaseConfig> & {
|
|
7
13
|
/**
|
|
8
|
-
*
|
|
14
|
+
* A set of default command options to apply to each command.
|
|
9
15
|
*
|
|
10
16
|
* @remarks
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
* To disable the addition of these default options, set this property to `false`, or provide a custom set of options/a function that returns them.
|
|
18
|
+
*/
|
|
19
|
+
defaultOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
|
|
20
|
+
/**
|
|
21
|
+
* Determines whether commands' name and option names are treated as case-sensitive.
|
|
15
22
|
*
|
|
16
|
-
* @defaultValue `
|
|
23
|
+
* @defaultValue `false`
|
|
17
24
|
*/
|
|
18
|
-
|
|
25
|
+
isCaseSensitive?: boolean;
|
|
19
26
|
/**
|
|
20
|
-
*
|
|
27
|
+
* The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | "bin" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).
|
|
21
28
|
*
|
|
22
29
|
* @remarks
|
|
23
|
-
*
|
|
24
|
-
* - `--help` (`-h`, `-?`): Show help information.
|
|
25
|
-
* - `--version` (`-v`): Show the version of the application.
|
|
30
|
+
* If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.
|
|
26
31
|
*
|
|
27
|
-
*
|
|
32
|
+
* @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin
|
|
33
|
+
* @see https://yarnpkg.com/cli/bin
|
|
34
|
+
* @see https://pnpm.io/package_json#bin
|
|
28
35
|
*/
|
|
29
|
-
|
|
36
|
+
bin?: string | string[];
|
|
37
|
+
/**
|
|
38
|
+
* An application specific prefix to check for environment variables.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* If not provided, Shell Shock will convert {@link Options.name | name} to {@link https://stringcase.org/cases/constant/ | constant case} format and append an underscore (`_`). If the provided {@link Options.name | name} is `"my-app"`, environment variables starting with `"MY_APP_"` will be used - for example: `"MY_APP_CONFIG_NAME"`. If a trailing underscore already exists in the user provided value, it will result in two consecutive underscores - for example: `"MY_APP__CONFIG_NAME"` (this was done intentionally so that users who specifically want multiple underscores have a way to do so).
|
|
42
|
+
*
|
|
43
|
+
* @see https://medium.com/chingu/an-introduction-to-environment-variables-and-how-to-use-them-f602f66d15fa
|
|
44
|
+
* @see https://stringcase.org/cases/constant/
|
|
45
|
+
*/
|
|
46
|
+
envPrefix?: string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* The output configuration options for Shell Shock.
|
|
50
|
+
*/
|
|
51
|
+
type OutputConfig = Pick<OutputConfig$1, "outputPath" | "assets" | "storage"> & {
|
|
30
52
|
/**
|
|
31
|
-
*
|
|
53
|
+
* An indicator specifying whether to generate TypeScript declaration files (.d.ts) during the build process.
|
|
32
54
|
*/
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
55
|
+
dts?: false;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The user configuration options for Shell Shock.
|
|
59
|
+
*/
|
|
60
|
+
type UserConfig = Options & {
|
|
61
|
+
/**
|
|
62
|
+
* Configuration for the output of the build process
|
|
63
|
+
*/
|
|
64
|
+
output?: OutputConfig;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The resolved configuration options for Shell Shock.
|
|
68
|
+
*/
|
|
69
|
+
type ResolvedConfig = TsdownPluginResolvedConfig & NodeJsPluginResolvedConfig & Required<Omit<Options, "bin">> & {
|
|
70
|
+
/**
|
|
71
|
+
* The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | "bin" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.
|
|
75
|
+
*
|
|
76
|
+
* @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin
|
|
77
|
+
* @see https://yarnpkg.com/cli/bin
|
|
78
|
+
* @see https://pnpm.io/package_json#bin
|
|
79
|
+
*/
|
|
80
|
+
bin: Record<string, string>;
|
|
81
|
+
/**
|
|
82
|
+
* The user configuration for the Shell Shock process.
|
|
83
|
+
*/
|
|
84
|
+
userConfig: UserConfig & NodeJsPluginResolvedConfig;
|
|
85
|
+
};
|
|
39
86
|
//#endregion
|
|
40
|
-
export { Options, ResolvedConfig, UserConfig };
|
|
87
|
+
export { BaseConfig, Options, OutputConfig, ResolvedConfig, UserConfig };
|
|
88
|
+
//# sourceMappingURL=config.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"sourcesContent":[],"mappings":";;;;;;;KA2BY,UAAA,GAAa,KACvB;;AADF;AAmBA;AAA8B,KAAlB,OAAA,GAAU,OAAQ,CAAA,UAAA,CAAA,GAAA;EAAR;;;;;;EA8CV,cAAA,CAAY,EAtClB,aAuCJ,EAAA,GAAA,CAAA,CAAA,OADyB,EArCV,OAqCc,EAAA,KAAA,EArCE,WAqCF,EAAA,GArCkB,aAqClB,EAAA,CAAA,GAAA,KAAA;EAanB;AAUZ;;;;EAEW,eAAA,CAAA,EAAA,OAAA;EAAT;;;;;;;;;;;;;;;;;;;;;;;;;KAzBU,YAAA,GAAe,KACzB;;;;;;;;;KAYU,UAAA,GAAa;;;;WAId;;;;;KAMC,cAAA,GAAiB,6BAC3B,6BACA,SAAS,KAAK;;;;;;;;;;;OAWP;;;;cAKO,aAAa"}
|
package/dist/types/config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
export { };
|
package/dist/types/context.d.cts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { CommandInput, CommandOption, CommandTree } from "./command.cjs";
|
|
2
2
|
import { ResolvedConfig } from "./config.cjs";
|
|
3
|
-
import {
|
|
3
|
+
import { NodeJsPluginContext } from "@powerlines/plugin-nodejs/types/plugin";
|
|
4
|
+
import { TsdownPluginContext } from "@powerlines/plugin-tsdown/types/plugin";
|
|
5
|
+
import { UnresolvedContext as UnresolvedContext$1 } from "powerlines/types/context";
|
|
4
6
|
|
|
5
7
|
//#region src/types/context.d.ts
|
|
6
|
-
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = TsdownPluginContext<TResolvedConfig> & {
|
|
8
|
+
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = TsdownPluginContext<TResolvedConfig> & NodeJsPluginContext<TResolvedConfig> & {
|
|
7
9
|
/**
|
|
8
10
|
* The root path where commands are located.
|
|
9
11
|
*/
|
|
@@ -21,5 +23,7 @@ type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = TsdownPl
|
|
|
21
23
|
*/
|
|
22
24
|
commands: Record<string, CommandTree>;
|
|
23
25
|
};
|
|
26
|
+
type UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnresolvedContext$1<TResolvedConfig>;
|
|
24
27
|
//#endregion
|
|
25
|
-
export { Context };
|
|
28
|
+
export { Context, UnresolvedContext };
|
|
29
|
+
//# sourceMappingURL=context.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.cts","names":[],"sources":["../../src/types/context.ts"],"sourcesContent":[],"mappings":";;;;;;;KAwBY,gCAAgC,iBAAiB,kBAC3D,oBAAoB,mBAClB,oBAAoB;;AAFxB;;EAA6D,YAAA,EAAA,MAAA;EACvC;;;EAClB,OAAA,EASW,aATX,EAAA;EASW;;;EAUC,MAAA,EALF,YAKE,EAAA;EAAM;AAGtB;;EAC2C,QAAA,EAJ3B,MAI2B,CAAA,MAAA,EAJZ,WAIY,CAAA;CACX;AAA5B,KAFQ,iBAER,CAAA,wBADsB,cACtB,GADuC,cACvC,CAAA,GAAA,mBAAA,CAA4B,eAA5B,CAAA"}
|
package/dist/types/context.d.mts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { CommandInput, CommandOption, CommandTree } from "./command.mjs";
|
|
2
2
|
import { ResolvedConfig } from "./config.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { NodeJsPluginContext } from "@powerlines/plugin-nodejs/types/plugin";
|
|
4
|
+
import { TsdownPluginContext } from "@powerlines/plugin-tsdown/types/plugin";
|
|
5
|
+
import { UnresolvedContext as UnresolvedContext$1 } from "powerlines/types/context";
|
|
4
6
|
|
|
5
7
|
//#region src/types/context.d.ts
|
|
6
|
-
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = TsdownPluginContext<TResolvedConfig> & {
|
|
8
|
+
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = TsdownPluginContext<TResolvedConfig> & NodeJsPluginContext<TResolvedConfig> & {
|
|
7
9
|
/**
|
|
8
10
|
* The root path where commands are located.
|
|
9
11
|
*/
|
|
@@ -21,5 +23,7 @@ type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = TsdownPl
|
|
|
21
23
|
*/
|
|
22
24
|
commands: Record<string, CommandTree>;
|
|
23
25
|
};
|
|
26
|
+
type UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnresolvedContext$1<TResolvedConfig>;
|
|
24
27
|
//#endregion
|
|
25
|
-
export { Context };
|
|
28
|
+
export { Context, UnresolvedContext };
|
|
29
|
+
//# sourceMappingURL=context.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.mts","names":[],"sources":["../../src/types/context.ts"],"sourcesContent":[],"mappings":";;;;;;;KAwBY,gCAAgC,iBAAiB,kBAC3D,oBAAoB,mBAClB,oBAAoB;;AAFxB;;EAA6D,YAAA,EAAA,MAAA;EACvC;;;EAClB,OAAA,EASW,aATX,EAAA;EASW;;;EAUC,MAAA,EALF,YAKE,EAAA;EAAM;AAGtB;;EAC2C,QAAA,EAJ3B,MAI2B,CAAA,MAAA,EAJZ,WAIY,CAAA;CACX;AAA5B,KAFQ,iBAER,CAAA,wBADsB,cACtB,GADuC,cACvC,CAAA,GAAA,mBAAA,CAA4B,eAA5B,CAAA"}
|
package/dist/types/context.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
export { };
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseCommandOption, BooleanCommandOption, CommandBase, CommandInput, CommandOption, CommandParam, CommandTree, NumberCommandOption, SerializedCommandTree, StringCommandOption } from "./command.cjs";
|
|
2
|
-
import { Context } from "./context.cjs";
|
|
3
|
-
import { Options, ResolvedConfig, UserConfig } from "./config.cjs";
|
|
1
|
+
import { BaseCommandOption, BooleanCommandOption, CommandBase, CommandInput, CommandOption, CommandParam, CommandPath, CommandTree, CommandTreePath, NumberCommandOption, SerializedCommandTree, StringCommandOption } from "./command.cjs";
|
|
2
|
+
import { Context, UnresolvedContext } from "./context.cjs";
|
|
3
|
+
import { BaseConfig, Options, OutputConfig, ResolvedConfig, UserConfig } from "./config.cjs";
|
|
4
4
|
import { BaseCommandOptions } from "./options.cjs";
|
|
5
|
-
export { BaseCommandOption, BaseCommandOptions, BooleanCommandOption, CommandBase, CommandInput, CommandOption, CommandParam, CommandTree, Context, NumberCommandOption, Options, ResolvedConfig, SerializedCommandTree, StringCommandOption, UserConfig };
|
|
5
|
+
export { BaseCommandOption, BaseCommandOptions, BaseConfig, BooleanCommandOption, CommandBase, CommandInput, CommandOption, CommandParam, CommandPath, CommandTree, CommandTreePath, Context, NumberCommandOption, Options, OutputConfig, ResolvedConfig, SerializedCommandTree, StringCommandOption, UnresolvedContext, UserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseCommandOption, BooleanCommandOption, CommandBase, CommandInput, CommandOption, CommandParam, CommandTree, NumberCommandOption, SerializedCommandTree, StringCommandOption } from "./command.mjs";
|
|
2
|
-
import { Context } from "./context.mjs";
|
|
3
|
-
import { Options, ResolvedConfig, UserConfig } from "./config.mjs";
|
|
1
|
+
import { BaseCommandOption, BooleanCommandOption, CommandBase, CommandInput, CommandOption, CommandParam, CommandPath, CommandTree, CommandTreePath, NumberCommandOption, SerializedCommandTree, StringCommandOption } from "./command.mjs";
|
|
2
|
+
import { Context, UnresolvedContext } from "./context.mjs";
|
|
3
|
+
import { BaseConfig, Options, OutputConfig, ResolvedConfig, UserConfig } from "./config.mjs";
|
|
4
4
|
import { BaseCommandOptions } from "./options.mjs";
|
|
5
|
-
export { BaseCommandOption, BaseCommandOptions, BooleanCommandOption, CommandBase, CommandInput, CommandOption, CommandParam, CommandTree, Context, NumberCommandOption, Options, ResolvedConfig, SerializedCommandTree, StringCommandOption, UserConfig };
|
|
5
|
+
export { BaseCommandOption, BaseCommandOptions, BaseConfig, BooleanCommandOption, CommandBase, CommandInput, CommandOption, CommandParam, CommandPath, CommandTree, CommandTreePath, Context, NumberCommandOption, Options, OutputConfig, ResolvedConfig, SerializedCommandTree, StringCommandOption, UnresolvedContext, UserConfig };
|
package/dist/types/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
export { };
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Context } from "./context.cjs";
|
|
2
|
+
import { ResolvedConfig } from "./config.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/types/internal.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* An internal representation of the plugin context, used for managing hooks and environment data.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
interface UNSAFE_ContextInternal {
|
|
12
|
+
id: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* An internal representation of the plugin context, used for managing hooks and environment data.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
interface UNSAFE_Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
|
|
20
|
+
$$internal: UNSAFE_ContextInternal;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { UNSAFE_Context, UNSAFE_ContextInternal };
|
|
24
|
+
//# sourceMappingURL=internal.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.cts","names":[],"sources":["../../src/types/internal.ts"],"sourcesContent":[],"mappings":";;;;;;;AA4BA;AASA;;AAC2C,UAV1B,sBAAA,CAU0B;EACzB,EAAA,EAAA,MAAA;;;;;;;UAFD,uCACS,iBAAiB,wBACjC,QAAQ;cACJ"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Context } from "./context.mjs";
|
|
2
|
+
import { ResolvedConfig } from "./config.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/types/internal.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* An internal representation of the plugin context, used for managing hooks and environment data.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
interface UNSAFE_ContextInternal {
|
|
12
|
+
id: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* An internal representation of the plugin context, used for managing hooks and environment data.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
interface UNSAFE_Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
|
|
20
|
+
$$internal: UNSAFE_ContextInternal;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { UNSAFE_Context, UNSAFE_ContextInternal };
|
|
24
|
+
//# sourceMappingURL=internal.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.mts","names":[],"sources":["../../src/types/internal.ts"],"sourcesContent":[],"mappings":";;;;;;;AA4BA;AASA;;AAC2C,UAV1B,sBAAA,CAU0B;EACzB,EAAA,EAAA,MAAA;;;;;;;UAFD,uCACS,iBAAiB,wBACjC,QAAQ;cACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/types/options.d.cts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.cts","names":[],"sources":["../../src/types/options.ts"],"sourcesContent":[],"mappings":";UAkBiB,kBAAA;EAAA,IAAA,EAAA,OAAA"}
|
package/dist/types/options.d.mts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.mts","names":[],"sources":["../../src/types/options.ts"],"sourcesContent":[],"mappings":";UAkBiB,kBAAA;EAAA,IAAA,EAAA,OAAA"}
|
package/dist/types/options.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
export { };
|