@powerlines/plugin-nodejs 0.1.117 → 0.1.119

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 (194) hide show
  1. package/dist/components/env.cjs +14 -14
  2. package/dist/components/env.d.cts +1 -1
  3. package/dist/components/env.d.mts +1 -1
  4. package/dist/components/env.mjs +6 -6
  5. package/dist/index.cjs +8 -6
  6. package/dist/index.d.cts +1 -1
  7. package/dist/index.d.mts +1 -1
  8. package/dist/index.mjs +5 -5
  9. package/dist/types/plugin.d.cts +2 -2
  10. package/dist/types/plugin.d.mts +2 -2
  11. package/package.json +6 -6
  12. package/dist/deepkit/schemas/reflection.cjs +0 -3998
  13. package/dist/deepkit/schemas/reflection.d.cts +0 -1560
  14. package/dist/deepkit/schemas/reflection.d.mts +0 -1560
  15. package/dist/deepkit/schemas/reflection.mjs +0 -3996
  16. package/dist/deepkit/schemas/reflection2.cjs +0 -4112
  17. package/dist/deepkit/schemas/reflection2.mjs +0 -4110
  18. package/dist/deepkit/src/capnp.cjs +0 -913
  19. package/dist/deepkit/src/capnp.mjs +0 -911
  20. package/dist/deepkit/src/esbuild-plugin.cjs +0 -47
  21. package/dist/deepkit/src/esbuild-plugin.mjs +0 -46
  22. package/dist/deepkit/src/reflect-type.cjs +0 -22
  23. package/dist/deepkit/src/reflect-type.mjs +0 -20
  24. package/dist/deepkit/src/resolve-reflections.cjs +0 -16
  25. package/dist/deepkit/src/resolve-reflections.mjs +0 -15
  26. package/dist/deepkit/src/transformer.cjs +0 -52
  27. package/dist/deepkit/src/transformer.mjs +0 -49
  28. package/dist/deepkit/src/transpile.cjs +0 -29
  29. package/dist/deepkit/src/transpile.mjs +0 -27
  30. package/dist/deepkit/src/types.d.cts +0 -10
  31. package/dist/deepkit/src/types.d.mts +0 -10
  32. package/dist/deepkit/src/utilities.cjs +0 -67
  33. package/dist/deepkit/src/utilities.mjs +0 -66
  34. package/dist/plugin-alloy/src/core/components/output.cjs +0 -43
  35. package/dist/plugin-alloy/src/core/components/output.mjs +0 -42
  36. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -22
  37. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -21
  38. package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -64
  39. package/dist/plugin-alloy/src/core/components/source-file.d.cts +0 -23
  40. package/dist/plugin-alloy/src/core/components/source-file.d.mts +0 -23
  41. package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -62
  42. package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -49
  43. package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -44
  44. package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
  45. package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
  46. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -46
  47. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -42
  48. package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -16
  49. package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -15
  50. package/dist/plugin-alloy/src/index.cjs +0 -105
  51. package/dist/plugin-alloy/src/index.mjs +0 -103
  52. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -115
  53. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -114
  54. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -39
  55. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -38
  56. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -18
  57. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -17
  58. package/dist/plugin-alloy/src/types/components.d.cts +0 -20
  59. package/dist/plugin-alloy/src/types/components.d.mts +0 -21
  60. package/dist/plugin-alloy/src/types/index.d.cts +0 -2
  61. package/dist/plugin-alloy/src/types/index.d.mts +0 -2
  62. package/dist/plugin-alloy/src/types/plugin.d.cts +0 -36
  63. package/dist/plugin-alloy/src/types/plugin.d.mts +0 -36
  64. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -62
  65. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +0 -26
  66. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +0 -26
  67. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -61
  68. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -131
  69. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -129
  70. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -451
  71. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +0 -37
  72. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +0 -37
  73. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -442
  74. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -216
  75. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +0 -16
  76. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +0 -16
  77. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -213
  78. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -72
  79. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.cts +0 -4
  80. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.mts +0 -4
  81. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -71
  82. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -124
  83. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -123
  84. package/dist/plugin-automd/src/index.cjs +0 -101
  85. package/dist/plugin-automd/src/index.mjs +0 -98
  86. package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
  87. package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
  88. package/dist/plugin-automd/src/types/toc.d.cts +0 -33
  89. package/dist/plugin-automd/src/types/toc.d.mts +0 -33
  90. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -10
  91. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -9
  92. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -41
  93. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -39
  94. package/dist/plugin-babel/src/helpers/filters.cjs +0 -23
  95. package/dist/plugin-babel/src/helpers/filters.mjs +0 -21
  96. package/dist/plugin-babel/src/helpers/index.cjs +0 -5
  97. package/dist/plugin-babel/src/helpers/index.mjs +0 -7
  98. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -38
  99. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -35
  100. package/dist/plugin-babel/src/helpers/options.cjs +0 -49
  101. package/dist/plugin-babel/src/helpers/options.mjs +0 -46
  102. package/dist/plugin-babel/src/index.cjs +0 -85
  103. package/dist/plugin-babel/src/index.mjs +0 -83
  104. package/dist/plugin-babel/src/types/index.d.mts +0 -1
  105. package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
  106. package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
  107. package/dist/plugin-env/src/babel/index.cjs +0 -1
  108. package/dist/plugin-env/src/babel/index.mjs +0 -3
  109. package/dist/plugin-env/src/babel/plugin.cjs +0 -70
  110. package/dist/plugin-env/src/babel/plugin.mjs +0 -69
  111. package/dist/plugin-env/src/components/docs.cjs +0 -70
  112. package/dist/plugin-env/src/components/docs.mjs +0 -69
  113. package/dist/plugin-env/src/components/env.cjs +0 -589
  114. package/dist/plugin-env/src/components/env.d.cts +0 -11
  115. package/dist/plugin-env/src/components/env.d.mts +0 -11
  116. package/dist/plugin-env/src/components/env.mjs +0 -586
  117. package/dist/plugin-env/src/components/index.cjs +0 -2
  118. package/dist/plugin-env/src/components/index.mjs +0 -4
  119. package/dist/plugin-env/src/helpers/automd-generator.cjs +0 -22
  120. package/dist/plugin-env/src/helpers/automd-generator.mjs +0 -21
  121. package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +0 -55
  122. package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +0 -54
  123. package/dist/plugin-env/src/helpers/docs-helper.cjs +0 -16
  124. package/dist/plugin-env/src/helpers/docs-helper.mjs +0 -15
  125. package/dist/plugin-env/src/helpers/index.cjs +0 -6
  126. package/dist/plugin-env/src/helpers/index.mjs +0 -8
  127. package/dist/plugin-env/src/helpers/load.cjs +0 -84
  128. package/dist/plugin-env/src/helpers/load.mjs +0 -81
  129. package/dist/plugin-env/src/helpers/persistence.cjs +0 -201
  130. package/dist/plugin-env/src/helpers/persistence.mjs +0 -190
  131. package/dist/plugin-env/src/helpers/reflect.cjs +0 -125
  132. package/dist/plugin-env/src/helpers/reflect.mjs +0 -117
  133. package/dist/plugin-env/src/helpers/source-file-env.cjs +0 -24
  134. package/dist/plugin-env/src/helpers/source-file-env.mjs +0 -23
  135. package/dist/plugin-env/src/helpers/template-helpers.cjs +0 -2
  136. package/dist/plugin-env/src/helpers/template-helpers.mjs +0 -4
  137. package/dist/plugin-env/src/index.cjs +0 -177
  138. package/dist/plugin-env/src/index.mjs +0 -175
  139. package/dist/plugin-env/src/types/plugin.d.cts +0 -149
  140. package/dist/plugin-env/src/types/plugin.d.mts +0 -150
  141. package/dist/plugin-env/src/types/runtime.d.cts +0 -789
  142. package/dist/plugin-env/src/types/runtime.d.mts +0 -789
  143. package/dist/powerlines/src/internal/helpers/hooks.d.cts +0 -47
  144. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -49
  145. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -93
  146. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -91
  147. package/dist/powerlines/src/lib/constants/environments.cjs +0 -6
  148. package/dist/powerlines/src/lib/constants/environments.mjs +0 -5
  149. package/dist/powerlines/src/lib/entry.cjs +0 -11
  150. package/dist/powerlines/src/lib/entry.mjs +0 -13
  151. package/dist/powerlines/src/lib/logger.cjs +0 -41
  152. package/dist/powerlines/src/lib/logger.mjs +0 -39
  153. package/dist/powerlines/src/lib/typescript/tsconfig.cjs +0 -38
  154. package/dist/powerlines/src/lib/typescript/tsconfig.mjs +0 -35
  155. package/dist/powerlines/src/lib/unplugin/helpers.cjs +0 -3
  156. package/dist/powerlines/src/lib/unplugin/helpers.mjs +0 -5
  157. package/dist/powerlines/src/lib/unplugin/module-resolution.cjs +0 -66
  158. package/dist/powerlines/src/lib/unplugin/module-resolution.mjs +0 -65
  159. package/dist/powerlines/src/lib/unplugin/plugin.cjs +0 -46
  160. package/dist/powerlines/src/lib/unplugin/plugin.mjs +0 -45
  161. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -42
  162. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -40
  163. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -50
  164. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -49
  165. package/dist/powerlines/src/lib/utilities/source-file.cjs +0 -5
  166. package/dist/powerlines/src/lib/utilities/source-file.mjs +0 -5
  167. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
  168. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -3
  169. package/dist/powerlines/src/types/api.d.cts +0 -104
  170. package/dist/powerlines/src/types/api.d.mts +0 -104
  171. package/dist/powerlines/src/types/babel.d.cts +0 -22
  172. package/dist/powerlines/src/types/babel.d.mts +0 -22
  173. package/dist/powerlines/src/types/build.cjs +0 -21
  174. package/dist/powerlines/src/types/build.d.cts +0 -185
  175. package/dist/powerlines/src/types/build.d.mts +0 -185
  176. package/dist/powerlines/src/types/build.mjs +0 -21
  177. package/dist/powerlines/src/types/commands.d.cts +0 -8
  178. package/dist/powerlines/src/types/commands.d.mts +0 -9
  179. package/dist/powerlines/src/types/config.d.cts +0 -435
  180. package/dist/powerlines/src/types/config.d.mts +0 -436
  181. package/dist/powerlines/src/types/context.d.cts +0 -514
  182. package/dist/powerlines/src/types/context.d.mts +0 -514
  183. package/dist/powerlines/src/types/fs.d.cts +0 -486
  184. package/dist/powerlines/src/types/fs.d.mts +0 -486
  185. package/dist/powerlines/src/types/hooks.d.cts +0 -32
  186. package/dist/powerlines/src/types/hooks.d.mts +0 -32
  187. package/dist/powerlines/src/types/plugin.d.cts +0 -205
  188. package/dist/powerlines/src/types/plugin.d.mts +0 -205
  189. package/dist/powerlines/src/types/resolved.d.cts +0 -94
  190. package/dist/powerlines/src/types/resolved.d.mts +0 -94
  191. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  192. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  193. package/dist/powerlines/src/types/unplugin.d.cts +0 -22
  194. package/dist/powerlines/src/types/unplugin.d.mts +0 -23
