@powerlines/plugin-esbuild 0.13.345 → 0.13.347

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.
Files changed (99) hide show
  1. package/README.md +14 -16
  2. package/dist/{build-Br4iCJ5d.d.cts → build-CAPZuv7c.d.mts} +1 -1
  3. package/dist/build-CAPZuv7c.d.mts.map +1 -0
  4. package/dist/{build-Bw5BbOcS.d.mts → build-D8UULv-V.d.cts} +1 -1
  5. package/dist/build-D8UULv-V.d.cts.map +1 -0
  6. package/dist/{bundle-CC14KyoT.d.mts → bundle-CYWEMAg5.d.mts} +1 -2
  7. package/dist/bundle-CYWEMAg5.d.mts.map +1 -0
  8. package/dist/{bundle-CGOgHuWO.d.cts → bundle-PDlKUkld.d.cts} +1 -2
  9. package/dist/bundle-PDlKUkld.d.cts.map +1 -0
  10. package/dist/helpers/bundle.cjs +44 -3
  11. package/dist/helpers/bundle.d.cts +1 -1
  12. package/dist/helpers/bundle.d.mts +1 -1
  13. package/dist/helpers/bundle.mjs +43 -3
  14. package/dist/helpers/bundle.mjs.map +1 -0
  15. package/dist/helpers/index.cjs +9 -9
  16. package/dist/helpers/index.d.cts +4 -6
  17. package/dist/helpers/index.d.mts +4 -7
  18. package/dist/helpers/index.mjs +4 -5
  19. package/dist/helpers/resolve-options.cjs +2 -1
  20. package/dist/helpers/resolve-options.d.cts +1 -1
  21. package/dist/helpers/resolve-options.d.mts +1 -1
  22. package/dist/helpers/resolve-options.mjs +86 -2
  23. package/dist/helpers/resolve-options.mjs.map +1 -0
  24. package/dist/helpers/resolve.cjs +63 -3
  25. package/dist/helpers/resolve.d.cts +1 -1
  26. package/dist/helpers/resolve.d.mts +1 -1
  27. package/dist/helpers/resolve.mjs +61 -2
  28. package/dist/helpers/resolve.mjs.map +1 -0
  29. package/dist/helpers/unplugin.cjs +11 -2
  30. package/dist/helpers/unplugin.d.cts +1 -2
  31. package/dist/helpers/unplugin.d.mts +1 -3
  32. package/dist/helpers/unplugin.mjs +10 -2
  33. package/dist/helpers/unplugin.mjs.map +1 -0
  34. package/dist/index.cjs +12 -13
  35. package/dist/index.d.cts +6 -8
  36. package/dist/index.d.cts.map +1 -1
  37. package/dist/index.d.mts +6 -8
  38. package/dist/index.d.mts.map +1 -1
  39. package/dist/index.mjs +6 -7
  40. package/dist/index.mjs.map +1 -1
  41. package/dist/{plugin-7iQtkKC4.d.cts → plugin-ChsmpXkl.d.mts} +2 -2
  42. package/dist/plugin-ChsmpXkl.d.mts.map +1 -0
  43. package/dist/{plugin-Bg_EXmOz.d.mts → plugin-D9zv9VkU.d.cts} +2 -2
  44. package/dist/plugin-D9zv9VkU.d.cts.map +1 -0
  45. package/dist/{resolve-CaJwH6sa.d.mts → resolve-BIyvH_xj.d.cts} +2 -3
  46. package/dist/resolve-BIyvH_xj.d.cts.map +1 -0
  47. package/dist/{resolve-DaXV27Bb.d.cts → resolve-BcMpWb5V.d.mts} +2 -3
  48. package/dist/resolve-BcMpWb5V.d.mts.map +1 -0
  49. package/dist/{resolve-options-C3WIGKaG.cjs → resolve-options-BYIev5x9.cjs} +18 -18
  50. package/dist/{resolve-options-2OYkM7N0.d.mts → resolve-options-CL9zAGPa.d.mts} +1 -1
  51. package/dist/resolve-options-CL9zAGPa.d.mts.map +1 -0
  52. package/dist/{resolve-options-Dv4d9qj2.d.cts → resolve-options-DGAa2QLt.d.cts} +1 -1
  53. package/dist/resolve-options-DGAa2QLt.d.cts.map +1 -0
  54. package/dist/types/build.d.cts +1 -1
  55. package/dist/types/build.d.mts +1 -1
  56. package/dist/types/index.d.cts +2 -3
  57. package/dist/types/index.d.mts +2 -3
  58. package/dist/types/plugin.d.cts +1 -1
  59. package/dist/types/plugin.d.mts +1 -2
  60. package/dist/unplugin-Cv30XR60.d.mts +8 -0
  61. package/dist/unplugin-Cv30XR60.d.mts.map +1 -0
  62. package/dist/unplugin-DT4SEWTe.d.cts +8 -0
  63. package/dist/unplugin-DT4SEWTe.d.cts.map +1 -0
  64. package/package.json +23 -22
  65. package/dist/build-Br4iCJ5d.d.cts.map +0 -1
  66. package/dist/build-Bw5BbOcS.d.mts.map +0 -1
  67. package/dist/build-CQpSv6Qa.cjs +0 -0
  68. package/dist/build-DfzG3fLI.mjs +0 -1
  69. package/dist/bundle-CC14KyoT.d.mts.map +0 -1
  70. package/dist/bundle-CGOgHuWO.d.cts.map +0 -1
  71. package/dist/bundle-CyAIQjG8.cjs +0 -49
  72. package/dist/bundle-Mt5bozRV.mjs +0 -44
  73. package/dist/bundle-Mt5bozRV.mjs.map +0 -1
  74. package/dist/helpers-BAUlPOQe.mjs +0 -1
  75. package/dist/helpers-CAF8Bmv1.cjs +0 -0
  76. package/dist/index-BXxhKmeA.d.mts +0 -1
  77. package/dist/index-ClXLQ1fw.d.mts +0 -1
  78. package/dist/index-DeEmP3Jc.d.cts +0 -1
  79. package/dist/index-sQecLSpR.d.cts +0 -1
  80. package/dist/plugin-7iQtkKC4.d.cts.map +0 -1
  81. package/dist/plugin-BL8TLixo.mjs +0 -1
  82. package/dist/plugin-Bg_EXmOz.d.mts.map +0 -1
  83. package/dist/plugin-OjUZLLkc.cjs +0 -0
  84. package/dist/resolve-C8OzoP-s.mjs +0 -62
  85. package/dist/resolve-C8OzoP-s.mjs.map +0 -1
  86. package/dist/resolve-CaJwH6sa.d.mts.map +0 -1
  87. package/dist/resolve-CsStIaEj.cjs +0 -73
  88. package/dist/resolve-DaXV27Bb.d.cts.map +0 -1
  89. package/dist/resolve-options-2OYkM7N0.d.mts.map +0 -1
  90. package/dist/resolve-options-C-213jz6.mjs +0 -87
  91. package/dist/resolve-options-C-213jz6.mjs.map +0 -1
  92. package/dist/resolve-options-Dv4d9qj2.d.cts.map +0 -1
  93. package/dist/unplugin-CW_BVHFj.cjs +0 -16
  94. package/dist/unplugin-Cv-iqtwL.d.mts +0 -8
  95. package/dist/unplugin-Cv-iqtwL.d.mts.map +0 -1
  96. package/dist/unplugin-DYA9P9Jn.d.cts +0 -8
  97. package/dist/unplugin-DYA9P9Jn.d.cts.map +0 -1
  98. package/dist/unplugin-_Yvl6iM8.mjs +0 -11
  99. package/dist/unplugin-_Yvl6iM8.mjs.map +0 -1
