@powerlines/plugin-react 0.1.105 → 0.1.106

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 (218) hide show
  1. package/dist/{_virtual/rolldown_runtime.mjs → chunk-CF6LXmkI.mjs} +1 -1
  2. package/dist/components/index.cjs +1 -1
  3. package/dist/components/index.d.cts +2 -1
  4. package/dist/components/index.d.mts +2 -1
  5. package/dist/components/index.mjs +1 -1
  6. package/dist/components/react-optimized.cjs +1 -1
  7. package/dist/components/react-optimized.d.cts +1 -13
  8. package/dist/components/react-optimized.d.mts +1 -13
  9. package/dist/components/react-optimized.mjs +1 -1
  10. package/dist/components-BWLXb7a2.cjs +0 -0
  11. package/dist/components-MTvNCZDU.mjs +1 -0
  12. package/dist/index-C-svZlpj.d.mts +1 -0
  13. package/dist/index-CtCMUyZA.d.cts +1 -0
  14. package/dist/index-DEHBdV_z.d.mts +1 -0
  15. package/dist/index-_wQ5ClJU.d.cts +1 -0
  16. package/dist/index.cjs +63 -1
  17. package/dist/index.d.cts +7 -6
  18. package/dist/index.d.mts +7 -9
  19. package/dist/index.mjs +60 -1
  20. package/dist/{deepkit/schemas/reflection.d.mts → plugin-DOauJa_m.d.mts} +299 -1
  21. package/dist/plugin-G4qbpIjB.mjs +1 -0
  22. package/dist/plugin-pBKbb5K9.cjs +0 -0
  23. package/dist/{deepkit/schemas/reflection.d.cts → plugin-yYQdItCy.d.cts} +299 -1
  24. package/dist/react-optimized-Btf0j0ZP.cjs +1 -0
  25. package/dist/react-optimized-C8ZBC6OY.mjs +1 -0
  26. package/dist/react-optimized-DmMl-ZEI.d.cts +14 -0
  27. package/dist/react-optimized-Y1x3FeDm.d.mts +14 -0
  28. package/dist/runtime--8U-2SZ9.d.mts +15 -0
  29. package/dist/runtime-BFk0BLpy.d.mts +2497 -0
  30. package/dist/runtime-Bp9G0scd.cjs +0 -0
  31. package/dist/runtime-CEUG_XjE.d.cts +15 -0
  32. package/dist/runtime-cDYyRPa0.mjs +1 -0
  33. package/dist/runtime-eJB4FEow.d.cts +2495 -0
  34. package/dist/types/index.cjs +1 -0
  35. package/dist/types/index.d.cts +4 -2
  36. package/dist/types/index.d.mts +4 -2
  37. package/dist/types/index.mjs +1 -1
  38. package/dist/types/plugin.cjs +1 -0
  39. package/dist/types/plugin.d.cts +2 -72
  40. package/dist/types/plugin.d.mts +2 -72
  41. package/dist/types/plugin.mjs +1 -1
  42. package/dist/types/runtime.cjs +1 -0
  43. package/dist/types/runtime.d.cts +2 -14
  44. package/dist/types/runtime.d.mts +2 -14
  45. package/dist/types/runtime.mjs +1 -1
  46. package/dist/types-C5ggNT4K.mjs +1 -0
  47. package/dist/types-a8gm_IaQ.cjs +0 -0
  48. package/package.json +11 -9
  49. package/dist/_virtual/rolldown_runtime.cjs +0 -1
  50. package/dist/alloy/src/core/components/output.cjs +0 -1
  51. package/dist/alloy/src/core/components/output.mjs +0 -1
  52. package/dist/alloy/src/core/components/single-line-comment.cjs +0 -1
  53. package/dist/alloy/src/core/components/single-line-comment.mjs +0 -1
  54. package/dist/alloy/src/core/components/source-file.cjs +0 -1
  55. package/dist/alloy/src/core/components/source-file.d.cts +0 -22
  56. package/dist/alloy/src/core/components/source-file.d.mts +0 -22
  57. package/dist/alloy/src/core/components/source-file.mjs +0 -1
  58. package/dist/alloy/src/core/contexts/context.cjs +0 -1
  59. package/dist/alloy/src/core/contexts/context.mjs +0 -1
  60. package/dist/alloy/src/core/contexts/reflection.cjs +0 -1
  61. package/dist/alloy/src/core/contexts/reflection.mjs +0 -1
  62. package/dist/alloy/src/create-plugin.cjs +0 -2
  63. package/dist/alloy/src/create-plugin.mjs +0 -2
  64. package/dist/alloy/src/helpers/refkey.cjs +0 -1
  65. package/dist/alloy/src/helpers/refkey.mjs +0 -1
  66. package/dist/alloy/src/markdown/components/markdown-file.cjs +0 -1
  67. package/dist/alloy/src/markdown/components/markdown-file.mjs +0 -1
  68. package/dist/alloy/src/markdown/components/markdown-table.cjs +0 -1
  69. package/dist/alloy/src/markdown/components/markdown-table.mjs +0 -1
  70. package/dist/alloy/src/markdown/contexts/markdown-table.cjs +0 -1
  71. package/dist/alloy/src/markdown/contexts/markdown-table.mjs +0 -1
  72. package/dist/alloy/src/types/components.d.cts +0 -19
  73. package/dist/alloy/src/types/components.d.mts +0 -23
  74. package/dist/alloy/src/types/plugin.d.cts +0 -15
  75. package/dist/alloy/src/types/plugin.d.mts +0 -15
  76. package/dist/alloy/src/typescript/components/builtin-file.cjs +0 -1
  77. package/dist/alloy/src/typescript/components/builtin-file.d.cts +0 -25
  78. package/dist/alloy/src/typescript/components/builtin-file.d.mts +0 -26
  79. package/dist/alloy/src/typescript/components/builtin-file.mjs +0 -1
  80. package/dist/alloy/src/typescript/components/tsdoc-reflection.cjs +0 -1
  81. package/dist/alloy/src/typescript/components/tsdoc-reflection.mjs +0 -1
  82. package/dist/alloy/src/typescript/components/tsdoc.cjs +0 -1
  83. package/dist/alloy/src/typescript/components/tsdoc.d.cts +0 -27
  84. package/dist/alloy/src/typescript/components/tsdoc.d.mts +0 -28
  85. package/dist/alloy/src/typescript/components/tsdoc.mjs +0 -1
  86. package/dist/alloy/src/typescript/components/typescript-file.cjs +0 -1
  87. package/dist/alloy/src/typescript/components/typescript-file.d.cts +0 -14
  88. package/dist/alloy/src/typescript/components/typescript-file.d.mts +0 -15
  89. package/dist/alloy/src/typescript/components/typescript-file.mjs +0 -1
  90. package/dist/alloy/src/typescript/components/typescript-interface.cjs +0 -1
  91. package/dist/alloy/src/typescript/components/typescript-interface.mjs +0 -1
  92. package/dist/alloy/src/typescript/components/typescript-object.cjs +0 -1
  93. package/dist/alloy/src/typescript/components/typescript-object.mjs +0 -1
  94. package/dist/deepkit/schemas/reflection.cjs +0 -1
  95. package/dist/deepkit/schemas/reflection.mjs +0 -1
  96. package/dist/deepkit/schemas/reflection2.cjs +0 -1
  97. package/dist/deepkit/schemas/reflection2.mjs +0 -1
  98. package/dist/deepkit/src/capnp.cjs +0 -1
  99. package/dist/deepkit/src/capnp.mjs +0 -1
  100. package/dist/deepkit/src/esbuild-plugin.cjs +0 -4
  101. package/dist/deepkit/src/esbuild-plugin.mjs +0 -4
  102. package/dist/deepkit/src/reflect-type.cjs +0 -1
  103. package/dist/deepkit/src/reflect-type.mjs +0 -1
  104. package/dist/deepkit/src/resolve-reflections.cjs +0 -1
  105. package/dist/deepkit/src/resolve-reflections.mjs +0 -1
  106. package/dist/deepkit/src/transformer.cjs +0 -1
  107. package/dist/deepkit/src/transformer.mjs +0 -1
  108. package/dist/deepkit/src/transpile.cjs +0 -1
  109. package/dist/deepkit/src/transpile.mjs +0 -1
  110. package/dist/deepkit/src/types.d.cts +0 -10
  111. package/dist/deepkit/src/types.d.mts +0 -10
  112. package/dist/deepkit/src/utilities.cjs +0 -1
  113. package/dist/deepkit/src/utilities.mjs +0 -1
  114. package/dist/deepkit/src/vendor/type-compiler/index.cjs +0 -1
  115. package/dist/deepkit/src/vendor/type-compiler/index.mjs +0 -1
  116. package/dist/deepkit/src/vendor/type.cjs +0 -1
  117. package/dist/deepkit/src/vendor/type.d.cts +0 -7
  118. package/dist/deepkit/src/vendor/type.d.mts +0 -7
  119. package/dist/deepkit/src/vendor/type.mjs +0 -1
  120. package/dist/plugin-automd/src/index.cjs +0 -1
  121. package/dist/plugin-automd/src/index.mjs +0 -1
  122. package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
  123. package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
  124. package/dist/plugin-automd/src/types/toc.d.cts +0 -33
  125. package/dist/plugin-automd/src/types/toc.d.mts +0 -33
  126. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -1
  127. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -1
  128. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -1
  129. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -1
  130. package/dist/plugin-babel/src/helpers/filters.cjs +0 -1
  131. package/dist/plugin-babel/src/helpers/filters.mjs +0 -1
  132. package/dist/plugin-babel/src/helpers/index.cjs +0 -1
  133. package/dist/plugin-babel/src/helpers/index.mjs +0 -1
  134. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -1
  135. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -1
  136. package/dist/plugin-babel/src/helpers/options.cjs +0 -1
  137. package/dist/plugin-babel/src/helpers/options.mjs +0 -1
  138. package/dist/plugin-babel/src/index.cjs +0 -1
  139. package/dist/plugin-babel/src/index.mjs +0 -1
  140. package/dist/plugin-babel/src/types/index.d.mts +0 -1
  141. package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
  142. package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
  143. package/dist/plugin-env/src/babel/index.cjs +0 -1
  144. package/dist/plugin-env/src/babel/index.mjs +0 -1
  145. package/dist/plugin-env/src/babel/plugin.cjs +0 -5
  146. package/dist/plugin-env/src/babel/plugin.mjs +0 -5
  147. package/dist/plugin-env/src/components/docs.cjs +0 -1
  148. package/dist/plugin-env/src/components/docs.mjs +0 -1
  149. package/dist/plugin-env/src/components/env.cjs +0 -34
  150. package/dist/plugin-env/src/components/env.mjs +0 -31
  151. package/dist/plugin-env/src/components/index.cjs +0 -1
  152. package/dist/plugin-env/src/components/index.mjs +0 -1
  153. package/dist/plugin-env/src/helpers/automd-generator.cjs +0 -1
  154. package/dist/plugin-env/src/helpers/automd-generator.mjs +0 -1
  155. package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +0 -1
  156. package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +0 -1
  157. package/dist/plugin-env/src/helpers/index.cjs +0 -1
  158. package/dist/plugin-env/src/helpers/index.mjs +0 -1
  159. package/dist/plugin-env/src/helpers/load.cjs +0 -1
  160. package/dist/plugin-env/src/helpers/load.mjs +0 -1
  161. package/dist/plugin-env/src/helpers/persistence.cjs +0 -1
  162. package/dist/plugin-env/src/helpers/persistence.mjs +0 -1
  163. package/dist/plugin-env/src/helpers/reflect.cjs +0 -1
  164. package/dist/plugin-env/src/helpers/reflect.mjs +0 -1
  165. package/dist/plugin-env/src/helpers/source-file-env.cjs +0 -1
  166. package/dist/plugin-env/src/helpers/source-file-env.mjs +0 -1
  167. package/dist/plugin-env/src/helpers/template-helpers.cjs +0 -1
  168. package/dist/plugin-env/src/helpers/template-helpers.mjs +0 -1
  169. package/dist/plugin-env/src/index.cjs +0 -10
  170. package/dist/plugin-env/src/index.mjs +0 -10
  171. package/dist/plugin-env/src/types/plugin.d.cts +0 -143
  172. package/dist/plugin-env/src/types/plugin.d.mts +0 -144
  173. package/dist/plugin-env/src/types/runtime.d.cts +0 -792
  174. package/dist/plugin-env/src/types/runtime.d.mts +0 -792
  175. package/dist/plugin-plugin/src/types/plugin.d.cts +0 -21
  176. package/dist/plugin-plugin/src/types/plugin.d.mts +0 -24
  177. package/dist/powerlines/schemas/fs.d.mts +0 -1
  178. package/dist/powerlines/src/api.d.mts +0 -7
  179. package/dist/powerlines/src/index.d.mts +0 -12
  180. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -5
  181. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -14
  182. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -14
  183. package/dist/powerlines/src/lib/entry.cjs +0 -1
  184. package/dist/powerlines/src/lib/entry.mjs +0 -1
  185. package/dist/powerlines/src/lib/logger.cjs +0 -1
  186. package/dist/powerlines/src/lib/logger.mjs +0 -1
  187. package/dist/powerlines/src/lib/typescript/tsconfig.cjs +0 -1
  188. package/dist/powerlines/src/lib/typescript/tsconfig.mjs +0 -1
  189. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -1
  190. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -1
  191. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -1
  192. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -1
  193. package/dist/powerlines/src/plugin-utils/helpers.cjs +0 -1
  194. package/dist/powerlines/src/plugin-utils/helpers.mjs +0 -1
  195. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
  196. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -1
  197. package/dist/powerlines/src/types/api.d.mts +0 -5
  198. package/dist/powerlines/src/types/babel.d.cts +0 -22
  199. package/dist/powerlines/src/types/babel.d.mts +0 -22
  200. package/dist/powerlines/src/types/build.d.cts +0 -145
  201. package/dist/powerlines/src/types/build.d.mts +0 -147
  202. package/dist/powerlines/src/types/commands.d.cts +0 -8
  203. package/dist/powerlines/src/types/commands.d.mts +0 -9
  204. package/dist/powerlines/src/types/config.d.cts +0 -368
  205. package/dist/powerlines/src/types/config.d.mts +0 -369
  206. package/dist/powerlines/src/types/context.d.cts +0 -373
  207. package/dist/powerlines/src/types/context.d.mts +0 -375
  208. package/dist/powerlines/src/types/fs.d.cts +0 -458
  209. package/dist/powerlines/src/types/fs.d.mts +0 -458
  210. package/dist/powerlines/src/types/hooks.d.mts +0 -2
  211. package/dist/powerlines/src/types/index.d.mts +0 -12
  212. package/dist/powerlines/src/types/plugin.d.cts +0 -232
  213. package/dist/powerlines/src/types/plugin.d.mts +0 -232
  214. package/dist/powerlines/src/types/resolved.d.cts +0 -82
  215. package/dist/powerlines/src/types/resolved.d.mts +0 -83
  216. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  217. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  218. package/dist/powerlines/src/types/unplugin.d.mts +0 -7
