@powerlines/plugin-nodejs 0.1.115 → 0.1.117

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 (144) hide show
  1. package/dist/components/env.cjs +14 -14
  2. package/dist/components/env.mjs +6 -6
  3. package/dist/deepkit/schemas/reflection.cjs +3998 -0
  4. package/dist/deepkit/schemas/reflection.mjs +3996 -0
  5. package/dist/deepkit/schemas/reflection2.cjs +4112 -0
  6. package/dist/deepkit/schemas/reflection2.mjs +4110 -0
  7. package/dist/deepkit/src/capnp.cjs +913 -0
  8. package/dist/deepkit/src/capnp.mjs +911 -0
  9. package/dist/deepkit/src/esbuild-plugin.cjs +47 -0
  10. package/dist/deepkit/src/esbuild-plugin.mjs +46 -0
  11. package/dist/deepkit/src/reflect-type.cjs +22 -0
  12. package/dist/deepkit/src/reflect-type.mjs +20 -0
  13. package/dist/deepkit/src/resolve-reflections.cjs +16 -0
  14. package/dist/deepkit/src/resolve-reflections.mjs +15 -0
  15. package/dist/deepkit/src/transformer.cjs +52 -0
  16. package/dist/deepkit/src/transformer.mjs +49 -0
  17. package/dist/deepkit/src/transpile.cjs +29 -0
  18. package/dist/deepkit/src/transpile.mjs +27 -0
  19. package/dist/deepkit/src/utilities.cjs +67 -0
  20. package/dist/deepkit/src/utilities.mjs +66 -0
  21. package/dist/index.cjs +6 -8
  22. package/dist/index.mjs +5 -5
  23. package/dist/plugin-alloy/src/core/components/output.cjs +43 -0
  24. package/dist/plugin-alloy/src/core/components/output.mjs +42 -0
  25. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +22 -0
  26. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +21 -0
  27. package/dist/plugin-alloy/src/core/components/source-file.cjs +64 -0
  28. package/dist/plugin-alloy/src/core/components/source-file.mjs +62 -0
  29. package/dist/plugin-alloy/src/core/contexts/context.cjs +49 -0
  30. package/dist/plugin-alloy/src/core/contexts/context.mjs +44 -0
  31. package/dist/plugin-alloy/src/core/contexts/index.cjs +2 -0
  32. package/dist/plugin-alloy/src/core/contexts/index.mjs +4 -0
  33. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +46 -0
  34. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +42 -0
  35. package/dist/plugin-alloy/src/helpers/refkey.cjs +16 -0
  36. package/dist/plugin-alloy/src/helpers/refkey.mjs +15 -0
  37. package/dist/plugin-alloy/src/index.cjs +105 -0
  38. package/dist/plugin-alloy/src/index.mjs +103 -0
  39. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +115 -0
  40. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +114 -0
  41. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +39 -0
  42. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +38 -0
  43. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +18 -0
  44. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +17 -0
  45. package/dist/plugin-alloy/src/types/components.d.mts +2 -1
  46. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +62 -0
  47. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +61 -0
  48. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +131 -0
  49. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +129 -0
  50. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +451 -0
  51. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +1 -1
  52. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +442 -0
  53. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +216 -0
  54. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +1 -1
  55. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +213 -0
  56. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +72 -0
  57. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.mts +2 -2
  58. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +71 -0
  59. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +124 -0
  60. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +123 -0
  61. package/dist/plugin-automd/src/index.cjs +101 -0
  62. package/dist/plugin-automd/src/index.mjs +98 -0
  63. package/dist/plugin-automd/src/types/plugin.d.mts +3 -1
  64. package/dist/plugin-babel/src/helpers/ast-utils.cjs +10 -0
  65. package/dist/plugin-babel/src/helpers/ast-utils.mjs +9 -0
  66. package/dist/plugin-babel/src/helpers/create-plugin.cjs +41 -0
  67. package/dist/plugin-babel/src/helpers/create-plugin.mjs +39 -0
  68. package/dist/plugin-babel/src/helpers/filters.cjs +23 -0
  69. package/dist/plugin-babel/src/helpers/filters.mjs +21 -0
  70. package/dist/plugin-babel/src/helpers/index.cjs +5 -0
  71. package/dist/plugin-babel/src/helpers/index.mjs +7 -0
  72. package/dist/plugin-babel/src/helpers/module-helpers.cjs +38 -0
  73. package/dist/plugin-babel/src/helpers/module-helpers.mjs +35 -0
  74. package/dist/plugin-babel/src/helpers/options.cjs +49 -0
  75. package/dist/plugin-babel/src/helpers/options.mjs +46 -0
  76. package/dist/plugin-babel/src/index.cjs +85 -0
  77. package/dist/plugin-babel/src/index.mjs +83 -0
  78. package/dist/plugin-babel/src/types/index.d.mts +1 -0
  79. package/dist/plugin-env/src/babel/index.cjs +1 -0
  80. package/dist/plugin-env/src/babel/index.mjs +3 -0
  81. package/dist/plugin-env/src/babel/plugin.cjs +70 -0
  82. package/dist/plugin-env/src/babel/plugin.mjs +69 -0
  83. package/dist/plugin-env/src/components/docs.cjs +70 -0
  84. package/dist/plugin-env/src/components/docs.mjs +69 -0
  85. package/dist/plugin-env/src/components/env.cjs +589 -0
  86. package/dist/plugin-env/src/components/env.mjs +586 -0
  87. package/dist/plugin-env/src/components/index.cjs +2 -0
  88. package/dist/plugin-env/src/components/index.mjs +4 -0
  89. package/dist/plugin-env/src/helpers/automd-generator.cjs +22 -0
  90. package/dist/plugin-env/src/helpers/automd-generator.mjs +21 -0
  91. package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +55 -0
  92. package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +54 -0
  93. package/dist/plugin-env/src/helpers/docs-helper.cjs +16 -0
  94. package/dist/plugin-env/src/helpers/docs-helper.mjs +15 -0
  95. package/dist/plugin-env/src/helpers/index.cjs +6 -0
  96. package/dist/plugin-env/src/helpers/index.mjs +8 -0
  97. package/dist/plugin-env/src/helpers/load.cjs +84 -0
  98. package/dist/plugin-env/src/helpers/load.mjs +81 -0
  99. package/dist/plugin-env/src/helpers/persistence.cjs +201 -0
  100. package/dist/plugin-env/src/helpers/persistence.mjs +190 -0
  101. package/dist/plugin-env/src/helpers/reflect.cjs +125 -0
  102. package/dist/plugin-env/src/helpers/reflect.mjs +117 -0
  103. package/dist/plugin-env/src/helpers/source-file-env.cjs +24 -0
  104. package/dist/plugin-env/src/helpers/source-file-env.mjs +23 -0
  105. package/dist/plugin-env/src/helpers/template-helpers.cjs +2 -0
  106. package/dist/plugin-env/src/helpers/template-helpers.mjs +4 -0
  107. package/dist/plugin-env/src/index.cjs +177 -0
  108. package/dist/plugin-env/src/index.mjs +175 -0
  109. package/dist/plugin-env/src/types/plugin.d.mts +2 -1
  110. package/dist/powerlines/src/internal/helpers/hooks.d.mts +2 -0
  111. package/dist/powerlines/src/lib/build/esbuild.cjs +93 -0
  112. package/dist/powerlines/src/lib/build/esbuild.mjs +91 -0
  113. package/dist/powerlines/src/lib/constants/environments.cjs +6 -0
  114. package/dist/powerlines/src/lib/constants/environments.mjs +5 -0
  115. package/dist/powerlines/src/lib/entry.cjs +11 -0
  116. package/dist/powerlines/src/lib/entry.mjs +13 -0
  117. package/dist/powerlines/src/lib/logger.cjs +41 -0
  118. package/dist/powerlines/src/lib/logger.mjs +39 -0
  119. package/dist/powerlines/src/lib/typescript/tsconfig.cjs +38 -0
  120. package/dist/powerlines/src/lib/typescript/tsconfig.mjs +35 -0
  121. package/dist/powerlines/src/lib/unplugin/helpers.cjs +3 -0
  122. package/dist/powerlines/src/lib/unplugin/helpers.mjs +5 -0
  123. package/dist/powerlines/src/lib/unplugin/module-resolution.cjs +66 -0
  124. package/dist/powerlines/src/lib/unplugin/module-resolution.mjs +65 -0
  125. package/dist/powerlines/src/lib/unplugin/plugin.cjs +46 -0
  126. package/dist/powerlines/src/lib/unplugin/plugin.mjs +45 -0
  127. package/dist/powerlines/src/lib/utilities/bundle.cjs +42 -0
  128. package/dist/powerlines/src/lib/utilities/bundle.mjs +40 -0
  129. package/dist/powerlines/src/lib/utilities/resolve.cjs +50 -0
  130. package/dist/powerlines/src/lib/utilities/resolve.mjs +49 -0
  131. package/dist/powerlines/src/lib/utilities/source-file.cjs +5 -0
  132. package/dist/powerlines/src/lib/utilities/source-file.mjs +5 -0
  133. package/dist/powerlines/src/plugin-utils/paths.cjs +1 -0
  134. package/dist/powerlines/src/plugin-utils/paths.mjs +3 -0
  135. package/dist/powerlines/src/types/build.cjs +21 -0
  136. package/dist/powerlines/src/types/build.d.mts +6 -6
  137. package/dist/powerlines/src/types/build.mjs +21 -0
  138. package/dist/powerlines/src/types/commands.d.mts +1 -0
  139. package/dist/powerlines/src/types/config.d.mts +3 -2
  140. package/dist/powerlines/src/types/context.d.mts +2 -2
  141. package/dist/powerlines/src/types/plugin.d.mts +1 -1
  142. package/dist/powerlines/src/types/tsconfig.d.mts +1 -1
  143. package/dist/powerlines/src/types/unplugin.d.mts +2 -1
  144. package/package.json +6 -6
