powerlines 0.40.20 → 0.40.21

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 (57) hide show
  1. package/README.md +3 -2
  2. package/dist/{api-DVNFobLD.mjs → api-BtT0v28K.mjs} +3 -3
  3. package/dist/{api-DVNFobLD.mjs.map → api-BtT0v28K.mjs.map} +1 -1
  4. package/dist/{api-BESwNTu1.cjs → api-D-4_dQRX.cjs} +2 -2
  5. package/dist/astro.cjs +2 -2
  6. package/dist/astro.mjs +2 -2
  7. package/dist/context/index.cjs +1 -1
  8. package/dist/context/index.mjs +1 -1
  9. package/dist/{esbuild-1XefRwHm.cjs → esbuild-BhLG9GPh.cjs} +1 -1
  10. package/dist/{esbuild-84-wpkWu.mjs → esbuild-bRKMe1JD.mjs} +2 -2
  11. package/dist/{esbuild-84-wpkWu.mjs.map → esbuild-bRKMe1JD.mjs.map} +1 -1
  12. package/dist/esbuild.cjs +2 -2
  13. package/dist/esbuild.mjs +2 -2
  14. package/dist/farm.cjs +1 -1
  15. package/dist/farm.mjs +1 -1
  16. package/dist/index.cjs +1 -1
  17. package/dist/index.mjs +1 -1
  18. package/dist/next.cjs +2 -2
  19. package/dist/next.mjs +2 -2
  20. package/dist/nuxt.cjs +3 -3
  21. package/dist/nuxt.mjs +3 -3
  22. package/dist/plugin-utils.d.cts +9 -9
  23. package/dist/{rolldown-CCW9um3c.mjs → rolldown-C4QhBFIU.mjs} +2 -2
  24. package/dist/{rolldown-CCW9um3c.mjs.map → rolldown-C4QhBFIU.mjs.map} +1 -1
  25. package/dist/{rolldown-CTf5NRft.cjs → rolldown-Dgcu2_Qi.cjs} +1 -1
  26. package/dist/rolldown.cjs +2 -2
  27. package/dist/rolldown.mjs +2 -2
  28. package/dist/rollup.cjs +1 -1
  29. package/dist/rollup.mjs +1 -1
  30. package/dist/rspack.cjs +1 -1
  31. package/dist/rspack.mjs +1 -1
  32. package/dist/tsdown.cjs +2 -2
  33. package/dist/tsdown.mjs +2 -2
  34. package/dist/tsup.cjs +2 -2
  35. package/dist/tsup.mjs +2 -2
  36. package/dist/unloader.cjs +1 -1
  37. package/dist/unloader.mjs +1 -1
  38. package/dist/unplugin.cjs +1 -1
  39. package/dist/unplugin.mjs +1 -1
  40. package/dist/{vite-DeBLOF8V.cjs → vite-DmBSriVs.cjs} +1 -1
  41. package/dist/{vite-BEFn-UDD.mjs → vite-uXQWIWdY.mjs} +2 -2
  42. package/dist/{vite-BEFn-UDD.mjs.map → vite-uXQWIWdY.mjs.map} +1 -1
  43. package/dist/vite.cjs +2 -2
  44. package/dist/vite.mjs +2 -2
  45. package/dist/{webpack-D8R3jqLK.cjs → webpack-Dn1pjhRP.cjs} +1 -1
  46. package/dist/{webpack-Bs3j748Y.mjs → webpack-N9RxJ_s0.mjs} +2 -2
  47. package/dist/{webpack-Bs3j748Y.mjs.map → webpack-N9RxJ_s0.mjs.map} +1 -1
  48. package/dist/webpack.cjs +2 -2
  49. package/dist/webpack.mjs +2 -2
  50. package/files/application/README.md.hbs +16 -42
  51. package/files/application/package.json.hbs +7 -28
  52. package/files/common/jest.config.ts.hbs +2 -3
  53. package/files/common/tsconfig.json.hbs +5 -10
  54. package/files/common/tsconfig.spec.json.hbs +3 -13
  55. package/files/library/README.md.hbs +11 -34
  56. package/files/library/package.json.hbs +9 -32
  57. package/package.json +12 -12
@@ -1,4 +1,4 @@
1
- import { a as createUnpluginFactory, o as createUnplugin } from "./api-DVNFobLD.mjs";
1
+ import { a as createUnpluginFactory, o as createUnplugin } from "./api-BtT0v28K.mjs";
2
2
  import { r as resolveOptions$1 } from "./resolve-options-DHL3RM8F.mjs";
3
3
  import { n as resolveOptions$3 } from "./resolve-options-6sXFqzEA.mjs";
4
4
  import { t as resolveOptions$2 } from "./resolve-options-D-RGs8j8.mjs";
@@ -168,4 +168,4 @@ var vite_default = unplugin;
168
168
 
169
169
  //#endregion
170
170
  export { vite_default as n, src_default as r, unplugin as t };
