powerlines 0.44.12 → 0.45.1

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.
Files changed (68) hide show
  1. package/dist/astro.cjs +1 -1
  2. package/dist/astro.d.cts +2 -2
  3. package/dist/astro.d.cts.map +1 -1
  4. package/dist/astro.d.mts +2 -2
  5. package/dist/astro.d.mts.map +1 -1
  6. package/dist/astro.mjs +1 -1
  7. package/dist/astro.mjs.map +1 -1
  8. package/dist/engine.cjs +2 -2
  9. package/dist/engine.d.cts +1 -1
  10. package/dist/engine.d.cts.map +1 -1
  11. package/dist/engine.d.mts +1 -1
  12. package/dist/engine.d.mts.map +1 -1
  13. package/dist/engine.mjs +2 -2
  14. package/dist/engine.mjs.map +1 -1
  15. package/dist/esbuild.d.cts +2 -2
  16. package/dist/esbuild.d.cts.map +1 -1
  17. package/dist/esbuild.d.mts +2 -2
  18. package/dist/esbuild.d.mts.map +1 -1
  19. package/dist/esbuild.mjs.map +1 -1
  20. package/dist/farm.d.cts +1 -1
  21. package/dist/farm.d.cts.map +1 -1
  22. package/dist/farm.d.mts +1 -1
  23. package/dist/farm.d.mts.map +1 -1
  24. package/dist/index.cjs +6 -3
  25. package/dist/index.d.cts +1 -1
  26. package/dist/index.d.cts.map +1 -1
  27. package/dist/index.d.mts +1 -1
  28. package/dist/index.d.mts.map +1 -1
  29. package/dist/index.mjs +6 -3
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/package.cjs +1 -1
  32. package/dist/package.mjs +1 -1
  33. package/dist/rolldown.d.cts +2 -2
  34. package/dist/rolldown.d.cts.map +1 -1
  35. package/dist/rolldown.d.mts +2 -2
  36. package/dist/rolldown.d.mts.map +1 -1
  37. package/dist/rolldown.mjs.map +1 -1
  38. package/dist/rollup.d.cts +2 -2
  39. package/dist/rollup.d.cts.map +1 -1
  40. package/dist/rollup.d.mts +2 -2
  41. package/dist/rollup.d.mts.map +1 -1
  42. package/dist/rollup.mjs.map +1 -1
  43. package/dist/rspack.d.cts +2 -2
  44. package/dist/rspack.d.cts.map +1 -1
  45. package/dist/rspack.d.mts +2 -2
  46. package/dist/rspack.d.mts.map +1 -1
  47. package/dist/rspack.mjs.map +1 -1
  48. package/dist/tsdown.cjs +1 -0
  49. package/dist/tsdown.mjs +1 -0
  50. package/dist/tsdown.mjs.map +1 -1
  51. package/dist/unloader.d.cts +1 -1
  52. package/dist/unloader.d.cts.map +1 -1
  53. package/dist/unloader.d.mts +1 -1
  54. package/dist/unloader.d.mts.map +1 -1
  55. package/dist/unplugin.cjs +11 -13
  56. package/dist/unplugin.mjs +11 -13
  57. package/dist/unplugin.mjs.map +1 -1
  58. package/dist/vite.d.cts +2 -2
  59. package/dist/vite.d.cts.map +1 -1
  60. package/dist/vite.d.mts +2 -2
  61. package/dist/vite.d.mts.map +1 -1
  62. package/dist/vite.mjs.map +1 -1
  63. package/dist/webpack.d.cts +2 -2
  64. package/dist/webpack.d.cts.map +1 -1
  65. package/dist/webpack.d.mts +2 -2
  66. package/dist/webpack.d.mts.map +1 -1
  67. package/dist/webpack.mjs.map +1 -1
  68. package/package.json +4 -4
package/dist/astro.cjs CHANGED
@@ -19,7 +19,7 @@ const require_vite = require('./vite.cjs');
19
19
  *
20
20
  * ```
21
21
  */
22
- const unplugin = (config = {}) => ({ vite: { plugins: [require_vite.unplugin(config)] } });
22
+ const unplugin = (config) => ({ vite: { plugins: [require_vite.unplugin(config)] } });
23
23
 
24
24
  //#endregion
25
25
  exports.astro = unplugin;
package/dist/astro.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { VitePluginUserConfig } from "@powerlines/plugin-vite/types/plugin";
1
+ import { VitePluginInitialConfig } from "@powerlines/plugin-vite/types/plugin";
2
2
  import { AstroUserConfig } from "astro";
3
3
 
4
4
  //#region src/astro.d.ts
@@ -19,7 +19,7 @@ import { AstroUserConfig } from "astro";
19
19
  *
20
20
  * ```
21
21
  */
22
- declare const unplugin: (config?: Partial<VitePluginUserConfig>) => AstroUserConfig;
22
+ declare const unplugin: (config: VitePluginInitialConfig) => AstroUserConfig;
23
23
  //#endregion
24
24
  export { unplugin as astro, unplugin };
25
25
  //# sourceMappingURL=astro.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"astro.d.cts","names":[],"sources":["../src/astro.ts"],"mappings":";;;;;;AAuCA;;;;;;;;;;;;;;;cAAa,QAAA,GACX,MAAA,GAAQ,OAAA,CAAQ,oBAAA,MACf,eAAA"}
1
+ {"version":3,"file":"astro.d.cts","names":[],"sources":["../src/astro.ts"],"mappings":";;;;;;AAuCA;;;;;;;;;;;;;;;cAAa,QAAA,GAAY,MAAA,EAAQ,uBAAA,KAA0B,eAAA"}
package/dist/astro.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { VitePluginUserConfig } from "@powerlines/plugin-vite/types/plugin";
1
+ import { VitePluginInitialConfig } from "@powerlines/plugin-vite/types/plugin";
2
2
  import { AstroUserConfig } from "astro";
3
3
 
4
4
  //#region src/astro.d.ts
@@ -19,7 +19,7 @@ import { AstroUserConfig } from "astro";
19
19
  *
20
20
  * ```
21
21
  */
22
- declare const unplugin: (config?: Partial<VitePluginUserConfig>) => AstroUserConfig;
22
+ declare const unplugin: (config: VitePluginInitialConfig) => AstroUserConfig;
23
23
  //#endregion
24
24
  export { unplugin as astro, unplugin };
25
25
  //# sourceMappingURL=astro.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"astro.d.mts","names":[],"sources":["../src/astro.ts"],"mappings":";;;;;;AAuCA;;;;;;;;;;;;;;;cAAa,QAAA,GACX,MAAA,GAAQ,OAAA,CAAQ,oBAAA,MACf,eAAA"}
1
+ {"version":3,"file":"astro.d.mts","names":[],"sources":["../src/astro.ts"],"mappings":";;;;;;AAuCA;;;;;;;;;;;;;;;cAAa,QAAA,GAAY,MAAA,EAAQ,uBAAA,KAA0B,eAAA"}
package/dist/astro.mjs CHANGED
@@ -18,7 +18,7 @@ import { unplugin as unplugin$1 } from "./vite.mjs";
18
18
  *
19
19
  * ```
20
20
  */
21
- const unplugin = (config = {}) => ({ vite: { plugins: [unplugin$1(config)] } });
21
+ const unplugin = (config) => ({ vite: { plugins: [unplugin$1(config)] } });
22
22
 
23
23
  //#endregion
24
24
  export { unplugin as astro, unplugin };
