@powerlines/plugin-esbuild 0.13.59 → 0.13.61
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 +5 -1
- package/dist/index.d.cts +1 -2
- package/dist/index.d.mts +1 -2
- package/dist/index.mjs +1 -2
- package/dist/plugin-CgFOBwxh.d.cts +1 -2
- package/dist/plugin-D-5wnEv7.d.mts +1 -2
- package/dist/unplugin-3lhr_MA6.mjs +1 -2
- package/dist/unplugin-BFoBFgpW.d.cts +1 -2
- package/dist/unplugin-CCMrEgTM.d.mts +1 -2
- package/package.json +5 -5
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/plugin-CaeWBvFk.d.mts +0 -1655
- package/dist/plugin-CaeWBvFk.d.mts.map +0 -1
- package/dist/plugin-CgFOBwxh.d.cts.map +0 -1
- package/dist/plugin-D-5wnEv7.d.mts.map +0 -1
- package/dist/unplugin-3lhr_MA6.mjs.map +0 -1
- package/dist/unplugin-BFoBFgpW.d.cts.map +0 -1
- package/dist/unplugin-CCMrEgTM.d.mts.map +0 -1
- package/dist/unplugin-DA3Xw7UV.d.mts +0 -8
- package/dist/unplugin-DA3Xw7UV.d.mts.map +0 -1
package/README.md
CHANGED
|
@@ -252,7 +252,11 @@ specification. Contributions of any kind welcome!
|
|
|
252
252
|
<br />
|
|
253
253
|
|
|
254
254
|
<div align="center">
|
|
255
|
-
<
|
|
255
|
+
<picture>
|
|
256
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-dark-optimized.webp">
|
|
257
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-light-optimized.webp">
|
|
258
|
+
<img src="https://public.storm-cdn.com/storm-software/banner-1280x320-dark-optimized.webp" width="100%" alt="Storm Software" />
|
|
259
|
+
</picture>
|
|
256
260
|
</div>
|
|
257
261
|
<br />
|
|
258
262
|
|
package/dist/index.d.cts
CHANGED
|
@@ -10,5 +10,4 @@ import "./index-D4ELpJXS.cjs";
|
|
|
10
10
|
*/
|
|
11
11
|
declare const plugin: <TContext extends ESBuildPluginContext = ESBuildPluginContext>(options?: ESBuildPluginOptions) => Plugin<TContext>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { ESBuildPluginContext, ESBuildPluginOptions, ESBuildPluginResolvedConfig, __ΩESBuildPluginContext, __ΩESBuildPluginOptions, __ΩESBuildPluginResolvedConfig, createESBuildPlugin, plugin as default, plugin };
|
|
14
|
-
//# sourceMappingURL=index.d.cts.map
|
|
13
|
+
export { ESBuildPluginContext, ESBuildPluginOptions, ESBuildPluginResolvedConfig, __ΩESBuildPluginContext, __ΩESBuildPluginOptions, __ΩESBuildPluginResolvedConfig, createESBuildPlugin, plugin as default, plugin };
|
package/dist/index.d.mts
CHANGED
|
@@ -10,5 +10,4 @@ import "./index-9iG2qHLe.mjs";
|
|
|
10
10
|
*/
|
|
11
11
|
declare const plugin: <TContext extends ESBuildPluginContext = ESBuildPluginContext>(options?: ESBuildPluginOptions) => Plugin<TContext>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { ESBuildPluginContext, ESBuildPluginOptions, ESBuildPluginResolvedConfig, __ΩESBuildPluginContext, __ΩESBuildPluginOptions, __ΩESBuildPluginResolvedConfig, createESBuildPlugin, plugin as default, plugin };
|
|
14
|
-
//# sourceMappingURL=index.d.mts.map
|
|
13
|
+
export { ESBuildPluginContext, ESBuildPluginOptions, ESBuildPluginResolvedConfig, __ΩESBuildPluginContext, __ΩESBuildPluginOptions, __ΩESBuildPluginResolvedConfig, createESBuildPlugin, plugin as default, plugin };
|
package/dist/index.mjs
CHANGED
|
@@ -11,5 +11,4 @@ import ${l(e)} from "${t[0]}";
|
|
|
11
11
|
export { ${l(e)} as "${e}" }`;else return`
|
|
12
12
|
import ${e} from "${t}";
|
|
13
13
|
export { ${e} };`;return``}).join(`
|
|
14
|
-
`)),r({alias:e.builtins.reduce((t,n)=>{if(!t[n]){let r=e.fs.ids[n];r&&(t[n]=r)}return t},e.config.build.alias?Array.isArray(e.config.build.alias)?e.config.build.alias.reduce((e,t)=>(e[t.find.toString()]||(e[t.find.toString()]=t.replacement),e),{}):e.config.build.alias:{}),inject:t&&Object.keys(t).length>0?[o(e.workspaceConfig.workspaceRoot,e.config.projectRoot,e.artifactsPath,`inject-shim.js`)]:void 0},e.config.build.variant===`esbuild`?a(e.config.build.override,[`alias`,`inject`,`external`,`noExternal`,`skipNodeModulesBundle`,`extensions`]):{},e.config.build.variant===`esbuild`?a(e.config.build,[`alias`,`inject`,`external`,`noExternal`,`skipNodeModulesBundle`,`extensions`,`variant`,`override`]):{},{mainFields:e.config.build.mainFields,conditions:e.config.build.conditions,define:e.config.build.define,resolveExtensions:e.config.build.extensions,packages:e.config.build.skipNodeModulesBundle?`external`:e.config.build.variant===`esbuild`?e.config.build.packages:void 0,format:Array.isArray(e.config.output.format)?e.config.output.format[0]:e.config.output.format,platform:e.config.build.platform,treeShaking:!!e.config.build?.treeshake||e.config.build?.treeShaking,outdir:e.config.output.buildPath,tsconfig:e.tsconfig.tsconfigFilePath,tsconfigRaw:e.tsconfig.tsconfigJson,minify:e.config.mode!==`development`,metafile:e.config.mode===`development`,sourcemap:e.config.mode===`development`},d)}const m=(e={})=>({name:`esbuild`,config(){return{output:{format:[`esm`]},build:{...d,...e,variant:`esbuild`}}},async build(){await i(r({entryPoints:f(this,this.entry),plugins:[n(this)]},p(this)))}});var h=m;export{n as createESBuildPlugin,h as default,m as plugin};
|
|
15
|
-
//# sourceMappingURL=index.mjs.map
|
|
14
|
+
`)),r({alias:e.builtins.reduce((t,n)=>{if(!t[n]){let r=e.fs.ids[n];r&&(t[n]=r)}return t},e.config.build.alias?Array.isArray(e.config.build.alias)?e.config.build.alias.reduce((e,t)=>(e[t.find.toString()]||(e[t.find.toString()]=t.replacement),e),{}):e.config.build.alias:{}),inject:t&&Object.keys(t).length>0?[o(e.workspaceConfig.workspaceRoot,e.config.projectRoot,e.artifactsPath,`inject-shim.js`)]:void 0},e.config.build.variant===`esbuild`?a(e.config.build.override,[`alias`,`inject`,`external`,`noExternal`,`skipNodeModulesBundle`,`extensions`]):{},e.config.build.variant===`esbuild`?a(e.config.build,[`alias`,`inject`,`external`,`noExternal`,`skipNodeModulesBundle`,`extensions`,`variant`,`override`]):{},{mainFields:e.config.build.mainFields,conditions:e.config.build.conditions,define:e.config.build.define,resolveExtensions:e.config.build.extensions,packages:e.config.build.skipNodeModulesBundle?`external`:e.config.build.variant===`esbuild`?e.config.build.packages:void 0,format:Array.isArray(e.config.output.format)?e.config.output.format[0]:e.config.output.format,platform:e.config.build.platform,treeShaking:!!e.config.build?.treeshake||e.config.build?.treeShaking,outdir:e.config.output.buildPath,tsconfig:e.tsconfig.tsconfigFilePath,tsconfigRaw:e.tsconfig.tsconfigJson,minify:e.config.mode!==`development`,metafile:e.config.mode===`development`,sourcemap:e.config.mode===`development`},d)}const m=(e={})=>({name:`esbuild`,config(){return{output:{format:[`esm`]},build:{...d,...e,variant:`esbuild`}}},async build(){await i(r({entryPoints:f(this,this.entry),plugins:[n(this)]},p(this)))}});var h=m;export{n as createESBuildPlugin,h as default,m as plugin};
|
|
@@ -1649,5 +1649,4 @@ declare type __ΩESBuildPluginOptions = any[];
|
|
|
1649
1649
|
declare type __ΩESBuildPluginResolvedConfig = any[];
|
|
1650
1650
|
declare type __ΩESBuildPluginContext = any[];
|
|
1651
1651
|
//#endregion
|
|
1652
|
-
export { __ΩESBuildPluginOptions as a, __ΩESBuildPluginContext as i, ESBuildPluginOptions as n, __ΩESBuildPluginResolvedConfig as o, ESBuildPluginResolvedConfig as r, Plugin as s, ESBuildPluginContext as t };
|
|
1653
|
-
//# sourceMappingURL=plugin-CgFOBwxh.d.cts.map
|
|
1652
|
+
export { __ΩESBuildPluginOptions as a, __ΩESBuildPluginContext as i, ESBuildPluginOptions as n, __ΩESBuildPluginResolvedConfig as o, ESBuildPluginResolvedConfig as r, Plugin as s, ESBuildPluginContext as t };
|
|
@@ -1652,5 +1652,4 @@ declare type __ΩESBuildPluginOptions = any[];
|
|
|
1652
1652
|
declare type __ΩESBuildPluginResolvedConfig = any[];
|
|
1653
1653
|
declare type __ΩESBuildPluginContext = any[];
|
|
1654
1654
|
//#endregion
|
|
1655
|
-
export { __ΩESBuildPluginOptions as a, __ΩESBuildPluginContext as i, ESBuildPluginOptions as n, __ΩESBuildPluginResolvedConfig as o, ESBuildPluginResolvedConfig as r, Plugin as s, ESBuildPluginContext as t };
|
|
1656
|
-
//# sourceMappingURL=plugin-D-5wnEv7.d.mts.map
|
|
1655
|
+
export { __ΩESBuildPluginOptions as a, __ΩESBuildPluginContext as i, ESBuildPluginOptions as n, __ΩESBuildPluginResolvedConfig as o, ESBuildPluginResolvedConfig as r, Plugin as s, ESBuildPluginContext as t };
|
|
@@ -3,5 +3,4 @@ ${t.config.build.polyfill.map(e=>`import "${e}";`).join(`
|
|
|
3
3
|
`)}
|
|
4
4
|
|
|
5
5
|
export * from "${s(i)?i:i.id}";
|
|
6
|
-
`,e.file),e.file}return i}async function i(e){let n=await t.$$internal.callHook(`load`,{sequential:!0,result:`first`,order:`pre`},e);return n||(n=await t.$$internal.callHook(`load`,{sequential:!0,result:`first`,order:`normal`},e),n)||(n=await t.load(e),n)?n:t.$$internal.callHook(`load`,{sequential:!0,result:`first`,order:`post`},e)}async function o(e,n){let r=e;for(let e of t.$$internal.environment.selectHooks(`transform`)){let i=await e.handle.apply(Z(t,this),[X(r),n]);i&&(r=i)}return r}async function c(){return e(d.DEBUG,`Powerlines build plugin finishing...`),t.$$internal.callHook(`buildEnd`,{sequential:!0})}async function l(){return e(d.DEBUG,`Finalizing Powerlines project output...`),t.$$internal.callHook(`writeBundle`,{sequential:!0})}return{name:`powerlines`,api:t.$$internal.api,resolveId:{filter:{id:{include:[/.*/]}},handler:r},load:{filter:{id:{include:[/.*/]}},handler:i},transform:o,buildStart:n,buildEnd:c,writeBundle:l,vite:{sharedDuringBuild:!0}}}catch(t){throw e(d.FATAL,t?.message),t}}}function $(e){return f(Q(e))({})}export{I as n,L as r,$ as t};
|
|
7
|
-
//# sourceMappingURL=unplugin-3lhr_MA6.mjs.map
|
|
6
|
+
`,e.file),e.file}return i}async function i(e){let n=await t.$$internal.callHook(`load`,{sequential:!0,result:`first`,order:`pre`},e);return n||(n=await t.$$internal.callHook(`load`,{sequential:!0,result:`first`,order:`normal`},e),n)||(n=await t.load(e),n)?n:t.$$internal.callHook(`load`,{sequential:!0,result:`first`,order:`post`},e)}async function o(e,n){let r=e;for(let e of t.$$internal.environment.selectHooks(`transform`)){let i=await e.handle.apply(Z(t,this),[X(r),n]);i&&(r=i)}return r}async function c(){return e(d.DEBUG,`Powerlines build plugin finishing...`),t.$$internal.callHook(`buildEnd`,{sequential:!0})}async function l(){return e(d.DEBUG,`Finalizing Powerlines project output...`),t.$$internal.callHook(`writeBundle`,{sequential:!0})}return{name:`powerlines`,api:t.$$internal.api,resolveId:{filter:{id:{include:[/.*/]}},handler:r},load:{filter:{id:{include:[/.*/]}},handler:i},transform:o,buildStart:n,buildEnd:c,writeBundle:l,vite:{sharedDuringBuild:!0}}}catch(t){throw e(d.FATAL,t?.message),t}}}function $(e){return f(Q(e))({})}export{I as n,L as r,$ as t};
|
|
@@ -4,5 +4,4 @@ import * as esbuild0 from "esbuild";
|
|
|
4
4
|
//#region src/helpers/unplugin.d.ts
|
|
5
5
|
declare function createESBuildPlugin(context: ESBuildPluginContext): esbuild0.Plugin;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { createESBuildPlugin as t };
|
|
8
|
-
//# sourceMappingURL=unplugin-BFoBFgpW.d.cts.map
|
|
7
|
+
export { createESBuildPlugin as t };
|
|
@@ -4,5 +4,4 @@ import * as esbuild0 from "esbuild";
|
|
|
4
4
|
//#region src/helpers/unplugin.d.ts
|
|
5
5
|
declare function createESBuildPlugin(context: ESBuildPluginContext): esbuild0.Plugin;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { createESBuildPlugin as t };
|
|
8
|
-
//# sourceMappingURL=unplugin-CCMrEgTM.d.mts.map
|
|
7
|
+
export { createESBuildPlugin as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-esbuild",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.61",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin to build projects using esbuild.",
|
|
6
6
|
"repository": {
|
|
@@ -152,14 +152,14 @@
|
|
|
152
152
|
"defu": "^6.1.4",
|
|
153
153
|
"esbuild": "^0.25.12",
|
|
154
154
|
"jiti": "^2.6.1",
|
|
155
|
-
"powerlines": "^0.30.
|
|
155
|
+
"powerlines": "^0.30.3",
|
|
156
156
|
"unplugin": "3.0.0-beta.3"
|
|
157
157
|
},
|
|
158
158
|
"devDependencies": {
|
|
159
|
-
"@powerlines/nx": "^0.10.
|
|
160
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
159
|
+
"@powerlines/nx": "^0.10.52",
|
|
160
|
+
"@powerlines/plugin-plugin": "^0.12.4",
|
|
161
161
|
"@types/node": "^24.10.1"
|
|
162
162
|
},
|
|
163
163
|
"publishConfig": { "access": "public" },
|
|
164
|
-
"gitHead": "
|
|
164
|
+
"gitHead": "8f31b1531e973824d7c3d58abe08c1f1f75e36e5"
|
|
165
165
|
}
|
package/dist/index.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAoCA;AACmB,cADN,MACM,EAAA,CAAA,iBAAA,oBAAA,GAAuB,oBAAvB,CAAA,CAAA,OAAA,CAAA,EAER,oBAFQ,EAAA,GAGhB,MAHgB,CAGT,QAHS,CAAA"}
|
package/dist/index.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAoCA;AACmB,cADN,MACM,EAAA,CAAA,iBAAA,oBAAA,GAAuB,oBAAvB,CAAA,CAAA,OAAA,CAAA,EAER,oBAFQ,EAAA,GAGhB,MAHgB,CAGT,QAHS,CAAA"}
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["DEFAULT_ESBUILD_CONFIG: Partial<ESBuildResolvedBuildConfig>","defu","defu"],"sources":["../../powerlines/src/lib/build/esbuild.ts","../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 { omit } from \"@stryke/helpers/omit\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport defu from \"defu\";\nimport { BuildOptions, Format, LogLevel, Platform } from \"esbuild\";\nimport {\n ESBuildBuildConfig,\n ESBuildResolvedBuildConfig,\n TsupBuildConfig\n} from \"../../types/build\";\nimport { Context } from \"../../types/context\";\nimport type { ResolvedEntryTypeDefinition } from \"../../types/resolved\";\nimport { resolveEntryInputFile, resolveEntryOutput } from \"../entry\";\n\n// const resolverPlugin = (\n// context: Context,\n// options: Pick<\n// BuildResolvedConfig,\n// \"external\" | \"noExternal\" | \"skipNodeModulesBundle\"\n// > = {}\n// ): Plugin => {\n// return {\n// name: \"powerlines:resolver\",\n// setup(build) {\n// const skipNodeModulesBundle =\n// options.skipNodeModulesBundle ??\n// context.config.build.skipNodeModulesBundle;\n// const external = options.external ?? context.config.build.external ?? [];\n// const noExternal =\n// options.noExternal ?? context.config.build.noExternal ?? [];\n// const resolvePatterns = skipNodeModulesBundle\n// ? tsconfigPathsToRegExp(context.tsconfig.options.paths ?? [])\n// : [];\n\n// const handle = async (args: OnResolveArgs) => {\n// const result = await handleResolveId(\n// context,\n// {\n// id: args.path,\n// importer: args.importer,\n// options: {\n// isEntry: false\n// }\n// },\n// {\n// skipNodeModulesBundle,\n// external,\n// noExternal,\n// resolvePatterns\n// }\n// );\n// if (!result) {\n// return;\n// }\n\n// return {\n// path: result?.id,\n// external: result?.external\n// };\n// };\n\n// build.onResolve({ filter: /.*/ }, handle);\n// build.onResolve({ filter: /^storm:/ }, handle);\n// }\n// };\n// };\n\nexport const DEFAULT_ESBUILD_CONFIG: Partial<ESBuildResolvedBuildConfig> = {\n target: \"esnext\",\n platform: \"neutral\" as Platform,\n format: \"esm\" as Format,\n write: true,\n minify: true,\n sourcemap: false,\n bundle: true,\n treeShaking: true,\n keepNames: true,\n splitting: true,\n logLevel: \"silent\" as LogLevel\n};\n\n/**\n * Resolves the entry options for esbuild.\n *\n * @param context - The build context.\n * @param entryPoints - The entry points to resolve.\n * @returns The resolved entry options.\n */\nexport function resolveESBuildEntry(\n context: Context,\n entryPoints: ResolvedEntryTypeDefinition[] | string[] = []\n): ESBuildResolvedBuildConfig[\"entryPoints\"] {\n return entryPoints.reduce(\n (ret, entry) => {\n if (isString(entry)) {\n ret[\n replaceExtension(\n replacePath(\n entry,\n context.config.sourceRoot || context.config.projectRoot\n )\n )\n ] = replacePath(\n entry,\n context.config.sourceRoot || context.config.projectRoot\n );\n } else {\n ret[entry.output || resolveEntryOutput(context, entry.input || entry)] =\n resolveEntryInputFile(context, entry.input || entry);\n }\n\n return ret;\n },\n {} as Record<string, string>\n );\n}\n\n/**\n * Resolves the esbuild options.\n *\n * @param context - The build context.\n * @returns The resolved esbuild options.\n */\nexport function extractESBuildConfig(context: Context): BuildOptions {\n const inject =\n context.config.build.override.inject ?? context.config.build.inject;\n if (inject && Object.keys(inject).length > 0) {\n context.fs.writeSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n context.artifactsPath,\n \"inject-shim.js\"\n ),\n Object.entries(inject)\n .map(([key, value]) => {\n if (value) {\n if (Array.isArray(value)) {\n if (camelCase(key) !== key) {\n if (value.length === 1) {\n return `\nimport ${camelCase(key)} from \"${value[0]}\";\nexport { ${camelCase(key)} as \"${key}\" }`;\n } else if (value.length > 1) {\n return `\nimport ${value[1] === \"*\" ? `* as ${camelCase(key)}` : `{ ${value[1]} as ${camelCase(key)} }`} from \"${value[0]}\";\nexport { ${camelCase(key)} as \"${key}\" }`;\n }\n } else if (value.length === 1) {\n return `\nimport ${key} from \"${value[0]}\";\nexport { ${key} };`;\n } else if (value.length > 1) {\n return `\nimport ${value[1] === \"*\" ? `* as ${key}` : `{ ${value[1]} as ${key} }`} from \"${value[0]}\";\nexport { ${key} };`;\n }\n } else if (camelCase(key) !== key) {\n return `\nimport ${camelCase(key)} from \"${value[0]}\";\nexport { ${camelCase(key)} as \"${key}\" }`;\n } else {\n return `\nimport ${key} from \"${value}\";\nexport { ${key} };`;\n }\n }\n\n return \"\";\n })\n .join(\"\\n\")\n );\n }\n\n return defu(\n {\n alias: context.builtins.reduce(\n (ret, id) => {\n if (!ret[id]) {\n const path = context.fs.ids[id];\n if (path) {\n ret[id] = path;\n }\n }\n\n return ret;\n },\n context.config.build.alias\n ? Array.isArray(context.config.build.alias)\n ? context.config.build.alias.reduce(\n (ret, alias) => {\n if (!ret[alias.find.toString()]) {\n ret[alias.find.toString()] = alias.replacement;\n }\n\n return ret;\n },\n {} as Record<string, string>\n )\n : context.config.build.alias\n : {}\n ),\n inject:\n inject && Object.keys(inject).length > 0\n ? [\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n context.artifactsPath,\n \"inject-shim.js\"\n )\n ]\n : undefined\n },\n context.config.build.variant === \"esbuild\"\n ? (omit(context.config.build.override, [\n \"alias\",\n \"inject\",\n \"external\",\n \"noExternal\",\n \"skipNodeModulesBundle\",\n \"extensions\"\n ]) as BuildOptions)\n : {},\n context.config.build.variant === \"esbuild\"\n ? (omit(context.config.build, [\n \"alias\",\n \"inject\",\n \"external\",\n \"noExternal\",\n \"skipNodeModulesBundle\",\n \"extensions\",\n \"variant\",\n \"override\"\n ]) as BuildOptions)\n : {},\n {\n mainFields: context.config.build.mainFields,\n conditions: context.config.build.conditions,\n define: context.config.build.define,\n resolveExtensions: context.config.build.extensions,\n packages: context.config.build.skipNodeModulesBundle\n ? \"external\"\n : context.config.build.variant === \"esbuild\"\n ? (context.config.build as ESBuildBuildConfig).packages\n : undefined,\n format: (Array.isArray(context.config.output.format)\n ? context.config.output.format[0]\n : context.config.output.format) as Format,\n platform: context.config.build.platform,\n treeShaking:\n Boolean((context.config.build as TsupBuildConfig)?.treeshake) ||\n (context.config.build as ESBuildBuildConfig)?.treeShaking,\n outdir: context.config.output.buildPath,\n tsconfig: context.tsconfig.tsconfigFilePath,\n tsconfigRaw: context.tsconfig.tsconfigJson,\n minify: context.config.mode !== \"development\",\n metafile: context.config.mode === \"development\",\n sourcemap: context.config.mode === \"development\"\n },\n DEFAULT_ESBUILD_CONFIG\n ) as BuildOptions;\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 defu from \"defu\";\nimport { build } from \"esbuild\";\nimport {\n DEFAULT_ESBUILD_CONFIG,\n extractESBuildConfig,\n resolveESBuildEntry\n} from \"powerlines/lib/build/esbuild\";\nimport { ESBuildUserConfig } from \"powerlines/types/config\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport { createESBuildPlugin } from \"./helpers/unplugin\";\nimport { ESBuildPluginContext, ESBuildPluginOptions } 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 = <\n TContext extends ESBuildPluginContext = ESBuildPluginContext\n>(\n options: ESBuildPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"esbuild\",\n config() {\n return {\n output: {\n format: [\"esm\"]\n },\n build: {\n ...DEFAULT_ESBUILD_CONFIG,\n ...options,\n variant: \"esbuild\"\n }\n } as Partial<ESBuildUserConfig>;\n },\n async build() {\n await build(\n defu(\n {\n entryPoints: resolveESBuildEntry(this, this.entry),\n plugins: [createESBuildPlugin(this)]\n },\n extractESBuildConfig(this)\n )\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":"ueAuFA,MAAaA,EAA8D,CACzE,OAAQ,SACR,SAAU,UACV,OAAQ,MACR,MAAO,GACP,OAAQ,GACR,UAAW,GACX,OAAQ,GACR,YAAa,GACb,UAAW,GACX,UAAW,GACX,SAAU,SACX,CASD,SAAgB,EACd,EACA,EAAwD,EAAE,CACf,CAC3C,OAAO,EAAY,QAChB,EAAK,KACA,EAAS,EAAM,CACjB,EACE,EACE,EACE,EACA,EAAQ,OAAO,YAAc,EAAQ,OAAO,YAC7C,CACF,EACC,EACF,EACA,EAAQ,OAAO,YAAc,EAAQ,OAAO,YAC7C,CAED,EAAI,EAAM,QAAU,EAAmB,EAAS,EAAM,OAAS,EAAM,EACnE,EAAsB,EAAS,EAAM,OAAS,EAAM,CAGjD,GAET,EAAE,CACH,CASH,SAAgB,EAAqB,EAAgC,CACnE,IAAM,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