171
- //# sourceMappingURL=vite-BEFn-UDD.mjs.map
171
+ //# sourceMappingURL=vite-uXQWIWdY.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"vite-BEFn-UDD.mjs","names":["DEFAULT_VITE_CONFIG: Partial<ViteOptions>","resolveEsbuildOptions","resolveRolldownOptions","resolveRollupOptions","createVitePlugin","createViteUnplugin","createVitePlugin","plugin"],"sources":["../../plugin-vite/src/helpers/resolve-options.ts","../../plugin-vite/src/helpers/unplugin.ts","../../plugin-vite/src/index.ts","../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 { Context } from \"@powerlines/core\";\nimport { resolveOptions as resolveEsbuildOptions } from \"@powerlines/plugin-esbuild/helpers/resolve-options\";\nimport { resolveOptions as resolveRolldownOptions } from \"@powerlines/plugin-rolldown/helpers/resolve-options\";\nimport { resolveOptions as resolveRollupOptions } from \"@powerlines/plugin-rollup/helpers/resolve-options\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport { ESBuildOptions } from \"vite\";\nimport { VitePluginResolvedConfig } from \"../types\";\nimport { ViteOptions } from \"../types/build\";\n\nexport const DEFAULT_VITE_CONFIG: Partial<ViteOptions> = {\n resolve: {\n extensions: [\".mjs\", \".js\", \".mts\", \".ts\", \".jsx\", \".tsx\", \".json\"]\n },\n json: {\n stringify: true\n },\n logLevel: \"silent\",\n clearScreen: true\n};\n\n/**\n * Resolves the options for [vite](https://vitejs.dev/).\n *\n * @param context - The build context.\n * @returns The resolved options.\n */\nexport function resolveOptions(context: Context): ViteOptions {\n return defu(\n {\n resolve: {\n alias: Object.entries(context.alias).reduce(\n (ret, [id, path]) => {\n if (!ret.find(e => e.find === id)) {\n ret.push({\n find: id,\n replacement: path\n });\n } else {\n context.warn(\n `Duplicate alias entry for '${id}' detected. The first entry will be used.`\n );\n }\n\n return ret;\n },\n [] as { find: string; replacement: string }[]\n ),\n dedupe: context.config.resolve.dedupe,\n mainFields: context.config.resolve.mainFields,\n conditions: context.config.resolve.conditions,\n extensions: context.config.resolve.extensions\n }\n },\n (context.config as VitePluginResolvedConfig).vite\n ? defu(\n (context.config as VitePluginResolvedConfig).vite,\n {\n optimizeDeps:\n (context.config as VitePluginResolvedConfig).vite?.optimizeDeps ??\n {}\n },\n {\n optimizeDeps: {\n extensions: context.config.resolve.extensions\n }\n }\n )\n : {},\n {\n define: context.config.define,\n rootDir: context.fs.existsSync(joinPaths(context.config.root, \"src\"))\n ? joinPaths(context.config.root, \"src\")\n : context.config.root,\n platform: context.config.platform,\n mode:\n context.config.mode === \"development\" ? \"development\" : \"production\",\n cacheDir: joinPaths(context.cachePath, \"vite\"),\n build: {\n minify: context.config.mode !== \"development\",\n metafile: context.config.mode === \"development\",\n sourcemap: context.config.mode === \"development\",\n outDir: context.config.output.buildPath,\n tsconfig: context.tsconfig.tsconfigFilePath,\n tsconfigRaw: context.tsconfig.tsconfigJson\n },\n esbuild: resolveEsbuildOptions(context) as ESBuildOptions,\n optimizeDeps: {\n rolldownOptions: resolveRolldownOptions(context),\n rollupOptions: resolveRollupOptions(context),\n esbuildOptions: resolveEsbuildOptions(context)\n },\n logLevel: context.config.logLevel ?? undefined,\n envDir: context.config.root\n } as ViteOptions,\n DEFAULT_VITE_CONFIG\n ) as ViteOptions;\n}\n","/* -------------------------------------------------------------------\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 { createUnplugin } from \"@powerlines/core/lib/unplugin\";\nimport { createVitePlugin as createViteUnplugin } from \"unplugin\";\nimport { VitePluginContext } from \"../types/plugin\";\n\nexport function createVitePlugin(context: VitePluginContext) {\n return createViteUnplugin(createUnplugin(context))({});\n}\n","/* -------------------------------------------------------------------\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 { Context, Plugin } from \"@powerlines/core\";\nimport defu from \"defu\";\nimport { build, InlineConfig } from \"vite\";\nimport { DEFAULT_VITE_CONFIG, resolveOptions } from \"./helpers/resolve-options\";\nimport { createVitePlugin } from \"./helpers/unplugin\";\nimport { UNSAFE_VitePluginContext } from \"./types/_internal\";\nimport {\n VitePluginContext,\n VitePluginOptions,\n VitePluginResolvedConfig\n} from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface Config {\n vite?: VitePluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <TContext extends VitePluginContext = VitePluginContext>(\n options: VitePluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"vite\",\n config() {\n this.trace(\n \"Providing default configuration for the Powerlines `vite` build plugin.\"\n );\n\n return {\n output: {\n format: [\"cjs\", \"esm\"]\n },\n vite: {\n ...DEFAULT_VITE_CONFIG,\n ...options\n },\n singleBuild: true\n } as Partial<VitePluginResolvedConfig>;\n },\n async build() {\n this.trace(`Building the Powerlines plugin.`);\n\n const environments = (this as unknown as UNSAFE_VitePluginContext)\n ?.$$internal?.api?.context?.environments;\n if (!environments || Object.keys(environments).length === 0) {\n throw new Error(\n `No environments found in the Powerlines context. At least one environment should have been generated - please report this issue to https://github.com/storm-software/powerlines/issues.`\n );\n }\n\n this.trace(\n `Running Vite for ${Object.keys(environments).length} environments.`\n );\n\n const config = defu(\n {\n config: false,\n entry: this.entry,\n environments: Object.fromEntries(\n Object.entries(environments).map(([name, env]) => [\n name,\n resolveOptions(env as Context)\n ])\n )\n },\n resolveOptions(this),\n {\n plugins: [createVitePlugin(this)]\n }\n );\n\n await build(config as InlineConfig);\n }\n };\n};\n\nexport default plugin;\n","/* -------------------------------------------------------------------\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 // Need to use `any` here to avoid excessive type complexity\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\nexport default unplugin;\n\nexport { unplugin as \"module.exports\" };\n"],"mappings":";;;;;;;;;;;AA4BA,MAAaA,sBAA4C;CACvD,SAAS,EACP,YAAY;EAAC;EAAQ;EAAO;EAAQ;EAAO;EAAQ;EAAQ;EAAQ,EACpE;CACD,MAAM,EACJ,WAAW,MACZ;CACD,UAAU;CACV,aAAa;CACd;;;;;;;AAQD,SAAgB,eAAe,SAA+B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AAK,GAClB,SACA;IAEN,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;IACtD,MAAM,SAAS,MAAM,IAAI,SACvB,eACA,EAAE,aAAa,EACf,QACA,IACD;AAED,WAAO,KACL,eAAe,IAAI,QAAQ,EAE3B,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;AAED,mBAAe"}
1
+ {"version":3,"file":"vite-uXQWIWdY.mjs","names":["DEFAULT_VITE_CONFIG: Partial<ViteOptions>","resolveEsbuildOptions","resolveRolldownOptions","resolveRollupOptions","createVitePlugin","createViteUnplugin","createVitePlugin","plugin"],"sources":["../../plugin-vite/src/helpers/resolve-options.ts","../../plugin-vite/src/helpers/unplugin.ts","../../plugin-vite/src/index.ts","../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 { Context } from \"@powerlines/core\";\nimport { resolveOptions as resolveEsbuildOptions } from \"@powerlines/plugin-esbuild/helpers/resolve-options\";\nimport { resolveOptions as resolveRolldownOptions } from \"@powerlines/plugin-rolldown/helpers/resolve-options\";\nimport { resolveOptions as resolveRollupOptions } from \"@powerlines/plugin-rollup/helpers/resolve-options\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport { ESBuildOptions } from \"vite\";\nimport { VitePluginResolvedConfig } from \"../types\";\nimport { ViteOptions } from \"../types/build\";\n\nexport const DEFAULT_VITE_CONFIG: Partial<ViteOptions> = {\n resolve: {\n extensions: [\".mjs\", \".js\", \".mts\", \".ts\", \".jsx\", \".tsx\", \".json\"]\n },\n json: {\n stringify: true\n },\n logLevel: \"silent\",\n clearScreen: true\n};\n\n/**\n * Resolves the options for [vite](https://vitejs.dev/).\n *\n * @param context - The build context.\n * @returns The resolved options.\n */\nexport function resolveOptions(context: Context): ViteOptions {\n return defu(\n {\n resolve: {\n alias: Object.entries(context.alias).reduce(\n (ret, [id, path]) => {\n if (!ret.find(e => e.find === id)) {\n ret.push({\n find: id,\n replacement: path\n });\n } else {\n context.warn(\n `Duplicate alias entry for '${id}' detected. The first entry will be used.`\n );\n }\n\n return ret;\n },\n [] as { find: string; replacement: string }[]\n ),\n dedupe: context.config.resolve.dedupe,\n mainFields: context.config.resolve.mainFields,\n conditions: context.config.resolve.conditions,\n extensions: context.config.resolve.extensions\n }\n },\n (context.config as VitePluginResolvedConfig).vite\n ? defu(\n (context.config as VitePluginResolvedConfig).vite,\n {\n optimizeDeps:\n (context.config as VitePluginResolvedConfig).vite?.optimizeDeps ??\n {}\n },\n {\n optimizeDeps: {\n extensions: context.config.resolve.extensions\n }\n }\n )\n : {},\n {\n define: context.config.define,\n rootDir: context.fs.existsSync(joinPaths(context.config.root, \"src\"))\n ? joinPaths(context.config.root, \"src\")\n : context.config.root,\n platform: context.config.platform,\n mode:\n context.config.mode === \"development\" ? \"development\" : \"production\",\n cacheDir: joinPaths(context.cachePath, \"vite\"),\n build: {\n minify: context.config.mode !== \"development\",\n metafile: context.config.mode === \"development\",\n sourcemap: context.config.mode === \"development\",\n outDir: context.config.output.buildPath,\n tsconfig: context.tsconfig.tsconfigFilePath,\n tsconfigRaw: context.tsconfig.tsconfigJson\n },\n esbuild: resolveEsbuildOptions(context) as ESBuildOptions,\n optimizeDeps: {\n rolldownOptions: resolveRolldownOptions(context),\n rollupOptions: resolveRollupOptions(context),\n esbuildOptions: resolveEsbuildOptions(context)\n },\n logLevel: context.config.logLevel ?? undefined,\n envDir: context.config.root\n } as ViteOptions,\n DEFAULT_VITE_CONFIG\n ) as ViteOptions;\n}\n","/* -------------------------------------------------------------------\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 { createUnplugin } from \"@powerlines/core/lib/unplugin\";\nimport { createVitePlugin as createViteUnplugin } from \"unplugin\";\nimport { VitePluginContext } from \"../types/plugin\";\n\nexport function createVitePlugin(context: VitePluginContext) {\n return createViteUnplugin(createUnplugin(context))({});\n}\n","/* -------------------------------------------------------------------\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 { Context, Plugin } from \"@powerlines/core\";\nimport defu from \"defu\";\nimport { build, InlineConfig } from \"vite\";\nimport { DEFAULT_VITE_CONFIG, resolveOptions } from \"./helpers/resolve-options\";\nimport { createVitePlugin } from \"./helpers/unplugin\";\nimport { UNSAFE_VitePluginContext } from \"./types/_internal\";\nimport {\n VitePluginContext,\n VitePluginOptions,\n VitePluginResolvedConfig\n} from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface Config {\n vite?: VitePluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <TContext extends VitePluginContext = VitePluginContext>(\n options: VitePluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"vite\",\n config() {\n this.trace(\n \"Providing default configuration for the Powerlines `vite` build plugin.\"\n );\n\n return {\n output: {\n format: [\"cjs\", \"esm\"]\n },\n vite: {\n ...DEFAULT_VITE_CONFIG,\n ...options\n },\n singleBuild: true\n } as Partial<VitePluginResolvedConfig>;\n },\n async build() {\n this.trace(`Building the Powerlines plugin.`);\n\n const environments = (this as unknown as UNSAFE_VitePluginContext)\n ?.$$internal?.api?.context?.environments;\n if (!environments || Object.keys(environments).length === 0) {\n throw new Error(\n `No environments found in the Powerlines context. At least one environment should have been generated - please report this issue to https://github.com/storm-software/powerlines/issues.`\n );\n }\n\n this.trace(\n `Running Vite for ${Object.keys(environments).length} environments.`\n );\n\n const config = defu(\n {\n config: false,\n entry: this.entry,\n environments: Object.fromEntries(\n Object.entries(environments).map(([name, env]) => [\n name,\n resolveOptions(env as Context)\n ])\n )\n },\n resolveOptions(this),\n {\n plugins: [createVitePlugin(this)]\n }\n );\n\n await build(config as InlineConfig);\n }\n };\n};\n\nexport default plugin;\n","/* -------------------------------------------------------------------\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 // Need to use `any` here to avoid excessive type complexity\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\nexport default unplugin;\n\nexport { unplugin as \"module.exports\" };\n"],"mappings":";;;;;;;;;;;AA4BA,MAAaA,sBAA4C;CACvD,SAAS,EACP,YAAY;EAAC;EAAQ;EAAO;EAAQ;EAAO;EAAQ;EAAQ;EAAQ,EACpE;CACD,MAAM,EACJ,WAAW,MACZ;CACD,UAAU;CACV,aAAa;CACd;;;;;;;AAQD,SAAgB,eAAe,SAA+B;AAC5D,QAAO,KACL,EACE,SAAS;EACP,OAAO,OAAO,QAAQ,QAAQ,MAAM,CAAC,QAClC,KAAK,CAAC,IAAI,UAAU;AACnB,OAAI,CAAC,IAAI,MAAK,MAAK,EAAE,SAAS,GAAG,CAC/B,KAAI,KAAK;IACP,MAAM;IACN,aAAa;IACd,CAAC;OAEF,SAAQ,KACN,8BAA8B,GAAG,2CAClC;AAGH,UAAO;KAET,EAAE,CACH;EACD,QAAQ,QAAQ,OAAO,QAAQ;EAC/B,YAAY,QAAQ,OAAO,QAAQ;EACnC,YAAY,QAAQ,OAAO,QAAQ;EACnC,YAAY,QAAQ,OAAO,QAAQ;EACpC,EAC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AAI,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;AAED,mBAAe"}
package/dist/vite.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
- require('./api-BESwNTu1.cjs');
2
+ require('./api-D-4_dQRX.cjs');
3
3
  require('./tsconfig-C8M8X6U0.cjs');