@@ -1 +1 @@
1
- {"version":3,"file":"astro.mjs","names":["vite"],"sources":["../src/astro.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 type { VitePluginUserConfig } from \"@powerlines/plugin-vite/types/plugin\";\nimport type { AstroUserConfig } from \"astro\";\nimport { unplugin as vite } from \"./vite\";\n\n/**\n * An Astro plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://docs.astro.build/en/guides/integrations-guide/#creating-an-integration\n *\n * @example\n * ```js\n * // astro.config.mjs\n * import { defineConfig } from \"astro/config\";\n * import powerlines from \"powerlines/astro\";\n *\n * export default defineConfig({\n * integrations: [powerlines({ name: \"example-app\", ... })]\n * });\n *\n * ```\n */\nexport const unplugin = (\n config: Partial<VitePluginUserConfig> = {}\n): AstroUserConfig => ({\n vite: {\n plugins: [vite(config)] as NonNullable<AstroUserConfig[\"vite\"]>[\"plugins\"]\n }\n});\n\nexport { unplugin as astro };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuCA,MAAa,YACX,SAAwC,EAAE,MACrB,EACrB,MAAM,EACJ,SAAS,CAACA,WAAK,OAAO,CAAC,EACxB,EACF"}
1
+ {"version":3,"file":"astro.mjs","names":["vite"],"sources":["../src/astro.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 type { VitePluginInitialConfig } from \"@powerlines/plugin-vite/types/plugin\";\nimport type { AstroUserConfig } from \"astro\";\nimport { unplugin as vite } from \"./vite\";\n\n/**\n * An Astro plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://docs.astro.build/en/guides/integrations-guide/#creating-an-integration\n *\n * @example\n * ```js\n * // astro.config.mjs\n * import { defineConfig } from \"astro/config\";\n * import powerlines from \"powerlines/astro\";\n *\n * export default defineConfig({\n * integrations: [powerlines({ name: \"example-app\", ... })]\n * });\n *\n * ```\n */\nexport const unplugin = (config: VitePluginInitialConfig): AstroUserConfig => ({\n vite: {\n plugins: [vite(config)] as NonNullable<AstroUserConfig[\"vite\"]>[\"plugins\"]\n }\n});\n\nexport { unplugin as astro };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuCA,MAAa,YAAY,YAAsD,EAC7E,MAAM,EACJ,SAAS,CAACA,WAAK,OAAO,CAAC,EACxB,EACF"}
package/dist/engine.cjs CHANGED
@@ -19,8 +19,8 @@ var PowerlinesEngine = class extends _powerlines_engine.PowerlinesEngine {
19
19
  * @param options - The options to initialize the context with
20
20
  * @returns A new instance of the Powerlines Engine
21
21
  */
22
- static async fromOptions(options) {
23
- const engine = await _powerlines_engine.PowerlinesEngine.fromOptions(options);
22
+ static async init(options) {
23
+ const engine = await _powerlines_engine.PowerlinesEngine.init(options);
24
24
  engine.context.info(`🔌 The Powerlines Engine v${require_package.version} has started`);
25
25
  return engine;
26
26
  }
package/dist/engine.d.cts CHANGED
@@ -17,7 +17,7 @@ declare class PowerlinesEngine extends PowerlinesEngine$1 {
17
17
  * @param options - The options to initialize the context with
18
18
  * @returns A new instance of the Powerlines Engine
19
19
  */
20
- static fromOptions(options: types_d_exports.EngineOptions): Promise<PowerlinesEngine>;
20
+ static init(options: types_d_exports.EngineOptions): Promise<PowerlinesEngine>;
21
21
  }
22
22
  //#endregion
23
23
  export { PowerlinesEngine };
@@ -1 +1 @@
1
- {"version":3,"file":"engine.d.cts","names":[],"sources":["../src/engine.ts"],"mappings":";;;;;;AA8BA;;;;;;cAAa,gBAAA,SAAyB,kBAAA;EAAwB;;;;;;EAAA,OAO/B,WAAA,CAC3B,OAAA,EAAS,eAAA,CAAA,aAAA,GACR,OAAA,CAAQ,gBAAA;AAAA"}
1
+ {"version":3,"file":"engine.d.cts","names":[],"sources":["../src/engine.ts"],"mappings":";;;;;;AA8BA;;;;;;cAAa,gBAAA,SAAyB,kBAAA;EAAwB;;;;;;EAAA,OAO/B,IAAA,CAC3B,OAAA,EAAS,eAAA,CAAA,aAAA,GACR,OAAA,CAAQ,gBAAA;AAAA"}
package/dist/engine.d.mts CHANGED
@@ -17,7 +17,7 @@ declare class PowerlinesEngine extends PowerlinesEngine$1 {
17
17
  * @param options - The options to initialize the context with
18
18
  * @returns A new instance of the Powerlines Engine
19
19
  */
20
- static fromOptions(options: types_d_exports.EngineOptions): Promise<PowerlinesEngine>;
20
+ static init(options: types_d_exports.EngineOptions): Promise<PowerlinesEngine>;
21
21
  }
22
22
  //#endregion
23
23
  export { PowerlinesEngine };
@@ -1 +1 @@
1
- {"version":3,"file":"engine.d.mts","names":[],"sources":["../src/engine.ts"],"mappings":";;;;;;AA8BA;;;;;;cAAa,gBAAA,SAAyB,kBAAA;EAAwB;;;;;;EAAA,OAO/B,WAAA,CAC3B,OAAA,EAAS,eAAA,CAAA,aAAA,GACR,OAAA,CAAQ,gBAAA;AAAA"}
1
+ {"version":3,"file":"engine.d.mts","names":[],"sources":["../src/engine.ts"],"mappings":";;;;;;AA8BA;;;;;;cAAa,gBAAA,SAAyB,kBAAA;EAAwB;;;;;;EAAA,OAO/B,IAAA,CAC3B,OAAA,EAAS,eAAA,CAAA,aAAA,GACR,OAAA,CAAQ,gBAAA;AAAA"}
package/dist/engine.mjs CHANGED
@@ -17,8 +17,8 @@ var PowerlinesEngine = class extends PowerlinesEngine$1 {
17
17
  * @param options - The options to initialize the context with
18
18
  * @returns A new instance of the Powerlines Engine
19
19
  */
20
- static async fromOptions(options) {
21
- const engine = await PowerlinesEngine$1.fromOptions(options);
20
+ static async init(options) {
21
+ const engine = await PowerlinesEngine$1.init(options);
22
22
  engine.context.info(`🔌 The Powerlines Engine v${version} has started`);
23
23
  return engine;
24
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"engine.mjs","names":["InternalPowerlinesEngine","packageJson.version"],"sources":["../src/engine.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 { PowerlinesEngine as InternalPowerlinesEngine } from \"@powerlines/engine\";\nimport packageJson from \"../package.json\" with { type: \"json\" };\nimport type { EngineOptions } from \"./types\";\n\n/**\n * The Powerlines Engine class\n *\n * @remarks\n * This class is responsible for managing the Powerlines project lifecycle, including initialization, building, and finalization.\n *\n * @public\n */\nexport class PowerlinesEngine extends InternalPowerlinesEngine {\n /**\n * Initialize a Powerlines Engine instance\n *\n * @param options - The options to initialize the context with\n * @returns A new instance of the Powerlines Engine\n */\n public static override async fromOptions(\n options: EngineOptions\n ): Promise<PowerlinesEngine> {\n const engine = await InternalPowerlinesEngine.fromOptions(options);\n\n engine.context.info(\n `🔌 The Powerlines Engine v${packageJson.version} has started`\n );\n\n return engine;\n }\n}\n"],"mappings":";;;;;;;;;;;;AA8BA,IAAa,mBAAb,cAAsCA,mBAAyB;;;;;;;CAO7D,aAA6B,YAC3B,SAC2B;EAC3B,MAAM,SAAS,MAAMA,mBAAyB,YAAY,QAAQ;AAElE,SAAO,QAAQ,KACb,6BAA6BC,QAAoB,cAClD;AAED,SAAO"}
1
+ {"version":3,"file":"engine.mjs","names":["InternalPowerlinesEngine","packageJson.version"],"sources":["../src/engine.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 { PowerlinesEngine as InternalPowerlinesEngine } from \"@powerlines/engine\";\nimport packageJson from \"../package.json\" with { type: \"json\" };\nimport type { EngineOptions } from \"./types\";\n\n/**\n * The Powerlines Engine class\n *\n * @remarks\n * This class is responsible for managing the Powerlines project lifecycle, including initialization, building, and finalization.\n *\n * @public\n */\nexport class PowerlinesEngine extends InternalPowerlinesEngine {\n /**\n * Initialize a Powerlines Engine instance\n *\n * @param options - The options to initialize the context with\n * @returns A new instance of the Powerlines Engine\n */\n public static override async init(\n options: EngineOptions\n ): Promise<PowerlinesEngine> {\n const engine = await InternalPowerlinesEngine.init(options);\n\n engine.context.info(\n `🔌 The Powerlines Engine v${packageJson.version} has started`\n );\n\n return engine;\n }\n}\n"],"mappings":";;;;;;;;;;;;AA8BA,IAAa,mBAAb,cAAsCA,mBAAyB;;;;;;;CAO7D,aAA6B,KAC3B,SAC2B;EAC3B,MAAM,SAAS,MAAMA,mBAAyB,KAAK,QAAQ;AAE3D,SAAO,QAAQ,KACb,6BAA6BC,QAAoB,cAClD;AAED,SAAO"}
@@ -1,5 +1,5 @@
1
1
  import * as _$esbuild from "esbuild";
2
- import { EsbuildPluginUserConfig } from "@powerlines/plugin-esbuild/types/plugin";
2
+ import { EsbuildPluginInitialConfig } from "@powerlines/plugin-esbuild/types/plugin";
3
3
  import esbuild, { default as plugin } from "@powerlines/plugin-esbuild";
4
4
 
5
5
  //#region src/esbuild.d.ts
@@ -19,7 +19,7 @@ import esbuild, { default as plugin } from "@powerlines/plugin-esbuild";
19
19
  *
20
20
  * ```
21
21
  */
22
- declare const unplugin: (options: Partial<EsbuildPluginUserConfig>) => _$esbuild.Plugin;
22
+ declare const unplugin: (options: EsbuildPluginInitialConfig) => _$esbuild.Plugin;
23
23
  //#endregion
24
24
  export { esbuild, plugin, unplugin };
25
25
  //# sourceMappingURL=esbuild.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"esbuild.d.cts","names":[],"sources":["../src/esbuild.ts"],"mappings":";;;;;;;;AA8CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,uBAAA,MAAA,SAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"esbuild.d.cts","names":[],"sources":["../src/esbuild.ts"],"mappings":";;;;;;;;AA8CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,0BAAA,KAAA,SAAA,CAAA,MAAA"}
@@ -1,6 +1,6 @@
1
1
  import esbuild, { default as plugin } from "@powerlines/plugin-esbuild";
2
2
  import * as _$esbuild from "esbuild";
3
- import { EsbuildPluginUserConfig } from "@powerlines/plugin-esbuild/types/plugin";
3
+ import { EsbuildPluginInitialConfig } from "@powerlines/plugin-esbuild/types/plugin";
4
4
 
5
5
  //#region src/esbuild.d.ts
6
6
  /**
@@ -19,7 +19,7 @@ import { EsbuildPluginUserConfig } from "@powerlines/plugin-esbuild/types/plugin
19
19
  *
20
20
  * ```
21
21
  */
22
- declare const unplugin: (options: Partial<EsbuildPluginUserConfig>) => _$esbuild.Plugin;
22
+ declare const unplugin: (options: EsbuildPluginInitialConfig) => _$esbuild.Plugin;
23
23
  //#endregion
24
24
  export { esbuild, plugin, unplugin };
25
25
  //# sourceMappingURL=esbuild.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"esbuild.d.mts","names":[],"sources":["../src/esbuild.ts"],"mappings":";;;;;;;;AA8CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,uBAAA,MAAA,SAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"esbuild.d.mts","names":[],"sources":["../src/esbuild.ts"],"mappings":";;;;;;;;AA8CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,0BAAA,KAAA,SAAA,CAAA,MAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"esbuild.mjs","names":[],"sources":["../src/esbuild.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 { resolveOptions } from \"@powerlines/plugin-esbuild/helpers/resolve-options\";\nimport { EsbuildPluginUserConfig } from \"@powerlines/plugin-esbuild/types/plugin\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport type { BuildOptions, PluginBuild } from \"esbuild\";\nimport { createEsbuildPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {\n default as esbuild,\n default as plugin\n} from \"@powerlines/plugin-esbuild\";\n\n/**\n * An ESBuild plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://esbuild.github.io/plugins/\n *\n * @example\n * ```js\n * // esbuild.config.js\n * import powerlines from \"powerlines/esbuild\";\n *\n * export default {\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * };\n *\n * ```\n */\nexport const unplugin = createEsbuildPlugin<Partial<EsbuildPluginUserConfig>>(\n createUnpluginFactory(\"esbuild\", (api, plugin) => {\n return {\n ...plugin,\n esbuild: {\n config: options => {\n options ??= {};\n\n const result = resolveOptions(api.context);\n for (const key in result) {\n if (\n isUndefined(options[key as keyof BuildOptions]) &&\n !isUndefined(result[key as keyof BuildOptions])\n ) {\n options[key as keyof BuildOptions] = result[\n key as keyof BuildOptions\n ] as any;\n }\n }\n },\n setup: async (build: PluginBuild) => {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\"esbuild:setup\", { environment }, build);\n }\n }\n };\n })\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,WAAW,oBACtB,sBAAsB,YAAY,KAAK,WAAW;AAChD,QAAO;EACL,GAAG;EACH,SAAS;GACP,SAAQ,YAAW;AACjB,gBAAY,EAAE;IAEd,MAAM,SAAS,eAAe,IAAI,QAAQ;AAC1C,SAAK,MAAM,OAAO,OAChB,KACE,YAAY,QAAQ,KAA2B,IAC/C,CAAC,YAAY,OAAO,KAA2B,CAE/C,SAAQ,OAA6B,OACnC;;GAKR,OAAO,OAAO,UAAuB;IACnC,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SAAS,iBAAiB,EAAE,aAAa,EAAE,MAAM;;GAE/D;EACF;EACD,CACH"}
1
+ {"version":3,"file":"esbuild.mjs","names":[],"sources":["../src/esbuild.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 { resolveOptions } from \"@powerlines/plugin-esbuild/helpers/resolve-options\";\nimport { EsbuildPluginInitialConfig } from \"@powerlines/plugin-esbuild/types/plugin\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport type { BuildOptions, PluginBuild } from \"esbuild\";\nimport { createEsbuildPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {\n default as esbuild,\n default as plugin\n} from \"@powerlines/plugin-esbuild\";\n\n/**\n * An ESBuild plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://esbuild.github.io/plugins/\n *\n * @example\n * ```js\n * // esbuild.config.js\n * import powerlines from \"powerlines/esbuild\";\n *\n * export default {\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * };\n *\n * ```\n */\nexport const unplugin = createEsbuildPlugin<EsbuildPluginInitialConfig>(\n createUnpluginFactory(\"esbuild\", (api, plugin) => {\n return {\n ...plugin,\n esbuild: {\n config: options => {\n options ??= {};\n\n const result = resolveOptions(api.context);\n for (const key in result) {\n if (\n isUndefined(options[key as keyof BuildOptions]) &&\n !isUndefined(result[key as keyof BuildOptions])\n ) {\n options[key as keyof BuildOptions] = result[\n key as keyof BuildOptions\n ] as any;\n }\n }\n },\n setup: async (build: PluginBuild) => {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\"esbuild:setup\", { environment }, build);\n }\n }\n };\n })\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,WAAW,oBACtB,sBAAsB,YAAY,KAAK,WAAW;AAChD,QAAO;EACL,GAAG;EACH,SAAS;GACP,SAAQ,YAAW;AACjB,gBAAY,EAAE;IAEd,MAAM,SAAS,eAAe,IAAI,QAAQ;AAC1C,SAAK,MAAM,OAAO,OAChB,KACE,YAAY,QAAQ,KAA2B,IAC/C,CAAC,YAAY,OAAO,KAA2B,CAE/C,SAAQ,OAA6B,OACnC;;GAKR,OAAO,OAAO,UAAuB;IACnC,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SAAS,iBAAiB,EAAE,aAAa,EAAE,MAAM;;GAE/D;EACF;EACD,CACH"}
package/dist/farm.d.cts CHANGED
@@ -19,7 +19,7 @@ import * as _$_farmfe_core0 from "@farmfe/core";
19
19
  *
20
20
  * ```
21
21
  */
22
- declare const unplugin: (options: Partial<_$_powerlines_core0.UserConfig>) => _$_farmfe_core0.JsPlugin;
22
+ declare const unplugin: (options: _$_powerlines_core0.InitialPluginConfig<_$_powerlines_core0.UserConfig>) => _$_farmfe_core0.JsPlugin;
23
23
  //#endregion
24
24
  export { unplugin as farm, unplugin };
25
25
  //# sourceMappingURL=farm.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"farm.d.cts","names":[],"sources":["../src/farm.ts"],"mappings":";;;;;;;;AAsCA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAkD,mBAAA,CAAlD,UAAA,MAAA,eAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"farm.d.cts","names":[],"sources":["../src/farm.ts"],"mappings":";;;;;;;;AAsCA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,mBAAA,CAAA,mBAAA,CAAkD,mBAAA,CAAlD,UAAA,MAAA,eAAA,CAAA,QAAA"}
package/dist/farm.d.mts CHANGED
@@ -19,7 +19,7 @@ import * as _$_farmfe_core0 from "@farmfe/core";
19
19
  *
20
20
  * ```
21
21
  */
22
- declare const unplugin: (options: Partial<_$_powerlines_core0.UserConfig>) => _$_farmfe_core0.JsPlugin;
22
+ declare const unplugin: (options: _$_powerlines_core0.InitialPluginConfig<_$_powerlines_core0.UserConfig>) => _$_farmfe_core0.JsPlugin;
23
23
  //#endregion
24
24
  export { unplugin as farm, unplugin };
25
25
  //# sourceMappingURL=farm.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"farm.d.mts","names":[],"sources":["../src/farm.ts"],"mappings":";;;;;;;;AAsCA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAkD,mBAAA,CAAlD,UAAA,MAAA,eAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"farm.d.mts","names":[],"sources":["../src/farm.ts"],"mappings":";;;;;;;;AAsCA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,mBAAA,CAAA,mBAAA,CAAkD,mBAAA,CAAlD,UAAA,MAAA,eAAA,CAAA,QAAA"}
package/dist/index.cjs CHANGED
@@ -20,7 +20,7 @@ let _powerlines_engine_api = require("@powerlines/engine/api");
20
20
  * @returns A promise that resolves to a {@link PowerlinesEngine} instance.
21
21
  */
22
22
  async function createEngine(options) {
23
- return require_engine.PowerlinesEngine.fromOptions(options);
23
+ return require_engine.PowerlinesEngine.init(options);
24
24
  }
25
25
  /**
26
26
  * Creates a new {@link PowerlinesAPI} instance.
@@ -28,8 +28,11 @@ async function createEngine(options) {
28
28
  * @param options - The user configuration options.
29
29
  * @returns A promise that resolves to a {@link PowerlinesAPI} instance.
30
30
  */
31
- async function createAPI(options, override) {
32
- return _powerlines_engine_api.PowerlinesAPI.fromOptions(options, override);
31
+ async function createAPI(options) {
32
+ return _powerlines_engine_api.PowerlinesAPI.init({
33
+ cwd: process.cwd(),
34
+ ...options
35
+ });
33
36
  }
34
37
 
35
38
  //#endregion
package/dist/index.d.cts CHANGED
@@ -20,7 +20,7 @@ declare function createEngine(options: types_d_exports.EngineOptions): Promise<P
20
20
  * @param options - The user configuration options.
21
21
  * @returns A promise that resolves to a {@link PowerlinesAPI} instance.
22
22
  */
23
- declare function createAPI<TResolvedConfig extends types_d_exports.ResolvedConfig = types_d_exports.ResolvedConfig>(options: types_d_exports.EngineOptions, override?: Partial<TResolvedConfig>): Promise<PowerlinesAPI<TResolvedConfig>>;
23
+ declare function createAPI<TResolvedConfig extends types_d_exports.ResolvedConfig = types_d_exports.ResolvedConfig>(options: types_d_exports.EngineOptions): Promise<PowerlinesAPI<TResolvedConfig>>;
24
24
  //#endregion
25
25
  export { PowerlinesAPI, PowerlinesEngine, createAPI, createEngine };
26
26
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;AAuCA;;;iBAAsB,YAAA,CACpB,OAAA,EAAS,eAAA,CAAA,aAAA,GACR,OAAA,CAAQ,gBAAA;;;;;;;iBAUW,SAAA,yBACI,eAAA,CAAA,cAAA,GAAiB,eAAA,CAAA,cAAA,CAAA,CAEzC,OAAA,EAAS,eAAA,CAAA,aAAA,EACT,QAAA,GAAW,OAAA,CAAQ,eAAA,IAClB,OAAA,CAAQ,aAAA,CAAc,eAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;AAuCA;;;iBAAsB,YAAA,CACpB,OAAA,EAAS,eAAA,CAAA,aAAA,GACR,OAAA,CAAQ,gBAAA;;;;;;;iBAUW,SAAA,yBACI,eAAA,CAAA,cAAA,GAAiB,eAAA,CAAA,cAAA,CAAA,CACzC,OAAA,EAAS,eAAA,CAAA,aAAA,GAAgB,OAAA,CAAQ,aAAA,CAAc,eAAA"}
package/dist/index.d.mts CHANGED
@@ -20,7 +20,7 @@ declare function createEngine(options: types_d_exports.EngineOptions): Promise<P
20
20
  * @param options - The user configuration options.
21
21
  * @returns A promise that resolves to a {@link PowerlinesAPI} instance.
22
22
  */
23
- declare function createAPI<TResolvedConfig extends types_d_exports.ResolvedConfig = types_d_exports.ResolvedConfig>(options: types_d_exports.EngineOptions, override?: Partial<TResolvedConfig>): Promise<PowerlinesAPI<TResolvedConfig>>;
23
+ declare function createAPI<TResolvedConfig extends types_d_exports.ResolvedConfig = types_d_exports.ResolvedConfig>(options: types_d_exports.EngineOptions): Promise<PowerlinesAPI<TResolvedConfig>>;
24
24
  //#endregion
25
25
  export { PowerlinesAPI, PowerlinesEngine, createAPI, createEngine };
26
26
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;AAuCA;;;iBAAsB,YAAA,CACpB,OAAA,EAAS,eAAA,CAAA,aAAA,GACR,OAAA,CAAQ,gBAAA;;;;;;;iBAUW,SAAA,yBACI,eAAA,CAAA,cAAA,GAAiB,eAAA,CAAA,cAAA,CAAA,CAEzC,OAAA,EAAS,eAAA,CAAA,aAAA,EACT,QAAA,GAAW,OAAA,CAAQ,eAAA,IAClB,OAAA,CAAQ,aAAA,CAAc,eAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;AAuCA;;;iBAAsB,YAAA,CACpB,OAAA,EAAS,eAAA,CAAA,aAAA,GACR,OAAA,CAAQ,gBAAA;;;;;;;iBAUW,SAAA,yBACI,eAAA,CAAA,cAAA,GAAiB,eAAA,CAAA,cAAA,CAAA,CACzC,OAAA,EAAS,eAAA,CAAA,aAAA,GAAgB,OAAA,CAAQ,aAAA,CAAc,eAAA"}
package/dist/index.mjs CHANGED
@@ -17,7 +17,7 @@ import { PowerlinesEngine } from "./engine.mjs";
17
17
  * @returns A promise that resolves to a {@link PowerlinesEngine} instance.
18
18
  */
19
19
  async function createEngine(options) {
20
- return PowerlinesEngine.fromOptions(options);
20
+ return PowerlinesEngine.init(options);
21
21
  }
22
22
  /**
23
23
  * Creates a new {@link PowerlinesAPI} instance.
@@ -25,8 +25,11 @@ async function createEngine(options) {
25
25
  * @param options - The user configuration options.
26
26
  * @returns A promise that resolves to a {@link PowerlinesAPI} instance.
27
27
  */
28
- async function createAPI(options, override) {
29
- return PowerlinesAPI.fromOptions(options, override);
28
+ async function createAPI(options) {
29
+ return PowerlinesAPI.init({
30
+ cwd: process.cwd(),
31
+ ...options
32
+ });
30
33
  }
31
34
 
32
35
  //#endregion
@@ -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\n/**\n * The powerlines library used by Storm Software for building NodeJS applications.\n *\n * @remarks\n * A build toolkit and runtime used by Storm Software in TypeScript applications\n *\n * @packageDocumentation\n */\n\nimport { PowerlinesAPI } from \"./api\";\nimport { PowerlinesEngine } from \"./engine\";\nimport type { EngineOptions, ResolvedConfig } from \"./types\";\n\nexport type * from \"./types\";\n\n/**\n * Creates a new {@link PowerlinesEngine} instance.\n *\n * @param options - The user configuration options.\n * @returns A promise that resolves to a {@link PowerlinesEngine} instance.\n */\nexport async function createEngine(\n options: EngineOptions\n): Promise<PowerlinesEngine> {\n return PowerlinesEngine.fromOptions(options);\n}\n\n/**\n * Creates a new {@link PowerlinesAPI} instance.\n *\n * @param options - The user configuration options.\n * @returns A promise that resolves to a {@link PowerlinesAPI} instance.\n */\nexport async function createAPI<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig\n>(\n options: EngineOptions,\n override?: Partial<TResolvedConfig>\n): Promise<PowerlinesAPI<TResolvedConfig>> {\n return PowerlinesAPI.fromOptions(options, override);\n}\n\nexport { PowerlinesAPI, PowerlinesEngine };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAuCA,eAAsB,aACpB,SAC2B;AAC3B,QAAO,iBAAiB,YAAY,QAAQ;;;;;;;;AAS9C,eAAsB,UAGpB,SACA,UACyC;AACzC,QAAO,cAAc,YAAY,SAAS,SAAS"}
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\n/**\n * The powerlines library used by Storm Software for building NodeJS applications.\n *\n * @remarks\n * A build toolkit and runtime used by Storm Software in TypeScript applications\n *\n * @packageDocumentation\n */\n\nimport { PowerlinesAPI } from \"./api\";\nimport { PowerlinesEngine } from \"./engine\";\nimport type { EngineOptions, ResolvedConfig } from \"./types\";\n\nexport type * from \"./types\";\n\n/**\n * Creates a new {@link PowerlinesEngine} instance.\n *\n * @param options - The user configuration options.\n * @returns A promise that resolves to a {@link PowerlinesEngine} instance.\n */\nexport async function createEngine(\n options: EngineOptions\n): Promise<PowerlinesEngine> {\n return PowerlinesEngine.init(options);\n}\n\n/**\n * Creates a new {@link PowerlinesAPI} instance.\n *\n * @param options - The user configuration options.\n * @returns A promise that resolves to a {@link PowerlinesAPI} instance.\n */\nexport async function createAPI<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig\n>(options: EngineOptions): Promise<PowerlinesAPI<TResolvedConfig>> {\n return PowerlinesAPI.init({ cwd: process.cwd(), ...options });\n}\n\nexport { PowerlinesAPI, PowerlinesEngine };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAuCA,eAAsB,aACpB,SAC2B;AAC3B,QAAO,iBAAiB,KAAK,QAAQ;;;;;;;;AASvC,eAAsB,UAEpB,SAAiE;AACjE,QAAO,cAAc,KAAK;EAAE,KAAK,QAAQ,KAAK;EAAE,GAAG;EAAS,CAAC"}
package/dist/package.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  //#region package.json
3
3
  var name = "powerlines";
4
- var version = "0.44.12";
4
+ var version = "0.45.1";
5
5
 
6
6
  //#endregion
7
7
  Object.defineProperty(exports, 'name', {
package/dist/package.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  //#region package.json
2
2
  var name = "powerlines";
3
- var version = "0.44.12";
3
+ var version = "0.45.1";
4
4
 
5
5
  //#endregion
6
6
  export { name, version };
@@ -1,5 +1,5 @@
1
1
  import * as _$rolldown from "rolldown";
2
- import { RolldownPluginUserConfig } from "@powerlines/plugin-rolldown/types/plugin";
2
+ import { RolldownPluginInitialConfig } from "@powerlines/plugin-rolldown/types/plugin";
3
3
  import plugin, { default as rolldown } from "@powerlines/plugin-rolldown";
4
4
 
5
5
  //#region src/rolldown.d.ts
@@ -18,7 +18,7 @@ import plugin, { default as rolldown } from "@powerlines/plugin-rolldown";
18
18
  * })
19
19
  * ```
20
20
  */
21
- declare const unplugin: (options: Partial<RolldownPluginUserConfig>) => _$rolldown.Plugin<any> | _$rolldown.Plugin<any>[];
21
+ declare const unplugin: (options: RolldownPluginInitialConfig) => _$rolldown.Plugin<any> | _$rolldown.Plugin<any>[];
22
22
  //#endregion
23
23
  export { plugin, rolldown, unplugin };
24
24
  //# sourceMappingURL=rolldown.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rolldown.d.cts","names":[],"sources":["../src/rolldown.ts"],"mappings":";;;;;;;;AAgDA;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,wBAAA,MAAA,UAAA,CAAA,MAAA,QAAA,UAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"rolldown.d.cts","names":[],"sources":["../src/rolldown.ts"],"mappings":";;;;;;;;AAgDA;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,2BAAA,KAAA,UAAA,CAAA,MAAA,QAAA,UAAA,CAAA,MAAA"}
@@ -1,6 +1,6 @@
1
1
  import plugin, { default as rolldown } from "@powerlines/plugin-rolldown";
2
2
  import * as _$rolldown from "rolldown";
3
- import { RolldownPluginUserConfig } from "@powerlines/plugin-rolldown/types/plugin";
3
+ import { RolldownPluginInitialConfig } from "@powerlines/plugin-rolldown/types/plugin";
4
4
 
5
5
  //#region src/rolldown.d.ts
6
6
  /**
@@ -18,7 +18,7 @@ import { RolldownPluginUserConfig } from "@powerlines/plugin-rolldown/types/plug
18
18
  * })
19
19
  * ```
20
20
  */
21
- declare const unplugin: (options: Partial<RolldownPluginUserConfig>) => _$rolldown.Plugin<any> | _$rolldown.Plugin<any>[];
21
+ declare const unplugin: (options: RolldownPluginInitialConfig) => _$rolldown.Plugin<any> | _$rolldown.Plugin<any>[];
22
22
  //#endregion
23
23
  export { plugin, rolldown, unplugin };
24
24
  //# sourceMappingURL=rolldown.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rolldown.d.mts","names":[],"sources":["../src/rolldown.ts"],"mappings":";;;;;;;;AAgDA;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,wBAAA,MAAA,UAAA,CAAA,MAAA,QAAA,UAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"rolldown.d.mts","names":[],"sources":["../src/rolldown.ts"],"mappings":";;;;;;;;AAgDA;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,2BAAA,KAAA,UAAA,CAAA,MAAA,QAAA,UAAA,CAAA,MAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"rolldown.mjs","names":[],"sources":["../src/rolldown.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 { resolveOptions } from \"@powerlines/plugin-rolldown/helpers/resolve-options\";\nimport {\n RolldownPluginContext,\n RolldownPluginUserConfig\n} from \"@powerlines/plugin-rolldown/types/plugin\";\nimport { defu } from \"defu\";\nimport type { InputOptions } from \"rolldown\";\nimport { createRolldownPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {\n default as plugin,\n default as rolldown\n} from \"@powerlines/plugin-rolldown\";\n\n/**\n * A Rolldown plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://rollupjs.org/guide/en/#plugins-overview\n *\n * @example\n * ```ts\n * // rollup.config.ts\n * import powerlines from \"powerlines/rollup\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * })\n * ```\n */\nexport const unplugin = createRolldownPlugin<Partial<RolldownPluginUserConfig>>(\n createUnpluginFactory<RolldownPluginContext>(\"rolldown\", (api, plugin) => {\n return {\n ...plugin,\n rolldown: {\n async options(options: InputOptions) {\n const merged = defu(await api.context.getEnvironment(), this);\n\n return defu(\n resolveOptions(merged),\n options,\n api.callHook(\n \"rolldown:options\",\n { environment: merged },\n options\n ) ?? {}\n );\n }\n }\n };\n })\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAgDA,MAAa,WAAW,qBACtB,sBAA6C,aAAa,KAAK,WAAW;AACxE,QAAO;EACL,GAAG;EACH,UAAU,EACR,MAAM,QAAQ,SAAuB;GACnC,MAAM,SAAS,KAAK,MAAM,IAAI,QAAQ,gBAAgB,EAAE,KAAK;AAE7D,UAAO,KACL,eAAe,OAAO,EACtB,SACA,IAAI,SACF,oBACA,EAAE,aAAa,QAAQ,EACvB,QACD,IAAI,EAAE,CACR;KAEJ;EACF;EACD,CACH"}
1
+ {"version":3,"file":"rolldown.mjs","names":[],"sources":["../src/rolldown.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 { resolveOptions } from \"@powerlines/plugin-rolldown/helpers/resolve-options\";\nimport {\n RolldownPluginContext,\n RolldownPluginInitialConfig\n} from \"@powerlines/plugin-rolldown/types/plugin\";\nimport { defu } from \"defu\";\nimport type { InputOptions } from \"rolldown\";\nimport { createRolldownPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {\n default as plugin,\n default as rolldown\n} from \"@powerlines/plugin-rolldown\";\n\n/**\n * A Rolldown plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://rollupjs.org/guide/en/#plugins-overview\n *\n * @example\n * ```ts\n * // rollup.config.ts\n * import powerlines from \"powerlines/rollup\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * })\n * ```\n */\nexport const unplugin = createRolldownPlugin<RolldownPluginInitialConfig>(\n createUnpluginFactory<RolldownPluginContext>(\"rolldown\", (api, plugin) => {\n return {\n ...plugin,\n rolldown: {\n async options(options: InputOptions) {\n const merged = defu(await api.context.getEnvironment(), this);\n\n return defu(\n resolveOptions(merged),\n options,\n api.callHook(\n \"rolldown:options\",\n { environment: merged },\n options\n ) ?? {}\n );\n }\n }\n };\n })\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAgDA,MAAa,WAAW,qBACtB,sBAA6C,aAAa,KAAK,WAAW;AACxE,QAAO;EACL,GAAG;EACH,UAAU,EACR,MAAM,QAAQ,SAAuB;GACnC,MAAM,SAAS,KAAK,MAAM,IAAI,QAAQ,gBAAgB,EAAE,KAAK;AAE7D,UAAO,KACL,eAAe,OAAO,EACtB,SACA,IAAI,SACF,oBACA,EAAE,aAAa,QAAQ,EACvB,QACD,IAAI,EAAE,CACR;KAEJ;EACF;EACD,CACH"}
package/dist/rollup.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _$rollup from "rollup";
2
- import { RollupPluginUserConfig } from "@powerlines/plugin-rollup/types/plugin";
2
+ import { RollupPluginInitialConfig } from "@powerlines/plugin-rollup/types/plugin";
3
3
  import plugin, { default as rollup } from "@powerlines/plugin-rollup";
4
4
 
5
5
  //#region src/rollup.d.ts
@@ -19,7 +19,7 @@ import plugin, { default as rollup } from "@powerlines/plugin-rollup";
19
19
  * })
20
20
  * ```
21
21
  */
22
- declare const unplugin: (options: Partial<RollupPluginUserConfig>) => _$rollup.Plugin<any> | _$rollup.Plugin<any>[];
22
+ declare const unplugin: (options: RollupPluginInitialConfig) => _$rollup.Plugin<any> | _$rollup.Plugin<any>[];
23
23
  //#endregion
24
24
  export { plugin, rollup, unplugin };
25
25
  //# sourceMappingURL=rollup.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rollup.d.cts","names":[],"sources":["../src/rollup.ts"],"mappings":";;;;;;;;AA2CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,sBAAA,MAAA,QAAA,CAAA,MAAA,QAAA,QAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"rollup.d.cts","names":[],"sources":["../src/rollup.ts"],"mappings":";;;;;;;;AA2CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,yBAAA,KAAA,QAAA,CAAA,MAAA,QAAA,QAAA,CAAA,MAAA"}
package/dist/rollup.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import plugin, { default as rollup } from "@powerlines/plugin-rollup";
2
2
  import * as _$rollup from "rollup";
3
- import { RollupPluginUserConfig } from "@powerlines/plugin-rollup/types/plugin";
3
+ import { RollupPluginInitialConfig } from "@powerlines/plugin-rollup/types/plugin";
4
4
 
5
5
  //#region src/rollup.d.ts
6
6
  /**
@@ -19,7 +19,7 @@ import { RollupPluginUserConfig } from "@powerlines/plugin-rollup/types/plugin";
19
19
  * })
20
20
  * ```
21
21
  */
22
- declare const unplugin: (options: Partial<RollupPluginUserConfig>) => _$rollup.Plugin<any> | _$rollup.Plugin<any>[];
22
+ declare const unplugin: (options: RollupPluginInitialConfig) => _$rollup.Plugin<any> | _$rollup.Plugin<any>[];
23
23
  //#endregion
24
24
  export { plugin, rollup, unplugin };
25
25
  //# sourceMappingURL=rollup.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rollup.d.mts","names":[],"sources":["../src/rollup.ts"],"mappings":";;;;;;;;AA2CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,sBAAA,MAAA,QAAA,CAAA,MAAA,QAAA,QAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"rollup.d.mts","names":[],"sources":["../src/rollup.ts"],"mappings":";;;;;;;;AA2CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,yBAAA,KAAA,QAAA,CAAA,MAAA,QAAA,QAAA,CAAA,MAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"rollup.mjs","names":[],"sources":["../src/rollup.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 { RollupPluginUserConfig } from \"@powerlines/plugin-rollup/types/plugin\";\nimport { createRollupPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {\n default as plugin,\n default as rollup\n} from \"@powerlines/plugin-rollup\";\n\n/**\n * A Rollup plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://rollupjs.org/guide/en/#plugins-overview\n *\n * @example\n * ```ts\n * // rollup.config.ts\n *\n * import powerlines from \"powerlines/rollup\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * })\n * ```\n */\nexport const unplugin = createRollupPlugin<Partial<RollupPluginUserConfig>>(\n createUnpluginFactory(\"rollup\")\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2CA,MAAa,WAAW,mBACtB,sBAAsB,SAAS,CAChC"}
1
+ {"version":3,"file":"rollup.mjs","names":[],"sources":["../src/rollup.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 { RollupPluginInitialConfig } from \"@powerlines/plugin-rollup/types/plugin\";\nimport { createRollupPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {\n default as plugin,\n default as rollup\n} from \"@powerlines/plugin-rollup\";\n\n/**\n * A Rollup plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://rollupjs.org/guide/en/#plugins-overview\n *\n * @example\n * ```ts\n * // rollup.config.ts\n *\n * import powerlines from \"powerlines/rollup\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * })\n * ```\n */\nexport const unplugin = createRollupPlugin<RollupPluginInitialConfig>(\n createUnpluginFactory(\"rollup\")\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2CA,MAAa,WAAW,mBACtB,sBAAsB,SAAS,CAChC"}
package/dist/rspack.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _$unplugin from "unplugin";
2
- import { RspackPluginUserConfig } from "@powerlines/plugin-rspack/types/plugin";
2
+ import { RspackPluginInitialConfig } from "@powerlines/plugin-rspack/types/plugin";
3
3
  import plugin, { default as rspack } from "@powerlines/plugin-rspack";
4
4
 
5
5
  //#region src/rspack.d.ts
@@ -19,7 +19,7 @@ import plugin, { default as rspack } from "@powerlines/plugin-rspack";
19
19
  * }
20
20
  * ```
21
21
  */
22
- declare const unplugin: (options: Partial<RspackPluginUserConfig>) => _$unplugin.RspackPluginInstance;
22
+ declare const unplugin: (options: RspackPluginInitialConfig) => _$unplugin.RspackPluginInstance;
23
23
  //#endregion
24
24
  export { plugin, rspack, unplugin };
25
25
  //# sourceMappingURL=rspack.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rspack.d.cts","names":[],"sources":["../src/rspack.ts"],"mappings":";;;;;;;;AA2CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,sBAAA,MAAA,UAAA,CAAA,oBAAA"}
1
+ {"version":3,"file":"rspack.d.cts","names":[],"sources":["../src/rspack.ts"],"mappings":";;;;;;;;AA2CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,yBAAA,KAAA,UAAA,CAAA,oBAAA"}
package/dist/rspack.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _$unplugin from "unplugin";
2
2
  import plugin, { default as rspack } from "@powerlines/plugin-rspack";
3
- import { RspackPluginUserConfig } from "@powerlines/plugin-rspack/types/plugin";
3
+ import { RspackPluginInitialConfig } from "@powerlines/plugin-rspack/types/plugin";
4
4
 
5
5
  //#region src/rspack.d.ts
6
6
  /**
@@ -19,7 +19,7 @@ import { RspackPluginUserConfig } from "@powerlines/plugin-rspack/types/plugin";
19
19
  * }
20
20
  * ```
21
21
  */
22
- declare const unplugin: (options: Partial<RspackPluginUserConfig>) => _$unplugin.RspackPluginInstance;
22
+ declare const unplugin: (options: RspackPluginInitialConfig) => _$unplugin.RspackPluginInstance;
23
23
  //#endregion
24
24
  export { plugin, rspack, unplugin };
25
25
  //# sourceMappingURL=rspack.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rspack.d.mts","names":[],"sources":["../src/rspack.ts"],"mappings":";;;;;;;;AA2CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,sBAAA,MAAA,UAAA,CAAA,oBAAA"}
1
+ {"version":3,"file":"rspack.d.mts","names":[],"sources":["../src/rspack.ts"],"mappings":";;;;;;;;AA2CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,yBAAA,KAAA,UAAA,CAAA,oBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"rspack.mjs","names":[],"sources":["../src/rspack.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 { RspackPluginUserConfig } from \"@powerlines/plugin-rspack/types/plugin\";\nimport { createRspackPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {\n default as plugin,\n default as rspack\n} from \"@powerlines/plugin-rspack\";\n\n/**\n * An Rspack plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://rspack.dev/concepts/plugins\n *\n * @example\n * ```ts\n * // rspack.config.ts\n *\n * import powerlines from \"powerlines/rspack\";\n *\n * export default {\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * }\n * ```\n */\nexport const unplugin = createRspackPlugin<Partial<RspackPluginUserConfig>>(\n createUnpluginFactory(\"rspack\")\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2CA,MAAa,WAAW,mBACtB,sBAAsB,SAAS,CAChC"}
1
+ {"version":3,"file":"rspack.mjs","names":[],"sources":["../src/rspack.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 { RspackPluginInitialConfig } from \"@powerlines/plugin-rspack/types/plugin\";\nimport { createRspackPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {\n default as plugin,\n default as rspack\n} from \"@powerlines/plugin-rspack\";\n\n/**\n * An Rspack plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://rspack.dev/concepts/plugins\n *\n * @example\n * ```ts\n * // rspack.config.ts\n *\n * import powerlines from \"powerlines/rspack\";\n *\n * export default {\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * }\n * ```\n */\nexport const unplugin = createRspackPlugin<RspackPluginInitialConfig>(\n createUnpluginFactory(\"rspack\")\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2CA,MAAa,WAAW,mBACtB,sBAAsB,SAAS,CAChC"}
package/dist/tsdown.cjs CHANGED
@@ -37,6 +37,7 @@ function unplugin(options = {}) {
37
37
  ...options,
38
38
  entry: options.entry,
39
39
  plugins: [require_rolldown.unplugin({
40
+ framework: "powerlines",
40
41
  name: options.name,
41
42
  root: options.cwd ?? process.cwd(),
42
43
  output: {
package/dist/tsdown.mjs CHANGED
@@ -34,6 +34,7 @@ function unplugin(options = {}) {
34
34
  ...options,
35
35
  entry: options.entry,
36
36
  plugins: [unplugin$1({
37
+ framework: "powerlines",
37
38
  name: options.name,
38
39
  root: options.cwd ?? process.cwd(),
39
40
  output: {
@@ -1 +1 @@
1
- {"version":3,"file":"tsdown.mjs","names":["rolldown"],"sources":["../src/tsdown.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 { RolldownOptions } from \"@powerlines/plugin-rolldown/types/build\";\nimport { resolveFromFormat } from \"@powerlines/plugin-tsdown/helpers/resolve-options\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { ModuleFormat } from \"rolldown\";\nimport type { UserConfig } from \"tsdown/config\";\nimport { unplugin as rolldown } from \"./rolldown\";\nimport { CopyConfig, ResolveConfig } from \"./types\";\n\nexport {\n default as plugin,\n default as tsdown\n} from \"@powerlines/plugin-tsdown\";\n\n/**\n * A Tsdown configuration function that integrates Powerlines into the build process.\n *\n * @see https://github.com/rolldown/tsdown\n *\n * @example\n * ```ts\n * // tsdown.config.ts\n * import withPowerlines from \"powerlines/tsdown\";\n *\n * export default withPowerlines({\n * entry: [\"src/index.ts\"],\n * format: [\"cjs\", \"esm\"],\n * dts: true,\n * sourcemap: true,\n * clean: true,\n * });\n *\n * ```\n *\n * @param options - The Tsdown options to merge with the Powerlines configuration.\n * @returns The merged Tsdown configuration options.\n */\nexport function unplugin(options: UserConfig = {}): UserConfig {\n return {\n ...options,\n entry: options.entry,\n plugins: [\n rolldown({\n name: options.name,\n root: options.cwd ?? process.cwd(),\n output: {\n path: options.outDir,\n format: resolveFromFormat(\n options.format as ModuleFormat | ModuleFormat[]\n ),\n copy: {\n path: options.outDir!,\n assets: toArray(options.copy)\n .map(copy => {\n if (!copy) {\n return undefined;\n }\n\n if (isSetString(copy)) {\n return copy;\n }\n\n if (isFunction(copy)) {\n // eslint-disable-next-line no-console\n console.warn(\n \"Function-based copy options are not supported in Powerlines.\"\n );\n\n return undefined;\n }\n\n return {\n input: copy.from,\n output: copy.to\n };\n })\n .filter(Boolean) as CopyConfig[\"assets\"]\n }\n },\n resolve: {\n external: options.external\n ? (toArray(options.external)\n .map(external => {\n if (isFunction(external)) {\n // eslint-disable-next-line no-console\n console.warn(\n \"Function-based external options are not supported in Powerlines.\"\n );\n\n return undefined;\n }\n\n return external;\n })\n .filter(Boolean) as ResolveConfig[\"external\"])\n : undefined,\n noExternal: options.noExternal\n ? (toArray(options.noExternal)\n .map(noExternal => {\n if (isFunction(noExternal)) {\n // eslint-disable-next-line no-console\n console.warn(\n \"Function-based noExternal options are not supported in Powerlines.\"\n );\n\n return undefined;\n }\n\n return noExternal;\n })\n .filter(Boolean) as ResolveConfig[\"noExternal\"])\n : undefined\n },\n rolldown: options.inputOptions as RolldownOptions,\n tsconfig: isSetString(options.tsconfig) ? options.tsconfig : undefined\n })\n ]\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,SAAgB,SAAS,UAAsB,EAAE,EAAc;AAC7D,QAAO;EACL,GAAG;EACH,OAAO,QAAQ;EACf,SAAS,CACPA,WAAS;GACP,MAAM,QAAQ;GACd,MAAM,QAAQ,OAAO,QAAQ,KAAK;GAClC,QAAQ;IACN,MAAM,QAAQ;IACd,QAAQ,kBACN,QAAQ,OACT;IACD,MAAM;KACJ,MAAM,QAAQ;KACd,QAAQ,QAAQ,QAAQ,KAAK,CAC1B,KAAI,SAAQ;AACX,UAAI,CAAC,KACH;AAGF,UAAI,YAAY,KAAK,CACnB,QAAO;AAGT,UAAI,WAAW,KAAK,EAAE;AAEpB,eAAQ,KACN,+DACD;AAED;;AAGF,aAAO;OACL,OAAO,KAAK;OACZ,QAAQ,KAAK;OACd;OACD,CACD,OAAO,QAAQ;KACnB;IACF;GACD,SAAS;IACP,UAAU,QAAQ,WACb,QAAQ,QAAQ,SAAS,CACvB,KAAI,aAAY;AACf,SAAI,WAAW,SAAS,EAAE;AAExB,cAAQ,KACN,mEACD;AAED;;AAGF,YAAO;MACP,CACD,OAAO,QAAQ,GAClB;IACJ,YAAY,QAAQ,aACf,QAAQ,QAAQ,WAAW,CACzB,KAAI,eAAc;AACjB,SAAI,WAAW,WAAW,EAAE;AAE1B,cAAQ,KACN,qEACD;AAED;;AAGF,YAAO;MACP,CACD,OAAO,QAAQ,GAClB;IACL;GACD,UAAU,QAAQ;GAClB,UAAU,YAAY,QAAQ,SAAS,GAAG,QAAQ,WAAW;GAC9D,CAAC,CACH;EACF"}
1
+ {"version":3,"file":"tsdown.mjs","names":["rolldown"],"sources":["../src/tsdown.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 { RolldownOptions } from \"@powerlines/plugin-rolldown/types/build\";\nimport { resolveFromFormat } from \"@powerlines/plugin-tsdown/helpers/resolve-options\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { ModuleFormat } from \"rolldown\";\nimport type { UserConfig } from \"tsdown/config\";\nimport { unplugin as rolldown } from \"./rolldown\";\nimport { CopyConfig, ResolveConfig } from \"./types\";\n\nexport {\n default as plugin,\n default as tsdown\n} from \"@powerlines/plugin-tsdown\";\n\n/**\n * A Tsdown configuration function that integrates Powerlines into the build process.\n *\n * @see https://github.com/rolldown/tsdown\n *\n * @example\n * ```ts\n * // tsdown.config.ts\n * import withPowerlines from \"powerlines/tsdown\";\n *\n * export default withPowerlines({\n * entry: [\"src/index.ts\"],\n * format: [\"cjs\", \"esm\"],\n * dts: true,\n * sourcemap: true,\n * clean: true,\n * });\n *\n * ```\n *\n * @param options - The Tsdown options to merge with the Powerlines configuration.\n * @returns The merged Tsdown configuration options.\n */\nexport function unplugin(options: UserConfig = {}): UserConfig {\n return {\n ...options,\n entry: options.entry,\n plugins: [\n rolldown({\n framework: \"powerlines\",\n name: options.name,\n root: options.cwd ?? process.cwd(),\n output: {\n path: options.outDir,\n format: resolveFromFormat(\n options.format as ModuleFormat | ModuleFormat[]\n ),\n copy: {\n path: options.outDir!,\n assets: toArray(options.copy)\n .map(copy => {\n if (!copy) {\n return undefined;\n }\n\n if (isSetString(copy)) {\n return copy;\n }\n\n if (isFunction(copy)) {\n // eslint-disable-next-line no-console\n console.warn(\n \"Function-based copy options are not supported in Powerlines.\"\n );\n\n return undefined;\n }\n\n return {\n input: copy.from,\n output: copy.to\n };\n })\n .filter(Boolean) as CopyConfig[\"assets\"]\n }\n },\n resolve: {\n external: options.external\n ? (toArray(options.external)\n .map(external => {\n if (isFunction(external)) {\n // eslint-disable-next-line no-console\n console.warn(\n \"Function-based external options are not supported in Powerlines.\"\n );\n\n return undefined;\n }\n\n return external;\n })\n .filter(Boolean) as ResolveConfig[\"external\"])\n : undefined,\n noExternal: options.noExternal\n ? (toArray(options.noExternal)\n .map(noExternal => {\n if (isFunction(noExternal)) {\n // eslint-disable-next-line no-console\n console.warn(\n \"Function-based noExternal options are not supported in Powerlines.\"\n );\n\n return undefined;\n }\n\n return noExternal;\n })\n .filter(Boolean) as ResolveConfig[\"noExternal\"])\n : undefined\n },\n rolldown: options.inputOptions as RolldownOptions,\n tsconfig: isSetString(options.tsconfig) ? options.tsconfig : undefined\n })\n ]\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,SAAgB,SAAS,UAAsB,EAAE,EAAc;AAC7D,QAAO;EACL,GAAG;EACH,OAAO,QAAQ;EACf,SAAS,CACPA,WAAS;GACP,WAAW;GACX,MAAM,QAAQ;GACd,MAAM,QAAQ,OAAO,QAAQ,KAAK;GAClC,QAAQ;IACN,MAAM,QAAQ;IACd,QAAQ,kBACN,QAAQ,OACT;IACD,MAAM;KACJ,MAAM,QAAQ;KACd,QAAQ,QAAQ,QAAQ,KAAK,CAC1B,KAAI,SAAQ;AACX,UAAI,CAAC,KACH;AAGF,UAAI,YAAY,KAAK,CACnB,QAAO;AAGT,UAAI,WAAW,KAAK,EAAE;AAEpB,eAAQ,KACN,+DACD;AAED;;AAGF,aAAO;OACL,OAAO,KAAK;OACZ,QAAQ,KAAK;OACd;OACD,CACD,OAAO,QAAQ;KACnB;IACF;GACD,SAAS;IACP,UAAU,QAAQ,WACb,QAAQ,QAAQ,SAAS,CACvB,KAAI,aAAY;AACf,SAAI,WAAW,SAAS,EAAE;AAExB,cAAQ,KACN,mEACD;AAED;;AAGF,YAAO;MACP,CACD,OAAO,QAAQ,GAClB;IACJ,YAAY,QAAQ,aACf,QAAQ,QAAQ,WAAW,CACzB,KAAI,eAAc;AACjB,SAAI,WAAW,WAAW,EAAE;AAE1B,cAAQ,KACN,qEACD;AAED;;AAGF,YAAO;MACP,CACD,OAAO,QAAQ,GAClB;IACL;GACD,UAAU,QAAQ;GAClB,UAAU,YAAY,QAAQ,SAAS,GAAG,QAAQ,WAAW;GAC9D,CAAC,CACH;EACF"}
@@ -16,7 +16,7 @@ import * as _$unloader from "unloader";
16
16
  *
17
17
  * ```
18
18
  */
19
- declare const unplugin: (options: Partial<_$_powerlines_core0.UserConfig>) => _$unloader.Plugin | _$unloader.Plugin[];
19
+ declare const unplugin: (options: _$_powerlines_core0.InitialPluginConfig<_$_powerlines_core0.UserConfig>) => _$unloader.Plugin | _$unloader.Plugin[];
20
20
  //#endregion
21
21
  export { unplugin as unloader, unplugin };
22
22
  //# sourceMappingURL=unloader.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unloader.d.cts","names":[],"sources":["../src/unloader.ts"],"mappings":";;;;;;;;AAmCA;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAA0D,mBAAA,CAA1D,UAAA,MAAA,UAAA,CAAA,MAAA,GAAA,UAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"unloader.d.cts","names":[],"sources":["../src/unloader.ts"],"mappings":";;;;;;;;AAmCA;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,mBAAA,CAAA,mBAAA,CAA0D,mBAAA,CAA1D,UAAA,MAAA,UAAA,CAAA,MAAA,GAAA,UAAA,CAAA,MAAA"}
@@ -16,7 +16,7 @@ import * as _$unloader from "unloader";
16
16
  *
17
17
  * ```
18
18
  */
19
- declare const unplugin: (options: Partial<_$_powerlines_core0.UserConfig>) => _$unloader.Plugin | _$unloader.Plugin[];
19
+ declare const unplugin: (options: _$_powerlines_core0.InitialPluginConfig<_$_powerlines_core0.UserConfig>) => _$unloader.Plugin | _$unloader.Plugin[];
20
20
  //#endregion
21
21
  export { unplugin as unloader, unplugin };
22
22
  //# sourceMappingURL=unloader.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unloader.d.mts","names":[],"sources":["../src/unloader.ts"],"mappings":";;;;;;;;AAmCA;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAA0D,mBAAA,CAA1D,UAAA,MAAA,UAAA,CAAA,MAAA,GAAA,UAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"unloader.d.mts","names":[],"sources":["../src/unloader.ts"],"mappings":";;;;;;;;AAmCA;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,mBAAA,CAAA,mBAAA,CAA0D,mBAAA,CAA1D,UAAA,MAAA,UAAA,CAAA,MAAA,GAAA,UAAA,CAAA,MAAA"}
package/dist/unplugin.cjs CHANGED
@@ -16,25 +16,23 @@ let _powerlines_engine_api = require("@powerlines/engine/api");
16
16
  * @returns The unplugin factory that generates a plugin instance.
17
17
  */
18
18
  function createUnpluginFactory(variant, decorate) {
19
- return (config, meta) => {
20
- let logger = (0, _powerlines_core_plugin_utils_logging.createLogger)(config.name || "powerlines", {});
19
+ return (options, meta) => {
20
+ let logger = (0, _powerlines_core_plugin_utils_logging.createLogger)(options.name || "powerlines", {});
21
21
  logger.debug("Initializing Unplugin");
22
22
  try {
23
- const userConfig = {
24
- ...config,
23
+ const initialConfig = {
24
+ ...options,
25
25
  variant,
26
26
  unplugin: meta
27
27
  };
28
28
  let api;
29
29
  async function buildStart() {
30
- api = await _powerlines_engine_api.PowerlinesAPI.fromOptions({
30
+ api = await _powerlines_engine_api.PowerlinesAPI.init({
31
+ ...options,
31
32
  cwd: (0, _stryke_fs_get_workspace_root.getWorkspaceRoot)(process.cwd()),
32
- root: userConfig.root,
33
- mode: userConfig.mode
34
- }, {
35
- command: "build",
36
- ...userConfig
37
- });
33
+ root: initialConfig.root,
34
+ mode: initialConfig.mode
35
+ }, initialConfig);
38
36
  logger = api.context.logger;
39
37
  logger.debug("Powerlines build plugin starting...");
40
38
  await api.context.setup();
@@ -75,7 +73,7 @@ function createUnpluginFactory(variant, decorate) {
75
73
  logger.debug("Finalizing Powerlines project output...");
76
74
  await api.callHook("writeBundle", { environment: await api.context.getEnvironment() });
77
75
  }
78
- const options = {
76
+ const unpluginOptions = {
79
77
  name: "powerlines",
80
78
  api,
81
79
  resolveId,
@@ -84,7 +82,7 @@ function createUnpluginFactory(variant, decorate) {
84
82
  buildStart,
85
83
  writeBundle
86
84
  };
87
- const result = decorate ? decorate(api, options) : options;
85
+ const result = decorate ? decorate(api, unpluginOptions) : unpluginOptions;
88
86
  logger.debug("Unplugin initialized successfully.");
89
87
  return {
90
88
  api,
package/dist/unplugin.mjs CHANGED
@@ -15,25 +15,23 @@ export * from "@powerlines/core/lib/unplugin"
15
15
  * @returns The unplugin factory that generates a plugin instance.
16
16
  */
17
17
  function createUnpluginFactory(variant, decorate) {
18
- return (config, meta) => {
19
- let logger = createLogger(config.name || "powerlines", {});
18
+ return (options, meta) => {
19
+ let logger = createLogger(options.name || "powerlines", {});
20
20
  logger.debug("Initializing Unplugin");
21
21
  try {
22
- const userConfig = {
23
- ...config,
22
+ const initialConfig = {
23
+ ...options,
24
24
  variant,
25
25
  unplugin: meta
26
26
  };
27
27
  let api;
28
28
  async function buildStart() {
29
- api = await PowerlinesAPI.fromOptions({
29
+ api = await PowerlinesAPI.init({
30
+ ...options,
30
31
  cwd: getWorkspaceRoot(process.cwd()),
31
- root: userConfig.root,
32
- mode: userConfig.mode
33
- }, {
34
- command: "build",
35
- ...userConfig
36
- });
32
+ root: initialConfig.root,
33
+ mode: initialConfig.mode
34
+ }, initialConfig);
37
35
  logger = api.context.logger;
38
36
  logger.debug("Powerlines build plugin starting...");
39
37
  await api.context.setup();
@@ -74,7 +72,7 @@ function createUnpluginFactory(variant, decorate) {
74
72
  logger.debug("Finalizing Powerlines project output...");
75
73
  await api.callHook("writeBundle", { environment: await api.context.getEnvironment() });
76
74
  }
77
- const options = {
75
+ const unpluginOptions = {
78
76
  name: "powerlines",
79
77
  api,
80
78
  resolveId,
@@ -83,7 +81,7 @@ function createUnpluginFactory(variant, decorate) {
83
81
  buildStart,
84
82
  writeBundle
85
83
  };
86
- const result = decorate ? decorate(api, options) : options;
84
+ const result = decorate ? decorate(api, unpluginOptions) : unpluginOptions;
87
85
  logger.debug("Unplugin initialized successfully.");
88
86
  return {
89
87
  api,
@@ -1 +1 @@
1
- {"version":3,"file":"unplugin.mjs","names":[],"sources":["../src/unplugin.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 type {\n Context,\n UnpluginBuilderVariant,\n UnpluginFactory,\n UnpluginOptions\n} from \"@powerlines/core\";\nimport { getString } from \"@powerlines/core/lib/utilities/source-file\";\nimport { createLogger } from \"@powerlines/core/plugin-utils/logging\";\nimport { getWorkspaceRoot } from \"@stryke/fs/get-workspace-root\";\nimport { LoadResult } from \"rolldown\";\nimport type {\n UnpluginOptions as BaseUnpluginOptions,\n TransformResult,\n UnpluginBuildContext,\n UnpluginContext\n} from \"unplugin\";\nimport { setParseImpl } from \"unplugin\";\nimport { PowerlinesAPI } from \"./api\";\n\nexport * from \"@powerlines/core/lib/unplugin\";\n\n/**\n * Creates a Powerlines unplugin factory that generates a plugin instance.\n *\n * @param variant - The build variant for which to create the unplugin.\n * @param decorate - An optional function to decorate the unplugin options.\n * @returns The unplugin factory that generates a plugin instance.\n */\nexport function createUnpluginFactory<\n TContext extends Context,\n TUnpluginBuilderVariant extends UnpluginBuilderVariant =\n UnpluginBuilderVariant\n>(\n variant: TUnpluginBuilderVariant,\n decorate?: (\n api: PowerlinesAPI<TContext[\"config\"]>,\n plugin: UnpluginOptions<TContext>\n ) => BaseUnpluginOptions\n): UnpluginFactory<TContext> {\n return (config, meta): UnpluginOptions<TContext> => {\n let logger = createLogger(config.name || \"powerlines\", {});\n logger.debug(\"Initializing Unplugin\");\n\n try {\n const userConfig = {\n ...config,\n variant,\n unplugin: meta\n } as TContext[\"config\"][\"userConfig\"];\n\n let api!: PowerlinesAPI<TContext[\"config\"]>;\n\n async function buildStart(this: UnpluginBuildContext): Promise<void> {\n api = await PowerlinesAPI.fromOptions(\n {\n cwd: getWorkspaceRoot(process.cwd()),\n root: userConfig.root,\n mode: userConfig.mode\n },\n { command: \"build\", ...userConfig }\n );\n\n logger = api.context.logger;\n logger.debug(\"Powerlines build plugin starting...\");\n\n await api.context.setup();\n\n setParseImpl(api.context.parse);\n\n logger.debug(\"Preparing build artifacts for the Powerlines project...\");\n\n await api.prepare({\n command: \"build\"\n });\n }\n\n async function resolveId(\n this: UnpluginBuildContext & UnpluginContext,\n id: string,\n importer?: string,\n options: {\n isEntry: boolean;\n } = { isEntry: false }\n ) {\n return api.context.resolve(id, importer, options);\n }\n\n async function load(\n this: UnpluginBuildContext & UnpluginContext,\n id: string\n ): Promise<LoadResult> {\n const environment = await api.context.getEnvironment();\n\n let result = await api.callHook(\n \"load\",\n { environment, order: \"pre\" },\n id\n );\n if (result) {\n return result;\n }\n\n result = await api.callHook(\n \"load\",\n { environment, order: \"normal\" },\n id\n );\n if (result) {\n return result;\n }\n\n result = await environment.load(id);\n if (result) {\n return result;\n }\n\n return api.callHook(\"load\", { environment, order: \"post\" }, id);\n }\n\n async function transform(\n code: string,\n id: string\n ): Promise<TransformResult> {\n return api.callHook(\n \"transform\",\n {\n environment: await api.context.getEnvironment(),\n result: \"merge\",\n asNextParam: previousResult => getString(previousResult)\n },\n getString(code),\n id\n );\n }\n\n async function writeBundle(): Promise<void> {\n logger.debug(\"Finalizing Powerlines project output...\");\n\n await api.callHook(\"writeBundle\", {\n environment: await api.context.getEnvironment()\n });\n }\n\n const options = {\n name: \"powerlines\",\n api,\n resolveId,\n load,\n transform,\n buildStart,\n writeBundle\n } as UnpluginOptions<TContext>;\n\n const result = decorate ? decorate(api, options) : options;\n\n logger.debug(\"Unplugin initialized successfully.\");\n\n return { api, ...result };\n } catch (error) {\n logger.error((error as Error)?.message);\n\n throw error;\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA8CA,SAAgB,sBAKd,SACA,UAI2B;AAC3B,SAAQ,QAAQ,SAAoC;EAClD,IAAI,SAAS,aAAa,OAAO,QAAQ,cAAc,EAAE,CAAC;AAC1D,SAAO,MAAM,wBAAwB;AAErC,MAAI;GACF,MAAM,aAAa;IACjB,GAAG;IACH;IACA,UAAU;IACX;GAED,IAAI;GAEJ,eAAe,aAAsD;AACnE,UAAM,MAAM,cAAc,YACxB;KACE,KAAK,iBAAiB,QAAQ,KAAK,CAAC;KACpC,MAAM,WAAW;KACjB,MAAM,WAAW;KAClB,EACD;KAAE,SAAS;KAAS,GAAG;KAAY,CACpC;AAED,aAAS,IAAI,QAAQ;AACrB,WAAO,MAAM,sCAAsC;AAEnD,UAAM,IAAI,QAAQ,OAAO;AAEzB,iBAAa,IAAI,QAAQ,MAAM;AAE/B,WAAO,MAAM,0DAA0D;AAEvE,UAAM,IAAI,QAAQ,EAChB,SAAS,SACV,CAAC;;GAGJ,eAAe,UAEb,IACA,UACA,UAEI,EAAE,SAAS,OAAO,EACtB;AACA,WAAO,IAAI,QAAQ,QAAQ,IAAI,UAAU,QAAQ;;GAGnD,eAAe,KAEb,IACqB;IACrB,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;IAEtD,IAAI,SAAS,MAAM,IAAI,SACrB,QACA;KAAE;KAAa,OAAO;KAAO,EAC7B,GACD;AACD,QAAI,OACF,QAAO;AAGT,aAAS,MAAM,IAAI,SACjB,QACA;KAAE;KAAa,OAAO;KAAU,EAChC,GACD;AACD,QAAI,OACF,QAAO;AAGT,aAAS,MAAM,YAAY,KAAK,GAAG;AACnC,QAAI,OACF,QAAO;AAGT,WAAO,IAAI,SAAS,QAAQ;KAAE;KAAa,OAAO;KAAQ,EAAE,GAAG;;GAGjE,eAAe,UACb,MACA,IAC0B;AAC1B,WAAO,IAAI,SACT,aACA;KACE,aAAa,MAAM,IAAI,QAAQ,gBAAgB;KAC/C,QAAQ;KACR,cAAa,mBAAkB,UAAU,eAAe;KACzD,EACD,UAAU,KAAK,EACf,GACD;;GAGH,eAAe,cAA6B;AAC1C,WAAO,MAAM,0CAA0C;AAEvD,UAAM,IAAI,SAAS,eAAe,EAChC,aAAa,MAAM,IAAI,QAAQ,gBAAgB,EAChD,CAAC;;GAGJ,MAAM,UAAU;IACd,MAAM;IACN;IACA;IACA;IACA;IACA;IACA;IACD;GAED,MAAM,SAAS,WAAW,SAAS,KAAK,QAAQ,GAAG;AAEnD,UAAO,MAAM,qCAAqC;AAElD,UAAO;IAAE;IAAK,GAAG;IAAQ;WAClB,OAAO;AACd,UAAO,MAAO,OAAiB,QAAQ;AAEvC,SAAM"}
1
+ {"version":3,"file":"unplugin.mjs","names":[],"sources":["../src/unplugin.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 type {\n Context,\n UnpluginBuilderVariant,\n UnpluginFactory,\n UnpluginOptions\n} from \"@powerlines/core\";\nimport { getString } from \"@powerlines/core/lib/utilities/source-file\";\nimport { createLogger } from \"@powerlines/core/plugin-utils/logging\";\nimport { getWorkspaceRoot } from \"@stryke/fs/get-workspace-root\";\nimport { LoadResult } from \"rolldown\";\nimport type {\n UnpluginOptions as BaseUnpluginOptions,\n TransformResult,\n UnpluginBuildContext,\n UnpluginContext\n} from \"unplugin\";\nimport { setParseImpl } from \"unplugin\";\nimport { PowerlinesAPI } from \"./api\";\n\nexport * from \"@powerlines/core/lib/unplugin\";\n\n/**\n * Creates a Powerlines unplugin factory that generates a plugin instance.\n *\n * @param variant - The build variant for which to create the unplugin.\n * @param decorate - An optional function to decorate the unplugin options.\n * @returns The unplugin factory that generates a plugin instance.\n */\nexport function createUnpluginFactory<\n TContext extends Context,\n TUnpluginBuilderVariant extends UnpluginBuilderVariant =\n UnpluginBuilderVariant\n>(\n variant: TUnpluginBuilderVariant,\n decorate?: (\n api: PowerlinesAPI<TContext[\"config\"]>,\n plugin: UnpluginOptions<TContext>\n ) => BaseUnpluginOptions\n): UnpluginFactory<TContext> {\n return (options, meta): UnpluginOptions<TContext> => {\n let logger = createLogger(options.name || \"powerlines\", {});\n logger.debug(\"Initializing Unplugin\");\n\n try {\n const initialConfig = {\n ...options,\n variant,\n unplugin: meta\n };\n\n let api!: PowerlinesAPI<TContext[\"config\"]>;\n\n async function buildStart(this: UnpluginBuildContext): Promise<void> {\n api = await PowerlinesAPI.init(\n {\n ...options,\n cwd: getWorkspaceRoot(process.cwd()),\n root: initialConfig.root,\n mode: initialConfig.mode\n },\n initialConfig\n );\n\n logger = api.context.logger;\n logger.debug(\"Powerlines build plugin starting...\");\n\n await api.context.setup();\n\n setParseImpl(api.context.parse);\n\n logger.debug(\"Preparing build artifacts for the Powerlines project...\");\n\n await api.prepare({\n command: \"build\"\n });\n }\n\n async function resolveId(\n this: UnpluginBuildContext & UnpluginContext,\n id: string,\n importer?: string,\n options: {\n isEntry: boolean;\n } = { isEntry: false }\n ) {\n return api.context.resolve(id, importer, options);\n }\n\n async function load(\n this: UnpluginBuildContext & UnpluginContext,\n id: string\n ): Promise<LoadResult> {\n const environment = await api.context.getEnvironment();\n\n let result = await api.callHook(\n \"load\",\n { environment, order: \"pre\" },\n id\n );\n if (result) {\n return result;\n }\n\n result = await api.callHook(\n \"load\",\n { environment, order: \"normal\" },\n id\n );\n if (result) {\n return result;\n }\n\n result = await environment.load(id);\n if (result) {\n return result;\n }\n\n return api.callHook(\"load\", { environment, order: \"post\" }, id);\n }\n\n async function transform(\n code: string,\n id: string\n ): Promise<TransformResult> {\n return api.callHook(\n \"transform\",\n {\n environment: await api.context.getEnvironment(),\n result: \"merge\",\n asNextParam: previousResult => getString(previousResult)\n },\n getString(code),\n id\n );\n }\n\n async function writeBundle(): Promise<void> {\n logger.debug(\"Finalizing Powerlines project output...\");\n\n await api.callHook(\"writeBundle\", {\n environment: await api.context.getEnvironment()\n });\n }\n\n const unpluginOptions = {\n name: \"powerlines\",\n api,\n resolveId,\n load,\n transform,\n buildStart,\n writeBundle\n } as UnpluginOptions<TContext>;\n\n const result = decorate\n ? decorate(api, unpluginOptions)\n : unpluginOptions;\n\n logger.debug(\"Unplugin initialized successfully.\");\n\n return { api, ...result };\n } catch (error) {\n logger.error((error as Error)?.message);\n\n throw error;\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA8CA,SAAgB,sBAKd,SACA,UAI2B;AAC3B,SAAQ,SAAS,SAAoC;EACnD,IAAI,SAAS,aAAa,QAAQ,QAAQ,cAAc,EAAE,CAAC;AAC3D,SAAO,MAAM,wBAAwB;AAErC,MAAI;GACF,MAAM,gBAAgB;IACpB,GAAG;IACH;IACA,UAAU;IACX;GAED,IAAI;GAEJ,eAAe,aAAsD;AACnE,UAAM,MAAM,cAAc,KACxB;KACE,GAAG;KACH,KAAK,iBAAiB,QAAQ,KAAK,CAAC;KACpC,MAAM,cAAc;KACpB,MAAM,cAAc;KACrB,EACD,cACD;AAED,aAAS,IAAI,QAAQ;AACrB,WAAO,MAAM,sCAAsC;AAEnD,UAAM,IAAI,QAAQ,OAAO;AAEzB,iBAAa,IAAI,QAAQ,MAAM;AAE/B,WAAO,MAAM,0DAA0D;AAEvE,UAAM,IAAI,QAAQ,EAChB,SAAS,SACV,CAAC;;GAGJ,eAAe,UAEb,IACA,UACA,UAEI,EAAE,SAAS,OAAO,EACtB;AACA,WAAO,IAAI,QAAQ,QAAQ,IAAI,UAAU,QAAQ;;GAGnD,eAAe,KAEb,IACqB;IACrB,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;IAEtD,IAAI,SAAS,MAAM,IAAI,SACrB,QACA;KAAE;KAAa,OAAO;KAAO,EAC7B,GACD;AACD,QAAI,OACF,QAAO;AAGT,aAAS,MAAM,IAAI,SACjB,QACA;KAAE;KAAa,OAAO;KAAU,EAChC,GACD;AACD,QAAI,OACF,QAAO;AAGT,aAAS,MAAM,YAAY,KAAK,GAAG;AACnC,QAAI,OACF,QAAO;AAGT,WAAO,IAAI,SAAS,QAAQ;KAAE;KAAa,OAAO;KAAQ,EAAE,GAAG;;GAGjE,eAAe,UACb,MACA,IAC0B;AAC1B,WAAO,IAAI,SACT,aACA;KACE,aAAa,MAAM,IAAI,QAAQ,gBAAgB;KAC/C,QAAQ;KACR,cAAa,mBAAkB,UAAU,eAAe;KACzD,EACD,UAAU,KAAK,EACf,GACD;;GAGH,eAAe,cAA6B;AAC1C,WAAO,MAAM,0CAA0C;AAEvD,UAAM,IAAI,SAAS,eAAe,EAChC,aAAa,MAAM,IAAI,QAAQ,gBAAgB,EAChD,CAAC;;GAGJ,MAAM,kBAAkB;IACtB,MAAM;IACN;IACA;IACA;IACA;IACA;IACA;IACD;GAED,MAAM,SAAS,WACX,SAAS,KAAK,gBAAgB,GAC9B;AAEJ,UAAO,MAAM,qCAAqC;AAElD,UAAO;IAAE;IAAK,GAAG;IAAQ;WAClB,OAAO;AACd,UAAO,MAAO,OAAiB,QAAQ;AAEvC,SAAM"}
package/dist/vite.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _$vite from "vite";
2
- import { VitePluginUserConfig } from "@powerlines/plugin-vite/types";
2
+ import { VitePluginInitialConfig } from "@powerlines/plugin-vite/types";
3
3
  import plugin, { default as vite } from "@powerlines/plugin-vite";
4
4
 
5
5
  //#region src/vite.d.ts
@@ -19,7 +19,7 @@ import plugin, { default as vite } from "@powerlines/plugin-vite";
19
19
  *
20
20
  * ```
21
21
  */
22
- declare const unplugin: (options: Partial<VitePluginUserConfig>) => _$vite.Plugin<any> | _$vite.Plugin<any>[];
22
+ declare const unplugin: (options: VitePluginInitialConfig) => _$vite.Plugin<any> | _$vite.Plugin<any>[];
23
23
  //#endregion
24
24
  export { plugin, unplugin, vite };
25
25
  //# sourceMappingURL=vite.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vite.d.cts","names":[],"sources":["../src/vite.ts"],"mappings":";;;;;;;;AA8CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,oBAAA,MAAA,MAAA,CAAA,MAAA,QAAA,MAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"vite.d.cts","names":[],"sources":["../src/vite.ts"],"mappings":";;;;;;;;AA8CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,uBAAA,KAAA,MAAA,CAAA,MAAA,QAAA,MAAA,CAAA,MAAA"}
package/dist/vite.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import plugin, { default as vite } from "@powerlines/plugin-vite";
2
2
  import * as _$vite from "vite";
3
- import { VitePluginUserConfig } from "@powerlines/plugin-vite/types";
3
+ import { VitePluginInitialConfig } from "@powerlines/plugin-vite/types";
4
4
 
5
5
  //#region src/vite.d.ts
6
6
  /**
@@ -19,7 +19,7 @@ import { VitePluginUserConfig } from "@powerlines/plugin-vite/types";
19
19
  *
20
20
  * ```
21
21
  */
22
- declare const unplugin: (options: Partial<VitePluginUserConfig>) => _$vite.Plugin<any> | _$vite.Plugin<any>[];
22
+ declare const unplugin: (options: VitePluginInitialConfig) => _$vite.Plugin<any> | _$vite.Plugin<any>[];
23
23
  //#endregion
24
24
  export { plugin, unplugin, vite };
25
25
  //# sourceMappingURL=vite.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vite.d.mts","names":[],"sources":["../src/vite.ts"],"mappings":";;;;;;;;AA8CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,oBAAA,MAAA,MAAA,CAAA,MAAA,QAAA,MAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"vite.d.mts","names":[],"sources":["../src/vite.ts"],"mappings":";;;;;;;;AA8CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,uBAAA,KAAA,MAAA,CAAA,MAAA,QAAA,MAAA,CAAA,MAAA"}
package/dist/vite.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"vite.mjs","names":["defu"],"sources":["../src/vite.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 { resolveOptions } from \"@powerlines/plugin-vite/helpers/resolve-options\";\nimport {\n ViteOptions,\n VitePluginUserConfig\n} from \"@powerlines/plugin-vite/types\";\nimport { isDevelopmentMode, isTestMode } from \"@stryke/env/environment-checks\";\nimport defu from \"defu\";\nimport { createVitePlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport { default as plugin, default as vite } from \"@powerlines/plugin-vite\";\n\n/**\n * A Vite plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://vitejs.dev/guide/api-plugin.html#plugin-api\n *\n * @example\n * ```ts\n * // vite.config.ts\n * import powerlines from \"powerlines/vite\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * });\n *\n * ```\n */\nexport const unplugin = createVitePlugin<Partial<VitePluginUserConfig>>(\n createUnpluginFactory(\"vite\", (api, plugin) => {\n return {\n ...plugin,\n vite: {\n sharedDuringBuild: true,\n\n async hotUpdate(options) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\"vite:hotUpdate\", { environment }, options);\n },\n async config(config, env) {\n api.context.config.mode = isDevelopmentMode(env.mode)\n ? \"development\"\n : isTestMode(env.mode)\n ? \"test\"\n : \"production\";\n\n const environment = await api.context.getEnvironment();\n const result = await api.callHook(\n \"vite:config\",\n { environment },\n config,\n env\n );\n\n return defu(\n resolveOptions(api.context),\n result?.build ?? {},\n config\n ) as Omit<ViteOptions, \"plugins\">;\n },\n async configResolved(_config) {\n const environment = await api.context.getEnvironment();\n\n await api.callHook(\"configResolved\", { environment });\n },\n async configureServer(server) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\"vite:configureServer\", { environment }, server);\n },\n async configurePreviewServer(server) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\n \"vite:configurePreviewServer\",\n { environment },\n server\n );\n },\n async transformIndexHtml(html, ctx) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\n \"vite:transformIndexHtml\",\n { environment },\n html,\n ctx\n );\n },\n async handleHotUpdate(ctx) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\"vite:handleHotUpdate\", { environment }, ctx);\n }\n }\n };\n })\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,WAAW,iBACtB,sBAAsB,SAAS,KAAK,WAAW;AAC7C,QAAO;EACL,GAAG;EACH,MAAM;GACJ,mBAAmB;GAEnB,MAAM,UAAU,SAAS;IACvB,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SAAS,kBAAkB,EAAE,aAAa,EAAE,QAAQ;;GAEjE,MAAM,OAAO,QAAQ,KAAK;AACxB,QAAI,QAAQ,OAAO,OAAO,kBAAkB,IAAI,KAAK,GACjD,gBACA,WAAW,IAAI,KAAK,GAClB,SACA;IAEN,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;IACtD,MAAM,SAAS,MAAM,IAAI,SACvB,eACA,EAAE,aAAa,EACf,QACA,IACD;AAED,WAAOA,OACL,eAAe,IAAI,QAAQ,EAC3B,QAAQ,SAAS,EAAE,EACnB,OACD;;GAEH,MAAM,eAAe,SAAS;IAC5B,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,UAAM,IAAI,SAAS,kBAAkB,EAAE,aAAa,CAAC;;GAEvD,MAAM,gBAAgB,QAAQ;IAC5B,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SAAS,wBAAwB,EAAE,aAAa,EAAE,OAAO;;GAEtE,MAAM,uBAAuB,QAAQ;IACnC,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SACT,+BACA,EAAE,aAAa,EACf,OACD;;GAEH,MAAM,mBAAmB,MAAM,KAAK;IAClC,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SACT,2BACA,EAAE,aAAa,EACf,MACA,IACD;;GAEH,MAAM,gBAAgB,KAAK;IACzB,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SAAS,wBAAwB,EAAE,aAAa,EAAE,IAAI;;GAEpE;EACF;EACD,CACH"}
1
+ {"version":3,"file":"vite.mjs","names":["defu"],"sources":["../src/vite.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 { resolveOptions } from \"@powerlines/plugin-vite/helpers/resolve-options\";\nimport {\n ViteOptions,\n VitePluginInitialConfig\n} from \"@powerlines/plugin-vite/types\";\nimport { isDevelopmentMode, isTestMode } from \"@stryke/env/environment-checks\";\nimport defu from \"defu\";\nimport { createVitePlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport { default as plugin, default as vite } from \"@powerlines/plugin-vite\";\n\n/**\n * A Vite plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://vitejs.dev/guide/api-plugin.html#plugin-api\n *\n * @example\n * ```ts\n * // vite.config.ts\n * import powerlines from \"powerlines/vite\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * });\n *\n * ```\n */\nexport const unplugin = createVitePlugin<VitePluginInitialConfig>(\n createUnpluginFactory(\"vite\", (api, plugin) => {\n return {\n ...plugin,\n vite: {\n sharedDuringBuild: true,\n\n async hotUpdate(options) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\"vite:hotUpdate\", { environment }, options);\n },\n async config(config, env) {\n api.context.config.mode = isDevelopmentMode(env.mode)\n ? \"development\"\n : isTestMode(env.mode)\n ? \"test\"\n : \"production\";\n\n const environment = await api.context.getEnvironment();\n const result = await api.callHook(\n \"vite:config\",\n { environment },\n config,\n env\n );\n\n return defu(\n resolveOptions(api.context),\n result?.build ?? {},\n config\n ) as Omit<ViteOptions, \"plugins\">;\n },\n async configResolved(_config) {\n const environment = await api.context.getEnvironment();\n\n await api.callHook(\"configResolved\", { environment });\n },\n async configureServer(server) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\"vite:configureServer\", { environment }, server);\n },\n async configurePreviewServer(server) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\n \"vite:configurePreviewServer\",\n { environment },\n server\n );\n },\n async transformIndexHtml(html, ctx) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\n \"vite:transformIndexHtml\",\n { environment },\n html,\n ctx\n );\n },\n async handleHotUpdate(ctx) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\"vite:handleHotUpdate\", { environment }, ctx);\n }\n }\n };\n })\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,WAAW,iBACtB,sBAAsB,SAAS,KAAK,WAAW;AAC7C,QAAO;EACL,GAAG;EACH,MAAM;GACJ,mBAAmB;GAEnB,MAAM,UAAU,SAAS;IACvB,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SAAS,kBAAkB,EAAE,aAAa,EAAE,QAAQ;;GAEjE,MAAM,OAAO,QAAQ,KAAK;AACxB,QAAI,QAAQ,OAAO,OAAO,kBAAkB,IAAI,KAAK,GACjD,gBACA,WAAW,IAAI,KAAK,GAClB,SACA;IAEN,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;IACtD,MAAM,SAAS,MAAM,IAAI,SACvB,eACA,EAAE,aAAa,EACf,QACA,IACD;AAED,WAAOA,OACL,eAAe,IAAI,QAAQ,EAC3B,QAAQ,SAAS,EAAE,EACnB,OACD;;GAEH,MAAM,eAAe,SAAS;IAC5B,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,UAAM,IAAI,SAAS,kBAAkB,EAAE,aAAa,CAAC;;GAEvD,MAAM,gBAAgB,QAAQ;IAC5B,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SAAS,wBAAwB,EAAE,aAAa,EAAE,OAAO;;GAEtE,MAAM,uBAAuB,QAAQ;IACnC,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SACT,+BACA,EAAE,aAAa,EACf,OACD;;GAEH,MAAM,mBAAmB,MAAM,KAAK;IAClC,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SACT,2BACA,EAAE,aAAa,EACf,MACA,IACD;;GAEH,MAAM,gBAAgB,KAAK;IACzB,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SAAS,wBAAwB,EAAE,aAAa,EAAE,IAAI;;GAEpE;EACF;EACD,CACH"}
@@ -1,5 +1,5 @@
1
1
  import * as _$webpack from "webpack";
2
- import { WebpackPluginUserConfig } from "@powerlines/plugin-webpack/types/plugin";
2
+ import { WebpackPluginInitialConfig } from "@powerlines/plugin-webpack/types/plugin";
3
3
  import plugin, { default as webpack } from "@powerlines/plugin-webpack";
4
4
 
5
5
  //#region src/webpack.d.ts
@@ -18,7 +18,7 @@ import plugin, { default as webpack } from "@powerlines/plugin-webpack";
18
18
  * }
19
19
  * ```
20
20
  */
21
- declare const unplugin: (options: Partial<WebpackPluginUserConfig>) => _$webpack.WebpackPluginInstance;
21
+ declare const unplugin: (options: WebpackPluginInitialConfig) => _$webpack.WebpackPluginInstance;
22
22
  //#endregion
23
23
  export { plugin, unplugin, webpack };
24
24
  //# sourceMappingURL=webpack.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"webpack.d.cts","names":[],"sources":["../src/webpack.ts"],"mappings":";;;;;;;;AA0CA;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,uBAAA,MAAA,SAAA,CAAA,qBAAA"}
1
+ {"version":3,"file":"webpack.d.cts","names":[],"sources":["../src/webpack.ts"],"mappings":";;;;;;;;AA0CA;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,0BAAA,KAAA,SAAA,CAAA,qBAAA"}
@@ -1,6 +1,6 @@
1
1
  import plugin, { default as webpack } from "@powerlines/plugin-webpack";
2
2
  import * as _$webpack from "webpack";
3
- import { WebpackPluginUserConfig } from "@powerlines/plugin-webpack/types/plugin";
3
+ import { WebpackPluginInitialConfig } from "@powerlines/plugin-webpack/types/plugin";
4
4
 
5
5
  //#region src/webpack.d.ts
6
6
  /**
@@ -18,7 +18,7 @@ import { WebpackPluginUserConfig } from "@powerlines/plugin-webpack/types/plugin
18
18
  * }
19
19
  * ```
20
20
  */
21
- declare const unplugin: (options: Partial<WebpackPluginUserConfig>) => _$webpack.WebpackPluginInstance;
21
+ declare const unplugin: (options: WebpackPluginInitialConfig) => _$webpack.WebpackPluginInstance;
22
22
  //#endregion
23
23
  export { plugin, unplugin, webpack };
24
24
  //# sourceMappingURL=webpack.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"webpack.d.mts","names":[],"sources":["../src/webpack.ts"],"mappings":";;;;;;;;AA0CA;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,uBAAA,MAAA,SAAA,CAAA,qBAAA"}
1
+ {"version":3,"file":"webpack.d.mts","names":[],"sources":["../src/webpack.ts"],"mappings":";;;;;;;;AA0CA;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,0BAAA,KAAA,SAAA,CAAA,qBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"webpack.mjs","names":[],"sources":["../src/webpack.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 { WebpackPluginUserConfig } from \"@powerlines/plugin-webpack/types/plugin\";\nimport { createWebpackPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {\n default as plugin,\n default as webpack\n} from \"@powerlines/plugin-webpack\";\n\n/**\n * An Webpack plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://webpack.js.org/contribute/writing-a-plugin/#basic-plugin-architecture\n *\n * @example\n * ```js\n * // webpack.config.js\n * import powerlines from \"powerlines/webpack\";\n *\n * export default {\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * }\n * ```\n */\nexport const unplugin = createWebpackPlugin<Partial<WebpackPluginUserConfig>>(\n createUnpluginFactory(\"webpack\")\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0CA,MAAa,WAAW,oBACtB,sBAAsB,UAAU,CACjC"}
1
+ {"version":3,"file":"webpack.mjs","names":[],"sources":["../src/webpack.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 { WebpackPluginInitialConfig } from \"@powerlines/plugin-webpack/types/plugin\";\nimport { createWebpackPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {\n default as plugin,\n default as webpack\n} from \"@powerlines/plugin-webpack\";\n\n/**\n * An Webpack plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://webpack.js.org/contribute/writing-a-plugin/#basic-plugin-architecture\n *\n * @example\n * ```js\n * // webpack.config.js\n * import powerlines from \"powerlines/webpack\";\n *\n * export default {\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * }\n * ```\n */\nexport const unplugin = createWebpackPlugin<WebpackPluginInitialConfig>(\n createUnpluginFactory(\"webpack\")\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0CA,MAAa,WAAW,oBACtB,sBAAsB,UAAU,CACjC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powerlines",
3
- "version": "0.44.12",
3
+ "version": "0.45.1",
4
4
  "private": false,
5
5
  "description": "The \"framework framework\" that simplifies modern dev tool usage, generates virtual (or actual) code modules, and improves DX across the board.",
6
6
  "keywords": [
@@ -373,8 +373,8 @@
373
373
  "files": ["dist/**/*", "files/**/*", "schemas/**/*"],
374
374
  "dependencies": {
375
375
  "@babel/types": "8.0.0-rc.3",
376
- "@powerlines/core": "^0.44.12",
377
- "@powerlines/engine": "^0.44.12",
376
+ "@powerlines/core": "^0.45.1",
377
+ "@powerlines/engine": "^0.45.1",
378
378
  "@storm-software/config": "^1.137.34",
379
379
  "@storm-software/config-tools": "^1.190.1",
380
380
  "@stryke/fs": "^0.33.69",
@@ -441,5 +441,5 @@
441
441
  },
442
442
  "publishConfig": { "access": "public" },
443
443
  "bin": { "powerlines": "./bin/bin.mjs" },
444
- "gitHead": "93fe3bf5054baa0bb1841c64fe082da56631a010"
444
+ "gitHead": "4efe7574db32436446080cdc605fd2819e192457"
445
445
  }