@@ -1,21 +0,0 @@
1
- import { PrintTreeOptions } from "@alloy-js/core";
2
- import { TypeDefinitionParameter } from "@stryke/types/configuration";
3
-
4
- //#region ../plugin-plugin/src/types/plugin.d.ts
5
-
6
- type PluginPluginAlloyOptions = Partial<PrintTreeOptions> & {
7
- /**
8
- * If true, the Alloy framework is used to generate JSON output files.
9
- *
10
- * @defaultValue false
11
- */
12
- generatesJson?: boolean;
13
- /**
14
- * If true, the Alloy framework is used to generate Markdown output files.
15
- *
16
- * @defaultValue false
17
- */
18
- generatesMarkdown?: boolean;
19
- };
20
- //#endregion
21
- export { PluginPluginAlloyOptions };
@@ -1,24 +0,0 @@
1
- import "../../../powerlines/src/types/build.mjs";
2
- import "../../../powerlines/src/types/context.mjs";
3
- import "../../../powerlines/src/types/config.mjs";
4
- import "../../../powerlines/src/types/resolved.mjs";
5
- import { PrintTreeOptions } from "@alloy-js/core";
6
- import { TypeDefinitionParameter } from "@stryke/types/configuration";
7
-
8
- //#region ../plugin-plugin/src/types/plugin.d.ts
9
- type PluginPluginAlloyOptions = Partial<PrintTreeOptions> & {
10
- /**
11
- * If true, the Alloy framework is used to generate JSON output files.
12
- *
13
- * @defaultValue false
14
- */
15
- generatesJson?: boolean;
16
- /**
17
- * If true, the Alloy framework is used to generate Markdown output files.
18
- *
19
- * @defaultValue false
20
- */
21
- generatesMarkdown?: boolean;
22
- };
23
- //#endregion
24
- export { PluginPluginAlloyOptions };
@@ -1 +0,0 @@
1
- import "@stryke/capnp";
@@ -1,7 +0,0 @@
1
- import "./types/hooks.mjs";
2
- import "./types/context.mjs";
3
- import "./types/config.mjs";
4
- import "./types/resolved.mjs";
5
- import "./internal/helpers/hooks.mjs";
6
- import "./types/api.mjs";
7
- import "./types/index.mjs";
@@ -1,12 +0,0 @@
1
- import { ResolveOptions, StorageAdapter, StoragePort, StoragePreset, VirtualFile, VirtualFileData, VirtualFileMetadata, VirtualFileSystemInterface, WriteOptions } from "./types/fs.mjs";
2
- import { BuildConfig, BuildResolvedConfig, UnpluginBuildVariant } from "./types/build.mjs";
3
- import { CommandType, SUPPORTED_COMMANDS } from "./types/commands.mjs";
4
- import { BasePluginHookFunctions, BuildPlugin, ConfigResult, Plugin, PluginBuildPlugins, PluginHook, PluginHookObject, PluginHooks, TypesResult } from "./types/plugin.mjs";
5
- import { DeepkitOptions, ParsedTypeScriptConfig, RawReflectionMode, ReflectionLevel, ReflectionMode, TSCompilerOptions, TSConfig } from "./types/tsconfig.mjs";
6
- import { BuildPluginContext, Context, EmitEntryOptions, FetchOptions, InitContextOptions, LogLevel, MetaInfo, ParseOptions, PluginContext, Resolver, TransformResult, UnresolvedContext } from "./types/context.mjs";
7
- import { BabelPluginPass, BabelTransformPlugin, BabelTransformPluginFilter, BabelTransformPluginOptions } from "./types/babel.mjs";
8
- import { BabelUserConfig, BaseConfig, CommonUserConfig, DeployConfig, EnvironmentConfig, InlineConfig, LogFn, OutputConfig, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, ProjectType, UserConfig, WorkspaceConfig } from "./types/config.mjs";
9
- import { BabelResolvedConfig, EnvironmentResolvedConfig, OutputResolvedConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedEntryTypeDefinition } from "./types/resolved.mjs";
10
- import "./types/index.mjs";
11
- import "./api.mjs";
12
- import "../schemas/fs.mjs";
@@ -1,5 +0,0 @@
1
- import "../../types/hooks.mjs";
2
- import "../../types/context.mjs";
3
- import "../../types/resolved.mjs";
4
- import { MaybePromise } from "@stryke/types/base";
5
- import { ArrayValues } from "@stryke/types/array";
@@ -1,14 +0,0 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`);require(`../entry.cjs`);let t=require(`@stryke/type-checks/is-string`),n=require(`defu`);n=e.__toESM(n);let r=require(`@stryke/path/replace`),i=require(`@stryke/path/join-paths`),a=require(`@stryke/helpers/omit`),o=require(`@stryke/string-format/camel-case`);const s={target:`esnext`,platform:`neutral`,format:`esm`,write:!0,minify:!0,sourcemap:!1,bundle:!0,treeShaking:!0,keepNames:!0,splitting:!0,logLevel:`silent`};function c(e){let t=e.config.build.override.inject??e.config.build.inject;return t&&Object.keys(t).length>0&&e.fs.writeSync((0,i.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,e.artifactsPath,`inject-shim.js`),Object.entries(t).map(([e,t])=>{if(t)if(Array.isArray(t)){if((0,o.camelCase)(e)!==e){if(t.length===1)return`
2
- import ${(0,o.camelCase)(e)} from "${t[0]}";
3
- export { ${(0,o.camelCase)(e)} as "${e}" }`;if(t.length>1)return`
4
- import ${t[1]===`*`?`* as ${(0,o.camelCase)(e)}`:`{ ${t[1]} as ${(0,o.camelCase)(e)} }`} from "${t[0]}";
5
- export { ${(0,o.camelCase)(e)} as "${e}" }`}else if(t.length===1)return`
6
- import ${e} from "${t[0]}";
7
- export { ${e} };`;else if(t.length>1)return`
8
- import ${t[1]===`*`?`* as ${e}`:`{ ${t[1]} as ${e} }`} from "${t[0]}";
9
- export { ${e} };`}else if((0,o.camelCase)(e)!==e)return`
10
- import ${(0,o.camelCase)(e)} from "${t[0]}";
11
- export { ${(0,o.camelCase)(e)} as "${e}" }`;else return`
12
- import ${e} from "${t}";
13
- export { ${e} };`;return``}).join(`
14
- `)),(0,n.default)({alias:e.builtins.reduce((t,n)=>{if(!t[n]){let r=e.fs.ids[n];r&&(t[n]=r)}return t},e.config.build.alias?Array.isArray(e.config.build.alias)?e.config.build.alias.reduce((e,t)=>(e[t.find.toString()]||(e[t.find.toString()]=t.replacement),e),{}):e.config.build.alias:{}),inject:t&&Object.keys(t).length>0?[(0,i.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,e.artifactsPath,`inject-shim.js`)]:void 0},e.config.build.variant===`esbuild`?(0,a.omit)(e.config.build.override,[`alias`,`inject`,`external`,`noExternal`,`skipNodeModulesBundle`,`extensions`]):{},e.config.build.variant===`esbuild`?(0,a.omit)(e.config.build,[`alias`,`inject`,`external`,`noExternal`,`skipNodeModulesBundle`,`extensions`,`variant`,`override`]):{},{mainFields:e.config.build.mainFields,conditions:e.config.build.conditions,define:e.config.build.define,resolveExtensions:e.config.build.extensions,packages:e.config.build.skipNodeModulesBundle?`external`:e.config.build.variant===`esbuild`?e.config.build.packages:void 0,format:Array.isArray(e.config.output.format)?e.config.output.format[0]:e.config.output.format,platform:e.config.build.platform,treeShaking:!!e.config.build?.treeshake||e.config.build?.treeShaking,outdir:e.config.output.buildPath,tsconfig:e.tsconfig.tsconfigFilePath,minify:e.config.mode!==`development`,metafile:e.config.mode===`development`,sourcemap:e.config.mode===`development`},s)}exports.extractESBuildConfig=c;
@@ -1,14 +0,0 @@
1
- import"../entry.mjs";import{isString as e}from"@stryke/type-checks/is-string";import t from"defu";import{replacePath as n}from"@stryke/path/replace";import{joinPaths as r}from"@stryke/path/join-paths";import{omit as i}from"@stryke/helpers/omit";import{camelCase as a}from"@stryke/string-format/camel-case";const o={target:`esnext`,platform:`neutral`,format:`esm`,write:!0,minify:!0,sourcemap:!1,bundle:!0,treeShaking:!0,keepNames:!0,splitting:!0,logLevel:`silent`};function s(e){let n=e.config.build.override.inject??e.config.build.inject;return n&&Object.keys(n).length>0&&e.fs.writeSync(r(e.workspaceConfig.workspaceRoot,e.config.projectRoot,e.artifactsPath,`inject-shim.js`),Object.entries(n).map(([e,t])=>{if(t)if(Array.isArray(t)){if(a(e)!==e){if(t.length===1)return`
2
- import ${a(e)} from "${t[0]}";
3
- export { ${a(e)} as "${e}" }`;if(t.length>1)return`
4
- import ${t[1]===`*`?`* as ${a(e)}`:`{ ${t[1]} as ${a(e)} }`} from "${t[0]}";
5
- export { ${a(e)} as "${e}" }`}else if(t.length===1)return`
6
- import ${e} from "${t[0]}";
7
- export { ${e} };`;else if(t.length>1)return`
8
- import ${t[1]===`*`?`* as ${e}`:`{ ${t[1]} as ${e} }`} from "${t[0]}";
9
- export { ${e} };`}else if(a(e)!==e)return`
10
- import ${a(e)} from "${t[0]}";
11
- export { ${a(e)} as "${e}" }`;else return`
12
- import ${e} from "${t}";
13
- export { ${e} };`;return``}).join(`
14
- `)),t({alias:e.builtins.reduce((t,n)=>{if(!t[n]){let r=e.fs.ids[n];r&&(t[n]=r)}return t},e.config.build.alias?Array.isArray(e.config.build.alias)?e.config.build.alias.reduce((e,t)=>(e[t.find.toString()]||(e[t.find.toString()]=t.replacement),e),{}):e.config.build.alias:{}),inject:n&&Object.keys(n).length>0?[r(e.workspaceConfig.workspaceRoot,e.config.projectRoot,e.artifactsPath,`inject-shim.js`)]:void 0},e.config.build.variant===`esbuild`?i(e.config.build.override,[`alias`,`inject`,`external`,`noExternal`,`skipNodeModulesBundle`,`extensions`]):{},e.config.build.variant===`esbuild`?i(e.config.build,[`alias`,`inject`,`external`,`noExternal`,`skipNodeModulesBundle`,`extensions`,`variant`,`override`]):{},{mainFields:e.config.build.mainFields,conditions:e.config.build.conditions,define:e.config.build.define,resolveExtensions:e.config.build.extensions,packages:e.config.build.skipNodeModulesBundle?`external`:e.config.build.variant===`esbuild`?e.config.build.packages:void 0,format:Array.isArray(e.config.output.format)?e.config.output.format[0]:e.config.output.format,platform:e.config.build.platform,treeShaking:!!e.config.build?.treeshake||e.config.build?.treeShaking,outdir:e.config.output.buildPath,tsconfig:e.tsconfig.tsconfigFilePath,minify:e.config.mode!==`development`,metafile:e.config.mode===`development`,sourcemap:e.config.mode===`development`},o)}export{s as extractESBuildConfig};
@@ -1 +0,0 @@
1
- require(`../plugin-utils/paths.cjs`);let e=require(`@stryke/helpers/get-unique`),t=require(`@stryke/type-checks/is-string`),n=require(`@stryke/type-checks/is-set-string`),r=require(`@stryke/path/append`),i=require(`@stryke/path/replace`),a=require(`@stryke/convert/to-array`),o=require(`@stryke/fs/is-file`),s=require(`@stryke/fs/list-files`),c=require(`@stryke/path/join-paths`),l=require(`@stryke/convert/parse-type-definition`);require(`@stryke/hash/murmurhash`);
@@ -1 +0,0 @@
1
- import"../plugin-utils/paths.mjs";import{getUniqueBy as e}from"@stryke/helpers/get-unique";import{isString as t}from"@stryke/type-checks/is-string";import{isSetString as n}from"@stryke/type-checks/is-set-string";import{appendPath as r}from"@stryke/path/append";import{replacePath as i}from"@stryke/path/replace";import{toArray as a}from"@stryke/convert/to-array";import"@stryke/fs/is-file";import{listFiles as o}from"@stryke/fs/list-files";import{joinPaths as s}from"@stryke/path/join-paths";import{parseTypeDefinition as c}from"@stryke/convert/parse-type-definition";import"@stryke/hash/murmurhash";export{};
@@ -1 +0,0 @@
1
- const e=require(`../../../_virtual/rolldown_runtime.cjs`);let t=require(`@stryke/string-format/title-case`),n=require(`@storm-software/config-tools/types`),r=require(`chalk`);r=e.__toESM(r),require(`@storm-software/config-tools/logger`),require(`@storm-software/config-tools/utilities/colors`),require(`@stryke/helpers/noop`);const i=[`#00A0DD`,`#6FCE4E`,`#FBBF24`,`#F43F5E`,`#3B82F6`,`#A855F7`,`#469592`,`#288EDF`,`#10B981`,`#EF4444`,`#F0EC56`,`#F472B6`,`#22D3EE`,`#EAB308`,`#84CC16`,`#F87171`,`#0EA5E9`,`#D946EF`,`#FACC15`,`#34D399`],a=(e,n)=>(a,...o)=>e(a,` ${r.default.inverse.hex(i[n.split(``).map(e=>e.charCodeAt(0)).reduce((e,t)=>e+t,0)%i.length]||i[0])(` ${(0,t.titleCase)(n)} `)} ${o.join(` `)} `);exports.extendLog=a;
@@ -1 +0,0 @@
1
- import{titleCase as e}from"@stryke/string-format/title-case";import{LogLevelLabel as t}from"@storm-software/config-tools/types";import n from"chalk";import"@storm-software/config-tools/logger";import"@storm-software/config-tools/utilities/colors";import"@stryke/helpers/noop";const r=[`#00A0DD`,`#6FCE4E`,`#FBBF24`,`#F43F5E`,`#3B82F6`,`#A855F7`,`#469592`,`#288EDF`,`#10B981`,`#EF4444`,`#F0EC56`,`#F472B6`,`#22D3EE`,`#EAB308`,`#84CC16`,`#F87171`,`#0EA5E9`,`#D946EF`,`#FACC15`,`#34D399`],i=(t,i)=>(a,...o)=>t(a,` ${n.inverse.hex(r[i.split(``).map(e=>e.charCodeAt(0)).reduce((e,t)=>e+t,0)%r.length]||r[0])(` ${e(i)} `)} ${o.join(` `)} `);export{i as extendLog};
@@ -1 +0,0 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`);let t=require(`@stryke/path/append`),n=require(`defu`);n=e.__toESM(n);let r=require(`@stryke/path/join-paths`),i=require(`@stryke/fs/exists`),a=require(`typescript`);a=e.__toESM(a),require(`@stryke/fs/json`);function o(e,t,n=[`.ts`,`.tsx`,`.d.ts`]){return t.find(t=>e?.toString().toLowerCase()===t?.toString().toLowerCase()||e?.toString().toLowerCase()===`./${t?.toString().toLowerCase()}`||`./${e?.toString().toLowerCase()}`===t?.toString().toLowerCase()||n.some(n=>`${e?.toString().toLowerCase()}${n}`===t?.toString().toLowerCase()||`${e?.toString().toLowerCase()}${n}`==`./${t?.toString().toLowerCase()}`||`${t?.toString().toLowerCase()}${n}`==`./${e?.toString().toLowerCase()}`||e?.toString().toLowerCase()===`${t?.toString().toLowerCase()}${n}`||e?.toString().toLowerCase()===`./${t?.toString().toLowerCase()}${n}`||t?.toString().toLowerCase()===`./${e?.toString().toLowerCase()}${n}`))}function s(e,t){return o(e,t)!==void 0}exports.isMatchFound=s;
@@ -1 +0,0 @@
1
- import{appendPath as e}from"@stryke/path/append";import t from"defu";import{joinPaths as n}from"@stryke/path/join-paths";import{existsSync as r}from"@stryke/fs/exists";import i from"typescript";import"@stryke/fs/json";function a(e,t,n=[`.ts`,`.tsx`,`.d.ts`]){return t.find(t=>e?.toString().toLowerCase()===t?.toString().toLowerCase()||e?.toString().toLowerCase()===`./${t?.toString().toLowerCase()}`||`./${e?.toString().toLowerCase()}`===t?.toString().toLowerCase()||n.some(n=>`${e?.toString().toLowerCase()}${n}`===t?.toString().toLowerCase()||`${e?.toString().toLowerCase()}${n}`==`./${t?.toString().toLowerCase()}`||`${t?.toString().toLowerCase()}${n}`==`./${e?.toString().toLowerCase()}`||e?.toString().toLowerCase()===`${t?.toString().toLowerCase()}${n}`||e?.toString().toLowerCase()===`./${t?.toString().toLowerCase()}${n}`||t?.toString().toLowerCase()===`./${e?.toString().toLowerCase()}${n}`))}function o(e,t){return a(e,t)!==void 0}export{o as isMatchFound};
@@ -1 +0,0 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../build/esbuild.cjs`);let n=require(`@storm-software/config-tools/types`),r=require(`esbuild`);async function i(e,i,a={}){let o=await e.fs.resolve(i);if(!o||!e.fs.existsSync(o))throw Error(`Module not found: "${i}". Please check the path and try again.`);let s=await(0,r.build)({...t.extractESBuildConfig(e),entryPoints:[o],write:!1,sourcemap:!1,splitting:!1,treeShaking:!1,bundle:!0,...a});if(s.errors.length>0)throw Error(`Failed to transpile ${i}: ${s.errors.map(e=>e.text).join(`, `)}`);if(s.warnings.length>0&&e.log(n.LogLevelLabel.WARN,`Warnings while transpiling ${i}: ${s.warnings.map(e=>e.text).join(`, `)}`),!s.outputFiles||s.outputFiles.filter(Boolean).length===0)throw Error(`No output files generated for ${i}. Please check the configuration and try again.`);return s.outputFiles.filter(Boolean)[0]}exports.bundle=i;
@@ -1 +0,0 @@
1
- import{extractESBuildConfig as e}from"../build/esbuild.mjs";import{LogLevelLabel as t}from"@storm-software/config-tools/types";import{build as n}from"esbuild";async function r(r,i,a={}){let o=await r.fs.resolve(i);if(!o||!r.fs.existsSync(o))throw Error(`Module not found: "${i}". Please check the path and try again.`);let s=await n({...e(r),entryPoints:[o],write:!1,sourcemap:!1,splitting:!1,treeShaking:!1,bundle:!0,...a});if(s.errors.length>0)throw Error(`Failed to transpile ${i}: ${s.errors.map(e=>e.text).join(`, `)}`);if(s.warnings.length>0&&r.log(t.WARN,`Warnings while transpiling ${i}: ${s.warnings.map(e=>e.text).join(`, `)}`),!s.outputFiles||s.outputFiles.filter(Boolean).length===0)throw Error(`No output files generated for ${i}. Please check the configuration and try again.`);return s.outputFiles.filter(Boolean)[0]}export{r as bundle};
@@ -1 +0,0 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`./bundle.cjs`);let n=require(`@stryke/type-checks/is-set-string`),r=require(`@stryke/convert/parse-type-definition`);async function i(e,i,a={}){let o;o=(0,n.isSetString)(i)?(0,r.parseTypeDefinition)(i):i;let s=await t.bundle(e,o.file,a),c=await e.resolver.evalModule(s.text,{filename:s.path,forceTranspile:!0}),l=o.name;return l||=`default`,c[l]??c[`__Ω${l}`]}exports.resolve=i;
@@ -1 +0,0 @@
1
- import{bundle as e}from"./bundle.mjs";import{isSetString as t}from"@stryke/type-checks/is-set-string";import{parseTypeDefinition as n}from"@stryke/convert/parse-type-definition";async function r(r,i,a={}){let o;o=t(i)?n(i):i;let s=await e(r,o.file,a),c=await r.resolver.evalModule(s.text,{filename:s.path,forceTranspile:!0}),l=o.name;return l||=`default`,c[l]??c[`__Ω${l}`]}export{r as resolve};
@@ -1 +0,0 @@
1
- const e=require(`../../../_virtual/rolldown_runtime.cjs`);let t=require(`@stryke/type-checks/is-undefined`),n=require(`@stryke/type-checks/is-set-string`),r=require(`@stryke/type-checks/is-function`),i=require(`@stryke/type-checks/is-set-object`);function a(e){return(0,r.isFunction)(e)||(0,i.isSetObject)(e)&&`handler`in e&&(0,r.isFunction)(e.handler)}function o(e){return(0,i.isSetObject)(e)&&`handler`in e&&(0,r.isFunction)(e.handler)}function s(e){return a(e)||o(e)}function c(e){return(0,r.isFunction)(e)?e:e.handler}exports.getHookHandler=c,exports.isPluginHook=s,exports.isPluginHookFunction=a,exports.isPluginHookObject=o;
@@ -1 +0,0 @@
1
- import{isUndefined as e}from"@stryke/type-checks/is-undefined";import{isSetString as t}from"@stryke/type-checks/is-set-string";import{isFunction as n}from"@stryke/type-checks/is-function";import{isSetObject as r}from"@stryke/type-checks/is-set-object";function i(e){return n(e)||r(e)&&`handler`in e&&n(e.handler)}function a(e){return r(e)&&`handler`in e&&n(e.handler)}function o(e){return i(e)||a(e)}function s(e){return n(e)?e:e.handler}export{s as getHookHandler,o as isPluginHook,i as isPluginHookFunction,a as isPluginHookObject};
@@ -1 +0,0 @@
1
- let e=require(`@stryke/path/replace`);
@@ -1 +0,0 @@
1
- import{replacePath as e}from"@stryke/path/replace";export{};
@@ -1,5 +0,0 @@
1
- import "./hooks.mjs";
2
- import "./context.mjs";
3
- import "./config.mjs";
4
- import "./resolved.mjs";
5
- import "../internal/helpers/hooks.mjs";
@@ -1,22 +0,0 @@
1
- import { Context } from "./context.cjs";
2
- import { LogFn } from "./config.cjs";
3
- import { PluginItem, PluginObj, PluginPass } from "@babel/core";
4
- import { BabelAPI } from "@babel/helper-plugin-utils";
5
-
6
- //#region ../powerlines/src/types/babel.d.ts
7
-
8
- type BabelPluginPass<TState = unknown> = PluginPass & TState;
9
- type BabelTransformPluginFilter = (code: string, id: string) => boolean;
10
- type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
11
- name: string;
12
- log: LogFn;
13
- api: BabelAPI;
14
- options: TOptions;
15
- context: TContext;
16
- dirname: string;
17
- }) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
18
- $$name: string;
19
- };
20
- type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | BabelTransformPlugin<TContext, TOptions, TState> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter];
21
- //#endregion
22
- export { BabelTransformPluginOptions };
@@ -1,22 +0,0 @@
1
- import { Context } from "./context.mjs";
2
- import { LogFn } from "./config.mjs";
3
- import { PluginItem, PluginObj, PluginPass } from "@babel/core";
4
- import { BabelAPI } from "@babel/helper-plugin-utils";
5
-
6
- //#region ../powerlines/src/types/babel.d.ts
7
-
8
- type BabelPluginPass<TState = unknown> = PluginPass & TState;
9
- type BabelTransformPluginFilter = (code: string, id: string) => boolean;
10
- type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
11
- name: string;
12
- log: LogFn;
13
- api: BabelAPI;
14
- options: TOptions;
15
- context: TContext;
16
- dirname: string;
17
- }) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
18
- $$name: string;
19
- };
20
- type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | BabelTransformPlugin<TContext, TOptions, TState> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter];
21
- //#endregion
22
- export { BabelPluginPass, BabelTransformPlugin, BabelTransformPluginFilter, BabelTransformPluginOptions };
@@ -1,145 +0,0 @@
1
- //#region ../powerlines/src/types/build.d.ts
2
-
3
- type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
4
- interface BuildConfig {
5
- /**
6
- * The platform to build the project for
7
- *
8
- * @defaultValue "neutral"
9
- */
10
- platform?: "node" | "browser" | "neutral";
11
- /**
12
- * Array of strings indicating the polyfills to include for the build.
13
- *
14
- * @remarks
15
- * 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).
16
- *
17
- * @example
18
- * ```ts
19
- * {
20
- * polyfill: ['{projectRoot}/custom-polyfill.ts']
21
- * }
22
- * ```
23
- */
24
- polyfill?: string[];
25
- /**
26
- * 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.
27
- *
28
- * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
29
- */
30
- mainFields?: string[];
31
- /**
32
- * Array of strings indicating what conditions should be used for module resolution.
33
- */
34
- conditions?: string[];
35
- /**
36
- * Array of strings indicating what file extensions should be used for module resolution.
37
- *
38
- * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
39
- */
40
- extensions?: string[];
41
- /**
42
- * Array of strings indicating what modules should be deduplicated to a single version in the build.
43
- *
44
- * @remarks
45
- * 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.
46
- */
47
- dedupe?: string[];
48
- /**
49
- * Array of strings or regular expressions that indicate what modules are builtin for the environment.
50
- */
51
- builtins?: (string | RegExp)[];
52
- /**
53
- * Define global variable replacements.
54
- *
55
- * @remarks
56
- * 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.
57
- *
58
- * @example
59
- * ```ts
60
- * {
61
- * define: {
62
- * __VERSION__: '"1.0.0"',
63
- * __DEV__: 'process.env.NODE_ENV !== "production"'
64
- * }
65
- * }
66
- * ```
67
- *
68
- * @see https://esbuild.github.io/api/#define
69
- * @see https://vitejs.dev/config/build-options.html#define
70
- * @see https://github.com/rollup/plugins/tree/master/packages/replace
71
- */
72
- define?: Record<string, any>;
73
- /**
74
- * Global variables that will have import statements injected where necessary
75
- *
76
- * @remarks
77
- * 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.
78
- *
79
- * @example
80
- * ```ts
81
- * {
82
- * inject: {
83
- * process: 'process/browser',
84
- * Buffer: ['buffer', 'Buffer'],
85
- * }
86
- * }
87
- * ```
88
- *
89
- * @see https://github.com/rollup/plugins/tree/master/packages/inject
90
- */
91
- inject?: Record<string, string | string[]>;
92
- /**
93
- * The alias mappings to use for module resolution during the build process.
94
- *
95
- * @remarks
96
- * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
97
- *
98
- * @example
99
- * ```ts
100
- * {
101
- * alias: {
102
- * "@utils": "./src/utils",
103
- * "@components": "./src/components"
104
- * }
105
- * }
106
- * ```
107
- *
108
- * @see https://github.com/rollup/plugins/tree/master/packages/alias
109
- */
110
- alias?: Record<string, string> | Array<{
111
- find: string | RegExp;
112
- replacement: string;
113
- }>;
114
- /**
115
- * A list of modules that should not be bundled, even if they are external dependencies.
116
- *
117
- * @remarks
118
- * 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.
119
- */
120
- external?: (string | RegExp)[];
121
- /**
122
- * A list of modules that should always be bundled, even if they are external dependencies.
123
- */
124
- noExternal?: (string | RegExp)[];
125
- /**
126
- * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
127
- */
128
- skipNodeModulesBundle?: boolean;
129
- /**
130
- * 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.
131
- *
132
- * @defaultValue false
133
- */
134
- keepProcessEnv?: boolean;
135
- /**
136
- * An optional set of override options to apply to the selected build variant.
137
- *
138
- * @remarks
139
- * 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.
140
- */
141
- override?: Record<string, any>;
142
- }
143
- type BuildResolvedConfig = Omit<BuildConfig, "override">;
144
- //#endregion
145
- export { BuildConfig, BuildResolvedConfig, UnpluginBuildVariant };
@@ -1,147 +0,0 @@
1
- import "esbuild";
2
-
3
- //#region ../powerlines/src/types/build.d.ts
4
-
5
- type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
6
- interface BuildConfig {
7
- /**
8
- * The platform to build the project for
9
- *
10
- * @defaultValue "neutral"
11
- */
12
- platform?: "node" | "browser" | "neutral";
13
- /**
14
- * Array of strings indicating the polyfills to include for the build.
15
- *
16
- * @remarks
17
- * 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).
18
- *
19
- * @example
20
- * ```ts
21
- * {
22
- * polyfill: ['{projectRoot}/custom-polyfill.ts']
23
- * }
24
- * ```
25
- */
26
- polyfill?: string[];
27
- /**
28
- * 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.
29
- *
30
- * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
31
- */
32
- mainFields?: string[];
33
- /**
34
- * Array of strings indicating what conditions should be used for module resolution.
35
- */
36
- conditions?: string[];
37
- /**
38
- * Array of strings indicating what file extensions should be used for module resolution.
39
- *
40
- * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
41
- */
42
- extensions?: string[];
43
- /**
44
- * Array of strings indicating what modules should be deduplicated to a single version in the build.
45
- *
46
- * @remarks
47
- * 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.
48
- */
49
- dedupe?: string[];
50
- /**
51
- * Array of strings or regular expressions that indicate what modules are builtin for the environment.
52
- */
53
- builtins?: (string | RegExp)[];
54
- /**
55
- * Define global variable replacements.
56
- *
57
- * @remarks
58
- * 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.
59
- *
60
- * @example
61
- * ```ts
62
- * {
63
- * define: {
64
- * __VERSION__: '"1.0.0"',
65
- * __DEV__: 'process.env.NODE_ENV !== "production"'
66
- * }
67
- * }
68
- * ```
69
- *
70
- * @see https://esbuild.github.io/api/#define
71
- * @see https://vitejs.dev/config/build-options.html#define
72
- * @see https://github.com/rollup/plugins/tree/master/packages/replace
73
- */
74
- define?: Record<string, any>;
75
- /**
76
- * Global variables that will have import statements injected where necessary
77
- *
78
- * @remarks
79
- * 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.
80
- *
81
- * @example
82
- * ```ts
83
- * {
84
- * inject: {
85
- * process: 'process/browser',
86
- * Buffer: ['buffer', 'Buffer'],
87
- * }
88
- * }
89
- * ```
90
- *
91
- * @see https://github.com/rollup/plugins/tree/master/packages/inject
92
- */
93
- inject?: Record<string, string | string[]>;
94
- /**
95
- * The alias mappings to use for module resolution during the build process.
96
- *
97
- * @remarks
98
- * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
99
- *
100
- * @example
101
- * ```ts
102
- * {
103
- * alias: {
104
- * "@utils": "./src/utils",
105
- * "@components": "./src/components"
106
- * }
107
- * }
108
- * ```
109
- *
110
- * @see https://github.com/rollup/plugins/tree/master/packages/alias
111
- */
112
- alias?: Record<string, string> | Array<{
113
- find: string | RegExp;
114
- replacement: string;
115
- }>;
116
- /**
117
- * A list of modules that should not be bundled, even if they are external dependencies.
118
- *
119
- * @remarks
120
- * 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.
121
- */
122
- external?: (string | RegExp)[];
123
- /**
124
- * A list of modules that should always be bundled, even if they are external dependencies.
125
- */
126
- noExternal?: (string | RegExp)[];
127
- /**
128
- * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
129
- */
130
- skipNodeModulesBundle?: boolean;
131
- /**
132
- * 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.
133
- *
134
- * @defaultValue false
135
- */
136
- keepProcessEnv?: boolean;
137
- /**
138
- * An optional set of override options to apply to the selected build variant.
139
- *
140
- * @remarks
141
- * 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.
142
- */
143
- override?: Record<string, any>;
144
- }
145
- type BuildResolvedConfig = Omit<BuildConfig, "override">;
146
- //#endregion
147
- export { BuildConfig, BuildResolvedConfig, UnpluginBuildVariant };
@@ -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, SUPPORTED_COMMANDS };