@@ -1,3 +1,11 @@
1
- import { t as createEsbuildPlugin } from "../unplugin-_Yvl6iM8.mjs";
1
+ import { createUnplugin } from "@powerlines/core/lib/unplugin";
2
+ import { createEsbuildPlugin as createEsbuildPlugin$1 } from "unplugin";
2
3
 
3
- export { createEsbuildPlugin };
4
+ //#region src/helpers/unplugin.ts
5
+ function createEsbuildPlugin(context) {
6
+ return createEsbuildPlugin$1(createUnplugin(context))({});
7
+ }
8
+
9
+ //#endregion
10
+ export { createEsbuildPlugin };
11
+ //# sourceMappingURL=unplugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unplugin.mjs","names":["createEsbuildUnplugin"],"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 { createEsbuildPlugin as createEsbuildUnplugin } from \"unplugin\";\nimport { EsbuildPluginContext } from \"../types/plugin\";\n\nexport function createEsbuildPlugin(context: EsbuildPluginContext) {\n return createEsbuildUnplugin(createUnplugin(context))({});\n}\n"],"mappings":";;;;AAsBA,SAAgB,oBAAoB,SAA+B;AACjE,QAAOA,sBAAsB,eAAe,QAAQ,CAAC,CAAC,EAAE,CAAC"}
package/dist/index.cjs CHANGED
@@ -1,9 +1,9 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_resolve_options = require('./resolve-options-C3WIGKaG.cjs');
3
- const require_unplugin = require('./unplugin-CW_BVHFj.cjs');
4
- const require_bundle = require('./bundle-CyAIQjG8.cjs');
5
- const require_resolve = require('./resolve-CsStIaEj.cjs');
6
- require('./helpers-CAF8Bmv1.cjs');
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_resolve_options = require('./resolve-options-BYIev5x9.cjs');
3
+ const require_helpers_unplugin = require('./helpers/unplugin.cjs');
4
+ const require_helpers_bundle = require('./helpers/bundle.cjs');
5
+ const require_helpers_resolve = require('./helpers/resolve.cjs');
6
+ require('./helpers/index.cjs');
7
7
  require('./types/index.cjs');
8
8
  let defu = require("defu");
9
9
  defu = require_resolve_options.__toESM(defu);
@@ -29,20 +29,19 @@ const plugin = (options = {}) => {
29
29
  async build() {
30
30
  await (0, esbuild.build)((0, defu.default)({
31
31
  entryPoints: require_resolve_options.resolveEntry(this, this.entry),
32
- plugins: [require_unplugin.createEsbuildPlugin(this)]
32
+ plugins: [require_helpers_unplugin.createEsbuildPlugin(this)]
33
33
  }, require_resolve_options.resolveOptions(this)));
34
34
  }
35
35
  };
36
36
  };
37
- var src_default = plugin;
38
37
 
39
38
  //#endregion
40
39
  exports.DEFAULT_ESBUILD_CONFIG = require_resolve_options.DEFAULT_ESBUILD_CONFIG;
41
- exports.bundle = require_bundle.bundle;
42
- exports.createEsbuildPlugin = require_unplugin.createEsbuildPlugin;
43
- exports.default = src_default;
40
+ exports.bundle = require_helpers_bundle.bundle;
41
+ exports.createEsbuildPlugin = require_helpers_unplugin.createEsbuildPlugin;
42
+ exports.default = plugin;
44
43
  exports.plugin = plugin;
45
- exports.resolve = require_resolve.resolve;
44
+ exports.resolve = require_helpers_resolve.resolve;
46
45
  exports.resolveEntry = require_resolve_options.resolveEntry;
47
- exports.resolveModule = require_resolve.resolveModule;
46
+ exports.resolveModule = require_helpers_resolve.resolveModule;
48
47
  exports.resolveOptions = require_resolve_options.resolveOptions;
package/dist/index.d.cts CHANGED
@@ -1,11 +1,9 @@
1
- import { t as bundle } from "./bundle-CGOgHuWO.cjs";
2
- import { n as resolveModule, t as resolve } from "./resolve-DaXV27Bb.cjs";
3
- import { n as resolveEntry, r as resolveOptions, t as DEFAULT_ESBUILD_CONFIG } from "./resolve-options-Dv4d9qj2.cjs";
4
- import { n as __ΩEsbuildOptions, t as EsbuildOptions } from "./build-Br4iCJ5d.cjs";
5
- import { a as __ΩEsbuildPluginContext, c as __ΩEsbuildPluginUserConfig, i as EsbuildPluginUserConfig, n as EsbuildPluginOptions, o as __ΩEsbuildPluginOptions, r as EsbuildPluginResolvedConfig, s as __ΩEsbuildPluginResolvedConfig, t as EsbuildPluginContext } from "./plugin-7iQtkKC4.cjs";
6
- import { t as createEsbuildPlugin } from "./unplugin-DYA9P9Jn.cjs";
7
- import "./index-DeEmP3Jc.cjs";
8
- import "./index-sQecLSpR.cjs";
1
+ import { t as bundle } from "./bundle-PDlKUkld.cjs";
2
+ import { n as resolveModule, t as resolve } from "./resolve-BIyvH_xj.cjs";
3
+ import { n as resolveEntry, r as resolveOptions, t as DEFAULT_ESBUILD_CONFIG } from "./resolve-options-DGAa2QLt.cjs";
4
+ import { n as __ΩEsbuildOptions, t as EsbuildOptions } from "./build-D8UULv-V.cjs";
5
+ import { a as __ΩEsbuildPluginContext, c as __ΩEsbuildPluginUserConfig, i as EsbuildPluginUserConfig, n as EsbuildPluginOptions, o as __ΩEsbuildPluginOptions, r as EsbuildPluginResolvedConfig, s as __ΩEsbuildPluginResolvedConfig, t as EsbuildPluginContext } from "./plugin-D9zv9VkU.cjs";
6
+ import { t as createEsbuildPlugin } from "./unplugin-DT4SEWTe.cjs";
9
7
  import { Plugin } from "@powerlines/core";
