@powerlines/plugin-esbuild 0.13.342 → 0.13.344
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/{bundle-CVo6LDmp.mjs → bundle-CS7wWbqp.mjs} +2 -2
- package/dist/{bundle-CVo6LDmp.mjs.map → bundle-CS7wWbqp.mjs.map} +1 -1
- package/dist/{bundle-a75NYW0q.cjs → bundle-K0en4yR5.cjs} +1 -1
- package/dist/helpers/bundle.cjs +1 -1
- package/dist/helpers/bundle.mjs +1 -1
- package/dist/helpers/index.cjs +1 -1
- package/dist/helpers/index.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
|
@@ -23,7 +23,7 @@ async function bundle(context, file, overrides = {}) {
|
|
|
23
23
|
write: false,
|
|
24
24
|
sourcemap: false,
|
|
25
25
|
splitting: false,
|
|
26
|
-
treeShaking:
|
|
26
|
+
treeShaking: true,
|
|
27
27
|
bundle: true,
|
|
28
28
|
packages: "bundle",
|
|
29
29
|
platform: "node",
|
|
@@ -38,4 +38,4 @@ async function bundle(context, file, overrides = {}) {
|
|
|
38
38
|
|
|
39
39
|
//#endregion
|
|
40
40
|
export { bundle as t };
|
|
41
|
-
//# sourceMappingURL=bundle-
|
|
41
|
+
//# sourceMappingURL=bundle-CS7wWbqp.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-
|
|
1
|
+
{"version":3,"file":"bundle-CS7wWbqp.mjs","names":[],"sources":["../src/helpers/bundle.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 { PluginContext } from \"@powerlines/core\";\nimport { createUnpluginResolver } from \"@powerlines/core/lib/unplugin\";\nimport { findFileName } from \"@stryke/path/file-path-fns\";\nimport defu from \"defu\";\nimport { build, BuildOptions, OutputFile } from \"esbuild\";\nimport { createEsbuildPlugin } from \"unplugin\";\nimport { resolveOptions } from \"./resolve-options\";\n\n/**\n * Bundle a type definition to a module.\n *\n * @param context - The context object containing the environment paths.\n * @param file - The file path to bundle.\n * @param overrides - Optional overrides for the ESBuild configuration.\n * @returns A promise that resolves to the bundled module.\n */\nexport async function bundle(\n context: PluginContext,\n file: string,\n overrides: Partial<BuildOptions> = {}\n): Promise<OutputFile> {\n const path = await context.fs.resolve(file);\n if (!path || !context.fs.existsSync(path)) {\n throw new Error(\n `Module not found: \"${file}\". Please check the path and try again.`\n );\n }\n\n const result = await build(\n defu(\n {\n ...resolveOptions(context),\n entryPoints: [path],\n write: false,\n sourcemap: false,\n splitting: false,\n treeShaking: true,\n bundle: true,\n packages: \"bundle\",\n platform: \"node\",\n logLevel: \"silent\",\n ...overrides\n } as BuildOptions,\n {\n plugins: [\n createEsbuildPlugin(\n createUnpluginResolver(context, {\n name: `${findFileName(file)} Bundler`\n })\n )({})\n ]\n }\n )\n );\n if (result.errors.length > 0) {\n throw new Error(\n `Failed to bundle ${file}: ${result.errors\n .map(error => error.text)\n .join(\", \")}`\n );\n }\n if (result.warnings.length > 0) {\n context.warn(\n `Warnings while bundling ${file}: ${result.warnings\n .map(warning => warning.text)\n .join(\", \")}`\n );\n }\n if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) {\n throw new Error(\n `No output files generated for ${\n file\n }. Please check the configuration and try again.`\n );\n }\n\n return result.outputFiles.filter(Boolean)[0]!;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkCA,eAAsB,OACpB,SACA,MACA,YAAmC,EAAE,EAChB;CACrB,MAAM,OAAO,MAAM,QAAQ,GAAG,QAAQ,KAAK;AAC3C,KAAI,CAAC,QAAQ,CAAC,QAAQ,GAAG,WAAW,KAAK,CACvC,OAAM,IAAI,MACR,sBAAsB,KAAK,yCAC5B;CAGH,MAAM,SAAS,MAAM,MACnB,KACE;EACE,GAAG,eAAe,QAAQ;EAC1B,aAAa,CAAC,KAAK;EACnB,OAAO;EACP,WAAW;EACX,WAAW;EACX,aAAa;EACb,QAAQ;EACR,UAAU;EACV,UAAU;EACV,UAAU;EACV,GAAG;EACJ,EACD,EACE,SAAS,CACP,oBACE,uBAAuB,SAAS,EAC9B,MAAM,GAAG,aAAa,KAAK,CAAC,WAC7B,CAAC,CACH,CAAC,EAAE,CAAC,CACN,EACF,CACF,CACF;AACD,KAAI,OAAO,OAAO,SAAS,EACzB,OAAM,IAAI,MACR,oBAAoB,KAAK,IAAI,OAAO,OACjC,KAAI,UAAS,MAAM,KAAK,CACxB,KAAK,KAAK,GACd;AAEH,KAAI,OAAO,SAAS,SAAS,EAC3B,SAAQ,KACN,2BAA2B,KAAK,IAAI,OAAO,SACxC,KAAI,YAAW,QAAQ,KAAK,CAC5B,KAAK,KAAK,GACd;AAEH,KAAI,CAAC,OAAO,eAAe,OAAO,YAAY,OAAO,QAAQ,CAAC,WAAW,EACvE,OAAM,IAAI,MACR,iCACE,KACD,iDACF;AAGH,QAAO,OAAO,YAAY,OAAO,QAAQ,CAAC"}
|
package/dist/helpers/bundle.cjs
CHANGED
package/dist/helpers/bundle.mjs
CHANGED
package/dist/helpers/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_resolve_options = require('../resolve-options-C3WIGKaG.cjs');
|
|
2
2
|
const require_unplugin = require('../unplugin-CW_BVHFj.cjs');
|
|
3
|
-
const require_bundle = require('../bundle-
|
|
3
|
+
const require_bundle = require('../bundle-K0en4yR5.cjs');
|
|
4
4
|
const require_resolve = require('../resolve-CsStIaEj.cjs');
|
|
5
5
|
require('../helpers-CAF8Bmv1.cjs');
|
|
6
6
|
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as resolveEntry, r as resolveOptions, t as DEFAULT_ESBUILD_CONFIG } from "../resolve-options-C-213jz6.mjs";
|
|
2
2
|
import { t as createEsbuildPlugin } from "../unplugin-_Yvl6iM8.mjs";
|
|
3
|
-
import { t as bundle } from "../bundle-
|
|
3
|
+
import { t as bundle } from "../bundle-CS7wWbqp.mjs";
|
|
4
4
|
import { n as resolveModule, t as resolve } from "../resolve-C8OzoP-s.mjs";
|
|
5
5
|
import "../helpers-BAUlPOQe.mjs";
|
|
6
6
|
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_resolve_options = require('./resolve-options-C3WIGKaG.cjs');
|
|
3
3
|
const require_unplugin = require('./unplugin-CW_BVHFj.cjs');
|
|
4
|
-
const require_bundle = require('./bundle-
|
|
4
|
+
const require_bundle = require('./bundle-K0en4yR5.cjs');
|
|
5
5
|
const require_resolve = require('./resolve-CsStIaEj.cjs');
|
|
6
6
|
require('./helpers-CAF8Bmv1.cjs');
|
|
7
7
|
require('./types/index.cjs');
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as resolveEntry, r as resolveOptions, t as DEFAULT_ESBUILD_CONFIG } from "./resolve-options-C-213jz6.mjs";
|
|
2
2
|
import { t as createEsbuildPlugin } from "./unplugin-_Yvl6iM8.mjs";
|
|
3
|
-
import { t as bundle } from "./bundle-
|
|
3
|
+
import { t as bundle } from "./bundle-CS7wWbqp.mjs";
|
|
4
4
|
import { n as resolveModule, t as resolve } from "./resolve-C8OzoP-s.mjs";
|
|
5
5
|
import "./helpers-BAUlPOQe.mjs";
|
|
6
6
|
import "./types/index.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-esbuild",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.344",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Powerlines plugin to build projects using esbuild.",
|
|
6
6
|
"keywords": ["esbuild", "powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"peerDependencies": { "esbuild": ">=0.25.0" },
|
|
84
84
|
"peerDependenciesMeta": { "esbuild": { "optional": false } },
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@powerlines/core": "^0.2.
|
|
86
|
+
"@powerlines/core": "^0.2.22",
|
|
87
87
|
"@stryke/fs": "^0.33.57",
|
|
88
88
|
"@stryke/path": "^0.26.19",
|
|
89
89
|
"@stryke/type-checks": "^0.5.38",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": { "esbuild": "^0.25.12", "@types/node": "^25.4.0" },
|
|
96
96
|
"publishConfig": { "access": "public" },
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "0ed0ad0cd6f440d1584ac705987ef985931161db"
|
|
98
98
|
}
|