@@ -1,185 +0,0 @@
1
- import { DepOptimizationOptions, UserConfig } from "vite";
2
- import { UserConfig as UserConfig$1 } from "@farmfe/core";
3
- import { Configuration } from "@rspack/core";
4
- import { BuildOptions } from "@storm-software/tsup/types";
5
- import { UnbuildOptions } from "@storm-software/unbuild/types";
6
- import { BuildOptions as BuildOptions$1 } from "esbuild";
7
- import { RolldownOptions } from "rolldown";
8
- import { OutputOptions, RollupOptions } from "rollup";
9
- import { UserConfig as UserConfig$2 } from "tsdown";
10
- import { Configuration as Configuration$1 } from "webpack";
11
-
12
- //#region ../powerlines/src/types/build.d.ts
13
- type UnpluginBuilderVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown" | "bun";
14
- type BuilderVariant = UnpluginBuilderVariant | "tsup" | "tsdown" | "unbuild";
15
- type InferUnpluginVariant<TBuildVariant extends BuilderVariant> = TBuildVariant extends "tsup" ? "esbuild" : TBuildVariant extends "tsdown" ? "rolldown" : TBuildVariant extends "unbuild" ? "rollup" : TBuildVariant;
16
- interface BuildConfig {
17
- /**
18
- * The platform to build the project for
19
- *
20
- * @defaultValue "neutral"
21
- */
22
- platform?: "node" | "browser" | "neutral";
23
- /**
24
- * Array of strings indicating the polyfills to include for the build.
25
- *
26
- * @remarks
27
- * This option allows you to specify which polyfills should be included in the build process to ensure compatibility with the target environment. The paths for the polyfills can use placeholder tokens (the `replacePathTokens` helper function will be used to resolve the actual values).
28
- *
29
- * @example
30
- * ```ts
31
- * {
32
- * polyfill: ['{projectRoot}/custom-polyfill.ts']
33
- * }
34
- * ```
35
- */
36
- polyfill?: string[];
37
- /**
38
- * Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
39
- *
40
- * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
41
- */
42
- mainFields?: string[];
43
- /**
44
- * Array of strings indicating what conditions should be used for module resolution.
45
- */
46
- conditions?: string[];
47
- /**
48
- * Array of strings indicating what file extensions should be used for module resolution.
49
- *
50
- * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
51
- */
52
- extensions?: string[];
53
- /**
54
- * Array of strings indicating what modules should be deduplicated to a single version in the build.
55
- *
56
- * @remarks
57
- * This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
58
- */
59
- dedupe?: string[];
60
- /**
61
- * Array of strings or regular expressions that indicate what modules are builtin for the environment.
62
- */
63
- builtins?: (string | RegExp)[];
64
- /**
65
- * Define global variable replacements.
66
- *
67
- * @remarks
68
- * This option allows you to specify global constants that will be replaced in the code during the build process. It is similar to the `define` option in esbuild and Vite, enabling you to replace specific identifiers with constant expressions at build time.
69
- *
70
- * @example
71
- * ```ts
72
- * {
73
- * define: {
74
- * __VERSION__: '"1.0.0"',
75
- * __DEV__: 'process.env.NODE_ENV !== "production"'
76
- * }
77
- * }
78
- * ```
79
- *
80
- * @see https://esbuild.github.io/api/#define
81
- * @see https://vitejs.dev/config/build-options.html#define
82
- * @see https://github.com/rollup/plugins/tree/master/packages/replace
83
- */
84
- define?: Record<string, any>;
85
- /**
86
- * Global variables that will have import statements injected where necessary
87
- *
88
- * @remarks
89
- * This option allows you to specify global variables that should be automatically imported from specified modules whenever they are used in the code. This is particularly useful for polyfilling Node.js globals in a browser environment.
90
- *
91
- * @example
92
- * ```ts
93
- * {
94
- * inject: {
95
- * process: 'process/browser',
96
- * Buffer: ['buffer', 'Buffer'],
97
- * }
98
- * }
99
- * ```
100
- *
101
- * @see https://github.com/rollup/plugins/tree/master/packages/inject
102
- */
103
- inject?: Record<string, string | string[]>;
104
- /**
105
- * The alias mappings to use for module resolution during the build process.
106
- *
107
- * @remarks
108
- * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
109
- *
110
- * @example
111
- * ```ts
112
- * {
113
- * alias: {
114
- * "@utils": "./src/utils",
115
- * "@components": "./src/components"
116
- * }
117
- * }
118
- * ```
119
- *
120
- * @see https://github.com/rollup/plugins/tree/master/packages/alias
121
- */
122
- alias?: Record<string, string> | Array<{
123
- find: string | RegExp;
124
- replacement: string;
125
- }>;
126
- /**
127
- * A list of modules that should not be bundled, even if they are external dependencies.
128
- *
129
- * @remarks
130
- * This option is useful for excluding specific modules from the bundle, such as Node.js built-in modules or other libraries that should not be bundled.
131
- */
132
- external?: (string | RegExp)[];
133
- /**
134
- * A list of modules that should always be bundled, even if they are external dependencies.
135
- */
136
- noExternal?: (string | RegExp)[];
137
- /**
138
- * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
139
- */
140
- skipNodeModulesBundle?: boolean;
141
- /**
142
- * If true, `process.env` referenced in code will be preserved as-is and evaluated in runtime. Otherwise, it is statically replaced as an empty object.
143
- *
144
- * @defaultValue false
145
- */
146
- keepProcessEnv?: boolean;
147
- /**
148
- * An optional set of override options to apply to the selected build variant.
149
- *
150
- * @remarks
151
- * This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
152
- */
153
- override?: Record<string, any>;
154
- }
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;
158
- type ViteBuildConfig = Omit<UserConfig, "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw" | "environments" | "output"> & BuildConfig & {
159
- /**
160
- * Optimize deps config
161
- */
162
- optimizeDeps?: Omit<DepOptimizationOptions, "extensions">;
163
- };
164
- type ViteResolvedBuildConfig = UserConfig & BuildResolvedConfig;
165
- type WebpackBuildConfig = Omit<Configuration$1, "name" | "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw"> & BuildConfig;
166
- type WebpackResolvedBuildConfig = Configuration$1 & BuildResolvedConfig;
167
- type RspackBuildConfig = Omit<Configuration, "name" | "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw"> & BuildConfig;
168
- type RspackResolvedBuildConfig = Configuration & BuildResolvedConfig;
169
- type RollupBuildOutputConfig = Omit<OutputOptions, "dir" | "format">;
170
- type RollupBuildConfig = Omit<RollupOptions, "entry" | "external" | "input" | "output" | "logLevel"> & {
171
- output: RollupBuildOutputConfig | RollupBuildOutputConfig[];
172
- } & BuildConfig;
173
- type RollupResolvedBuildConfig = RollupOptions & BuildResolvedConfig;
174
- type RolldownBuildConfig = Omit<RolldownOptions, "input" | "external" | "tsconfig" | "logLevel" | "output"> & BuildConfig;
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;
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
- type TsdownResolvedBuildConfig = UserConfig$2 & BuildResolvedConfig;
180
- type UnbuildBuildConfig = Partial<Omit<UnbuildOptions, "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "env" | "entry" | "entryPoints">> & BuildConfig;
181
- type UnbuildResolvedBuildConfig = UnbuildOptions & BuildResolvedConfig;
182
- type FarmBuildConfig = Partial<Omit<UserConfig$1, "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "env" | "entry" | "entryPoints">> & BuildConfig;
183
- type FarmResolvedBuildConfig = UserConfig$1 & BuildResolvedConfig;
184
- //#endregion
185
- export { BuildConfig, BuildResolvedConfig, BuilderVariant, ESBuildBuildConfig, ESBuildResolvedBuildConfig, FarmBuildConfig, FarmResolvedBuildConfig, InferUnpluginVariant, RolldownBuildConfig, RolldownResolvedBuildConfig, RollupBuildConfig, RollupResolvedBuildConfig, RspackBuildConfig, RspackResolvedBuildConfig, TsdownBuildConfig, TsdownResolvedBuildConfig, TsupBuildConfig, TsupResolvedBuildConfig, UnbuildBuildConfig, UnbuildResolvedBuildConfig, UnpluginBuilderVariant, ViteBuildConfig, ViteResolvedBuildConfig, WebpackBuildConfig, WebpackResolvedBuildConfig };
@@ -1,185 +0,0 @@
1
- import { BuildOptions } from "esbuild";
2
- import { DepOptimizationOptions, UserConfig } from "vite";
3
- import { UserConfig as UserConfig$1 } from "@farmfe/core";
4
- import { Configuration } from "@rspack/core";
5
- import { BuildOptions as BuildOptions$1 } from "@storm-software/tsup/types";
6
- import { UnbuildOptions } from "@storm-software/unbuild/types";
7
- import { RolldownOptions } from "rolldown";
8
- import { OutputOptions, RollupOptions } from "rollup";
9
- import { UserConfig as UserConfig$2 } from "tsdown";
10
- import { Configuration as Configuration$1 } from "webpack";
11
-
12
- //#region ../powerlines/src/types/build.d.ts
13
- type UnpluginBuilderVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown" | "bun";
14
- type BuilderVariant = UnpluginBuilderVariant | "tsup" | "tsdown" | "unbuild";
15
- type InferUnpluginVariant<TBuildVariant extends BuilderVariant> = TBuildVariant extends "tsup" ? "esbuild" : TBuildVariant extends "tsdown" ? "rolldown" : TBuildVariant extends "unbuild" ? "rollup" : TBuildVariant;
16
- interface BuildConfig {
17
- /**
18
- * The platform to build the project for
19
- *
20
- * @defaultValue "neutral"
21
- */
22
- platform?: "node" | "browser" | "neutral";
23
- /**
24
- * Array of strings indicating the polyfills to include for the build.
25
- *
26
- * @remarks
27
- * This option allows you to specify which polyfills should be included in the build process to ensure compatibility with the target environment. The paths for the polyfills can use placeholder tokens (the `replacePathTokens` helper function will be used to resolve the actual values).
28
- *
29
- * @example
30
- * ```ts
31
- * {
32
- * polyfill: ['{projectRoot}/custom-polyfill.ts']
33
- * }
34
- * ```
35
- */
36
- polyfill?: string[];
37
- /**
38
- * Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
39
- *
40
- * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
41
- */
42
- mainFields?: string[];
43
- /**
44
- * Array of strings indicating what conditions should be used for module resolution.
45
- */
46
- conditions?: string[];
47
- /**
48
- * Array of strings indicating what file extensions should be used for module resolution.
49
- *
50
- * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
51
- */
52
- extensions?: string[];
53
- /**
54
- * Array of strings indicating what modules should be deduplicated to a single version in the build.
55
- *
56
- * @remarks
57
- * This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
58
- */
59
- dedupe?: string[];
60
- /**
61
- * Array of strings or regular expressions that indicate what modules are builtin for the environment.
62
- */
63
- builtins?: (string | RegExp)[];
64
- /**
65
- * Define global variable replacements.
66
- *
67
- * @remarks
68
- * This option allows you to specify global constants that will be replaced in the code during the build process. It is similar to the `define` option in esbuild and Vite, enabling you to replace specific identifiers with constant expressions at build time.
69
- *
70
- * @example
71
- * ```ts
72
- * {
73
- * define: {
74
- * __VERSION__: '"1.0.0"',
75
- * __DEV__: 'process.env.NODE_ENV !== "production"'
76
- * }
77
- * }
78
- * ```
79
- *
80
- * @see https://esbuild.github.io/api/#define
81
- * @see https://vitejs.dev/config/build-options.html#define
82
- * @see https://github.com/rollup/plugins/tree/master/packages/replace
83
- */
84
- define?: Record<string, any>;
85
- /**
86
- * Global variables that will have import statements injected where necessary
87
- *
88
- * @remarks
89
- * This option allows you to specify global variables that should be automatically imported from specified modules whenever they are used in the code. This is particularly useful for polyfilling Node.js globals in a browser environment.
90
- *
91
- * @example
92
- * ```ts
93
- * {
94
- * inject: {
95
- * process: 'process/browser',
96
- * Buffer: ['buffer', 'Buffer'],
97
- * }
98
- * }
99
- * ```
100
- *
101
- * @see https://github.com/rollup/plugins/tree/master/packages/inject
102
- */
103
- inject?: Record<string, string | string[]>;
104
- /**
105
- * The alias mappings to use for module resolution during the build process.
106
- *
107
- * @remarks
108
- * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
109
- *
110
- * @example
111
- * ```ts
112
- * {
113
- * alias: {
114
- * "@utils": "./src/utils",
115
- * "@components": "./src/components"
116
- * }
117
- * }
118
- * ```
119
- *
120
- * @see https://github.com/rollup/plugins/tree/master/packages/alias
121
- */
122
- alias?: Record<string, string> | Array<{
123
- find: string | RegExp;
124
- replacement: string;
125
- }>;
126
- /**
127
- * A list of modules that should not be bundled, even if they are external dependencies.
128
- *
129
- * @remarks
130
- * This option is useful for excluding specific modules from the bundle, such as Node.js built-in modules or other libraries that should not be bundled.
131
- */
132
- external?: (string | RegExp)[];
133
- /**
134
- * A list of modules that should always be bundled, even if they are external dependencies.
135
- */
136
- noExternal?: (string | RegExp)[];
137
- /**
138
- * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
139
- */
140
- skipNodeModulesBundle?: boolean;
141
- /**
142
- * If true, `process.env` referenced in code will be preserved as-is and evaluated in runtime. Otherwise, it is statically replaced as an empty object.
143
- *
144
- * @defaultValue false
145
- */
146
- keepProcessEnv?: boolean;
147
- /**
148
- * An optional set of override options to apply to the selected build variant.
149
- *
150
- * @remarks
151
- * This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
152
- */
153
- override?: Record<string, any>;
154
- }
155
- type BuildResolvedConfig = Omit<BuildConfig, "override">;
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
- type ViteBuildConfig = Omit<UserConfig, "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw" | "environments" | "output"> & BuildConfig & {
159
- /**
160
- * Optimize deps config
161
- */
162
- optimizeDeps?: Omit<DepOptimizationOptions, "extensions">;
163
- };
164
- type ViteResolvedBuildConfig = UserConfig & BuildResolvedConfig;
165
- type WebpackBuildConfig = Omit<Configuration$1, "name" | "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw"> & BuildConfig;
166
- type WebpackResolvedBuildConfig = Configuration$1 & BuildResolvedConfig;
167
- type RspackBuildConfig = Omit<Configuration, "name" | "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw"> & BuildConfig;
168
- type RspackResolvedBuildConfig = Configuration & BuildResolvedConfig;
169
- type RollupBuildOutputConfig = Omit<OutputOptions, "dir" | "format">;
170
- type RollupBuildConfig = Omit<RollupOptions, "entry" | "external" | "input" | "output" | "logLevel"> & {
171
- output: RollupBuildOutputConfig | RollupBuildOutputConfig[];
172
- } & BuildConfig;
173
- type RollupResolvedBuildConfig = RollupOptions & BuildResolvedConfig;
174
- type RolldownBuildConfig = Omit<RolldownOptions, "input" | "external" | "tsconfig" | "logLevel" | "output"> & BuildConfig;
175
- type RolldownResolvedBuildConfig = RolldownOptions & 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
- type TsdownBuildConfig = Partial<Omit<UserConfig$2, "name" | "outDir" | "clean" | "cwd" | "tsconfig" | "publicDir" | "copy" | "alias" | "format" | "platform" | "env" | "define" | "entry" | "external" | "noExternal" | "skipNodeModulesBundle">> & BuildConfig;
179
- type TsdownResolvedBuildConfig = UserConfig$2 & BuildResolvedConfig;
180
- type UnbuildBuildConfig = Partial<Omit<UnbuildOptions, "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "env" | "entry" | "entryPoints">> & BuildConfig;
181
- type UnbuildResolvedBuildConfig = UnbuildOptions & BuildResolvedConfig;
182
- type FarmBuildConfig = Partial<Omit<UserConfig$1, "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "env" | "entry" | "entryPoints">> & BuildConfig;
183
- type FarmResolvedBuildConfig = UserConfig$1 & BuildResolvedConfig;
184
- //#endregion
185
- export { BuildConfig, BuildResolvedConfig, BuilderVariant, ESBuildBuildConfig, ESBuildResolvedBuildConfig, FarmBuildConfig, FarmResolvedBuildConfig, InferUnpluginVariant, RolldownBuildConfig, RolldownResolvedBuildConfig, RollupBuildConfig, RollupResolvedBuildConfig, RspackBuildConfig, RspackResolvedBuildConfig, TsdownBuildConfig, TsdownResolvedBuildConfig, TsupBuildConfig, TsupResolvedBuildConfig, UnbuildBuildConfig, UnbuildResolvedBuildConfig, UnpluginBuilderVariant, ViteBuildConfig, ViteResolvedBuildConfig, WebpackBuildConfig, WebpackResolvedBuildConfig };
@@ -1,21 +0,0 @@
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,8 +0,0 @@
1
- import { MaybePromise } from "@stryke/types/base";
2
- import { ArrayValues } from "@stryke/types/array";
3
-
4
- //#region ../powerlines/src/types/commands.d.ts
5
- declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
6
- type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
7
- //#endregion
8
- export { CommandType };
@@ -1,9 +0,0 @@
1
- import "./context.mjs";
2
- import { MaybePromise } from "@stryke/types/base";
3
- import { ArrayValues } from "@stryke/types/array";
4
-
5
- //#region ../powerlines/src/types/commands.d.ts
6
- declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
7
- type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
8
- //#endregion
9
- export { CommandType };