4
4
  require('./plugin-utils-Ck3cx3w6.cjs');
5
5
  require('./plugin-CZ_PJPpQ.cjs');
@@ -11,7 +11,7 @@ require('./virtual-B1MLgqnQ.cjs');
11
11
  require('./resolve-options-BQnTgg3V.cjs');
12
12
  require('./resolve-options-vyFhhkLp.cjs');
13
13
  require('./resolve-options-lxQ2pm0W.cjs');
14
- const require_vite = require('./vite-DeBLOF8V.cjs');
14
+ const require_vite = require('./vite-DmBSriVs.cjs');
15
15
 
16
16
  exports.default = require_vite.vite_default;
17
17
  exports["module.exports"] = require_vite.unplugin;
package/dist/vite.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import "./api-DVNFobLD.mjs";
1
+ import "./api-BtT0v28K.mjs";
2
2
  import "./tsconfig-B92heKit.mjs";
3
3
  import "./plugin-utils-C3HnZJl1.mjs";
4
4
  import "./plugin-E5foRD0k.mjs";
@@ -10,6 +10,6 @@ import "./virtual-B9imjOqe.mjs";
10
10
  import "./resolve-options-DHL3RM8F.mjs";
11
11
  import "./resolve-options-6sXFqzEA.mjs";
