@powerlines/plugin-unbuild 0.5.496 → 0.5.498
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/helpers/index.cjs +1 -1
- package/dist/helpers/index.d.cts +1 -1
- package/dist/helpers/index.d.mts +1 -1
- package/dist/helpers/resolve-options.cjs +1 -1
- package/dist/helpers/resolve-options.d.cts +1 -1
- package/dist/helpers/resolve-options.d.mts +1 -1
- package/dist/helpers/resolve-options.mjs +1 -1
- package/dist/helpers/resolve-options.mjs.map +1 -1
- package/dist/index.cjs +3 -4
- package/dist/index.d.cts +4 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{resolve-options-BYuIlqbR.d.cts → resolve-options-CNIptCnW.d.cts} +2 -2
- package/dist/resolve-options-CNIptCnW.d.cts.map +1 -0
- package/dist/{resolve-options-sRH0ysUi.d.mts → resolve-options-F-XRj-wS.d.mts} +2 -2
- package/dist/resolve-options-F-XRj-wS.d.mts.map +1 -0
- package/dist/{resolve-options-CVLVE3Eo.cjs → resolve-options-pzLge-Zw.cjs} +2 -2
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.mjs +3 -0
- package/dist/types/plugin.d.cts +1 -1
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +1 -1
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +6 -6
- package/dist/resolve-options-BYuIlqbR.d.cts.map +0 -1
- package/dist/resolve-options-sRH0ysUi.d.mts.map +0 -1
package/dist/helpers/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_resolve_options = require('../resolve-options-
|
|
2
|
+
const require_resolve_options = require('../resolve-options-pzLge-Zw.cjs');
|
|
3
3
|
|
|
4
4
|
exports.DEFAULT_UNBUILD_CONFIG = require_resolve_options.DEFAULT_UNBUILD_CONFIG;
|
|
5
5
|
exports.resolveOptions = require_resolve_options.resolveOptions;
|
package/dist/helpers/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as resolveOptions, r as unbuildLoader, t as DEFAULT_UNBUILD_CONFIG } from "../resolve-options-
|
|
1
|
+
import { n as resolveOptions, r as unbuildLoader, t as DEFAULT_UNBUILD_CONFIG } from "../resolve-options-CNIptCnW.cjs";
|
|
2
2
|
export { DEFAULT_UNBUILD_CONFIG, resolveOptions, unbuildLoader };
|
package/dist/helpers/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as resolveOptions, r as unbuildLoader, t as DEFAULT_UNBUILD_CONFIG } from "../resolve-options-
|
|
1
|
+
import { n as resolveOptions, r as unbuildLoader, t as DEFAULT_UNBUILD_CONFIG } from "../resolve-options-F-XRj-wS.mjs";
|
|
2
2
|
export { DEFAULT_UNBUILD_CONFIG, resolveOptions, unbuildLoader };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_resolve_options = require('../resolve-options-
|
|
2
|
+
const require_resolve_options = require('../resolve-options-pzLge-Zw.cjs');
|
|
3
3
|
|
|
4
4
|
exports.DEFAULT_UNBUILD_CONFIG = require_resolve_options.DEFAULT_UNBUILD_CONFIG;
|
|
5
5
|
exports.resolveOptions = require_resolve_options.resolveOptions;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as resolveOptions, r as unbuildLoader, t as DEFAULT_UNBUILD_CONFIG } from "../resolve-options-
|
|
1
|
+
import { n as resolveOptions, r as unbuildLoader, t as DEFAULT_UNBUILD_CONFIG } from "../resolve-options-CNIptCnW.cjs";
|
|
2
2
|
export { DEFAULT_UNBUILD_CONFIG, resolveOptions, unbuildLoader };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as resolveOptions, r as unbuildLoader, t as DEFAULT_UNBUILD_CONFIG } from "../resolve-options-
|
|
1
|
+
import { n as resolveOptions, r as unbuildLoader, t as DEFAULT_UNBUILD_CONFIG } from "../resolve-options-F-XRj-wS.mjs";
|
|
2
2
|
export { DEFAULT_UNBUILD_CONFIG, resolveOptions, unbuildLoader };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getString } from "@powerlines/core/lib/utilities/source-file";
|
|
2
|
-
import { resolveOptions as resolveOptions$1 } from "@powerlines/
|
|
2
|
+
import { resolveOptions as resolveOptions$1 } from "@powerlines/unplugin/rollup";
|
|
3
3
|
import { appendPath, relativePath } from "@stryke/path";
|
|
4
4
|
import { joinPaths } from "@stryke/path/join-paths";
|
|
5
5
|
import defu from "defu";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options.mjs","names":["resolveRollupOptions"],"sources":["../../src/helpers/resolve-options.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 {
|
|
1
|
+
{"version":3,"file":"resolve-options.mjs","names":["resolveRollupOptions"],"sources":["../../src/helpers/resolve-options.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 { getString } from \"@powerlines/core/lib/utilities/source-file\";\nimport { resolveOptions as resolveRollupOptions } from \"@powerlines/unplugin/rollup\";\nimport type {\n UnbuildOptions as ExternalUnbuildOptions,\n Loader,\n LoaderResult\n} from \"@storm-software/unbuild/types\";\nimport { appendPath, relativePath } from \"@stryke/path\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport { transform } from \"esbuild\";\nimport type { Context, PluginContext } from \"powerlines\";\nimport { TransformResult } from \"unplugin\";\nimport { UnbuildPluginResolvedConfig } from \"../types\";\n\nexport const DEFAULT_UNBUILD_CONFIG = {\n dts: true,\n clean: false,\n includeSrc: false,\n treeShaking: true,\n splitting: true,\n stub: false,\n watchOptions: {},\n outputPath: \"dist\",\n generatePackageJson: true,\n banner: \" \",\n rollup: {\n dts: {},\n emitCJS: true,\n replace: {},\n resolve: {},\n json: {},\n esbuild: { target: \"es2020\" },\n commonjs: {},\n alias: {}\n }\n} as Partial<ExternalUnbuildOptions>;\n\nexport const unbuildLoader = (context: PluginContext): Loader => {\n return async (input, { options }) => {\n if (\n !/\\.(?:c|m)?[jt]sx?$/.test(input.path) ||\n /\\.d\\.[cm]?ts$/.test(input.path)\n ) {\n return;\n }\n\n const output: LoaderResult = [];\n\n let contents = await input.getContents();\n\n // declaration\n if (options.declaration && !input.srcPath?.match(/\\.d\\.[cm]?ts$/)) {\n const cm = input.srcPath?.match(/(?<=\\.)(?:c|m)(?=[jt]s$)/)?.[0] || \"\";\n const extension = `.d.${cm}ts`;\n output.push({\n contents,\n srcPath: input.srcPath,\n path: input.path,\n extension,\n declaration: true\n });\n }\n\n let transformed: TransformResult | string = contents;\n\n let result = await context.callHook(\n \"transform\",\n {\n sequential: true,\n order: \"pre\"\n },\n transformed,\n input.path\n );\n if (result) {\n transformed = result;\n }\n\n result = await context.callHook(\n \"transform\",\n {\n sequential: true,\n order: \"normal\"\n },\n getString(transformed),\n input.path\n );\n if (result) {\n transformed = result;\n }\n\n result = await context.callHook(\n \"transform\",\n {\n sequential: true,\n order: \"post\"\n },\n getString(transformed),\n input.path\n );\n if (result) {\n transformed = result;\n }\n\n // typescript => js\n if ([\".ts\", \".mts\", \".cts\"].includes(input.extension)) {\n contents = await transform(getString(transformed), {\n ...Object.fromEntries(\n Object.entries(options.esbuild ?? {}).filter(\n ([key]) => key !== \"absPaths\"\n )\n ),\n loader: \"ts\"\n }).then(r => r.code);\n } else if ([\".tsx\", \".jsx\"].includes(input.extension)) {\n contents = await transform(getString(transformed), {\n loader: input.extension === \".tsx\" ? \"tsx\" : \"jsx\",\n ...Object.fromEntries(\n Object.entries(options.esbuild ?? {}).filter(\n ([key]) => key !== \"absPaths\"\n )\n )\n }).then(r => r.code);\n }\n\n // esm => cjs\n const isCjs = options.format === \"cjs\";\n if (isCjs) {\n contents = context.resolver\n .transform({\n source: contents,\n retainLines: false\n })\n .replace(/^exports.default = /gm, \"module.exports = \")\n .replace(/^var _default = exports.default = /gm, \"module.exports = \")\n .replace(\"module.exports = void 0;\", \"\");\n }\n\n let extension = isCjs ? \".js\" : \".mjs\"; // TODO: Default to .cjs in next major version\n if (options.ext) {\n extension = options.ext.startsWith(\".\") ? options.ext : `.${options.ext}`;\n }\n\n output.push({\n contents,\n path: input.path,\n extension\n });\n\n return output;\n };\n};\n\n/**\n * Extracts the unbuild configuration from the context.\n *\n * @param context - The build context.\n * @returns The resolved unbuild configuration.\n */\nexport function resolveOptions(context: Context): ExternalUnbuildOptions {\n return defu(\n {\n alias: context.alias\n },\n (context.config as UnbuildPluginResolvedConfig).unbuild\n ? (context.config as UnbuildPluginResolvedConfig).unbuild\n : {},\n {\n projectName: context.config.name,\n name: context.config.name,\n orgName: context.config.organization,\n sourceRoot: joinPaths(context.config.root, \"src\"),\n projectRoot: context.config.root,\n outputPath: relativePath(\n appendPath(context.config.root, context.config.cwd),\n context.config.output.path\n ),\n platform: context.config.platform,\n external: context.builtins.reduce((ret, id) => {\n if (!ret.includes(id)) {\n ret.push(id);\n }\n\n return ret;\n }, context.config.resolve.external ?? []),\n loaders: [unbuildLoader(context as PluginContext)],\n jiti: {\n interopDefault: true,\n fsCache: joinPaths(context.envPaths.cache, \"jiti\"),\n moduleCache: true\n },\n rollup: resolveRollupOptions(context) as any,\n debug: context.config.mode === \"development\",\n minify: context.config.output.minify,\n sourcemap: context.config.output.sourceMap\n },\n DEFAULT_UNBUILD_CONFIG\n ) as ExternalUnbuildOptions;\n}\n"],"mappings":"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"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
-
const require_resolve_options = require('./resolve-options-
|
|
2
|
+
const require_resolve_options = require('./resolve-options-pzLge-Zw.cjs');
|
|
3
3
|
require('./helpers/index.cjs');
|
|
4
|
-
require('./types/index.cjs');
|
|
5
|
-
let _powerlines_core_plugin_utils = require("@powerlines/core/plugin-utils");
|
|
6
4
|
let _storm_software_unbuild = require("@storm-software/unbuild");
|
|
5
|
+
let powerlines_plugin_utils = require("powerlines/plugin-utils");
|
|
7
6
|
|
|
8
7
|
//#region src/index.ts
|
|
9
8
|
/**
|
|
@@ -23,7 +22,7 @@ const plugin = (options = {}) => {
|
|
|
23
22
|
const options = require_resolve_options.resolveOptions(this);
|
|
24
23
|
this.debug({
|
|
25
24
|
meta: { category: "config" },
|
|
26
|
-
message: `Resolved Unbuild configuration: \n${(0,
|
|
25
|
+
message: `Resolved Unbuild configuration: \n${(0, powerlines_plugin_utils.formatConfig)(options)}`
|
|
27
26
|
});
|
|
28
27
|
await (0, _storm_software_unbuild.build)(options);
|
|
29
28
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as resolveOptions, r as unbuildLoader, t as DEFAULT_UNBUILD_CONFIG } from "./resolve-options-
|
|
1
|
+
import { n as resolveOptions, r as unbuildLoader, t as DEFAULT_UNBUILD_CONFIG } from "./resolve-options-CNIptCnW.cjs";
|
|
2
2
|
import { n as __ΩUnbuildOptions, t as UnbuildOptions } from "./build-l9DAaDS4.cjs";
|
|
3
3
|
import { UnbuildPluginContext, UnbuildPluginOptions, UnbuildPluginResolvedConfig, UnbuildPluginUserConfig, __ΩUnbuildPluginContext, __ΩUnbuildPluginOptions, __ΩUnbuildPluginResolvedConfig, __ΩUnbuildPluginUserConfig } from "./types/plugin.cjs";
|
|
4
|
-
import { Plugin } from "
|
|
4
|
+
import { Plugin } from "powerlines";
|
|
5
5
|
|
|
6
6
|
//#region src/index.d.ts
|
|
7
|
-
declare module "
|
|
7
|
+
declare module "powerlines" {
|
|
8
8
|
interface Config {
|
|
9
9
|
unbuild?: UnbuildPluginOptions;
|
|
10
10
|
}
|
|
@@ -14,5 +14,5 @@ declare module "@powerlines/core" {
|
|
|
14
14
|
*/
|
|
15
15
|
declare const plugin: <TContext extends UnbuildPluginContext = UnbuildPluginContext>(options?: UnbuildPluginOptions) => Plugin<TContext>;
|
|
16
16
|
//#endregion
|
|
17
|
-
export { DEFAULT_UNBUILD_CONFIG, UnbuildOptions, UnbuildPluginContext, UnbuildPluginOptions, UnbuildPluginResolvedConfig, UnbuildPluginUserConfig, __ΩUnbuildOptions, __ΩUnbuildPluginContext, __ΩUnbuildPluginOptions, __ΩUnbuildPluginResolvedConfig, __ΩUnbuildPluginUserConfig, plugin as default, plugin, resolveOptions, unbuildLoader };
|
|
17
|
+
export { DEFAULT_UNBUILD_CONFIG, type UnbuildOptions, type UnbuildPluginContext, type UnbuildPluginOptions, type UnbuildPluginResolvedConfig, type UnbuildPluginUserConfig, type __ΩUnbuildOptions, type __ΩUnbuildPluginContext, type __ΩUnbuildPluginOptions, type __ΩUnbuildPluginResolvedConfig, type __ΩUnbuildPluginUserConfig, plugin as default, plugin, resolveOptions, unbuildLoader };
|
|
18
18
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;YA+BY,MAAA;IACR,OAAA,GAAU,oBAAoB;EAAA;AAAA;;;;cAOrB,MAAA,oBACM,oBAAA,GAAuB,oBAAA,EAExC,OAAA,GAAS,oBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as resolveOptions, r as unbuildLoader, t as DEFAULT_UNBUILD_CONFIG } from "./resolve-options-
|
|
1
|
+
import { n as resolveOptions, r as unbuildLoader, t as DEFAULT_UNBUILD_CONFIG } from "./resolve-options-F-XRj-wS.mjs";
|
|
2
2
|
import { n as __ΩUnbuildOptions, t as UnbuildOptions } from "./build-CxohmJLn.mjs";
|
|
3
3
|
import { UnbuildPluginContext, UnbuildPluginOptions, UnbuildPluginResolvedConfig, UnbuildPluginUserConfig, __ΩUnbuildPluginContext, __ΩUnbuildPluginOptions, __ΩUnbuildPluginResolvedConfig, __ΩUnbuildPluginUserConfig } from "./types/plugin.mjs";
|
|
4
|
-
import { Plugin } from "
|
|
4
|
+
import { Plugin } from "powerlines";
|
|
5
5
|
|
|
6
6
|
//#region src/index.d.ts
|
|
7
|
-
declare module "
|
|
7
|
+
declare module "powerlines" {
|
|
8
8
|
interface Config {
|
|
9
9
|
unbuild?: UnbuildPluginOptions;
|
|
10
10
|
}
|
|
@@ -14,5 +14,5 @@ declare module "@powerlines/core" {
|
|
|
14
14
|
*/
|
|
15
15
|
declare const plugin: <TContext extends UnbuildPluginContext = UnbuildPluginContext>(options?: UnbuildPluginOptions) => Plugin<TContext>;
|
|
16
16
|
//#endregion
|
|
17
|
-
export { DEFAULT_UNBUILD_CONFIG, UnbuildOptions, UnbuildPluginContext, UnbuildPluginOptions, UnbuildPluginResolvedConfig, UnbuildPluginUserConfig, __ΩUnbuildOptions, __ΩUnbuildPluginContext, __ΩUnbuildPluginOptions, __ΩUnbuildPluginResolvedConfig, __ΩUnbuildPluginUserConfig, plugin as default, plugin, resolveOptions, unbuildLoader };
|
|
17
|
+
export { DEFAULT_UNBUILD_CONFIG, type UnbuildOptions, type UnbuildPluginContext, type UnbuildPluginOptions, type UnbuildPluginResolvedConfig, type UnbuildPluginUserConfig, type __ΩUnbuildOptions, type __ΩUnbuildPluginContext, type __ΩUnbuildPluginOptions, type __ΩUnbuildPluginResolvedConfig, type __ΩUnbuildPluginUserConfig, plugin as default, plugin, resolveOptions, unbuildLoader };
|
|
18
18
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;YA+BY,MAAA;IACR,OAAA,GAAU,oBAAoB;EAAA;AAAA;;;;cAOrB,MAAA,oBACM,oBAAA,GAAuB,oBAAA,EAExC,OAAA,GAAS,oBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_UNBUILD_CONFIG, resolveOptions, unbuildLoader } from "./helpers/resolve-options.mjs";
|
|
2
2
|
import "./helpers/index.mjs";
|
|
3
|
-
import "./types/index.mjs";
|
|
4
|
-
import { formatConfig } from "@powerlines/core/plugin-utils";
|
|
5
3
|
import { build } from "@storm-software/unbuild";
|
|
4
|
+
import { formatConfig } from "powerlines/plugin-utils";
|
|
6
5
|
|
|
7
6
|
//#region src/index.ts
|
|
8
7
|
/**
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.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 {
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.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 { build } from \"@storm-software/unbuild\";\nimport type { Plugin } from \"powerlines\";\nimport { formatConfig } from \"powerlines/plugin-utils\";\nimport { resolveOptions } from \"./helpers/resolve-options\";\nimport type {\n UnbuildPluginContext,\n UnbuildPluginOptions\n} from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n unbuild?: UnbuildPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to build projects using Unbuild.\n */\nexport const plugin = <\n TContext extends UnbuildPluginContext = UnbuildPluginContext\n>(\n options: UnbuildPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"unbuild\",\n config() {\n return {\n output: {\n format: [\"esm\"]\n },\n unbuild: {\n ...options\n }\n };\n },\n async build() {\n this.debug(\"Starting Unbuild build process...\");\n\n const options = resolveOptions(this);\n\n this.debug({\n meta: {\n category: \"config\"\n },\n message: `Resolved Unbuild configuration: \\n${formatConfig(options)}`\n });\n\n await build(options);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;AAuCA,MAAa,UAGX,UAAgC,CAAC,MACZ;CACrB,OAAO;EACL,MAAM;EACN,SAAS;GACP,OAAO;IACL,QAAQ,EACN,QAAQ,CAAC,KAAK,EAChB;IACA,SAAS,EACP,GAAG,QACL;GACF;EACF;EACA,MAAM,QAAQ;GACZ,KAAK,MAAM,mCAAmC;GAE9C,MAAM,UAAU,eAAe,IAAI;GAEnC,KAAK,MAAM;IACT,MAAM,EACJ,UAAU,SACZ;IACA,SAAS,qCAAqC,aAAa,OAAO;GACpE,CAAC;GAED,MAAM,MAAM,OAAO;EACrB;CACF;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Context, PluginContext } from "@powerlines/core";
|
|
2
1
|
import { Loader, UnbuildOptions } from "@storm-software/unbuild/types";
|
|
2
|
+
import { Context, PluginContext } from "powerlines";
|
|
3
3
|
|
|
4
4
|
//#region src/helpers/resolve-options.d.ts
|
|
5
5
|
declare const DEFAULT_UNBUILD_CONFIG: Partial<UnbuildOptions>;
|
|
@@ -13,4 +13,4 @@ declare const unbuildLoader: (context: PluginContext) => Loader;
|
|
|
13
13
|
declare function resolveOptions(context: Context): UnbuildOptions;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { resolveOptions as n, unbuildLoader as r, DEFAULT_UNBUILD_CONFIG as t };
|
|
16
|
-
//# sourceMappingURL=resolve-options-
|
|
16
|
+
//# sourceMappingURL=resolve-options-CNIptCnW.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-options-CNIptCnW.d.cts","names":[],"sources":["../src/helpers/resolve-options.ts"],"mappings":";;;;cAiCa,sBAAA,EAqBR,OAAO,CAAC,cAAA;AAAA,cAEA,aAAA,GAAiB,OAAA,EAAS,aAAA,KAAgB,MAkHtD;AAzID;;;;AAqBmC;AAEnC;AAvBA,iBAiJgB,cAAA,CAAe,OAAA,EAAS,OAAA,GAAU,cAAsB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Context, PluginContext } from "@powerlines/core";
|
|
2
1
|
import { Loader, UnbuildOptions } from "@storm-software/unbuild/types";
|
|
2
|
+
import { Context, PluginContext } from "powerlines";
|
|
3
3
|
|
|
4
4
|
//#region src/helpers/resolve-options.d.ts
|
|
5
5
|
declare const DEFAULT_UNBUILD_CONFIG: Partial<UnbuildOptions>;
|
|
@@ -13,4 +13,4 @@ declare const unbuildLoader: (context: PluginContext) => Loader;
|
|
|
13
13
|
declare function resolveOptions(context: Context): UnbuildOptions;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { resolveOptions as n, unbuildLoader as r, DEFAULT_UNBUILD_CONFIG as t };
|
|
16
|
-
//# sourceMappingURL=resolve-options-
|
|
16
|
+
//# sourceMappingURL=resolve-options-F-XRj-wS.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-options-F-XRj-wS.d.mts","names":[],"sources":["../src/helpers/resolve-options.ts"],"mappings":";;;;cAiCa,sBAAA,EAqBR,OAAO,CAAC,cAAA;AAAA,cAEA,aAAA,GAAiB,OAAA,EAAS,aAAA,KAAgB,MAkHtD;AAzID;;;;AAqBmC;AAEnC;AAvBA,iBAiJgB,cAAA,CAAe,OAAA,EAAS,OAAA,GAAU,cAAsB"}
|
|
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
|
|
27
27
|
//#endregion
|
|
28
28
|
let _powerlines_core_lib_utilities_source_file = require("@powerlines/core/lib/utilities/source-file");
|
|
29
|
-
let
|
|
29
|
+
let _powerlines_unplugin_rollup = require("@powerlines/unplugin/rollup");
|
|
30
30
|
let _stryke_path = require("@stryke/path");
|
|
31
31
|
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
32
32
|
let defu = require("defu");
|
|
@@ -139,7 +139,7 @@ function resolveOptions(context) {
|
|
|
139
139
|
fsCache: (0, _stryke_path_join_paths.joinPaths)(context.envPaths.cache, "jiti"),
|
|
140
140
|
moduleCache: true
|
|
141
141
|
},
|
|
142
|
-
rollup: (0,
|
|
142
|
+
rollup: (0, _powerlines_unplugin_rollup.resolveOptions)(context),
|
|
143
143
|
debug: context.config.mode === "development",
|
|
144
144
|
minify: context.config.output.minify,
|
|
145
145
|
sourcemap: context.config.output.sourceMap
|
package/dist/types/index.cjs
CHANGED
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as UnbuildOptions } from "../build-l9DAaDS4.cjs";
|
|
2
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "
|
|
2
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
3
3
|
|
|
4
4
|
//#region src/types/plugin.d.ts
|
|
5
5
|
type UnbuildPluginOptions = Partial<UnbuildOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;KAqBY,oBAAA,GAAuB,
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;KAqBY,oBAAA,GAAuB,OAAO,CAAC,cAAA;AAAA,UAE1B,uBAAA,SAAgC,UAAU;EACzD,OAAA,GAAU,oBAAA;AAAA;AAAA,UAGK,2BAAA,SAAoC,cAAc;EACjE,OAAA,EAAS,cAAA;AAAA;AAAA,KAGC,oBAAA,yBACc,2BAAA,GACtB,2BAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as UnbuildOptions } from "../build-CxohmJLn.mjs";
|
|
2
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "
|
|
2
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
3
3
|
|
|
4
4
|
//#region src/types/plugin.d.ts
|
|
5
5
|
type UnbuildPluginOptions = Partial<UnbuildOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;KAqBY,oBAAA,GAAuB,
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;KAqBY,oBAAA,GAAuB,OAAO,CAAC,cAAA;AAAA,UAE1B,uBAAA,SAAgC,UAAU;EACzD,OAAA,GAAU,oBAAA;AAAA;AAAA,UAGK,2BAAA,SAAoC,cAAc;EACjE,OAAA,EAAS,cAAA;AAAA;AAAA,KAGC,oBAAA,yBACc,2BAAA,GACtB,2BAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-unbuild",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.498",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Powerlines plugin to build projects using Unbuild.",
|
|
6
6
|
"keywords": ["unbuild", "powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -69,22 +69,22 @@
|
|
|
69
69
|
"typings": "dist/index.d.mts",
|
|
70
70
|
"files": ["dist"],
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@powerlines/core": "^0.15.
|
|
73
|
-
"@powerlines/
|
|
74
|
-
"@powerlines/unplugin": "^0.0.33",
|
|
72
|
+
"@powerlines/core": "^0.15.20",
|
|
73
|
+
"@powerlines/unplugin": "^0.0.35",
|
|
75
74
|
"@stryke/helpers": "^0.10.16",
|
|
76
75
|
"@stryke/path": "^0.29.3",
|
|
77
76
|
"@stryke/type-checks": "^0.6.9",
|
|
78
77
|
"defu": "^6.1.7",
|
|
79
78
|
"esbuild": "^0.27.7",
|
|
79
|
+
"powerlines": "^0.47.42",
|
|
80
80
|
"unplugin": "^3.0.0"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@storm-software/unbuild": "^0.57.181",
|
|
84
|
-
"@types/node": "^25.
|
|
84
|
+
"@types/node": "^25.9.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": { "@storm-software/unbuild": ">=0.57.0" },
|
|
87
87
|
"peerDependenciesMeta": { "@storm-software/unbuild": { "optional": false } },
|
|
88
88
|
"publishConfig": { "access": "public" },
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "2dbbdb2f6fde8f0f49208757c7c1b18deb96ff97"
|
|
90
90
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options-BYuIlqbR.d.cts","names":[],"sources":["../src/helpers/resolve-options.ts"],"mappings":";;;;cAiCa,sBAAA,EAqBR,OAAA,CAAQ,cAAA;AAAA,cAEA,aAAA,GAAiB,OAAA,EAAS,aAAA,KAAgB,MAAA;AAvBvD;;;;;AAuBA;AAvBA,iBAiJgB,cAAA,CAAe,OAAA,EAAS,OAAA,GAAU,cAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options-sRH0ysUi.d.mts","names":[],"sources":["../src/helpers/resolve-options.ts"],"mappings":";;;;cAiCa,sBAAA,EAqBR,OAAA,CAAQ,cAAA;AAAA,cAEA,aAAA,GAAiB,OAAA,EAAS,aAAA,KAAgB,MAAA;AAvBvD;;;;;AAuBA;AAvBA,iBAiJgB,cAAA,CAAe,OAAA,EAAS,OAAA,GAAU,cAAA"}
|