@powerlines/plugin-esbuild 0.13.299 → 0.13.300

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 (77) hide show
  1. package/dist/core/src/lib/entry.mjs +22 -0
  2. package/dist/core/src/lib/entry.mjs.map +1 -0
  3. package/dist/core/src/lib/logger.mjs +40 -0
  4. package/dist/core/src/lib/logger.mjs.map +1 -0
  5. package/dist/core/src/lib/unplugin/helpers.mjs +19 -0
  6. package/dist/core/src/lib/unplugin/helpers.mjs.map +1 -0
  7. package/dist/core/src/lib/unplugin/index.mjs +5 -0
  8. package/dist/core/src/lib/unplugin/module-resolution.mjs +66 -0
  9. package/dist/core/src/lib/unplugin/module-resolution.mjs.map +1 -0
  10. package/dist/core/src/lib/unplugin/plugin.mjs +103 -0
  11. package/dist/core/src/lib/unplugin/plugin.mjs.map +1 -0
  12. package/dist/core/src/lib/utilities/source-file.mjs +21 -0
  13. package/dist/core/src/lib/utilities/source-file.mjs.map +1 -0
  14. package/dist/core/src/plugin-utils/paths.mjs +4 -0
  15. package/dist/core/src/types/api.d.mts +103 -0
  16. package/dist/core/src/types/api.d.mts.map +1 -0
  17. package/dist/core/src/types/commands.d.mts +10 -0
  18. package/dist/core/src/types/commands.d.mts.map +1 -0
  19. package/dist/core/src/types/config.d.mts +551 -0
  20. package/dist/core/src/types/config.d.mts.map +1 -0
  21. package/dist/core/src/types/context.d.mts +511 -0
  22. package/dist/core/src/types/context.d.mts.map +1 -0
  23. package/dist/core/src/types/fs.d.mts +487 -0
  24. package/dist/core/src/types/fs.d.mts.map +1 -0
  25. package/dist/core/src/types/hooks.d.mts +99 -0
  26. package/dist/core/src/types/hooks.d.mts.map +1 -0
  27. package/dist/core/src/types/index.d.mts +9 -0
  28. package/dist/core/src/types/plugin.d.mts +204 -0
  29. package/dist/core/src/types/plugin.d.mts.map +1 -0
  30. package/dist/core/src/types/tsconfig.d.mts +70 -0
  31. package/dist/core/src/types/tsconfig.d.mts.map +1 -0
  32. package/dist/core/src/types/unplugin.d.mts +25 -0
  33. package/dist/core/src/types/unplugin.d.mts.map +1 -0
  34. package/dist/core/src/types/unplugin.mjs +22 -0
  35. package/dist/core/src/types/unplugin.mjs.map +1 -0
  36. package/dist/helpers/bundle.d.mts +17 -0
  37. package/dist/helpers/bundle.d.mts.map +1 -0
  38. package/dist/helpers/bundle.mjs +42 -0
  39. package/dist/helpers/bundle.mjs.map +1 -0
  40. package/dist/helpers/index.d.mts +5 -2
  41. package/dist/helpers/index.mjs +5 -2
  42. package/dist/helpers/resolve-options.d.mts +25 -0
  43. package/dist/helpers/resolve-options.d.mts.map +1 -0
  44. package/dist/helpers/resolve-options.mjs +87 -0
  45. package/dist/helpers/resolve-options.mjs.map +1 -0
  46. package/dist/helpers/resolve.d.mts +28 -0
  47. package/dist/helpers/resolve.d.mts.map +1 -0
  48. package/dist/helpers/resolve.mjs +62 -0
  49. package/dist/helpers/resolve.mjs.map +1 -0
  50. package/dist/helpers/unplugin.d.mts +3 -3
  51. package/dist/helpers/unplugin.mjs +6 -5
  52. package/dist/helpers/unplugin.mjs.map +1 -1
  53. package/dist/index.d.mts +10 -5
  54. package/dist/index.d.mts.map +1 -1
  55. package/dist/index.mjs +8 -6
  56. package/dist/index.mjs.map +1 -1
  57. package/dist/types/build.d.mts +8 -0
  58. package/dist/types/build.d.mts.map +1 -0
  59. package/dist/types/build.mjs +1 -0
  60. package/dist/types/index.d.mts +3 -2
  61. package/dist/types/plugin.d.mts +17 -10
  62. package/dist/types/plugin.d.mts.map +1 -1
  63. package/package.json +28 -93
  64. package/dist/_virtual/rolldown_runtime.cjs +0 -29
  65. package/dist/helpers/index.cjs +0 -3
  66. package/dist/helpers/index.d.cts +0 -2
  67. package/dist/helpers/unplugin.cjs +0 -11
  68. package/dist/helpers/unplugin.d.cts +0 -8
  69. package/dist/helpers/unplugin.d.cts.map +0 -1
  70. package/dist/index.cjs +0 -40
  71. package/dist/index.d.cts +0 -14
  72. package/dist/index.d.cts.map +0 -1
  73. package/dist/types/index.cjs +0 -0
  74. package/dist/types/index.d.cts +0 -2
  75. package/dist/types/plugin.cjs +0 -0
  76. package/dist/types/plugin.d.cts +0 -14
  77. package/dist/types/plugin.d.cts.map +0 -1