12
12
  import "./resolve-options-D-RGs8j8.mjs";
13
- import { n as vite_default, r as src_default, t as unplugin } from "./vite-BEFn-UDD.mjs";
13
+ import { n as vite_default, r as src_default, t as unplugin } from "./vite-uXQWIWdY.mjs";
14
14
 
15
15
  export { vite_default as default, unplugin as "module.exports", unplugin, src_default as plugin, src_default as vite };
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./chunk-CbDLau6x.cjs');
2
- const require_api = require('./api-BESwNTu1.cjs');
2
+ const require_api = require('./api-D-4_dQRX.cjs');
3
3
  let __stryke_path_join_paths = require("@stryke/path/join-paths");
4
4
  let defu = require("defu");
5
5
  defu = require_chunk.__toESM(defu);
@@ -1,4 +1,4 @@
1
- import { a as createUnpluginFactory, o as createUnplugin } from "./api-DVNFobLD.mjs";
1
+ import { a as createUnpluginFactory, o as createUnplugin } from "./api-BtT0v28K.mjs";
2
2
  import { joinPaths } from "@stryke/path/join-paths";
3
3
  import defu from "defu";
4
4
  import { createWebpackPlugin } from "unplugin";
@@ -85,4 +85,4 @@ var webpack_default = unplugin;
85
85
 
86
86
  //#endregion
87
87
  export { webpack_default as n, src_default as r, unplugin as t };
