@powerlines/plugin-vite 0.14.277 → 0.14.279
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAqCa,cAAA,MAyDZ,EAAA,CAAA,iBAzDuC,iBAyDvC,GAzD2D,iBAyD3D,CAAA,CAAA,OAAA,CAAA,EAxDU,iBAwDV,EAAA,GAvDE,MAuDF,CAvDS,QAuDT,CAAA"}
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAqCa,cAAA,MAyDZ,EAAA,CAAA,iBAzDuC,iBAyDvC,GAzD2D,iBAyD3D,CAAA,CAAA,OAAA,CAAA,EAxDU,iBAwDV,EAAA,GAvDE,MAuDF,CAvDS,QAuDT,CAAA"}
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport defu from \"defu\";\nimport {\n DEFAULT_VITE_CONFIG,\n extractViteConfig\n} from \"powerlines/lib/build/vite\";\nimport { ViteUserConfig } from \"powerlines/types/config\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport { build, InlineConfig } from \"vite\";\nimport { createVitePlugin } from \"./helpers/unplugin\";\nimport { UNSAFE_VitePluginContext } from \"./types/internal\";\nimport { VitePluginContext, VitePluginOptions } from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\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 build: {\n ...DEFAULT_VITE_CONFIG,\n ...options,\n variant: \"vite\"\n },\n singleBuild: true\n } as Partial<ViteUserConfig>;\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 extractViteConfig(env)\n ])\n )\n },\n extractViteConfig(this),\n {\n plugins: [createVitePlugin(this)]\n }\n );\n\n await build(config as InlineConfig);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;
|
|
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 defu from \"defu\";\nimport {\n DEFAULT_VITE_CONFIG,\n extractViteConfig\n} from \"powerlines/lib/build/vite\";\nimport { ViteUserConfig } from \"powerlines/types/config\";\nimport { Context } from \"powerlines/types/context\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport { build, InlineConfig } from \"vite\";\nimport { createVitePlugin } from \"./helpers/unplugin\";\nimport { UNSAFE_VitePluginContext } from \"./types/internal\";\nimport { VitePluginContext, VitePluginOptions } from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\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 build: {\n ...DEFAULT_VITE_CONFIG,\n ...options,\n variant: \"vite\"\n },\n singleBuild: true\n } as Partial<ViteUserConfig>;\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 extractViteConfig(env as Context)\n ])\n )\n },\n extractViteConfig(this),\n {\n plugins: [createVitePlugin(this)]\n }\n );\n\n await build(config as InlineConfig);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;AAqCA,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,OAAO;KACL,GAAG;KACH,GAAG;KACH,SAAS;KACV;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,kBAAkB,IAAe,CAClC,CAAC,CACH;IACF,EACD,kBAAkB,KAAK,EACvB,EACE,SAAS,CAAC,iBAAiB,KAAK,CAAC,EAClC,CACF,CAEkC;;EAEtC;;AAGH,kBAAe"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-vite",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.279",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
|
|
6
6
|
"repository": {
|
|
@@ -132,15 +132,15 @@
|
|
|
132
132
|
"keywords": ["vite", "powerlines", "storm-software", "powerlines-plugin"],
|
|
133
133
|
"dependencies": {
|
|
134
134
|
"defu": "^6.1.4",
|
|
135
|
-
"powerlines": "^0.38.
|
|
135
|
+
"powerlines": "^0.38.44",
|
|
136
136
|
"unplugin": "3.0.0-beta.3",
|
|
137
137
|
"vite": "8.0.0-beta.2"
|
|
138
138
|
},
|
|
139
139
|
"devDependencies": {
|
|
140
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
140
|
+
"@powerlines/plugin-plugin": "^0.12.228",
|
|
141
141
|
"@types/node": "^24.10.13"
|
|
142
142
|
},
|
|
143
143
|
"publishConfig": { "access": "public" },
|
|
144
144
|
"types": "./dist/index.d.cts",
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "8e49aaca5d2d4b15e0ddd89bd2b5aa6682cc64b6"
|
|
146
146
|
}
|