@@ -0,0 +1,62 @@
1
+ import { bundle } from "./bundle.mjs";
2
+ import { parseTypeDefinition } from "@stryke/convert/parse-type-definition";
3
+ import { isSetString } from "@stryke/type-checks/is-set-string";
4
+
5
+ //#region src/helpers/resolve.ts
6
+ /**
7
+ * Compiles a type definition to a module and returns the module.
8
+ *
9
+ * @param context - The context object containing the environment paths.
10
+ * @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.
11
+ * @param overrides - Optional overrides for the ESBuild configuration.
12
+ * @returns A promise that resolves to the compiled module.
13
+ */
14
+ async function resolveModule(context, type, overrides = {}) {
15
+ let typeDefinition;
16
+ if (isSetString(type)) typeDefinition = parseTypeDefinition(type);
17
+ else typeDefinition = type;
18
+ const result = await bundle(context, typeDefinition.file, overrides);
19
+ let resolved;
20
+ try {
21
+ resolved = await context.resolver.evalModule(result.text, {
22
+ filename: result.path,
23
+ forceTranspile: true
24
+ });
25
+ } catch (error) {
26
+ if (isSetString(error.message) && (/* @__PURE__ */ new RegExp(`Cannot find module '${context.config.framework || "powerlines"}:.*'`)).test(error.message)) {
27
+ const moduleName = error.message.match(/* @__PURE__ */ new RegExp(`Cannot find module '(${context.config.framework || "powerlines"}:.*)'`))?.[1];
28
+ throw new Error(`The module "${moduleName}" could not be resolved while evaluating "${typeDefinition.file}". It is possible the required built-in modules have not yet been generated. Please check the order of your plugins. ${context.config.logLevel === "debug" || context.config.logLevel === "trace" ? `
29
+
30
+ Bundle output for module:
31
+ ${result.text}` : ""}`);
32
+ }
33
+ throw new Error(`Failed to evaluate the bundled module for "${typeDefinition.file}". Error: ${error.message}${context.config.logLevel === "debug" || context.config.logLevel === "trace" ? `
34
+
35
+ Bundle output for module:
36
+ ${result.text}` : ""}`);
37
+ }
38
+ return resolved;
39
+ }
40
+ /**
41
+ * Compiles a type definition to a module and returns the specified export from the module.
42
+ *
43
+ * @param context - The context object containing the environment paths.
44
+ * @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.
45
+ * @param overrides - Optional overrides for the ESBuild configuration.
46
+ * @returns A promise that resolves to the compiled module.
47
+ */
48
+ async function resolve(context, type, overrides = {}) {
49
+ let typeDefinition;
50
+ if (isSetString(type)) typeDefinition = parseTypeDefinition(type);
51
+ else typeDefinition = type;
52
+ const resolved = await resolveModule(context, typeDefinition, overrides);
53
+ let exportName = typeDefinition.name;
54
+ if (!exportName) exportName = "default";
55
+ const resolvedExport = resolved[exportName] ?? resolved[`__Ω${exportName}`];
56
+ if (resolvedExport === void 0) throw new Error(`The export "${exportName}" could not be resolved in the "${typeDefinition.file}" module. ${Object.keys(resolved).length === 0 ? `After bundling, no exports were found in the module. Please ensure that the "${typeDefinition.file}" module has a "${exportName}" export with the desired value.` : `After bundling, the available exports were: ${Object.keys(resolved).join(", ")}. Please ensure that the export exists and is correctly named.`}`);
57
+ return resolvedExport;
58
+ }
59
+
60
+ //#endregion
61
+ export { resolve, resolveModule };
62
+ //# sourceMappingURL=resolve.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.mjs","names":["typeDefinition!: TypeDefinition","resolved: any"],"sources":["../../src/helpers/resolve.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 { PluginContext } from \"@powerlines/core/types\";\nimport { bundle } from \"@powerlines/plugin-esbuild/helpers/bundle\";\nimport { parseTypeDefinition } from \"@stryke/convert/parse-type-definition\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport {\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport { BuildOptions } from \"esbuild\";\n\n/**\n * Compiles a type definition to a module and returns the module.\n *\n * @param context - The context object containing the environment paths.\n * @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.\n * @param overrides - Optional overrides for the ESBuild configuration.\n * @returns A promise that resolves to the compiled module.\n */\nexport async function resolveModule<TResult>(\n context: PluginContext,\n type: TypeDefinitionParameter,\n overrides: Partial<BuildOptions> = {}\n): Promise<TResult> {\n let typeDefinition!: TypeDefinition;\n if (isSetString(type)) {\n typeDefinition = parseTypeDefinition(type) as TypeDefinition;\n } else {\n typeDefinition = type;\n }\n\n const result = await bundle(context, typeDefinition.file, overrides);\n\n let resolved: any;\n try {\n resolved = await context.resolver.evalModule(result.text, {\n filename: result.path,\n forceTranspile: true\n });\n } catch (error) {\n if (\n isSetString((error as Error).message) &&\n new RegExp(\n `Cannot find module '${context.config.framework || \"powerlines\"}:.*'`\n ).test((error as Error).message)\n ) {\n const moduleName = (error as Error).message.match(\n new RegExp(\n `Cannot find module '(${context.config.framework || \"powerlines\"}:.*)'`\n )\n )?.[1];\n throw new Error(\n `The module \"${moduleName}\" could not be resolved while evaluating \"${\n typeDefinition.file\n }\". It is possible the required built-in modules have not yet been generated. Please check the order of your plugins. ${\n context.config.logLevel === \"debug\" ||\n context.config.logLevel === \"trace\"\n ? `\n\nBundle output for module:\n${result.text}`\n : \"\"\n }`\n );\n }\n\n throw new Error(\n `Failed to evaluate the bundled module for \"${\n typeDefinition.file\n }\". Error: ${(error as Error).message}${\n context.config.logLevel === \"debug\" ||\n context.config.logLevel === \"trace\"\n ? `\n\nBundle output for module:\n${result.text}`\n : \"\"\n }`\n );\n }\n\n return resolved;\n}\n\n/**\n * Compiles a type definition to a module and returns the specified export from the module.\n *\n * @param context - The context object containing the environment paths.\n * @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.\n * @param overrides - Optional overrides for the ESBuild configuration.\n * @returns A promise that resolves to the compiled module.\n */\nexport async function resolve<TResult>(\n context: PluginContext,\n type: TypeDefinitionParameter,\n overrides: Partial<BuildOptions> = {}\n): Promise<TResult> {\n let typeDefinition!: TypeDefinition;\n if (isSetString(type)) {\n typeDefinition = parseTypeDefinition(type) as TypeDefinition;\n } else {\n typeDefinition = type;\n }\n\n const resolved = await resolveModule<Record<string, any>>(\n context,\n typeDefinition,\n overrides\n );\n\n let exportName = typeDefinition.name;\n if (!exportName) {\n exportName = \"default\";\n }\n\n const resolvedExport = resolved[exportName] ?? resolved[`__Ω${exportName}`];\n if (resolvedExport === undefined) {\n throw new Error(\n `The export \"${exportName}\" could not be resolved in the \"${\n typeDefinition.file\n }\" module. ${\n Object.keys(resolved).length === 0\n ? `After bundling, no exports were found in the module. Please ensure that the \"${\n typeDefinition.file\n }\" module has a \"${exportName}\" export with the desired value.`\n : `After bundling, the available exports were: ${Object.keys(\n resolved\n ).join(\n \", \"\n )}. Please ensure that the export exists and is correctly named.`\n }`\n );\n }\n\n return resolvedExport;\n}\n"],"mappings":";;;;;;;;;;;;;AAoCA,eAAsB,cACpB,SACA,MACA,YAAmC,EAAE,EACnB;CAClB,IAAIA;AACJ,KAAI,YAAY,KAAK,CACnB,kBAAiB,oBAAoB,KAAK;KAE1C,kBAAiB;CAGnB,MAAM,SAAS,MAAM,OAAO,SAAS,eAAe,MAAM,UAAU;CAEpE,IAAIC;AACJ,KAAI;AACF,aAAW,MAAM,QAAQ,SAAS,WAAW,OAAO,MAAM;GACxD,UAAU,OAAO;GACjB,gBAAgB;GACjB,CAAC;UACK,OAAO;AACd,MACE,YAAa,MAAgB,QAAQ,qBACrC,IAAI,OACF,uBAAuB,QAAQ,OAAO,aAAa,aAAa,MACjE,EAAC,KAAM,MAAgB,QAAQ,EAChC;GACA,MAAM,aAAc,MAAgB,QAAQ,sBAC1C,IAAI,OACF,wBAAwB,QAAQ,OAAO,aAAa,aAAa,OAClE,CACF,GAAG;AACJ,SAAM,IAAI,MACR,eAAe,WAAW,4CACxB,eAAe,KAChB,uHACC,QAAQ,OAAO,aAAa,WAC5B,QAAQ,OAAO,aAAa,UACxB;;;EAGZ,OAAO,SACK,KAEP;;AAGH,QAAM,IAAI,MACR,8CACE,eAAe,KAChB,YAAa,MAAgB,UAC5B,QAAQ,OAAO,aAAa,WAC5B,QAAQ,OAAO,aAAa,UACxB;;;EAGV,OAAO,SACG,KAEP;;AAGH,QAAO;;;;;;;;;;AAWT,eAAsB,QACpB,SACA,MACA,YAAmC,EAAE,EACnB;CAClB,IAAID;AACJ,KAAI,YAAY,KAAK,CACnB,kBAAiB,oBAAoB,KAAK;KAE1C,kBAAiB;CAGnB,MAAM,WAAW,MAAM,cACrB,SACA,gBACA,UACD;CAED,IAAI,aAAa,eAAe;AAChC,KAAI,CAAC,WACH,cAAa;CAGf,MAAM,iBAAiB,SAAS,eAAe,SAAS,MAAM;AAC9D,KAAI,mBAAmB,OACrB,OAAM,IAAI,MACR,eAAe,WAAW,kCACxB,eAAe,KAChB,YACC,OAAO,KAAK,SAAS,CAAC,WAAW,IAC7B,gFACE,eAAe,KAChB,kBAAkB,WAAW,oCAC9B,+CAA+C,OAAO,KACpD,SACD,CAAC,KACA,KACD,CAAC,kEAET;AAGH,QAAO"}
@@ -1,8 +1,8 @@
1
- import { ESBuildPluginContext } from "../types/plugin.mjs";
1
+ import { EsbuildPluginContext } from "../types/plugin.mjs";
2
2
  import * as esbuild0 from "esbuild";