88
- //# sourceMappingURL=webpack-Bs3j748Y.mjs.map
88
+ //# sourceMappingURL=webpack-N9RxJ_s0.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"webpack-Bs3j748Y.mjs","names":["createWebpackPlugin","createWebpackUnplugin","createWebpackPlugin"],"sources":["../../plugin-webpack/src/helpers/resolve-options.ts","../../plugin-webpack/src/helpers/unplugin.ts","../../plugin-webpack/src/index.ts","../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 { Context } from \"@powerlines/core\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport type { Configuration as ExternalWebpackOptions } from \"webpack\";\nimport { WebpackPluginResolvedConfig } from \"../types\";\n\n/**\n * Resolves the options for [webpack](https://webpack.js.org/).\n *\n * @param context - The build context.\n * @returns The resolved options.\n */\nexport function resolveOptions(context: Context): ExternalWebpackOptions {\n return defu(\n {\n resolve: {\n alias: context.alias\n }\n },\n (context.config as WebpackPluginResolvedConfig).webpack\n ? (context.config as WebpackPluginResolvedConfig).webpack\n : {},\n {\n output: {\n path: joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.output.buildPath\n )\n },\n name: context.config.name,\n plugins:\n (context.config as WebpackPluginResolvedConfig).webpack?.plugins ?? [],\n node:\n context.config.platform === \"node\"\n ? ({\n __dirname: true,\n __filename: true,\n global: true\n } as ExternalWebpackOptions[\"node\"])\n : false,\n mode:\n context.config.mode === \"development\"\n ? (\"development\" as const)\n : (\"production\" as const),\n cache: {\n type: \"filesystem\" as const,\n cacheDirectory: joinPaths(context.cachePath, \"webpack\", \"cache\")\n },\n recordsInputPath: joinPaths(\n context.cachePath,\n \"webpack\",\n \".webpack-records.json\"\n ),\n recordsOutputPath: joinPaths(\n context.cachePath,\n \"webpack\",\n \".webpack-records.json\"\n ),\n context: joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.root\n ),\n noExternal: context.builtins,\n devtool: (context.config.mode !== \"development\"\n ? false\n : \"source-map\") as string | false,\n optimization: {\n minimize: context.config.mode !== \"development\"\n }\n }\n );\n}\n","/* -------------------------------------------------------------------\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 { createUnplugin } from \"@powerlines/core/lib/unplugin\";\nimport { createWebpackPlugin as createWebpackUnplugin } from \"unplugin\";\nimport { WebpackPluginContext } from \"../types/plugin\";\n\nexport function createWebpackPlugin(context: WebpackPluginContext) {\n return createWebpackUnplugin(createUnplugin(context))({});\n}\n","/* -------------------------------------------------------------------\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 { Plugin } from \"@powerlines/core\";\nimport defu from \"defu\";\nimport build from \"webpack\";\nimport { resolveOptions } from \"./helpers/resolve-options\";\nimport { createWebpackPlugin } from \"./helpers/unplugin\";\nimport {\n WebpackPluginContext,\n WebpackPluginOptions,\n WebpackPluginResolvedConfig\n} from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface Config {\n webpack?: WebpackPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <\n TContext extends WebpackPluginContext = WebpackPluginContext\n>(\n options: WebpackPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"webpack\",\n config() {\n this.trace(\n \"Providing default configuration for the Powerlines `webpack` build plugin.\"\n );\n\n return {\n webpack: {\n ...options\n }\n } as Partial<WebpackPluginResolvedConfig>;\n },\n async build() {\n build(\n defu(\n {\n entry: this.entry.reduce(\n (ret, entry) => {\n ret[entry.output || entry.name || entry.file] = entry.file;\n\n return ret;\n },\n {} as Record<string, string>\n )\n },\n resolveOptions(this),\n {\n plugins: [createWebpackPlugin(this)]\n }\n )\n );\n }\n };\n};\n\nexport default plugin;\n","/* -------------------------------------------------------------------\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\nexport default unplugin;\n\nexport { unplugin as \"module.exports\" };\n"],"mappings":";;;;;;;;;;;;;AA8BA,SAAgB,eAAe,SAA0C;AACvE,QAAO,KACL,EACE,SAAS,EACP,OAAO,QAAQ,OAChB,EACF,EACA,QAAQ,OAAuC,UAC3C,QAAQ,OAAuC,UAChD,EAAE,EACN;EACE,QAAQ,EACN,MAAM,UACJ,QAAQ,gBAAgB,eACxB,QAAQ,OAAO,OAAO,UACvB,EACF;EACD,MAAM,QAAQ,OAAO;EACrB,SACG,QAAQ,OAAuC,SAAS,WAAW,EAAE;EACxE,MACE,QAAQ,OAAO,aAAa,SACvB;GACC,WAAW;GACX,YAAY;GACZ,QAAQ;GACT,GACD;EACN,MACE,QAAQ,OAAO,SAAS,gBACnB,gBACA;EACP,OAAO;GACL,MAAM;GACN,gBAAgB,UAAU,QAAQ,WAAW,WAAW,QAAQ;GACjE;EACD,kBAAkB,UAChB,QAAQ,WACR,WACA,wBACD;EACD,mBAAmB,UACjB,QAAQ,WACR,WACA,wBACD;EACD,SAAS,UACP,QAAQ,gBAAgB,eACxB,QAAQ,OAAO,KAChB;EACD,YAAY,QAAQ;EACpB,SAAU,QAAQ,OAAO,SAAS,gBAC9B,QACA;EACJ,cAAc,EACZ,UAAU,QAAQ,OAAO,SAAS,eACnC;EACF,CACF;;;;;AClEH,SAAgBA,sBAAoB,SAA+B;AACjE,QAAOC,oBAAsB,eAAe,QAAQ,CAAC,CAAC,EAAE,CAAC;;;;;;;;ACkB3D,MAAa,UAGX,UAAgC,EAAE,KACb;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,QAAK,MACH,6EACD;AAED,UAAO,EACL,SAAS,EACP,GAAG,SACJ,EACF;;EAEH,MAAM,QAAQ;AACZ,SACE,KACE,EACE,OAAO,KAAK,MAAM,QACf,KAAK,UAAU;AACd,QAAI,MAAM,UAAU,MAAM,QAAQ,MAAM,QAAQ,MAAM;AAEtD,WAAO;MAET,EAAE,CACH,EACF,EACD,eAAe,KAAK,EACpB,EACE,SAAS,CAACC,sBAAoB,KAAK,CAAC,EACrC,CACF,CACF;;EAEJ;;AAGH,kBAAe;;;;;;;;;;;;;;;;;;;ACxCf,MAAa,WAAW,oBACtB,sBAAsB,UAAU,CACjC;AAED,sBAAe"}
1
+ {"version":3,"file":"webpack-N9RxJ_s0.mjs","names":["createWebpackPlugin","createWebpackUnplugin","createWebpackPlugin"],"sources":["../../plugin-webpack/src/helpers/resolve-options.ts","../../plugin-webpack/src/helpers/unplugin.ts","../../plugin-webpack/src/index.ts","../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 { Context } from \"@powerlines/core\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport type { Configuration as ExternalWebpackOptions } from \"webpack\";\nimport { WebpackPluginResolvedConfig } from \"../types\";\n\n/**\n * Resolves the options for [webpack](https://webpack.js.org/).\n *\n * @param context - The build context.\n * @returns The resolved options.\n */\nexport function resolveOptions(context: Context): ExternalWebpackOptions {\n return defu(\n {\n resolve: {\n alias: context.alias\n }\n },\n (context.config as WebpackPluginResolvedConfig).webpack\n ? (context.config as WebpackPluginResolvedConfig).webpack\n : {},\n {\n output: {\n path: joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.output.buildPath\n )\n },\n name: context.config.name,\n plugins:\n (context.config as WebpackPluginResolvedConfig).webpack?.plugins ?? [],\n node:\n context.config.platform === \"node\"\n ? ({\n __dirname: true,\n __filename: true,\n global: true\n } as ExternalWebpackOptions[\"node\"])\n : false,\n mode:\n context.config.mode === \"development\"\n ? (\"development\" as const)\n : (\"production\" as const),\n cache: {\n type: \"filesystem\" as const,\n cacheDirectory: joinPaths(context.cachePath, \"webpack\", \"cache\")\n },\n recordsInputPath: joinPaths(\n context.cachePath,\n \"webpack\",\n \".webpack-records.json\"\n ),\n recordsOutputPath: joinPaths(\n context.cachePath,\n \"webpack\",\n \".webpack-records.json\"\n ),\n context: joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.root\n ),\n noExternal: context.builtins,\n devtool: (context.config.mode !== \"development\"\n ? false\n : \"source-map\") as string | false,\n optimization: {\n minimize: context.config.mode !== \"development\"\n }\n }\n );\n}\n","/* -------------------------------------------------------------------\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 { createUnplugin } from \"@powerlines/core/lib/unplugin\";\nimport { createWebpackPlugin as createWebpackUnplugin } from \"unplugin\";\nimport { WebpackPluginContext } from \"../types/plugin\";\n\nexport function createWebpackPlugin(context: WebpackPluginContext) {\n return createWebpackUnplugin(createUnplugin(context))({});\n}\n","/* -------------------------------------------------------------------\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 { Plugin } from \"@powerlines/core\";\nimport defu from \"defu\";\nimport build from \"webpack\";\nimport { resolveOptions } from \"./helpers/resolve-options\";\nimport { createWebpackPlugin } from \"./helpers/unplugin\";\nimport {\n WebpackPluginContext,\n WebpackPluginOptions,\n WebpackPluginResolvedConfig\n} from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface Config {\n webpack?: WebpackPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <\n TContext extends WebpackPluginContext = WebpackPluginContext\n>(\n options: WebpackPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"webpack\",\n config() {\n this.trace(\n \"Providing default configuration for the Powerlines `webpack` build plugin.\"\n );\n\n return {\n webpack: {\n ...options\n }\n } as Partial<WebpackPluginResolvedConfig>;\n },\n async build() {\n build(\n defu(\n {\n entry: this.entry.reduce(\n (ret, entry) => {\n ret[entry.output || entry.name || entry.file] = entry.file;\n\n return ret;\n },\n {} as Record<string, string>\n )\n },\n resolveOptions(this),\n {\n plugins: [createWebpackPlugin(this)]\n }\n )\n );\n }\n };\n};\n\nexport default plugin;\n","/* -------------------------------------------------------------------\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\nexport default unplugin;\n\nexport { unplugin as \"module.exports\" };\n"],"mappings":";;;;;;;;;;;;;AA8BA,SAAgB,eAAe,SAA0C;AACvE,QAAO,KACL,EACE,SAAS,EACP,OAAO,QAAQ,OAChB,EACF,EACA,QAAQ,OAAuC,UAC3C,QAAQ,OAAuC,UAChD,EAAE,EACN;EACE,QAAQ,EACN,MAAM,UACJ,QAAQ,gBAAgB,eACxB,QAAQ,OAAO,OAAO,UACvB,EACF;EACD,MAAM,QAAQ,OAAO;EACrB,SACG,QAAQ,OAAuC,SAAS,WAAW,EAAE;EACxE,MACE,QAAQ,OAAO,aAAa,SACvB;GACC,WAAW;GACX,YAAY;GACZ,QAAQ;GACT,GACD;EACN,MACE,QAAQ,OAAO,SAAS,gBACnB,gBACA;EACP,OAAO;GACL,MAAM;GACN,gBAAgB,UAAU,QAAQ,WAAW,WAAW,QAAQ;GACjE;EACD,kBAAkB,UAChB,QAAQ,WACR,WACA,wBACD;EACD,mBAAmB,UACjB,QAAQ,WACR,WACA,wBACD;EACD,SAAS,UACP,QAAQ,gBAAgB,eACxB,QAAQ,OAAO,KAChB;EACD,YAAY,QAAQ;EACpB,SAAU,QAAQ,OAAO,SAAS,gBAC9B,QACA;EACJ,cAAc,EACZ,UAAU,QAAQ,OAAO,SAAS,eACnC;EACF,CACF;;;;;AClEH,SAAgBA,sBAAoB,SAA+B;AACjE,QAAOC,oBAAsB,eAAe,QAAQ,CAAC,CAAC,EAAE,CAAC;;;;;;;;ACkB3D,MAAa,UAGX,UAAgC,EAAE,KACb;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,QAAK,MACH,6EACD;AAED,UAAO,EACL,SAAS,EACP,GAAG,SACJ,EACF;;EAEH,MAAM,QAAQ;AACZ,SACE,KACE,EACE,OAAO,KAAK,MAAM,QACf,KAAK,UAAU;AACd,QAAI,MAAM,UAAU,MAAM,QAAQ,MAAM,QAAQ,MAAM;AAEtD,WAAO;MAET,EAAE,CACH,EACF,EACD,eAAe,KAAK,EACpB,EACE,SAAS,CAACC,sBAAoB,KAAK,CAAC,EACrC,CACF,CACF;;EAEJ;;AAGH,kBAAe;;;;;;;;;;;;;;;;;;;ACxCf,MAAa,WAAW,oBACtB,sBAAsB,UAAU,CACjC;AAED,sBAAe"}
package/dist/webpack.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
- require('./api-BESwNTu1.cjs');
2
+ require('./api-D-4_dQRX.cjs');
3
3
  require('./tsconfig-C8M8X6U0.cjs');