10
8
 
11
9
  //#region src/index.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;cAsCc;;;;;AAJU;AAAA,cAWX,MAXW,EAAA,CAAA,iBAYL,oBAZK,GAYkB,oBAZlB,CAAA,CAAA,OAAA,CAAA,EAcb,oBAda,EAAA,GAerB,MAfqB,CAed,QAfc,CAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;YAqCY,MAAA;IACR,OAAA,GAAU,oBAAA;EAAA;AAAA;;;AAJU;cAWX,MAAA,oBACM,oBAAA,GAAuB,oBAAA,EAExC,OAAA,GAAS,oBAAA,KACR,MAAA,CAAO,QAAA"}
package/dist/index.d.mts CHANGED
@@ -1,11 +1,9 @@
1
- import { t as bundle } from "./bundle-CC14KyoT.mjs";
2
- import { n as resolveModule, t as resolve } from "./resolve-CaJwH6sa.mjs";
3
- import { n as resolveEntry, r as resolveOptions, t as DEFAULT_ESBUILD_CONFIG } from "./resolve-options-2OYkM7N0.mjs";
4
- import { n as __ΩEsbuildOptions, t as EsbuildOptions } from "./build-Bw5BbOcS.mjs";
5
- import { a as __ΩEsbuildPluginContext, c as __ΩEsbuildPluginUserConfig, i as EsbuildPluginUserConfig, n as EsbuildPluginOptions, o as __ΩEsbuildPluginOptions, r as EsbuildPluginResolvedConfig, s as __ΩEsbuildPluginResolvedConfig, t as EsbuildPluginContext } from "./plugin-Bg_EXmOz.mjs";
6
- import { t as createEsbuildPlugin } from "./unplugin-Cv-iqtwL.mjs";
7
- import "./index-BXxhKmeA.mjs";
8
- import "./index-ClXLQ1fw.mjs";
1
+ import { t as bundle } from "./bundle-CYWEMAg5.mjs";
2
+ import { n as resolveModule, t as resolve } from "./resolve-BcMpWb5V.mjs";
3
+ import { n as resolveEntry, r as resolveOptions, t as DEFAULT_ESBUILD_CONFIG } from "./resolve-options-CL9zAGPa.mjs";
4
+ import { n as __ΩEsbuildOptions, t as EsbuildOptions } from "./build-CAPZuv7c.mjs";
5
+ import { a as __ΩEsbuildPluginContext, c as __ΩEsbuildPluginUserConfig, i as EsbuildPluginUserConfig, n as EsbuildPluginOptions, o as __ΩEsbuildPluginOptions, r as EsbuildPluginResolvedConfig, s as __ΩEsbuildPluginResolvedConfig, t as EsbuildPluginContext } from "./plugin-ChsmpXkl.mjs";
6
+ import { t as createEsbuildPlugin } from "./unplugin-Cv30XR60.mjs";
9
7
  import { Plugin } from "@powerlines/core";
10
8
 
11
9
  //#region src/index.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;cAsCc;;;;;AAJU;AAAA,cAWX,MAXW,EAAA,CAAA,iBAYL,oBAZK,GAYkB,oBAZlB,CAAA,CAAA,OAAA,CAAA,EAcb,oBAda,EAAA,GAerB,MAfqB,CAed,QAfc,CAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;YAqCY,MAAA;IACR,OAAA,GAAU,oBAAA;EAAA;AAAA;;;AAJU;cAWX,MAAA,oBACM,oBAAA,GAAuB,oBAAA,EAExC,OAAA,GAAS,oBAAA,KACR,MAAA,CAAO,QAAA"}
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { n as resolveEntry, r as resolveOptions, t as DEFAULT_ESBUILD_CONFIG } from "./resolve-options-C-213jz6.mjs";
2
- import { t as createEsbuildPlugin } from "./unplugin-_Yvl6iM8.mjs";
3
- import { t as bundle } from "./bundle-Mt5bozRV.mjs";
4
- import { n as resolveModule, t as resolve } from "./resolve-C8OzoP-s.mjs";
5
- import "./helpers-BAUlPOQe.mjs";
1
+ import { DEFAULT_ESBUILD_CONFIG, resolveEntry, resolveOptions } from "./helpers/resolve-options.mjs";
2
+ import { createEsbuildPlugin } from "./helpers/unplugin.mjs";
3
+ import { bundle } from "./helpers/bundle.mjs";
4
+ import { resolve, resolveModule } from "./helpers/resolve.mjs";
5
+ import "./helpers/index.mjs";
6
6
  import "./types/index.mjs";
7
7
  import defu from "defu";
8
8
  import { build } from "esbuild";
@@ -32,8 +32,7 @@ const plugin = (options = {}) => {
32
32
  }
33
33
  };
34
34
  };
35
- var src_default = plugin;
36
35
 
37
36
  //#endregion
38
- export { DEFAULT_ESBUILD_CONFIG, bundle, createEsbuildPlugin, src_default as default, plugin, resolve, resolveEntry, resolveModule, resolveOptions };
37
+ export { DEFAULT_ESBUILD_CONFIG, bundle, createEsbuildPlugin, plugin as default, plugin, resolve, resolveEntry, resolveModule, resolveOptions };
39
38
  //# sourceMappingURL=index.mjs.map
