@shell-shock/preset-cli 0.6.0 → 0.7.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/dist/components/banner-function-declaration.cjs +6 -6
- package/dist/components/banner-function-declaration.d.mts +2 -2
- package/dist/components/banner-function-declaration.d.mts.map +1 -1
- package/dist/components/banner-function-declaration.mjs +6 -6
- package/dist/components/banner-function-declaration.mjs.map +1 -1
- package/dist/components/command-entry.cjs +134 -127
- package/dist/components/command-entry.d.cts +2 -2
- package/dist/components/command-entry.d.cts.map +1 -1
- package/dist/components/command-entry.d.mts +2 -2
- package/dist/components/command-entry.d.mts.map +1 -1
- package/dist/components/command-entry.mjs +133 -126
- package/dist/components/command-entry.mjs.map +1 -1
- package/dist/components/command-router.d.cts +3 -3
- package/dist/components/command-router.d.cts.map +1 -1
- package/dist/components/prompts-builtin.cjs +35 -10
- package/dist/components/prompts-builtin.d.cts +9 -9
- package/dist/components/prompts-builtin.d.cts.map +1 -1
- package/dist/components/prompts-builtin.d.mts +9 -9
- package/dist/components/prompts-builtin.d.mts.map +1 -1
- package/dist/components/prompts-builtin.mjs +46 -21
- package/dist/components/prompts-builtin.mjs.map +1 -1
- package/dist/components/virtual-command-entry.cjs +3 -3
- package/dist/components/virtual-command-entry.d.cts +2 -2
- package/dist/components/virtual-command-entry.mjs +2 -2
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -1
- package/dist/plugin-upgrade/dist/components/index.cjs +2 -0
- package/dist/plugin-upgrade/dist/components/index.mjs +4 -0
- package/dist/plugin-upgrade/dist/components/upgrade-builtin.cjs +661 -0
- package/dist/plugin-upgrade/dist/components/upgrade-builtin.mjs +655 -0
- package/dist/plugin-upgrade/dist/components/upgrade-builtin.mjs.map +1 -0
- package/dist/plugin-upgrade/dist/components/upgrade-command.cjs +96 -0
- package/dist/plugin-upgrade/dist/components/upgrade-command.mjs +96 -0
- package/dist/plugin-upgrade/dist/components/upgrade-command.mjs.map +1 -0
- package/dist/plugin-upgrade/dist/index.cjs +49 -0
- package/dist/plugin-upgrade/dist/index.mjs +49 -0
- package/dist/plugin-upgrade/dist/index.mjs.map +1 -0
- package/dist/types/plugin.d.cts +6 -10
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +6 -10
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +10 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgrade-builtin.mjs","names":[],"sources":["../../../../../plugin-upgrade/dist/components/upgrade-builtin.mjs"],"sourcesContent":["import { createComponent, createIntrinsic, mergeProps } from \"@alloy-js/core/jsx-runtime\";\nimport { Show, code, splitProps } from \"@alloy-js/core\";\nimport { ElseClause, ElseIfClause, FunctionDeclaration, IfStatement, InterfaceDeclaration, VarDeclaration } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { InterfaceMember, TSDoc, TSDocParam, TSDocRemarks, TSDocReturns, TypeDeclaration } from \"@powerlines/plugin-alloy/typescript\";\nimport { BuiltinFile } from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport defu from \"defu\";\n\n//#region src/components/upgrade-builtin.tsx\n/**\n* The `locatePackageJson` handler function declaration code for the Shell Shock project.\n*/\nfunction LocatePackageJsonFunctionDeclaration() {\n\treturn [\n\t\tcreateComponent(InterfaceDeclaration, {\n\t\t\t\"export\": true,\n\t\t\tname: \"LocatePackageJsonOptions\",\n\t\t\tdoc: \"Options for the `locatePackageJson` handler function.\",\n\t\t\tget children() {\n\t\t\t\treturn createComponent(InterfaceMember, {\n\t\t\t\t\tname: \"cwd\",\n\t\t\t\t\toptional: true,\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdoc: \"The current working directory to use. If not provided, the process's current working directory will be used.\"\n\t\t\t\t});\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(TSDoc, {\n\t\t\theading: \"Locate the package.json file currently being used by the command-line/workspace.\",\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcreateComponent(TSDocRemarks, { children: `This function is used to determine the package.json file currently being used by the command-line/workspace. It can be used in the CLI upgrade command to check if the application is using npm, yarn, or another package manager.` }),\n\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\tcreateComponent(TSDocParam, {\n\t\t\t\t\t\tname: \"options\",\n\t\t\t\t\t\tchildren: `The options for the \\`locatePackageJson\\` function. Currently, there are no options available, but this parameter is included for future extensibility.`\n\t\t\t\t\t}),\n\t\t\t\t\tcreateComponent(TSDocReturns, { children: `A promise that resolves to the package.json file currently being used by the command-line/workspace as a string.` })\n\t\t\t\t];\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(FunctionDeclaration, {\n\t\t\t\"export\": true,\n\t\t\tasync: true,\n\t\t\tname: \"locatePackageJson\",\n\t\t\tparameters: [{\n\t\t\t\tname: \"options\",\n\t\t\t\ttype: \"LocatePackageJsonOptions\",\n\t\t\t\tdefault: \"{}\"\n\t\t\t}],\n\t\t\treturnType: \"string | undefined\",\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\t\"let\": true,\n\t\t\t\t\t\tname: \"currentPath\",\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\tinitializer: code`options.cwd ?? process.cwd(); `\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\t\"let\": true,\n\t\t\t\t\t\tname: \"parentPath\",\n\t\t\t\t\t\tinitializer: code`resolve(currentPath, \"..\"); `\n\t\t\t\t\t}),\n\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\tcode`while (parentPath !== currentPath && currentPath !== homePath && currentPath !== tempPath) { `,\n\t\t\t\t\tcreateComponent(IfStatement, {\n\t\t\t\t\t\tcondition: code`existsSync(join(currentPath, \"package.json\"))`,\n\t\t\t\t\t\tchildren: code`return join(currentPath, \"package.json\"); `\n\t\t\t\t\t}),\n\t\t\t\t\tcreateComponent(ElseClause, { children: code`currentPath = pathParent;\n parentPath = resolve(currentPath, \"..\"); ` }),\n\t\t\t\t\tcode` }\n\n return undefined; `\n\t\t\t\t];\n\t\t\t}\n\t\t})\n\t];\n}\n/**\n* The `locateLockfile` handler function declaration code for the Shell Shock project.\n*/\nfunction LocateLockfileFunctionDeclaration() {\n\treturn [\n\t\tcreateComponent(InterfaceDeclaration, {\n\t\t\t\"export\": true,\n\t\t\tname: \"LocateLockfileOptions\",\n\t\t\tdoc: \"Options for the `locateLockfile` handler function.\",\n\t\t\tget children() {\n\t\t\t\treturn createComponent(InterfaceMember, {\n\t\t\t\t\tname: \"cwd\",\n\t\t\t\t\toptional: true,\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdoc: \"The current working directory to use. If not provided, the process's current working directory will be used.\"\n\t\t\t\t});\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(TSDoc, {\n\t\t\theading: \"Locate the lockfile currently being used by the command-line/workspace.\",\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcreateComponent(TSDocRemarks, { children: `This function is used to determine the lockfile currently being used by the command-line/workspace. It can be used in the CLI upgrade command to check if the application is using npm, yarn, or another package manager.` }),\n\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\tcreateComponent(TSDocParam, {\n\t\t\t\t\t\tname: \"options\",\n\t\t\t\t\t\tchildren: `The options for the \\`locateLockfile\\` function. Currently, there are no options available, but this parameter is included for future extensibility.`\n\t\t\t\t\t}),\n\t\t\t\t\tcreateComponent(TSDocReturns, { children: `A promise that resolves to the lockfile currently being used by the command-line/workspace as a string.` })\n\t\t\t\t];\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(FunctionDeclaration, {\n\t\t\t\"export\": true,\n\t\t\tasync: true,\n\t\t\tname: \"locateLockfile\",\n\t\t\tparameters: [{\n\t\t\t\tname: \"options\",\n\t\t\t\ttype: \"LocateLockfileOptions\",\n\t\t\t\tdefault: \"{}\"\n\t\t\t}],\n\t\t\treturnType: \"string | undefined\",\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\t\"let\": true,\n\t\t\t\t\t\tname: \"currentPath\",\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\tinitializer: code`options.cwd ?? process.cwd(); `\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\t\"let\": true,\n\t\t\t\t\t\tname: \"parentPath\",\n\t\t\t\t\t\tinitializer: code`resolve(currentPath, \"..\"); `\n\t\t\t\t\t}),\n\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\tcode`while (parentPath !== currentPath && currentPath !== homePath && currentPath !== tempPath) { `,\n\t\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\t\"const\": true,\n\t\t\t\t\t\tname: \"lockfile\",\n\t\t\t\t\t\tinitializer: code`[\n \"package-lock.json\",\n \"npm-shrinkwrap.json\",\n \"yarn.lock\",\n \"pnpm-lock.yaml\",\n \"pnpm-workspace.yaml\",\n \"deno.lock\",\n \"deno.json\",\n \"deno.jsonc\",\n \"bun.lock\",\n \"bun.lockb\"\n ].find(lf => existsSync(join(currentPath, lf))); `\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(IfStatement, {\n\t\t\t\t\t\tcondition: code`lockfile`,\n\t\t\t\t\t\tchildren: code`return lockfile; `\n\t\t\t\t\t}),\n\t\t\t\t\tcreateComponent(ElseClause, { children: code`currentPath = pathParent;\n parentPath = resolve(currentPath, \"..\"); ` }),\n\t\t\t\t\tcode` }\n\n return undefined; `\n\t\t\t\t];\n\t\t\t}\n\t\t})\n\t];\n}\n/**\n* The `getPackageManager` handler function declaration code for the Shell Shock project.\n*/\nfunction GetPackageManagerFunctionDeclaration() {\n\treturn [\n\t\tcreateComponent(TypeDeclaration, {\n\t\t\t\"export\": true,\n\t\t\tname: \"GetPackageManagerOptions\",\n\t\t\tdoc: \"Options for the `getPackageManager` handler function.\",\n\t\t\tchildren: code`LocateLockfileOptions;`\n\t\t}),\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(TSDoc, {\n\t\t\theading: \"Get the package manager currently being used by the command-line/workspace.\",\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcreateComponent(TSDocRemarks, { children: `This function is used to determine the package manager currently being used by the command-line/workspace. It can be used in the CLI upgrade command to check if the application is using npm, yarn, or another package manager.` }),\n\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\tcreateComponent(TSDocParam, {\n\t\t\t\t\t\tname: \"options\",\n\t\t\t\t\t\tchildren: `The options for the \\`getPackageManager\\` function. Currently, there are no options available, but this parameter is included for future extensibility.`\n\t\t\t\t\t}),\n\t\t\t\t\tcreateComponent(TSDocReturns, { children: `A promise that resolves to the package manager currently being used by the command-line/workspace as a string.` })\n\t\t\t\t];\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(FunctionDeclaration, {\n\t\t\t\"export\": true,\n\t\t\tasync: true,\n\t\t\tname: \"getPackageManager\",\n\t\t\tparameters: [{\n\t\t\t\tname: \"options\",\n\t\t\t\ttype: \"GetPackageManagerOptions\",\n\t\t\t\tdefault: \"{}\"\n\t\t\t}],\n\t\t\treturnType: code`Promise<\"npm\" | \"yarn\" | \"deno\" | \"pnpm\" | \"bun\">`,\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\t\"const\": true,\n\t\t\t\t\t\tname: \"userAgent\",\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\tinitializer: code`process.env.npm_config_user_agent ?? \"\"; `\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\t\"const\": true,\n\t\t\t\t\t\tname: \"execPath\",\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\tinitializer: code`process.env.npm_execpath ?? \"\"; `\n\t\t\t\t\t}),\n\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\tcreateComponent(IfStatement, {\n\t\t\t\t\t\tcondition: code`userAgent.startsWith(\"yarn\") || execPath.includes(\"yarn\")`,\n\t\t\t\t\t\tchildren: code`return \"yarn\"; `\n\t\t\t\t\t}),\n\t\t\t\t\tcreateComponent(ElseIfClause, {\n\t\t\t\t\t\tcondition: code`userAgent.startsWith(\"pnpm\") || execPath.includes(\"pnpm\")`,\n\t\t\t\t\t\tchildren: code`return \"pnpm\"; `\n\t\t\t\t\t}),\n\t\t\t\t\tcreateComponent(ElseIfClause, {\n\t\t\t\t\t\tcondition: code`userAgent.startsWith(\"bun\") || execPath.includes(\"bun\") || typeof Bun !== \"undefined\" || process.versions.bun`,\n\t\t\t\t\t\tchildren: code`return \"bun\"; `\n\t\t\t\t\t}),\n\t\t\t\t\tcreateComponent(ElseClause, { get children() {\n\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\t\t\t\"const\": true,\n\t\t\t\t\t\t\t\tname: \"lockfilePath\",\n\t\t\t\t\t\t\t\tinitializer: code`locateLockfile(options); `\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\t\t\tcreateComponent(IfStatement, {\n\t\t\t\t\t\t\t\tcondition: code`lockfilePath === \"yarn.lock\"`,\n\t\t\t\t\t\t\t\tchildren: code`return \"yarn\"; `\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateComponent(ElseIfClause, {\n\t\t\t\t\t\t\t\tcondition: code`lockfilePath === \"deno.lock\" || lockfilePath === \"deno.json\" || lockfilePath === \"deno.jsonc\"`,\n\t\t\t\t\t\t\t\tchildren: code`return \"deno\"; `\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateComponent(ElseIfClause, {\n\t\t\t\t\t\t\t\tcondition: code`lockfilePath === \"pnpm-lock.yaml\" || lockfilePath === \"pnpm-workspace.yaml\"`,\n\t\t\t\t\t\t\t\tchildren: code`return \"pnpm\"; `\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateComponent(ElseIfClause, {\n\t\t\t\t\t\t\t\tcondition: code`lockfilePath === \"bun.lock\" || lockfilePath === \"bun.lockb\"`,\n\t\t\t\t\t\t\t\tchildren: code`return \"bun\"; `\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateComponent(ElseClause, { get children() {\n\t\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\t\t\t\t\t\"const\": true,\n\t\t\t\t\t\t\t\t\t\tname: \"packageJsonPath\",\n\t\t\t\t\t\t\t\t\t\tinitializer: code`locatePackageJson(options); `\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\tcreateComponent(IfStatement, {\n\t\t\t\t\t\t\t\t\t\tcondition: code`packageJsonPath && existsSync(packageJsonPath)`,\n\t\t\t\t\t\t\t\t\t\tget children() {\n\t\t\t\t\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\t\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"const\": true,\n\t\t\t\t\t\t\t\t\t\t\t\t\tname: \"packageJson\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tinitializer: code`JSON.parse(await readFile(packageJsonPath, \"utf8\")); `\n\t\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t\tcreateComponent(IfStatement, {\n\t\t\t\t\t\t\t\t\t\t\t\t\tcondition: code`packageJson.devEngines?.packageManager?.name && typeof packageJson.devEngines.packageManager.name === \"string\" && [\"npm\", \"yarn\", \"pnpm\", \"deno\", \"bun\"].includes(packageJson.devEngines.packageManager.name)`,\n\t\t\t\t\t\t\t\t\t\t\t\t\tchildren: code`return packageJson.devEngines.packageManager.name; `\n\t\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\t\t\t\t\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"const\": true,\n\t\t\t\t\t\t\t\t\t\t\t\t\tname: \"dependencies\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tinitializer: code`{\n ...packageJson.dependencies,\n ...packageJson.devDependencies,\n ...packageJson.peerDependencies,\n ...packageJson.optionalDependencies,\n }; `\n\t\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t\tcreateComponent(IfStatement, {\n\t\t\t\t\t\t\t\t\t\t\t\t\tcondition: code`Object.keys(dependencies).some(dep => dep === \"yarn\" || dep.startsWith(\"yarn@\") || dep === \"yarnpkg\" || dep.startsWith(\"yarnpkg@\"))`,\n\t\t\t\t\t\t\t\t\t\t\t\t\tchildren: code`return \"yarn\"; `\n\t\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t\tcreateComponent(ElseIfClause, {\n\t\t\t\t\t\t\t\t\t\t\t\t\tcondition: code`Object.keys(dependencies).some(dep => dep === \"bun\" || dep.startsWith(\"bun@\"))`,\n\t\t\t\t\t\t\t\t\t\t\t\t\tchildren: code`return \"bun\"; `\n\t\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t\tcreateComponent(ElseIfClause, {\n\t\t\t\t\t\t\t\t\t\t\t\t\tcondition: code`Object.keys(dependencies).some(dep => dep === \"pnpm\" || dep.startsWith(\"pnpm@\"))`,\n\t\t\t\t\t\t\t\t\t\t\t\t\tchildren: code`return \"pnpm\"; `\n\t\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t\tcreateComponent(ElseIfClause, {\n\t\t\t\t\t\t\t\t\t\t\t\t\tcondition: code`Object.keys(dependencies).some(dep => dep === \"deno\" || dep.startsWith(\"deno@\"))`,\n\t\t\t\t\t\t\t\t\t\t\t\t\tchildren: code`return \"deno\"; `\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\t\t\t\t\tcode`return \"npm\"; `\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t} })\n\t\t\t\t\t\t];\n\t\t\t\t\t} })\n\t\t\t\t];\n\t\t\t}\n\t\t})\n\t];\n}\n/**\n* The `fetchNpmPackage` handler function declaration code for the Shell Shock project.\n*/\nfunction FetchNpmPackageFunctionDeclaration() {\n\treturn [\n\t\tcreateComponent(InterfaceDeclaration, {\n\t\t\t\"export\": true,\n\t\t\tname: \"NpmPackageMaintainer\",\n\t\t\tdoc: \"Represents a maintainer of an npm package.\",\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"email\",\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\tdoc: \"The email of the npm package maintainer.\"\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"username\",\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\tdoc: \"The username of the npm package maintainer.\"\n\t\t\t\t\t})\n\t\t\t\t];\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(InterfaceDeclaration, {\n\t\t\t\"export\": true,\n\t\t\tname: \"NpmPackageLinks\",\n\t\t\tdoc: \"Represents the links of an npm package.\",\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"homepage\",\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\tdoc: \"The homepage of the npm package.\"\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"repository\",\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\tdoc: \"The repository of the npm package.\"\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"bugs\",\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\tdoc: \"The bugs page of the npm package.\"\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"npm\",\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\tdoc: \"The npm page of the npm package.\"\n\t\t\t\t\t})\n\t\t\t\t];\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(InterfaceDeclaration, {\n\t\t\t\"export\": true,\n\t\t\tname: \"NpmPackage\",\n\t\t\tdoc: \"Represents an npm package.\",\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"name\",\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\tdoc: \"The name of the npm package.\"\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"date\",\n\t\t\t\t\t\ttype: \"Date\",\n\t\t\t\t\t\tdoc: \"The date when the npm package was last updated.\"\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"version\",\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\tdoc: \"The version of the npm package.\"\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"description\",\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\tdoc: \"The description of the npm package.\"\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"keywords\",\n\t\t\t\t\t\ttype: \"string[]\",\n\t\t\t\t\t\tdoc: \"A list of keywords associated with the npm package.\"\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"license\",\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\tdoc: \"The license of the npm package.\"\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"maintainers\",\n\t\t\t\t\t\ttype: \"NpmPackageMaintainer[]\",\n\t\t\t\t\t\tdoc: \"The maintainers of the npm package.\"\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"links\",\n\t\t\t\t\t\ttype: \"NpmPackageLinks\",\n\t\t\t\t\t\tdoc: \"The links of the npm package.\"\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {})\n\t\t\t\t];\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(InterfaceDeclaration, {\n\t\t\t\"export\": true,\n\t\t\tname: \"NpmPackageSearchResultItem\",\n\t\t\tdoc: \"Represents an npm package search result item.\",\n\t\t\tget children() {\n\t\t\t\treturn createComponent(InterfaceMember, {\n\t\t\t\t\tname: \"package\",\n\t\t\t\t\ttype: \"NpmPackage\",\n\t\t\t\t\tdoc: \"The npm package details.\"\n\t\t\t\t});\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(InterfaceDeclaration, {\n\t\t\t\"export\": true,\n\t\t\tname: \"NpmPackageSearchResult\",\n\t\t\tdoc: \"Represents an npm package search result.\",\n\t\t\tget children() {\n\t\t\t\treturn createComponent(InterfaceMember, {\n\t\t\t\t\tname: \"objects\",\n\t\t\t\t\ttype: \"NpmPackageSearchResultItem[]\",\n\t\t\t\t\tdoc: \"The list of npm package search result items.\"\n\t\t\t\t});\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(TSDoc, {\n\t\t\theading: \"Fetch details of an npm package.\",\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcreateComponent(TSDocRemarks, { children: `This function is used to fetch an npm package. It can be used in the CLI upgrade command to check if the application is using npm, yarn, or another package manager.` }),\n\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\tcreateComponent(TSDocParam, {\n\t\t\t\t\t\tname: \"packageName\",\n\t\t\t\t\t\tchildren: `The name of the npm package to fetch.`\n\t\t\t\t\t}),\n\t\t\t\t\tcreateComponent(TSDocReturns, { children: `A promise that resolves to the npm package details or undefined if the package is not found.` })\n\t\t\t\t];\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(FunctionDeclaration, {\n\t\t\t\"export\": true,\n\t\t\tasync: true,\n\t\t\tname: \"fetchNpmPackage\",\n\t\t\tparameters: [{\n\t\t\t\tname: \"packageName\",\n\t\t\t\ttype: \"string\"\n\t\t\t}],\n\t\t\treturnType: code`Promise<NpmPackage | undefined>`,\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\t\"const\": true,\n\t\t\t\t\t\tname: \"result\",\n\t\t\t\t\t\tinitializer: code` await fetch(\\`https://registry.npmjs.com/-/v1/search?text=\\${packageName}&size=1\\`).then(res => res.json()) as NpmPackageSearchResult; `\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(IfStatement, {\n\t\t\t\t\t\tcondition: code`result.objects && result.objects.length > 0 && result.objects[0].package && result.objects[0].package.name === packageName`,\n\t\t\t\t\t\tchildren: code`return result.objects[0].package; `\n\t\t\t\t\t}),\n\t\t\t\t\tcreateComponent(ElseClause, { children: code`return undefined; ` })\n\t\t\t\t];\n\t\t\t}\n\t\t})\n\t];\n}\n/**\n* The `getLatest` handler function declaration code for the Shell Shock project.\n*/\nfunction GetLatestFunctionDeclaration() {\n\treturn [createComponent(TSDoc, {\n\t\theading: \"Get the latest version of the application from the npm registry.\",\n\t\tget children() {\n\t\t\treturn [\n\t\t\t\tcreateComponent(TSDocRemarks, { children: `This function is used to retrieve the latest version of the application from the npm registry. It can be used in the CLI upgrade command to check if there is a newer version of the application available.` }),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcreateComponent(TSDocParam, {\n\t\t\t\t\tname: \"packageName\",\n\t\t\t\t\tchildren: `The name of the npm package to fetch.`\n\t\t\t\t}),\n\t\t\t\tcreateComponent(TSDocReturns, { children: `A promise that resolves to the latest version of the specified npm package as a string.` })\n\t\t\t];\n\t\t}\n\t}), createComponent(FunctionDeclaration, {\n\t\t\"export\": true,\n\t\tasync: true,\n\t\tname: \"getLatest\",\n\t\tparameters: [{\n\t\t\tname: \"packageName\",\n\t\t\ttype: \"string\"\n\t\t}],\n\t\tget children() {\n\t\t\treturn [\n\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\"const\": true,\n\t\t\t\t\tname: \"package\",\n\t\t\t\t\tinitializer: code`await fetchNpmPackage(packageName); `\n\t\t\t\t}),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcode`return package?.version; `\n\t\t\t];\n\t\t}\n\t})];\n}\n/**\n* The `install` handler function declaration code for the Shell Shock project.\n*/\nfunction InstallFunctionDeclaration() {\n\treturn [\n\t\tcreateComponent(InterfaceDeclaration, {\n\t\t\t\"export\": true,\n\t\t\tname: \"InstallOptions\",\n\t\t\tdoc: \"Options for the `install` handler function.\",\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"stdout\",\n\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\ttype: \"(string) => void\",\n\t\t\t\t\t\tdoc: \"A callback function that is called with the stdout output of the command.\"\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"stderr\",\n\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\ttype: \"(string) => void\",\n\t\t\t\t\t\tdoc: \"A callback function that is called with the stderr output of the command.\"\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\tname: \"color\",\n\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\ttype: \"boolean\",\n\t\t\t\t\t\tdoc: \"Whether to enable color output in the command. If not provided, color output will be enabled by default.\"\n\t\t\t\t\t})\n\t\t\t\t];\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(TSDoc, {\n\t\t\theading: \"Install the application dependencies.\",\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcreateComponent(TSDocRemarks, { children: `This function is used to install the application dependencies. It can be used in the CLI upgrade command to ensure that all necessary dependencies are installed.` }),\n\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\tcreateComponent(TSDocParam, {\n\t\t\t\t\t\tname: \"options\",\n\t\t\t\t\t\tchildren: `The options for the \\`install\\` function. Currently, there are no options available, but this parameter is included for future extensibility.`\n\t\t\t\t\t}),\n\t\t\t\t\tcreateComponent(TSDocReturns, { children: `A promise that resolves when the installation of dependencies is complete.` })\n\t\t\t\t];\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(FunctionDeclaration, {\n\t\t\t\"export\": true,\n\t\t\tasync: true,\n\t\t\tname: \"install\",\n\t\t\tparameters: [{\n\t\t\t\tname: \"options\",\n\t\t\t\ttype: \"InstallOptions\",\n\t\t\t\tdefault: \"{}\"\n\t\t\t}],\n\t\t\treturnType: \"Promise<string>\",\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\t\"const\": true,\n\t\t\t\t\t\tname: \"packageManager\",\n\t\t\t\t\t\tinitializer: code`getPackageManager(); `\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\t\"let\": true,\n\t\t\t\t\t\tname: \"output\",\n\t\t\t\t\t\tinitializer: code`\"\"; `\n\t\t\t\t\t}),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcode`try {\n // await spawn(\n // \\`\\${packageManager}\\${isWindows && packageManager !== \"bun\" ? \".cmd\" : \"\"}\\`,\n // [\"install\"],\n // {\n // stdout: (data: string) => {\n // options.stdout?.(data);\n // output += data;\n // },\n // stderr: (data: string) => {\n // options.stderr?.(data);\n // },\n // },\n // {\n // cwd: options.cwd ?? process.cwd(),\n // env: {\n // ...process.env,\n // ...(options.color !== false ? { FORCE_COLOR: true } : null),\n // // With spawn, pnpm install will fail with ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies.\n // // When pnpm install is run directly from the terminal, this error does not occur.\n // // When pnpm install is run from a simple spawn script, this error does not occur.\n // // The issue only seems to be when pnpm install is executed from npm-check-updates, but it's not clear what configuration or environmental factors are causing this.\n // // For now, turn off strict-peer-dependencies on pnpm auto-install.\n // // See: https://github.com/raineorshine/npm-check-updates/issues/1191\n // ...(packageManager === 'pnpm' ? { npm_config_strict_peer_dependencies: false } : null),\n // },\n // },\n // );\n } catch (err) {\n console.error(\"Error executing install command:\", err);\n throw err;\n }\n `\n\t\t\t\t];\n\t\t\t}\n\t\t})\n\t];\n}\n/**\n* A built-in upgrade module for Shell Shock.\n*/\nfunction UpgradeBuiltin(props) {\n\tconst [{ children }, rest] = splitProps(props, [\"children\"]);\n\treturn createComponent(BuiltinFile, mergeProps({\n\t\tid: \"upgrade\",\n\t\tdescription: \"A collection of application upgrade utility functions for Shell Shock.\"\n\t}, rest, {\n\t\tget imports() {\n\t\t\treturn defu(rest.imports ?? {}, {\n\t\t\t\t\"node:os\": \"os\",\n\t\t\t\t\"node:path\": [\"join\", \"resolve\"],\n\t\t\t\t\"node:fs\": [\"existsSync\"],\n\t\t\t\t\"node:fs/promises\": [\"readFile\", \"writeFile\"],\n\t\t\t\t\"node:process\": \"process\"\n\t\t\t});\n\t\t},\n\t\tget builtinImports() {\n\t\t\treturn defu(rest.builtinImports ?? {}, {\n\t\t\t\tconsole: [\n\t\t\t\t\t\"error\",\n\t\t\t\t\t\"verbose\",\n\t\t\t\t\t\"writeLine\"\n\t\t\t\t],\n\t\t\t\tenv: [\"paths\", \"isWindows\"]\n\t\t\t});\n\t\t},\n\t\tget children() {\n\t\t\treturn [\n\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\"const\": true,\n\t\t\t\t\tname: \"homePath\",\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tinitializer: code`os.homedir(); `\n\t\t\t\t}),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcreateComponent(VarDeclaration, {\n\t\t\t\t\t\"const\": true,\n\t\t\t\t\tname: \"tempPath\",\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tinitializer: code`os.tmpdir(); `\n\t\t\t\t}),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcreateComponent(LocateLockfileFunctionDeclaration, {}),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcreateComponent(GetPackageManagerFunctionDeclaration, {}),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcreateComponent(FetchNpmPackageFunctionDeclaration, {}),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcreateComponent(GetLatestFunctionDeclaration, {}),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcreateComponent(InstallFunctionDeclaration, {}),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcreateComponent(Show, {\n\t\t\t\t\tget when() {\n\t\t\t\t\t\treturn Boolean(children);\n\t\t\t\t\t},\n\t\t\t\t\tchildren\n\t\t\t\t})\n\t\t\t];\n\t\t}\n\t}));\n}\n\n//#endregion\nexport { FetchNpmPackageFunctionDeclaration, GetLatestFunctionDeclaration, GetPackageManagerFunctionDeclaration, InstallFunctionDeclaration, LocateLockfileFunctionDeclaration, LocatePackageJsonFunctionDeclaration, UpgradeBuiltin };\n//# sourceMappingURL=upgrade-builtin.mjs.map"],"mappings":";;;;;;;;;;;;AAqFA,SAAS,oCAAoC;AAC5C,QAAO;EACN,gBAAgB,sBAAsB;GACrC,UAAU;GACV,MAAM;GACN,KAAK;GACL,IAAI,WAAW;AACd,WAAO,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AgB,gBAAgB;KAC/B,SAAS;KACT,MAAM;KACN,MAAM;KACN,aAAa,IAAI;KACjB,CAAC;IACF,gBAAgB,SAAS,EAAE,CAAC;IAC5B,gBAAgB,mCAAmC,EAAE,CAAC;IACtD,gBAAgB,SAAS,EAAE,CAAC;IAC5B,gBAAgB,sCAAsC,EAAE,CAAC;IACzD,gBAAgB,SAAS,EAAE,CAAC;IAC5B,gBAAgB,oCAAoC,EAAE,CAAC;IACvD,gBAAgB,SAAS,EAAE,CAAC;IAC5B,gBAAgB,8BAA8B,EAAE,CAAC;IACjD,gBAAgB,SAAS,EAAE,CAAC;IAC5B,gBAAgB,4BAA4B,EAAE,CAAC;IAC/C,gBAAgB,SAAS,EAAE,CAAC;IAC5B,gBAAgB,MAAM;KACrB,IAAI,OAAO;AACV,aAAO,QAAQ,SAAS;;KAEzB;KACA,CAAC;IACF;;EAEF,CAAC,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
3
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
4
|
+
let __alloy_js_typescript = require("@alloy-js/typescript");
|
|
5
|
+
let __powerlines_plugin_alloy_typescript = require("@powerlines/plugin-alloy/typescript");
|
|
6
|
+
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
7
|
+
let __powerlines_plugin_alloy_core = require("@powerlines/plugin-alloy/core");
|
|
8
|
+
let __powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
9
|
+
let __powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
|
10
|
+
let __stryke_path = require("@stryke/path");
|
|
11
|
+
|
|
12
|
+
//#region ../plugin-upgrade/dist/components/upgrade-command.mjs
|
|
13
|
+
/**
|
|
14
|
+
* The Upgrade command's handler wrapper for the Shell Shock project.
|
|
15
|
+
*/
|
|
16
|
+
function UpgradeCommand() {
|
|
17
|
+
const context = (0, __powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
|
|
18
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript.TypescriptFile, {
|
|
19
|
+
get path() {
|
|
20
|
+
return (0, __stryke_path.joinPaths)(context.entryPath, "upgrade", "command.ts");
|
|
21
|
+
},
|
|
22
|
+
imports: {
|
|
23
|
+
"node:os": ["os"],
|
|
24
|
+
"node:fs/promises": ["readFile", "writeFile"]
|
|
25
|
+
},
|
|
26
|
+
builtinImports: { console: [
|
|
27
|
+
"colors",
|
|
28
|
+
"writeLine",
|
|
29
|
+
"success",
|
|
30
|
+
"warn",
|
|
31
|
+
"stripAnsi"
|
|
32
|
+
] },
|
|
33
|
+
get children() {
|
|
34
|
+
return [
|
|
35
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, { heading: "Options for the Upgrade command." }),
|
|
36
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.InterfaceDeclaration, {
|
|
37
|
+
"export": true,
|
|
38
|
+
name: "UpgradeOptions",
|
|
39
|
+
get children() {
|
|
40
|
+
return [
|
|
41
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
|
|
42
|
+
heading: "Whether to upgrade to the latest version.",
|
|
43
|
+
get children() {
|
|
44
|
+
return [(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `If set to \`true\`, the command will attempt to upgrade to the latest version. This option takes precedence over the \`version\` option.` }), (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocDefaultValue, {
|
|
45
|
+
get type() {
|
|
46
|
+
return __powerlines_deepkit_vendor_type.ReflectionKind.boolean;
|
|
47
|
+
},
|
|
48
|
+
defaultValue: false
|
|
49
|
+
})];
|
|
50
|
+
}
|
|
51
|
+
}),
|
|
52
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript.InterfaceMember, {
|
|
53
|
+
name: "latest",
|
|
54
|
+
optional: true,
|
|
55
|
+
type: "boolean"
|
|
56
|
+
}),
|
|
57
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core.Spacing, {}),
|
|
58
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
|
|
59
|
+
heading: "A specific application version to upgrade to.",
|
|
60
|
+
get children() {
|
|
61
|
+
return [(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `The command will attempt to upgrade to the specified version. The version should be a valid semantic version string, or \`latest\` to upgrade to the latest version.` }), (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocDefaultValue, {
|
|
62
|
+
get type() {
|
|
63
|
+
return __powerlines_deepkit_vendor_type.ReflectionKind.string;
|
|
64
|
+
},
|
|
65
|
+
defaultValue: "latest"
|
|
66
|
+
})];
|
|
67
|
+
}
|
|
68
|
+
}),
|
|
69
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript.InterfaceMember, {
|
|
70
|
+
name: "version",
|
|
71
|
+
optional: true,
|
|
72
|
+
type: "string"
|
|
73
|
+
})
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
}),
|
|
77
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core.Spacing, {}),
|
|
78
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, { heading: "Handler logic for the \\`upgrade\\` command." }),
|
|
79
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.FunctionDeclaration, {
|
|
80
|
+
"export": true,
|
|
81
|
+
"default": true,
|
|
82
|
+
async: true,
|
|
83
|
+
name: "handler",
|
|
84
|
+
parameters: [{
|
|
85
|
+
name: "options",
|
|
86
|
+
type: "UpgradeOptions"
|
|
87
|
+
}],
|
|
88
|
+
children: __alloy_js_core.code` return;`
|
|
89
|
+
})
|
|
90
|
+
];
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
//#endregion
|
|
96
|
+
exports.UpgradeCommand = UpgradeCommand;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
import { code } from "@alloy-js/core";
|
|
3
|
+
import { FunctionDeclaration, InterfaceDeclaration } from "@alloy-js/typescript";
|
|
4
|
+
import { InterfaceMember, TypescriptFile } from "@powerlines/plugin-alloy/typescript";
|
|
5
|
+
import { ReflectionKind } from "@powerlines/deepkit/vendor/type";
|
|
6
|
+
import { Spacing } from "@powerlines/plugin-alloy/core";
|
|
7
|
+
import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
8
|
+
import { TSDoc as TSDoc$1, TSDocDefaultValue, TSDocRemarks as TSDocRemarks$1 } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
|
|
9
|
+
import { joinPaths } from "@stryke/path";
|
|
10
|
+
|
|
11
|
+
//#region ../plugin-upgrade/dist/components/upgrade-command.mjs
|
|
12
|
+
/**
|
|
13
|
+
* The Upgrade command's handler wrapper for the Shell Shock project.
|
|
14
|
+
*/
|
|
15
|
+
function UpgradeCommand() {
|
|
16
|
+
const context = usePowerlines();
|
|
17
|
+
return createComponent(TypescriptFile, {
|
|
18
|
+
get path() {
|
|
19
|
+
return joinPaths(context.entryPath, "upgrade", "command.ts");
|
|
20
|
+
},
|
|
21
|
+
imports: {
|
|
22
|
+
"node:os": ["os"],
|
|
23
|
+
"node:fs/promises": ["readFile", "writeFile"]
|
|
24
|
+
},
|
|
25
|
+
builtinImports: { console: [
|
|
26
|
+
"colors",
|
|
27
|
+
"writeLine",
|
|
28
|
+
"success",
|
|
29
|
+
"warn",
|
|
30
|
+
"stripAnsi"
|
|
31
|
+
] },
|
|
32
|
+
get children() {
|
|
33
|
+
return [
|
|
34
|
+
createComponent(TSDoc$1, { heading: "Options for the Upgrade command." }),
|
|
35
|
+
createComponent(InterfaceDeclaration, {
|
|
36
|
+
"export": true,
|
|
37
|
+
name: "UpgradeOptions",
|
|
38
|
+
get children() {
|
|
39
|
+
return [
|
|
40
|
+
createComponent(TSDoc$1, {
|
|
41
|
+
heading: "Whether to upgrade to the latest version.",
|
|
42
|
+
get children() {
|
|
43
|
+
return [createComponent(TSDocRemarks$1, { children: `If set to \`true\`, the command will attempt to upgrade to the latest version. This option takes precedence over the \`version\` option.` }), createComponent(TSDocDefaultValue, {
|
|
44
|
+
get type() {
|
|
45
|
+
return ReflectionKind.boolean;
|
|
46
|
+
},
|
|
47
|
+
defaultValue: false
|
|
48
|
+
})];
|
|
49
|
+
}
|
|
50
|
+
}),
|
|
51
|
+
createComponent(InterfaceMember, {
|
|
52
|
+
name: "latest",
|
|
53
|
+
optional: true,
|
|
54
|
+
type: "boolean"
|
|
55
|
+
}),
|
|
56
|
+
createComponent(Spacing, {}),
|
|
57
|
+
createComponent(TSDoc$1, {
|
|
58
|
+
heading: "A specific application version to upgrade to.",
|
|
59
|
+
get children() {
|
|
60
|
+
return [createComponent(TSDocRemarks$1, { children: `The command will attempt to upgrade to the specified version. The version should be a valid semantic version string, or \`latest\` to upgrade to the latest version.` }), createComponent(TSDocDefaultValue, {
|
|
61
|
+
get type() {
|
|
62
|
+
return ReflectionKind.string;
|
|
63
|
+
},
|
|
64
|
+
defaultValue: "latest"
|
|
65
|
+
})];
|
|
66
|
+
}
|
|
67
|
+
}),
|
|
68
|
+
createComponent(InterfaceMember, {
|
|
69
|
+
name: "version",
|
|
70
|
+
optional: true,
|
|
71
|
+
type: "string"
|
|
72
|
+
})
|
|
73
|
+
];
|
|
74
|
+
}
|
|
75
|
+
}),
|
|
76
|
+
createComponent(Spacing, {}),
|
|
77
|
+
createComponent(TSDoc$1, { heading: "Handler logic for the \\`upgrade\\` command." }),
|
|
78
|
+
createComponent(FunctionDeclaration, {
|
|
79
|
+
"export": true,
|
|
80
|
+
"default": true,
|
|
81
|
+
async: true,
|
|
82
|
+
name: "handler",
|
|
83
|
+
parameters: [{
|
|
84
|
+
name: "options",
|
|
85
|
+
type: "UpgradeOptions"
|
|
86
|
+
}],
|
|
87
|
+
children: code` return;`
|
|
88
|
+
})
|
|
89
|
+
];
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
export { UpgradeCommand };
|
|
96
|
+
//# sourceMappingURL=upgrade-command.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgrade-command.mjs","names":[],"sources":["../../../../../plugin-upgrade/dist/components/upgrade-command.mjs"],"sourcesContent":["import { createComponent } from \"@alloy-js/core/jsx-runtime\";\nimport { code } from \"@alloy-js/core\";\nimport { FunctionDeclaration, InterfaceDeclaration } from \"@alloy-js/typescript\";\nimport { InterfaceMember, TypescriptFile } from \"@powerlines/plugin-alloy/typescript\";\nimport { ReflectionKind } from \"@powerlines/deepkit/vendor/type\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { TSDoc as TSDoc$1, TSDocDefaultValue, TSDocRemarks as TSDocRemarks$1 } from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { joinPaths } from \"@stryke/path\";\n\n//#region src/components/upgrade-command.tsx\n/**\n* The Upgrade command's handler wrapper for the Shell Shock project.\n*/\nfunction UpgradeCommand() {\n\tconst context = usePowerlines();\n\treturn createComponent(TypescriptFile, {\n\t\tget path() {\n\t\t\treturn joinPaths(context.entryPath, \"upgrade\", \"command.ts\");\n\t\t},\n\t\timports: {\n\t\t\t\"node:os\": [\"os\"],\n\t\t\t\"node:fs/promises\": [\"readFile\", \"writeFile\"]\n\t\t},\n\t\tbuiltinImports: { console: [\n\t\t\t\"colors\",\n\t\t\t\"writeLine\",\n\t\t\t\"success\",\n\t\t\t\"warn\",\n\t\t\t\"stripAnsi\"\n\t\t] },\n\t\tget children() {\n\t\t\treturn [\n\t\t\t\tcreateComponent(TSDoc$1, { heading: \"Options for the Upgrade command.\" }),\n\t\t\t\tcreateComponent(InterfaceDeclaration, {\n\t\t\t\t\t\"export\": true,\n\t\t\t\t\tname: \"UpgradeOptions\",\n\t\t\t\t\tget children() {\n\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\tcreateComponent(TSDoc$1, {\n\t\t\t\t\t\t\t\theading: \"Whether to upgrade to the latest version.\",\n\t\t\t\t\t\t\t\tget children() {\n\t\t\t\t\t\t\t\t\treturn [createComponent(TSDocRemarks$1, { children: `If set to \\`true\\`, the command will attempt to upgrade to the latest version. This option takes precedence over the \\`version\\` option.` }), createComponent(TSDocDefaultValue, {\n\t\t\t\t\t\t\t\t\t\tget type() {\n\t\t\t\t\t\t\t\t\t\t\treturn ReflectionKind.boolean;\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tdefaultValue: false\n\t\t\t\t\t\t\t\t\t})];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\t\t\tname: \"latest\",\n\t\t\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\t\t\ttype: \"boolean\"\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\t\t\tcreateComponent(TSDoc$1, {\n\t\t\t\t\t\t\t\theading: \"A specific application version to upgrade to.\",\n\t\t\t\t\t\t\t\tget children() {\n\t\t\t\t\t\t\t\t\treturn [createComponent(TSDocRemarks$1, { children: `The command will attempt to upgrade to the specified version. The version should be a valid semantic version string, or \\`latest\\` to upgrade to the latest version.` }), createComponent(TSDocDefaultValue, {\n\t\t\t\t\t\t\t\t\t\tget type() {\n\t\t\t\t\t\t\t\t\t\t\treturn ReflectionKind.string;\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tdefaultValue: \"latest\"\n\t\t\t\t\t\t\t\t\t})];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\t\t\tname: \"version\",\n\t\t\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\t\t\ttype: \"string\"\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcreateComponent(TSDoc$1, { heading: \"Handler logic for the \\\\`upgrade\\\\` command.\" }),\n\t\t\t\tcreateComponent(FunctionDeclaration, {\n\t\t\t\t\t\"export\": true,\n\t\t\t\t\t\"default\": true,\n\t\t\t\t\tasync: true,\n\t\t\t\t\tname: \"handler\",\n\t\t\t\t\tparameters: [{\n\t\t\t\t\t\tname: \"options\",\n\t\t\t\t\t\ttype: \"UpgradeOptions\"\n\t\t\t\t\t}],\n\t\t\t\t\tchildren: code` return;`\n\t\t\t\t})\n\t\t\t];\n\t\t}\n\t});\n}\n\n//#endregion\nexport { UpgradeCommand };\n//# sourceMappingURL=upgrade-command.mjs.map"],"mappings":";;;;;;;;;;;;;;AAcA,SAAS,iBAAiB;CACzB,MAAM,UAAU,eAAe;AAC/B,QAAO,gBAAgB,gBAAgB;EACtC,IAAI,OAAO;AACV,UAAO,UAAU,QAAQ,WAAW,WAAW,aAAa;;EAE7D,SAAS;GACR,WAAW,CAAC,KAAK;GACjB,oBAAoB,CAAC,YAAY,YAAY;GAC7C;EACD,gBAAgB,EAAE,SAAS;GAC1B;GACA;GACA;GACA;GACA;GACA,EAAE;EACH,IAAI,WAAW;AACd,UAAO;IACN,gBAAgB,SAAS,EAAE,SAAS,oCAAoC,CAAC;IACzE,gBAAgB,sBAAsB;KACrC,UAAU;KACV,MAAM;KACN,IAAI,WAAW;AACd,aAAO;OACN,gBAAgB,SAAS;QACxB,SAAS;QACT,IAAI,WAAW;AACd,gBAAO,CAAC,gBAAgB,gBAAgB,EAAE,UAAU,4IAA4I,CAAC,EAAE,gBAAgB,mBAAmB;UACrO,IAAI,OAAO;AACV,kBAAO,eAAe;;UAEvB,cAAc;UACd,CAAC,CAAC;;QAEJ,CAAC;OACF,gBAAgB,iBAAiB;QAChC,MAAM;QACN,UAAU;QACV,MAAM;QACN,CAAC;OACF,gBAAgB,SAAS,EAAE,CAAC;OAC5B,gBAAgB,SAAS;QACxB,SAAS;QACT,IAAI,WAAW;AACd,gBAAO,CAAC,gBAAgB,gBAAgB,EAAE,UAAU,wKAAwK,CAAC,EAAE,gBAAgB,mBAAmB;UACjQ,IAAI,OAAO;AACV,kBAAO,eAAe;;UAEvB,cAAc;UACd,CAAC,CAAC;;QAEJ,CAAC;OACF,gBAAgB,iBAAiB;QAChC,MAAM;QACN,UAAU;QACV,MAAM;QACN,CAAC;OACF;;KAEF,CAAC;IACF,gBAAgB,SAAS,EAAE,CAAC;IAC5B,gBAAgB,SAAS,EAAE,SAAS,gDAAgD,CAAC;IACrF,gBAAgB,qBAAqB;KACpC,UAAU;KACV,WAAW;KACX,OAAO;KACP,MAAM;KACN,YAAY,CAAC;MACZ,MAAM;MACN,MAAM;MACN,CAAC;KACF,UAAU,IAAI;KACd,CAAC;IACF;;EAEF,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_upgrade_builtin = require('./components/upgrade-builtin.cjs');
|
|
3
|
+
const require_upgrade_command = require('./components/upgrade-command.cjs');
|
|
4
|
+
require('./components/index.cjs');
|
|
5
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
|
+
let __powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
7
|
+
let __shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
|
|
8
|
+
let __stryke_path_join = require("@stryke/path/join");
|
|
9
|
+
|
|
10
|
+
//#region ../plugin-upgrade/dist/index.mjs
|
|
11
|
+
/**
|
|
12
|
+
* The Upgrade - Shell Shock plugin to add version check functionality and upgrade commands to a Shell Shock application.
|
|
13
|
+
*/
|
|
14
|
+
const plugin = (options = {}) => {
|
|
15
|
+
return {
|
|
16
|
+
name: "shell-shock:upgrade",
|
|
17
|
+
config() {
|
|
18
|
+
this.debug("Providing default configuration for the Shell Shock `upgrade` plugin.");
|
|
19
|
+
return { upgrade: options };
|
|
20
|
+
},
|
|
21
|
+
configResolved() {
|
|
22
|
+
this.debug("Adding the CLI upgrade commands to the application context.");
|
|
23
|
+
this.inputs ??= [];
|
|
24
|
+
if (this.inputs.some((input) => input.id === "upgrade")) this.info("The `upgrade` command already exists in the commands list. If you would like the upgrade command to be managed by the `@shell-shock/plugin-upgrade` package, please remove or rename the command.");
|
|
25
|
+
else this.inputs.push({
|
|
26
|
+
id: "upgrade",
|
|
27
|
+
name: "upgrade",
|
|
28
|
+
alias: ["up", "update"],
|
|
29
|
+
path: "upgrade",
|
|
30
|
+
segments: ["upgrade"],
|
|
31
|
+
title: "Upgrade",
|
|
32
|
+
description: `A command for checking and upgrading the version of the ${(0, __shell_shock_core_plugin_utils.getAppTitle)(this)}.`,
|
|
33
|
+
entry: {
|
|
34
|
+
file: (0, __stryke_path_join.joinPaths)(this.entryPath, "upgrade", "command.ts"),
|
|
35
|
+
input: { file: (0, __stryke_path_join.joinPaths)(this.entryPath, "upgrade", "command.ts") }
|
|
36
|
+
},
|
|
37
|
+
isVirtual: false
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
async prepare() {
|
|
41
|
+
this.debug("Rendering upgrade built-in and command modules for the Shell Shock `upgrade` plugin.");
|
|
42
|
+
return (0, __powerlines_plugin_alloy_render.render)(this, [(0, __alloy_js_core_jsx_runtime.createComponent)(require_upgrade_builtin.UpgradeBuiltin, {}), (0, __alloy_js_core_jsx_runtime.createComponent)(require_upgrade_command.UpgradeCommand, {})]);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
var src_default = plugin;
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
exports.src_default = src_default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { UpgradeBuiltin } from "./components/upgrade-builtin.mjs";
|
|
2
|
+
import { UpgradeCommand } from "./components/upgrade-command.mjs";
|
|
3
|
+
import "./components/index.mjs";
|
|
4
|
+
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
5
|
+
import { render } from "@powerlines/plugin-alloy/render";
|
|
6
|
+
import { getAppTitle } from "@shell-shock/core/plugin-utils";
|
|
7
|
+
import { joinPaths } from "@stryke/path/join";
|
|
8
|
+
|
|
9
|
+
//#region ../plugin-upgrade/dist/index.mjs
|
|
10
|
+
/**
|
|
11
|
+
* The Upgrade - Shell Shock plugin to add version check functionality and upgrade commands to a Shell Shock application.
|
|
12
|
+
*/
|
|
13
|
+
const plugin = (options = {}) => {
|
|
14
|
+
return {
|
|
15
|
+
name: "shell-shock:upgrade",
|
|
16
|
+
config() {
|
|
17
|
+
this.debug("Providing default configuration for the Shell Shock `upgrade` plugin.");
|
|
18
|
+
return { upgrade: options };
|
|
19
|
+
},
|
|
20
|
+
configResolved() {
|
|
21
|
+
this.debug("Adding the CLI upgrade commands to the application context.");
|
|
22
|
+
this.inputs ??= [];
|
|
23
|
+
if (this.inputs.some((input) => input.id === "upgrade")) this.info("The `upgrade` command already exists in the commands list. If you would like the upgrade command to be managed by the `@shell-shock/plugin-upgrade` package, please remove or rename the command.");
|
|
24
|
+
else this.inputs.push({
|
|
25
|
+
id: "upgrade",
|
|
26
|
+
name: "upgrade",
|
|
27
|
+
alias: ["up", "update"],
|
|
28
|
+
path: "upgrade",
|
|
29
|
+
segments: ["upgrade"],
|
|
30
|
+
title: "Upgrade",
|
|
31
|
+
description: `A command for checking and upgrading the version of the ${getAppTitle(this)}.`,
|
|
32
|
+
entry: {
|
|
33
|
+
file: joinPaths(this.entryPath, "upgrade", "command.ts"),
|
|
34
|
+
input: { file: joinPaths(this.entryPath, "upgrade", "command.ts") }
|
|
35
|
+
},
|
|
36
|
+
isVirtual: false
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
async prepare() {
|
|
40
|
+
this.debug("Rendering upgrade built-in and command modules for the Shell Shock `upgrade` plugin.");
|
|
41
|
+
return render(this, [createComponent(UpgradeBuiltin, {}), createComponent(UpgradeCommand, {})]);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
var src_default = plugin;
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
export { src_default };
|
|
49
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../plugin-upgrade/dist/index.mjs"],"sourcesContent":["import { UpgradeBuiltin } from \"./components/upgrade-builtin.mjs\";\nimport { UpgradeCommand } from \"./components/upgrade-command.mjs\";\nimport \"./components/index.mjs\";\nimport { createComponent } from \"@alloy-js/core/jsx-runtime\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { joinPaths } from \"@stryke/path/join\";\n\n//#region src/index.tsx\n/**\n* The Upgrade - Shell Shock plugin to add version check functionality and upgrade commands to a Shell Shock application.\n*/\nconst plugin = (options = {}) => {\n\treturn {\n\t\tname: \"shell-shock:upgrade\",\n\t\tconfig() {\n\t\t\tthis.debug(\"Providing default configuration for the Shell Shock `upgrade` plugin.\");\n\t\t\treturn { upgrade: options };\n\t\t},\n\t\tconfigResolved() {\n\t\t\tthis.debug(\"Adding the CLI upgrade commands to the application context.\");\n\t\t\tthis.inputs ??= [];\n\t\t\tif (this.inputs.some((input) => input.id === \"upgrade\")) this.info(\"The `upgrade` command already exists in the commands list. If you would like the upgrade command to be managed by the `@shell-shock/plugin-upgrade` package, please remove or rename the command.\");\n\t\t\telse this.inputs.push({\n\t\t\t\tid: \"upgrade\",\n\t\t\t\tname: \"upgrade\",\n\t\t\t\talias: [\"up\", \"update\"],\n\t\t\t\tpath: \"upgrade\",\n\t\t\t\tsegments: [\"upgrade\"],\n\t\t\t\ttitle: \"Upgrade\",\n\t\t\t\tdescription: `A command for checking and upgrading the version of the ${getAppTitle(this)}.`,\n\t\t\t\tentry: {\n\t\t\t\t\tfile: joinPaths(this.entryPath, \"upgrade\", \"command.ts\"),\n\t\t\t\t\tinput: { file: joinPaths(this.entryPath, \"upgrade\", \"command.ts\") }\n\t\t\t\t},\n\t\t\t\tisVirtual: false\n\t\t\t});\n\t\t},\n\t\tasync prepare() {\n\t\t\tthis.debug(\"Rendering upgrade built-in and command modules for the Shell Shock `upgrade` plugin.\");\n\t\t\treturn render(this, [createComponent(UpgradeBuiltin, {}), createComponent(UpgradeCommand, {})]);\n\t\t}\n\t};\n};\nvar src_default = plugin;\n\n//#endregion\nexport { src_default as default, plugin };\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,UAAU,UAAU,EAAE,KAAK;AAChC,QAAO;EACN,MAAM;EACN,SAAS;AACR,QAAK,MAAM,wEAAwE;AACnF,UAAO,EAAE,SAAS,SAAS;;EAE5B,iBAAiB;AAChB,QAAK,MAAM,8DAA8D;AACzE,QAAK,WAAW,EAAE;AAClB,OAAI,KAAK,OAAO,MAAM,UAAU,MAAM,OAAO,UAAU,CAAE,MAAK,KAAK,oMAAoM;OAClQ,MAAK,OAAO,KAAK;IACrB,IAAI;IACJ,MAAM;IACN,OAAO,CAAC,MAAM,SAAS;IACvB,MAAM;IACN,UAAU,CAAC,UAAU;IACrB,OAAO;IACP,aAAa,2DAA2D,YAAY,KAAK,CAAC;IAC1F,OAAO;KACN,MAAM,UAAU,KAAK,WAAW,WAAW,aAAa;KACxD,OAAO,EAAE,MAAM,UAAU,KAAK,WAAW,WAAW,aAAa,EAAE;KACnE;IACD,WAAW;IACX,CAAC;;EAEH,MAAM,UAAU;AACf,QAAK,MAAM,uFAAuF;AAClG,UAAO,OAAO,MAAM,CAAC,gBAAgB,gBAAgB,EAAE,CAAC,EAAE,gBAAgB,gBAAgB,EAAE,CAAC,CAAC,CAAC;;EAEhG;;AAEF,IAAI,cAAc"}
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Children } from "@alloy-js/core";
|
|
2
1
|
import { CommandBase, CommandOption } from "@shell-shock/core/types/command";
|
|
3
2
|
import { Context } from "@shell-shock/core/types/context";
|
|
4
3
|
import { ThemePluginResolvedConfig } from "@shell-shock/plugin-theme/types/plugin";
|
|
4
|
+
import { UpgradePluginContext, UpgradePluginOptions, UpgradePluginResolvedConfig, UpgradePluginUserConfig } from "@shell-shock/plugin-upgrade/types/plugin";
|
|
5
5
|
import { ScriptPresetContext, ScriptPresetOptions, ScriptPresetResolvedConfig, ScriptPresetUserConfig } from "@shell-shock/preset-script/types/plugin";
|
|
6
6
|
|
|
7
7
|
//#region src/types/plugin.d.ts
|
|
8
|
-
|
|
8
|
+
type CLIPresetOptions = Omit<ScriptPresetOptions, "defaultOptions"> & UpgradePluginOptions & {
|
|
9
9
|
/**
|
|
10
10
|
* The default interactive mode to apply to commands.
|
|
11
11
|
*
|
|
@@ -33,14 +33,10 @@ interface CLIPresetOptions extends Omit<ScriptPresetOptions, "defaultOptions"> {
|
|
|
33
33
|
* 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.
|
|
34
34
|
*/
|
|
35
35
|
defaultOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
type CLIPresetUserConfig = ScriptPresetUserConfig & CLIPresetOptions;
|
|
42
|
-
type CLIPresetResolvedConfig = ScriptPresetResolvedConfig & Required<Omit<CLIPresetOptions, "theme">> & Pick<ThemePluginResolvedConfig, "theme">;
|
|
43
|
-
type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = ScriptPresetContext<TResolvedConfig>;
|
|
36
|
+
};
|
|
37
|
+
type CLIPresetUserConfig = ScriptPresetUserConfig & UpgradePluginUserConfig & CLIPresetOptions;
|
|
38
|
+
type CLIPresetResolvedConfig = ScriptPresetResolvedConfig & UpgradePluginResolvedConfig & Required<Omit<CLIPresetOptions, "theme">> & Pick<ThemePluginResolvedConfig, "theme">;
|
|
39
|
+
type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = ScriptPresetContext<TResolvedConfig> & UpgradePluginContext<TResolvedConfig>;
|
|
44
40
|
//#endregion
|
|
45
41
|
export { CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig };
|
|
46
42
|
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;KAqCY,gBAAA,GAAmB,KAAK,yCAClC;;AADF;;;;;;;;;AAmCA;EAAkC,WAAA,CAAA,EAAA,OAAA,GAAA,OAAA;EAChC;;;AAGF;;;;;;;;;AAKA;;EACoD,cAAA,CAAA,EAf5C,aAe4C,EAAA,GAAA,CAAA,CAAA,OAAA,EAdjC,OAciC,EAAA,KAAA,EAdjB,WAciB,EAAA,GAdD,aAcC,EAAA,CAAA,GAAA,KAAA;CAC5B;AAApB,KAXQ,mBAAA,GAAsB,sBAW9B,GAVF,uBAUE,GATF,gBASE;AACmB,KARX,uBAAA,GAA0B,0BAQf,GAPrB,2BAOqB,GANrB,QAMqB,CANZ,IAMY,CANP,gBAMO,EAAA,OAAA,CAAA,CAAA,GALrB,IAKqB,CALhB,yBAKgB,EAAA,OAAA,CAAA;AAArB,KAHU,gBAGV,CAAA,wBAFwB,uBAExB,GAFkD,uBAElD,CAAA,GADE,mBACF,CADsB,eACtB,CAAA,GAAA,oBAAA,CAAqB,eAArB,CAAA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Children } from "@alloy-js/core";
|
|
2
1
|
import { CommandBase, CommandOption } from "@shell-shock/core/types/command";
|
|
3
2
|
import { Context } from "@shell-shock/core/types/context";
|
|
4
3
|
import { ThemePluginResolvedConfig } from "@shell-shock/plugin-theme/types/plugin";
|
|
4
|
+
import { UpgradePluginContext, UpgradePluginOptions, UpgradePluginResolvedConfig, UpgradePluginUserConfig } from "@shell-shock/plugin-upgrade/types/plugin";
|
|
5
5
|
import { ScriptPresetContext, ScriptPresetOptions, ScriptPresetResolvedConfig, ScriptPresetUserConfig } from "@shell-shock/preset-script/types/plugin";
|
|
6
6
|
|
|
7
7
|
//#region src/types/plugin.d.ts
|
|
8
|
-
|
|
8
|
+
type CLIPresetOptions = Omit<ScriptPresetOptions, "defaultOptions"> & UpgradePluginOptions & {
|
|
9
9
|
/**
|
|
10
10
|
* The default interactive mode to apply to commands.
|
|
11
11
|
*
|
|
@@ -33,14 +33,10 @@ interface CLIPresetOptions extends Omit<ScriptPresetOptions, "defaultOptions"> {
|
|
|
33
33
|
* 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.
|
|
34
34
|
*/
|
|
35
35
|
defaultOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
type CLIPresetUserConfig = ScriptPresetUserConfig & CLIPresetOptions;
|
|
42
|
-
type CLIPresetResolvedConfig = ScriptPresetResolvedConfig & Required<Omit<CLIPresetOptions, "theme">> & Pick<ThemePluginResolvedConfig, "theme">;
|
|
43
|
-
type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = ScriptPresetContext<TResolvedConfig>;
|
|
36
|
+
};
|
|
37
|
+
type CLIPresetUserConfig = ScriptPresetUserConfig & UpgradePluginUserConfig & CLIPresetOptions;
|
|
38
|
+
type CLIPresetResolvedConfig = ScriptPresetResolvedConfig & UpgradePluginResolvedConfig & Required<Omit<CLIPresetOptions, "theme">> & Pick<ThemePluginResolvedConfig, "theme">;
|
|
39
|
+
type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = ScriptPresetContext<TResolvedConfig> & UpgradePluginContext<TResolvedConfig>;
|
|
44
40
|
//#endregion
|
|
45
41
|
export { CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig };
|
|
46
42
|
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;KAqCY,gBAAA,GAAmB,KAAK,yCAClC;;AADF;;;;;;;;;AAmCA;EAAkC,WAAA,CAAA,EAAA,OAAA,GAAA,OAAA;EAChC;;;AAGF;;;;;;;;;AAKA;;EACoD,cAAA,CAAA,EAf5C,aAe4C,EAAA,GAAA,CAAA,CAAA,OAAA,EAdjC,OAciC,EAAA,KAAA,EAdjB,WAciB,EAAA,GAdD,aAcC,EAAA,CAAA,GAAA,KAAA;CAC5B;AAApB,KAXQ,mBAAA,GAAsB,sBAW9B,GAVF,uBAUE,GATF,gBASE;AACmB,KARX,uBAAA,GAA0B,0BAQf,GAPrB,2BAOqB,GANrB,QAMqB,CANZ,IAMY,CANP,gBAMO,EAAA,OAAA,CAAA,CAAA,GALrB,IAKqB,CALhB,yBAKgB,EAAA,OAAA,CAAA;AAArB,KAHU,gBAGV,CAAA,wBAFwB,uBAExB,GAFkD,uBAElD,CAAA,GADE,mBACF,CADsB,eACtB,CAAA,GAAA,oBAAA,CAAqB,eAArB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/preset-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Shell Shock plugin to generate source code given a list design tokens.",
|
|
6
6
|
"repository": {
|
|
@@ -181,17 +181,17 @@
|
|
|
181
181
|
"dependencies": {
|
|
182
182
|
"@alloy-js/core": "0.23.0-dev.8",
|
|
183
183
|
"@alloy-js/typescript": "0.23.0-dev.4",
|
|
184
|
-
"@powerlines/deepkit": "^0.6.
|
|
185
|
-
"@powerlines/plugin-alloy": "^0.23.
|
|
186
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
187
|
-
"@shell-shock/core": "^0.8.
|
|
188
|
-
"@shell-shock/plugin-theme": "^0.2.
|
|
189
|
-
"@shell-shock/preset-script": "^0.6.
|
|
184
|
+
"@powerlines/deepkit": "^0.6.65",
|
|
185
|
+
"@powerlines/plugin-alloy": "^0.23.15",
|
|
186
|
+
"@powerlines/plugin-plugin": "^0.12.236",
|
|
187
|
+
"@shell-shock/core": "^0.8.10",
|
|
188
|
+
"@shell-shock/plugin-theme": "^0.2.1",
|
|
189
|
+
"@shell-shock/preset-script": "^0.6.9",
|
|
190
190
|
"@stryke/path": "0.26.6",
|
|
191
191
|
"@stryke/string-format": "^0.14.2",
|
|
192
192
|
"cfonts": "^3.3.1",
|
|
193
|
-
"defu": "
|
|
194
|
-
"powerlines": "^0.38.
|
|
193
|
+
"defu": "6.1.4",
|
|
194
|
+
"powerlines": "^0.38.52"
|
|
195
195
|
},
|
|
196
196
|
"devDependencies": {
|
|
197
197
|
"@babel/core": "^7.29.0",
|
|
@@ -221,5 +221,5 @@
|
|
|
221
221
|
"./package.json": "./package.json"
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
|
-
"gitHead": "
|
|
224
|
+
"gitHead": "ba4e6ba921fb77de5be8950f02ea798752b61450"
|
|
225
225
|
}
|