4
4
  require('./plugin-utils-Ck3cx3w6.cjs');
5
5
  require('./plugin-CZ_PJPpQ.cjs');
@@ -8,7 +8,7 @@ require('./constants-CZh5rsgh.cjs');
8
8
  require('./config-D86Vw7SC.cjs');
9
9
  require('./utils-BbDma_5Y.cjs');
10
10
  require('./virtual-B1MLgqnQ.cjs');
11
- const require_webpack = require('./webpack-D8R3jqLK.cjs');
11
+ const require_webpack = require('./webpack-Dn1pjhRP.cjs');
12
12
 
13
13
  exports.default = require_webpack.webpack_default;
14
14
  exports["module.exports"] = require_webpack.unplugin;
package/dist/webpack.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import "./api-DVNFobLD.mjs";
1
+ import "./api-BtT0v28K.mjs";
2
2
  import "./tsconfig-B92heKit.mjs";
3
3
  import "./plugin-utils-C3HnZJl1.mjs";
4
4
  import "./plugin-E5foRD0k.mjs";
@@ -7,6 +7,6 @@ import "./constants-cXxSHhNp.mjs";
7
7
  import "./config-D4Fh2gQL.mjs";
8
8
  import "./utils-DoQcX7Sk.mjs";
9
9
  import "./virtual-B9imjOqe.mjs";
10
- import { n as webpack_default, r as src_default, t as unplugin } from "./webpack-Bs3j748Y.mjs";
10
+ import { n as webpack_default, r as src_default, t as unplugin } from "./webpack-N9RxJ_s0.mjs";
11
11
 
12
12
  export { webpack_default as default, unplugin as "module.exports", unplugin, src_default as plugin, src_default as webpack };
@@ -1,9 +1,7 @@
1
1
  <!-- START header -->
2
2
  <!-- END header -->
3
3
 
4
- # {{ options.name }} Application
5
-
6
- {{ options.description }}
4
+ # {{ options.name }} Application {{ options.description }}
7
5
 
8
6
  <!-- START doctoc -->
9
7
  <!-- END doctoc -->
@@ -13,56 +11,32 @@
13
11
  <!-- START usage -->
14
12
  <!-- END usage -->
15
13
 
