@powerlines/plugin-env 0.14.21 → 0.14.23

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 (128) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +37 -1
  2. package/dist/_virtual/rolldown_runtime.mjs +29 -1
  3. package/dist/babel/index.cjs +1 -1
  4. package/dist/babel/index.mjs +3 -1
  5. package/dist/babel/plugin.cjs +120 -4
  6. package/dist/babel/plugin.d.cts +2 -3
  7. package/dist/babel/plugin.d.mts +3 -2
  8. package/dist/babel/plugin.mjs +118 -4
  9. package/dist/components/docs.cjs +71 -1
  10. package/dist/components/docs.mjs +70 -1
  11. package/dist/components/env.cjs +432 -11
  12. package/dist/components/env.mjs +430 -9
  13. package/dist/components/index.cjs +6 -1
  14. package/dist/components/index.mjs +4 -1
  15. package/dist/deepkit/schemas/reflection.cjs +3940 -1
  16. package/dist/deepkit/schemas/reflection.mjs +3938 -1
  17. package/dist/deepkit/schemas/reflection2.cjs +4112 -1
  18. package/dist/deepkit/schemas/reflection2.mjs +4110 -1
  19. package/dist/deepkit/src/capnp.cjs +913 -1
  20. package/dist/deepkit/src/capnp.mjs +911 -1
  21. package/dist/deepkit/src/esbuild-plugin.cjs +47 -4
  22. package/dist/deepkit/src/esbuild-plugin.mjs +46 -4
  23. package/dist/deepkit/src/reflect-type.cjs +22 -1
  24. package/dist/deepkit/src/reflect-type.mjs +20 -1
  25. package/dist/deepkit/src/resolve-reflections.cjs +16 -1
  26. package/dist/deepkit/src/resolve-reflections.mjs +15 -1
  27. package/dist/deepkit/src/transformer.cjs +52 -1
  28. package/dist/deepkit/src/transformer.mjs +49 -1
  29. package/dist/deepkit/src/transpile.cjs +29 -1
  30. package/dist/deepkit/src/transpile.mjs +27 -1
  31. package/dist/deepkit/src/utilities.cjs +66 -1
  32. package/dist/deepkit/src/utilities.mjs +65 -1
  33. package/dist/deepkit/src/vendor/type-compiler/index.cjs +38 -1
  34. package/dist/deepkit/src/vendor/type-compiler/index.mjs +19 -1
  35. package/dist/deepkit/src/vendor/type.cjs +20 -1
  36. package/dist/deepkit/src/vendor/type.mjs +11 -1
  37. package/dist/helpers/automd-generator.cjs +22 -1
  38. package/dist/helpers/automd-generator.mjs +21 -1
  39. package/dist/helpers/create-reflection-resource.cjs +55 -1
  40. package/dist/helpers/create-reflection-resource.mjs +54 -1
  41. package/dist/helpers/index.cjs +6 -1
  42. package/dist/helpers/index.mjs +8 -1
  43. package/dist/helpers/load.cjs +83 -1
  44. package/dist/helpers/load.d.cts +2 -2
  45. package/dist/helpers/load.d.mts +3 -2
  46. package/dist/helpers/load.mjs +80 -1
  47. package/dist/helpers/persistence.cjs +214 -1
  48. package/dist/helpers/persistence.d.cts +1 -1
  49. package/dist/helpers/persistence.d.mts +1 -1
  50. package/dist/helpers/persistence.mjs +202 -1
  51. package/dist/helpers/reflect.cjs +111 -1
  52. package/dist/helpers/reflect.mjs +103 -1
  53. package/dist/helpers/source-file-env.cjs +28 -1
  54. package/dist/helpers/source-file-env.mjs +26 -1
  55. package/dist/helpers/template-helpers.cjs +42 -1
  56. package/dist/helpers/template-helpers.mjs +41 -1
  57. package/dist/index.cjs +203 -5
  58. package/dist/index.d.cts +1 -3
  59. package/dist/index.d.mts +2 -1
  60. package/dist/index.mjs +170 -5
  61. package/dist/plugin-alloy/src/core/components/output.cjs +45 -1
  62. package/dist/plugin-alloy/src/core/components/output.mjs +44 -1
  63. package/dist/plugin-alloy/src/core/contexts/context.cjs +11 -1
  64. package/dist/plugin-alloy/src/core/contexts/context.mjs +10 -1
  65. package/dist/plugin-alloy/src/index.cjs +93 -1
  66. package/dist/plugin-alloy/src/index.mjs +91 -1
  67. package/dist/plugin-alloy/src/types/plugin.d.cts +2 -2
  68. package/dist/plugin-alloy/src/types/plugin.d.mts +2 -2
  69. package/dist/plugin-automd/src/index.cjs +101 -1
  70. package/dist/plugin-automd/src/index.mjs +98 -1
  71. package/dist/plugin-automd/src/types/plugin.d.mts +2 -2
  72. package/dist/plugin-babel/src/helpers/ast-utils.cjs +10 -1
  73. package/dist/plugin-babel/src/helpers/ast-utils.mjs +9 -1
  74. package/dist/plugin-babel/src/helpers/create-plugin.cjs +41 -1
  75. package/dist/plugin-babel/src/helpers/create-plugin.mjs +39 -1
  76. package/dist/plugin-babel/src/helpers/filters.cjs +23 -1
  77. package/dist/plugin-babel/src/helpers/filters.mjs +21 -1
  78. package/dist/plugin-babel/src/helpers/index.cjs +5 -1
  79. package/dist/plugin-babel/src/helpers/index.mjs +7 -1
  80. package/dist/plugin-babel/src/helpers/module-helpers.cjs +38 -1
  81. package/dist/plugin-babel/src/helpers/module-helpers.mjs +35 -1
  82. package/dist/plugin-babel/src/helpers/options.cjs +50 -1
  83. package/dist/plugin-babel/src/helpers/options.mjs +47 -1
  84. package/dist/plugin-babel/src/index.cjs +91 -1
  85. package/dist/plugin-babel/src/index.mjs +89 -1
  86. package/dist/plugin-babel/src/types/plugin.d.cts +2 -2
  87. package/dist/plugin-babel/src/types/plugin.d.mts +2 -2
  88. package/dist/powerlines/schemas/fs.d.mts +1 -0
  89. package/dist/powerlines/src/api.d.mts +7 -0
  90. package/dist/powerlines/src/index.d.mts +12 -0
  91. package/dist/powerlines/src/internal/helpers/hooks.d.mts +5 -0
  92. package/dist/powerlines/src/lib/build/esbuild.cjs +102 -14
  93. package/dist/powerlines/src/lib/build/esbuild.mjs +100 -14
  94. package/dist/powerlines/src/lib/entry.cjs +12 -1
  95. package/dist/powerlines/src/lib/entry.mjs +14 -1
  96. package/dist/powerlines/src/lib/logger.cjs +41 -1
  97. package/dist/powerlines/src/lib/logger.mjs +39 -1
  98. package/dist/powerlines/src/lib/utilities/bundle.cjs +35 -1
  99. package/dist/powerlines/src/lib/utilities/bundle.mjs +34 -1
  100. package/dist/powerlines/src/lib/utilities/resolve.cjs +30 -1
  101. package/dist/powerlines/src/lib/utilities/resolve.mjs +29 -1
  102. package/dist/powerlines/src/plugin-utils/paths.cjs +1 -1
  103. package/dist/powerlines/src/plugin-utils/paths.mjs +3 -1
  104. package/dist/powerlines/src/types/api.d.mts +5 -0
  105. package/dist/powerlines/src/types/babel.d.cts +3 -2
  106. package/dist/powerlines/src/types/babel.d.mts +3 -2
  107. package/dist/powerlines/src/types/commands.d.cts +1 -1
  108. package/dist/powerlines/src/types/commands.d.mts +2 -2
  109. package/dist/powerlines/src/types/config.d.cts +5 -5
  110. package/dist/powerlines/src/types/config.d.mts +6 -6
  111. package/dist/powerlines/src/types/context.d.cts +28 -4
  112. package/dist/powerlines/src/types/context.d.mts +30 -6
  113. package/dist/powerlines/src/types/fs.d.cts +1 -1
  114. package/dist/powerlines/src/types/fs.d.mts +1 -1
  115. package/dist/powerlines/src/types/index.d.mts +12 -0
  116. package/dist/powerlines/src/types/plugin.d.cts +3 -3
  117. package/dist/powerlines/src/types/plugin.d.mts +4 -4
  118. package/dist/powerlines/src/types/resolved.d.cts +1 -1
  119. package/dist/powerlines/src/types/resolved.d.mts +2 -2
  120. package/dist/powerlines/src/types/tsconfig.d.mts +1 -1
  121. package/dist/powerlines/src/types/unplugin.d.mts +7 -0
  122. package/dist/types/index.mjs +1 -1
  123. package/dist/types/plugin.d.cts +1 -1
  124. package/dist/types/plugin.mjs +1 -1
  125. package/dist/types/runtime.mjs +1 -1
  126. package/package.json +16 -16
  127. package/dist/babel/index.d.cts +0 -1
  128. package/dist/helpers/index.d.cts +0 -6