@@ -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 { Plugin } from \"@powerlines/core\";\nimport defu from \"defu\";\nimport { build } from \"esbuild\";\nimport {\n DEFAULT_ESBUILD_CONFIG,\n resolveEntry,\n resolveOptions\n} from \"./helpers/resolve-options\";\nimport { createEsbuildPlugin } from \"./helpers/unplugin\";\nimport {\n EsbuildPluginContext,\n EsbuildPluginOptions,\n EsbuildPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface Config {\n esbuild?: EsbuildPluginOptions;\n }\n}\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<EsbuildPluginUserConfig>;\n },\n async build() {\n await build(\n defu(\n {\n entryPoints: resolveEntry(this, this.entry),\n plugins: [createEsbuildPlugin(this)]\n },\n resolveOptions(this)\n )\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;AA6CA,MAAa,UAGX,UAAgC,EAAE,KACb;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO;IACL,QAAQ,EACN,QAAQ,CAAC,MAAM,EAChB;IACD,OAAO;KACL,GAAG;KACH,GAAG;KACH,SAAS;KACV;IACF;;EAEH,MAAM,QAAQ;AACZ,SAAM,MACJ,KACE;IACE,aAAa,aAAa,MAAM,KAAK,MAAM;IAC3C,SAAS,CAAC,oBAAoB,KAAK,CAAC;IACrC,EACD,eAAe,KAAK,CACrB,CACF;;EAEJ;;AAGH,kBAAe"}
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 { Plugin } from \"@powerlines/core\";\nimport defu from \"defu\";\nimport { build } from \"esbuild\";\nimport {\n DEFAULT_ESBUILD_CONFIG,\n resolveEntry,\n resolveOptions\n} from \"./helpers/resolve-options\";\nimport { createEsbuildPlugin } from \"./helpers/unplugin\";\nimport {\n EsbuildPluginContext,\n EsbuildPluginOptions,\n EsbuildPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface Config {\n esbuild?: EsbuildPluginOptions;\n }\n}\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<EsbuildPluginUserConfig>;\n },\n async build() {\n await build(\n defu(\n {\n entryPoints: resolveEntry(this, this.entry),\n plugins: [createEsbuildPlugin(this)]\n },\n resolveOptions(this)\n )\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;AA6CA,MAAa,UAGX,UAAgC,EAAE,KACb;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO;IACL,QAAQ,EACN,QAAQ,CAAC,MAAM,EAChB;IACD,OAAO;KACL,GAAG;KACH,GAAG;KACH,SAAS;KACV;IACF;;EAEH,MAAM,QAAQ;AACZ,SAAM,MACJ,KACE;IACE,aAAa,aAAa,MAAM,KAAK,MAAM;IAC3C,SAAS,CAAC,oBAAoB,KAAK,CAAC;IACrC,EACD,eAAe,KAAK,CACrB,CACF;;EAEJ"}
@@ -1,4 +1,4 @@
1
- import { t as EsbuildOptions } from "./build-Br4iCJ5d.cjs";
1
+ import { t as EsbuildOptions } from "./build-CAPZuv7c.mjs";
2
2
  import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core";
3
3
 
4
4
  //#region src/types/plugin.d.ts
@@ -16,4 +16,4 @@ declare type __ΩEsbuildPluginResolvedConfig = any[];
16
16
  declare type __ΩEsbuildPluginContext = any[];
17
17
  //#endregion
18
18
  export { __ΩEsbuildPluginContext as a, __ΩEsbuildPluginUserConfig as c, EsbuildPluginUserConfig as i, EsbuildPluginOptions as n, __ΩEsbuildPluginOptions as o, EsbuildPluginResolvedConfig as r, __ΩEsbuildPluginResolvedConfig as s, EsbuildPluginContext as t };
19
- //# sourceMappingURL=plugin-7iQtkKC4.d.cts.map
19
+ //# sourceMappingURL=plugin-ChsmpXkl.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-ChsmpXkl.d.mts","names":[],"sources":["../src/types/plugin.ts"],"mappings":";;;;KAqBY,oBAAA,GAAuB,OAAA,CAAQ,cAAA;AAAA,UAE1B,uBAAA,SAAgC,UAAA;EAC/C,OAAA,GAAU,oBAAA;AAAA;AAAA,UAGK,2BAAA,SAAoC,cAAA;EACnD,OAAA,EAAS,cAAA;AAAA;AAAA,KAGC,oBAAA,yBACc,2BAAA,GACtB,2BAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
@@ -1,4 +1,4 @@
1
- import { t as EsbuildOptions } from "./build-Bw5BbOcS.mjs";
1
+ import { t as EsbuildOptions } from "./build-D8UULv-V.cjs";
2
2
  import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core";
3
3
 
4
4
  //#region src/types/plugin.d.ts
@@ -16,4 +16,4 @@ declare type __ΩEsbuildPluginResolvedConfig = any[];
16
16
  declare type __ΩEsbuildPluginContext = any[];
17
17
  //#endregion
18
18
  export { __ΩEsbuildPluginContext as a, __ΩEsbuildPluginUserConfig as c, EsbuildPluginUserConfig as i, EsbuildPluginOptions as n, __ΩEsbuildPluginOptions as o, EsbuildPluginResolvedConfig as r, __ΩEsbuildPluginResolvedConfig as s, EsbuildPluginContext as t };
19
- //# sourceMappingURL=plugin-Bg_EXmOz.d.mts.map
19
+ //# sourceMappingURL=plugin-D9zv9VkU.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-D9zv9VkU.d.cts","names":[],"sources":["../src/types/plugin.ts"],"mappings":";;;;KAqBY,oBAAA,GAAuB,OAAA,CAAQ,cAAA;AAAA,UAE1B,uBAAA,SAAgC,UAAA;EAC/C,OAAA,GAAU,oBAAA;AAAA;AAAA,UAGK,2BAAA,SAAoC,cAAA;EACnD,OAAA,EAAS,cAAA;AAAA;AAAA,KAGC,oBAAA,yBACc,2BAAA,GACtB,2BAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
@@ -1,9 +1,8 @@
1
- import { BuildOptions } from "esbuild";
2
1
  import { PluginContext } from "@powerlines/core";
2
+ import { BuildOptions } from "esbuild";
3
3
  import { TypeDefinitionParameter } from "@stryke/types/configuration";
4
4
 
5
5
  //#region src/helpers/resolve.d.ts
