@powerlines/plugin-esbuild 0.13.350 → 0.13.351

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 (65) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +29 -0
  2. package/dist/helpers/bundle.cjs +4 -3
  3. package/dist/helpers/bundle.d.cts +16 -2
  4. package/dist/helpers/bundle.d.cts.map +1 -0
  5. package/dist/helpers/bundle.d.mts +16 -2
  6. package/dist/helpers/bundle.d.mts.map +1 -0
  7. package/dist/helpers/index.cjs +4 -4
  8. package/dist/helpers/index.d.cts +4 -4
  9. package/dist/helpers/index.d.mts +4 -4
  10. package/dist/helpers/resolve-options.cjs +89 -4
  11. package/dist/helpers/resolve-options.d.cts +23 -2
  12. package/dist/helpers/resolve-options.d.cts.map +1 -0
  13. package/dist/helpers/resolve-options.d.mts +23 -2
  14. package/dist/helpers/resolve-options.d.mts.map +1 -0
  15. package/dist/helpers/resolve.cjs +1 -1
  16. package/dist/helpers/resolve.d.cts +26 -2
  17. package/dist/helpers/resolve.d.cts.map +1 -0
  18. package/dist/helpers/resolve.d.mts +26 -2
  19. package/dist/helpers/resolve.d.mts.map +1 -0
  20. package/dist/helpers/unplugin.cjs +1 -1
  21. package/dist/helpers/unplugin.d.cts +8 -2
  22. package/dist/helpers/unplugin.d.cts.map +1 -0
  23. package/dist/helpers/unplugin.d.mts +8 -2
  24. package/dist/helpers/unplugin.d.mts.map +1 -0
  25. package/dist/index.cjs +9 -9
  26. package/dist/index.d.cts +6 -6
  27. package/dist/index.d.mts +6 -6
  28. package/dist/index.mjs +0 -1
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/types/build.d.cts +8 -2
  31. package/dist/types/build.d.cts.map +1 -0
  32. package/dist/types/build.d.mts +8 -2
  33. package/dist/types/build.d.mts.map +1 -0
  34. package/dist/types/index.d.cts +2 -2
  35. package/dist/types/index.d.mts +2 -2
  36. package/dist/types/plugin.d.cts +19 -2
  37. package/dist/types/plugin.d.cts.map +1 -0
  38. package/dist/types/plugin.d.mts +19 -2
  39. package/dist/types/plugin.d.mts.map +1 -0
  40. package/package.json +4 -5
  41. package/dist/build-CAPZuv7c.d.mts +0 -8
  42. package/dist/build-CAPZuv7c.d.mts.map +0 -1
  43. package/dist/build-D8UULv-V.d.cts +0 -8
  44. package/dist/build-D8UULv-V.d.cts.map +0 -1
  45. package/dist/bundle-CYWEMAg5.d.mts +0 -16
  46. package/dist/bundle-CYWEMAg5.d.mts.map +0 -1
  47. package/dist/bundle-PDlKUkld.d.cts +0 -16
  48. package/dist/bundle-PDlKUkld.d.cts.map +0 -1
  49. package/dist/plugin-ChsmpXkl.d.mts +0 -19
  50. package/dist/plugin-ChsmpXkl.d.mts.map +0 -1
  51. package/dist/plugin-D9zv9VkU.d.cts +0 -19
  52. package/dist/plugin-D9zv9VkU.d.cts.map +0 -1
  53. package/dist/resolve-BIyvH_xj.d.cts +0 -26
  54. package/dist/resolve-BIyvH_xj.d.cts.map +0 -1
  55. package/dist/resolve-BcMpWb5V.d.mts +0 -26
  56. package/dist/resolve-BcMpWb5V.d.mts.map +0 -1
  57. package/dist/resolve-options-BYIev5x9.cjs +0 -137
  58. package/dist/resolve-options-CL9zAGPa.d.mts +0 -23
  59. package/dist/resolve-options-CL9zAGPa.d.mts.map +0 -1
  60. package/dist/resolve-options-DGAa2QLt.d.cts +0 -23
  61. package/dist/resolve-options-DGAa2QLt.d.cts.map +0 -1
  62. package/dist/unplugin-Cv30XR60.d.mts +0 -8
  63. package/dist/unplugin-Cv30XR60.d.mts.map +0 -1
  64. package/dist/unplugin-DT4SEWTe.d.cts +0 -8
  65. package/dist/unplugin-DT4SEWTe.d.cts.map +0 -1
@@ -0,0 +1,29 @@
1
+ //#region \0rolldown/runtime.js
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,7 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_resolve_options = require('../resolve-options-BYIev5x9.cjs');
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ const require_helpers_resolve_options = require('./resolve-options.cjs');
3
4
  let defu = require("defu");
4
- defu = require_resolve_options.__toESM(defu);
5
+ defu = require_runtime.__toESM(defu);
5
6
  let esbuild = require("esbuild");
6
7
  let _powerlines_core_lib_unplugin = require("@powerlines/core/lib/unplugin");
7
8
  let unplugin = require("unplugin");
