@powerlines/plugin-vite 0.14.452 → 0.14.453
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin.mjs","names":["createViteUnplugin"],"sources":["../../src/helpers/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 { 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(\n createUnplugin(context, { silenceHookLogging: true, name: \"vite\" })\n )({ ...context.options, ...context.initialConfig });\n}\n"],"mappings":";;;;AAsBA,SAAgB,iBAAiB,SAA4B;AAC3D,QAAOA,mBACL,eAAe,SAAS;EAAE,oBAAoB;EAAM,MAAM;EAAQ,CAAC,CACpE,CAAC;EAAE,GAAG,QAAQ;EAAS,GAAG,QAAQ;EAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"unplugin.mjs","names":["createViteUnplugin"],"sources":["../../src/helpers/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 { 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(\n createUnplugin(context, { silenceHookLogging: true, name: \"vite\" })\n )({ ...context.options, ...context.config.initialConfig });\n}\n"],"mappings":";;;;AAsBA,SAAgB,iBAAiB,SAA4B;AAC3D,QAAOA,mBACL,eAAe,SAAS;EAAE,oBAAoB;EAAM,MAAM;EAAQ,CAAC,CACpE,CAAC;EAAE,GAAG,QAAQ;EAAS,GAAG,QAAQ,OAAO;EAAe,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
|
3
3
|
const require_helpers_resolve_options = require('./helpers/resolve-options.cjs');
|
|
4
4
|
const require_helpers_unplugin = require('./helpers/unplugin.cjs');
|
|
5
5
|
require('./helpers/index.cjs');
|
|
6
|
-
let
|
|
6
|
+
let _powerlines_core_plugin_utils = require("@powerlines/core/plugin-utils");
|
|
7
7
|
let defu = require("defu");
|
|
8
8
|
defu = require_runtime.__toESM(defu, 1);
|
|
9
9
|
let vite = require("vite");
|
|
@@ -38,7 +38,7 @@ const plugin = (options = {}) => {
|
|
|
38
38
|
}, require_helpers_resolve_options.resolveOptions(this), { plugins: [require_helpers_unplugin.createVitePlugin(this)] });
|
|
39
39
|
this.debug({
|
|
40
40
|
meta: { category: "config" },
|
|
41
|
-
message: `Resolved Vite configuration: \n${
|
|
41
|
+
message: `Resolved Vite configuration: \n${(0, _powerlines_core_plugin_utils.formatConfig)(options)}`
|
|
42
42
|
});
|
|
43
43
|
await (0, vite.build)(options);
|
|
44
44
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_VITE_CONFIG, resolveOptions } from "./helpers/resolve-options.mjs";
|
|
2
2
|
import { createVitePlugin } from "./helpers/unplugin.mjs";
|
|
3
3
|
import "./helpers/index.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { formatConfig } from "@powerlines/core/plugin-utils";
|
|
5
5
|
import defu from "defu";
|
|
6
6
|
import { build } from "vite";
|
|
7
7
|
|
|
@@ -35,7 +35,7 @@ const plugin = (options = {}) => {
|
|
|
35
35
|
}, resolveOptions(this), { plugins: [createVitePlugin(this)] });
|
|
36
36
|
this.debug({
|
|
37
37
|
meta: { category: "config" },
|
|
38
|
-
message: `Resolved Vite configuration: \n${
|
|
38
|
+
message: `Resolved Vite configuration: \n${formatConfig(options)}`
|
|
39
39
|
});
|
|
40
40
|
await build(options);
|
|
41
41
|
}
|
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 { Context, Plugin } from \"@powerlines/core\";\nimport {
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { Context, Plugin } from \"@powerlines/core\";\nimport { formatConfig } from \"@powerlines/core/plugin-utils\";\nimport defu from \"defu\";\nimport { build } from \"vite\";\nimport { DEFAULT_VITE_CONFIG, resolveOptions } from \"./helpers/resolve-options\";\nimport { createVitePlugin } from \"./helpers/unplugin\";\nimport { Unstable_VitePluginContext } from \"./types/_internal\";\nimport { VitePluginContext, VitePluginOptions } 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 };\n },\n async build() {\n this.debug(\"Starting Vite build process...\");\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 options = 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 this.debug({\n meta: {\n category: \"config\"\n },\n message: `Resolved Vite configuration: \\n${formatConfig(options)}`\n });\n\n await build(options);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AAuCA,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,iCAAiC;GAE5C,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;GAED,MAAM,UAAU,KACd;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;AAED,QAAK,MAAM;IACT,MAAM,EACJ,UAAU,UACX;IACD,SAAS,kCAAkC,aAAa,QAAQ;IACjE,CAAC;AAEF,SAAM,MAAM,QAAQ;;EAEvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-vite",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.453",
|
|
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,15 +79,15 @@
|
|
|
79
79
|
"peerDependencies": { "vite": ">=8.0.0" },
|
|
80
80
|
"peerDependenciesMeta": { "vite": { "optional": false } },
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@powerlines/core": "^0.46.
|
|
83
|
-
"@powerlines/plugin-esbuild": "^0.13.
|
|
84
|
-
"@powerlines/plugin-rolldown": "^0.7.
|
|
85
|
-
"@powerlines/plugin-rollup": "^0.7.
|
|
82
|
+
"@powerlines/core": "^0.46.6",
|
|
83
|
+
"@powerlines/plugin-esbuild": "^0.13.456",
|
|
84
|
+
"@powerlines/plugin-rolldown": "^0.7.456",
|
|
85
|
+
"@powerlines/plugin-rollup": "^0.7.454",
|
|
86
86
|
"@stryke/helpers": "^0.10.12",
|
|
87
87
|
"defu": "^6.1.7",
|
|
88
88
|
"unplugin": "^3.0.0"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": { "@types/node": "^25.6.0", "vite": "^8.0.10" },
|
|
91
91
|
"publishConfig": { "access": "public" },
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "610c4c943933458c5f433b9002d8c187625b2d3f"
|
|
93
93
|
}
|