@powerlines/plugin-vite 0.14.376 → 0.14.378

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -27,7 +27,7 @@ This package is part of the <b>🔌 Powerlines</b> monorepo. Powerlines is the "
27
27
 
28
28
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
29
29
 
30
- [![Version](https://img.shields.io/badge/version-0.14.374-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/powerlines)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/powerlines/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
30
+ [![Version](https://img.shields.io/badge/version-0.14.376-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/powerlines)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/powerlines/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
31
31
 
32
32
  <!-- prettier-ignore-start -->
33
33
  <!-- markdownlint-disable -->
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { 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"],"mappings":";;;;;;;;;;AA0CA,MAAa,UACX,UAA6B,EAAE,KACV;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,QAAK,MACH,0EACD;AAED,UAAO;IACL,QAAQ,EACN,QAAQ,CAAC,OAAO,MAAM,EACvB;IACD,MAAM;KACJ,GAAG;KACH,GAAG;KACJ;IACD,aAAa;IACd;;EAEH,MAAM,QAAQ;AACZ,QAAK,MAAM,kCAAkC;GAE7C,MAAM,eAAgB,MAClB,YAAY,KAAK,SAAS;AAC9B,OAAI,CAAC,gBAAgB,OAAO,KAAK,aAAa,CAAC,WAAW,EACxD,OAAM,IAAI,MACR,0LACD;AAGH,QAAK,MACH,oBAAoB,OAAO,KAAK,aAAa,CAAC,OAAO,gBACtD;AAmBD,SAAM,MAjBS,KACb;IACE,QAAQ;IACR,OAAO,KAAK;IACZ,cAAc,OAAO,YACnB,OAAO,QAAQ,aAAa,CAAC,KAAK,CAAC,MAAM,SAAS,CAChD,MACA,eAAe,IAAe,CAC/B,CAAC,CACH;IACF,EACD,eAAe,KAAK,EACpB,EACE,SAAS,CAAC,iBAAiB,KAAK,CAAC,EAClC,CACF,CAEkC;;EAEtC"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { 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 { Unstable_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 Unstable_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"],"mappings":";;;;;;;;;;AA0CA,MAAa,UACX,UAA6B,EAAE,KACV;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,QAAK,MACH,0EACD;AAED,UAAO;IACL,QAAQ,EACN,QAAQ,CAAC,OAAO,MAAM,EACvB;IACD,MAAM;KACJ,GAAG;KACH,GAAG;KACJ;IACD,aAAa;IACd;;EAEH,MAAM,QAAQ;AACZ,QAAK,MAAM,kCAAkC;GAE7C,MAAM,eAAgB,MAClB,YAAY,KAAK,SAAS;AAC9B,OAAI,CAAC,gBAAgB,OAAO,KAAK,aAAa,CAAC,WAAW,EACxD,OAAM,IAAI,MACR,0LACD;AAGH,QAAK,MACH,oBAAoB,OAAO,KAAK,aAAa,CAAC,OAAO,gBACtD;AAmBD,SAAM,MAjBS,KACb;IACE,QAAQ;IACR,OAAO,KAAK;IACZ,cAAc,OAAO,YACnB,OAAO,QAAQ,aAAa,CAAC,KAAK,CAAC,MAAM,SAAS,CAChD,MACA,eAAe,IAAe,CAC/B,CAAC,CACH;IACF,EACD,eAAe,KAAK,EACpB,EACE,SAAS,CAAC,iBAAiB,KAAK,CAAC,EAClC,CACF,CAEkC;;EAEtC"}
@@ -1,5 +1,5 @@
1
1
  import { VitePluginResolvedConfig } from "./plugin.cjs";
2
- import { UNSAFE_PluginContext } from "@powerlines/core/types/_internal";
2
+ import { Unstable_PluginContext } from "@powerlines/core/types/_internal";
3
3
 
4
4
  //#region src/types/_internal.d.ts
5
5
  /**
@@ -7,8 +7,8 @@ import { UNSAFE_PluginContext } from "@powerlines/core/types/_internal";
7
7
  *
8
8
  * @internal
9
9
  */
10
- type UNSAFE_VitePluginContext<TResolvedConfig extends VitePluginResolvedConfig = VitePluginResolvedConfig> = UNSAFE_PluginContext<TResolvedConfig>;
11
- declare type __ΩUNSAFE_VitePluginContext = any[];
10
+ type Unstable_VitePluginContext<TResolvedConfig extends VitePluginResolvedConfig = VitePluginResolvedConfig> = Unstable_PluginContext<TResolvedConfig>;
11
+ declare type __ΩUnstable_VitePluginContext = any[];
12
12
  //#endregion
13
- export { UNSAFE_VitePluginContext, __ΩUNSAFE_VitePluginContext };
13
+ export { Unstable_VitePluginContext, __ΩUnstable_VitePluginContext };
14
14
  //# sourceMappingURL=_internal.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_internal.d.cts","names":[],"sources":["../../src/types/_internal.ts"],"mappings":";;;;;;AA0BA;;;KAAY,wBAAA,yBACc,wBAAA,GAA2B,wBAAA,IACjD,oBAAA,CAAqB,eAAA;AAAA"}
1
+ {"version":3,"file":"_internal.d.cts","names":[],"sources":["../../src/types/_internal.ts"],"mappings":";;;;;;AA0BA;;;KAAY,0BAAA,yBACc,wBAAA,GAA2B,wBAAA,IACjD,sBAAA,CAAuB,eAAA;AAAA"}
@@ -1,5 +1,5 @@
1
1
  import { VitePluginResolvedConfig } from "./plugin.mjs";
2
- import { UNSAFE_PluginContext } from "@powerlines/core/types/_internal";
2
+ import { Unstable_PluginContext } from "@powerlines/core/types/_internal";
3
3
 
4
4
  //#region src/types/_internal.d.ts
5
5
  /**
@@ -7,8 +7,8 @@ import { UNSAFE_PluginContext } from "@powerlines/core/types/_internal";
7
7
  *
8
8
  * @internal
9
9
  */
10
- type UNSAFE_VitePluginContext<TResolvedConfig extends VitePluginResolvedConfig = VitePluginResolvedConfig> = UNSAFE_PluginContext<TResolvedConfig>;
11
- declare type __ΩUNSAFE_VitePluginContext = any[];
10
+ type Unstable_VitePluginContext<TResolvedConfig extends VitePluginResolvedConfig = VitePluginResolvedConfig> = Unstable_PluginContext<TResolvedConfig>;
11
+ declare type __ΩUnstable_VitePluginContext = any[];
12
12
  //#endregion
13
- export { UNSAFE_VitePluginContext, __ΩUNSAFE_VitePluginContext };
13
+ export { Unstable_VitePluginContext, __ΩUnstable_VitePluginContext };
14
14
  //# sourceMappingURL=_internal.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_internal.d.mts","names":[],"sources":["../../src/types/_internal.ts"],"mappings":";;;;;;AA0BA;;;KAAY,wBAAA,yBACc,wBAAA,GAA2B,wBAAA,IACjD,oBAAA,CAAqB,eAAA;AAAA"}
1
+ {"version":3,"file":"_internal.d.mts","names":[],"sources":["../../src/types/_internal.ts"],"mappings":";;;;;;AA0BA;;;KAAY,0BAAA,yBACc,wBAAA,GAA2B,wBAAA,IACjD,sBAAA,CAAuB,eAAA;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-vite",
3
- "version": "0.14.376",
3
+ "version": "0.14.378",
4
4
  "private": false,
5
5
  "description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
6
6
  "keywords": ["vite", "powerlines", "storm-software", "powerlines-plugin"],
@@ -79,14 +79,14 @@
79
79
  "peerDependencies": { "vite": ">=8.0.0" },
80
80
  "peerDependenciesMeta": { "vite": { "optional": false } },
81
81
  "dependencies": {
82
- "@powerlines/core": "^0.12.1",
83
- "@powerlines/plugin-rolldown": "^0.7.380",
84
- "@powerlines/plugin-rollup": "^0.7.378",
85
- "@powerlines/plugin-esbuild": "^0.13.381",
82
+ "@powerlines/core": "^0.12.3",
83
+ "@powerlines/plugin-rolldown": "^0.7.382",
84
+ "@powerlines/plugin-rollup": "^0.7.380",
85
+ "@powerlines/plugin-esbuild": "^0.13.383",
86
86
  "defu": "^6.1.4",
87
87
  "unplugin": "^3.0.0"
88
88
  },
89
- "devDependencies": { "@types/node": "^25.5.0", "vite": "^8.0.2" },
89
+ "devDependencies": { "@types/node": "^25.5.0", "vite": "^8.0.3" },
90
90
  "publishConfig": { "access": "public" },
91
- "gitHead": "e4cf83423cc9df85f747265b04d051bdfd4d1156"
91
+ "gitHead": "7230bc7bb8f070d2188b0cade2e512c042f50783"
92
92
  }