@@ -0,0 +1,42 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_esbuild = require('../build/esbuild.cjs');
3
+ const require_plugin = require('../unplugin/plugin.cjs');
4
+ let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
5
+ let defu = require("defu");
6
+ defu = require_rolldown_runtime.__toESM(defu);
7
+ let esbuild = require("esbuild");
8
+ let unplugin = require("unplugin");
9
+
10
+ //#region ../powerlines/src/lib/utilities/bundle.ts
11
+ /**
12
+ * Bundle a type definition to a module.
13
+ *
14
+ * @param context - The context object containing the environment paths.
15
+ * @param file - The file path to bundle.
16
+ * @param overrides - Optional overrides for the ESBuild configuration.
17
+ * @returns A promise that resolves to the bundled module.
18
+ */
19
+ async function bundle(context, file, overrides = {}) {
20
+ const path = await context.fs.resolve(file);
21
+ if (!path || !context.fs.existsSync(path)) throw new Error(`Module not found: "${file}". Please check the path and try again.`);
22
+ const result = await (0, esbuild.build)((0, defu.default)({
23
+ ...require_esbuild.extractESBuildConfig(context),
24
+ entryPoints: [path],
25
+ write: false,
26
+ sourcemap: false,
27
+ splitting: false,
28
+ treeShaking: false,
29
+ bundle: true,
30
+ packages: "bundle",
31
+ platform: "node",
32
+ logLevel: "silent",
33
+ ...overrides
34
+ }, { plugins: [(0, unplugin.createEsbuildPlugin)(require_plugin.createUnpluginResolver(context, `${(0, __stryke_path_file_path_fns.findFileName)(file)} Bundler`))({})] }));
35
+ if (result.errors.length > 0) throw new Error(`Failed to bundle ${file}: ${result.errors.map((error) => error.text).join(", ")}`);
36
+ if (result.warnings.length > 0) context.warn(`Warnings while bundling ${file}: ${result.warnings.map((warning) => warning.text).join(", ")}`);
37
+ if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) throw new Error(`No output files generated for ${file}. Please check the configuration and try again.`);
38
+ return result.outputFiles.filter(Boolean)[0];
39
+ }
40
+
41
+ //#endregion
42
+ exports.bundle = bundle;
@@ -0,0 +1,40 @@
1
+ import { extractESBuildConfig } from "../build/esbuild.mjs";
2
+ import { createUnpluginResolver } from "../unplugin/plugin.mjs";
3
+ import { findFileName } from "@stryke/path/file-path-fns";
4
+ import defu from "defu";
5
+ import { build } from "esbuild";
6
+ import { createEsbuildPlugin } from "unplugin";
7
+
8
+ //#region ../powerlines/src/lib/utilities/bundle.ts
9
+ /**
10
+ * Bundle a type definition to a module.
11
+ *
12
+ * @param context - The context object containing the environment paths.
13
+ * @param file - The file path to bundle.
14
+ * @param overrides - Optional overrides for the ESBuild configuration.
15
+ * @returns A promise that resolves to the bundled module.
16
+ */
17
+ async function bundle(context, file, overrides = {}) {
18
+ const path = await context.fs.resolve(file);
19
+ if (!path || !context.fs.existsSync(path)) throw new Error(`Module not found: "${file}". Please check the path and try again.`);
20
+ const result = await build(defu({
21
+ ...extractESBuildConfig(context),
22
+ entryPoints: [path],
23
+ write: false,
24
+ sourcemap: false,
25
+ splitting: false,
26
+ treeShaking: false,
27
+ bundle: true,
28
+ packages: "bundle",
29
+ platform: "node",
30
+ logLevel: "silent",
31
+ ...overrides
32
+ }, { plugins: [createEsbuildPlugin(createUnpluginResolver(context, `${findFileName(file)} Bundler`))({})] }));
33
+ if (result.errors.length > 0) throw new Error(`Failed to bundle ${file}: ${result.errors.map((error) => error.text).join(", ")}`);
34
+ if (result.warnings.length > 0) context.warn(`Warnings while bundling ${file}: ${result.warnings.map((warning) => warning.text).join(", ")}`);
35
+ if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) throw new Error(`No output files generated for ${file}. Please check the configuration and try again.`);
36
+ return result.outputFiles.filter(Boolean)[0];
37
+ }
38
+
39
+ //#endregion
40
+ export { bundle };
@@ -0,0 +1,50 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_bundle = require('./bundle.cjs');
3
+ let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
4
+ let __stryke_convert_parse_type_definition = require("@stryke/convert/parse-type-definition");
5
+
6
+ //#region ../powerlines/src/lib/utilities/resolve.ts
7
+ /**
8
+ * Compiles a type definition to a module.
9
+ *
10
+ * @param context - The context object containing the environment paths.
11
+ * @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.
12
+ * @param overrides - Optional overrides for the ESBuild configuration.
13
+ * @returns A promise that resolves to the compiled module.
14
+ */
15
+ async function resolve(context, type, overrides = {}) {
16
+ let typeDefinition;
17
+ if ((0, __stryke_type_checks_is_set_string.isSetString)(type)) typeDefinition = (0, __stryke_convert_parse_type_definition.parseTypeDefinition)(type);
18
+ else typeDefinition = type;
19
+ const result = await require_bundle.bundle(context, typeDefinition.file, overrides);
20
+ let resolved;
21
+ try {
22
+ resolved = await context.resolver.evalModule(result.text, {
23
+ filename: result.path,
24
+ forceTranspile: true
25
+ });
26
+ } catch (error) {
27
+ if ((0, __stryke_type_checks_is_set_string.isSetString)(error.message) && (/* @__PURE__ */ new RegExp(`Cannot find module '${context.config.framework || "powerlines"}:.*'`)).test(error.message)) {
28
+ const moduleName = error.message.match(/* @__PURE__ */ new RegExp(`Cannot find module '(${context.config.framework || "powerlines"}:.*)'`))?.[1];
29
+ throw new Error(`The module "${moduleName}" could not be resolved while evaluating "${typeDefinition.file}". It is possible the required built-in modules have not yet been generated. Please check the order of your plugins. ${context.config.logLevel === "debug" || context.config.logLevel === "trace" ? `
30
+
31
+ Bundle output for module:
32
+ ${result.text}` : ""}`);
33
+ }
34
+ throw new Error(`Failed to evaluate the bundled module for "${typeDefinition.file}". Error: ${error.message}${context.config.logLevel === "debug" || context.config.logLevel === "trace" ? `
35
+
36
+ Bundle output for module:
37
+ ${result.text}` : ""}`);
38
+ }
39
+ let exportName = typeDefinition.name;
40
+ if (!exportName) exportName = "default";
41
+ const resolvedExport = resolved[exportName] ?? resolved[`__Ω${exportName}`];
42
+ if (resolvedExport === void 0) throw new Error(`The export "${exportName}" could not be resolved in the "${typeDefinition.file}" module. ${Object.keys(resolved).length === 0 ? `After bundling, no exports were found in the module. Please ensure that the "${typeDefinition.file}" module has a "${exportName}" export with the desired value.` : `After bundling, the available exports were: ${Object.keys(resolved).join(", ")}. Please ensure that the export exists and is correctly named.`}${context.config.logLevel === "debug" ? `
43
+
44
+ Bundle output for module:
45
+ ${result.text}` : ""}`);
46
+ return resolvedExport;
47
+ }
48
+
49
+ //#endregion
50
+ exports.resolve = resolve;
@@ -0,0 +1,49 @@
1
+ import { bundle } from "./bundle.mjs";
2
+ import { isSetString } from "@stryke/type-checks/is-set-string";
3
+ import { parseTypeDefinition } from "@stryke/convert/parse-type-definition";
4
+
5
+ //#region ../powerlines/src/lib/utilities/resolve.ts
6
+ /**
7
+ * Compiles a type definition to a module.
8
+ *
9
+ * @param context - The context object containing the environment paths.
10
+ * @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.
11
+ * @param overrides - Optional overrides for the ESBuild configuration.
12
+ * @returns A promise that resolves to the compiled module.
13
+ */
14
+ async function resolve(context, type, overrides = {}) {
15
+ let typeDefinition;
16
+ if (isSetString(type)) typeDefinition = parseTypeDefinition(type);
17
+ else typeDefinition = type;
18
+ const result = await bundle(context, typeDefinition.file, overrides);
19
+ let resolved;
20
+ try {
21
+ resolved = await context.resolver.evalModule(result.text, {
22
+ filename: result.path,
23
+ forceTranspile: true
24
+ });
25
+ } catch (error) {
26
+ if (isSetString(error.message) && (/* @__PURE__ */ new RegExp(`Cannot find module '${context.config.framework || "powerlines"}:.*'`)).test(error.message)) {
27
+ const moduleName = error.message.match(/* @__PURE__ */ new RegExp(`Cannot find module '(${context.config.framework || "powerlines"}:.*)'`))?.[1];
28
+ throw new Error(`The module "${moduleName}" could not be resolved while evaluating "${typeDefinition.file}". It is possible the required built-in modules have not yet been generated. Please check the order of your plugins. ${context.config.logLevel === "debug" || context.config.logLevel === "trace" ? `
29
+
30
+ Bundle output for module:
31
+ ${result.text}` : ""}`);
32
+ }
33
+ throw new Error(`Failed to evaluate the bundled module for "${typeDefinition.file}". Error: ${error.message}${context.config.logLevel === "debug" || context.config.logLevel === "trace" ? `
34
+
35
+ Bundle output for module:
36
+ ${result.text}` : ""}`);
37
+ }
38
+ let exportName = typeDefinition.name;
39
+ if (!exportName) exportName = "default";
40
+ const resolvedExport = resolved[exportName] ?? resolved[`__Ω${exportName}`];
41
+ if (resolvedExport === void 0) throw new Error(`The export "${exportName}" could not be resolved in the "${typeDefinition.file}" module. ${Object.keys(resolved).length === 0 ? `After bundling, no exports were found in the module. Please ensure that the "${typeDefinition.file}" module has a "${exportName}" export with the desired value.` : `After bundling, the available exports were: ${Object.keys(resolved).join(", ")}. Please ensure that the export exists and is correctly named.`}${context.config.logLevel === "debug" ? `
42
+
43
+ Bundle output for module:
44
+ ${result.text}` : ""}`);
45
+ return resolvedExport;
46
+ }
47
+
48
+ //#endregion
49
+ export { resolve };
@@ -0,0 +1,5 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
3
+ let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
4
+ require("@stryke/fs/read-file");
5
+ require("magic-string");
@@ -0,0 +1,5 @@
1
+ import { isSetObject } from "@stryke/type-checks/is-set-object";
2
+ import { isString } from "@stryke/type-checks/is-string";
3
+ import "@stryke/fs/read-file";
4
+
5
+ export { };
@@ -0,0 +1 @@
1
+ let __stryke_path_replace = require("@stryke/path/replace");
@@ -0,0 +1,3 @@
1
+ import { replacePath } from "@stryke/path/replace";
2
+
3
+ export { };
@@ -0,0 +1,21 @@
1
+
2
+ //#region ../powerlines/src/types/build.ts
3
+ const UNPLUGIN_BUILDER_VARIANTS = [
4
+ "rollup",
5
+ "webpack",
6
+ "rspack",
7
+ "vite",
8
+ "esbuild",
9
+ "farm",
10
+ "unloader",
11
+ "rolldown",
12
+ "bun"
13
+ ];
14
+ const BUILDER_VARIANTS = [
15
+ ...UNPLUGIN_BUILDER_VARIANTS,
16
+ "tsup",
17
+ "tsdown",
18
+ "unbuild"
19
+ ];
20
+
21
+ //#endregion
@@ -1,9 +1,9 @@
1
+ import { BuildOptions } from "esbuild";
1
2
  import { DepOptimizationOptions, UserConfig } from "vite";