3
3
 
4
4
  //#region src/helpers/unplugin.d.ts
5
- declare function createESBuildPlugin(context: ESBuildPluginContext): esbuild0.Plugin;
5
+ declare function createEsbuildPlugin(context: EsbuildPluginContext): esbuild0.Plugin;
6
6
  //#endregion
7
- export { createESBuildPlugin };
7
+ export { createEsbuildPlugin };
8
8
  //# sourceMappingURL=unplugin.d.mts.map
@@ -1,11 +1,12 @@
1
- import { createUnplugin } from "powerlines/lib/unplugin";
2
- import { createEsbuildPlugin } from "unplugin";
1
+ import { createUnplugin } from "../core/src/lib/unplugin/plugin.mjs";
2
+ import "../core/src/lib/unplugin/index.mjs";
3
+ import { createEsbuildPlugin as createEsbuildPlugin$1 } from "unplugin";
3
4
 
4
5
  //#region src/helpers/unplugin.ts
5
- function createESBuildPlugin(context) {
6
- return createEsbuildPlugin(createUnplugin(context))({});
6
+ function createEsbuildPlugin(context) {
7
+ return createEsbuildPlugin$1(createUnplugin(context))({});
7
8
  }
8
9
 
9
10
  //#endregion
10
- export { createESBuildPlugin };
11
+ export { createEsbuildPlugin };
11
12
  //# sourceMappingURL=unplugin.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"unplugin.mjs","names":[],"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/lib/unplugin\";\nimport { createEsbuildPlugin } from \"unplugin\";\nimport { ESBuildPluginContext } from \"../types/plugin\";\n\nexport function createESBuildPlugin(context: ESBuildPluginContext) {\n return createEsbuildPlugin(createUnplugin(context))({});\n}\n"],"mappings":";;;;AAsBA,SAAgB,oBAAoB,SAA+B;AACjE,QAAO,oBAAoB,eAAe,QAAQ,CAAC,CAAC,EAAE,CAAC"}
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.d.mts CHANGED
@@ -1,14 +1,19 @@
1
- import { ESBuildPluginContext, ESBuildPluginOptions, ESBuildPluginResolvedConfig, __ΩESBuildPluginContext, __ΩESBuildPluginOptions, __ΩESBuildPluginResolvedConfig } from "./types/plugin.mjs";
2
- import { createESBuildPlugin } from "./helpers/unplugin.mjs";
1
+ import { Plugin } from "./core/src/types/plugin.mjs";
2
+ import { bundle } from "./helpers/bundle.mjs";
3
+ import "./core/src/types/index.mjs";
4
+ import { resolve, resolveModule } from "./helpers/resolve.mjs";
5
+ import { DEFAULT_ESBUILD_CONFIG, resolveEntry, resolveOptions } from "./helpers/resolve-options.mjs";
6
+ import { EsbuildOptions, __ΩEsbuildOptions } from "./types/build.mjs";
7
+ import { EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig } from "./types/plugin.mjs";
8
+ import { createEsbuildPlugin } from "./helpers/unplugin.mjs";
3
9
  import "./helpers/index.mjs";
4
10
  import "./types/index.mjs";
5
- import { Plugin } from "powerlines/types/plugin";
6
11
 
7
12
  //#region src/index.d.ts
8
13
  /**
9
14
  * A Powerlines plugin to assist in developing other Powerlines plugins.
10
15
  */
11
- declare const plugin: <TContext extends ESBuildPluginContext = ESBuildPluginContext>(options?: ESBuildPluginOptions) => Plugin<TContext>;
16
+ declare const plugin: <TContext extends EsbuildPluginContext = EsbuildPluginContext>(options?: EsbuildPluginOptions) => Plugin<TContext>;
12
17
  //#endregion
13
- export { ESBuildPluginContext, ESBuildPluginOptions, ESBuildPluginResolvedConfig, __ΩESBuildPluginContext, __ΩESBuildPluginOptions, __ΩESBuildPluginResolvedConfig, createESBuildPlugin, plugin as default, plugin };
18
+ export { DEFAULT_ESBUILD_CONFIG, EsbuildOptions, EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildOptions, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig, bundle, createEsbuildPlugin, plugin as default, plugin, resolve, resolveEntry, resolveModule, resolveOptions };
14
19
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAoCa,cAAA,MA+BZ,EAAA,CAAA,iBA9BkB,oBA8BlB,GA9ByC,oBA8BzC,CAAA,CAAA,OAAA,CAAA,EA5BU,oBA4BV,EAAA,GA3BE,MA2BF,CA3BS,QA2BT,CAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;cAuCa,0BACM,uBAAuB,gCAE/B,yBACR,OAAO"}
package/dist/index.mjs CHANGED
@@ -1,8 +1,10 @@
1
- import { createESBuildPlugin } from "./helpers/unplugin.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";
2
5
  import "./helpers/index.mjs";
3
6
  import defu from "defu";
4
7
  import { build } from "esbuild";
5
- import { DEFAULT_ESBUILD_CONFIG, extractESBuildConfig, resolveESBuildEntry } from "powerlines/lib/build/esbuild";
6
8
 
7
9
  //#region src/index.ts
8
10
  /**
@@ -23,14 +25,14 @@ const plugin = (options = {}) => {
23
25
  },
24
26
  async build() {
25
27
  await build(defu({
26
- entryPoints: resolveESBuildEntry(this, this.entry),
27
- plugins: [createESBuildPlugin(this)]
28
- }, extractESBuildConfig(this)));
28
+ entryPoints: resolveEntry(this, this.entry),
29
+ plugins: [createEsbuildPlugin(this)]
30
+ }, resolveOptions(this)));
29
31
  }
30
32
  };
31
33
  };
32
34
  var src_default = plugin;
33
35
 
34
36
  //#endregion
35
- export { createESBuildPlugin, src_default as default, plugin };
37
+ export { DEFAULT_ESBUILD_CONFIG, bundle, createEsbuildPlugin, src_default as default, plugin, resolve, resolveEntry, resolveModule, resolveOptions };
36
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 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":";;;;;;;;;;AAoCA,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,oBAAoB,MAAM,KAAK,MAAM;IAClD,SAAS,CAAC,oBAAoB,KAAK,CAAC;IACrC,EACD,qBAAqB,KAAK,CAC3B,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/types\";\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\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":";;;;;;;;;;;;AAuCA,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"}
@@ -0,0 +1,8 @@
1
+ import { BuildOptions } from "esbuild";
2
+
3
+ //#region src/types/build.d.ts
4
+ type EsbuildOptions = Omit<BuildOptions, "entryPoints" | "platform" | "outdir" | "env" | "assets" | "external" | "inject" | "tsconfig" | "tsconfigRaw" | "logLevel">;
5
+ declare type __ΩEsbuildOptions = any[];
6
+ //#endregion
7
+ export { EsbuildOptions, __ΩEsbuildOptions };
8
+ //# sourceMappingURL=build.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.mts","names":[],"sources":["../../src/types/build.ts"],"sourcesContent":[],"mappings":";;;KAoBY,cAAA,GAAiB,KAC3B"}
@@ -0,0 +1 @@
1
+ export { };
@@ -1,2 +1,3 @@
1
- import { ESBuildPluginContext, ESBuildPluginOptions, ESBuildPluginResolvedConfig, __ΩESBuildPluginContext, __ΩESBuildPluginOptions, __ΩESBuildPluginResolvedConfig } from "./plugin.mjs";
2
- export { ESBuildPluginContext, ESBuildPluginOptions, ESBuildPluginResolvedConfig, __ΩESBuildPluginContext, __ΩESBuildPluginOptions, __ΩESBuildPluginResolvedConfig };
1
+ import { EsbuildOptions, __ΩEsbuildOptions } from "./build.mjs";
2
+ import { EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig } from "./plugin.mjs";
3
+ export { EsbuildOptions, EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildOptions, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig };
@@ -1,14 +1,21 @@
1
- import { ESBuildBuildConfig } from "powerlines/types/build";
2
- import { PluginContext } from "powerlines/types/context";
3
- import { ESBuildResolvedConfig } from "powerlines/types/resolved";
1
+ import { ResolvedConfig, UserConfig } from "../core/src/types/config.mjs";
2
+ import { PluginContext } from "../core/src/types/context.mjs";
3
+ import "../core/src/types/index.mjs";
4
+ import { EsbuildOptions } from "./build.mjs";
4
5
 
5
6
  //#region src/types/plugin.d.ts
6
- type ESBuildPluginOptions = Partial<ESBuildBuildConfig>;
7
- type ESBuildPluginResolvedConfig = ESBuildResolvedConfig;
8
- type ESBuildPluginContext<TResolvedConfig extends ESBuildPluginResolvedConfig = ESBuildPluginResolvedConfig> = PluginContext<TResolvedConfig>;
9
- declare type __ΩESBuildPluginOptions = any[];
10
- declare type __ΩESBuildPluginResolvedConfig = any[];
11
- declare type __ΩESBuildPluginContext = any[];
7
+ type EsbuildPluginOptions = Partial<EsbuildOptions>;
8
+ interface EsbuildPluginUserConfig extends UserConfig {
9
+ esbuild?: EsbuildPluginOptions;
10
+ }
11
+ interface EsbuildPluginResolvedConfig extends ResolvedConfig {
12
+ esbuild: EsbuildOptions;
13
+ }
14
+ type EsbuildPluginContext<TResolvedConfig extends EsbuildPluginResolvedConfig = EsbuildPluginResolvedConfig> = PluginContext<TResolvedConfig>;
15
+ declare type __ΩEsbuildPluginOptions = any[];
16
+ declare type __ΩEsbuildPluginUserConfig = any[];
17
+ declare type __ΩEsbuildPluginResolvedConfig = any[];
18
+ declare type __ΩEsbuildPluginContext = any[];
12
19
  //#endregion
13
- export { ESBuildPluginContext, ESBuildPluginOptions, ESBuildPluginResolvedConfig, __ΩESBuildPluginContext, __ΩESBuildPluginOptions, __ΩESBuildPluginResolvedConfig };
20
+ export { EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig };
14
21
  //# sourceMappingURL=plugin.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;KAsBY,oBAAA,GAAuB,QAAQ;KAE/B,2BAAA,GAA8B;AAF9B,KAIA,oBAJoB,CAAA,wBAM5B,2BANsC,GAMR,2BANQ,CAAA,GAOtC,aAPsC,CAOxB,eAPwB,CAAA;AAE9B,uCAA8B,GAAA,EAAA;AAE9B,8CAAoB,GAAA,EAAA;AAE5B,uCAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;KAyBY,oBAAA,GAAuB,QAAQ;UAE1B,uBAAA,SAAgC;YACrC;;AAHA,UAMK,2BAAA,SAAoC,cANX,CAAA;EAEzB,OAAA,EAKN,cALM;AAIjB;AAIY,KAAA,oBAAoB,CAAA,wBACN,2BADM,GAE5B,2BAF4B,CAAA,GAG5B,aAH4B,CAGd,eAHc,CAAA;AACN,uCAAA,GAAA,EAAA;AACtB,0CAAA,GAAA,EAAA;AACc,8CAAA,GAAA,EAAA;AAAd,uCAAA,GAAA,EAAA"}
package/package.json CHANGED
@@ -1,18 +1,24 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-esbuild",
3
- "version": "0.13.299",
4
- "type": "module",
3
+ "version": "0.13.300",
4
+ "private": false,
5
5
  "description": "A package containing a Powerlines plugin to build projects using esbuild.",
6
+ "keywords": ["esbuild", "powerlines", "storm-software", "powerlines-plugin"],
7
+ "homepage": "https://stormsoftware.com",
8
+ "bugs": {
9
+ "url": "https://stormsoftware.com/support",
10
+ "email": "support@stormsoftware.com"
11
+ },
6
12
  "repository": {
7
13
  "type": "github",
8
14
  "url": "https://github.com/storm-software/powerlines.git",
9
15
  "directory": "packages/plugin-esbuild"
10
16
  },
11
- "homepage": "https://stormsoftware.com",
12
- "bugs": {
13
- "url": "https://stormsoftware.com/support",
14
- "email": "support@stormsoftware.com"
17
+ "funding": {
18
+ "type": "github",
19
+ "url": "https://github.com/sponsors/storm-software"
15
20
  },
21
+ "license": "Apache-2.0",
16
22
  "author": {
17
23
  "name": "Storm Software",
18
24
  "email": "contact@stormsoftware.com",
@@ -32,90 +38,24 @@
32
38
  "url": "https://stormsoftware.com"
33
39
  }
34
40
  ],
35
- "funding": {
36
- "type": "github",
37
- "url": "https://github.com/sponsors/storm-software"
38
- },
39
- "license": "Apache-2.0",
40
- "private": false,
41
- "main": "./dist/index.cjs",
42
- "module": "./dist/index.mjs",
41
+ "type": "module",
43
42
  "exports": {
44
- ".": {
45
- "require": {
46
- "types": "./dist/index.d.cts",
47
- "default": "./dist/index.cjs"
48
- },
49
- "import": {
50
- "types": "./dist/index.d.mts",
51
- "default": "./dist/index.mjs"
52
- },
53
- "default": {
54
- "types": "./dist/index.d.mts",
55
- "default": "./dist/index.mjs"
56
- }
57
- },
58
- "./helpers": {
59
- "require": {
60
- "types": "./dist/helpers/index.d.cts",
61
- "default": "./dist/helpers/index.cjs"
62
- },
63
- "import": {
64
- "types": "./dist/helpers/index.d.mts",
65
- "default": "./dist/helpers/index.mjs"
66
- },
67
- "default": {
68
- "types": "./dist/helpers/index.d.mts",
69
- "default": "./dist/helpers/index.mjs"
70
- }
71
- },
72
- "./helpers/unplugin": {
73
- "require": {
74
- "types": "./dist/helpers/unplugin.d.cts",
75
- "default": "./dist/helpers/unplugin.cjs"
76
- },
77
- "import": {
78
- "types": "./dist/helpers/unplugin.d.mts",
79
- "default": "./dist/helpers/unplugin.mjs"
80
- },
81
- "default": {
82
- "types": "./dist/helpers/unplugin.d.mts",
83
- "default": "./dist/helpers/unplugin.mjs"
84
- }
85
- },
86
- "./package.json": "./package.json",
87
- "./types": {
88
- "require": {
89
- "types": "./dist/types/index.d.cts",
90
- "default": "./dist/types/index.cjs"
91
- },
92
- "import": {
93
- "types": "./dist/types/index.d.mts",
94
- "default": "./dist/types/index.mjs"
95
- },
96
- "default": {
97
- "types": "./dist/types/index.d.mts",
98
- "default": "./dist/types/index.mjs"
99
- }
100
- },
101
- "./types/plugin": {
102
- "require": {
103
- "types": "./dist/types/plugin.d.cts",
104
- "default": "./dist/types/plugin.cjs"
105
- },
106
- "import": {
107
- "types": "./dist/types/plugin.d.mts",
108
- "default": "./dist/types/plugin.mjs"
109
- },
110
- "default": {
111
- "types": "./dist/types/plugin.d.mts",
112
- "default": "./dist/types/plugin.mjs"
113
- }
114
- }
43
+ ".": "./dist/index.mjs",
44
+ "./helpers": "./dist/helpers/index.mjs",
45
+ "./helpers/bundle": "./dist/helpers/bundle.mjs",
46
+ "./helpers/resolve": "./dist/helpers/resolve.mjs",
47
+ "./helpers/resolve-options": "./dist/helpers/resolve-options.mjs",
48
+ "./helpers/unplugin": "./dist/helpers/unplugin.mjs",
49
+ "./types": "./dist/types/index.mjs",
50
+ "./types/build": "./dist/types/build.mjs",
51
+ "./types/plugin": "./dist/types/plugin.mjs",
52
+ "./*": "./*"
115
53
  },
54
+ "main": "./dist/index.mjs",
55
+ "module": "./dist/index.mjs",
56
+ "types": "./dist/index.d.mts",
116
57
  "typings": "dist/index.d.mts",
117
58
  "files": ["dist/**/*"],
118
- "keywords": ["esbuild", "powerlines", "storm-software", "powerlines-plugin"],
119
59
  "dependencies": {
120
60
  "@stryke/fs": "^0.33.43",
121
61
  "@stryke/path": "^0.26.6",
@@ -124,14 +64,9 @@
124
64
  "defu": "^6.1.4",
125
65
  "esbuild": "^0.25.12",
126
66
  "jiti": "^2.6.1",
127
- "powerlines": "^0.38.57",
128
67
  "unplugin": "3.0.0-beta.3"
129
68
  },
130
- "devDependencies": {
131
- "@powerlines/plugin-plugin": "^0.12.241",
132
- "@types/node": "^25.3.1"
133
- },
69
+ "devDependencies": { "@types/node": "^25.3.2" },
134
70
  "publishConfig": { "access": "public" },
135
- "types": "./dist/index.d.cts",
136
- "gitHead": "eb3dbd19bd153aa5a988bce09a1cf05d985cb04b"
71
+ "gitHead": "0dcb16f054b8a69915b074578e6d4dfa3ecc1529"
137
72
  }