16
- ## Installing
17
-
18
- Using [pnpm](http://pnpm.io):
19
-
20
- ```bash
21
- pnpm add -D {{ options.packageName }}
22
- ```
14
+ ## Installing Using [pnpm](http://pnpm.io): ```bash pnpm add -D {{
15
+ options.packageName }} ```
23
16
 
24
17
  <details>
25
18
  <summary>Using npm</summary>
26
19
 
27
- ```bash
28
- npm install --save-dev {{ options.packageName }}
29
- ```
30
-
20
+ ```bash npm install --save-dev {{ options.packageName }} ```
31
21
  </details>
32
22
 
33
23
  <details>
34
24
  <summary>Using yarn</summary>
35
25
 
36
- ```bash
37
- yarn add -D {{ options.packageName }}
38
- ```
39
-
26
+ ```bash yarn add -D {{ options.packageName }} ```
40
27
  </details>
41
28
 
42
- ## Reduced Package Size
43
-
44
- This project uses [tsup](https://tsup.egoist.dev/) to package the source code
45
- due to its ability to remove unused code and ship smaller javascript files
46
- thanks to code splitting. This helps to greatly reduce the size of the package
47
- and to make it easier to use in other projects.
48
-
49
- ## Development
50
-
51
- This project is built using [Powerlines](https://stormsoftware.com/projects/powerlines). As a result, many of the usual
52
- commands are available to assist in development.
53
-
54
- ### Building
55
-
56
- Run `nx run {{ options.name }}:build` to build the application.
57
-
58
- ### Running unit tests
59
-
60
- Run `nx run {{ options.name }}:test` to execute the unit tests via
61
- [Jest](https://jestjs.io).
62
-
63
- ### Linting
64
-
65
- Run `nx run {{ options.name }}:lint` to run [ESLint](https://eslint.org/) on the package.
29
+ ## Reduced Package Size This project uses [tsup](https://tsup.egoist.dev/) to
30
+ package the source code due to its ability to remove unused code and ship
31
+ smaller javascript files thanks to code splitting. This helps to greatly reduce
32
+ the size of the package and to make it easier to use in other projects. ##
33
+ Development This project is built using
34
+ [Powerlines](https://stormsoftware.com/projects/powerlines). As a result, many
35
+ of the usual commands are available to assist in development. ### Building Run
36
+ `nx run {{ options.name }}:build` to build the application. ### Running unit
37
+ tests Run `nx run {{ options.name }}:test` to execute the unit tests via
38
+ [Jest](https://jestjs.io). ### Linting Run `nx run {{ options.name }}:lint` to
39
+ run [ESLint](https://eslint.org/) on the package.
66
40
 
67
41
  <!-- START footer -->
68
42
  <!-- END footer -->
@@ -1,28 +1,7 @@
1
- {
2
- "name": "{{ options.packageName }}",
3
- "version": "0.0.1",
4
- "type": "module",
5
- "description": "{{ options.description }}",
6
- "repository": {
7
- "type": "github",
8
- "url": "{{ workspaceConfig.repository }}",
9
- "directory": "{{ options.projectRoot }}"
10
- },
11
- "private": false,
12
- "keywords": [
13
- "powerlines"
14
- ],
15
- "dependencies": {
16
- "powerlines": "workspace:*"
17
- },
18
- "devDependencies": {
19
- "@stryke/types": "catalog:"
20
- },
21
- "storm": {
22
- "name": "{{ options.name }}",
23
- "projectType": "application"
24
- },
25
- "publishConfig": {
26
- "access": "public"
27
- }
28
- }
1
+ { "name": "{{ options.packageName }}", "version": "0.0.1", "type": "module",
2
+ "description": "{{ options.description }}", "repository": { "type": "github",
3
+ "url": "{{ workspaceConfig.repository }}", "directory": "{{ options.projectRoot
4
+ }}" }, "private": false, "keywords": [ "powerlines" ], "dependencies": {
5
+ "powerlines": "workspace:*" }, "devDependencies": { "@stryke/types": "catalog:"
6
+ }, "storm": { "name": "{{ options.name }}", "projectType": "application" },
7
+ "publishConfig": { "access": "public" } }
@@ -1,3 +1,2 @@
1
- import { getJestConfig } from "@storm-software/testing-tools";
2
-
3
- export default getJestConfig("{{ options.projectRoot }}", true, "{{ options.name }}");
1
+ import { getJestConfig } from "@storm-software/testing-tools"; export default
2
+ getJestConfig("{{ options.projectRoot }}", true, "{{ options.name }}");
@@ -1,10 +1,5 @@
1
- {
2
- "extends": "{{ relativeToWorkspaceRoot }}tsconfig.base.json",
3
- "compilerOptions": {
4
- "outDir": "{{ relativeToWorkspaceRoot }}dist/out-tsc",
5
- "verbatimModuleSyntax": false
6
- },
7
- "include": ["src/**/*.ts", "src/**/*.js", ".storm/**/*.ts"],
8
- "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
9
- "reflection": true
10
- }
1
+ { "extends": "{{ relativeToWorkspaceRoot }}tsconfig.base.json",
2
+ "compilerOptions": { "outDir": "{{ relativeToWorkspaceRoot }}dist/out-tsc",
3
+ "verbatimModuleSyntax": false }, "include": ["src/**/*.ts", "src/**/*.js",
4
+ ".storm/**/*.ts"], "exclude": ["jest.config.ts", "src/**/*.spec.ts",
5
+ "src/**/*.test.ts"], "reflection": true }
@@ -1,13 +1,3 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "types": ["jest", "node"],
5
- "outDir": "{{ relativeToWorkspaceRoot }}dist/out-tsc"
6
- },
7
- "include": [
8
- "jest.config.ts",
9
- "src/**/*.test.ts",
10
- "src/**/*.spec.ts",
11
- "src/**/*.d.ts"
12
- ]
13
- }
1
+ { "extends": "./tsconfig.json", "compilerOptions": { "types": ["jest", "node"],
2
+ "outDir": "{{ relativeToWorkspaceRoot }}dist/out-tsc" }, "include": [
3
+ "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts" ] }
@@ -1,56 +1,33 @@
1
1
  <!-- START header -->
2
2
  <!-- END header -->
3
3
 
4
- # {{ options.name }} Library
5
-
6
- {{ options.description }}
4
+ # {{ options.name }} Library {{ options.description }}
7
5
 
8
6
  <!-- START doctoc -->
9
7
  <!-- END doctoc -->
10
8
 
11
- ## Installing
12
-
13
- Using [pnpm](http://pnpm.io):
14
-
15
- ```bash
16
- pnpm add {{ options.packageName }}
17
- ```
9
+ ## Installing Using [pnpm](http://pnpm.io): ```bash pnpm add {{
10
+ options.packageName }} ```
18
11
 
19
12
  <details>
20
13
  <summary>Using npm</summary>
21
14
 
22
- ```bash
23
- npm install --save {{ options.packageName }}
24
- ```
25
-
15
+ ```bash npm install --save {{ options.packageName }} ```
26
16
  </details>
27
17
 
28
18
  <details>
29
19
  <summary>Using yarn</summary>
30
20
 
31
- ```bash
32
- yarn add {{ options.packageName }}
33
- ```
34
-
21
+ ```bash yarn add {{ options.packageName }} ```
35
22
  </details>
36
23
 
37
- ## Development
38
-
39
- This project is built using [Powerlines](https://stormsoftware.com/projects/powerlines). As a result, many of the usual
40
- commands are available to assist in development.
41
-
42
- ### Building
43
-
44
- Run `nx run {{ options.name }}:build` to build the library.
45
-
46
- ### Running unit tests
47
-
24
+ ## Development This project is built using
25
+ [Powerlines](https://stormsoftware.com/projects/powerlines). As a result, many
26
+ of the usual commands are available to assist in development. ### Building Run
27
+ `nx run {{ options.name }}:build` to build the library. ### Running unit tests
48
28
  Run `nx run {{ options.name }}:test` to execute the unit tests via
49
- [Jest](https://jestjs.io).
50
-
51
- ### Linting
52
-
53
- Run `nx run {{ options.name }}:lint` to run [ESLint](https://eslint.org/) on the package.
29
+ [Jest](https://jestjs.io). ### Linting Run `nx run {{ options.name }}:lint` to
30
+ run [ESLint](https://eslint.org/) on the package.
54
31
 
55
32
  <!-- START footer -->
56
33
  <!-- END footer -->
@@ -1,32 +1,9 @@
1
- {
2
- "name": "{{ options.packageName }}",
3
- "version": "0.0.1",
4
- "type": "module",
5
- "description": "{{ options.description }}",
6
- "repository": {
7
- "type": "github",
8
- "url": "{{ workspaceConfig.repository }}",
9
- "directory": "{{ options.projectRoot }}"
10
- },
11
- "private": false,
12
- "keywords": [
13
- "powerlines"
14
- ],
15
- "dependencies": {
16
- "powerlines": "workspace:*"
17
- },
18
- "devDependencies": {
19
- "@powerlines/devkit": "workspace:*",
20
- "@stryke/types": "catalog:"
21
- },
22
- "storm": {
23
- "name": "{{ options.name }}",
24
- "projectType": "library",
25
- "plugins": [
26
- "@powerlines/devkit/plugins/library"
27
- ]
28
- },
29
- "publishConfig": {
30
- "access": "public"
31
- }
32
- }
1
+ { "name": "{{ options.packageName }}", "version": "0.0.1", "type": "module",
2
+ "description": "{{ options.description }}", "repository": { "type": "github",
3
+ "url": "{{ workspaceConfig.repository }}", "directory": "{{ options.projectRoot
4
+ }}" }, "private": false, "keywords": [ "powerlines" ], "dependencies": {
5
+ "powerlines": "workspace:*" }, "devDependencies": { "@powerlines/devkit":
6
+ "workspace:*", "@stryke/types": "catalog:" }, "storm": { "name": "{{
7
+ options.name }}", "projectType": "library", "plugins": [
8
+ "@powerlines/devkit/plugins/library" ] }, "publishConfig": { "access": "public"
9
+ } }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powerlines",
3
- "version": "0.40.20",
3
+ "version": "0.40.21",
4
4
  "private": false,
5
5
  "description": "The \"any framework\" framework that simplifies modern dev tool usage, generates virtual (or actual) code modules, and improves DX across the board.",
6
6
  "keywords": [
@@ -341,7 +341,7 @@
341
341
  "dependencies": {
342
342
  "@cacheable/memory": "^2.0.8",
343
343
  "@donedeal0/superdiff": "^3.2.0",
344
- "@powerlines/core": "^0.2.16",
344
+ "@powerlines/core": "^0.2.17",
345
345
  "@storm-software/config": "^1.135.28",
346
346
  "@storm-software/config-tools": "^1.189.27",
347
347
  "@stryke/capnp": "^0.12.83",
@@ -369,15 +369,15 @@
369
369
  "unplugin": "^3.0.0"
370
370
  },
371
371
  "devDependencies": {
372
- "@powerlines/plugin-esbuild": "^0.13.338",
373
- "@powerlines/plugin-rolldown": "^0.7.340",
374
- "@powerlines/plugin-rollup": "^0.7.339",
375
- "@powerlines/plugin-rspack": "^0.5.338",
376
- "@powerlines/plugin-tsdown": "^0.1.283",
377
- "@powerlines/plugin-tsup": "^0.12.339",
378
- "@powerlines/plugin-unbuild": "^0.5.339",
379
- "@powerlines/plugin-vite": "^0.14.332",
380
- "@powerlines/plugin-webpack": "^0.5.338",
372
+ "@powerlines/plugin-esbuild": "^0.13.339",
373
+ "@powerlines/plugin-rolldown": "^0.7.341",
374
+ "@powerlines/plugin-rollup": "^0.7.340",
375
+ "@powerlines/plugin-rspack": "^0.5.339",
376
+ "@powerlines/plugin-tsdown": "^0.1.284",
377
+ "@powerlines/plugin-tsup": "^0.12.340",
378
+ "@powerlines/plugin-unbuild": "^0.5.340",
379
+ "@powerlines/plugin-vite": "^0.14.333",
380
+ "@powerlines/plugin-webpack": "^0.5.339",
381
381
  "@storm-software/testing-tools": "^1.119.102",
382
382
  "@stryke/types": "^0.10.52",
383
383
  "@types/bun": "^1.3.10",
@@ -425,5 +425,5 @@
425
425
  "unloader": { "optional": true }
426
426
  },
427
427
  "publishConfig": { "access": "public" },
428
- "gitHead": "8d772181f794749e0f19f97c732dd921148c31c8"
428
+ "gitHead": "5654496efd47833627e1d3ce68819b7664212173"
429
429
  }