@powerlines/plugin-react 0.1.251 → 0.1.253

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 (192) hide show
  1. package/dist/components/react-optimized.cjs +7 -7
  2. package/dist/components/react-optimized.d.cts +1 -1
  3. package/dist/components/react-optimized.d.mts +1 -1
  4. package/dist/components/react-optimized.mjs +4 -4
  5. package/dist/index.cjs +13 -11
  6. package/dist/index.d.cts +1 -1
  7. package/dist/index.d.mts +1 -1
  8. package/dist/index.mjs +6 -6
  9. package/dist/types/plugin.d.cts +2 -2
  10. package/dist/types/plugin.d.mts +2 -2
  11. package/dist/types/runtime.d.cts +1 -1
  12. package/dist/types/runtime.d.mts +1 -1
  13. package/package.json +6 -6
  14. package/dist/deepkit/schemas/reflection.cjs +0 -3998
  15. package/dist/deepkit/schemas/reflection.d.cts +0 -1560
  16. package/dist/deepkit/schemas/reflection.d.mts +0 -1560
  17. package/dist/deepkit/schemas/reflection.mjs +0 -3996
  18. package/dist/deepkit/schemas/reflection2.cjs +0 -4112
  19. package/dist/deepkit/schemas/reflection2.mjs +0 -4110
  20. package/dist/deepkit/src/capnp.cjs +0 -913
  21. package/dist/deepkit/src/capnp.mjs +0 -911
  22. package/dist/deepkit/src/esbuild-plugin.cjs +0 -47
  23. package/dist/deepkit/src/esbuild-plugin.mjs +0 -46
  24. package/dist/deepkit/src/reflect-type.cjs +0 -22
  25. package/dist/deepkit/src/reflect-type.mjs +0 -20
  26. package/dist/deepkit/src/resolve-reflections.cjs +0 -16
  27. package/dist/deepkit/src/resolve-reflections.mjs +0 -15
  28. package/dist/deepkit/src/transformer.cjs +0 -52
  29. package/dist/deepkit/src/transformer.mjs +0 -49
  30. package/dist/deepkit/src/transpile.cjs +0 -29
  31. package/dist/deepkit/src/transpile.mjs +0 -27
  32. package/dist/deepkit/src/types.d.cts +0 -10
  33. package/dist/deepkit/src/types.d.mts +0 -10
  34. package/dist/deepkit/src/utilities.cjs +0 -67
  35. package/dist/deepkit/src/utilities.mjs +0 -66
  36. package/dist/plugin-alloy/src/core/components/output.cjs +0 -43
  37. package/dist/plugin-alloy/src/core/components/output.mjs +0 -42
  38. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -22
  39. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -21
  40. package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -64
  41. package/dist/plugin-alloy/src/core/components/source-file.d.cts +0 -23
  42. package/dist/plugin-alloy/src/core/components/source-file.d.mts +0 -23
  43. package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -62
  44. package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -38
  45. package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -34
  46. package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
  47. package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
  48. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -46
  49. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -42
  50. package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -16
  51. package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -15
  52. package/dist/plugin-alloy/src/index.cjs +0 -105
  53. package/dist/plugin-alloy/src/index.mjs +0 -103
  54. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -115
  55. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -114
  56. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -39
  57. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -38
  58. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -18
  59. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -17
  60. package/dist/plugin-alloy/src/types/components.d.cts +0 -20
  61. package/dist/plugin-alloy/src/types/components.d.mts +0 -21
  62. package/dist/plugin-alloy/src/types/index.d.cts +0 -2
  63. package/dist/plugin-alloy/src/types/index.d.mts +0 -2
  64. package/dist/plugin-alloy/src/types/plugin.d.cts +0 -36
  65. package/dist/plugin-alloy/src/types/plugin.d.mts +0 -36
  66. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -62
  67. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +0 -26
  68. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +0 -26
  69. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -61
  70. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -131
  71. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -129
  72. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -451
  73. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +0 -37
  74. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +0 -37
  75. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -442
  76. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -216
  77. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +0 -16
  78. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +0 -16
  79. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -213
  80. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -72
  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.mjs +0 -586
  115. package/dist/plugin-env/src/components/index.cjs +0 -2
  116. package/dist/plugin-env/src/components/index.mjs +0 -4
  117. package/dist/plugin-env/src/helpers/automd-generator.cjs +0 -22
  118. package/dist/plugin-env/src/helpers/automd-generator.mjs +0 -21
  119. package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +0 -55
  120. package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +0 -54
  121. package/dist/plugin-env/src/helpers/docs-helper.cjs +0 -16
  122. package/dist/plugin-env/src/helpers/docs-helper.mjs +0 -15
  123. package/dist/plugin-env/src/helpers/index.cjs +0 -6
  124. package/dist/plugin-env/src/helpers/index.mjs +0 -8
  125. package/dist/plugin-env/src/helpers/load.cjs +0 -84
  126. package/dist/plugin-env/src/helpers/load.mjs +0 -81
  127. package/dist/plugin-env/src/helpers/persistence.cjs +0 -201
  128. package/dist/plugin-env/src/helpers/persistence.mjs +0 -190
  129. package/dist/plugin-env/src/helpers/reflect.cjs +0 -125
  130. package/dist/plugin-env/src/helpers/reflect.mjs +0 -117
  131. package/dist/plugin-env/src/helpers/source-file-env.cjs +0 -24
  132. package/dist/plugin-env/src/helpers/source-file-env.mjs +0 -23
  133. package/dist/plugin-env/src/helpers/template-helpers.cjs +0 -2
  134. package/dist/plugin-env/src/helpers/template-helpers.mjs +0 -4
  135. package/dist/plugin-env/src/index.cjs +0 -177
  136. package/dist/plugin-env/src/index.mjs +0 -175
  137. package/dist/plugin-env/src/types/plugin.d.cts +0 -149
  138. package/dist/plugin-env/src/types/plugin.d.mts +0 -150
  139. package/dist/plugin-env/src/types/runtime.d.cts +0 -789
  140. package/dist/plugin-env/src/types/runtime.d.mts +0 -789
  141. package/dist/powerlines/src/internal/helpers/hooks.d.cts +0 -47
  142. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -49
  143. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -93
  144. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -91
  145. package/dist/powerlines/src/lib/constants/environments.cjs +0 -6
  146. package/dist/powerlines/src/lib/constants/environments.mjs +0 -5
  147. package/dist/powerlines/src/lib/entry.cjs +0 -11
  148. package/dist/powerlines/src/lib/entry.mjs +0 -13
  149. package/dist/powerlines/src/lib/logger.cjs +0 -41
  150. package/dist/powerlines/src/lib/logger.mjs +0 -39
  151. package/dist/powerlines/src/lib/typescript/tsconfig.cjs +0 -38
  152. package/dist/powerlines/src/lib/typescript/tsconfig.mjs +0 -35
  153. package/dist/powerlines/src/lib/unplugin/helpers.cjs +0 -3
  154. package/dist/powerlines/src/lib/unplugin/helpers.mjs +0 -5
  155. package/dist/powerlines/src/lib/unplugin/module-resolution.cjs +0 -66
  156. package/dist/powerlines/src/lib/unplugin/module-resolution.mjs +0 -65
  157. package/dist/powerlines/src/lib/unplugin/plugin.cjs +0 -46
  158. package/dist/powerlines/src/lib/unplugin/plugin.mjs +0 -45
  159. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -42
  160. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -40
  161. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -50
  162. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -49
  163. package/dist/powerlines/src/lib/utilities/source-file.cjs +0 -5
  164. package/dist/powerlines/src/lib/utilities/source-file.mjs +0 -5
  165. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
  166. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -3
  167. package/dist/powerlines/src/types/api.d.cts +0 -104
  168. package/dist/powerlines/src/types/api.d.mts +0 -104
  169. package/dist/powerlines/src/types/babel.d.cts +0 -22
  170. package/dist/powerlines/src/types/babel.d.mts +0 -22
  171. package/dist/powerlines/src/types/build.cjs +0 -21
  172. package/dist/powerlines/src/types/build.d.cts +0 -185
  173. package/dist/powerlines/src/types/build.d.mts +0 -185
  174. package/dist/powerlines/src/types/build.mjs +0 -21
  175. package/dist/powerlines/src/types/commands.d.cts +0 -8
  176. package/dist/powerlines/src/types/commands.d.mts +0 -9
  177. package/dist/powerlines/src/types/config.d.cts +0 -435
  178. package/dist/powerlines/src/types/config.d.mts +0 -436
  179. package/dist/powerlines/src/types/context.d.cts +0 -514
  180. package/dist/powerlines/src/types/context.d.mts +0 -514
  181. package/dist/powerlines/src/types/fs.d.cts +0 -486
  182. package/dist/powerlines/src/types/fs.d.mts +0 -486
  183. package/dist/powerlines/src/types/hooks.d.cts +0 -32
  184. package/dist/powerlines/src/types/hooks.d.mts +0 -32
  185. package/dist/powerlines/src/types/plugin.d.cts +0 -205
  186. package/dist/powerlines/src/types/plugin.d.mts +0 -205
  187. package/dist/powerlines/src/types/resolved.d.cts +0 -94
  188. package/dist/powerlines/src/types/resolved.d.mts +0 -94
  189. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  190. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  191. package/dist/powerlines/src/types/unplugin.d.cts +0 -22
  192. 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 };