2
3
  import { UserConfig as UserConfig$1 } from "@farmfe/core";
3
4
  import { Configuration } from "@rspack/core";
4
- import { BuildOptions } from "@storm-software/tsup/types";
5
+ import { BuildOptions as BuildOptions$1 } from "@storm-software/tsup/types";
5
6
  import { UnbuildOptions } from "@storm-software/unbuild/types";
6
- import { BuildOptions as BuildOptions$1 } from "esbuild";
7
7
  import { RolldownOptions } from "rolldown";
8
8
  import { OutputOptions, RollupOptions } from "rollup";
9
9
  import { UserConfig as UserConfig$2 } from "tsdown";
@@ -153,8 +153,8 @@ interface BuildConfig {
153
153
  override?: Record<string, any>;
154
154
  }
155
155
  type BuildResolvedConfig = Omit<BuildConfig, "override">;
156
- type ESBuildBuildConfig = Omit<BuildOptions$1, "entryPoints" | "sourceRoot" | "platform" | "outdir" | "env" | "assets" | "external" | "inject" | "tsconfig" | "tsconfigRaw" | "logLevel"> & BuildConfig;
157
- type ESBuildResolvedBuildConfig = Omit<BuildOptions$1, "inject"> & BuildResolvedConfig;
156
+ type ESBuildBuildConfig = Omit<BuildOptions, "entryPoints" | "sourceRoot" | "platform" | "outdir" | "env" | "assets" | "external" | "inject" | "tsconfig" | "tsconfigRaw" | "logLevel"> & BuildConfig;
157
+ type ESBuildResolvedBuildConfig = Omit<BuildOptions, "inject"> & BuildResolvedConfig;
158
158
  type ViteBuildConfig = Omit<UserConfig, "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw" | "environments" | "output"> & BuildConfig & {
159
159
  /**
160
160
  * Optimize deps config
@@ -173,8 +173,8 @@ type RollupBuildConfig = Omit<RollupOptions, "entry" | "external" | "input" | "o
173
173
  type RollupResolvedBuildConfig = RollupOptions & BuildResolvedConfig;
174
174
  type RolldownBuildConfig = Omit<RolldownOptions, "input" | "external" | "tsconfig" | "logLevel" | "output"> & BuildConfig;
175
175
  type RolldownResolvedBuildConfig = RolldownOptions & BuildResolvedConfig;
176
- type TsupBuildConfig = Partial<Omit<BuildOptions, "userOptions" | "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "clean" | "env" | "entry" | "entryPoints" | "external" | "noExternal" | "skipNodeModulesBundle">> & BuildConfig;
177
- type TsupResolvedBuildConfig = BuildOptions & BuildResolvedConfig;
176
+ type TsupBuildConfig = Partial<Omit<BuildOptions$1, "userOptions" | "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "clean" | "env" | "entry" | "entryPoints" | "external" | "noExternal" | "skipNodeModulesBundle">> & BuildConfig;
177
+ type TsupResolvedBuildConfig = BuildOptions$1 & BuildResolvedConfig;
178
178
  type TsdownBuildConfig = Partial<Omit<UserConfig$2, "name" | "outDir" | "clean" | "cwd" | "tsconfig" | "publicDir" | "copy" | "alias" | "format" | "platform" | "env" | "define" | "entry" | "external" | "noExternal" | "skipNodeModulesBundle">> & BuildConfig;
179
179
  type TsdownResolvedBuildConfig = UserConfig$2 & BuildResolvedConfig;
180
180
  type UnbuildBuildConfig = Partial<Omit<UnbuildOptions, "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "env" | "entry" | "entryPoints">> & BuildConfig;
@@ -0,0 +1,21 @@
1
+ //#region ../powerlines/src/types/build.ts
2
+ const UNPLUGIN_BUILDER_VARIANTS = [
3
+ "rollup",
4
+ "webpack",
5
+ "rspack",
6
+ "vite",
7
+ "esbuild",
8
+ "farm",
9
+ "unloader",
10
+ "rolldown",
11
+ "bun"
12
+ ];
13
+ const BUILDER_VARIANTS = [
14
+ ...UNPLUGIN_BUILDER_VARIANTS,
15
+ "tsup",
16
+ "tsdown",
17
+ "unbuild"
18
+ ];
19
+
20
+ //#endregion
21
+ export { };
@@ -1,3 +1,4 @@
1
+ import "./context.mjs";
1
2
  import { MaybePromise } from "@stryke/types/base";
2
3
  import { ArrayValues } from "@stryke/types/array";
3
4
 
@@ -4,13 +4,14 @@ import { Plugin } from "./plugin.mjs";
4
4
  import { TSConfig } from "./tsconfig.mjs";
5
5
  import { PluginContext } from "./context.mjs";
6
6
  import { BabelTransformPluginOptions } from "./babel.mjs";
7
+ import { transformAsync } from "@babel/core";
8
+ import { LogLevelLabel } from "@storm-software/config-tools/types";
9
+ import "c12";
7
10
  import { MaybePromise } from "@stryke/types/base";
8
11
  import { AssetGlob } from "@stryke/types/file";
9
12
  import { TypeDefinitionParameter } from "@stryke/types/configuration";
10
13
  import { PreviewOptions } from "vite";
11
- import { transformAsync } from "@babel/core";
12
14
  import { Format } from "@storm-software/build-tools/types";
13
- import { LogLevelLabel } from "@storm-software/config-tools/types";
14
15
  import { StormWorkspaceConfig } from "@storm-software/config/types";
15
16
  import { DateString } from "compatx";
16
17
 
@@ -4,16 +4,16 @@ import { HooksList, InferHooksListItem } from "./hooks.mjs";
4
4
  import { ParsedTypeScriptConfig } from "./tsconfig.mjs";
5
5
  import { InlineConfig, LogFn, UserConfig, WorkspaceConfig } from "./config.mjs";
6
6
  import { EnvironmentResolvedConfig, ResolvedConfig, ResolvedEntryTypeDefinition } from "./resolved.mjs";
7
+ import { ExternalIdResult, UnpluginBuildContext, UnpluginContext, UnpluginMessage } from "unplugin";
8
+ import { SourceMap } from "magic-string";
7
9
  import { NonUndefined } from "@stryke/types/base";
8
10
  import { EnvPaths } from "@stryke/env/get-env-paths";
9
11
  import { FetchRequestOptions } from "@stryke/http/fetch";
10
12
  import { PackageJson } from "@stryke/types/package-json";
11
13
  import { Jiti } from "jiti";
12
- import { SourceMap } from "magic-string";
13
14
  import { ParseResult, ParserOptions } from "oxc-parser";
14
15
  import { Range } from "semver";
15
16
  import { RequestInfo, Response } from "undici";
16
- import { ExternalIdResult, UnpluginBuildContext, UnpluginContext, UnpluginMessage } from "unplugin";
17
17
 
18
18
  //#region ../powerlines/src/types/context.d.ts
19
19
 
@@ -4,9 +4,9 @@ import { InferUnpluginOptions } from "./unplugin.mjs";
4
4
  import { BuildPluginContext, PluginContext, UnresolvedContext } from "./context.mjs";
5
5
  import { EnvironmentConfig, PluginConfig } from "./config.mjs";
6
6
  import { EnvironmentResolvedConfig, ResolvedConfig } from "./resolved.mjs";
7
+ import { ExternalIdResult, HookFilter, TransformResult } from "unplugin";
7
8
  import { AnyFunction, MaybePromise } from "@stryke/types/base";
8
9
  import { LoadResult } from "rollup";
9
- import { ExternalIdResult, HookFilter, TransformResult } from "unplugin";
10
10
  import { ArrayValues } from "@stryke/types/array";
11
11
 
12
12
  //#region ../powerlines/src/types/plugin.d.ts
@@ -1,5 +1,5 @@
1
- import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
2
1
  import ts from "typescript";
2
+ import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
3
3
 
4
4
  //#region ../powerlines/src/types/tsconfig.d.ts
5
5
  type ReflectionMode = "default" | "explicit" | "never";
@@ -2,9 +2,10 @@ import { BuilderVariant, InferUnpluginVariant, UnpluginBuilderVariant } from "./
2
2
  import { API } from "./api.mjs";
3
3
  import { PluginHook } from "./plugin.mjs";
4
4
  import { Context } from "./context.mjs";
5
+ import "./config.mjs";
5
6
  import { InferResolvedConfig } from "./resolved.mjs";
6
- import { MaybePromise } from "@stryke/types/base";
7
7
  import { HookFilter, UnpluginOptions } from "unplugin";
8
+ import { MaybePromise } from "@stryke/types/base";
8
9
 
9
10
  //#region ../powerlines/src/types/unplugin.d.ts
10
11
  interface UnpluginOptions$1<TUnpluginBuilderVariant extends UnpluginBuilderVariant = UnpluginBuilderVariant> extends UnpluginOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-nodejs",
3
- "version": "0.1.115",
3
+ "version": "0.1.117",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for building a Node.js application.",
6
6
  "repository": {
@@ -141,10 +141,10 @@
141
141
  "dependencies": {
142
142
  "@alloy-js/core": "^0.22.0",
143
143
  "@alloy-js/typescript": "^0.22.0",
144
- "@powerlines/plugin-alloy": "^0.18.112",
145
- "@powerlines/plugin-babel": "^0.12.231",
146
- "@powerlines/plugin-env": "^0.15.120",
147
- "@powerlines/plugin-plugin": "^0.12.173",
144
+ "@powerlines/plugin-alloy": "^0.18.114",
145
+ "@powerlines/plugin-babel": "^0.12.232",
146
+ "@powerlines/plugin-env": "^0.15.122",
147
+ "@powerlines/plugin-plugin": "^0.12.174",
148
148
  "@storm-software/config-tools": "^1.189.0",
149
149
  "@stryke/string-format": "^0.13.4",
150
150
  "defu": "^6.1.4",
@@ -152,5 +152,5 @@
152
152
  },
153
153
  "devDependencies": { "@types/node": "^24.10.9" },
154
154
  "publishConfig": { "access": "public" },
155
- "gitHead": "f7483367fc2dba244e8d11af31db5b1071e0a888"
155
+ "gitHead": "2852dab8ff7cad2d1aa4a44d7fd2479d62f65d47"
156
156
  }