@shell-shock/plugin-upgrade 0.1.46 → 0.1.48
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/index.cjs +1 -0
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/dist/types/env.cjs +13 -0
- package/dist/types/env.mjs +12 -1
- package/dist/types/env.mjs.map +1 -0
- package/dist/types/index.cjs +7 -1
- package/dist/types/index.mjs +3 -2
- package/dist/types/package-manager.cjs +11 -1
- package/dist/types/package-manager.mjs +10 -1
- package/dist/types/package-manager.mjs.map +1 -1
- package/dist/types/plugin.cjs +75 -0
- package/dist/types/plugin.mjs +71 -1
- package/dist/types/plugin.mjs.map +1 -0
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport defu from \"defu\";\nimport type { Plugin } from \"powerlines\";\nimport { UpgradeBuiltin, UpgradeCommand } from \"./components\";\nimport type {\n UpgradePluginContext,\n UpgradePluginOptions\n} from \"./types/plugin\";\n\n/**\n * The Upgrade - Shell Shock plugin to add version check functionality and upgrade commands to a Shell Shock application.\n */\nexport const plugin = <\n TContext extends UpgradePluginContext = UpgradePluginContext\n>(\n options: UpgradePluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"shell-shock:upgrade\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `upgrade` plugin.\"\n );\n\n return {\n upgrade: defu(\n {\n command: {\n name: isSetString(options.command) ? options.command : \"upgrade\"\n }\n },\n options,\n {\n type: \"confirm\",\n staleTime: 36 * 60 * 60 * 1000 // 36 hours\n }\n ),\n env: {\n types:\n \"@shell-shock/plugin-upgrade/types/env#ShellShockUpgradePluginEnv\",\n validate: false\n }\n };\n },\n configResolved() {\n this.debug(\"Adding the CLI upgrade commands to the application context.\");\n\n this.inputs ??= [];\n if (\n this.inputs.some(input => input.id === this.config.upgrade.command.name)\n ) {\n this.info(\n \"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 );\n } else {\n this.inputs.push({\n id: this.config.upgrade.command.name,\n alias: [\"up\", \"update\"],\n path: this.config.upgrade.command.name,\n segments: [this.config.upgrade.command.name],\n title: \"Upgrade\",\n icon: \"🖒\",\n tags: [\"Utility\"],\n description: `A command for checking and upgrading the version of the ${getAppTitle(\n this,\n true\n )} command-line interface application.`,\n entry: {\n file: joinPaths(this.entryPath, \"upgrade\", \"index.ts\"),\n input: {\n file: joinPaths(this.entryPath, \"upgrade\", \"command.ts\")\n }\n },\n isVirtual: false,\n ...this.config.upgrade.command\n });\n }\n },\n async prepare() {\n this.debug(\n \"Rendering upgrade built-in and command modules for the Shell Shock `upgrade` plugin.\"\n );\n\n return render(\n this,\n <>\n <UpgradeBuiltin />\n <UpgradeCommand />\n </>\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;AA+BA,MAAO,UAA4E,UAA0B,EAAW,KAAA;AACtH,QAAA;EACF,MAAO;EACL,SAAS;AACV,QAAA,MAAA,wEAAA;AACC,UAAS;IACR,SAAO,KAAY,EACb,SAAA,EACE,MAAM,YAAa,QAAC,QAAA,GAAA,QAAA,UAAA,WACpB,EACL,EAAK,SAAK;KACP,MAAA;KACF,WAAA,OAAA,KAAA;;IAED,KAAO;KACL,OAAS;KACP,UAAA;KACD;IACF;;EAEH,iBAAO;AACL,QAAI,MAAO,8DAAA;AACX,QAAI,WAAA,EAAA;AACJ,OAAI,KAAE,OAAO,MAAQ,UAAA,MAAA,OAAA,KAAA,OAAA,QAAA,QAAA,KAAA,CACnB,MAAI,KAAA,oMAAqC;OAEzC,MAAC,OAAA,KAAA;IACD,IAAK,KAAA,OAAA,QAAA,QAAA;IACH,OAAK,CAAA,MAAA,SAAA;IACL,MAAI,KAAM,OAAM,QAAO,QAAQ;IAC/B,UAAU,CAAA,KAAA,OAAA,QAAA,QAAA,KAAA;IACZ,OAAA;IACD,MAAA;IACF,MAAA,CAAA,UAAA;IACD,aAAiB,2DAAA,YAAA,MAAA,KAAA,CAAA;IACX,OAAO;;KAEN,OAAQ,EACV,MAAA,UAAA,KAAA,WAAA,WAAA,aAAA,EACI;KACL;IACA,WAAS;IACP,
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport defu from \"defu\";\nimport type { Plugin } from \"powerlines\";\nimport { UpgradeBuiltin, UpgradeCommand } from \"./components\";\nimport type {\n UpgradePluginContext,\n UpgradePluginOptions\n} from \"./types/plugin\";\n\n/**\n * The Upgrade - Shell Shock plugin to add version check functionality and upgrade commands to a Shell Shock application.\n */\nexport const plugin = <\n TContext extends UpgradePluginContext = UpgradePluginContext\n>(\n options: UpgradePluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"shell-shock:upgrade\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `upgrade` plugin.\"\n );\n\n return {\n upgrade: defu(\n {\n command: {\n name: isSetString(options.command) ? options.command : \"upgrade\"\n }\n },\n options,\n {\n type: \"confirm\",\n staleTime: 36 * 60 * 60 * 1000 // 36 hours\n }\n ),\n env: {\n types:\n \"@shell-shock/plugin-upgrade/types/env#ShellShockUpgradePluginEnv\",\n validate: false\n }\n };\n },\n configResolved() {\n this.debug(\"Adding the CLI upgrade commands to the application context.\");\n\n this.inputs ??= [];\n if (\n this.inputs.some(input => input.id === this.config.upgrade.command.name)\n ) {\n this.info(\n \"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 );\n } else {\n this.inputs.push({\n id: this.config.upgrade.command.name,\n alias: [\"up\", \"update\"],\n path: this.config.upgrade.command.name,\n segments: [this.config.upgrade.command.name],\n title: \"Upgrade\",\n icon: \"🖒\",\n tags: [\"Utility\"],\n description: `A command for checking and upgrading the version of the ${getAppTitle(\n this,\n true\n )} command-line interface application.`,\n entry: {\n file: joinPaths(this.entryPath, \"upgrade\", \"index.ts\"),\n input: {\n file: joinPaths(this.entryPath, \"upgrade\", \"command.ts\")\n }\n },\n isVirtual: false,\n source: \"upgrade-plugin\",\n ...this.config.upgrade.command\n });\n }\n },\n async prepare() {\n this.debug(\n \"Rendering upgrade built-in and command modules for the Shell Shock `upgrade` plugin.\"\n );\n\n return render(\n this,\n <>\n <UpgradeBuiltin />\n <UpgradeCommand />\n </>\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;AA+BA,MAAO,UAA4E,UAA0B,EAAW,KAAA;AACtH,QAAA;EACF,MAAO;EACL,SAAS;AACV,QAAA,MAAA,wEAAA;AACC,UAAS;IACR,SAAO,KAAY,EACb,SAAA,EACE,MAAM,YAAa,QAAC,QAAA,GAAA,QAAA,UAAA,WACpB,EACL,EAAK,SAAK;KACP,MAAA;KACF,WAAA,OAAA,KAAA;;IAED,KAAO;KACL,OAAS;KACP,UAAA;KACD;IACF;;EAEH,iBAAO;AACL,QAAI,MAAO,8DAAA;AACX,QAAI,WAAA,EAAA;AACJ,OAAI,KAAE,OAAO,MAAQ,UAAA,MAAA,OAAA,KAAA,OAAA,QAAA,QAAA,KAAA,CACnB,MAAI,KAAA,oMAAqC;OAEzC,MAAC,OAAA,KAAA;IACD,IAAK,KAAA,OAAA,QAAA,QAAA;IACH,OAAK,CAAA,MAAA,SAAA;IACL,MAAI,KAAM,OAAM,QAAO,QAAQ;IAC/B,UAAU,CAAA,KAAA,OAAA,QAAA,QAAA,KAAA;IACZ,OAAA;IACD,MAAA;IACF,MAAA,CAAA,UAAA;IACD,aAAiB,2DAAA,YAAA,MAAA,KAAA,CAAA;IACX,OAAO;;KAEN,OAAQ,EACV,MAAA,UAAA,KAAA,WAAA,WAAA,aAAA,EACI;KACL;IACA,WAAS;IACP,QAAM;IACP,GAAA,KAAA,OAAA,QAAA;IACD,CAAA;;EAGJ,MAAM,UAAS;AACb,QAAI,MAAM,uFAAgC;AAC1C,UAAI,OAAU,MAAM,CAAA,gBAAe,gBAAa,EAAA,CAAA,EAAA,gBAAA,gBAAA,EAAA,CAAA,CAAA,CAAA;;EAEnD"}
|
package/dist/types/env.cjs
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
//#region src/types/env.ts
|
|
4
|
+
const __ΩShellShockUpgradePluginEnv = [
|
|
5
|
+
"SKIP_VERSION_CHECK",
|
|
6
|
+
true,
|
|
7
|
+
"An environment variable that can be set to skip the version check when determining if a check for updates is required. If this variable is set to any value, the `isCheckForUpdatesRequired` function will return `false`, indicating that a check for updates is not required. This can be useful in CI environments or other non-interactive contexts where you want to avoid performing a version check, which may involve file system operations or network requests. By setting this environment variable, you can ensure that the upgrade process proceeds without checking for updates, which can help speed up the process in certain scenarios.",
|
|
8
|
+
"ShellShockUpgradePluginEnv",
|
|
9
|
+
"P!)4!8>\"?#Mw$y"
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
exports.__ΩShellShockUpgradePluginEnv = __ΩShellShockUpgradePluginEnv;
|
package/dist/types/env.mjs
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/types/env.ts
|
|
2
|
+
const __ΩShellShockUpgradePluginEnv = [
|
|
3
|
+
"SKIP_VERSION_CHECK",
|
|
4
|
+
true,
|
|
5
|
+
"An environment variable that can be set to skip the version check when determining if a check for updates is required. If this variable is set to any value, the `isCheckForUpdatesRequired` function will return `false`, indicating that a check for updates is not required. This can be useful in CI environments or other non-interactive contexts where you want to avoid performing a version check, which may involve file system operations or network requests. By setting this environment variable, you can ensure that the upgrade process proceeds without checking for updates, which can help speed up the process in certain scenarios.",
|
|
6
|
+
"ShellShockUpgradePluginEnv",
|
|
7
|
+
"P!)4!8>\"?#Mw$y"
|
|
8
|
+
];
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { __ΩShellShockUpgradePluginEnv };
|
|
12
|
+
//# sourceMappingURL=env.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.mjs","names":[],"sources":["../../src/types/env.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n// eslint-disable-next-line ts/consistent-type-imports\nimport { ShellShockEnv } from \"@shell-shock/core/types/env\";\n\nexport interface ShellShockUpgradePluginEnv extends ShellShockEnv {\n /**\n * An environment variable that can be set to skip the version check when determining if a check for updates is required. If this variable is set to any value, the `isCheckForUpdatesRequired` function will return `false`, indicating that a check for updates is not required. This can be useful in CI environments or other non-interactive contexts where you want to avoid performing a version check, which may involve file system operations or network requests. By setting this environment variable, you can ensure that the upgrade process proceeds without checking for updates, which can help speed up the process in certain scenarios.\n *\n * @defaultValue false\n */\n SKIP_VERSION_CHECK?: boolean;\n}\n"],"mappings":""}
|
package/dist/types/index.cjs
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_types_plugin = require('./plugin.cjs');
|
|
2
3
|
const require_types_package_manager = require('./package-manager.cjs');
|
|
3
4
|
|
|
4
5
|
exports.PACKAGE_MANAGERS = require_types_package_manager.PACKAGE_MANAGERS;
|
|
5
|
-
exports.PACKAGE_MANAGER_LOCKFILE_MAP = require_types_package_manager.PACKAGE_MANAGER_LOCKFILE_MAP;
|
|
6
|
+
exports.PACKAGE_MANAGER_LOCKFILE_MAP = require_types_package_manager.PACKAGE_MANAGER_LOCKFILE_MAP;
|
|
7
|
+
exports.__ΩPackageManager = require_types_package_manager.__ΩPackageManager;
|
|
8
|
+
exports.__ΩUpgradePluginContext = require_types_plugin.__ΩUpgradePluginContext;
|
|
9
|
+
exports.__ΩUpgradePluginOptions = require_types_plugin.__ΩUpgradePluginOptions;
|
|
10
|
+
exports.__ΩUpgradePluginResolvedConfig = require_types_plugin.__ΩUpgradePluginResolvedConfig;
|
|
11
|
+
exports.__ΩUpgradePluginUserConfig = require_types_plugin.__ΩUpgradePluginUserConfig;
|
package/dist/types/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __ΩUpgradePluginContext, __ΩUpgradePluginOptions, __ΩUpgradePluginResolvedConfig, __ΩUpgradePluginUserConfig } from "./plugin.mjs";
|
|
2
|
+
import { PACKAGE_MANAGERS, PACKAGE_MANAGER_LOCKFILE_MAP, __ΩPackageManager } from "./package-manager.mjs";
|
|
2
3
|
|
|
3
|
-
export { PACKAGE_MANAGERS, PACKAGE_MANAGER_LOCKFILE_MAP };
|
|
4
|
+
export { PACKAGE_MANAGERS, PACKAGE_MANAGER_LOCKFILE_MAP, __ΩPackageManager, __ΩUpgradePluginContext, __ΩUpgradePluginOptions, __ΩUpgradePluginResolvedConfig, __ΩUpgradePluginUserConfig };
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
3
|
//#region src/types/package-manager.ts
|
|
4
|
+
const __ΩPackageManager = [
|
|
5
|
+
"npm",
|
|
6
|
+
"yarn",
|
|
7
|
+
"pnpm",
|
|
8
|
+
"deno",
|
|
9
|
+
"bun",
|
|
10
|
+
"PackageManager",
|
|
11
|
+
"P.!.\".#.$.%Jw&y"
|
|
12
|
+
];
|
|
4
13
|
const PACKAGE_MANAGERS = [
|
|
5
14
|
"npm",
|
|
6
15
|
"yarn",
|
|
@@ -18,4 +27,5 @@ const PACKAGE_MANAGER_LOCKFILE_MAP = {
|
|
|
18
27
|
|
|
19
28
|
//#endregion
|
|
20
29
|
exports.PACKAGE_MANAGERS = PACKAGE_MANAGERS;
|
|
21
|
-
exports.PACKAGE_MANAGER_LOCKFILE_MAP = PACKAGE_MANAGER_LOCKFILE_MAP;
|
|
30
|
+
exports.PACKAGE_MANAGER_LOCKFILE_MAP = PACKAGE_MANAGER_LOCKFILE_MAP;
|
|
31
|
+
exports.__ΩPackageManager = __ΩPackageManager;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
//#region src/types/package-manager.ts
|
|
2
|
+
const __ΩPackageManager = [
|
|
3
|
+
"npm",
|
|
4
|
+
"yarn",
|
|
5
|
+
"pnpm",
|
|
6
|
+
"deno",
|
|
7
|
+
"bun",
|
|
8
|
+
"PackageManager",
|
|
9
|
+
"P.!.\".#.$.%Jw&y"
|
|
10
|
+
];
|
|
2
11
|
const PACKAGE_MANAGERS = [
|
|
3
12
|
"npm",
|
|
4
13
|
"yarn",
|
|
@@ -15,5 +24,5 @@ const PACKAGE_MANAGER_LOCKFILE_MAP = {
|
|
|
15
24
|
};
|
|
16
25
|
|
|
17
26
|
//#endregion
|
|
18
|
-
export { PACKAGE_MANAGERS, PACKAGE_MANAGER_LOCKFILE_MAP };
|
|
27
|
+
export { PACKAGE_MANAGERS, PACKAGE_MANAGER_LOCKFILE_MAP, __ΩPackageManager };
|
|
19
28
|
//# sourceMappingURL=package-manager.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-manager.mjs","names":[],"sources":["../../src/types/package-manager.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport type PackageManager = \"npm\" | \"yarn\" | \"pnpm\" | \"deno\" | \"bun\";\n\nexport const PACKAGE_MANAGERS: readonly PackageManager[] = [\n \"npm\",\n \"yarn\",\n \"pnpm\",\n \"deno\",\n \"bun\"\n] as const;\n\nexport const PACKAGE_MANAGER_LOCKFILE_MAP: Record<string, PackageManager> = {\n \"package-lock\": \"npm\",\n yarn: \"yarn\",\n \"pnpm-lock\": \"pnpm\",\n deno: \"deno\",\n bun: \"bun\"\n} as const;\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"package-manager.mjs","names":[],"sources":["../../src/types/package-manager.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport type PackageManager = \"npm\" | \"yarn\" | \"pnpm\" | \"deno\" | \"bun\";\n\nexport const PACKAGE_MANAGERS: readonly PackageManager[] = [\n \"npm\",\n \"yarn\",\n \"pnpm\",\n \"deno\",\n \"bun\"\n] as const;\n\nexport const PACKAGE_MANAGER_LOCKFILE_MAP: Record<string, PackageManager> = {\n \"package-lock\": \"npm\",\n yarn: \"yarn\",\n \"pnpm-lock\": \"pnpm\",\n deno: \"deno\",\n bun: \"bun\"\n} as const;\n"],"mappings":";;;;;;;;;;;CAoBA;CACG;CACA;CACA;CACA;CACF;AACD,MAAU,+BAAA;;CAEV,MAAO;CACJ,aAAc;CACf,MAAO;CACN,KAAK;CACP"}
|
package/dist/types/plugin.cjs
CHANGED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
//#region src/types/plugin.ts
|
|
4
|
+
const __ΩPartial = [
|
|
5
|
+
"T",
|
|
6
|
+
"Partial",
|
|
7
|
+
"l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
|
|
8
|
+
];
|
|
9
|
+
const __ΩRequired = [
|
|
10
|
+
"T",
|
|
11
|
+
"Required",
|
|
12
|
+
"l+e#!e\"!fRb!Pde\"!gN##w\"y"
|
|
13
|
+
];
|
|
14
|
+
const __ΩOmit = [
|
|
15
|
+
"T",
|
|
16
|
+
"K",
|
|
17
|
+
() => __ΩPick,
|
|
18
|
+
() => __ΩExclude,
|
|
19
|
+
"Omit",
|
|
20
|
+
"b!b\"e!!e!!ge!\"o$#o##w%y"
|
|
21
|
+
];
|
|
22
|
+
const __ΩPick = [
|
|
23
|
+
"T",
|
|
24
|
+
"K",
|
|
25
|
+
"Pick",
|
|
26
|
+
"l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
|
|
27
|
+
];
|
|
28
|
+
const __ΩExclude = [
|
|
29
|
+
"T",
|
|
30
|
+
"U",
|
|
31
|
+
"Exclude",
|
|
32
|
+
"l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
|
|
33
|
+
];
|
|
34
|
+
const __ΩUpgradePluginOptions = [
|
|
35
|
+
"staleTime",
|
|
36
|
+
60,
|
|
37
|
+
"The time in milliseconds after which previously retrieved version data is considered stale.",
|
|
38
|
+
() => __ΩPartial,
|
|
39
|
+
"command",
|
|
40
|
+
"upgrade",
|
|
41
|
+
"Should the plugin add the `upgrade` command?",
|
|
42
|
+
"UpgradePluginOptions",
|
|
43
|
+
"P'4!8>\"?#P!o$\"&J4%8>&?'Mw(y"
|
|
44
|
+
];
|
|
45
|
+
const __ΩUpgradePluginUserConfig = [
|
|
46
|
+
() => __ΩUpgradePluginOptions,
|
|
47
|
+
"upgrade",
|
|
48
|
+
"Resolved upgrade configuration for the plugin.",
|
|
49
|
+
"UpgradePluginUserConfig",
|
|
50
|
+
"P!Pn!4\"?#MKw$y"
|
|
51
|
+
];
|
|
52
|
+
const __ΩUpgradePluginResolvedConfig = [
|
|
53
|
+
() => __ΩRequired,
|
|
54
|
+
() => __ΩOmit,
|
|
55
|
+
() => __ΩUpgradePluginOptions,
|
|
56
|
+
"command",
|
|
57
|
+
"command",
|
|
58
|
+
"Resolved command configuration for the upgrade command.",
|
|
59
|
+
"upgrade",
|
|
60
|
+
"Resolved upgrade configuration for the plugin.",
|
|
61
|
+
"UpgradePluginResolvedConfig",
|
|
62
|
+
"P!PPn#.$o\"#o!\"P!4%?&MK4'?(MKw)y"
|
|
63
|
+
];
|
|
64
|
+
const __ΩUpgradePluginContext = [
|
|
65
|
+
() => __ΩUpgradePluginResolvedConfig,
|
|
66
|
+
"TResolvedConfig",
|
|
67
|
+
"UpgradePluginContext",
|
|
68
|
+
"n!c\"!w#y"
|
|
69
|
+
];
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
exports.__ΩUpgradePluginContext = __ΩUpgradePluginContext;
|
|
73
|
+
exports.__ΩUpgradePluginOptions = __ΩUpgradePluginOptions;
|
|
74
|
+
exports.__ΩUpgradePluginResolvedConfig = __ΩUpgradePluginResolvedConfig;
|
|
75
|
+
exports.__ΩUpgradePluginUserConfig = __ΩUpgradePluginUserConfig;
|
package/dist/types/plugin.mjs
CHANGED
|
@@ -1 +1,71 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/types/plugin.ts
|
|
2
|
+
const __ΩPartial = [
|
|
3
|
+
"T",
|
|
4
|
+
"Partial",
|
|
5
|
+
"l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
|
|
6
|
+
];
|
|
7
|
+
const __ΩRequired = [
|
|
8
|
+
"T",
|
|
9
|
+
"Required",
|
|
10
|
+
"l+e#!e\"!fRb!Pde\"!gN##w\"y"
|
|
11
|
+
];
|
|
12
|
+
const __ΩOmit = [
|
|
13
|
+
"T",
|
|
14
|
+
"K",
|
|
15
|
+
() => __ΩPick,
|
|
16
|
+
() => __ΩExclude,
|
|
17
|
+
"Omit",
|
|
18
|
+
"b!b\"e!!e!!ge!\"o$#o##w%y"
|
|
19
|
+
];
|
|
20
|
+
const __ΩPick = [
|
|
21
|
+
"T",
|
|
22
|
+
"K",
|
|
23
|
+
"Pick",
|
|
24
|
+
"l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
|
|
25
|
+
];
|
|
26
|
+
const __ΩExclude = [
|
|
27
|
+
"T",
|
|
28
|
+
"U",
|
|
29
|
+
"Exclude",
|
|
30
|
+
"l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
|
|
31
|
+
];
|
|
32
|
+
const __ΩUpgradePluginOptions = [
|
|
33
|
+
"staleTime",
|
|
34
|
+
60,
|
|
35
|
+
"The time in milliseconds after which previously retrieved version data is considered stale.",
|
|
36
|
+
() => __ΩPartial,
|
|
37
|
+
"command",
|
|
38
|
+
"upgrade",
|
|
39
|
+
"Should the plugin add the `upgrade` command?",
|
|
40
|
+
"UpgradePluginOptions",
|
|
41
|
+
"P'4!8>\"?#P!o$\"&J4%8>&?'Mw(y"
|
|
42
|
+
];
|
|
43
|
+
const __ΩUpgradePluginUserConfig = [
|
|
44
|
+
() => __ΩUpgradePluginOptions,
|
|
45
|
+
"upgrade",
|
|
46
|
+
"Resolved upgrade configuration for the plugin.",
|
|
47
|
+
"UpgradePluginUserConfig",
|
|
48
|
+
"P!Pn!4\"?#MKw$y"
|
|
49
|
+
];
|
|
50
|
+
const __ΩUpgradePluginResolvedConfig = [
|
|
51
|
+
() => __ΩRequired,
|
|
52
|
+
() => __ΩOmit,
|
|
53
|
+
() => __ΩUpgradePluginOptions,
|
|
54
|
+
"command",
|
|
55
|
+
"command",
|
|
56
|
+
"Resolved command configuration for the upgrade command.",
|
|
57
|
+
"upgrade",
|
|
58
|
+
"Resolved upgrade configuration for the plugin.",
|
|
59
|
+
"UpgradePluginResolvedConfig",
|
|
60
|
+
"P!PPn#.$o\"#o!\"P!4%?&MK4'?(MKw)y"
|
|
61
|
+
];
|
|
62
|
+
const __ΩUpgradePluginContext = [
|
|
63
|
+
() => __ΩUpgradePluginResolvedConfig,
|
|
64
|
+
"TResolvedConfig",
|
|
65
|
+
"UpgradePluginContext",
|
|
66
|
+
"n!c\"!w#y"
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
//#endregion
|
|
70
|
+
export { __ΩUpgradePluginContext, __ΩUpgradePluginOptions, __ΩUpgradePluginResolvedConfig, __ΩUpgradePluginUserConfig };
|
|
71
|
+
//# sourceMappingURL=plugin.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.mjs","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type {\n CommandConfig,\n Context,\n ResolvedConfig,\n UserConfig\n} from \"@shell-shock/core\";\nimport type { RequiredKeys } from \"@stryke/types/base\";\n\nexport interface UpgradePluginOptions {\n /**\n * The time in milliseconds after which previously retrieved version data is considered stale.\n *\n * @remarks\n * This field will control how often the application will check for new versions. If set, the application will check for new versions at the specified interval and notify the user if an update is available. If set to `-1`, the application will only check for updates when the command is executed.\n *\n * @defaultValue 2 * 60 * 60 * 1000 (2 hours)\n */\n staleTime?: number;\n\n /**\n * Should the plugin add the `upgrade` command?\n *\n * @remarks\n * This can be set to a string to specify a custom command name for the `upgrade` command or an object to override the default command configuration. By default, the command name will be `\"upgrade\"`.\n *\n * @defaultValue \"upgrade\"\n */\n command?: Partial<CommandConfig> | string;\n}\n\nexport type UpgradePluginUserConfig = UserConfig & {\n /**\n * Resolved upgrade configuration for the plugin.\n */\n upgrade: UpgradePluginOptions;\n};\n\nexport type UpgradePluginResolvedConfig = ResolvedConfig & {\n /**\n * Resolved upgrade configuration for the plugin.\n */\n upgrade: Required<Omit<UpgradePluginOptions, \"command\">> & {\n /**\n * Resolved command configuration for the upgrade command.\n */\n command: RequiredKeys<Partial<CommandConfig>, \"name\">;\n };\n};\n\nexport type UpgradePluginContext<\n TResolvedConfig extends UpgradePluginResolvedConfig =\n UpgradePluginResolvedConfig\n> = Context<TResolvedConfig>;\n"],"mappings":";AAAA,MAAM,aAAa;CAAC;CAAK;CAAW;CAA2B;;;;;;AAE/D,MAAM,UAAU;CAAC;CAAG;OAAM;OAAiB;CAAA;CAAA;CAAA;;;;;;;AAE3C,MAAM,aAAS;CAAA;CAAS;CAAG;CAAY;CAA2B;AAClE,MAAI,0BAA4B;CAAC;CAAU;CAAO;OAAiB;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEnE,MAAK,6BAA0B;OAAA;CAAoC;CAAW;CAAA;CAAA;CAAA;AAE9E,MAAC,iCAAkC;OAAA;OAAc;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEjD,MAAC,0BAA+B;OAAO;CAA4B;CAAM;CAAA;CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/plugin-upgrade",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.48",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Shell Shock plugin to manage upgrading the local application's version.",
|
|
6
6
|
"keywords": [
|
|
@@ -167,19 +167,19 @@
|
|
|
167
167
|
"dependencies": {
|
|
168
168
|
"@alloy-js/core": "0.23.0-dev.8",
|
|
169
169
|
"@alloy-js/typescript": "0.23.0-dev.4",
|
|
170
|
-
"@powerlines/deepkit": "^0.
|
|
171
|
-
"@powerlines/plugin-alloy": "^0.26.
|
|
172
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
173
|
-
"@shell-shock/core": "^0.17.
|
|
170
|
+
"@powerlines/deepkit": "^0.8.0",
|
|
171
|
+
"@powerlines/plugin-alloy": "^0.26.15",
|
|
172
|
+
"@powerlines/plugin-plugin": "^0.12.347",
|
|
173
|
+
"@shell-shock/core": "^0.17.3",
|
|
174
174
|
"@stryke/path": "^0.27.4",
|
|
175
175
|
"@stryke/type-checks": "^0.6.1",
|
|
176
176
|
"@stryke/types": "^0.11.3",
|
|
177
177
|
"defu": "^6.1.7",
|
|
178
|
-
"powerlines": "^0.42.
|
|
178
|
+
"powerlines": "^0.42.37"
|
|
179
179
|
},
|
|
180
180
|
"devDependencies": {
|
|
181
|
-
"@powerlines/plugin-deepkit": "^0.11.
|
|
182
|
-
"@types/node": "^25.
|
|
181
|
+
"@powerlines/plugin-deepkit": "^0.11.277",
|
|
182
|
+
"@types/node": "^25.6.0"
|
|
183
183
|
},
|
|
184
184
|
"publishConfig": {
|
|
185
185
|
"access": "public",
|
|
@@ -196,5 +196,5 @@
|
|
|
196
196
|
"./package.json": "./package.json"
|
|
197
197
|
}
|
|
198
198
|
},
|
|
199
|
-
"gitHead": "
|
|
199
|
+
"gitHead": "d6ec6746792a83206915332c4eb87c9da70a5148"
|
|
200
200
|
}
|