@@ -1,29 +0,0 @@
1
- //#region rolldown:runtime
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") {
10
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
- key = keys[i];
12
- if (!__hasOwnProp.call(to, key) && key !== except) {
13
- __defProp(to, key, {
14
- get: ((k) => from[k]).bind(null, key),
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- }
19
- }
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
- value: mod,
24
- enumerable: true
25
- }) : target, mod));
26
-
27
- //#endregion
28
-
29
- exports.__toESM = __toESM;
@@ -1,3 +0,0 @@
1
- const require_helpers_unplugin = require('./unplugin.cjs');
2
-
3
- exports.createESBuildPlugin = require_helpers_unplugin.createESBuildPlugin;
@@ -1,2 +0,0 @@
1
- import { createESBuildPlugin } from "./unplugin.cjs";
2
- export { createESBuildPlugin };
@@ -1,11 +0,0 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- let powerlines_lib_unplugin = require("powerlines/lib/unplugin");
3
- let unplugin = require("unplugin");
4
-
5
- //#region src/helpers/unplugin.ts
6
- function createESBuildPlugin(context) {
7
- return (0, unplugin.createEsbuildPlugin)((0, powerlines_lib_unplugin.createUnplugin)(context))({});
8
- }
9
-
10
- //#endregion
11
- exports.createESBuildPlugin = createESBuildPlugin;
@@ -1,8 +0,0 @@
1
- import { ESBuildPluginContext } from "../types/plugin.cjs";
2
- import * as esbuild0 from "esbuild";
3
-
4
- //#region src/helpers/unplugin.d.ts
5
- declare function createESBuildPlugin(context: ESBuildPluginContext): esbuild0.Plugin;
6
- //#endregion
7
- export { createESBuildPlugin };
8
- //# sourceMappingURL=unplugin.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unplugin.d.cts","names":[],"sources":["../../src/helpers/unplugin.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,mBAAA,UAA6B,uBAAoB,QAAA,CAAA"}
package/dist/index.cjs DELETED
@@ -1,40 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
3
- const require_helpers_unplugin = require('./helpers/unplugin.cjs');
4
- require('./helpers/index.cjs');
5
- let defu = require("defu");
6
- defu = require_rolldown_runtime.__toESM(defu);
7
- let esbuild = require("esbuild");
8
- let powerlines_lib_build_esbuild = require("powerlines/lib/build/esbuild");
9
-
10
- //#region src/index.ts
11
- /**
12
- * A Powerlines plugin to assist in developing other Powerlines plugins.
13
- */
14
- const plugin = (options = {}) => {
15
- return {
16
- name: "esbuild",
17
- config() {
18
- return {
19
- output: { format: ["esm"] },
20
- build: {
21
- ...powerlines_lib_build_esbuild.DEFAULT_ESBUILD_CONFIG,
22
- ...options,
23
- variant: "esbuild"
24
- }
25
- };
26
- },
27
- async build() {
28
- await (0, esbuild.build)((0, defu.default)({
29
- entryPoints: (0, powerlines_lib_build_esbuild.resolveESBuildEntry)(this, this.entry),
30
- plugins: [require_helpers_unplugin.createESBuildPlugin(this)]
31
- }, (0, powerlines_lib_build_esbuild.extractESBuildConfig)(this)));
32
- }
33
- };
34
- };
35
- var src_default = plugin;
36
-
37
- //#endregion
38
- exports.createESBuildPlugin = require_helpers_unplugin.createESBuildPlugin;
39
- exports.default = src_default;
40
- exports.plugin = plugin;
package/dist/index.d.cts DELETED
@@ -1,14 +0,0 @@
1
- import { ESBuildPluginContext, ESBuildPluginOptions, ESBuildPluginResolvedConfig, __ΩESBuildPluginContext, __ΩESBuildPluginOptions, __ΩESBuildPluginResolvedConfig } from "./types/plugin.cjs";
2
- import { createESBuildPlugin } from "./helpers/unplugin.cjs";
3
- import "./helpers/index.cjs";
4
- import "./types/index.cjs";
5
- import { Plugin } from "powerlines/types/plugin";
6
-
7
- //#region src/index.d.ts
8
- /**
9
- * A Powerlines plugin to assist in developing other Powerlines plugins.
10
- */
11
- declare const plugin: <TContext extends ESBuildPluginContext = ESBuildPluginContext>(options?: ESBuildPluginOptions) => Plugin<TContext>;
12
- //#endregion
13
- export { ESBuildPluginContext, ESBuildPluginOptions, ESBuildPluginResolvedConfig, __ΩESBuildPluginContext, __ΩESBuildPluginOptions, __ΩESBuildPluginResolvedConfig, createESBuildPlugin, plugin as default, plugin };
14
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAoCa,cAAA,MA+BZ,EAAA,CAAA,iBA9BkB,oBA8BlB,GA9ByC,oBA8BzC,CAAA,CAAA,OAAA,CAAA,EA5BU,oBA4BV,EAAA,GA3BE,MA2BF,CA3BS,QA2BT,CAAA"}
File without changes
@@ -1,2 +0,0 @@
1
- import { ESBuildPluginContext, ESBuildPluginOptions, ESBuildPluginResolvedConfig, __ΩESBuildPluginContext, __ΩESBuildPluginOptions, __ΩESBuildPluginResolvedConfig } from "./plugin.cjs";
2
- export { ESBuildPluginContext, ESBuildPluginOptions, ESBuildPluginResolvedConfig, __ΩESBuildPluginContext, __ΩESBuildPluginOptions, __ΩESBuildPluginResolvedConfig };
File without changes
@@ -1,14 +0,0 @@
1
- import { ESBuildBuildConfig } from "powerlines/types/build";
2
- import { PluginContext } from "powerlines/types/context";
3
- import { ESBuildResolvedConfig } from "powerlines/types/resolved";
4
-
5
- //#region src/types/plugin.d.ts
6
- type ESBuildPluginOptions = Partial<ESBuildBuildConfig>;
7
- type ESBuildPluginResolvedConfig = ESBuildResolvedConfig;
8
- type ESBuildPluginContext<TResolvedConfig extends ESBuildPluginResolvedConfig = ESBuildPluginResolvedConfig> = PluginContext<TResolvedConfig>;
9
- declare type __ΩESBuildPluginOptions = any[];
10
- declare type __ΩESBuildPluginResolvedConfig = any[];
11
- declare type __ΩESBuildPluginContext = any[];
12
- //#endregion
13
- export { ESBuildPluginContext, ESBuildPluginOptions, ESBuildPluginResolvedConfig, __ΩESBuildPluginContext, __ΩESBuildPluginOptions, __ΩESBuildPluginResolvedConfig };
14
- //# sourceMappingURL=plugin.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;KAsBY,oBAAA,GAAuB,QAAQ;KAE/B,2BAAA,GAA8B;AAF9B,KAIA,oBAJoB,CAAA,wBAM5B,2BANsC,GAMR,2BANQ,CAAA,GAOtC,aAPsC,CAOxB,eAPwB,CAAA;AAE9B,uCAA8B,GAAA,EAAA;AAE9B,8CAAoB,GAAA,EAAA;AAE5B,uCAAA,GAAA,EAAA"}