6
-
7
6
  /**
8
7
  * Compiles a type definition to a module and returns the module.
9
8
  *
@@ -24,4 +23,4 @@ declare function resolveModule<TResult>(context: PluginContext, type: TypeDefini
24
23
  declare function resolve<TResult>(context: PluginContext, type: TypeDefinitionParameter, overrides?: Partial<BuildOptions>): Promise<TResult>;
25
24
  //#endregion
26
25
  export { resolveModule as n, resolve as t };
27
- //# sourceMappingURL=resolve-CaJwH6sa.d.mts.map
26
+ //# sourceMappingURL=resolve-BIyvH_xj.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-BIyvH_xj.d.cts","names":[],"sources":["../src/helpers/resolve.ts"],"mappings":";;;;;;;AAoCA;;;;;;iBAAsB,aAAA,SAAA,CACpB,OAAA,EAAS,aAAA,EACT,IAAA,EAAM,uBAAA,EACN,SAAA,GAAW,OAAA,CAAQ,YAAA,IAClB,OAAA,CAAQ,OAAA;;;;;;;;;iBAqEW,OAAA,SAAA,CACpB,OAAA,EAAS,aAAA,EACT,IAAA,EAAM,uBAAA,EACN,SAAA,GAAW,OAAA,CAAQ,YAAA,IAClB,OAAA,CAAQ,OAAA"}
@@ -1,9 +1,8 @@
1
- import { PluginContext } from "@powerlines/core";
2
1
  import { BuildOptions } from "esbuild";
2
+ import { PluginContext } from "@powerlines/core";
3
3
  import { TypeDefinitionParameter } from "@stryke/types/configuration";
4
4
 
5
5
  //#region src/helpers/resolve.d.ts
6
-
7
6
  /**
8
7
  * Compiles a type definition to a module and returns the module.
9
8
  *
@@ -24,4 +23,4 @@ declare function resolveModule<TResult>(context: PluginContext, type: TypeDefini
24
23
  declare function resolve<TResult>(context: PluginContext, type: TypeDefinitionParameter, overrides?: Partial<BuildOptions>): Promise<TResult>;
25
24
  //#endregion
26
25
  export { resolveModule as n, resolve as t };
27
- //# sourceMappingURL=resolve-DaXV27Bb.d.cts.map
26
+ //# sourceMappingURL=resolve-BcMpWb5V.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-BcMpWb5V.d.mts","names":[],"sources":["../src/helpers/resolve.ts"],"mappings":";;;;;;;AAoCA;;;;;;iBAAsB,aAAA,SAAA,CACpB,OAAA,EAAS,aAAA,EACT,IAAA,EAAM,uBAAA,EACN,SAAA,GAAW,OAAA,CAAQ,YAAA,IAClB,OAAA,CAAQ,OAAA;;;;;;;;;iBAqEW,OAAA,SAAA,CACpB,OAAA,EAAS,aAAA,EACT,IAAA,EAAM,uBAAA,EACN,SAAA,GAAW,OAAA,CAAQ,YAAA,IAClB,OAAA,CAAQ,OAAA"}
@@ -1,4 +1,4 @@
1
- //#region rolldown:runtime
1
+ //#region \0rolldown/runtime.js
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -27,11 +27,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  //#endregion
28
28
  let defu = require("defu");
29
29
  defu = __toESM(defu);
30
- let __powerlines_core_lib_entry = require("@powerlines/core/lib/entry");
31
- let __stryke_path_join_paths = require("@stryke/path/join-paths");
32
- let __stryke_path_replace = require("@stryke/path/replace");
33
- let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
34
- let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
30
+ let _powerlines_core_lib_entry = require("@powerlines/core/lib/entry");
31
+ let _stryke_path_join_paths = require("@stryke/path/join-paths");
32
+ let _stryke_path_replace = require("@stryke/path/replace");
33
+ let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
34
+ let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
35
35
 
36
36
  //#region src/helpers/resolve-options.ts
37
37
  const DEFAULT_ESBUILD_CONFIG = {
@@ -56,8 +56,8 @@ const DEFAULT_ESBUILD_CONFIG = {
56
56
  */
57
57
  function resolveEntry(context, entryPoints = []) {
58
58
  return entryPoints.reduce((ret, entry) => {
59
- if ((0, __stryke_type_checks_is_string.isString)(entry)) ret[(0, __stryke_path_replace.replaceExtension)((0, __stryke_path_replace.replacePath)(entry, context.config.root))] = (0, __stryke_path_replace.replacePath)(entry, context.config.root);
60
- else ret[entry.output || (0, __powerlines_core_lib_entry.resolveEntryOutput)(context, entry)] = entry.file;
59
+ if ((0, _stryke_type_checks_is_string.isString)(entry)) ret[(0, _stryke_path_replace.replaceExtension)((0, _stryke_path_replace.replacePath)(entry, context.config.root))] = (0, _stryke_path_replace.replacePath)(entry, context.config.root);
60
+ else ret[entry.output || (0, _powerlines_core_lib_entry.resolveEntryOutput)(context, entry)] = entry.file;
61
61
  return ret;
62
62
  }, {});
63
63
  }
