@powerlines/core 0.2.22 → 0.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -1
- package/dist/constants/commands.d.cts.map +1 -1
- package/dist/constants/commands.d.mts.map +1 -1
- package/dist/constants/environments.d.cts.map +1 -1
- package/dist/constants/environments.d.mts.map +1 -1
- package/dist/constants/fs.d.cts.map +1 -1
- package/dist/constants/fs.d.mts.map +1 -1
- package/dist/constants/hooks.d.cts.map +1 -1
- package/dist/constants/hooks.d.mts.map +1 -1
- package/dist/constants/index.cjs +1 -0
- package/dist/constants/meta.d.cts.map +1 -1
- package/dist/constants/meta.d.mts.map +1 -1
- package/dist/constants/plugin.d.cts.map +1 -1
- package/dist/constants/plugin.d.mts.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.d.mts +0 -2
- package/dist/lib/config.cjs +18 -17
- package/dist/lib/config.d.cts.map +1 -1
- package/dist/lib/config.d.mts.map +1 -1
- package/dist/lib/config.mjs +3 -3
- package/dist/lib/config.mjs.map +1 -1
- package/dist/lib/entry.cjs +28 -27
- package/dist/lib/entry.d.cts.map +1 -1
- package/dist/lib/entry.d.mts +0 -1
- package/dist/lib/entry.d.mts.map +1 -1
- package/dist/lib/entry.mjs.map +1 -1
- package/dist/lib/index.cjs +1 -0
- package/dist/lib/index.d.mts +0 -2
- package/dist/lib/logger.cjs +14 -13
- package/dist/lib/logger.d.cts.map +1 -1
- package/dist/lib/logger.d.mts +0 -1
- package/dist/lib/logger.d.mts.map +1 -1
- package/dist/lib/unplugin/helpers.cjs +4 -3
- package/dist/lib/unplugin/helpers.d.cts +0 -1
- package/dist/lib/unplugin/helpers.d.cts.map +1 -1
- package/dist/lib/unplugin/helpers.d.mts +0 -1
- package/dist/lib/unplugin/helpers.d.mts.map +1 -1
- package/dist/lib/unplugin/helpers.mjs +2 -2
- package/dist/lib/unplugin/helpers.mjs.map +1 -1
- package/dist/lib/unplugin/index.cjs +1 -0
- package/dist/lib/unplugin/module-resolution.cjs +11 -10
- package/dist/lib/unplugin/module-resolution.d.cts.map +1 -1
- package/dist/lib/unplugin/module-resolution.d.mts.map +1 -1
- package/dist/lib/unplugin/plugin.cjs +14 -13
- package/dist/lib/unplugin/plugin.d.cts.map +1 -1
- package/dist/lib/unplugin/plugin.d.mts.map +1 -1
- package/dist/lib/unplugin/plugin.mjs.map +1 -1
- package/dist/lib/utilities/file-header.cjs +5 -4
- package/dist/lib/utilities/file-header.d.cts.map +1 -1
- package/dist/lib/utilities/file-header.d.mts.map +1 -1
- package/dist/lib/utilities/format.cjs +8 -7
- package/dist/lib/utilities/format.d.cts +0 -1
- package/dist/lib/utilities/format.d.cts.map +1 -1
- package/dist/lib/utilities/format.d.mts +0 -1
- package/dist/lib/utilities/format.d.mts.map +1 -1
- package/dist/lib/utilities/index.cjs +1 -0
- package/dist/lib/utilities/source-file.cjs +10 -9
- package/dist/lib/utilities/source-file.d.cts +0 -1
- package/dist/lib/utilities/source-file.d.cts.map +1 -1
- package/dist/lib/utilities/source-file.d.mts +0 -1
- package/dist/lib/utilities/source-file.d.mts.map +1 -1
- package/dist/lib/utilities/source-map.cjs +3 -2
- package/dist/lib/utilities/source-map.d.cts +0 -1
- package/dist/lib/utilities/source-map.d.cts.map +1 -1
- package/dist/lib/utilities/source-map.d.mts +0 -1
- package/dist/lib/utilities/source-map.d.mts.map +1 -1
- package/dist/lib/utilities/write-file.cjs +7 -6
- package/dist/lib/utilities/write-file.d.cts +0 -1
- package/dist/lib/utilities/write-file.d.cts.map +1 -1
- package/dist/lib/utilities/write-file.d.mts +0 -1
- package/dist/lib/utilities/write-file.d.mts.map +1 -1
- package/dist/plugin-base.cjs +8 -9
- package/dist/plugin-base.d.cts.map +1 -1
- package/dist/plugin-base.d.mts.map +1 -1
- package/dist/plugin-base.mjs +1 -2
- package/dist/plugin-base.mjs.map +1 -1
- package/dist/plugin-utils/build-helpers.cjs +12 -11
- package/dist/plugin-utils/build-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/build-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +18 -17
- package/dist/plugin-utils/context-helpers.d.cts +0 -1
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/context-helpers.d.mts +0 -1
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/extend.cjs +12 -11
- package/dist/plugin-utils/extend.d.cts +0 -1
- package/dist/plugin-utils/extend.d.cts.map +1 -1
- package/dist/plugin-utils/extend.d.mts +0 -1
- package/dist/plugin-utils/extend.d.mts.map +1 -1
- package/dist/plugin-utils/format-package-json.cjs +6 -5
- package/dist/plugin-utils/format-package-json.d.cts +0 -1
- package/dist/plugin-utils/format-package-json.d.cts.map +1 -1
- package/dist/plugin-utils/format-package-json.d.mts +0 -1
- package/dist/plugin-utils/format-package-json.d.mts.map +1 -1
- package/dist/plugin-utils/get-config-path.cjs +35 -34
- package/dist/plugin-utils/get-config-path.d.cts +0 -1
- package/dist/plugin-utils/get-config-path.d.cts.map +1 -1
- package/dist/plugin-utils/get-config-path.d.mts +0 -1
- package/dist/plugin-utils/get-config-path.d.mts.map +1 -1
- package/dist/plugin-utils/helpers.cjs +15 -14
- package/dist/plugin-utils/helpers.d.cts +10 -11
- package/dist/plugin-utils/helpers.d.cts.map +1 -1
- package/dist/plugin-utils/helpers.d.mts +10 -11
- package/dist/plugin-utils/helpers.d.mts.map +1 -1
- package/dist/plugin-utils/helpers.mjs.map +1 -1
- package/dist/plugin-utils/index.cjs +1 -0
- package/dist/plugin-utils/merge.cjs +7 -6
- package/dist/plugin-utils/merge.d.cts.map +1 -1
- package/dist/plugin-utils/merge.d.mts +0 -2
- package/dist/plugin-utils/merge.d.mts.map +1 -1
- package/dist/plugin-utils/merge.mjs +2 -2
- package/dist/plugin-utils/merge.mjs.map +1 -1
- package/dist/plugin-utils/modules.cjs +1 -0
- package/dist/plugin-utils/modules.d.cts +0 -1
- package/dist/plugin-utils/modules.d.cts.map +1 -1
- package/dist/plugin-utils/modules.d.mts +0 -1
- package/dist/plugin-utils/modules.d.mts.map +1 -1
- package/dist/plugin-utils/modules.mjs.map +1 -1
- package/dist/plugin-utils/paths.cjs +5 -4
- package/dist/plugin-utils/paths.d.cts +0 -1
- package/dist/plugin-utils/paths.d.cts.map +1 -1
- package/dist/plugin-utils/paths.d.mts +0 -1
- package/dist/plugin-utils/paths.d.mts.map +1 -1
- package/dist/types/_internal.d.cts +0 -1
- package/dist/types/_internal.d.cts.map +1 -1
- package/dist/types/_internal.d.mts +0 -1
- package/dist/types/_internal.d.mts.map +1 -1
- package/dist/types/api.d.cts +0 -1
- package/dist/types/api.d.cts.map +1 -1
- package/dist/types/api.d.mts +0 -1
- package/dist/types/api.d.mts.map +1 -1
- package/dist/types/commands.d.cts.map +1 -1
- package/dist/types/commands.d.mts.map +1 -1
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/fs.d.cts.map +1 -1
- package/dist/types/fs.d.mts.map +1 -1
- package/dist/types/hooks.d.cts +10 -10
- package/dist/types/hooks.d.cts.map +1 -1
- package/dist/types/hooks.d.mts +10 -10
- package/dist/types/hooks.d.mts.map +1 -1
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/tsconfig.d.cts.map +1 -1
- package/dist/types/tsconfig.d.mts.map +1 -1
- package/dist/types/unplugin.d.cts.map +1 -1
- package/dist/types/unplugin.d.mts.map +1 -1
- package/package.json +5 -4
package/dist/plugin-base.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
const
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_plugin_utils_format_package_json = require('./plugin-utils/format-package-json.cjs');
|
|
4
|
-
let
|
|
5
|
-
let
|
|
6
|
-
let
|
|
4
|
+
let _stryke_path_append = require("@stryke/path/append");
|
|
5
|
+
let _stryke_path_replace = require("@stryke/path/replace");
|
|
6
|
+
let _stryke_path_join = require("@stryke/path/join");
|
|
7
7
|
let tsdown = require("tsdown");
|
|
8
8
|
|
|
9
9
|
//#region src/plugin-base.ts
|
|
@@ -54,8 +54,8 @@ const plugin = (options = {}) => {
|
|
|
54
54
|
async build() {
|
|
55
55
|
await (0, tsdown.build)({
|
|
56
56
|
name: this.config.name,
|
|
57
|
-
cwd: (0,
|
|
58
|
-
entry: this.entry.filter((entry) => entry?.file).length > 0 ? Object.fromEntries(this.entry.filter((entry) => entry?.file).map((entry) => [entry.output || (0,
|
|
57
|
+
cwd: (0, _stryke_path_append.appendPath)(this.config.root, this.workspaceConfig.workspaceRoot),
|
|
58
|
+
entry: this.entry.filter((entry) => entry?.file).length > 0 ? Object.fromEntries(this.entry.filter((entry) => entry?.file).map((entry) => [entry.output || (0, _stryke_path_replace.replaceExtension)((0, _stryke_path_replace.replacePath)((0, _stryke_path_replace.replacePath)(entry.file, (0, _stryke_path_join.joinPaths)(this.config.root, "src")), this.entryPath)), entry.file])) : [(0, _stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.root, "src", "**/*.ts"), (0, _stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.root, "src", "**/*.tsx")],
|
|
59
59
|
platform: this.config.platform,
|
|
60
60
|
tsconfig: this.tsconfig.tsconfigFilePath,
|
|
61
61
|
outDir: this.config.output.buildPath,
|
|
@@ -65,8 +65,7 @@ const plugin = (options = {}) => {
|
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
|
-
var plugin_base_default = plugin;
|
|
69
68
|
|
|
70
69
|
//#endregion
|
|
71
|
-
exports.default =
|
|
70
|
+
exports.default = plugin;
|
|
72
71
|
exports.plugin = plugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-base.d.cts","names":[],"sources":["../src/plugin-base.ts"],"
|
|
1
|
+
{"version":3,"file":"plugin-base.d.cts","names":[],"sources":["../src/plugin-base.ts"],"mappings":";;;;;;UA2BiB,iBAAA;EACf,MAAA,GAAS,OAAA,CAAQ,UAAA;AAAA;AAAA,KAGP,oBAAA,GAAuB,YAAA;EACjC,MAAA,EAAQ,iBAAA;AAAA;AAAA,KAGE,wBAAA,GAA2B,cAAA;EACrC,MAAA,EAAQ,QAAA,CAAS,iBAAA;AAAA;AAAA,KAGP,iBAAA,yBACc,wBAAA,GAA2B,wBAAA,IACjD,aAAA,CAAc,eAAA;;AAVlB;;cAea,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KACR,MAAA,CAAO,QAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-base.d.mts","names":[],"sources":["../src/plugin-base.ts"],"
|
|
1
|
+
{"version":3,"file":"plugin-base.d.mts","names":[],"sources":["../src/plugin-base.ts"],"mappings":";;;;;;UA2BiB,iBAAA;EACf,MAAA,GAAS,OAAA,CAAQ,UAAA;AAAA;AAAA,KAGP,oBAAA,GAAuB,YAAA;EACjC,MAAA,EAAQ,iBAAA;AAAA;AAAA,KAGE,wBAAA,GAA2B,cAAA;EACrC,MAAA,EAAQ,QAAA,CAAS,iBAAA;AAAA;AAAA,KAGP,iBAAA,yBACc,wBAAA,GAA2B,wBAAA,IACjD,aAAA,CAAc,eAAA;;AAVlB;;cAea,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KACR,MAAA,CAAO,QAAA;AAAA"}
|
package/dist/plugin-base.mjs
CHANGED
package/dist/plugin-base.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-base.mjs","names":[],"sources":["../src/plugin-base.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\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/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { build, UserConfig as BuildOptions } from \"tsdown\";\nimport { formatPackageJson } from \"./plugin-utils/format-package-json\";\nimport { ResolvedConfig, UserConfig } from \"./types/config\";\nimport { PluginContext } from \"./types/context\";\nimport { Plugin } from \"./types/plugin\";\n\nexport interface BasePluginOptions {\n tsdown?: Partial<BuildOptions>;\n}\n\nexport type BasePluginUserConfig = UserConfig & {\n tsdown: BasePluginOptions;\n};\n\nexport type BasePluginResolvedConfig = ResolvedConfig & {\n tsdown: Required<BasePluginOptions>;\n};\n\nexport type BasePluginContext<\n TResolvedConfig extends BasePluginResolvedConfig = BasePluginResolvedConfig\n> = PluginContext<TResolvedConfig>;\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <TContext extends BasePluginContext = BasePluginContext>(\n options: BasePluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"base\",\n config() {\n return {\n projectType: \"library\",\n input: [\"src/index.ts\", \"src/types/*.ts\", \"src/helpers/*.ts\"],\n output: {\n format: [\"cjs\", \"esm\"],\n dts: false\n },\n platform: \"node\",\n tsdown: {\n format: [\"cjs\", \"esm\"],\n logLevel: \"silent\",\n target: \"node22\",\n cjsDefault: true,\n treeshake: true,\n exports: {\n all: true\n },\n fixedExtension: true,\n nodeProtocol: true,\n minify: false,\n dts: true,\n shims: true,\n outDir: \"dist\",\n clean: true,\n external: [\"powerlines\", /^powerlines\\/.*$/, /^@powerlines\\//],\n skipNodeModulesBundle: true,\n unbundle: false,\n ...options.tsdown\n }\n };\n },\n async build() {\n await build({\n name: this.config.name,\n cwd: appendPath(this.config.root, this.workspaceConfig.workspaceRoot),\n entry:\n this.entry.filter(entry => entry?.file).length > 0\n ? Object.fromEntries(\n this.entry\n .filter(entry => entry?.file)\n .map(entry => [\n entry.output ||\n replaceExtension(\n replacePath(\n replacePath(\n entry.file,\n joinPaths(this.config.root, \"src\")\n ),\n this.entryPath\n )\n ),\n entry.file\n ])\n )\n : [\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"src\",\n \"**/*.ts\"\n ),\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"src\",\n \"**/*.tsx\"\n )\n ],\n platform: this.config.platform,\n tsconfig: this.tsconfig.tsconfigFilePath,\n outDir: this.config.output.buildPath,\n ...this.config.tsdown\n });\n\n await formatPackageJson(this);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;AA8CA,MAAa,UACX,UAA6B,EAAE,KACV;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO;IACL,aAAa;IACb,OAAO;KAAC;KAAgB;KAAkB;KAAmB;IAC7D,QAAQ;KACN,QAAQ,CAAC,OAAO,MAAM;KACtB,KAAK;KACN;IACD,UAAU;IACV,QAAQ;KACN,QAAQ,CAAC,OAAO,MAAM;KACtB,UAAU;KACV,QAAQ;KACR,YAAY;KACZ,WAAW;KACX,SAAS,EACP,KAAK,MACN;KACD,gBAAgB;KAChB,cAAc;KACd,QAAQ;KACR,KAAK;KACL,OAAO;KACP,QAAQ;KACR,OAAO;KACP,UAAU;MAAC;MAAc;MAAoB;MAAiB;KAC9D,uBAAuB;KACvB,UAAU;KACV,GAAG,QAAQ;KACZ;IACF;;EAEH,MAAM,QAAQ;AACZ,SAAM,MAAM;IACV,MAAM,KAAK,OAAO;IAClB,KAAK,WAAW,KAAK,OAAO,MAAM,KAAK,gBAAgB,cAAc;IACrE,OACE,KAAK,MAAM,QAAO,UAAS,OAAO,KAAK,CAAC,SAAS,IAC7C,OAAO,YACL,KAAK,MACF,QAAO,UAAS,OAAO,KAAK,CAC5B,KAAI,UAAS,CACZ,MAAM,UACJ,iBACE,YACE,YACE,MAAM,MACN,UAAU,KAAK,OAAO,MAAM,MAAM,CACnC,EACD,KAAK,UACN,CACF,EACH,MAAM,KACP,CAAC,CACL,GACD,CACE,UACE,KAAK,gBAAgB,eACrB,KAAK,OAAO,MACZ,OACA,UACD,EACD,UACE,KAAK,gBAAgB,eACrB,KAAK,OAAO,MACZ,OACA,WACD,CACF;IACP,UAAU,KAAK,OAAO;IACtB,UAAU,KAAK,SAAS;IACxB,QAAQ,KAAK,OAAO,OAAO;IAC3B,GAAG,KAAK,OAAO;IAChB,CAAC;AAEF,SAAM,kBAAkB,KAAK;;EAEhC
|
|
1
|
+
{"version":3,"file":"plugin-base.mjs","names":[],"sources":["../src/plugin-base.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\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/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { build, UserConfig as BuildOptions } from \"tsdown\";\nimport { formatPackageJson } from \"./plugin-utils/format-package-json\";\nimport { ResolvedConfig, UserConfig } from \"./types/config\";\nimport { PluginContext } from \"./types/context\";\nimport { Plugin } from \"./types/plugin\";\n\nexport interface BasePluginOptions {\n tsdown?: Partial<BuildOptions>;\n}\n\nexport type BasePluginUserConfig = UserConfig & {\n tsdown: BasePluginOptions;\n};\n\nexport type BasePluginResolvedConfig = ResolvedConfig & {\n tsdown: Required<BasePluginOptions>;\n};\n\nexport type BasePluginContext<\n TResolvedConfig extends BasePluginResolvedConfig = BasePluginResolvedConfig\n> = PluginContext<TResolvedConfig>;\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <TContext extends BasePluginContext = BasePluginContext>(\n options: BasePluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"base\",\n config() {\n return {\n projectType: \"library\",\n input: [\"src/index.ts\", \"src/types/*.ts\", \"src/helpers/*.ts\"],\n output: {\n format: [\"cjs\", \"esm\"],\n dts: false\n },\n platform: \"node\",\n tsdown: {\n format: [\"cjs\", \"esm\"],\n logLevel: \"silent\",\n target: \"node22\",\n cjsDefault: true,\n treeshake: true,\n exports: {\n all: true\n },\n fixedExtension: true,\n nodeProtocol: true,\n minify: false,\n dts: true,\n shims: true,\n outDir: \"dist\",\n clean: true,\n external: [\"powerlines\", /^powerlines\\/.*$/, /^@powerlines\\//],\n skipNodeModulesBundle: true,\n unbundle: false,\n ...options.tsdown\n }\n };\n },\n async build() {\n await build({\n name: this.config.name,\n cwd: appendPath(this.config.root, this.workspaceConfig.workspaceRoot),\n entry:\n this.entry.filter(entry => entry?.file).length > 0\n ? Object.fromEntries(\n this.entry\n .filter(entry => entry?.file)\n .map(entry => [\n entry.output ||\n replaceExtension(\n replacePath(\n replacePath(\n entry.file,\n joinPaths(this.config.root, \"src\")\n ),\n this.entryPath\n )\n ),\n entry.file\n ])\n )\n : [\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"src\",\n \"**/*.ts\"\n ),\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"src\",\n \"**/*.tsx\"\n )\n ],\n platform: this.config.platform,\n tsconfig: this.tsconfig.tsconfigFilePath,\n outDir: this.config.output.buildPath,\n ...this.config.tsdown\n });\n\n await formatPackageJson(this);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;AA8CA,MAAa,UACX,UAA6B,EAAE,KACV;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO;IACL,aAAa;IACb,OAAO;KAAC;KAAgB;KAAkB;KAAmB;IAC7D,QAAQ;KACN,QAAQ,CAAC,OAAO,MAAM;KACtB,KAAK;KACN;IACD,UAAU;IACV,QAAQ;KACN,QAAQ,CAAC,OAAO,MAAM;KACtB,UAAU;KACV,QAAQ;KACR,YAAY;KACZ,WAAW;KACX,SAAS,EACP,KAAK,MACN;KACD,gBAAgB;KAChB,cAAc;KACd,QAAQ;KACR,KAAK;KACL,OAAO;KACP,QAAQ;KACR,OAAO;KACP,UAAU;MAAC;MAAc;MAAoB;MAAiB;KAC9D,uBAAuB;KACvB,UAAU;KACV,GAAG,QAAQ;KACZ;IACF;;EAEH,MAAM,QAAQ;AACZ,SAAM,MAAM;IACV,MAAM,KAAK,OAAO;IAClB,KAAK,WAAW,KAAK,OAAO,MAAM,KAAK,gBAAgB,cAAc;IACrE,OACE,KAAK,MAAM,QAAO,UAAS,OAAO,KAAK,CAAC,SAAS,IAC7C,OAAO,YACL,KAAK,MACF,QAAO,UAAS,OAAO,KAAK,CAC5B,KAAI,UAAS,CACZ,MAAM,UACJ,iBACE,YACE,YACE,MAAM,MACN,UAAU,KAAK,OAAO,MAAM,MAAM,CACnC,EACD,KAAK,UACN,CACF,EACH,MAAM,KACP,CAAC,CACL,GACD,CACE,UACE,KAAK,gBAAgB,eACrB,KAAK,OAAO,MACZ,OACA,UACD,EACD,UACE,KAAK,gBAAgB,eACrB,KAAK,OAAO,MACZ,OACA,WACD,CACF;IACP,UAAU,KAAK,OAAO;IACtB,UAAU,KAAK,SAAS;IACxB,QAAQ,KAAK,OAAO,OAAO;IAC3B,GAAG,KAAK,OAAO;IAChB,CAAC;AAEF,SAAM,kBAAkB,KAAK;;EAEhC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
let
|
|
4
|
-
let
|
|
5
|
-
let
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let _stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
4
|
+
let _stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
|
|
5
|
+
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
6
|
+
let _stryke_type_checks_is_regexp = require("@stryke/type-checks/is-regexp");
|
|
6
7
|
|
|
7
8
|
//#region src/plugin-utils/build-helpers.ts
|
|
8
9
|
/**
|
|
@@ -12,13 +13,13 @@ let __stryke_type_checks_is_regexp = require("@stryke/type-checks/is-regexp");
|
|
|
12
13
|
* @returns The dependency configuration.
|
|
13
14
|
*/
|
|
14
15
|
function getDependencyConfig(context) {
|
|
15
|
-
const noExternal = (0,
|
|
16
|
-
const external = (0,
|
|
17
|
-
if ((0,
|
|
18
|
-
if (noExternal.some((noExt) => (0,
|
|
19
|
-
const noExts = noExternal.filter((noExt) => (0,
|
|
16
|
+
const noExternal = (0, _stryke_helpers_get_unique.getUnique)((0, _stryke_convert_to_array.toArray)(context.config.resolve.noExternal).concat(context.builtins));
|
|
17
|
+
const external = (0, _stryke_helpers_get_unique.getUnique)((0, _stryke_convert_to_array.toArray)(context.config.resolve.external).reduce((ret, ext) => {
|
|
18
|
+
if ((0, _stryke_type_checks_is_regexp.isRegExp)(ext)) {
|
|
19
|
+
if (noExternal.some((noExt) => (0, _stryke_type_checks_is_regexp.isRegExp)(noExt) && noExt.source === ext.source)) return ret;
|
|
20
|
+
const noExts = noExternal.filter((noExt) => (0, _stryke_type_checks_is_set_string.isSetString)(noExt) && ext.test(noExt));
|
|
20
21
|
if (noExts.length > 0) {
|
|
21
|
-
ret.push(new RegExp(noExts.reduce((regex, noExt) => `(?!${(0,
|
|
22
|
+
ret.push(new RegExp(noExts.reduce((regex, noExt) => `(?!${(0, _stryke_type_checks_is_regexp.isRegExp)(noExt) ? noExt.source : `^${noExt}$`})${regex}`, `${ext.source.replace(/^\^@\?/, "^@").replace(/^@\?/, "@").replace(/\$$/, "").replace(/\.\*$/, "")}.*$`)));
|
|
22
23
|
return ret;
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-helpers.d.cts","names":[],"sources":["../../src/plugin-utils/build-helpers.ts"],"
|
|
1
|
+
{"version":3,"file":"build-helpers.d.cts","names":[],"sources":["../../src/plugin-utils/build-helpers.ts"],"mappings":";;;;UAyBiB,yBAAA;EACf,QAAA,EAAU,aAAA;EACV,UAAA,EAAY,aAAA;AAAA;;;;;;;iBASE,mBAAA,CACd,OAAA,EAAS,OAAA,GACR,yBAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-helpers.d.mts","names":[],"sources":["../../src/plugin-utils/build-helpers.ts"],"
|
|
1
|
+
{"version":3,"file":"build-helpers.d.mts","names":[],"sources":["../../src/plugin-utils/build-helpers.ts"],"mappings":";;;;UAyBiB,yBAAA;EACf,QAAA,EAAU,aAAA;EACV,UAAA,EAAY,aAAA;AAAA;;;;;;;iBASE,mBAAA,CACd,OAAA,EAAS,OAAA,GACR,yBAAA;AAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
let
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
4
|
+
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
4
5
|
|
|
5
6
|
//#region src/plugin-utils/context-helpers.ts
|
|
6
7
|
/**
|
|
@@ -11,22 +12,22 @@ let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-str
|
|
|
11
12
|
*/
|
|
12
13
|
function getOrganizationName(context) {
|
|
13
14
|
let result;
|
|
14
|
-
if ((0,
|
|
15
|
-
if (!result && (0,
|
|
15
|
+
if ((0, _stryke_type_checks_is_set_object.isSetObject)(context.workspaceConfig.organization)) result = context.workspaceConfig.organization.name;
|
|
16
|
+
if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.workspaceConfig.organization)) result = context.workspaceConfig.organization;
|
|
16
17
|
if (!result && Array.isArray(context.packageJson.maintainers) && context.packageJson.maintainers.length > 0) {
|
|
17
|
-
if ((0,
|
|
18
|
-
if (!result && (0,
|
|
18
|
+
if ((0, _stryke_type_checks_is_set_object.isSetObject)(context.packageJson.maintainers[0])) result = context.packageJson.maintainers[0].name;
|
|
19
|
+
if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.packageJson.maintainers[0])) result = context.packageJson.maintainers[0];
|
|
19
20
|
}
|
|
20
21
|
if (!result && Array.isArray(context.packageJson.author) && context.packageJson.author.length > 0) {
|
|
21
|
-
if ((0,
|
|
22
|
-
if (!result && (0,
|
|
22
|
+
if ((0, _stryke_type_checks_is_set_object.isSetObject)(context.packageJson.author[0])) result = context.packageJson.author[0].name;
|
|
23
|
+
if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.packageJson.author[0])) result = context.packageJson.author[0];
|
|
23
24
|
}
|
|
24
25
|
if (!result && Array.isArray(context.packageJson.contributors) && context.packageJson.contributors.length > 0) {
|
|
25
|
-
if ((0,
|
|
26
|
-
if (!result && (0,
|
|
26
|
+
if ((0, _stryke_type_checks_is_set_object.isSetObject)(context.packageJson.contributors[0])) result = context.packageJson.contributors[0].name;
|
|
27
|
+
if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.packageJson.contributors[0])) result = context.packageJson.contributors[0];
|
|
27
28
|
}
|
|
28
|
-
if (!result && (0,
|
|
29
|
-
if (!result && (0,
|
|
29
|
+
if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.packageJson.namespace)) result = context.packageJson.namespace.replace(/^@/, "");
|
|
30
|
+
if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.packageJson.name)) result = context.packageJson.name.replace(/^@/, "").replace(/\/.*$/, "");
|
|
30
31
|
return result;
|
|
31
32
|
}
|
|
32
33
|
/**
|
|
@@ -37,10 +38,10 @@ function getOrganizationName(context) {
|
|
|
37
38
|
*/
|
|
38
39
|
function getWorkspaceName(context) {
|
|
39
40
|
let result;
|
|
40
|
-
if ((0,
|
|
41
|
-
if (!result && (0,
|
|
42
|
-
if (!result && (0,
|
|
43
|
-
if (!result && (0,
|
|
41
|
+
if ((0, _stryke_type_checks_is_set_string.isSetString)(context.workspaceConfig.name)) result = context.workspaceConfig.name;
|
|
42
|
+
if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.workspaceConfig.namespace)) result = context.workspaceConfig.namespace.replace(/^@/, "");
|
|
43
|
+
if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.packageJson.namespace)) result = context.packageJson.namespace.replace(/^@/, "");
|
|
44
|
+
if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.packageJson.name)) result = context.packageJson.name.replace(/^@/, "").replace(/\/.*$/, "");
|
|
44
45
|
return result;
|
|
45
46
|
}
|
|
46
47
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-helpers.d.cts","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"
|
|
1
|
+
{"version":3,"file":"context-helpers.d.cts","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"mappings":";;;;;AA4BA;;;;iBAAgB,mBAAA,CACd,OAAA,EAAS,iBAAA;AAsEX;;;;;;AAAA,iBAAgB,gBAAA,CACd,OAAA,EAAS,iBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-helpers.d.mts","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"
|
|
1
|
+
{"version":3,"file":"context-helpers.d.mts","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"mappings":";;;;;AA4BA;;;;iBAAgB,mBAAA,CACd,OAAA,EAAS,iBAAA;AAsEX;;;;;;AAAA,iBAAgB,gBAAA,CACd,OAAA,EAAS,iBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-helpers.mjs","names":[
|
|
1
|
+
{"version":3,"file":"context-helpers.mjs","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\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/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { UnresolvedContext } from \"../types/context\";\n\n/**\n * Get the organization name from the context\n *\n * @param context - The Powerlines plugin context.\n * @returns The organization name or undefined if not found.\n */\nexport function getOrganizationName(\n context: UnresolvedContext\n): string | undefined {\n let result: string | undefined;\n if (isSetObject(context.workspaceConfig.organization)) {\n result = context.workspaceConfig.organization.name;\n }\n\n if (!result && isSetString(context.workspaceConfig.organization)) {\n result = context.workspaceConfig.organization;\n }\n\n if (\n !result &&\n Array.isArray(context.packageJson.maintainers) &&\n context.packageJson.maintainers.length > 0\n ) {\n if (isSetObject(context.packageJson.maintainers[0])) {\n result = (context.packageJson.maintainers[0] as { name: string }).name;\n }\n\n if (!result && isSetString(context.packageJson.maintainers[0])) {\n result = context.packageJson.maintainers[0];\n }\n }\n\n if (\n !result &&\n Array.isArray(context.packageJson.author) &&\n context.packageJson.author.length > 0\n ) {\n if (isSetObject(context.packageJson.author[0])) {\n result = (context.packageJson.author[0] as { name: string }).name;\n }\n\n if (!result && isSetString(context.packageJson.author[0])) {\n result = context.packageJson.author[0];\n }\n }\n\n if (\n !result &&\n Array.isArray(context.packageJson.contributors) &&\n context.packageJson.contributors.length > 0\n ) {\n if (isSetObject(context.packageJson.contributors[0])) {\n result = (context.packageJson.contributors[0] as { name: string }).name;\n }\n\n if (!result && isSetString(context.packageJson.contributors[0])) {\n result = context.packageJson.contributors[0];\n }\n }\n\n if (!result && isSetString(context.packageJson.namespace)) {\n result = context.packageJson.namespace.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(context.packageJson.name)) {\n result = context.packageJson.name.replace(/^@/, \"\").replace(/\\/.*$/, \"\");\n }\n\n return result;\n}\n\n/**\n * Get the organization name from the context\n *\n * @param context - The Powerlines plugin context.\n * @returns The organization name or undefined if not found.\n */\nexport function getWorkspaceName(\n context: UnresolvedContext\n): string | undefined {\n let result: string | undefined;\n if (isSetString(context.workspaceConfig.name)) {\n result = context.workspaceConfig.name;\n }\n\n if (!result && isSetString(context.workspaceConfig.namespace)) {\n result = context.workspaceConfig.namespace.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(context.packageJson.namespace)) {\n result = context.packageJson.namespace.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(context.packageJson.name)) {\n result = context.packageJson.name.replace(/^@/, \"\").replace(/\\/.*$/, \"\");\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;AA4BA,SAAgB,oBACd,SACoB;CACpB,IAAI;AACJ,KAAI,YAAY,QAAQ,gBAAgB,aAAa,CACnD,UAAS,QAAQ,gBAAgB,aAAa;AAGhD,KAAI,CAAC,UAAU,YAAY,QAAQ,gBAAgB,aAAa,CAC9D,UAAS,QAAQ,gBAAgB;AAGnC,KACE,CAAC,UACD,MAAM,QAAQ,QAAQ,YAAY,YAAY,IAC9C,QAAQ,YAAY,YAAY,SAAS,GACzC;AACA,MAAI,YAAY,QAAQ,YAAY,YAAY,GAAG,CACjD,UAAU,QAAQ,YAAY,YAAY,GAAwB;AAGpE,MAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,YAAY,GAAG,CAC5D,UAAS,QAAQ,YAAY,YAAY;;AAI7C,KACE,CAAC,UACD,MAAM,QAAQ,QAAQ,YAAY,OAAO,IACzC,QAAQ,YAAY,OAAO,SAAS,GACpC;AACA,MAAI,YAAY,QAAQ,YAAY,OAAO,GAAG,CAC5C,UAAU,QAAQ,YAAY,OAAO,GAAwB;AAG/D,MAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,OAAO,GAAG,CACvD,UAAS,QAAQ,YAAY,OAAO;;AAIxC,KACE,CAAC,UACD,MAAM,QAAQ,QAAQ,YAAY,aAAa,IAC/C,QAAQ,YAAY,aAAa,SAAS,GAC1C;AACA,MAAI,YAAY,QAAQ,YAAY,aAAa,GAAG,CAClD,UAAU,QAAQ,YAAY,aAAa,GAAwB;AAGrE,MAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,aAAa,GAAG,CAC7D,UAAS,QAAQ,YAAY,aAAa;;AAI9C,KAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,UAAU,CACvD,UAAS,QAAQ,YAAY,UAAU,QAAQ,MAAM,GAAG;AAG1D,KAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,KAAK,CAClD,UAAS,QAAQ,YAAY,KAAK,QAAQ,MAAM,GAAG,CAAC,QAAQ,SAAS,GAAG;AAG1E,QAAO;;;;;;;;AAST,SAAgB,iBACd,SACoB;CACpB,IAAI;AACJ,KAAI,YAAY,QAAQ,gBAAgB,KAAK,CAC3C,UAAS,QAAQ,gBAAgB;AAGnC,KAAI,CAAC,UAAU,YAAY,QAAQ,gBAAgB,UAAU,CAC3D,UAAS,QAAQ,gBAAgB,UAAU,QAAQ,MAAM,GAAG;AAG9D,KAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,UAAU,CACvD,UAAS,QAAQ,YAAY,UAAU,QAAQ,MAAM,GAAG;AAG1D,KAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,KAAK,CAClD,UAAS,QAAQ,YAAY,KAAK,QAAQ,MAAM,GAAG,CAAC,QAAQ,SAAS,GAAG;AAG1E,QAAO"}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
3
|
const require_plugin_utils_merge = require('./merge.cjs');
|
|
3
|
-
let
|
|
4
|
-
let
|
|
4
|
+
let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
5
|
+
let _stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
5
6
|
|
|
6
7
|
//#region src/plugin-utils/extend.ts
|
|
7
8
|
function extend(plugin, extension) {
|
|
8
|
-
if ((0,
|
|
9
|
-
if ((0,
|
|
10
|
-
const pluginResult = (0,
|
|
11
|
-
const extensionResult = (0,
|
|
9
|
+
if ((0, _stryke_type_checks_is_function.isFunction)(plugin)) {
|
|
10
|
+
if ((0, _stryke_type_checks_is_function.isFunction)(extension)) return async (options) => {
|
|
11
|
+
const pluginResult = (0, _stryke_convert_to_array.toArray)(await Promise.resolve(plugin(options)));
|
|
12
|
+
const extensionResult = (0, _stryke_convert_to_array.toArray)(await Promise.resolve(extension(options)));
|
|
12
13
|
return pluginResult.map((p) => extensionResult.map((e) => require_plugin_utils_merge.merge(p, e))).flat();
|
|
13
14
|
};
|
|
14
15
|
return async (options) => {
|
|
15
|
-
return (0,
|
|
16
|
+
return (0, _stryke_convert_to_array.toArray)(await Promise.resolve(plugin(options))).map((p) => require_plugin_utils_merge.merge(p, extension));
|
|
16
17
|
};
|
|
17
|
-
} else if ((0,
|
|
18
|
-
return (0,
|
|
18
|
+
} else if ((0, _stryke_type_checks_is_function.isFunction)(extension)) return async (options) => {
|
|
19
|
+
return (0, _stryke_convert_to_array.toArray)(await Promise.resolve(extension(options))).map((e) => (0, _stryke_convert_to_array.toArray)(plugin).map((p) => require_plugin_utils_merge.merge(p, e))).flat();
|
|
19
20
|
};
|
|
20
|
-
return (0,
|
|
21
|
+
return (0, _stryke_convert_to_array.toArray)(plugin).map((p) => require_plugin_utils_merge.merge(p, extension));
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
//#endregion
|
|
@@ -3,7 +3,6 @@ import { PluginContext } from "../types/context.cjs";
|
|
|
3
3
|
import { PartialPlugin, PartialPluginFactory, PluginFactory } from "../types/config.cjs";
|
|
4
4
|
|
|
5
5
|
//#region src/plugin-utils/extend.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* Adds additional helper functionality to a plugin via a plugin builder function.
|
|
9
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extend.d.cts","names":[],"sources":["../../src/plugin-utils/extend.ts"],"
|
|
1
|
+
{"version":3,"file":"extend.d.cts","names":[],"sources":["../../src/plugin-utils/extend.ts"],"mappings":";;;;;;;AAoCA;;;;;iBAAgB,MAAA,kBACG,aAAA,GAAgB,aAAA,wDAAA,CAIjC,MAAA,EAAQ,aAAA,CAAc,QAAA,EAAU,cAAA,GAChC,SAAA,EAAW,oBAAA,CAAqB,QAAA,EAAU,iBAAA,IACzC,aAAA,CAAc,QAAA,EAAU,cAAA,GAAiB,iBAAA;AAAA,iBAC5B,MAAA,kBACG,aAAA,GAAgB,aAAA,2BAAA,CAGjC,MAAA,EAAQ,aAAA,CAAc,QAAA,EAAU,cAAA,GAChC,SAAA,EAAW,aAAA,CAAc,QAAA,IACxB,aAAA,CAAc,QAAA,EAAU,cAAA;AAAA,iBACX,MAAA,kBACG,aAAA,GAAgB,aAAA,8BAAA,CAGjC,MAAA,EAAQ,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA,KAClC,SAAA,EAAW,oBAAA,CAAqB,QAAA,EAAU,iBAAA,IACzC,aAAA,CAAc,QAAA,EAAU,iBAAA;AAAA,iBACX,MAAA,kBAAwB,aAAA,GAAgB,aAAA,CAAA,CACtD,MAAA,EAAQ,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA,KAClC,SAAA,EAAW,aAAA,CAAc,QAAA,IACxB,MAAA,CAAO,QAAA"}
|
|
@@ -3,7 +3,6 @@ import { PluginContext } from "../types/context.mjs";
|
|
|
3
3
|
import { PartialPlugin, PartialPluginFactory, PluginFactory } from "../types/config.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/plugin-utils/extend.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* Adds additional helper functionality to a plugin via a plugin builder function.
|
|
9
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extend.d.mts","names":[],"sources":["../../src/plugin-utils/extend.ts"],"
|
|
1
|
+
{"version":3,"file":"extend.d.mts","names":[],"sources":["../../src/plugin-utils/extend.ts"],"mappings":";;;;;;;AAoCA;;;;;iBAAgB,MAAA,kBACG,aAAA,GAAgB,aAAA,wDAAA,CAIjC,MAAA,EAAQ,aAAA,CAAc,QAAA,EAAU,cAAA,GAChC,SAAA,EAAW,oBAAA,CAAqB,QAAA,EAAU,iBAAA,IACzC,aAAA,CAAc,QAAA,EAAU,cAAA,GAAiB,iBAAA;AAAA,iBAC5B,MAAA,kBACG,aAAA,GAAgB,aAAA,2BAAA,CAGjC,MAAA,EAAQ,aAAA,CAAc,QAAA,EAAU,cAAA,GAChC,SAAA,EAAW,aAAA,CAAc,QAAA,IACxB,aAAA,CAAc,QAAA,EAAU,cAAA;AAAA,iBACX,MAAA,kBACG,aAAA,GAAgB,aAAA,8BAAA,CAGjC,MAAA,EAAQ,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA,KAClC,SAAA,EAAW,oBAAA,CAAqB,QAAA,EAAU,iBAAA,IACzC,aAAA,CAAc,QAAA,EAAU,iBAAA;AAAA,iBACX,MAAA,kBAAwB,aAAA,GAAgB,aAAA,CAAA,CACtD,MAAA,EAAQ,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA,KAClC,SAAA,EAAW,aAAA,CAAc,QAAA,IACxB,MAAA,CAAO,QAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
3
|
const require_lib_utilities_format = require('../lib/utilities/format.cjs');
|
|
3
|
-
let
|
|
4
|
-
let
|
|
4
|
+
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
5
|
+
let _stryke_path_join = require("@stryke/path/join");
|
|
5
6
|
|
|
6
7
|
//#region src/plugin-utils/format-package-json.ts
|
|
7
8
|
/**
|
|
@@ -10,9 +11,9 @@ let __stryke_path_join = require("@stryke/path/join");
|
|
|
10
11
|
* @param context - The powerlines context.
|
|
11
12
|
*/
|
|
12
13
|
async function formatPackageJson(context) {
|
|
13
|
-
const packageJsonPath = (0,
|
|
14
|
+
const packageJsonPath = (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, "package.json");
|
|
14
15
|
const packageJsonFile = await context.fs.read(packageJsonPath);
|
|
15
|
-
if ((0,
|
|
16
|
+
if ((0, _stryke_type_checks_is_set_string.isSetString)(packageJsonFile)) await context.fs.write(packageJsonPath, await require_lib_utilities_format.format(context, packageJsonPath, packageJsonFile));
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-package-json.d.cts","names":[],"sources":["../../src/plugin-utils/format-package-json.ts"],"
|
|
1
|
+
{"version":3,"file":"format-package-json.d.cts","names":[],"sources":["../../src/plugin-utils/format-package-json.ts"],"mappings":";;;;;AA4BA;;;iBAAsB,iBAAA,CAAkB,OAAA,EAAS,OAAA,GAAO,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-package-json.d.mts","names":[],"sources":["../../src/plugin-utils/format-package-json.ts"],"
|
|
1
|
+
{"version":3,"file":"format-package-json.d.mts","names":[],"sources":["../../src/plugin-utils/format-package-json.ts"],"mappings":";;;;;AA4BA;;;iBAAsB,iBAAA,CAAkB,OAAA,EAAS,OAAA,GAAO,OAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let _stryke_path_join = require("@stryke/path/join");
|
|
3
4
|
let node_fs = require("node:fs");
|
|
4
5
|
|
|
5
6
|
//#region src/plugin-utils/get-config-path.ts
|
|
@@ -11,38 +12,38 @@ let node_fs = require("node:fs");
|
|
|
11
12
|
* @returns The absolute path to the configuration file, or undefined if not found.
|
|
12
13
|
*/
|
|
13
14
|
function getConfigPath(context, name) {
|
|
14
|
-
if ((0, node_fs.existsSync)((0,
|
|
15
|
-
else if ((0, node_fs.existsSync)((0,
|
|
16
|
-
else if ((0, node_fs.existsSync)((0,
|
|
17
|
-
else if ((0, node_fs.existsSync)((0,
|
|
18
|
-
else if ((0, node_fs.existsSync)((0,
|
|
19
|
-
else if ((0, node_fs.existsSync)((0,
|
|
20
|
-
else if ((0, node_fs.existsSync)((0,
|
|
21
|
-
else if ((0, node_fs.existsSync)((0,
|
|
22
|
-
else if ((0, node_fs.existsSync)((0,
|
|
23
|
-
else if ((0, node_fs.existsSync)((0,
|
|
24
|
-
else if ((0, node_fs.existsSync)((0,
|
|
25
|
-
else if ((0, node_fs.existsSync)((0,
|
|
26
|
-
else if ((0, node_fs.existsSync)((0,
|
|
27
|
-
else if ((0, node_fs.existsSync)((0,
|
|
28
|
-
else if ((0, node_fs.existsSync)((0,
|
|
29
|
-
else if ((0, node_fs.existsSync)((0,
|
|
30
|
-
else if ((0, node_fs.existsSync)((0,
|
|
31
|
-
else if ((0, node_fs.existsSync)((0,
|
|
32
|
-
else if ((0, node_fs.existsSync)((0,
|
|
33
|
-
else if ((0, node_fs.existsSync)((0,
|
|
34
|
-
else if ((0, node_fs.existsSync)((0,
|
|
35
|
-
else if ((0, node_fs.existsSync)((0,
|
|
36
|
-
else if ((0, node_fs.existsSync)((0,
|
|
37
|
-
else if ((0, node_fs.existsSync)((0,
|
|
38
|
-
else if ((0, node_fs.existsSync)((0,
|
|
39
|
-
else if ((0, node_fs.existsSync)((0,
|
|
40
|
-
else if ((0, node_fs.existsSync)((0,
|
|
41
|
-
else if ((0, node_fs.existsSync)((0,
|
|
42
|
-
else if ((0, node_fs.existsSync)((0,
|
|
43
|
-
else if ((0, node_fs.existsSync)((0,
|
|
44
|
-
else if ((0, node_fs.existsSync)((0,
|
|
45
|
-
else if ((0, node_fs.existsSync)((0,
|
|
15
|
+
if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.yml`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.yml`);
|
|
16
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.yaml`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.yaml`);
|
|
17
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.json`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.json`);
|
|
18
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.jsonc`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.jsonc`);
|
|
19
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.ts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.ts`);
|
|
20
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.cts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.cts`);
|
|
21
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.mts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.mts`);
|
|
22
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.js`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.js`);
|
|
23
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.cjs`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.cjs`);
|
|
24
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.mjs`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.mjs`);
|
|
25
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.ts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.ts`);
|
|
26
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.cts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.cts`);
|
|
27
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.mts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.mts`);
|
|
28
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.js`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.js`);
|
|
29
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.cjs`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.cjs`);
|
|
30
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.mjs`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.mjs`);
|
|
31
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.yml`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.yml`);
|
|
32
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.yaml`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.yaml`);
|
|
33
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.json`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.json`);
|
|
34
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.jsonc`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.jsonc`);
|
|
35
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.ts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.ts`);
|
|
36
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.cts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.cts`);
|
|
37
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.mts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.mts`);
|
|
38
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.js`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.js`);
|
|
39
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.cjs`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.cjs`);
|
|
40
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.mjs`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.mjs`);
|
|
41
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.ts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.ts`);
|
|
42
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.cts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.cts`);
|
|
43
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.mts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.mts`);
|
|
44
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.js`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.js`);
|
|
45
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.cjs`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.cjs`);
|
|
46
|
+
else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.mjs`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.mjs`);
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-config-path.d.cts","names":[],"sources":["../../src/plugin-utils/get-config-path.ts"],"
|
|
1
|
+
{"version":3,"file":"get-config-path.d.cts","names":[],"sources":["../../src/plugin-utils/get-config-path.ts"],"mappings":";;;;;AA6BA;;;;;iBAAgB,aAAA,CACd,OAAA,EAAS,iBAAA,EACT,IAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-config-path.d.mts","names":[],"sources":["../../src/plugin-utils/get-config-path.ts"],"
|
|
1
|
+
{"version":3,"file":"get-config-path.d.mts","names":[],"sources":["../../src/plugin-utils/get-config-path.ts"],"mappings":";;;;;AA6BA;;;;;iBAAgB,aAAA,CACd,OAAA,EAAS,iBAAA,EACT,IAAA"}
|