@@ -1 +1,38 @@
1
- const e=require(`../../../_virtual/rolldown_runtime.cjs`);require(`./ast-utils.cjs`);let t=require(`@babel/types`);t=e.__toESM(t);let n=require(`@stryke/type-checks/is-string`);function r(e,t){o(e.scope.getProgramParent().path,t)}function i(e){return e.get(`specifiers`).filter(Boolean).every(e=>e?.isImportSpecifier())&&e.node.importKind!==`type`&&e.node.importKind!==`typeof`}function a(e){let t=new Map;return e.traverse({ImportDeclaration(e){i(e)&&t.set(e.node.source.value,e)}}),t}function o(e,n){a(e).get(n.module)||e.unshiftContainer(`body`,t.importDeclaration([t.importSpecifier(t.identifier(n.name||n.imported),t.identifier(n.imported))],t.stringLiteral(n.module)))}exports.addImport=r,exports.addImportsToProgram=o;
1
+ const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
+ require('./ast-utils.cjs');
3
+ let __babel_types = require("@babel/types");
4
+ __babel_types = require_rolldown_runtime.__toESM(__babel_types);
5
+ let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
6
+
7
+ //#region ../plugin-babel/src/helpers/module-helpers.ts
8
+ /**
9
+ * Adds an import to the program if it doesn't already exist.
10
+ *
11
+ * @param path - The current NodePath in the AST.
12
+ * @param specifier - The import specifier.
13
+ */
14
+ function addImport(path, specifier) {
15
+ addImportsToProgram(path.scope.getProgramParent().path, specifier);
16
+ }
17
+ function isNonNamespacedImport(importDeclPath) {
18
+ return importDeclPath.get("specifiers").filter(Boolean).every((specifier) => specifier?.isImportSpecifier()) && importDeclPath.node.importKind !== "type" && importDeclPath.node.importKind !== "typeof";
19
+ }
20
+ function getExistingImports(program) {
21
+ const existingImports = /* @__PURE__ */ new Map();
22
+ program.traverse({ ImportDeclaration(path) {
23
+ if (isNonNamespacedImport(path)) existingImports.set(path.node.source.value, path);
24
+ } });
25
+ return existingImports;
26
+ }
27
+ function addImportsToProgram(path, specifier) {
28
+ /**
29
+ * If an existing import of this module exists (ie \`import \{ ... \} from
30
+ * '<moduleName>'\`), inject new imported specifiers into the list of
31
+ * destructured variables.
32
+ */
33
+ if (!getExistingImports(path).get(specifier.module)) path.unshiftContainer("body", __babel_types.importDeclaration([__babel_types.importSpecifier(__babel_types.identifier(specifier.name || specifier.imported), __babel_types.identifier(specifier.imported))], __babel_types.stringLiteral(specifier.module)));
34
+ }
35
+
36
+ //#endregion
37
+ exports.addImport = addImport;
38
+ exports.addImportsToProgram = addImportsToProgram;
@@ -1 +1,35 @@
1
- import"./ast-utils.mjs";import*as e from"@babel/types";import{isString as t}from"@stryke/type-checks/is-string";function n(e,t){a(e.scope.getProgramParent().path,t)}function r(e){return e.get(`specifiers`).filter(Boolean).every(e=>e?.isImportSpecifier())&&e.node.importKind!==`type`&&e.node.importKind!==`typeof`}function i(e){let t=new Map;return e.traverse({ImportDeclaration(e){r(e)&&t.set(e.node.source.value,e)}}),t}function a(t,n){i(t).get(n.module)||t.unshiftContainer(`body`,e.importDeclaration([e.importSpecifier(e.identifier(n.name||n.imported),e.identifier(n.imported))],e.stringLiteral(n.module)))}export{n as addImport,a as addImportsToProgram};
1
+ import "./ast-utils.mjs";
2
+ import * as t from "@babel/types";
3
+ import { isString } from "@stryke/type-checks/is-string";
4
+
5
+ //#region ../plugin-babel/src/helpers/module-helpers.ts
6
+ /**
7
+ * Adds an import to the program if it doesn't already exist.
8
+ *
9
+ * @param path - The current NodePath in the AST.
10
+ * @param specifier - The import specifier.
11
+ */
12
+ function addImport(path, specifier) {
13
+ addImportsToProgram(path.scope.getProgramParent().path, specifier);
14
+ }
15
+ function isNonNamespacedImport(importDeclPath) {
16
+ return importDeclPath.get("specifiers").filter(Boolean).every((specifier) => specifier?.isImportSpecifier()) && importDeclPath.node.importKind !== "type" && importDeclPath.node.importKind !== "typeof";
17
+ }
18
+ function getExistingImports(program) {
19
+ const existingImports = /* @__PURE__ */ new Map();
20
+ program.traverse({ ImportDeclaration(path) {
21
+ if (isNonNamespacedImport(path)) existingImports.set(path.node.source.value, path);
22
+ } });
23
+ return existingImports;
24
+ }
25
+ function addImportsToProgram(path, specifier) {
26
+ /**
27
+ * If an existing import of this module exists (ie \`import \{ ... \} from
28
+ * '<moduleName>'\`), inject new imported specifiers into the list of
29
+ * destructured variables.
30
+ */
31
+ if (!getExistingImports(path).get(specifier.module)) path.unshiftContainer("body", t.importDeclaration([t.importSpecifier(t.identifier(specifier.name || specifier.imported), t.identifier(specifier.imported))], t.stringLiteral(specifier.module)));
32
+ }
33
+
34
+ //#endregion
35
+ export { addImport, addImportsToProgram };
@@ -1 +1,50 @@
1
- const e=require(`../../../_virtual/rolldown_runtime.cjs`),t=require(`./filters.cjs`);let n=require(`@storm-software/config-tools/types`),r=require(`@stryke/type-checks/is-function`),i=require(`chalk`);i=e.__toESM(i);function a(e,t){try{return Array.isArray(t)&&t.length>0&&t[0]?(0,r.isFunction)(t[0])?t[0](e):t[0]:(0,r.isFunction)(t)?t(e):t}catch{return t[0]}}function o(e,o,s,c){if(Array.isArray(c)&&c.length>0&&c[0]){if(c.length>2&&c[2]&&(0,r.isFunction)(c[2])&&!c[2](o,s)){e.log(n.LogLevelLabel.TRACE,`Skipping filtered Babel plugin ${i.default.bold.cyanBright(t.getPluginName(c)||`unnamed`)} for ${s}`);return}return c.length>2?[a(e,c),c[1],c[2]]:[a(e,c),c[1],null]}return[a(e,c),{},null]}exports.resolveBabelPlugin=o,exports.resolvePluginFunction=a;
1
+ const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
+ const require_filters = require('./filters.cjs');
3
+ let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
4
+ let __stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
5
+ let chalk = require("chalk");
6
+ chalk = require_rolldown_runtime.__toESM(chalk);
7
+
8
+ //#region ../plugin-babel/src/helpers/options.ts
9
+ function resolvePluginFunction(context, plugin) {
10
+ try {
11
+ return Array.isArray(plugin) && plugin.length > 0 && plugin[0] ? (0, __stryke_type_checks_is_function.isFunction)(plugin[0]) ? plugin[0](context) : plugin[0] : (0, __stryke_type_checks_is_function.isFunction)(plugin) ? plugin(context) : plugin;
12
+ } catch {
13
+ return plugin[0];
14
+ }
15
+ }
16
+ /**
17
+ * Resolve the [Babel](https://babeljs.io/) plugin.
18
+ *
19
+ * @param context - The context for the transformation.
20
+ * @param code - The code to be transformed.
21
+ * @param id - The ID of the source file.
22
+ * @param plugin - The Babel plugin to resolve.
23
+ * @returns The resolved Babel plugin options, or undefined if the plugin is filtered out.
24
+ */
25
+ function resolveBabelPlugin(context, code, id, plugin) {
26
+ if (Array.isArray(plugin) && plugin.length > 0 && plugin[0]) {
27
+ if (plugin.length > 2 && plugin[2] && (0, __stryke_type_checks_is_function.isFunction)(plugin[2]) && !plugin[2](code, id)) {
28
+ context.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Skipping filtered Babel plugin ${chalk.default.bold.cyanBright(require_filters.getPluginName(plugin) || "unnamed")} for ${id}`);
29
+ return;
30
+ }
31
+ return plugin.length > 2 ? [
32
+ resolvePluginFunction(context, plugin),
33
+ plugin[1],
34
+ plugin[2]
35
+ ] : [
36
+ resolvePluginFunction(context, plugin),
37
+ plugin[1],
38
+ null
39
+ ];
40
+ }
41
+ return [
42
+ resolvePluginFunction(context, plugin),
43
+ {},
44
+ null
45
+ ];
46
+ }
47
+
48
+ //#endregion
49
+ exports.resolveBabelPlugin = resolveBabelPlugin;
50
+ exports.resolvePluginFunction = resolvePluginFunction;
@@ -1 +1,47 @@
1
- import{getPluginName as e}from"./filters.mjs";import{LogLevelLabel as t}from"@storm-software/config-tools/types";import{isFunction as n}from"@stryke/type-checks/is-function";import r from"chalk";function i(e,t){try{return Array.isArray(t)&&t.length>0&&t[0]?n(t[0])?t[0](e):t[0]:n(t)?t(e):t}catch{return t[0]}}function a(a,o,s,c){if(Array.isArray(c)&&c.length>0&&c[0]){if(c.length>2&&c[2]&&n(c[2])&&!c[2](o,s)){a.log(t.TRACE,`Skipping filtered Babel plugin ${r.bold.cyanBright(e(c)||`unnamed`)} for ${s}`);return}return c.length>2?[i(a,c),c[1],c[2]]:[i(a,c),c[1],null]}return[i(a,c),{},null]}export{a as resolveBabelPlugin,i as resolvePluginFunction};
1
+ import { getPluginName } from "./filters.mjs";
2
+ import { LogLevelLabel } from "@storm-software/config-tools/types";
3
+ import { isFunction } from "@stryke/type-checks/is-function";
4
+ import chalk from "chalk";
5
+
6
+ //#region ../plugin-babel/src/helpers/options.ts
7
+ function resolvePluginFunction(context, plugin) {
8
+ try {
9
+ return Array.isArray(plugin) && plugin.length > 0 && plugin[0] ? isFunction(plugin[0]) ? plugin[0](context) : plugin[0] : isFunction(plugin) ? plugin(context) : plugin;
10
+ } catch {
11
+ return plugin[0];
12
+ }
13
+ }
14
+ /**
15
+ * Resolve the [Babel](https://babeljs.io/) plugin.
16
+ *
17
+ * @param context - The context for the transformation.
18
+ * @param code - The code to be transformed.
19
+ * @param id - The ID of the source file.
20
+ * @param plugin - The Babel plugin to resolve.
21
+ * @returns The resolved Babel plugin options, or undefined if the plugin is filtered out.
22
+ */
23
+ function resolveBabelPlugin(context, code, id, plugin) {
24
+ if (Array.isArray(plugin) && plugin.length > 0 && plugin[0]) {
25
+ if (plugin.length > 2 && plugin[2] && isFunction(plugin[2]) && !plugin[2](code, id)) {
26
+ context.log(LogLevelLabel.TRACE, `Skipping filtered Babel plugin ${chalk.bold.cyanBright(getPluginName(plugin) || "unnamed")} for ${id}`);
27
+ return;
28
+ }
29
+ return plugin.length > 2 ? [
30
+ resolvePluginFunction(context, plugin),
31
+ plugin[1],
32
+ plugin[2]
33
+ ] : [
34
+ resolvePluginFunction(context, plugin),
35
+ plugin[1],
36
+ null
37
+ ];
38
+ }
39
+ return [
40
+ resolvePluginFunction(context, plugin),
41
+ {},
42
+ null
43
+ ];
44
+ }
45
+
46
+ //#endregion
47
+ export { resolveBabelPlugin, resolvePluginFunction };
@@ -1 +1,91 @@
1
- const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`./helpers/filters.cjs`),n=require(`./helpers/options.cjs`),r=require(`./helpers/create-plugin.cjs`),i=require(`./helpers/module-helpers.cjs`);require(`./helpers/index.cjs`);let a=require(`defu`);a=e.__toESM(a);let o=require(`@babel/core`),s=require(`@storm-software/config-tools/types`),c=require(`@stryke/path/file-path-fns`),l=require(`@stryke/path/is-parent-path`),u=require(`@stryke/type-checks/is-set-object`);const d=(e={})=>({name:`babel`,config(){if((0,u.isSetObject)(e))return{transform:{babel:e}}},configResolved:{order:`pre`,handler(){this.devDependencies[`@babel/core`]=`^7.28.4`,this.config.transform.babel=(0,a.default)(this.config.transform.babel??{},{plugins:[],presets:[]})}},async transform(r,i){if((0,l.isParentPath)(i,this.powerlinesPath)||r.includes(`/* @storm-ignore */`)||r.includes(`/* @storm-disable */`))return this.log(s.LogLevelLabel.TRACE,`Skipping Babel transformation for: ${i}`),{code:r,id:i};this.log(s.LogLevelLabel.TRACE,`Babel transforming file: ${i}`);let u=this.config.transform.babel.plugins.map(e=>n.resolveBabelPlugin(this,r,i,e)).filter((e,n,r)=>e&&!t.isDuplicatePlugin(r,e)),d=this.config.transform.babel.presets.map(e=>n.resolveBabelPlugin(this,r,i,e)).filter((e,n,r)=>e&&!t.isDuplicatePlugin(r,e));if(Array.isArray(u)&&u.length===0&&Array.isArray(d)&&d.length===0)return{code:r,id:i};[`ts`,`cts`,`mts`,`tsx`].includes((0,c.findFileExtensionSafe)(i))&&!t.isDuplicatePlugin(u,`@babel/plugin-syntax-typescript`)&&!t.isDuplicatePlugin(d,`@babel/preset-typescript`)&&u.unshift([`@babel/plugin-syntax-typescript`,{isTSX:(0,c.findFileExtension)(i)===`.tsx`}]);let f=await(0,o.transformAsync)(r,{highlightCode:!0,code:!0,ast:!1,cloneInputAst:!1,comments:!0,sourceType:`module`,configFile:!1,babelrc:!1,envName:this.config.mode,caller:{name:this.config.framework},...this.config.transform.babel??{},filename:i,plugins:u.map(t=>Array.isArray(t)&&t.length>=2?[t[0],(0,a.default)(t.length>1&&t[1]?t[1]:{},{options:e})]:t).filter(Boolean),presets:d.map(t=>Array.isArray(t)&&t.length>=2?[t[0],(0,a.default)(t.length>1&&t[1]?t[1]:{},{options:e})]:t).filter(Boolean)});if(!f?.code)throw Error(`Powerlines - Babel plugin failed to compile ${i}`);return{code:f.code,id:i}}});var f=d;exports.default=f;
1
+ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
+ const require_filters = require('./helpers/filters.cjs');
3
+ const require_options = require('./helpers/options.cjs');
4
+ const require_create_plugin = require('./helpers/create-plugin.cjs');
5
+ const require_module_helpers = require('./helpers/module-helpers.cjs');
6
+ require('./helpers/index.cjs');
7
+ let defu = require("defu");
8
+ defu = require_rolldown_runtime.__toESM(defu);
9
+ let __babel_core = require("@babel/core");
10
+ let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
11
+ let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
12
+ let __stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
13
+ let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
14
+
15
+ //#region ../plugin-babel/src/index.ts
16
+ /**
17
+ * Babel plugin for Powerlines.
18
+ *
19
+ * @param options - The Babel plugin user configuration options.
20
+ * @returns A Powerlines plugin that integrates Babel transformations.
21
+ */
22
+ const plugin = (options = {}) => {
23
+ return {
24
+ name: "babel",
25
+ config() {
26
+ if (!(0, __stryke_type_checks_is_set_object.isSetObject)(options)) return;
27
+ return { transform: { babel: options } };
28
+ },
29
+ configResolved: {
30
+ order: "pre",
31
+ handler() {
32
+ this.devDependencies["@babel/core"] = "^7.28.4";
33
+ this.config.transform.babel = (0, defu.default)(this.config.transform.babel ?? {}, {
34
+ plugins: [],
35
+ presets: []
36
+ });
37
+ }
38
+ },
39
+ async transform(code, id) {
40
+ if ((0, __stryke_path_is_parent_path.isParentPath)(id, this.powerlinesPath) || code.includes("/* @storm-ignore */") || code.includes("/* @storm-disable */")) {
41
+ this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Skipping Babel transformation for: ${id}`);
42
+ return {
43
+ code,
44
+ id
45
+ };
46
+ }
47
+ this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Babel transforming file: ${id}`);
48
+ const plugins = this.config.transform.babel.plugins.map((plugin$1) => require_options.resolveBabelPlugin(this, code, id, plugin$1)).filter((plugin$1, _, arr) => plugin$1 && !require_filters.isDuplicatePlugin(arr, plugin$1));
49
+ const presets = this.config.transform.babel.presets.map((preset) => require_options.resolveBabelPlugin(this, code, id, preset)).filter((preset, _, arr) => preset && !require_filters.isDuplicatePlugin(arr, preset));
50
+ if (Array.isArray(plugins) && plugins.length === 0 && Array.isArray(presets) && presets.length === 0) return {
51
+ code,
52
+ id
53
+ };
54
+ if ([
55
+ "ts",
56
+ "cts",
57
+ "mts",
58
+ "tsx"
59
+ ].includes((0, __stryke_path_file_path_fns.findFileExtensionSafe)(id)) && !require_filters.isDuplicatePlugin(plugins, "@babel/plugin-syntax-typescript") && !require_filters.isDuplicatePlugin(presets, "@babel/preset-typescript")) plugins.unshift(["@babel/plugin-syntax-typescript", { isTSX: (0, __stryke_path_file_path_fns.findFileExtension)(id) === ".tsx" }]);
60
+ const result = await (0, __babel_core.transformAsync)(code, {
61
+ highlightCode: true,
62
+ code: true,
63
+ ast: false,
64
+ cloneInputAst: false,
65
+ comments: true,
66
+ sourceType: "module",
67
+ configFile: false,
68
+ babelrc: false,
69
+ envName: this.config.mode,
70
+ caller: { name: this.config.framework },
71
+ ...this.config.transform.babel ?? {},
72
+ filename: id,
73
+ plugins: plugins.map((plugin$1) => {
74
+ return Array.isArray(plugin$1) && plugin$1.length >= 2 ? [plugin$1[0], (0, defu.default)(plugin$1.length > 1 && plugin$1[1] ? plugin$1[1] : {}, { options })] : plugin$1;
75
+ }).filter(Boolean),
76
+ presets: presets.map((preset) => {
77
+ return Array.isArray(preset) && preset.length >= 2 ? [preset[0], (0, defu.default)(preset.length > 1 && preset[1] ? preset[1] : {}, { options })] : preset;
78
+ }).filter(Boolean)
79
+ });
80
+ if (!result?.code) throw new Error(`Powerlines - Babel plugin failed to compile ${id}`);
81
+ return {
82
+ code: result.code,
83
+ id
84
+ };
85
+ }
86
+ };
87
+ };
88
+ var src_default = plugin;
89
+
90
+ //#endregion
91
+ exports.default = src_default;
@@ -1 +1,89 @@
1
- import{getPluginName as e,isDuplicatePlugin as t}from"./helpers/filters.mjs";import{resolveBabelPlugin as n,resolvePluginFunction as r}from"./helpers/options.mjs";import{createBabelPlugin as i}from"./helpers/create-plugin.mjs";import{addImport as a,addImportsToProgram as o}from"./helpers/module-helpers.mjs";import"./helpers/index.mjs";import s from"defu";import{transformAsync as c}from"@babel/core";import{LogLevelLabel as l}from"@storm-software/config-tools/types";import{findFileExtension as u,findFileExtensionSafe as d}from"@stryke/path/file-path-fns";import{isParentPath as f}from"@stryke/path/is-parent-path";import{isSetObject as p}from"@stryke/type-checks/is-set-object";var m=(e={})=>({name:`babel`,config(){if(p(e))return{transform:{babel:e}}},configResolved:{order:`pre`,handler(){this.devDependencies[`@babel/core`]=`^7.28.4`,this.config.transform.babel=s(this.config.transform.babel??{},{plugins:[],presets:[]})}},async transform(r,i){if(f(i,this.powerlinesPath)||r.includes(`/* @storm-ignore */`)||r.includes(`/* @storm-disable */`))return this.log(l.TRACE,`Skipping Babel transformation for: ${i}`),{code:r,id:i};this.log(l.TRACE,`Babel transforming file: ${i}`);let a=this.config.transform.babel.plugins.map(e=>n(this,r,i,e)).filter((e,n,r)=>e&&!t(r,e)),o=this.config.transform.babel.presets.map(e=>n(this,r,i,e)).filter((e,n,r)=>e&&!t(r,e));if(Array.isArray(a)&&a.length===0&&Array.isArray(o)&&o.length===0)return{code:r,id:i};[`ts`,`cts`,`mts`,`tsx`].includes(d(i))&&!t(a,`@babel/plugin-syntax-typescript`)&&!t(o,`@babel/preset-typescript`)&&a.unshift([`@babel/plugin-syntax-typescript`,{isTSX:u(i)===`.tsx`}]);let p=await c(r,{highlightCode:!0,code:!0,ast:!1,cloneInputAst:!1,comments:!0,sourceType:`module`,configFile:!1,babelrc:!1,envName:this.config.mode,caller:{name:this.config.framework},...this.config.transform.babel??{},filename:i,plugins:a.map(t=>Array.isArray(t)&&t.length>=2?[t[0],s(t.length>1&&t[1]?t[1]:{},{options:e})]:t).filter(Boolean),presets:o.map(t=>Array.isArray(t)&&t.length>=2?[t[0],s(t.length>1&&t[1]?t[1]:{},{options:e})]:t).filter(Boolean)});if(!p?.code)throw Error(`Powerlines - Babel plugin failed to compile ${i}`);return{code:p.code,id:i}}});export{m as default};
1
+ import { getPluginName, isDuplicatePlugin } from "./helpers/filters.mjs";
2
+ import { resolveBabelPlugin, resolvePluginFunction } from "./helpers/options.mjs";
3
+ import { createBabelPlugin } from "./helpers/create-plugin.mjs";
4
+ import { addImport, addImportsToProgram } from "./helpers/module-helpers.mjs";
5
+ import "./helpers/index.mjs";
6
+ import defu from "defu";
7
+ import { transformAsync } from "@babel/core";
8
+ import { LogLevelLabel } from "@storm-software/config-tools/types";
9
+ import { findFileExtension, findFileExtensionSafe } from "@stryke/path/file-path-fns";
10
+ import { isParentPath } from "@stryke/path/is-parent-path";
11
+ import { isSetObject } from "@stryke/type-checks/is-set-object";
12
+
13
+ //#region ../plugin-babel/src/index.ts
14
+ /**
15
+ * Babel plugin for Powerlines.
16
+ *
17
+ * @param options - The Babel plugin user configuration options.
18
+ * @returns A Powerlines plugin that integrates Babel transformations.
19
+ */
20
+ const plugin = (options = {}) => {
21
+ return {
22
+ name: "babel",
23
+ config() {
24
+ if (!isSetObject(options)) return;
25
+ return { transform: { babel: options } };
26
+ },
27
+ configResolved: {
28
+ order: "pre",
29
+ handler() {
30
+ this.devDependencies["@babel/core"] = "^7.28.4";
31
+ this.config.transform.babel = defu(this.config.transform.babel ?? {}, {
32
+ plugins: [],
33
+ presets: []
34
+ });
35
+ }
36
+ },
37
+ async transform(code, id) {
38
+ if (isParentPath(id, this.powerlinesPath) || code.includes("/* @storm-ignore */") || code.includes("/* @storm-disable */")) {
39
+ this.log(LogLevelLabel.TRACE, `Skipping Babel transformation for: ${id}`);
40
+ return {
41
+ code,
42
+ id
43
+ };
44
+ }
45
+ this.log(LogLevelLabel.TRACE, `Babel transforming file: ${id}`);
46
+ const plugins = this.config.transform.babel.plugins.map((plugin$1) => resolveBabelPlugin(this, code, id, plugin$1)).filter((plugin$1, _, arr) => plugin$1 && !isDuplicatePlugin(arr, plugin$1));
47
+ const presets = this.config.transform.babel.presets.map((preset) => resolveBabelPlugin(this, code, id, preset)).filter((preset, _, arr) => preset && !isDuplicatePlugin(arr, preset));
48
+ if (Array.isArray(plugins) && plugins.length === 0 && Array.isArray(presets) && presets.length === 0) return {
49
+ code,
50
+ id
51
+ };
52
+ if ([
53
+ "ts",
54
+ "cts",
55
+ "mts",
56
+ "tsx"
57
+ ].includes(findFileExtensionSafe(id)) && !isDuplicatePlugin(plugins, "@babel/plugin-syntax-typescript") && !isDuplicatePlugin(presets, "@babel/preset-typescript")) plugins.unshift(["@babel/plugin-syntax-typescript", { isTSX: findFileExtension(id) === ".tsx" }]);
58
+ const result = await transformAsync(code, {
59
+ highlightCode: true,
60
+ code: true,
61
+ ast: false,
62
+ cloneInputAst: false,
63
+ comments: true,
64
+ sourceType: "module",
65
+ configFile: false,
66
+ babelrc: false,
67
+ envName: this.config.mode,
68
+ caller: { name: this.config.framework },
69
+ ...this.config.transform.babel ?? {},
70
+ filename: id,
71
+ plugins: plugins.map((plugin$1) => {
72
+ return Array.isArray(plugin$1) && plugin$1.length >= 2 ? [plugin$1[0], defu(plugin$1.length > 1 && plugin$1[1] ? plugin$1[1] : {}, { options })] : plugin$1;
73
+ }).filter(Boolean),
74
+ presets: presets.map((preset) => {
75
+ return Array.isArray(preset) && preset.length >= 2 ? [preset[0], defu(preset.length > 1 && preset[1] ? preset[1] : {}, { options })] : preset;
76
+ }).filter(Boolean)
77
+ });
78
+ if (!result?.code) throw new Error(`Powerlines - Babel plugin failed to compile ${id}`);
79
+ return {
80
+ code: result.code,
81
+ id
82
+ };
83
+ }
84
+ };
85
+ };
86
+ var src_default = plugin;
87
+
88
+ //#endregion
89
+ export { src_default as default };
@@ -1,6 +1,6 @@
1
- import { PluginContext } from "../../../powerlines/src/types/context.cjs";
2
- import { BabelUserConfig, UserConfig } from "../../../powerlines/src/types/config.cjs";
3
1
  import { BabelResolvedConfig, ResolvedConfig } from "../../../powerlines/src/types/resolved.cjs";
2
+ import { BabelUserConfig, UserConfig } from "../../../powerlines/src/types/config.cjs";
3
+ import { PluginContext } from "../../../powerlines/src/types/context.cjs";
4
4
 
5
5
  //#region ../plugin-babel/src/types/plugin.d.ts
6
6
  type BabelPluginOptions = Partial<BabelUserConfig>;
@@ -1,6 +1,6 @@
1
- import { PluginContext } from "../../../powerlines/src/types/context.mjs";
2
- import { BabelUserConfig, UserConfig } from "../../../powerlines/src/types/config.mjs";
3
1
  import { BabelResolvedConfig, ResolvedConfig } from "../../../powerlines/src/types/resolved.mjs";
2
+ import { BabelUserConfig, UserConfig } from "../../../powerlines/src/types/config.mjs";
3
+ import { PluginContext } from "../../../powerlines/src/types/context.mjs";
4
4
 
5
5
  //#region ../plugin-babel/src/types/plugin.d.ts
6
6
  type BabelPluginOptions = Partial<BabelUserConfig>;
@@ -0,0 +1 @@
1
+ import "@stryke/capnp";
@@ -0,0 +1,7 @@
1
+ import "./types/resolved.mjs";
2
+ import "./types/config.mjs";
3
+ import "./types/hooks.mjs";
4
+ import "./types/context.mjs";
5
+ import "./internal/helpers/hooks.mjs";
6
+ import "./types/api.mjs";
7
+ import "./types/index.mjs";
@@ -0,0 +1,12 @@
1
+ import { BabelPluginPass, BabelTransformPlugin, BabelTransformPluginFilter, BabelTransformPluginOptions, DeclareBabelTransformPluginReturn } from "./types/babel.mjs";
2
+ import { BuildConfig, BuildResolvedConfig, UnpluginBuildVariant } from "./types/build.mjs";
3
+ import { ResolveOptions, StorageAdapter, StoragePort, StoragePreset, VirtualFile, VirtualFileData, VirtualFileMetadata, VirtualFileSystemInterface, WriteOptions } from "./types/fs.mjs";
4
+ import { CommandType, SUPPORTED_COMMANDS } from "./types/commands.mjs";
5
+ import { BabelResolvedConfig, EnvironmentResolvedConfig, OutputResolvedConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedEntryTypeDefinition } from "./types/resolved.mjs";
6
+ import { BasePluginHookFunctions, BuildPlugin, ConfigResult, Plugin, PluginBuildPlugins, PluginHook, PluginHookObject, PluginHooks, TypesResult } from "./types/plugin.mjs";
7
+ import { DeepkitOptions, ParsedTypeScriptConfig, RawReflectionMode, ReflectionLevel, ReflectionMode, TSCompilerOptions, TSConfig } from "./types/tsconfig.mjs";
8
+ import { BabelUserConfig, BaseConfig, CommonUserConfig, DeployConfig, EnvironmentConfig, InlineConfig, LogFn, OutputConfig, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, ProjectType, UserConfig, WorkspaceConfig } from "./types/config.mjs";
9
+ import { BuildPluginContext, Context, EmitEntryOptions, EmitOptions, FetchOptions, InitContextOptions, LogLevel, MetaInfo, ParseOptions, PluginContext, Resolver, TransformResult, UnresolvedContext } from "./types/context.mjs";
10
+ import "./types/index.mjs";
11
+ import "./api.mjs";
12
+ import "../schemas/fs.mjs";
@@ -0,0 +1,5 @@
1
+ import "../../types/resolved.mjs";
2
+ import "../../types/hooks.mjs";
3
+ import "../../types/context.mjs";
4
+ import { ArrayValues } from "@stryke/types/array";
5
+ import { MaybePromise } from "@stryke/types/base";
@@ -1,14 +1,102 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`);require(`../entry.cjs`);let t=require(`@stryke/path/replace`),n=require(`@stryke/path/join-paths`),r=require(`defu`);r=e.__toESM(r);let i=require(`@stryke/type-checks/is-string`),a=require(`@stryke/helpers/omit`),o=require(`@stryke/string-format/camel-case`);const s={target:`esnext`,platform:`neutral`,format:`esm`,write:!0,minify:!0,sourcemap:!1,bundle:!0,treeShaking:!0,keepNames:!0,splitting:!0,logLevel:`silent`};function c(e){let t=e.config.build.override.inject??e.config.build.inject;return t&&Object.keys(t).length>0&&e.fs.writeSync((0,n.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,e.artifactsPath,`inject-shim.js`),Object.entries(t).map(([e,t])=>{if(t)if(Array.isArray(t)){if((0,o.camelCase)(e)!==e){if(t.length===1)return`
2
- import ${(0,o.camelCase)(e)} from "${t[0]}";
3
- export { ${(0,o.camelCase)(e)} as "${e}" }`;if(t.length>1)return`
4
- import ${t[1]===`*`?`* as ${(0,o.camelCase)(e)}`:`{ ${t[1]} as ${(0,o.camelCase)(e)} }`} from "${t[0]}";
5
- export { ${(0,o.camelCase)(e)} as "${e}" }`}else if(t.length===1)return`
6
- import ${e} from "${t[0]}";
7
- export { ${e} };`;else if(t.length>1)return`
8
- import ${t[1]===`*`?`* as ${e}`:`{ ${t[1]} as ${e} }`} from "${t[0]}";
9
- export { ${e} };`}else if((0,o.camelCase)(e)!==e)return`
10
- import ${(0,o.camelCase)(e)} from "${t[0]}";
11
- export { ${(0,o.camelCase)(e)} as "${e}" }`;else return`
12
- import ${e} from "${t}";
13
- export { ${e} };`;return``}).join(`
14
- `)),(0,r.default)({alias:e.builtins.reduce((t,n)=>{if(!t[n]){let r=e.fs.ids[n];r&&(t[n]=r)}return t},e.config.build.alias?Array.isArray(e.config.build.alias)?e.config.build.alias.reduce((e,t)=>(e[t.find.toString()]||(e[t.find.toString()]=t.replacement),e),{}):e.config.build.alias:{}),inject:t&&Object.keys(t).length>0?[(0,n.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,e.artifactsPath,`inject-shim.js`)]:void 0},e.config.build.variant===`esbuild`?(0,a.omit)(e.config.build.override,[`alias`,`inject`,`external`,`noExternal`,`skipNodeModulesBundle`,`extensions`]):{},e.config.build.variant===`esbuild`?(0,a.omit)(e.config.build,[`alias`,`inject`,`external`,`noExternal`,`skipNodeModulesBundle`,`extensions`,`variant`,`override`]):{},{mainFields:e.config.build.mainFields,conditions:e.config.build.conditions,define:e.config.build.define,resolveExtensions:e.config.build.extensions,packages:e.config.build.skipNodeModulesBundle?`external`:e.config.build.variant===`esbuild`?e.config.build.packages:void 0,format:Array.isArray(e.config.output.format)?e.config.output.format[0]:e.config.output.format,platform:e.config.build.platform,treeShaking:!!e.config.build?.treeshake||e.config.build?.treeShaking,outdir:e.config.output.buildPath,tsconfig:e.tsconfig.tsconfigFilePath,minify:e.config.mode!==`development`,metafile:e.config.mode===`development`,sourcemap:e.config.mode===`development`},s)}exports.extractESBuildConfig=c;
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ require('../entry.cjs');
3
+ let __stryke_path_replace = require("@stryke/path/replace");
4
+ let __stryke_path_join_paths = require("@stryke/path/join-paths");
5
+ let defu = require("defu");
6
+ defu = require_rolldown_runtime.__toESM(defu);
7
+ let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
8
+ let __stryke_helpers_omit = require("@stryke/helpers/omit");
9
+ let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
10
+
11
+ //#region ../powerlines/src/lib/build/esbuild.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 esbuild options.
27
+ *
28
+ * @param context - The build context.
29
+ * @returns The resolved esbuild options.
30
+ */
31
+ function extractESBuildConfig(context) {
32
+ const inject = context.config.build.override.inject ?? context.config.build.inject;
33
+ if (inject && Object.keys(inject).length > 0) context.fs.writeSync((0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.artifactsPath, "inject-shim.js"), Object.entries(inject).map(([key, value]) => {
34
+ if (value) if (Array.isArray(value)) {
35
+ if ((0, __stryke_string_format_camel_case.camelCase)(key) !== key) {
36
+ if (value.length === 1) return `
37
+ import ${(0, __stryke_string_format_camel_case.camelCase)(key)} from "${value[0]}";
38
+ export { ${(0, __stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
39
+ else if (value.length > 1) return `
40
+ 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]}";
41
+ export { ${(0, __stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
42
+ } else if (value.length === 1) return `
43
+ import ${key} from "${value[0]}";
44
+ export { ${key} };`;
45
+ else if (value.length > 1) return `
46
+ import ${value[1] === "*" ? `* as ${key}` : `{ ${value[1]} as ${key} }`} from "${value[0]}";
47
+ export { ${key} };`;
48
+ } else if ((0, __stryke_string_format_camel_case.camelCase)(key) !== key) return `
49
+ import ${(0, __stryke_string_format_camel_case.camelCase)(key)} from "${value[0]}";
50
+ export { ${(0, __stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
51
+ else return `
52
+ import ${key} from "${value}";
53
+ export { ${key} };`;
54
+ return "";
55
+ }).join("\n"));
56
+ return (0, defu.default)({
57
+ alias: context.builtins.reduce((ret, id) => {
58
+ if (!ret[id]) {
59
+ const path = context.fs.ids[id];
60
+ if (path) ret[id] = path;
61
+ }
62
+ return ret;
63
+ }, context.config.build.alias ? Array.isArray(context.config.build.alias) ? context.config.build.alias.reduce((ret, alias) => {
64
+ if (!ret[alias.find.toString()]) ret[alias.find.toString()] = alias.replacement;
65
+ return ret;
66
+ }, {}) : context.config.build.alias : {}),
67
+ inject: inject && Object.keys(inject).length > 0 ? [(0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.artifactsPath, "inject-shim.js")] : void 0
68
+ }, context.config.build.variant === "esbuild" ? (0, __stryke_helpers_omit.omit)(context.config.build.override, [
69
+ "alias",
70
+ "inject",
71
+ "external",
72
+ "noExternal",
73
+ "skipNodeModulesBundle",
74
+ "extensions"
75
+ ]) : {}, context.config.build.variant === "esbuild" ? (0, __stryke_helpers_omit.omit)(context.config.build, [
76
+ "alias",
77
+ "inject",
78
+ "external",
79
+ "noExternal",
80
+ "skipNodeModulesBundle",
81
+ "extensions",
82
+ "variant",
83
+ "override"
84
+ ]) : {}, {
85
+ mainFields: context.config.build.mainFields,
86
+ conditions: context.config.build.conditions,
87
+ define: context.config.build.define,
88
+ resolveExtensions: context.config.build.extensions,
89
+ packages: context.config.build.skipNodeModulesBundle ? "external" : context.config.build.variant === "esbuild" ? context.config.build.packages : void 0,
90
+ format: Array.isArray(context.config.output.format) ? context.config.output.format[0] : context.config.output.format,
91
+ platform: context.config.build.platform,
92
+ treeShaking: Boolean(context.config.build?.treeshake) || context.config.build?.treeShaking,
93
+ outdir: context.config.output.buildPath,
94
+ tsconfig: context.tsconfig.tsconfigFilePath,
95
+ minify: context.config.mode !== "development",
96
+ metafile: context.config.mode === "development",
97
+ sourcemap: context.config.mode === "development"
98
+ }, DEFAULT_ESBUILD_CONFIG);
99
+ }
100
+
101
+ //#endregion
102
+ exports.extractESBuildConfig = extractESBuildConfig;