@@ -68,24 +68,24 @@ function resolveEntry(context, entryPoints = []) {
68
68
  * @returns The resolved esbuild options.
69
69
  */
70
70
  function resolveOptions(context) {
71
- if (context.config.inject && Object.keys(context.config.inject).length > 0) context.fs.writeSync((0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, context.artifactsPath, "inject-shim.js"), Object.entries(context.config.inject).map(([key, value]) => {
71
+ if (context.config.inject && Object.keys(context.config.inject).length > 0) context.fs.writeSync((0, _stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, context.artifactsPath, "inject-shim.js"), Object.entries(context.config.inject).map(([key, value]) => {
72
72
  if (value) if (Array.isArray(value)) {
73
- if ((0, __stryke_string_format_camel_case.camelCase)(key) !== key) {
73
+ if ((0, _stryke_string_format_camel_case.camelCase)(key) !== key) {
74
74
  if (value.length === 1) return `
75
- import ${(0, __stryke_string_format_camel_case.camelCase)(key)} from "${value[0]}";
76
- export { ${(0, __stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
75
+ import ${(0, _stryke_string_format_camel_case.camelCase)(key)} from "${value[0]}";
76
+ export { ${(0, _stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
77
77
  else if (value.length > 1) return `
78
- import ${value[1] === "*" ? `* as ${(0, __stryke_string_format_camel_case.camelCase)(key)}` : `{ ${value[1]} as ${(0, __stryke_string_format_camel_case.camelCase)(key)} }`} from "${value[0]}";
79
- export { ${(0, __stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
78
+ import ${value[1] === "*" ? `* as ${(0, _stryke_string_format_camel_case.camelCase)(key)}` : `{ ${value[1]} as ${(0, _stryke_string_format_camel_case.camelCase)(key)} }`} from "${value[0]}";
79
+ export { ${(0, _stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
80
80
  } else if (value.length === 1) return `
81
81
  import ${key} from "${value[0]}";
82
82
  export { ${key} };`;
83
83
  else if (value.length > 1) return `
84
84
  import ${value[1] === "*" ? `* as ${key}` : `{ ${value[1]} as ${key} }`} from "${value[0]}";
85
85
  export { ${key} };`;
86
- } else if ((0, __stryke_string_format_camel_case.camelCase)(key) !== key) return `
87
- import ${(0, __stryke_string_format_camel_case.camelCase)(key)} from "${value[0]}";
88
- export { ${(0, __stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
86
+ } else if ((0, _stryke_string_format_camel_case.camelCase)(key) !== key) return `
87
+ import ${(0, _stryke_string_format_camel_case.camelCase)(key)} from "${value[0]}";
88
+ export { ${(0, _stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
89
89
  else return `
90
90
  import ${key} from "${value}";
91
91
  export { ${key} };`;
@@ -93,7 +93,7 @@ export { ${key} };`;
93
93
  }).join("\n"));
94
94
  return (0, defu.default)({
95
95
  alias: context.alias,
96
- inject: context.config.inject && Object.keys(context.config.inject).length > 0 ? [(0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, context.artifactsPath, "inject-shim.js")] : void 0
96
+ inject: context.config.inject && Object.keys(context.config.inject).length > 0 ? [(0, _stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, context.artifactsPath, "inject-shim.js")] : void 0
97
97
  }, context.config?.esbuild ? context.config.esbuild : {}, {
98
98
  mainFields: context.config.resolve.mainFields,
99
99
  conditions: context.config.resolve.conditions,
@@ -20,4 +20,4 @@ declare function resolveEntry(context: Context, entryPoints?: ResolvedEntryTypeD
20
20
  declare function resolveOptions(context: Context): BuildOptions;
21
21
  //#endregion
22
22
  export { resolveEntry as n, resolveOptions as r, DEFAULT_ESBUILD_CONFIG as t };
23
- //# sourceMappingURL=resolve-options-2OYkM7N0.d.mts.map
23
+ //# sourceMappingURL=resolve-options-CL9zAGPa.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-options-CL9zAGPa.d.mts","names":[],"sources":["../src/helpers/resolve-options.ts"],"mappings":";;;;cA4Ba,sBAAA,EAAwB,OAAA,CAAQ,YAAA;;AAA7C;;;;;AAqBA;iBAAgB,YAAA,CACd,OAAA,EAAS,OAAA,EACT,WAAA,GAAa,2BAAA,gBACZ,YAAA;;;;;;;iBAsBa,cAAA,CAAe,OAAA,EAAS,OAAA,GAAU,YAAA"}
@@ -20,4 +20,4 @@ declare function resolveEntry(context: Context, entryPoints?: ResolvedEntryTypeD
20
20
  declare function resolveOptions(context: Context): BuildOptions;
21
21
  //#endregion
22
22
  export { resolveEntry as n, resolveOptions as r, DEFAULT_ESBUILD_CONFIG as t };
23
- //# sourceMappingURL=resolve-options-Dv4d9qj2.d.cts.map
23
+ //# sourceMappingURL=resolve-options-DGAa2QLt.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-options-DGAa2QLt.d.cts","names":[],"sources":["../src/helpers/resolve-options.ts"],"mappings":";;;;cA4Ba,sBAAA,EAAwB,OAAA,CAAQ,YAAA;;AAA7C;;;;;AAqBA;iBAAgB,YAAA,CACd,OAAA,EAAS,OAAA,EACT,WAAA,GAAa,2BAAA,gBACZ,YAAA;;;;;;;iBAsBa,cAAA,CAAe,OAAA,EAAS,OAAA,GAAU,YAAA"}
@@ -1,2 +1,2 @@
1
- import { n as __ΩEsbuildOptions, t as EsbuildOptions } from "../build-Br4iCJ5d.cjs";
1
+ import { n as __ΩEsbuildOptions, t as EsbuildOptions } from "../build-D8UULv-V.cjs";
2
2
  export { EsbuildOptions, __ΩEsbuildOptions };
@@ -1,2 +1,2 @@
1
- import { n as __ΩEsbuildOptions, t as EsbuildOptions } from "../build-Bw5BbOcS.mjs";
1
+ import { n as __ΩEsbuildOptions, t as EsbuildOptions } from "../build-CAPZuv7c.mjs";
2
2
  export { EsbuildOptions, __ΩEsbuildOptions };
@@ -1,4 +1,3 @@
1
- import { n as __ΩEsbuildOptions, t as EsbuildOptions } from "../build-Br4iCJ5d.cjs";
2
- import { a as __ΩEsbuildPluginContext, c as __ΩEsbuildPluginUserConfig, i as EsbuildPluginUserConfig, n as EsbuildPluginOptions, o as __ΩEsbuildPluginOptions, r as EsbuildPluginResolvedConfig, s as __ΩEsbuildPluginResolvedConfig, t as EsbuildPluginContext } from "../plugin-7iQtkKC4.cjs";
3
- import "../index-sQecLSpR.cjs";
1
+ import { n as __ΩEsbuildOptions, t as EsbuildOptions } from "../build-D8UULv-V.cjs";
2
+ import { a as __ΩEsbuildPluginContext, c as __ΩEsbuildPluginUserConfig, i as EsbuildPluginUserConfig, n as EsbuildPluginOptions, o as __ΩEsbuildPluginOptions, r as EsbuildPluginResolvedConfig, s as __ΩEsbuildPluginResolvedConfig, t as EsbuildPluginContext } from "../plugin-D9zv9VkU.cjs";
4
3
  export { EsbuildOptions, EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildOptions, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig };
@@ -1,4 +1,3 @@
1
- import { n as __ΩEsbuildOptions, t as EsbuildOptions } from "../build-Bw5BbOcS.mjs";
2
- import { a as __ΩEsbuildPluginContext, c as __ΩEsbuildPluginUserConfig, i as EsbuildPluginUserConfig, n as EsbuildPluginOptions, o as __ΩEsbuildPluginOptions, r as EsbuildPluginResolvedConfig, s as __ΩEsbuildPluginResolvedConfig, t as EsbuildPluginContext } from "../plugin-Bg_EXmOz.mjs";
3
- import "../index-ClXLQ1fw.mjs";
1
+ import { n as __ΩEsbuildOptions, t as EsbuildOptions } from "../build-CAPZuv7c.mjs";
2
+ import { a as __ΩEsbuildPluginContext, c as __ΩEsbuildPluginUserConfig, i as EsbuildPluginUserConfig, n as EsbuildPluginOptions, o as __ΩEsbuildPluginOptions, r as EsbuildPluginResolvedConfig, s as __ΩEsbuildPluginResolvedConfig, t as EsbuildPluginContext } from "../plugin-ChsmpXkl.mjs";
4
3
  export { EsbuildOptions, EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildOptions, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig };
@@ -1,2 +1,2 @@
1
- import { a as __ΩEsbuildPluginContext, c as __ΩEsbuildPluginUserConfig, i as EsbuildPluginUserConfig, n as EsbuildPluginOptions, o as __ΩEsbuildPluginOptions, r as EsbuildPluginResolvedConfig, s as __ΩEsbuildPluginResolvedConfig, t as EsbuildPluginContext } from "../plugin-7iQtkKC4.cjs";
1
+ import { a as __ΩEsbuildPluginContext, c as __ΩEsbuildPluginUserConfig, i as EsbuildPluginUserConfig, n as EsbuildPluginOptions, o as __ΩEsbuildPluginOptions, r as EsbuildPluginResolvedConfig, s as __ΩEsbuildPluginResolvedConfig, t as EsbuildPluginContext } from "../plugin-D9zv9VkU.cjs";
2
2
  export { EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig };
@@ -1,3 +1,2 @@
1
- import "../build-Bw5BbOcS.mjs";
2
- import { a as __ΩEsbuildPluginContext, c as __ΩEsbuildPluginUserConfig, i as EsbuildPluginUserConfig, n as EsbuildPluginOptions, o as __ΩEsbuildPluginOptions, r as EsbuildPluginResolvedConfig, s as __ΩEsbuildPluginResolvedConfig, t as EsbuildPluginContext } from "../plugin-Bg_EXmOz.mjs";
1
+ import { a as __ΩEsbuildPluginContext, c as __ΩEsbuildPluginUserConfig, i as EsbuildPluginUserConfig, n as EsbuildPluginOptions, o as __ΩEsbuildPluginOptions, r as EsbuildPluginResolvedConfig, s as __ΩEsbuildPluginResolvedConfig, t as EsbuildPluginContext } from "../plugin-ChsmpXkl.mjs";
3
2
  export { EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig };
@@ -0,0 +1,8 @@
1
+ import { t as EsbuildPluginContext } from "./plugin-ChsmpXkl.mjs";
2
+ import * as esbuild from "esbuild";
3
+
4
+ //#region src/helpers/unplugin.d.ts
5
+ declare function createEsbuildPlugin(context: EsbuildPluginContext): esbuild.Plugin;
6
+ //#endregion
7
+ export { createEsbuildPlugin as t };
8
+ //# sourceMappingURL=unplugin-Cv30XR60.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unplugin-Cv30XR60.d.mts","names":[],"sources":["../src/helpers/unplugin.ts"],"mappings":";;;;iBAsBgB,mBAAA,CAAoB,OAAA,EAAS,oBAAA,GAAoB,OAAA,CAAA,MAAA"}
@@ -0,0 +1,8 @@
1
+ import { t as EsbuildPluginContext } from "./plugin-D9zv9VkU.cjs";
2
+ import * as esbuild from "esbuild";
3
+
4
+ //#region src/helpers/unplugin.d.ts
5
+ declare function createEsbuildPlugin(context: EsbuildPluginContext): esbuild.Plugin;
6
+ //#endregion
7
+ export { createEsbuildPlugin as t };
8
+ //# sourceMappingURL=unplugin-DT4SEWTe.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unplugin-DT4SEWTe.d.cts","names":[],"sources":["../src/helpers/unplugin.ts"],"mappings":";;;;iBAsBgB,mBAAA,CAAoB,OAAA,EAAS,oBAAA,GAAoB,OAAA,CAAA,MAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-esbuild",
3
- "version": "0.13.345",
3
+ "version": "0.13.347",
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"],
@@ -40,38 +40,39 @@
40
40
  ],
41
41
  "type": "module",
42
42
  "exports": {
43
- ".": { "require": "./dist/index.cjs", "import": "./dist/index.mjs" },
43
+ ".": { "import": "./dist/index.mjs", "require": "./dist/index.cjs" },
44
44
  "./helpers": {
45
- "require": "./dist/helpers/index.cjs",
46
- "import": "./dist/helpers/index.mjs"
45
+ "import": "./dist/helpers/index.mjs",
46
+ "require": "./dist/helpers/index.cjs"
47
47
  },
48
48
  "./helpers/bundle": {
49
- "require": "./dist/helpers/bundle.cjs",
50
- "import": "./dist/helpers/bundle.mjs"
49
+ "import": "./dist/helpers/bundle.mjs",
50
+ "require": "./dist/helpers/bundle.cjs"
51
51
  },
52
52
  "./helpers/resolve": {
53
- "require": "./dist/helpers/resolve.cjs",
54
- "import": "./dist/helpers/resolve.mjs"
53
+ "import": "./dist/helpers/resolve.mjs",
54
+ "require": "./dist/helpers/resolve.cjs"
55
55
  },
56
56
  "./helpers/resolve-options": {
57
- "require": "./dist/helpers/resolve-options.cjs",
58
- "import": "./dist/helpers/resolve-options.mjs"
57
+ "import": "./dist/helpers/resolve-options.mjs",
58
+ "require": "./dist/helpers/resolve-options.cjs"
59
59
  },
60
60
  "./helpers/unplugin": {
61
- "require": "./dist/helpers/unplugin.cjs",
62
- "import": "./dist/helpers/unplugin.mjs"
61
+ "import": "./dist/helpers/unplugin.mjs",
62
+ "require": "./dist/helpers/unplugin.cjs"
63
63
  },
64
+ "./resolve-options-BYIev5x9": "./dist/resolve-options-BYIev5x9.cjs",
64
65
  "./types": {
65
- "require": "./dist/types/index.cjs",
66
- "import": "./dist/types/index.mjs"
66
+ "import": "./dist/types/index.mjs",
67
+ "require": "./dist/types/index.cjs"
67
68
  },
68
69
  "./types/build": {
69
- "require": "./dist/types/build.cjs",
70
- "import": "./dist/types/build.mjs"
70
+ "import": "./dist/types/build.mjs",
71
+ "require": "./dist/types/build.cjs"
71
72
  },
72
73
  "./types/plugin": {
73
- "require": "./dist/types/plugin.cjs",
74
- "import": "./dist/types/plugin.mjs"
74
+ "import": "./dist/types/plugin.mjs",
75
+ "require": "./dist/types/plugin.cjs"
75
76
  },
76
77
  "./*": "./*"
77
78
  },
@@ -80,10 +81,10 @@
80
81
  "types": "./dist/index.d.cts",
81
82
  "typings": "dist/index.d.mts",
82
83
  "files": ["dist/**/*"],
83
- "peerDependencies": { "esbuild": ">=0.25.0" },
84
+ "peerDependencies": { "esbuild": ">=0.27.3" },
84
85
  "peerDependenciesMeta": { "esbuild": { "optional": false } },
85
86
  "dependencies": {
86
- "@powerlines/core": "^0.2.22",
87
+ "@powerlines/core": "^0.3.0",
87
88
  "@stryke/fs": "^0.33.57",
88
89
  "@stryke/path": "^0.26.19",
89
90
  "@stryke/type-checks": "^0.5.38",
@@ -92,7 +93,7 @@
92
93
  "jiti": "^2.6.1",
93
94
  "unplugin": "^3.0.0"
94
95
  },
95
- "devDependencies": { "esbuild": "^0.25.12", "@types/node": "^25.4.0" },
96
+ "devDependencies": { "esbuild": "^0.27.3", "@types/node": "^25.4.0" },
96
97
  "publishConfig": { "access": "public" },
97
- "gitHead": "86bbe64da57a38d472b37261ca9d113171841a6c"
98
+ "gitHead": "40d1f94407720be23c3801f9145fdad1fe27dfb2"
98
99
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-Br4iCJ5d.d.cts","names":[],"sources":["../src/types/build.ts"],"sourcesContent":[],"mappings":";;;KAoBY,cAAA,GAAiB,KAC3B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-Bw5BbOcS.d.mts","names":[],"sources":["../src/types/build.ts"],"sourcesContent":[],"mappings":";;;KAoBY,cAAA,GAAiB,KAC3B"}
File without changes
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- {"version":3,"file":"bundle-CC14KyoT.d.mts","names":[],"sources":["../src/helpers/bundle.ts"],"sourcesContent":[],"mappings":";;;;;;;AAkCA;;;;;;AAIU,iBAJY,MAAA,CAIZ,OAAA,EAHC,aAGD,EAAA,IAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EADG,OACH,CADW,YACX,CAAA,CAAA,EAAP,OAAO,CAAC,UAAD,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"bundle-CGOgHuWO.d.cts","names":[],"sources":["../src/helpers/bundle.ts"],"sourcesContent":[],"mappings":";;;;;;;AAkCA;;;;;;AAIU,iBAJY,MAAA,CAIZ,OAAA,EAHC,aAGD,EAAA,IAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EADG,OACH,CADW,YACX,CAAA,CAAA,EAAP,OAAO,CAAC,UAAD,CAAA"}
@@ -1,49 +0,0 @@
1
- const require_resolve_options = require('./resolve-options-C3WIGKaG.cjs');
2
- let defu = require("defu");
3
- defu = require_resolve_options.__toESM(defu);
4
- let esbuild = require("esbuild");
5
- let __powerlines_core_lib_unplugin = require("@powerlines/core/lib/unplugin");
6
- let unplugin = require("unplugin");
7
- let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
8
-
9
- //#region src/helpers/bundle.ts
10
- /**
11
- * Bundle a type definition to a module.
12
- *
13
- * @param context - The context object containing the environment paths.
14
- * @param file - The file path to bundle.
15
- * @param overrides - Optional overrides for the ESBuild configuration.
16
- * @returns A promise that resolves to the bundled module.
17
- */
18
- async function bundle(context, file, overrides = {}) {
19
- const path = await context.fs.resolve(file);
20
- if (!path || !context.fs.existsSync(path)) throw new Error(`Module not found: "${file}". Please check the path and try again.`);
21
- const result = await (0, esbuild.build)((0, defu.default)({
22
- ...require_resolve_options.resolveOptions(context),
23
- entryPoints: [path],
24
- write: false,
25
- sourcemap: false,
26
- splitting: false,
27
- treeShaking: true,
28
- bundle: true,
29
- packages: "bundle",
30
- platform: "node",
31
- logLevel: "silent",
32
- ...overrides
33
- }, { plugins: [(0, unplugin.createEsbuildPlugin)((0, __powerlines_core_lib_unplugin.createUnpluginResolver)(context, {
34
- name: `${(0, __stryke_path_file_path_fns.findFileName)(file)} Bundler`,
35
- prefix: false
36
- }))({})] }));
37
- if (result.errors.length > 0) throw new Error(`Failed to bundle ${file}: ${result.errors.map((error) => error.text).join(", ")}`);
38
- if (result.warnings.length > 0) context.warn(`Warnings while bundling ${file}: ${result.warnings.map((warning) => warning.text).join(", ")}`);
39
- if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) throw new Error(`No output files generated for ${file}. Please check the configuration and try again.`);
40
- return result.outputFiles.filter(Boolean)[0];
41
- }
42
-
43
- //#endregion
44
- Object.defineProperty(exports, 'bundle', {
45
- enumerable: true,
46
- get: function () {
47
- return bundle;
48
- }
49
- });
@@ -1,44 +0,0 @@
1
- import { r as resolveOptions } from "./resolve-options-C-213jz6.mjs";
2
- import defu from "defu";
3
- import { build } from "esbuild";
4
- import { createUnpluginResolver } from "@powerlines/core/lib/unplugin";
5
- import { createEsbuildPlugin } from "unplugin";
6
- import { findFileName } from "@stryke/path/file-path-fns";
7
-
8
- //#region src/helpers/bundle.ts
9
- /**
10
- * Bundle a type definition to a module.
11
- *
12
- * @param context - The context object containing the environment paths.
13
- * @param file - The file path to bundle.
14
- * @param overrides - Optional overrides for the ESBuild configuration.
15
- * @returns A promise that resolves to the bundled module.
16
- */
17
- async function bundle(context, file, overrides = {}) {
18
- const path = await context.fs.resolve(file);
19
- if (!path || !context.fs.existsSync(path)) throw new Error(`Module not found: "${file}". Please check the path and try again.`);
20
- const result = await build(defu({
21
- ...resolveOptions(context),
22
- entryPoints: [path],
23
- write: false,
24
- sourcemap: false,
25
- splitting: false,
26
- treeShaking: true,
27
- bundle: true,
28
- packages: "bundle",
29
- platform: "node",
30
- logLevel: "silent",
31
- ...overrides
32
- }, { plugins: [createEsbuildPlugin(createUnpluginResolver(context, {
33
- name: `${findFileName(file)} Bundler`,
34
- prefix: false
35
- }))({})] }));
36
- if (result.errors.length > 0) throw new Error(`Failed to bundle ${file}: ${result.errors.map((error) => error.text).join(", ")}`);
37
- if (result.warnings.length > 0) context.warn(`Warnings while bundling ${file}: ${result.warnings.map((warning) => warning.text).join(", ")}`);
38
- if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) throw new Error(`No output files generated for ${file}. Please check the configuration and try again.`);
39
- return result.outputFiles.filter(Boolean)[0];
40
- }
41
-
42
- //#endregion
43
- export { bundle as t };
44
- //# sourceMappingURL=bundle-Mt5bozRV.mjs.map