@@ -20,7 +21,7 @@ async function bundle(context, file, overrides = {}) {
20
21
  const path = await context.fs.resolve(file);
21
22
  if (!path || !context.fs.existsSync(path)) throw new Error(`Module not found: "${file}". Please check the path and try again.`);
22
23
  const result = await (0, esbuild.build)((0, defu.default)({
23
- ...require_resolve_options.resolveOptions(context),
24
+ ...require_helpers_resolve_options.resolveOptions(context),
24
25
  entryPoints: [path],
25
26
  write: false,
26
27
  sourcemap: false,
@@ -1,2 +1,16 @@
1
- import { t as bundle } from "../bundle-PDlKUkld.cjs";
2
- export { bundle };
1
+ import { PluginContext } from "@powerlines/core";
2
+ import { BuildOptions, OutputFile } from "esbuild";
3
+
4
+ //#region src/helpers/bundle.d.ts
5
+ /**
6
+ * Bundle a type definition to a module.
7
+ *
8
+ * @param context - The context object containing the environment paths.
9
+ * @param file - The file path to bundle.
10
+ * @param overrides - Optional overrides for the ESBuild configuration.
11
+ * @returns A promise that resolves to the bundled module.
12
+ */
13
+ declare function bundle(context: PluginContext, file: string, overrides?: Partial<BuildOptions>): Promise<OutputFile>;
14
+ //#endregion
15
+ export { bundle };
16
+ //# sourceMappingURL=bundle.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.d.cts","names":[],"sources":["../../src/helpers/bundle.ts"],"mappings":";;;;;;AAkCA;;;;;;iBAAsB,MAAA,CACpB,OAAA,EAAS,aAAA,EACT,IAAA,UACA,SAAA,GAAW,OAAA,CAAQ,YAAA,IAClB,OAAA,CAAQ,UAAA"}
@@ -1,2 +1,16 @@
1
- import { t as bundle } from "../bundle-CYWEMAg5.mjs";
2
- export { bundle };
1
+ import { BuildOptions, OutputFile } from "esbuild";
2
+ import { PluginContext } from "@powerlines/core";
3
+
4
+ //#region src/helpers/bundle.d.ts
5
+ /**
6
+ * Bundle a type definition to a module.
7
+ *
8
+ * @param context - The context object containing the environment paths.
9
+ * @param file - The file path to bundle.
10
+ * @param overrides - Optional overrides for the ESBuild configuration.
11
+ * @returns A promise that resolves to the bundled module.
12
+ */
13
+ declare function bundle(context: PluginContext, file: string, overrides?: Partial<BuildOptions>): Promise<OutputFile>;
14
+ //#endregion
15
+ export { bundle };
16
+ //# sourceMappingURL=bundle.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.d.mts","names":[],"sources":["../../src/helpers/bundle.ts"],"mappings":";;;;;;AAkCA;;;;;;iBAAsB,MAAA,CACpB,OAAA,EAAS,aAAA,EACT,IAAA,UACA,SAAA,GAAW,OAAA,CAAQ,YAAA,IAClB,OAAA,CAAQ,UAAA"}
@@ -1,13 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_resolve_options = require('../resolve-options-BYIev5x9.cjs');
2
+ const require_helpers_resolve_options = require('./resolve-options.cjs');
3
3
  const require_helpers_unplugin = require('./unplugin.cjs');
4
4
  const require_helpers_bundle = require('./bundle.cjs');
5
5
  const require_helpers_resolve = require('./resolve.cjs');
6
6
 
7
- exports.DEFAULT_ESBUILD_CONFIG = require_resolve_options.DEFAULT_ESBUILD_CONFIG;
7
+ exports.DEFAULT_ESBUILD_CONFIG = require_helpers_resolve_options.DEFAULT_ESBUILD_CONFIG;
8
8
  exports.bundle = require_helpers_bundle.bundle;
9
9
  exports.createEsbuildPlugin = require_helpers_unplugin.createEsbuildPlugin;
10
10
  exports.resolve = require_helpers_resolve.resolve;
11
- exports.resolveEntry = require_resolve_options.resolveEntry;
11
+ exports.resolveEntry = require_helpers_resolve_options.resolveEntry;
12
12
  exports.resolveModule = require_helpers_resolve.resolveModule;
13
- exports.resolveOptions = require_resolve_options.resolveOptions;
13
+ exports.resolveOptions = require_helpers_resolve_options.resolveOptions;
@@ -1,5 +1,5 @@
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 { t as createEsbuildPlugin } from "../unplugin-DT4SEWTe.cjs";
1
+ import { bundle } from "./bundle.cjs";
2
+ import { resolve, resolveModule } from "./resolve.cjs";
3
+ import { DEFAULT_ESBUILD_CONFIG, resolveEntry, resolveOptions } from "./resolve-options.cjs";
4
+ import { createEsbuildPlugin } from "./unplugin.cjs";
5
5
  export { DEFAULT_ESBUILD_CONFIG, bundle, createEsbuildPlugin, resolve, resolveEntry, resolveModule, resolveOptions };
@@ -1,5 +1,5 @@
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 { t as createEsbuildPlugin } from "../unplugin-Cv30XR60.mjs";
1
+ import { bundle } from "./bundle.mjs";
2
+ import { resolve, resolveModule } from "./resolve.mjs";
3
+ import { DEFAULT_ESBUILD_CONFIG, resolveEntry, resolveOptions } from "./resolve-options.mjs";
4
+ import { createEsbuildPlugin } from "./unplugin.mjs";
5
5
  export { DEFAULT_ESBUILD_CONFIG, bundle, createEsbuildPlugin, resolve, resolveEntry, resolveModule, resolveOptions };
@@ -1,6 +1,91 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_resolve_options = require('../resolve-options-BYIev5x9.cjs');
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let defu = require("defu");
4
+ defu = require_runtime.__toESM(defu);
5
+ let _powerlines_core_lib_entry = require("@powerlines/core/lib/entry");
6
+ let _stryke_path_join_paths = require("@stryke/path/join-paths");
7
+ let _stryke_path_replace = require("@stryke/path/replace");
8
+ let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
9
+ let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
3
10
 
4
- exports.DEFAULT_ESBUILD_CONFIG = require_resolve_options.DEFAULT_ESBUILD_CONFIG;
5
- exports.resolveEntry = require_resolve_options.resolveEntry;
6
- exports.resolveOptions = require_resolve_options.resolveOptions;
11
+ //#region src/helpers/resolve-options.ts
12
+ const DEFAULT_ESBUILD_CONFIG = {
13
+ target: "esnext",
14
+ platform: "neutral",
15
+ format: "esm",
16
+ write: true,
17
+ minify: true,
18
+ sourcemap: false,
19
+ bundle: true,
20
+ treeShaking: true,
21
+ keepNames: true,
22
+ splitting: true,
23
+ logLevel: "silent"
24
+ };
25
+ /**
26
+ * Resolves the entry options for esbuild.
27
+ *
28
+ * @param context - The build context.
29
+ * @param entryPoints - The entry points to resolve.
30
+ * @returns The resolved entry options.
31
+ */
32
+ function resolveEntry(context, entryPoints = []) {
33
+ return entryPoints.reduce((ret, entry) => {
34
+ 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);
35
+ else ret[entry.output || (0, _powerlines_core_lib_entry.resolveEntryOutput)(context, entry)] = entry.file;
36
+ return ret;
37
+ }, {});
38
+ }
39
+ /**
40
+ * Resolves the esbuild options.
41
+ *
42
+ * @param context - The build context.
43
+ * @returns The resolved esbuild options.
44
+ */
45
+ function resolveOptions(context) {
46
+ 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]) => {
47
+ if (value) if (Array.isArray(value)) {
48
+ if ((0, _stryke_string_format_camel_case.camelCase)(key) !== key) {
49
+ if (value.length === 1) return `
50
+ import ${(0, _stryke_string_format_camel_case.camelCase)(key)} from "${value[0]}";
51
+ export { ${(0, _stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
52
+ else if (value.length > 1) return `
53
+ 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]}";
54
+ export { ${(0, _stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
55
+ } else if (value.length === 1) return `
56
+ import ${key} from "${value[0]}";
57
+ export { ${key} };`;
58
+ else if (value.length > 1) return `
59
+ import ${value[1] === "*" ? `* as ${key}` : `{ ${value[1]} as ${key} }`} from "${value[0]}";
60
+ export { ${key} };`;
61
+ } else if ((0, _stryke_string_format_camel_case.camelCase)(key) !== key) return `
62
+ import ${(0, _stryke_string_format_camel_case.camelCase)(key)} from "${value[0]}";
63
+ export { ${(0, _stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
64
+ else return `
65
+ import ${key} from "${value}";
66
+ export { ${key} };`;
67
+ return "";
68
+ }).join("\n"));
69
+ return (0, defu.default)({
70
+ alias: context.alias,
71
+ 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
72
+ }, context.config?.esbuild ? context.config.esbuild : {}, {
73
+ mainFields: context.config.resolve.mainFields,
74
+ conditions: context.config.resolve.conditions,
75
+ define: context.config.define,
76
+ resolveExtensions: context.config.resolve.extensions,
77
+ packages: context.config.resolve.skipNodeModulesBundle ? "external" : context.config?.esbuild ? (context.config?.esbuild).packages : void 0,
78
+ format: Array.isArray(context.config.output.format) ? context.config.output.format[0] : context.config.output.format,
79
+ platform: context.config.platform,
80
+ outdir: context.config.output.buildPath,
81
+ tsconfig: context.tsconfig.tsconfigFilePath,
82
+ minify: context.config.mode !== "development",
83
+ metafile: context.config.mode === "development",
84
+ sourcemap: context.config.mode === "development"
85
+ }, DEFAULT_ESBUILD_CONFIG);
86
+ }
87
+
88
+ //#endregion
89
+ exports.DEFAULT_ESBUILD_CONFIG = DEFAULT_ESBUILD_CONFIG;
90
+ exports.resolveEntry = resolveEntry;
91
+ exports.resolveOptions = resolveOptions;
@@ -1,2 +1,23 @@
1
- import { n as resolveEntry, r as resolveOptions, t as DEFAULT_ESBUILD_CONFIG } from "../resolve-options-DGAa2QLt.cjs";
2
- export { DEFAULT_ESBUILD_CONFIG, resolveEntry, resolveOptions };
1
+ import { Context, ResolvedEntryTypeDefinition } from "@powerlines/core";
2
+ import { BuildOptions } from "esbuild";
3
+
4
+ //#region src/helpers/resolve-options.d.ts
5
+ declare const DEFAULT_ESBUILD_CONFIG: Partial<BuildOptions>;
6
+ /**
7
+ * Resolves the entry options for esbuild.
8
+ *
9
+ * @param context - The build context.
10
+ * @param entryPoints - The entry points to resolve.
11
+ * @returns The resolved entry options.
12
+ */
13
+ declare function resolveEntry(context: Context, entryPoints?: ResolvedEntryTypeDefinition[] | string[]): BuildOptions["entryPoints"];
14
+ /**
15
+ * Resolves the esbuild options.
16
+ *
17
+ * @param context - The build context.
18
+ * @returns The resolved esbuild options.
19
+ */
20
+ declare function resolveOptions(context: Context): BuildOptions;
21
+ //#endregion
22
+ export { DEFAULT_ESBUILD_CONFIG, resolveEntry, resolveOptions };
23
+ //# sourceMappingURL=resolve-options.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-options.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,23 @@
1
- import { n as resolveEntry, r as resolveOptions, t as DEFAULT_ESBUILD_CONFIG } from "../resolve-options-CL9zAGPa.mjs";
2
- export { DEFAULT_ESBUILD_CONFIG, resolveEntry, resolveOptions };
1
+ import { BuildOptions } from "esbuild";
2
+ import { Context, ResolvedEntryTypeDefinition } from "@powerlines/core";
3
+
4
+ //#region src/helpers/resolve-options.d.ts
5
+ declare const DEFAULT_ESBUILD_CONFIG: Partial<BuildOptions>;
6
+ /**
7
+ * Resolves the entry options for esbuild.
8
+ *
9
+ * @param context - The build context.
10
+ * @param entryPoints - The entry points to resolve.
11
+ * @returns The resolved entry options.
12
+ */
13
+ declare function resolveEntry(context: Context, entryPoints?: ResolvedEntryTypeDefinition[] | string[]): BuildOptions["entryPoints"];
14
+ /**
15
+ * Resolves the esbuild options.
16
+ *
17
+ * @param context - The build context.
18
+ * @returns The resolved esbuild options.
19
+ */
20
+ declare function resolveOptions(context: Context): BuildOptions;
21
+ //#endregion
22
+ export { DEFAULT_ESBUILD_CONFIG, resolveEntry, resolveOptions };
23
+ //# sourceMappingURL=resolve-options.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-options.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"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_resolve_options = require('../resolve-options-BYIev5x9.cjs');
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  let _powerlines_plugin_esbuild_helpers_bundle = require("@powerlines/plugin-esbuild/helpers/bundle");
4
4
  let _stryke_convert_parse_type_definition = require("@stryke/convert/parse-type-definition");
5
5
  let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
@@ -1,2 +1,26 @@
1
- import { n as resolveModule, t as resolve } from "../resolve-BIyvH_xj.cjs";
2
- export { resolve, resolveModule };
1
+ import { PluginContext } from "@powerlines/core";
2
+ import { BuildOptions } from "esbuild";
3
+ import { TypeDefinitionParameter } from "@stryke/types/configuration";
4
+
5
+ //#region src/helpers/resolve.d.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
+ declare function resolveModule<TResult>(context: PluginContext, type: TypeDefinitionParameter, overrides?: Partial<BuildOptions>): Promise<TResult>;
15
+ /**
16
+ * Compiles a type definition to a module and returns the specified export from the module.
17
+ *
18
+ * @param context - The context object containing the environment paths.
19
+ * @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.
20
+ * @param overrides - Optional overrides for the ESBuild configuration.
21
+ * @returns A promise that resolves to the compiled module.
22
+ */
23
+ declare function resolve<TResult>(context: PluginContext, type: TypeDefinitionParameter, overrides?: Partial<BuildOptions>): Promise<TResult>;
24
+ //#endregion
25
+ export { resolve, resolveModule };
26
+ //# sourceMappingURL=resolve.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.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,2 +1,26 @@
1
- import { n as resolveModule, t as resolve } from "../resolve-BcMpWb5V.mjs";
2
- export { resolve, resolveModule };
1
+ import { BuildOptions } from "esbuild";
2
+ import { PluginContext } from "@powerlines/core";
3
+ import { TypeDefinitionParameter } from "@stryke/types/configuration";
4
+
5
+ //#region src/helpers/resolve.d.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
+ declare function resolveModule<TResult>(context: PluginContext, type: TypeDefinitionParameter, overrides?: Partial<BuildOptions>): Promise<TResult>;
15
+ /**
16
+ * Compiles a type definition to a module and returns the specified export from the module.
17
+ *
18
+ * @param context - The context object containing the environment paths.
19
+ * @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.
20
+ * @param overrides - Optional overrides for the ESBuild configuration.
21
+ * @returns A promise that resolves to the compiled module.
22
+ */
23
+ declare function resolve<TResult>(context: PluginContext, type: TypeDefinitionParameter, overrides?: Partial<BuildOptions>): Promise<TResult>;
24
+ //#endregion
25
+ export { resolve, resolveModule };
26
+ //# sourceMappingURL=resolve.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.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,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_resolve_options = require('../resolve-options-BYIev5x9.cjs');
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  let _powerlines_core_lib_unplugin = require("@powerlines/core/lib/unplugin");
4
4
  let unplugin = require("unplugin");
5
5
 
@@ -1,2 +1,8 @@
1
- import { t as createEsbuildPlugin } from "../unplugin-DT4SEWTe.cjs";
2
- export { createEsbuildPlugin };
1
+ import { EsbuildPluginContext } from "../types/plugin.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 };
8
+ //# sourceMappingURL=unplugin.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unplugin.d.cts","names":[],"sources":["../../src/helpers/unplugin.ts"],"mappings":";;;;iBAsBgB,mBAAA,CAAoB,OAAA,EAAS,oBAAA,GAAoB,OAAA,CAAA,MAAA"}
@@ -1,2 +1,8 @@
1
- import { t as createEsbuildPlugin } from "../unplugin-Cv30XR60.mjs";
2
- export { createEsbuildPlugin };
1
+ import { EsbuildPluginContext } from "../types/plugin.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 };
8
+ //# sourceMappingURL=unplugin.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unplugin.d.mts","names":[],"sources":["../../src/helpers/unplugin.ts"],"mappings":";;;;iBAsBgB,mBAAA,CAAoB,OAAA,EAAS,oBAAA,GAAoB,OAAA,CAAA,MAAA"}
package/dist/index.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
- const require_resolve_options = require('./resolve-options-BYIev5x9.cjs');
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
+ const require_helpers_resolve_options = require('./helpers/resolve-options.cjs');
3
4
  const require_helpers_unplugin = require('./helpers/unplugin.cjs');
4
5
  const require_helpers_bundle = require('./helpers/bundle.cjs');
5
6
  const require_helpers_resolve = require('./helpers/resolve.cjs');
6
7
  require('./helpers/index.cjs');
7
- require('./types/index.cjs');
8
8
  let defu = require("defu");
9
- defu = require_resolve_options.__toESM(defu);
9
+ defu = require_runtime.__toESM(defu);
10
10
  let esbuild = require("esbuild");
11
11
 
12
12
  //#region src/index.ts
@@ -20,7 +20,7 @@ const plugin = (options = {}) => {
20
20
  return {
21
21
  output: { format: ["esm"] },
22
22
  build: {
23
- ...require_resolve_options.DEFAULT_ESBUILD_CONFIG,
23
+ ...require_helpers_resolve_options.DEFAULT_ESBUILD_CONFIG,
24
24
  ...options,
25
25
  variant: "esbuild"
26
26
  }
@@ -28,20 +28,20 @@ const plugin = (options = {}) => {
28
28
  },
29
29
  async build() {
30
30
  await (0, esbuild.build)((0, defu.default)({
31
- entryPoints: require_resolve_options.resolveEntry(this, this.entry),
31
+ entryPoints: require_helpers_resolve_options.resolveEntry(this, this.entry),
32
32
  plugins: [require_helpers_unplugin.createEsbuildPlugin(this)]
33
- }, require_resolve_options.resolveOptions(this)));
33
+ }, require_helpers_resolve_options.resolveOptions(this)));
34
34
  }
35
35
  };
36
36
  };
37
37
 
38
38
  //#endregion
39
- exports.DEFAULT_ESBUILD_CONFIG = require_resolve_options.DEFAULT_ESBUILD_CONFIG;
39
+ exports.DEFAULT_ESBUILD_CONFIG = require_helpers_resolve_options.DEFAULT_ESBUILD_CONFIG;
40
40
  exports.bundle = require_helpers_bundle.bundle;
41
41
  exports.createEsbuildPlugin = require_helpers_unplugin.createEsbuildPlugin;
42
42
  exports.default = plugin;
43
43
  exports.plugin = plugin;
44
44
  exports.resolve = require_helpers_resolve.resolve;
45
- exports.resolveEntry = require_resolve_options.resolveEntry;
45
+ exports.resolveEntry = require_helpers_resolve_options.resolveEntry;
46
46
  exports.resolveModule = require_helpers_resolve.resolveModule;
47
- exports.resolveOptions = require_resolve_options.resolveOptions;
47
+ exports.resolveOptions = require_helpers_resolve_options.resolveOptions;
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
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";
1
+ import { bundle } from "./helpers/bundle.cjs";
2
+ import { resolve, resolveModule } from "./helpers/resolve.cjs";
3
+ import { DEFAULT_ESBUILD_CONFIG, resolveEntry, resolveOptions } from "./helpers/resolve-options.cjs";
4
+ import { EsbuildOptions, __ΩEsbuildOptions } from "./types/build.cjs";
5
+ import { EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig } from "./types/plugin.cjs";
6
+ import { createEsbuildPlugin } from "./helpers/unplugin.cjs";
7
7
  import { Plugin } from "@powerlines/core";
8
8
 
9
9
  //#region src/index.d.ts
package/dist/index.d.mts CHANGED
@@ -1,9 +1,9 @@
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";
1
+ import { bundle } from "./helpers/bundle.mjs";
2
+ import { resolve, resolveModule } from "./helpers/resolve.mjs";
3
+ import { DEFAULT_ESBUILD_CONFIG, resolveEntry, resolveOptions } from "./helpers/resolve-options.mjs";
4
+ import { EsbuildOptions, __ΩEsbuildOptions } from "./types/build.mjs";
5
+ import { EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig } from "./types/plugin.mjs";
6
+ import { createEsbuildPlugin } from "./helpers/unplugin.mjs";
7
7
  import { Plugin } from "@powerlines/core";
8
8
 
9
9
  //#region src/index.d.ts
package/dist/index.mjs CHANGED
@@ -3,7 +3,6 @@ import { createEsbuildPlugin } from "./helpers/unplugin.mjs";
3
3
  import { bundle } from "./helpers/bundle.mjs";
4
4
  import { resolve, resolveModule } from "./helpers/resolve.mjs";
5
5
  import "./helpers/index.mjs";
6
- import "./types/index.mjs";
7
6
  import defu from "defu";
8
7
  import { build } from "esbuild";
9
8
 
@@ -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"}
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,2 +1,8 @@
1
- import { n as __ΩEsbuildOptions, t as EsbuildOptions } from "../build-D8UULv-V.cjs";
2
- export { EsbuildOptions, __ΩEsbuildOptions };
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.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.cts","names":[],"sources":["../../src/types/build.ts"],"mappings":";;;KAoBY,cAAA,GAAiB,IAAA,CAC3B,YAAA;AAAA"}
@@ -1,2 +1,8 @@
1
- import { n as __ΩEsbuildOptions, t as EsbuildOptions } from "../build-CAPZuv7c.mjs";
2
- export { EsbuildOptions, __ΩEsbuildOptions };
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"],"mappings":";;;KAoBY,cAAA,GAAiB,IAAA,CAC3B,YAAA;AAAA"}
@@ -1,3 +1,3 @@
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";
1
+ import { EsbuildOptions, __ΩEsbuildOptions } from "./build.cjs";
2
+ import { EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig } from "./plugin.cjs";
3
3
  export { EsbuildOptions, EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildOptions, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig };
@@ -1,3 +1,3 @@
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";
1
+ import { EsbuildOptions, __ΩEsbuildOptions } from "./build.mjs";
2
+ import { EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig } from "./plugin.mjs";
3
3
  export { EsbuildOptions, EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildOptions, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig };
@@ -1,2 +1,19 @@
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
- export { EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig };
1
+ import { EsbuildOptions } from "./build.cjs";
2
+ import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core";
3
+
4
+ //#region src/types/plugin.d.ts
5
+ type EsbuildPluginOptions = Partial<EsbuildOptions>;
6
+ interface EsbuildPluginUserConfig extends UserConfig {
7
+ esbuild?: EsbuildPluginOptions;
8
+ }
9
+ interface EsbuildPluginResolvedConfig extends ResolvedConfig {
10
+ esbuild: EsbuildOptions;
11
+ }
12
+ type EsbuildPluginContext<TResolvedConfig extends EsbuildPluginResolvedConfig = EsbuildPluginResolvedConfig> = PluginContext<TResolvedConfig>;
13
+ declare type __ΩEsbuildPluginOptions = any[];
14
+ declare type __ΩEsbuildPluginUserConfig = any[];
15
+ declare type __ΩEsbuildPluginResolvedConfig = any[];
16
+ declare type __ΩEsbuildPluginContext = any[];
17
+ //#endregion
18
+ export { EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig };
19
+ //# sourceMappingURL=plugin.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.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,2 +1,19 @@
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";
2
- export { EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig };
1
+ import { EsbuildOptions } from "./build.mjs";
2
+ import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core";
3
+
4
+ //#region src/types/plugin.d.ts
5
+ type EsbuildPluginOptions = Partial<EsbuildOptions>;
6
+ interface EsbuildPluginUserConfig extends UserConfig {
7
+ esbuild?: EsbuildPluginOptions;
8
+ }
9
+ interface EsbuildPluginResolvedConfig extends ResolvedConfig {
10
+ esbuild: EsbuildOptions;
11
+ }
12
+ type EsbuildPluginContext<TResolvedConfig extends EsbuildPluginResolvedConfig = EsbuildPluginResolvedConfig> = PluginContext<TResolvedConfig>;
13
+ declare type __ΩEsbuildPluginOptions = any[];
14
+ declare type __ΩEsbuildPluginUserConfig = any[];
15
+ declare type __ΩEsbuildPluginResolvedConfig = any[];
16
+ declare type __ΩEsbuildPluginContext = any[];
17
+ //#endregion
18
+ export { EsbuildPluginContext, EsbuildPluginOptions, EsbuildPluginResolvedConfig, EsbuildPluginUserConfig, __ΩEsbuildPluginContext, __ΩEsbuildPluginOptions, __ΩEsbuildPluginResolvedConfig, __ΩEsbuildPluginUserConfig };
19
+ //# sourceMappingURL=plugin.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-esbuild",
3
- "version": "0.13.350",
3
+ "version": "0.13.351",
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"],
@@ -61,7 +61,6 @@
61
61
  "import": "./dist/helpers/unplugin.mjs",
62
62
  "require": "./dist/helpers/unplugin.cjs"
63
63
  },
64
- "./resolve-options-BYIev5x9": "./dist/resolve-options-BYIev5x9.cjs",
65
64
  "./types": {
66
65
  "import": "./dist/types/index.mjs",
67
66
  "require": "./dist/types/index.cjs"
@@ -74,7 +73,7 @@
74
73
  "import": "./dist/types/plugin.mjs",
75
74
  "require": "./dist/types/plugin.cjs"
76
75
  },
77
- "./*": "./*"
76
+ "./package.json": "./package.json"
78
77
  },
79
78
  "main": "./dist/index.cjs",
80
79
  "module": "./dist/index.mjs",
@@ -84,7 +83,7 @@
84
83
  "peerDependencies": { "esbuild": ">=0.27.3" },
85
84
  "peerDependenciesMeta": { "esbuild": { "optional": false } },
86
85
  "dependencies": {
87
- "@powerlines/core": "^0.3.3",
86
+ "@powerlines/core": "^0.3.4",
88
87
  "@stryke/fs": "^0.33.57",
89
88
  "@stryke/path": "^0.26.19",
90
89
  "@stryke/type-checks": "^0.5.38",
@@ -95,5 +94,5 @@
95
94
  },
96
95
  "devDependencies": { "esbuild": "^0.27.4", "@types/node": "^25.5.0" },
97
96
  "publishConfig": { "access": "public" },
98
- "gitHead": "c13dc78b9ef6d6418df534f4ea7181162d06ff1d"
97
+ "gitHead": "84f84362520b3532ac14ac03d6f634066e966127"
99
98
  }
@@ -1,8 +0,0 @@
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 as n, EsbuildOptions as t };
8
- //# sourceMappingURL=build-CAPZuv7c.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-CAPZuv7c.d.mts","names":[],"sources":["../src/types/build.ts"],"mappings":";;;KAoBY,cAAA,GAAiB,IAAA,CAC3B,YAAA;AAAA"}
@@ -1,8 +0,0 @@
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 as n, EsbuildOptions as t };
8
- //# sourceMappingURL=build-D8UULv-V.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-D8UULv-V.d.cts","names":[],"sources":["../src/types/build.ts"],"mappings":";;;KAoBY,cAAA,GAAiB,IAAA,CAC3B,YAAA;AAAA"}
@@ -1,16 +0,0 @@
1
- import { BuildOptions, OutputFile } from "esbuild";
2
- import { PluginContext } from "@powerlines/core";
3
-
4
- //#region src/helpers/bundle.d.ts
5
- /**
6
- * Bundle a type definition to a module.
7
- *
8
- * @param context - The context object containing the environment paths.
9
- * @param file - The file path to bundle.
10
- * @param overrides - Optional overrides for the ESBuild configuration.
11
- * @returns A promise that resolves to the bundled module.
12
- */
13
- declare function bundle(context: PluginContext, file: string, overrides?: Partial<BuildOptions>): Promise<OutputFile>;
14
- //#endregion
15
- export { bundle as t };
16
- //# sourceMappingURL=bundle-CYWEMAg5.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bundle-CYWEMAg5.d.mts","names":[],"sources":["../src/helpers/bundle.ts"],"mappings":";;;;;;AAkCA;;;;;;iBAAsB,MAAA,CACpB,OAAA,EAAS,aAAA,EACT,IAAA,UACA,SAAA,GAAW,OAAA,CAAQ,YAAA,IAClB,OAAA,CAAQ,UAAA"}
@@ -1,16 +0,0 @@
1
- import { PluginContext } from "@powerlines/core";
2
- import { BuildOptions, OutputFile } from "esbuild";
3
-
4
- //#region src/helpers/bundle.d.ts
5
- /**
6
- * Bundle a type definition to a module.
7
- *
8
- * @param context - The context object containing the environment paths.
9
- * @param file - The file path to bundle.
10
- * @param overrides - Optional overrides for the ESBuild configuration.
11
- * @returns A promise that resolves to the bundled module.
12
- */
13
- declare function bundle(context: PluginContext, file: string, overrides?: Partial<BuildOptions>): Promise<OutputFile>;
14
- //#endregion
15
- export { bundle as t };
16
- //# sourceMappingURL=bundle-PDlKUkld.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bundle-PDlKUkld.d.cts","names":[],"sources":["../src/helpers/bundle.ts"],"mappings":";;;;;;AAkCA;;;;;;iBAAsB,MAAA,CACpB,OAAA,EAAS,aAAA,EACT,IAAA,UACA,SAAA,GAAW,OAAA,CAAQ,YAAA,IAClB,OAAA,CAAQ,UAAA"}
@@ -1,19 +0,0 @@
1
- import { t as EsbuildOptions } from "./build-CAPZuv7c.mjs";
2
- import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core";
3
-
4
- //#region src/types/plugin.d.ts
5
- type EsbuildPluginOptions = Partial<EsbuildOptions>;
6
- interface EsbuildPluginUserConfig extends UserConfig {
7
- esbuild?: EsbuildPluginOptions;
8
- }
9
- interface EsbuildPluginResolvedConfig extends ResolvedConfig {
10
- esbuild: EsbuildOptions;
11
- }
12
- type EsbuildPluginContext<TResolvedConfig extends EsbuildPluginResolvedConfig = EsbuildPluginResolvedConfig> = PluginContext<TResolvedConfig>;
13
- declare type __ΩEsbuildPluginOptions = any[];
14
- declare type __ΩEsbuildPluginUserConfig = any[];
15
- declare type __ΩEsbuildPluginResolvedConfig = any[];
16
- declare type __ΩEsbuildPluginContext = any[];
17
- //#endregion
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-ChsmpXkl.d.mts.map
@@ -1 +0,0 @@
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,19 +0,0 @@
1
- import { t as EsbuildOptions } from "./build-D8UULv-V.cjs";
2
- import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core";
3
-
4
- //#region src/types/plugin.d.ts
5
- type EsbuildPluginOptions = Partial<EsbuildOptions>;
6
- interface EsbuildPluginUserConfig extends UserConfig {
7
- esbuild?: EsbuildPluginOptions;
8
- }
9
- interface EsbuildPluginResolvedConfig extends ResolvedConfig {
10
- esbuild: EsbuildOptions;
11
- }
12
- type EsbuildPluginContext<TResolvedConfig extends EsbuildPluginResolvedConfig = EsbuildPluginResolvedConfig> = PluginContext<TResolvedConfig>;
13
- declare type __ΩEsbuildPluginOptions = any[];
14
- declare type __ΩEsbuildPluginUserConfig = any[];
15
- declare type __ΩEsbuildPluginResolvedConfig = any[];
16
- declare type __ΩEsbuildPluginContext = any[];
17
- //#endregion
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-D9zv9VkU.d.cts.map
@@ -1 +0,0 @@
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,26 +0,0 @@
1
- import { PluginContext } from "@powerlines/core";
2
- import { BuildOptions } from "esbuild";
3
- import { TypeDefinitionParameter } from "@stryke/types/configuration";
4
-
5
- //#region src/helpers/resolve.d.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
- declare function resolveModule<TResult>(context: PluginContext, type: TypeDefinitionParameter, overrides?: Partial<BuildOptions>): Promise<TResult>;
15
- /**
16
- * Compiles a type definition to a module and returns the specified export from the module.
17
- *
18
- * @param context - The context object containing the environment paths.
19
- * @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.
20
- * @param overrides - Optional overrides for the ESBuild configuration.
21
- * @returns A promise that resolves to the compiled module.
22
- */
23
- declare function resolve<TResult>(context: PluginContext, type: TypeDefinitionParameter, overrides?: Partial<BuildOptions>): Promise<TResult>;
24
- //#endregion
25
- export { resolveModule as n, resolve as t };
26
- //# sourceMappingURL=resolve-BIyvH_xj.d.cts.map
@@ -1 +0,0 @@
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,26 +0,0 @@
1
- import { BuildOptions } from "esbuild";
2
- import { PluginContext } from "@powerlines/core";
3
- import { TypeDefinitionParameter } from "@stryke/types/configuration";
4
-
5
- //#region src/helpers/resolve.d.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
- declare function resolveModule<TResult>(context: PluginContext, type: TypeDefinitionParameter, overrides?: Partial<BuildOptions>): Promise<TResult>;
15
- /**
16
- * Compiles a type definition to a module and returns the specified export from the module.
17
- *
18
- * @param context - The context object containing the environment paths.
19
- * @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.
20
- * @param overrides - Optional overrides for the ESBuild configuration.
21
- * @returns A promise that resolves to the compiled module.
22
- */
23
- declare function resolve<TResult>(context: PluginContext, type: TypeDefinitionParameter, overrides?: Partial<BuildOptions>): Promise<TResult>;
24
- //#endregion
25
- export { resolveModule as n, resolve as t };
26
- //# sourceMappingURL=resolve-BcMpWb5V.d.mts.map
@@ -1 +0,0 @@
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,137 +0,0 @@
1
- //#region \0rolldown/runtime.js
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
- let defu = require("defu");
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");
35
-
36
- //#region src/helpers/resolve-options.ts
37
- const DEFAULT_ESBUILD_CONFIG = {
38
- target: "esnext",
39
- platform: "neutral",
40
- format: "esm",
41
- write: true,
42
- minify: true,
43
- sourcemap: false,
44
- bundle: true,
45
- treeShaking: true,
46
- keepNames: true,
47
- splitting: true,
48
- logLevel: "silent"
49
- };
50
- /**
51
- * Resolves the entry options for esbuild.
52
- *
53
- * @param context - The build context.
54
- * @param entryPoints - The entry points to resolve.
55
- * @returns The resolved entry options.
56
- */
57
- function resolveEntry(context, entryPoints = []) {
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;
61
- return ret;
62
- }, {});
63
- }
64
- /**
65
- * Resolves the esbuild options.
66
- *
67
- * @param context - The build context.
68
- * @returns The resolved esbuild options.
69
- */
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]) => {
72
- if (value) if (Array.isArray(value)) {
73
- if ((0, _stryke_string_format_camel_case.camelCase)(key) !== key) {
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}" }`;
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}" }`;
80
- } else if (value.length === 1) return `
81
- import ${key} from "${value[0]}";
82
- export { ${key} };`;
83
- else if (value.length > 1) return `
84
- import ${value[1] === "*" ? `* as ${key}` : `{ ${value[1]} as ${key} }`} from "${value[0]}";
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}" }`;
89
- else return `
90
- import ${key} from "${value}";
91
- export { ${key} };`;
92
- return "";
93
- }).join("\n"));
94
- return (0, defu.default)({
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
97
- }, context.config?.esbuild ? context.config.esbuild : {}, {
98
- mainFields: context.config.resolve.mainFields,
99
- conditions: context.config.resolve.conditions,
100
- define: context.config.define,
101
- resolveExtensions: context.config.resolve.extensions,
102
- packages: context.config.resolve.skipNodeModulesBundle ? "external" : context.config?.esbuild ? (context.config?.esbuild).packages : void 0,
103
- format: Array.isArray(context.config.output.format) ? context.config.output.format[0] : context.config.output.format,
104
- platform: context.config.platform,
105
- outdir: context.config.output.buildPath,
106
- tsconfig: context.tsconfig.tsconfigFilePath,
107
- minify: context.config.mode !== "development",
108
- metafile: context.config.mode === "development",
109
- sourcemap: context.config.mode === "development"
110
- }, DEFAULT_ESBUILD_CONFIG);
111
- }
112
-
113
- //#endregion
114
- Object.defineProperty(exports, 'DEFAULT_ESBUILD_CONFIG', {
115
- enumerable: true,
116
- get: function () {
117
- return DEFAULT_ESBUILD_CONFIG;
118
- }
119
- });
120
- Object.defineProperty(exports, '__toESM', {
121
- enumerable: true,
122
- get: function () {
123
- return __toESM;
124
- }
125
- });
126
- Object.defineProperty(exports, 'resolveEntry', {
127
- enumerable: true,
128
- get: function () {
129
- return resolveEntry;
130
- }
131
- });
132
- Object.defineProperty(exports, 'resolveOptions', {
133
- enumerable: true,
134
- get: function () {
135
- return resolveOptions;
136
- }
137
- });
@@ -1,23 +0,0 @@
1
- import { BuildOptions } from "esbuild";
2
- import { Context, ResolvedEntryTypeDefinition } from "@powerlines/core";
3
-
4
- //#region src/helpers/resolve-options.d.ts
5
- declare const DEFAULT_ESBUILD_CONFIG: Partial<BuildOptions>;
6
- /**
7
- * Resolves the entry options for esbuild.
8
- *
9
- * @param context - The build context.
10
- * @param entryPoints - The entry points to resolve.
11
- * @returns The resolved entry options.
12
- */
13
- declare function resolveEntry(context: Context, entryPoints?: ResolvedEntryTypeDefinition[] | string[]): BuildOptions["entryPoints"];
14
- /**
15
- * Resolves the esbuild options.
16
- *
17
- * @param context - The build context.
18
- * @returns The resolved esbuild options.
19
- */
20
- declare function resolveOptions(context: Context): BuildOptions;
21
- //#endregion
22
- export { resolveEntry as n, resolveOptions as r, DEFAULT_ESBUILD_CONFIG as t };
23
- //# sourceMappingURL=resolve-options-CL9zAGPa.d.mts.map
@@ -1 +0,0 @@
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"}
@@ -1,23 +0,0 @@
1
- import { Context, ResolvedEntryTypeDefinition } from "@powerlines/core";
2
- import { BuildOptions } from "esbuild";
3
-
4
- //#region src/helpers/resolve-options.d.ts
5
- declare const DEFAULT_ESBUILD_CONFIG: Partial<BuildOptions>;
6
- /**
7
- * Resolves the entry options for esbuild.
8
- *
9
- * @param context - The build context.
10
- * @param entryPoints - The entry points to resolve.
11
- * @returns The resolved entry options.
12
- */
13
- declare function resolveEntry(context: Context, entryPoints?: ResolvedEntryTypeDefinition[] | string[]): BuildOptions["entryPoints"];
14
- /**
15
- * Resolves the esbuild options.
16
- *
17
- * @param context - The build context.
18
- * @returns The resolved esbuild options.
19
- */
20
- declare function resolveOptions(context: Context): BuildOptions;
21
- //#endregion
22
- export { resolveEntry as n, resolveOptions as r, DEFAULT_ESBUILD_CONFIG as t };
23
- //# sourceMappingURL=resolve-options-DGAa2QLt.d.cts.map
@@ -1 +0,0 @@
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,8 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,8 +0,0 @@
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
@@ -1 +0,0 @@
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"}