@powerlines/plugin-react 0.1.109 → 0.1.111

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 (233) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +1 -0
  2. package/dist/{chunk-CF6LXmkI.mjs → _virtual/rolldown_runtime.mjs} +1 -1
  3. package/dist/components/index.cjs +1 -1
  4. package/dist/components/index.d.cts +1 -2
  5. package/dist/components/index.d.mts +1 -2
  6. package/dist/components/index.mjs +1 -1
  7. package/dist/components/react-optimized.cjs +1 -1
  8. package/dist/components/react-optimized.d.cts +13 -1
  9. package/dist/components/react-optimized.d.mts +13 -1
  10. package/dist/components/react-optimized.mjs +1 -1
  11. package/dist/deepkit/schemas/reflection.cjs +1 -0
  12. package/dist/{plugin-CoU4RMKg.d.mts → deepkit/schemas/reflection.d.cts} +1 -321
  13. package/dist/{plugin-C1nLepnu.d.cts → deepkit/schemas/reflection.d.mts} +1 -322
  14. package/dist/deepkit/schemas/reflection.mjs +1 -0
  15. package/dist/deepkit/schemas/reflection2.cjs +1 -0
  16. package/dist/deepkit/schemas/reflection2.mjs +1 -0
  17. package/dist/deepkit/src/capnp.cjs +1 -0
  18. package/dist/deepkit/src/capnp.mjs +1 -0
  19. package/dist/deepkit/src/esbuild-plugin.cjs +4 -0
  20. package/dist/deepkit/src/esbuild-plugin.mjs +4 -0
  21. package/dist/deepkit/src/reflect-type.cjs +1 -0
  22. package/dist/deepkit/src/reflect-type.mjs +1 -0
  23. package/dist/deepkit/src/resolve-reflections.cjs +1 -0
  24. package/dist/deepkit/src/resolve-reflections.mjs +1 -0
  25. package/dist/deepkit/src/transformer.cjs +1 -0
  26. package/dist/deepkit/src/transformer.mjs +1 -0
  27. package/dist/deepkit/src/transpile.cjs +1 -0
  28. package/dist/deepkit/src/transpile.mjs +1 -0
  29. package/dist/deepkit/src/types.d.cts +10 -0
  30. package/dist/deepkit/src/types.d.mts +10 -0
  31. package/dist/deepkit/src/utilities.cjs +1 -0
  32. package/dist/deepkit/src/utilities.mjs +1 -0
  33. package/dist/deepkit/src/vendor/core.cjs +1 -0
  34. package/dist/deepkit/src/vendor/core.mjs +1 -0
  35. package/dist/deepkit/src/vendor/type-compiler/index.cjs +1 -0
  36. package/dist/deepkit/src/vendor/type-compiler/index.mjs +1 -0
  37. package/dist/deepkit/src/vendor/type.cjs +1 -0
  38. package/dist/deepkit/src/vendor/type.d.cts +7 -0
  39. package/dist/deepkit/src/vendor/type.d.mts +7 -0
  40. package/dist/deepkit/src/vendor/type.mjs +1 -0
  41. package/dist/index.cjs +1 -63
  42. package/dist/index.d.cts +5 -6
  43. package/dist/index.d.mts +6 -6
  44. package/dist/index.mjs +1 -60
  45. package/dist/plugin-alloy/src/core/components/index.cjs +1 -0
  46. package/dist/plugin-alloy/src/core/components/index.mjs +1 -0
  47. package/dist/plugin-alloy/src/core/components/output.cjs +1 -0
  48. package/dist/plugin-alloy/src/core/components/output.mjs +1 -0
  49. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +1 -0
  50. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +1 -0
  51. package/dist/plugin-alloy/src/core/components/source-file.cjs +1 -0
  52. package/dist/plugin-alloy/src/core/components/source-file.mjs +1 -0
  53. package/dist/plugin-alloy/src/core/contexts/context.cjs +1 -0
  54. package/dist/plugin-alloy/src/core/contexts/context.mjs +1 -0
  55. package/dist/plugin-alloy/src/core/contexts/index.cjs +1 -0
  56. package/dist/plugin-alloy/src/core/contexts/index.mjs +1 -0
  57. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +1 -0
  58. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +1 -0
  59. package/dist/plugin-alloy/src/core/index.cjs +1 -0
  60. package/dist/plugin-alloy/src/core/index.mjs +1 -0
  61. package/dist/plugin-alloy/src/helpers/capnp.cjs +1 -0
  62. package/dist/plugin-alloy/src/helpers/capnp.mjs +1 -0
  63. package/dist/plugin-alloy/src/helpers/create-builtin.cjs +1 -0
  64. package/dist/plugin-alloy/src/helpers/create-builtin.mjs +1 -0
  65. package/dist/plugin-alloy/src/helpers/index.cjs +1 -0
  66. package/dist/plugin-alloy/src/helpers/index.mjs +1 -0
  67. package/dist/plugin-alloy/src/helpers/refkey.cjs +1 -0
  68. package/dist/plugin-alloy/src/helpers/refkey.mjs +1 -0
  69. package/dist/plugin-alloy/src/helpers/typescript.cjs +1 -0
  70. package/dist/plugin-alloy/src/helpers/typescript.mjs +1 -0
  71. package/dist/plugin-alloy/src/index.cjs +2 -0
  72. package/dist/plugin-alloy/src/index.mjs +2 -0
  73. package/dist/plugin-alloy/src/markdown/components/index.cjs +1 -0
  74. package/dist/plugin-alloy/src/markdown/components/index.mjs +1 -0
  75. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +1 -0
  76. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +1 -0
  77. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +1 -0
  78. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +1 -0
  79. package/dist/plugin-alloy/src/markdown/contexts/index.cjs +1 -0
  80. package/dist/plugin-alloy/src/markdown/contexts/index.mjs +1 -0
  81. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +1 -0
  82. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +1 -0
  83. package/dist/plugin-alloy/src/markdown/index.cjs +1 -0
  84. package/dist/plugin-alloy/src/markdown/index.mjs +1 -0
  85. package/dist/plugin-alloy/src/types/components.d.mts +5 -0
  86. package/dist/plugin-alloy/src/types/index.d.mts +2 -0
  87. package/dist/plugin-alloy/src/types/plugin.d.cts +38 -0
  88. package/dist/plugin-alloy/src/types/plugin.d.mts +38 -0
  89. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +1 -0
  90. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +1 -0
  91. package/dist/plugin-alloy/src/typescript/components/dynamic-import-statement.cjs +1 -0
  92. package/dist/plugin-alloy/src/typescript/components/dynamic-import-statement.mjs +1 -0
  93. package/dist/plugin-alloy/src/typescript/components/entry-file.cjs +1 -0
  94. package/dist/plugin-alloy/src/typescript/components/entry-file.mjs +1 -0
  95. package/dist/plugin-alloy/src/typescript/components/index.cjs +1 -0
  96. package/dist/plugin-alloy/src/typescript/components/index.mjs +1 -0
  97. package/dist/plugin-alloy/src/typescript/components/record-expression.cjs +1 -0
  98. package/dist/plugin-alloy/src/typescript/components/record-expression.mjs +1 -0
  99. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +1 -0
  100. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +1 -0
  101. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +1 -0
  102. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +1 -0
  103. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +1 -0
  104. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +1 -0
  105. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +1 -0
  106. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +1 -0
  107. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +1 -0
  108. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +1 -0
  109. package/dist/plugin-alloy/src/typescript/index.cjs +1 -0
  110. package/dist/plugin-alloy/src/typescript/index.mjs +1 -0
  111. package/dist/plugin-automd/src/index.cjs +1 -0
  112. package/dist/plugin-automd/src/index.mjs +1 -0
  113. package/dist/plugin-automd/src/types/plugin.d.cts +38 -0
  114. package/dist/plugin-automd/src/types/plugin.d.mts +40 -0
  115. package/dist/plugin-automd/src/types/toc.d.cts +33 -0
  116. package/dist/plugin-automd/src/types/toc.d.mts +33 -0
  117. package/dist/plugin-babel/src/helpers/ast-utils.cjs +1 -0
  118. package/dist/plugin-babel/src/helpers/ast-utils.mjs +1 -0
  119. package/dist/plugin-babel/src/helpers/create-plugin.cjs +1 -0
  120. package/dist/plugin-babel/src/helpers/create-plugin.mjs +1 -0
  121. package/dist/plugin-babel/src/helpers/filters.cjs +1 -0
  122. package/dist/plugin-babel/src/helpers/filters.mjs +1 -0
  123. package/dist/plugin-babel/src/helpers/index.cjs +1 -0
  124. package/dist/plugin-babel/src/helpers/index.mjs +1 -0
  125. package/dist/plugin-babel/src/helpers/module-helpers.cjs +1 -0
  126. package/dist/plugin-babel/src/helpers/module-helpers.mjs +1 -0
  127. package/dist/plugin-babel/src/helpers/options.cjs +1 -0
  128. package/dist/plugin-babel/src/helpers/options.mjs +1 -0
  129. package/dist/plugin-babel/src/index.cjs +1 -0
  130. package/dist/plugin-babel/src/index.mjs +1 -0
  131. package/dist/plugin-babel/src/types/index.d.mts +1 -0
  132. package/dist/plugin-babel/src/types/plugin.d.cts +15 -0
  133. package/dist/plugin-babel/src/types/plugin.d.mts +15 -0
  134. package/dist/plugin-env/src/babel/index.cjs +1 -0
  135. package/dist/plugin-env/src/babel/index.mjs +1 -0
  136. package/dist/plugin-env/src/babel/plugin.cjs +5 -0
  137. package/dist/plugin-env/src/babel/plugin.mjs +5 -0
  138. package/dist/plugin-env/src/components/docs.cjs +1 -0
  139. package/dist/plugin-env/src/components/docs.mjs +1 -0
  140. package/dist/plugin-env/src/components/env.cjs +34 -0
  141. package/dist/plugin-env/src/components/env.mjs +31 -0
  142. package/dist/plugin-env/src/components/index.cjs +1 -0
  143. package/dist/plugin-env/src/components/index.mjs +1 -0
  144. package/dist/plugin-env/src/helpers/automd-generator.cjs +1 -0
  145. package/dist/plugin-env/src/helpers/automd-generator.mjs +1 -0
  146. package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +1 -0
  147. package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +1 -0
  148. package/dist/plugin-env/src/helpers/index.cjs +1 -0
  149. package/dist/plugin-env/src/helpers/index.mjs +1 -0
  150. package/dist/plugin-env/src/helpers/load.cjs +1 -0
  151. package/dist/plugin-env/src/helpers/load.mjs +1 -0
  152. package/dist/plugin-env/src/helpers/persistence.cjs +1 -0
  153. package/dist/plugin-env/src/helpers/persistence.mjs +1 -0
  154. package/dist/plugin-env/src/helpers/reflect.cjs +1 -0
  155. package/dist/plugin-env/src/helpers/reflect.mjs +1 -0
  156. package/dist/plugin-env/src/helpers/source-file-env.cjs +1 -0
  157. package/dist/plugin-env/src/helpers/source-file-env.mjs +1 -0
  158. package/dist/plugin-env/src/helpers/template-helpers.cjs +1 -0
  159. package/dist/plugin-env/src/helpers/template-helpers.mjs +1 -0
  160. package/dist/plugin-env/src/index.cjs +10 -0
  161. package/dist/plugin-env/src/index.mjs +10 -0
  162. package/dist/plugin-env/src/types/plugin.d.cts +151 -0
  163. package/dist/plugin-env/src/types/plugin.d.mts +153 -0
  164. package/dist/plugin-env/src/types/runtime.d.cts +792 -0
  165. package/dist/plugin-env/src/types/runtime.d.mts +792 -0
  166. package/dist/powerlines/src/lib/build/esbuild.cjs +14 -0
  167. package/dist/powerlines/src/lib/build/esbuild.mjs +14 -0
  168. package/dist/powerlines/src/lib/entry.cjs +1 -0
  169. package/dist/powerlines/src/lib/entry.mjs +1 -0
  170. package/dist/powerlines/src/lib/logger.cjs +1 -0
  171. package/dist/powerlines/src/lib/logger.mjs +1 -0
  172. package/dist/powerlines/src/lib/typescript/tsconfig.cjs +1 -0
  173. package/dist/powerlines/src/lib/typescript/tsconfig.mjs +1 -0
  174. package/dist/powerlines/src/lib/utilities/bundle.cjs +1 -0
  175. package/dist/powerlines/src/lib/utilities/bundle.mjs +1 -0
  176. package/dist/powerlines/src/lib/utilities/file-header.cjs +1 -0
  177. package/dist/powerlines/src/lib/utilities/file-header.mjs +1 -0
  178. package/dist/powerlines/src/lib/utilities/resolve.cjs +1 -0
  179. package/dist/powerlines/src/lib/utilities/resolve.mjs +1 -0
  180. package/dist/powerlines/src/plugin-utils/paths.cjs +1 -0
  181. package/dist/powerlines/src/plugin-utils/paths.mjs +1 -0
  182. package/dist/powerlines/src/types/babel.d.cts +22 -0
  183. package/dist/powerlines/src/types/babel.d.mts +22 -0
  184. package/dist/powerlines/src/types/build.d.cts +145 -0
  185. package/dist/powerlines/src/types/build.d.mts +145 -0
  186. package/dist/powerlines/src/types/commands.d.cts +8 -0
  187. package/dist/powerlines/src/types/commands.d.mts +9 -0
  188. package/dist/powerlines/src/types/config.d.cts +368 -0
  189. package/dist/powerlines/src/types/config.d.mts +369 -0
  190. package/dist/powerlines/src/types/context.d.cts +373 -0
  191. package/dist/powerlines/src/types/context.d.mts +375 -0
  192. package/dist/powerlines/src/types/fs.d.cts +458 -0
  193. package/dist/powerlines/src/types/fs.d.mts +458 -0
  194. package/dist/powerlines/src/types/hooks.d.mts +2 -0
  195. package/dist/powerlines/src/types/plugin.d.cts +231 -0
  196. package/dist/powerlines/src/types/plugin.d.mts +231 -0
  197. package/dist/powerlines/src/types/resolved.d.cts +82 -0
  198. package/dist/powerlines/src/types/resolved.d.mts +82 -0
  199. package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
  200. package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
  201. package/dist/types/index.cjs +0 -1
  202. package/dist/types/index.d.cts +2 -4
  203. package/dist/types/index.d.mts +2 -4
  204. package/dist/types/index.mjs +1 -1
  205. package/dist/types/plugin.cjs +0 -1
  206. package/dist/types/plugin.d.cts +72 -2
  207. package/dist/types/plugin.d.mts +72 -2
  208. package/dist/types/plugin.mjs +1 -1
  209. package/dist/types/runtime.cjs +0 -1
  210. package/dist/types/runtime.d.cts +14 -2
  211. package/dist/types/runtime.d.mts +14 -2
  212. package/dist/types/runtime.mjs +1 -1
  213. package/package.json +10 -11
  214. package/dist/components-BWLXb7a2.cjs +0 -0
  215. package/dist/components-MTvNCZDU.mjs +0 -1
  216. package/dist/index-C-svZlpj.d.mts +0 -1
  217. package/dist/index-CtCMUyZA.d.cts +0 -1
  218. package/dist/index-DEHBdV_z.d.mts +0 -1
  219. package/dist/index-_wQ5ClJU.d.cts +0 -1
  220. package/dist/plugin-G4qbpIjB.mjs +0 -1
  221. package/dist/plugin-pBKbb5K9.cjs +0 -0
  222. package/dist/react-optimized-AthekqzJ.cjs +0 -1
  223. package/dist/react-optimized-DPBN2hOh.mjs +0 -1
  224. package/dist/react-optimized-DmMl-ZEI.d.cts +0 -14
  225. package/dist/react-optimized-Y1x3FeDm.d.mts +0 -14
  226. package/dist/runtime-BNQjyQ7l.d.cts +0 -2495
  227. package/dist/runtime-Bp9G0scd.cjs +0 -0
  228. package/dist/runtime-CKObV75t.d.cts +0 -15
  229. package/dist/runtime-Do9xjHUb.d.mts +0 -2496
  230. package/dist/runtime-IEYS5R9b.d.mts +0 -15
  231. package/dist/runtime-cDYyRPa0.mjs +0 -1
  232. package/dist/types-C5ggNT4K.mjs +0 -1
  233. package/dist/types-a8gm_IaQ.cjs +0 -0
@@ -1,2496 +0,0 @@
1
- import { PluginItem, PluginObj, PluginPass, transformAsync } from "@babel/core";
2
- import { LogLevelLabel } from "@storm-software/config-tools/types";
3
- import { BabelAPI } from "@babel/helper-plugin-utils";
4
- import "c12";
5
- import { ResolveOptions } from "@stryke/fs/resolve";
6
- import ts from "typescript";
7
- import { ArrayValues } from "@stryke/types/array";
8
- import { FunctionLike, MaybePromise, NonUndefined } from "@stryke/types/base";
9
- import { ExternalIdResult, HookFilter, TransformResult, UnpluginBuildContext, UnpluginContext, UnpluginMessage, UnpluginOptions } from "unplugin";
10
- import { PreviewOptions, ResolvedPreviewOptions } from "vite";
11
- import { EnvPaths } from "@stryke/env/get-env-paths";
12
- import { FetchRequestOptions } from "@stryke/http/fetch";
13
- import { PackageJson } from "@stryke/types/package-json";
14
- import { Jiti } from "jiti";
15
- import { SourceMap } from "magic-string";
16
- import { ParseResult, ParserOptions } from "oxc-parser";
17
- import { Range } from "semver";
18
- import { Project } from "ts-morph";
19
- import { RequestInfo, Response } from "undici";
20
- import { Format } from "@storm-software/build-tools/types";
21
- import { StormWorkspaceConfig } from "@storm-software/config/types";
22
- import { TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
23
- import { AssetGlob } from "@stryke/types/file";
24
- import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
25
-
26
- //#region ../powerlines/src/types/build.d.ts
27
- type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
28
- interface BuildConfig {
29
- /**
30
- * The platform to build the project for
31
- *
32
- * @defaultValue "neutral"
33
- */
34
- platform?: "node" | "browser" | "neutral";
35
- /**
36
- * Array of strings indicating the polyfills to include for the build.
37
- *
38
- * @remarks
39
- * 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).
40
- *
41
- * @example
42
- * ```ts
43
- * {
44
- * polyfill: ['{projectRoot}/custom-polyfill.ts']
45
- * }
46
- * ```
47
- */
48
- polyfill?: string[];
49
- /**
50
- * 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.
51
- *
52
- * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
53
- */
54
- mainFields?: string[];
55
- /**
56
- * Array of strings indicating what conditions should be used for module resolution.
57
- */
58
- conditions?: string[];
59
- /**
60
- * Array of strings indicating what file extensions should be used for module resolution.
61
- *
62
- * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
63
- */
64
- extensions?: string[];
65
- /**
66
- * Array of strings indicating what modules should be deduplicated to a single version in the build.
67
- *
68
- * @remarks
69
- * 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.
70
- */
71
- dedupe?: string[];
72
- /**
73
- * Array of strings or regular expressions that indicate what modules are builtin for the environment.
74
- */
75
- builtins?: (string | RegExp)[];
76
- /**
77
- * Define global variable replacements.
78
- *
79
- * @remarks
80
- * 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.
81
- *
82
- * @example
83
- * ```ts
84
- * {
85
- * define: {
86
- * __VERSION__: '"1.0.0"',
87
- * __DEV__: 'process.env.NODE_ENV !== "production"'
88
- * }
89
- * }
90
- * ```
91
- *
92
- * @see https://esbuild.github.io/api/#define
93
- * @see https://vitejs.dev/config/build-options.html#define
94
- * @see https://github.com/rollup/plugins/tree/master/packages/replace
95
- */
96
- define?: Record<string, any>;
97
- /**
98
- * Global variables that will have import statements injected where necessary
99
- *
100
- * @remarks
101
- * 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.
102
- *
103
- * @example
104
- * ```ts
105
- * {
106
- * inject: {
107
- * process: 'process/browser',
108
- * Buffer: ['buffer', 'Buffer'],
109
- * }
110
- * }
111
- * ```
112
- *
113
- * @see https://github.com/rollup/plugins/tree/master/packages/inject
114
- */
115
- inject?: Record<string, string | string[]>;
116
- /**
117
- * The alias mappings to use for module resolution during the build process.
118
- *
119
- * @remarks
120
- * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
121
- *
122
- * @example
123
- * ```ts
124
- * {
125
- * alias: {
126
- * "@utils": "./src/utils",
127
- * "@components": "./src/components"
128
- * }
129
- * }
130
- * ```
131
- *
132
- * @see https://github.com/rollup/plugins/tree/master/packages/alias
133
- */
134
- alias?: Record<string, string> | Array<{
135
- find: string | RegExp;
136
- replacement: string;
137
- }>;
138
- /**
139
- * A list of modules that should not be bundled, even if they are external dependencies.
140
- *
141
- * @remarks
142
- * 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.
143
- */
144
- external?: (string | RegExp)[];
145
- /**
146
- * A list of modules that should always be bundled, even if they are external dependencies.
147
- */
148
- noExternal?: (string | RegExp)[];
149
- /**
150
- * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
151
- */
152
- skipNodeModulesBundle?: boolean;
153
- /**
154
- * 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.
155
- *
156
- * @defaultValue false
157
- */
158
- keepProcessEnv?: boolean;
159
- /**
160
- * An optional set of override options to apply to the selected build variant.
161
- *
162
- * @remarks
163
- * 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.
164
- */
165
- override?: Record<string, any>;
166
- }
167
- type BuildResolvedConfig = Omit<BuildConfig, "override">;
168
- //#endregion
169
- //#region ../powerlines/src/types/babel.d.ts
170
- type BabelPluginPass<TState = unknown> = PluginPass & TState;
171
- type BabelTransformPluginFilter = (code: string, id: string) => boolean;
172
- type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
173
- name: string;
174
- log: LogFn;
175
- api: BabelAPI;
176
- options: TOptions;
177
- context: TContext;
178
- dirname: string;
179
- }) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
180
- $$name: string;
181
- };
182
- 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];
183
- //#endregion
184
- //#region ../powerlines/src/types/fs.d.ts
185
- type StoragePreset = "fs" | "virtual";
186
- /**
187
- * Interface defining the methods and properties for a storage adapter.
188
- */
189
- interface StorageAdapter {
190
- /**
191
- * A name identifying the storage adapter type.
192
- */
193
- name: string;
194
- /**
195
- * Checks if a key exists in the storage.
196
- *
197
- * @param key - The key to check for existence.
198
- * @returns A promise that resolves to `true` if the key exists, otherwise `false`.
199
- */
200
- exists: (key: string) => Promise<boolean>;
201
- /**
202
- * Synchronously checks if a key exists in the storage.
203
- *
204
- * @param key - The key to check for existence.
205
- * @returns Returns `true` if the key exists, otherwise `false`.
206
- */
207
- existsSync: (key: string) => boolean;
208
- /**
209
- * Read a value associated with a key from the storage.
210
- *
211
- * @param key - The key to read the value for.
212
- * @returns A promise that resolves to the value if found, otherwise `null`.
213
- */
214
- get: (key: string) => Promise<string | null>;
215
- /**
216
- * Synchronously reads the value associated with a key from the storage.
217
- *
218
- * @param key - The key to read the value for.
219
- * @returns The value if found, otherwise `null`.
220
- */
221
- getSync: (key: string) => string | null;
222
- /**
223
- * Writes a value to the storage for the given key.
224
- *
225
- * @param key - The key to associate the value with.
226
- * @param value - The value to store.
227
- */
228
- set: (key: string, value: string) => Promise<void>;
229
- /**
230
- * Synchronously writes a value to the storage for the given key.
231
- *
232
- * @param key - The key to associate the value with.
233
- * @param value - The value to store.
234
- */
235
- setSync: (key: string, value: string) => void;
236
- /**
237
- * Removes a value from the storage.
238
- *
239
- * @param key - The key whose value should be removed.
240
- */
241
- remove: (key: string) => Promise<void>;
242
- /**
243
- * Synchronously removes a value from the storage.
244
- *
245
- * @param key - The key whose value should be removed.
246
- */
247
- removeSync: (key: string) => void;
248
- /**
249
- * Creates a directory at the specified path.
250
- *
251
- * @param dirPath - The path of the directory to create.
252
- */
253
- mkdir: (dirPath: string) => Promise<void>;
254
- /**
255
- * Synchronously creates a directory at the specified path.
256
- *
257
- * @param dirPath - The path of the directory to create.
258
- */
259
- mkdirSync: (dirPath: string) => void;
260
- /**
261
- * Remove all entries from the storage that match the provided base path.
262
- *
263
- * @param base - The base path or prefix to clear entries from.
264
- */
265
- clear: (base?: string) => Promise<void>;
266
- /**
267
- * Synchronously remove all entries from the storage that match the provided base path.
268
- *
269
- * @param base - The base path or prefix to clear entries from.
270
- */
271
- clearSync: (base?: string) => void;
272
- /**
273
- * Lists all keys under the provided base path.
274
- *
275
- * @param base - The base path or prefix to list keys from.
276
- * @returns A promise resolving to the list of keys.
277
- */
278
- list: (base?: string) => Promise<string[]>;
279
- /**
280
- * Synchronously lists all keys under the provided base path.
281
- *
282
- * @param base - The base path or prefix to list keys from.
283
- * @returns The list of keys.
284
- */
285
- listSync: (base?: string) => string[];
286
- /**
287
- * Checks if the given key is a directory.
288
- *
289
- * @param key - The key to check.
290
- * @returns A promise that resolves to `true` if the key is a directory, otherwise `false`.
291
- */
292
- isDirectory: (key: string) => Promise<boolean>;
293
- /**
294
- * Synchronously checks if the given key is a directory.
295
- *
296
- * @param key - The key to check.
297
- * @returns `true` if the key is a directory, otherwise `false`.
298
- */
299
- isDirectorySync: (key: string) => boolean;
300
- /**
301
- * Checks if the given key is a file.
302
- *
303
- * @param key - The key to check.
304
- * @returns A promise that resolves to `true` if the key is a file, otherwise `false`.
305
- */
306
- isFile: (key: string) => Promise<boolean>;
307
- /**
308
- * Synchronously checks if the given key is a file.
309
- *
310
- * @param key - The key to check.
311
- * @returns `true` if the key is a file, otherwise `false`.
312
- */
313
- isFileSync: (key: string) => boolean;
314
- /**
315
- * Releases any resources held by the storage adapter.
316
- */
317
- dispose: () => MaybePromise<void>;
318
- }
319
- /**
320
- * A mapping of file paths to storage adapter names and their corresponding {@link StorageAdapter} instances.
321
- */
322
- type StoragePort = Record<string, StorageAdapter>;
323
- interface VirtualFileMetadata {
324
- /**
325
- * The identifier for the file data.
326
- */
327
- id: string;
328
- /**
329
- * The timestamp of the virtual file.
330
- */
331
- timestamp: number;
332
- /**
333
- * The type of the file.
334
- *
335
- * @remarks
336
- * This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
337
- * - `builtin`: Indicates that the file is a built-in module provided by the system.
338
- * - `entry`: Indicates that the file is an entry point for execution.
339
- * - `normal`: Indicates that the file is a standard file without any special role.
340
- */
341
- type: string;
342
- /**
343
- * Additional metadata associated with the file.
344
- */
345
- properties: Record<string, string | undefined>;
346
- }
347
- interface VirtualFileData {
348
- /**
349
- * The identifier for the file data.
350
- */
351
- id?: string;
352
- /**
353
- * The contents of the virtual file.
354
- */
355
- code: string;
356
- /**
357
- * The type of the file.
358
- *
359
- * @remarks
360
- * This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
361
- * - `builtin`: Indicates that the file is a built-in module provided by the system.
362
- * - `entry`: Indicates that the file is an entry point for execution.
363
- * - `normal`: Indicates that the file is a standard file without any special role.
364
- */
365
- type?: string;
366
- /**
367
- * Additional metadata associated with the file.
368
- */
369
- properties?: Record<string, string | undefined>;
370
- }
371
- interface VirtualFile extends Required<VirtualFileData>, VirtualFileMetadata {
372
- /**
373
- * An additional name for the file.
374
- */
375
- path: string;
376
- /**
377
- * The timestamp of the virtual file.
378
- */
379
- timestamp: number;
380
- }
381
- interface WriteOptions {
382
- /**
383
- * Should the file skip formatting before being written?
384
- *
385
- * @defaultValue false
386
- */
387
- skipFormat?: boolean;
388
- /**
389
- * Additional metadata for the file.
390
- */
391
- meta?: Partial<VirtualFileMetadata>;
392
- }
393
- interface ResolveOptions$1 extends ResolveOptions {
394
- /**
395
- * If true, the module is being resolved as an entry point.
396
- */
397
- isEntry?: boolean;
398
- /**
399
- * If true, the resolver will skip using the cache when resolving modules.
400
- */
401
- skipCache?: boolean;
402
- /**
403
- * An array of external modules or patterns to exclude from resolution.
404
- */
405
- external?: (string | RegExp)[];
406
- /**
407
- * An array of modules or patterns to include in the resolution, even if they are marked as external.
408
- */
409
- noExternal?: (string | RegExp)[];
410
- /**
411
- * An array of patterns to match when resolving modules.
412
- */
413
- skipNodeModulesBundle?: boolean;
414
- }
415
- interface VirtualFileSystemInterface {
416
- /**
417
- * The underlying file metadata.
418
- */
419
- metadata: Readonly<Record<string, VirtualFileMetadata>>;
420
- /**
421
- * A map of file paths to their module ids.
422
- */
423
- ids: Readonly<Record<string, string>>;
424
- /**
425
- * A map of module ids to their file paths.
426
- */
427
- paths: Readonly<Record<string, string>>;
428
- /**
429
- * Checks if a file exists in the virtual file system (VFS).
430
- *
431
- * @param path - The path or id of the file.
432
- * @returns `true` if the file exists, otherwise `false`.
433
- */
434
- exists: (path: string) => Promise<boolean>;
435
- /**
436
- * Synchronously Checks if a file exists in the virtual file system (VFS).
437
- *
438
- * @param path - The path or id of the file.
439
- * @returns `true` if the file exists, otherwise `false`.
440
- */
441
- existsSync: (path: string) => boolean;
442
- /**
443
- * Checks if a file is virtual in the virtual file system (VFS).
444
- *
445
- * @param path - The path or id of the file.
446
- * @returns `true` if the file is virtual, otherwise `false`.
447
- */
448
- isVirtual: (path: string) => boolean;
449
- /**
450
- * Checks if the given key is a directory.
451
- *
452
- * @param key - The key to check.
453
- * @returns A promise that resolves to `true` if the key is a directory, otherwise `false`.
454
- */
455
- isDirectory: (key: string) => Promise<boolean>;
456
- /**
457
- * Synchronously checks if the given key is a directory.
458
- *
459
- * @param key - The key to check.
460
- * @returns `true` if the key is a directory, otherwise `false`.
461
- */
462
- isDirectorySync: (key: string) => boolean;
463
- /**
464
- * Checks if the given key is a file.
465
- *
466
- * @param key - The key to check.
467
- * @returns A promise that resolves to `true` if the key is a file, otherwise `false`.
468
- */
469
- isFile: (key: string) => Promise<boolean>;
470
- /**
471
- * Synchronously checks if the given key is a file.
472
- *
473
- * @param key - The key to check.
474
- * @returns `true` if the key is a file, otherwise `false`.
475
- */
476
- isFileSync: (key: string) => boolean;
477
- /**
478
- * Gets the metadata of a file in the virtual file system (VFS).
479
- *
480
- * @param path - The path or id of the file.
481
- * @returns The metadata of the file if it exists, otherwise undefined.
482
- */
483
- getMetadata: (path: string) => VirtualFileMetadata | undefined;
484
- /**
485
- * Lists files in a given path.
486
- *
487
- * @param path - The path to list files from.
488
- * @returns An array of file names in the specified path.
489
- */
490
- listSync: (path: string) => string[];
491
- /**
492
- * Lists files in a given path.
493
- *
494
- * @param path - The path to list files from.
495
- * @returns An array of file names in the specified path.
496
- */
497
- list: (path: string) => Promise<string[]>;
498
- /**
499
- * Removes a file or symbolic link in the virtual file system (VFS).
500
- *
501
- * @param path - The path to the file to remove.
502
- * @returns A promise that resolves when the file is removed.
503
- */
504
- removeSync: (path: string) => void;
505
- /**
506
- * Asynchronously removes a file or symbolic link in the virtual file system (VFS).
507
- *
508
- * @param path - The path to the file to remove.
509
- * @returns A promise that resolves when the file is removed.
510
- */
511
- remove: (path: string) => Promise<void>;
512
- /**
513
- * Reads a file from the virtual file system (VFS).
514
- *
515
- * @param path - The path or id of the file.
516
- * @returns The contents of the file if it exists, otherwise undefined.
517
- */
518
- read: (path: string) => Promise<string | undefined>;
519
- /**
520
- * Reads a file from the virtual file system (VFS).
521
- *
522
- * @param path - The path or id of the file.
523
- */
524
- readSync: (path: string) => string | undefined;
525
- /**
526
- * Writes a file to the virtual file system (VFS).
527
- *
528
- * @param path - The path to the file.
529
- * @param data - The contents of the file.
530
- * @param options - Options for writing the file.
531
- * @returns A promise that resolves when the file is written.
532
- */
533
- write: (path: string, data: string, options?: WriteOptions) => Promise<void>;
534
- /**
535
- * Writes a file to the virtual file system (VFS).
536
- *
537
- * @param path - The path to the file.
538
- * @param data - The contents of the file.
539
- * @param options - Options for writing the file.
540
- */
541
- writeSync: (path: string, data: string, options?: WriteOptions) => void;
542
- /**
543
- * Creates a directory at the specified path.
544
- *
545
- * @param dirPath - The path of the directory to create.
546
- */
547
- mkdir: (dirPath: string) => Promise<void>;
548
- /**
549
- * Synchronously creates a directory at the specified path.
550
- *
551
- * @param dirPath - The path of the directory to create.
552
- */
553
- mkdirSync: (dirPath: string) => void;
554
- /**
555
- * Moves a file from one path to another in the virtual file system (VFS).
556
- *
557
- * @param srcPath - The source path to move
558
- * @param destPath - The destination path to move to
559
- */
560
- move: (srcPath: string, destPath: string) => Promise<void>;
561
- /**
562
- * Synchronously moves a file from one path to another in the virtual file system (VFS).
563
- *
564
- * @param srcPath - The source path to move
565
- * @param destPath - The destination path to move to
566
- */
567
- moveSync: (srcPath: string, destPath: string) => void;
568
- /**
569
- * Copies a file from one path to another in the virtual file system (VFS).
570
- *
571
- * @param srcPath - The source path to copy
572
- * @param destPath - The destination path to copy to
573
- */
574
- copy: (srcPath: string | URL | Omit<AssetGlob, "output">, destPath: string | URL) => Promise<void>;
575
- /**
576
- * Synchronously copies a file from one path to another in the virtual file system (VFS).
577
- *
578
- * @param srcPath - The source path to copy
579
- * @param destPath - The destination path to copy to
580
- */
581
- copySync: (srcPath: string | URL | Omit<AssetGlob, "output">, destPath: string | URL) => void;
582
- /**
583
- * Glob files in the virtual file system (VFS) based on the provided pattern(s).
584
- *
585
- * @param pattern - A pattern (or multiple patterns) to use to determine the file paths to return
586
- * @returns An array of file paths matching the provided pattern(s)
587
- */
588
- glob: (patterns: string | Omit<AssetGlob, "output"> | (string | Omit<AssetGlob, "output">)[]) => Promise<string[]>;
589
- /**
590
- * Synchronously glob files in the virtual file system (VFS) based on the provided pattern(s).
591
- *
592
- * @param pattern - A pattern (or multiple patterns) to use to determine the file paths to return
593
- * @returns An array of file paths matching the provided pattern(s)
594
- */
595
- globSync: (patterns: string | Omit<AssetGlob, "output"> | (string | Omit<AssetGlob, "output">)[]) => string[];
596
- /**
597
- * A helper function to resolve modules using the Jiti resolver
598
- *
599
- * @remarks
600
- * This function can be used to resolve modules relative to the project root directory.
601
- *
602
- * @example
603
- * ```ts
604
- * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
605
- * ```
606
- *
607
- * @param id - The module to resolve.
608
- * @param importer - An optional path to the importer module.
609
- * @param options - Additional resolution options.
610
- * @returns A promise that resolves to the resolved module path.
611
- */
612
- resolve: (id: string, importer?: string, options?: ResolveOptions$1) => Promise<string | undefined>;
613
- /**
614
- * A synchronous helper function to resolve modules using the Jiti resolver
615
- *
616
- * @remarks
617
- * This function can be used to resolve modules relative to the project root directory.
618
- *
619
- * @example
620
- * ```ts
621
- * const resolvedPath = context.resolveSync("some-module", "/path/to/importer");
622
- * ```
623
- *
624
- * @param id - The module to resolve.
625
- * @param importer - An optional path to the importer module.
626
- * @param options - Additional resolution options.
627
- * @returns The resolved module path.
628
- */
629
- resolveSync: (id: string, importer?: string, options?: ResolveOptions$1) => string | undefined;
630
- /**
631
- * Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
632
- */
633
- dispose: () => Promise<void>;
634
- }
635
- //#endregion
636
- //#region ../powerlines/src/types/tsconfig.d.ts
637
- type ReflectionMode = "default" | "explicit" | "never";
638
- type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
639
- /**
640
- * Defines the level of reflection to be used during the transpilation process.
641
- *
642
- * @remarks
643
- * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
644
- * - `minimal` - Only the essential type information is captured.
645
- * - `normal` - Additional type information is captured, including some contextual data.
646
- * - `verbose` - All available type information is captured, including detailed contextual data.
647
- */
648
- type ReflectionLevel = "minimal" | "normal" | "verbose";
649
- interface DeepkitOptions {
650
- /**
651
- * Either true to activate reflection for all files compiled using this tsconfig,
652
- * or a list of globs/file paths relative to this tsconfig.json.
653
- * Globs/file paths can be prefixed with a ! to exclude them.
654
- */
655
- reflection?: RawReflectionMode;
656
- /**
657
- * Defines the level of reflection to be used during the transpilation process.
658
- *
659
- * @remarks
660
- * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
661
- * - `minimal` - Only the essential type information is captured.
662
- * - `normal` - Additional type information is captured, including some contextual data.
663
- * - `verbose` - All available type information is captured, including detailed contextual data.
664
- */
665
- reflectionLevel?: ReflectionLevel;
666
- }
667
- type TSCompilerOptions = CompilerOptions & DeepkitOptions;
668
- /**
669
- * The TypeScript compiler configuration.
670
- *
671
- * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
672
- */
673
- interface TSConfig extends Omit<TsConfigJson, "reflection"> {
674
- /**
675
- * Either true to activate reflection for all files compiled using this tsconfig,
676
- * or a list of globs/file paths relative to this tsconfig.json.
677
- * Globs/file paths can be prefixed with a ! to exclude them.
678
- */
679
- reflection?: RawReflectionMode;
680
- /**
681
- * Defines the level of reflection to be used during the transpilation process.
682
- *
683
- * @remarks
684
- * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
685
- * - `minimal` - Only the essential type information is captured.
686
- * - `normal` - Additional type information is captured, including some contextual data.
687
- * - `verbose` - All available type information is captured, including detailed contextual data.
688
- */
689
- reflectionLevel?: ReflectionLevel;
690
- /**
691
- * Instructs the TypeScript compiler how to compile `.ts` files.
692
- */
693
- compilerOptions?: TSCompilerOptions;
694
- }
695
- type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
696
- originalTsconfigJson: TsConfigJson;
697
- tsconfigJson: TSConfig;
698
- tsconfigFilePath: string;
699
- };
700
- //#endregion
701
- //#region ../powerlines/src/types/config.d.ts
702
- type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
703
- /**
704
- * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
705
- */
706
- type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
707
- type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext> | Plugin<TContext>[]>;
708
- /**
709
- * A configuration tuple for a Powerlines plugin.
710
- */
711
- type PluginConfigTuple<TContext extends PluginContext = PluginContext, TOptions = any> = [string | PluginFactory<TContext, TOptions>, TOptions] | [Plugin<TContext>];
712
- /**
713
- * A configuration object for a Powerlines plugin.
714
- */
715
- type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions = any> = {
716
- plugin: string | PluginFactory<TContext, TOptions>;
717
- options: TOptions;
718
- } | {
719
- plugin: Plugin<TContext>;
720
- options?: never;
721
- };
722
- /**
723
- * A configuration tuple for a Powerlines plugin.
724
- */
725
- type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | PluginConfigTuple<TContext> | PluginConfigObject<TContext> | Promise<PluginConfig<TContext>> | PluginConfig<TContext>[];
726
- type ProjectType = "application" | "library";
727
- type BabelUserConfig = Parameters<typeof transformAsync>[1] & {
728
- /**
729
- * The Babel plugins to be used during the build process
730
- */
731
- plugins?: BabelTransformPluginOptions[];
732
- /**
733
- * The Babel presets to be used during the build process
734
- */
735
- presets?: BabelTransformPluginOptions[];
736
- };
737
- interface DeployConfig {
738
- /**
739
- * The deployment variant being used by the Powerlines engine.
740
- *
741
- * @example
742
- * ```ts
743
- * export default defineConfig({
744
- * deploy: {
745
- * variant: "cloudflare"
746
- * }
747
- * });
748
- *
749
- * ```
750
- */
751
- variant?: string;
752
- }
753
- interface OutputConfig {
754
- /**
755
- * The path to output the final compiled files to
756
- *
757
- * @remarks
758
- * If a value is not provided, Powerlines will attempt to:
759
- * 1. Use the `outDir` value in the `tsconfig.json` file.
760
- * 2. Use the `dist` directory in the project root directory.
761
- *
762
- * @defaultValue "dist/\{projectRoot\}"
763
- */
764
- outputPath?: string;
765
- /**
766
- * The output directory path for the project build.
767
- *
768
- * @remarks
769
- * This path is used to determine where the built files will be placed after the build process completes. This will be used in scenarios where the monorepo uses TSConfig paths to link packages together.
770
- *
771
- * @defaultValue "\{projectRoot\}/dist"
772
- */
773
- buildPath?: string;
774
- /**
775
- * The folder where the generated runtime artifacts will be located
776
- *
777
- * @remarks
778
- * This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
779
- *
780
- * @defaultValue "\{projectRoot\}/.powerlines"
781
- */
782
- artifactsPath?: string;
783
- /**
784
- * The path of the generated runtime declaration file relative to the workspace root.
785
- *
786
- * @defaultValue "\{projectRoot\}/powerlines.d.ts"
787
- */
788
- dts?: string | false;
789
- /**
790
- * A prefix to use for identifying builtin modules
791
- *
792
- * @remarks
793
- * This prefix will be used to identify all builtin modules generated during the "prepare" phase. An example builtin ID for a module called `"utils"` would be `"{builtinPrefix}:utils"`.
794
- *
795
- * @defaultValue "powerlines"
796
- */
797
- builtinPrefix?: string;
798
- /**
799
- * The module format of the output files
800
- *
801
- * @remarks
802
- * This option can be a single format or an array of formats. If an array is provided, multiple builds will be generated for each format.
803
- *
804
- * @defaultValue "esm"
805
- */
806
- format?: Format | Format[];
807
- /**
808
- * A list of assets to copy to the output directory
809
- *
810
- * @remarks
811
- * The assets can be specified as a string (path to the asset) or as an object with a `glob` property (to match multiple files). The paths are relative to the project root directory.
812
- */
813
- assets?: Array<string | AssetGlob>;
814
- /**
815
- * A string preset or a custom {@link StoragePort} to provide fine-grained control over generated/output file storage.
816
- *
817
- * @remarks
818
- * If a string preset is provided, it must be one of the following values:
819
- * - `"virtual"`: Uses the local file system for storage.
820
- * - `"fs"`: Uses an in-memory virtual file system for storage.
821
- *
822
- * If a custom {@link StoragePort} is provided, it will be used for all file storage operations during the build process.
823
- *
824
- * @defaultValue "virtual"
825
- */
826
- storage?: StoragePort | StoragePreset;
827
- }
828
- interface BaseConfig {
829
- /**
830
- * The entry point(s) for the application
831
- */
832
- entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
833
- /**
834
- * Configuration for the output of the build process
835
- */
836
- output?: OutputConfig;
837
- /**
838
- * Configuration for cleaning the build artifacts
839
- *
840
- * @remarks
841
- * If set to `false`, the cleaning process will be disabled.
842
- */
843
- clean?: Record<string, any> | false;
844
- /**
845
- * Configuration for linting the source code
846
- *
847
- * @remarks
848
- * If set to `false`, linting will be disabled.
849
- */
850
- lint?: Record<string, any> | false;
851
- /**
852
- * Configuration for testing the source code
853
- *
854
- * @remarks
855
- * If set to `false`, testing will be disabled.
856
- */
857
- test?: Record<string, any> | false;
858
- /**
859
- * Configuration for the transformation of the source code
860
- */
861
- transform?: Record<string, any>;
862
- /**
863
- * Configuration provided to build processes
864
- *
865
- * @remarks
866
- * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
867
- */
868
- build?: BuildConfig;
869
- /**
870
- * Configuration for documentation generation
871
- *
872
- * @remarks
873
- * This configuration will be used by the documentation generation plugins during the `docs` command.
874
- */
875
- docs?: Record<string, any>;
876
- /**
877
- * Configuration for deploying the source code
878
- *
879
- * @remarks
880
- * If set to `false`, the deployment will be disabled.
881
- */
882
- deploy?: DeployConfig | false;
883
- /**
884
- * The path to the tsconfig file to be used by the compiler
885
- *
886
- * @remarks
887
- * If a value is not provided, the plugin will attempt to find the `tsconfig.json` file in the project root directory. The parsed tsconfig compiler options will be merged with the {@link Options.tsconfigRaw} value (if provided).
888
- *
889
- * @defaultValue "\{projectRoot\}/tsconfig.json"
890
- */
891
- tsconfig?: string;
892
- /**
893
- * The raw {@link TSConfig} object to be used by the compiler. This object will be merged with the `tsconfig.json` file.
894
- *
895
- * @see https://www.typescriptlang.org/tsconfig
896
- *
897
- * @remarks
898
- * If populated, this option takes higher priority than `tsconfig`
899
- */
900
- tsconfigRaw?: TSConfig;
901
- }
902
- interface EnvironmentConfig extends BaseConfig {
903
- /**
904
- * Configuration options for the preview server
905
- */
906
- preview?: PreviewOptions;
907
- /**
908
- * A flag indicating whether the build is for a Server-Side Rendering environment.
909
- */
910
- ssr?: boolean;
911
- /**
912
- * Define if this environment is used for Server-Side Rendering
913
- *
914
- * @defaultValue "server" (if it isn't the client environment)
915
- */
916
- consumer?: "client" | "server";
917
- }
918
- interface CommonUserConfig extends BaseConfig {
919
- /**
920
- * The name of the project
921
- */
922
- name?: string;
923
- /**
924
- * The project display title
925
- *
926
- * @remarks
927
- * This option is used in documentation generation and other places where a human-readable title is needed.
928
- */
929
- title?: string;
930
- /**
931
- * A description of the project
932
- *
933
- * @remarks
934
- * If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
935
- */
936
- description?: string;
937
- /**
938
- * The log level to use for the Powerlines processes.
939
- *
940
- * @defaultValue "info"
941
- */
942
- logLevel?: LogLevelLabel | null;
943
- /**
944
- * A custom logger function to use for logging messages
945
- */
946
- customLogger?: LogFn;
947
- /**
948
- * Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
949
- *
950
- * @defaultValue "production"
951
- */
952
- mode?: "development" | "test" | "production";
953
- /**
954
- * The type of project being built
955
- *
956
- * @defaultValue "application"
957
- */
958
- type?: ProjectType;
959
- /**
960
- * The root directory of the project
961
- */
962
- root: string;
963
- /**
964
- * The root directory of the project's source code
965
- *
966
- * @defaultValue "\{root\}/src"
967
- */
968
- sourceRoot?: string;
969
- /**
970
- * A path to a custom configuration file to be used instead of the default `storm.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
971
- *
972
- * @remarks
973
- * This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
974
- */
975
- configFile?: string;
976
- /**
977
- * Should the Powerlines CLI processes skip installing missing packages?
978
- *
979
- * @remarks
980
- * This option is useful for CI/CD environments where the installation of packages is handled by a different process.
981
- *
982
- * @defaultValue false
983
- */
984
- skipInstalls?: boolean;
985
- /**
986
- * Should the compiler processes skip any improvements that make use of cache?
987
- *
988
- * @defaultValue false
989
- */
990
- skipCache?: boolean;
991
- /**
992
- * A list of resolvable paths to plugins used during the build process
993
- */
994
- plugins?: PluginConfig<any>[];
995
- /**
996
- * Environment-specific configurations
997
- */
998
- environments?: Record<string, EnvironmentConfig>;
999
- /**
1000
- * Should a single `build` process be ran for each environment?
1001
- *
1002
- * @remarks
1003
- * This option determines how environments are managed during the `build` process. The available options are:
1004
- *
1005
- * - `false`: A separate build is ran for each environment.
1006
- * - `true`: A single build is ran for all environments.
1007
- *
1008
- * @defaultValue false
1009
- */
1010
- singleBuild?: boolean;
1011
- /**
1012
- * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
1013
- *
1014
- * @remarks
1015
- * If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
1016
- *
1017
- * @defaultValue "powerlines"
1018
- */
1019
- framework?: string;
1020
- }
1021
- interface UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant$1 extends string = any> extends Omit<CommonUserConfig, "build"> {
1022
- /**
1023
- * Configuration provided to build processes
1024
- *
1025
- * @remarks
1026
- * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
1027
- */
1028
- build: Omit<TBuildConfig, "override"> & {
1029
- /**
1030
- * The build variant being used by the Powerlines engine.
1031
- */
1032
- variant?: TBuildVariant$1;
1033
- /**
1034
- * An optional set of override options to apply to the selected build variant.
1035
- *
1036
- * @remarks
1037
- * 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.
1038
- */
1039
- override?: Partial<TBuildResolvedConfig>;
1040
- };
1041
- }
1042
- type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
1043
- /**
1044
- * The configuration provided while executing Powerlines commands.
1045
- */
1046
- type InlineConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
1047
- /**
1048
- * A string identifier for the Powerlines command being executed
1049
- */
1050
- command: PowerlinesCommand;
1051
- };
1052
- //#endregion
1053
- //#region ../powerlines/src/types/resolved.d.ts
1054
- interface ResolvedEntryTypeDefinition extends TypeDefinition {
1055
- /**
1056
- * The user provided entry point in the source code
1057
- */
1058
- input?: TypeDefinition;
1059
- /**
1060
- * An optional name to use in the package export during the build process
1061
- */
1062
- output?: string;
1063
- }
1064
- type BabelResolvedConfig = Omit<BabelUserConfig, "plugins" | "presets"> & Required<Pick<BabelUserConfig, "plugins" | "presets">>;
1065
- type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "ssr">> & {
1066
- /**
1067
- * The name of the environment
1068
- */
1069
- name: string;
1070
- /**
1071
- * Configuration options for the preview server
1072
- */
1073
- preview?: ResolvedPreviewOptions;
1074
- };
1075
- type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
1076
- type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> & {
1077
- assets: ResolvedAssetGlob[];
1078
- }> & Pick<OutputConfig, "storage">;
1079
- /**
1080
- * The resolved options for the Powerlines project configuration.
1081
- */
1082
- type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework" | "sourceRoot"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework" | "sourceRoot">> & {
1083
- /**
1084
- * The configuration options that were provided inline to the Powerlines CLI.
1085
- */
1086
- inlineConfig: InlineConfig<TUserConfig>;
1087
- /**
1088
- * The original configuration options that were provided by the user to the Powerlines process.
1089
- */
1090
- userConfig: TUserConfig;
1091
- /**
1092
- * A string identifier for the Powerlines command being executed.
1093
- */
1094
- command: NonUndefined<InlineConfig<TUserConfig>["command"]>;
1095
- /**
1096
- * The root directory of the project's source code
1097
- *
1098
- * @defaultValue "\{projectRoot\}/src"
1099
- */
1100
- sourceRoot: NonUndefined<TUserConfig["sourceRoot"]>;
1101
- /**
1102
- * The root directory of the project.
1103
- */
1104
- projectRoot: NonUndefined<TUserConfig["root"]>;
1105
- /**
1106
- * The type of project being built.
1107
- */
1108
- projectType: NonUndefined<TUserConfig["type"]>;
1109
- /**
1110
- * The output configuration options to use for the build process
1111
- */
1112
- output: OutputResolvedConfig;
1113
- /**
1114
- * Configuration provided to build processes
1115
- *
1116
- * @remarks
1117
- * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
1118
- */
1119
- build: Omit<TUserConfig["build"], "override"> & Required<Pick<Required<TUserConfig["build"]>, "override">>;
1120
- /**
1121
- * The log level to use for the Powerlines processes.
1122
- *
1123
- * @defaultValue "info"
1124
- */
1125
- logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
1126
- };
1127
- //#endregion
1128
- //#region ../powerlines/src/types/context.d.ts
1129
- /**
1130
- * The severity level of a {@link LogRecord}.
1131
- */
1132
- type LogLevel = "debug" | "info" | "warning" | "error" | "fatal";
1133
- declare const LogLevel: {
1134
- DEBUG: LogLevel;
1135
- INFO: LogLevel;
1136
- WARNING: LogLevel;
1137
- ERROR: LogLevel;
1138
- FATAL: LogLevel;
1139
- };
1140
- interface MetaInfo {
1141
- /**
1142
- * The checksum generated from the resolved options
1143
- */
1144
- checksum: string;
1145
- /**
1146
- * The build id
1147
- */
1148
- buildId: string;
1149
- /**
1150
- * The release id
1151
- */
1152
- releaseId: string;
1153
- /**
1154
- * The build timestamp
1155
- */
1156
- timestamp: number;
1157
- /**
1158
- * A hash that represents the path to the project root directory
1159
- */
1160
- projectRootHash: string;
1161
- /**
1162
- * A hash that represents the path to the project root directory
1163
- */
1164
- configHash: string;
1165
- }
1166
- interface Resolver extends Jiti {
1167
- plugin: Jiti;
1168
- }
1169
- interface TransformResult$1 {
1170
- code: string;
1171
- map: SourceMap | null;
1172
- }
1173
- /**
1174
- * Options for initializing or updating the context with new configuration values
1175
- */
1176
- interface InitContextOptions {
1177
- /**
1178
- * If false, the plugin will be loaded after all other plugins.
1179
- *
1180
- * @defaultValue true
1181
- */
1182
- isHighPriority: boolean;
1183
- }
1184
- /**
1185
- * Options for fetch requests made via the context's {@link Context.fetch} method
1186
- */
1187
- interface FetchOptions extends FetchRequestOptions {
1188
- /**
1189
- * An indicator specifying that the request should bypass any caching
1190
- */
1191
- skipCache?: boolean;
1192
- }
1193
- /**
1194
- * Options for parsing code using [Oxc-Parser](https://github.com/oxc/oxc)
1195
- */
1196
- interface ParseOptions extends ParserOptions {
1197
- /**
1198
- * When true this allows return statements to be outside functions to e.g. support parsing CommonJS code.
1199
- */
1200
- allowReturnOutsideFunction?: boolean;
1201
- }
1202
- /**
1203
- * Options for emitting entry virtual files
1204
- */
1205
- type EmitEntryOptions = WriteOptions & Omit<ResolvedEntryTypeDefinition, "file">;
1206
- /**
1207
- * The unresolved Powerlines context.
1208
- *
1209
- * @remarks
1210
- * This context is used before the user configuration has been fully resolved after the `config`.
1211
- */
1212
- interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
1213
- /**
1214
- * The Storm workspace configuration
1215
- */
1216
- workspaceConfig: WorkspaceConfig;
1217
- /**
1218
- * An object containing the options provided to Powerlines
1219
- */
1220
- config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
1221
- projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
1222
- sourceRoot: NonUndefined<TResolvedConfig["userConfig"]["sourceRoot"]>;
1223
- output: TResolvedConfig["output"];
1224
- };
1225
- /**
1226
- * A logging function for the Powerlines engine
1227
- */
1228
- log: LogFn;
1229
- /**
1230
- * A logging function for fatal messages
1231
- */
1232
- fatal: (message: string | UnpluginMessage) => void;
1233
- /**
1234
- * A logging function for error messages
1235
- */
1236
- error: (message: string | UnpluginMessage) => void;
1237
- /**
1238
- * A logging function for warning messages
1239
- */
1240
- warn: (message: string | UnpluginMessage) => void;
1241
- /**
1242
- * A logging function for informational messages
1243
- */
1244
- info: (message: string | UnpluginMessage) => void;
1245
- /**
1246
- * A logging function for debug messages
1247
- */
1248
- debug: (message: string | UnpluginMessage) => void;
1249
- /**
1250
- * A logging function for trace messages
1251
- */
1252
- trace: (message: string | UnpluginMessage) => void;
1253
- /**
1254
- * The metadata information
1255
- */
1256
- meta: MetaInfo;
1257
- /**
1258
- * The metadata information currently written to disk
1259
- */
1260
- persistedMeta?: MetaInfo;
1261
- /**
1262
- * The Powerlines artifacts directory
1263
- */
1264
- artifactsPath: string;
1265
- /**
1266
- * The path to the Powerlines builtin runtime modules directory
1267
- */
1268
- builtinsPath: string;
1269
- /**
1270
- * The path to the Powerlines entry modules directory
1271
- */
1272
- entryPath: string;
1273
- /**
1274
- * The path to the Powerlines TypeScript declaration files directory
1275
- */
1276
- dtsPath: string;
1277
- /**
1278
- * The path to a directory where the reflection data buffers (used by the build processes) are stored
1279
- */
1280
- dataPath: string;
1281
- /**
1282
- * The path to a directory where the project cache (used by the build processes) is stored
1283
- */
1284
- cachePath: string;
1285
- /**
1286
- * The Powerlines environment paths
1287
- */
1288
- envPaths: EnvPaths;
1289
- /**
1290
- * The file system path to the Powerlines package installation
1291
- */
1292
- powerlinesPath: string;
1293
- /**
1294
- * The relative path to the Powerlines workspace root directory
1295
- */
1296
- relativeToWorkspaceRoot: string;
1297
- /**
1298
- * The project's `package.json` file content
1299
- */
1300
- packageJson: PackageJson & Record<string, any>;
1301
- /**
1302
- * The project's `project.json` file content
1303
- */
1304
- projectJson?: Record<string, any>;
1305
- /**
1306
- * The dependency installations required by the project
1307
- */
1308
- dependencies: Record<string, string | Range>;
1309
- /**
1310
- * The development dependency installations required by the project
1311
- */
1312
- devDependencies: Record<string, string | Range>;
1313
- /**
1314
- * The parsed TypeScript configuration from the `tsconfig.json` file
1315
- */
1316
- tsconfig: ParsedTypeScriptConfig;
1317
- /**
1318
- * The entry points of the source code
1319
- */
1320
- entry: ResolvedEntryTypeDefinition[];
1321
- /**
1322
- * The virtual file system manager used during the build process to reference generated runtime files
1323
- */
1324
- fs: VirtualFileSystemInterface;
1325
- /**
1326
- * The Jiti module resolver
1327
- */
1328
- resolver: Resolver;
1329
- /**
1330
- * The builtin module id that exist in the Powerlines virtual file system
1331
- */
1332
- builtins: string[];
1333
- /**
1334
- * The {@link Project} instance used for type reflection and module manipulation
1335
- *
1336
- * @see https://ts-morph.com/
1337
- *
1338
- * @remarks
1339
- * This instance is created lazily on first access.
1340
- */
1341
- program: Project;
1342
- /**
1343
- * A function to perform HTTP fetch requests
1344
- *
1345
- * @remarks
1346
- * This function uses a caching layer to avoid duplicate requests during the Powerlines process.
1347
- *
1348
- * @example
1349
- * ```ts
1350
- * const response = await context.fetch("https://api.example.com/data");
1351
- * const data = await response.json();
1352
- * ```
1353
- *
1354
- * @see https://github.com/nodejs/undici
1355
- *
1356
- * @param input - The URL to fetch.
1357
- * @param options - The fetch request options.
1358
- * @returns A promise that resolves to a response returned by the fetch.
1359
- */
1360
- fetch: (input: RequestInfo, options?: FetchOptions) => Promise<Response>;
1361
- /**
1362
- * Parse code using [Oxc-Parser](https://github.com/oxc/oxc) into an (ESTree-compatible)[https://github.com/estree/estree] AST object.
1363
- *
1364
- * @remarks
1365
- * This function can be used to parse TypeScript code into an AST for further analysis or transformation.
1366
- *
1367
- * @example
1368
- * ```ts
1369
- * const ast = context.parse("const x: number = 42;");
1370
- * ```
1371
- *
1372
- * @see https://rollupjs.org/plugin-development/#this-parse
1373
- * @see https://github.com/oxc/oxc
1374
- *
1375
- * @param code - The source code to parse.
1376
- * @param options - The options to pass to the parser.
1377
- * @returns An (ESTree-compatible)[https://github.com/estree/estree] AST object.
1378
- */
1379
- parse: (code: string, options?: ParseOptions) => Promise<ParseResult>;
1380
- /**
1381
- * A helper function to resolve modules using the Jiti resolver
1382
- *
1383
- * @remarks
1384
- * This function can be used to resolve modules relative to the project root directory.
1385
- *
1386
- * @example
1387
- * ```ts
1388
- * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
1389
- * ```
1390
- *
1391
- * @param id - The module to resolve.
1392
- * @param importer - An optional path to the importer module.
1393
- * @param options - Additional resolution options.
1394
- * @returns A promise that resolves to the resolved module path.
1395
- */
1396
- resolve: (id: string, importer?: string, options?: ResolveOptions$1) => Promise<ExternalIdResult | undefined>;
1397
- /**
1398
- * A helper function to load modules using the Jiti resolver
1399
- *
1400
- * @remarks
1401
- * This function can be used to load modules relative to the project root directory.
1402
- *
1403
- * @example
1404
- * ```ts
1405
- * const module = await context.load("some-module", "/path/to/importer");
1406
- * ```
1407
- *
1408
- * @param id - The module to load.
1409
- * @returns A promise that resolves to the loaded module.
1410
- */
1411
- load: (id: string) => Promise<TransformResult$1 | undefined>;
1412
- /**
1413
- * The Powerlines builtin virtual files
1414
- */
1415
- getBuiltins: () => Promise<VirtualFile[]>;
1416
- /**
1417
- * Resolves a builtin virtual file and writes it to the VFS if it does not already exist
1418
- *
1419
- * @param code - The source code of the builtin file
1420
- * @param id - The unique identifier of the builtin file
1421
- * @param path - An optional path to write the builtin file to
1422
- * @param options - Additional options for writing the builtin file
1423
- */
1424
- emitBuiltin: (code: string, id: string, path?: string, options?: WriteOptions) => Promise<void>;
1425
- /**
1426
- * Resolves a entry virtual file and writes it to the VFS if it does not already exist
1427
- *
1428
- * @param code - The source code of the entry file
1429
- * @param path - An optional path to write the entry file to
1430
- * @param options - Additional options for writing the entry file
1431
- */
1432
- emitEntry: (code: string, path: string, options?: EmitEntryOptions) => Promise<void>;
1433
- /**
1434
- * A function to update the context fields using a new user configuration options
1435
- */
1436
- withUserConfig: (userConfig: UserConfig, options?: InitContextOptions) => Promise<void>;
1437
- /**
1438
- * A function to update the context fields using inline configuration options
1439
- */
1440
- withInlineConfig: (inlineConfig: InlineConfig, options?: InitContextOptions) => Promise<void>;
1441
- /**
1442
- * Create a new logger instance
1443
- *
1444
- * @param name - The name to use for the logger instance
1445
- * @returns A logger function
1446
- */
1447
- createLog: (name: string | null) => LogFn;
1448
- /**
1449
- * Extend the current logger instance with a new name
1450
- *
1451
- * @param name - The name to use for the extended logger instance
1452
- * @returns A logger function
1453
- */
1454
- extendLog: (name: string) => LogFn;
1455
- /**
1456
- * Generates a checksum representing the current context state
1457
- *
1458
- * @returns A promise that resolves to a string representing the checksum
1459
- */
1460
- generateChecksum: () => Promise<string>;
1461
- }
1462
- type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
1463
- /**
1464
- * The fully resolved Powerlines configuration
1465
- */
1466
- config: TResolvedConfig;
1467
- };
1468
- interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
1469
- /**
1470
- * The environment specific resolved configuration
1471
- */
1472
- environment: EnvironmentResolvedConfig;
1473
- /**
1474
- * An alternative property name for the {@link log} property
1475
- *
1476
- * @remarks
1477
- * This is provided for compatibility with other logging libraries that expect a `logger` property.
1478
- */
1479
- logger: LogFn;
1480
- }
1481
- type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
1482
- //#endregion
1483
- //#region ../powerlines/src/types/commands.d.ts
1484
- declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
1485
- type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
1486
- //#endregion
1487
- //#region ../powerlines/src/types/plugin.d.ts
1488
- interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter = never> {
1489
- /**
1490
- * The order in which the plugin should be applied.
1491
- */
1492
- order?: "pre" | "post" | null | undefined;
1493
- /**
1494
- * A filter to determine when the hook should be called.
1495
- */
1496
- filter?: Pick<HookFilter, TFilter>;
1497
- /**
1498
- * The hook function to be called.
1499
- */
1500
- handler: THookFunction;
1501
- }
1502
- type PluginHook<THookFunction extends FunctionLike, TFilter extends keyof HookFilter = never> = THookFunction | PluginHookObject<THookFunction, TFilter>;
1503
- /**
1504
- * A result returned by the plugin from the `types` hook that describes the declaration types output file.
1505
- */
1506
- interface TypesResult {
1507
- directives?: string[];
1508
- code: string;
1509
- }
1510
- type DeepPartial<T> = { [K in keyof T]?: DeepPartial<T[K]> };
1511
- type ConfigResult<TContext extends PluginContext = PluginContext> = DeepPartial<TContext["config"]> & Record<string, any>;
1512
- interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext> extends Record<CommandType, (this: TContext) => MaybePromise<void>> {
1513
- /**
1514
- * A function that returns configuration options to be merged with the build context's options.
1515
- *
1516
- * @remarks
1517
- * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.
1518
- *
1519
- * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect.
1520
- *
1521
- * @see https://vitejs.dev/guide/api-plugin#config
1522
- *
1523
- * @param this - The build context.
1524
- * @param config - The partial configuration object to be modified.
1525
- * @returns A promise that resolves to a partial configuration object.
1526
- */
1527
- config: (this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>;
1528
- /**
1529
- * Modify environment configs before it's resolved. The hook can either mutate the passed-in environment config directly, or return a partial config object that will be deeply merged into existing config.
1530
- *
1531
- * @remarks
1532
- * This hook is called for each environment with a partially resolved environment config that already accounts for the default environment config values set at the root level. If plugins need to modify the config of a given environment, they should do it in this hook instead of the config hook. Leaving the config hook only for modifying the root default environment config.
1533
- *
1534
- * @see https://vitejs.dev/guide/api-plugin#configenvironment
1535
- *
1536
- * @param this - The build context.
1537
- * @param name - The name of the environment being configured.
1538
- * @param environment - The Vite-like environment object containing information about the current build environment.
1539
- * @returns A promise that resolves when the hook is complete.
1540
- */
1541
- configEnvironment: (this: TContext, name: string, environment: EnvironmentConfig) => MaybePromise<Partial<EnvironmentResolvedConfig> | undefined | null>;
1542
- /**
1543
- * A hook that is called when the plugin is resolved.
1544
- *
1545
- * @see https://vitejs.dev/guide/api-plugin#configresolved
1546
- *
1547
- * @param this - The build context.
1548
- * @returns A promise that resolves when the hook is complete.
1549
- */
1550
- configResolved: (this: TContext) => MaybePromise<void>;
1551
- /**
1552
- * A hook that is called to overwrite the generated declaration types file (.d.ts). The generated type definitions should describe the built-in modules/logic added during the `prepare` task.
1553
- *
1554
- * @param this - The build context.
1555
- * @param code - The source code to generate types for.
1556
- * @returns A promise that resolves when the hook is complete.
1557
- */
1558
- types: (this: TContext, code: string) => MaybePromise<TypesResult | string | undefined | null>;
1559
- /**
1560
- * A hook that is called at the start of the build process.
1561
- *
1562
- * @param this - The build context and unplugin build context.
1563
- * @returns A promise that resolves when the hook is complete.
1564
- */
1565
- buildStart: (this: BuildPluginContext<TContext["config"]> & TContext) => MaybePromise<void>;
1566
- /**
1567
- * A hook that is called at the end of the build process.
1568
- *
1569
- * @param this - The build context and unplugin build context.
1570
- * @returns A promise that resolves when the hook is complete.
1571
- */
1572
- buildEnd: (this: BuildPluginContext<TContext["config"]> & TContext) => MaybePromise<void>;
1573
- /**
1574
- * A hook that is called to transform the source code.
1575
- *
1576
- * @param this - The build context, unplugin build context, and unplugin context.
1577
- * @param code - The source code to transform.
1578
- * @param id - The identifier of the source code.
1579
- * @returns A promise that resolves when the hook is complete.
1580
- */
1581
- transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>;
1582
- /**
1583
- * A hook that is called to load the source code.
1584
- *
1585
- * @param this - The build context, unplugin build context, and unplugin context.
1586
- * @param id - The identifier of the source code.
1587
- * @returns A promise that resolves when the hook is complete.
1588
- */
1589
- load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>;
1590
- /**
1591
- * A hook that is called to resolve the identifier of the source code.
1592
- *
1593
- * @param this - The build context, unplugin build context, and unplugin context.
1594
- * @param id - The identifier of the source code.
1595
- * @param importer - The importer of the source code.
1596
- * @param options - The options for resolving the identifier.
1597
- * @returns A promise that resolves when the hook is complete.
1598
- */
1599
- resolveId: (this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
1600
- isEntry: boolean;
1601
- }) => MaybePromise<string | ExternalIdResult | null | undefined>;
1602
- /**
1603
- * A hook that is called to write the bundle to disk.
1604
- *
1605
- * @param this - The build context.
1606
- * @returns A promise that resolves when the hook is complete.
1607
- */
1608
- writeBundle: (this: TContext) => MaybePromise<void>;
1609
- }
1610
- type BuildPlugin<TContext extends PluginContext = PluginContext, TBuildVariant$1 extends UnpluginBuildVariant = UnpluginBuildVariant, TOptions extends Required<UnpluginOptions>[TBuildVariant$1] = Required<UnpluginOptions>[TBuildVariant$1]> = { [TKey in keyof TOptions]: TOptions[TKey] extends FunctionLike ? (this: ThisParameterType<TOptions[TKey]> & TContext, ...args: Parameters<TOptions[TKey]>) => ReturnType<TOptions[TKey]> | MaybePromise<ReturnType<TOptions[TKey]>> : TOptions[TKey] };
1611
- type PluginHooks<TContext extends PluginContext = PluginContext> = { [TKey in keyof BasePluginHookFunctions<TContext>]: PluginHook<BasePluginHookFunctions<TContext>[TKey]> } & {
1612
- /**
1613
- * A function that returns configuration options to be merged with the build context's options.
1614
- *
1615
- * @remarks
1616
- * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.
1617
- *
1618
- * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect. If you want to add plugins, consider doing so in the {@link Plugin.dependsOn} property instead.
1619
- *
1620
- * @see https://vitejs.dev/guide/api-plugin#config
1621
- *
1622
- * @param this - The build context.
1623
- * @param config - The partial configuration object to be modified.
1624
- * @returns A promise that resolves to a partial configuration object.
1625
- */
1626
- config: PluginHook<(this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>> | ConfigResult<TContext>;
1627
- /**
1628
- * A hook that is called to transform the source code.
1629
- *
1630
- * @param this - The build context, unplugin build context, and unplugin context.
1631
- * @param code - The source code to transform.
1632
- * @param id - The identifier of the source code.
1633
- * @returns A promise that resolves when the hook is complete.
1634
- */
1635
- transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>, "code" | "id">;
1636
- /**
1637
- * A hook that is called to load the source code.
1638
- *
1639
- * @param this - The build context, unplugin build context, and unplugin context.
1640
- * @param id - The identifier of the source code.
1641
- * @returns A promise that resolves when the hook is complete.
1642
- */
1643
- load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>, "id">;
1644
- /**
1645
- * A hook that is called to resolve the identifier of the source code.
1646
- *
1647
- * @param this - The build context, unplugin build context, and unplugin context.
1648
- * @param id - The identifier of the source code.
1649
- * @param importer - The importer of the source code.
1650
- * @param options - The options for resolving the identifier.
1651
- * @returns A promise that resolves when the hook is complete.
1652
- */
1653
- resolveId: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
1654
- isEntry: boolean;
1655
- }) => MaybePromise<string | ExternalIdResult | null | undefined>, "id">;
1656
- };
1657
- type PluginBuildPlugins<TContext extends PluginContext = PluginContext> = { [TBuildVariant in UnpluginBuildVariant]?: BuildPlugin<TContext, TBuildVariant> };
1658
- interface Plugin<TContext extends PluginContext<ResolvedConfig> = PluginContext<ResolvedConfig>> extends Partial<PluginHooks<TContext>>, PluginBuildPlugins<TContext> {
1659
- /**
1660
- * The name of the plugin, for use in deduplication, error messages and logs.
1661
- */
1662
- name: string;
1663
- /**
1664
- * An API object that can be used for inter-plugin communication.
1665
- *
1666
- * @see https://rollupjs.org/plugin-development/#direct-plugin-communication
1667
- */
1668
- api?: Record<string, any>;
1669
- /**
1670
- * Enforce plugin invocation tier similar to webpack loaders. Hooks ordering is still subject to the `order` property in the hook object.
1671
- *
1672
- * @remarks
1673
- * The Plugin invocation order is as follows:
1674
- * - `enforce: 'pre'` plugins
1675
- * - `order: 'pre'` plugin hooks
1676
- * - any other plugins (normal)
1677
- * - `order: 'post'` plugin hooks
1678
- * - `enforce: 'post'` plugins
1679
- *
1680
- * @see https://vitejs.dev/guide/api-plugin.html#plugin-ordering
1681
- * @see https://rollupjs.org/plugin-development/#build-hooks
1682
- * @see https://webpack.js.org/concepts/loaders/#enforce---pre-and-post
1683
- * @see https://esbuild.github.io/plugins/#concepts
1684
- */
1685
- enforce?: "pre" | "post";
1686
- /**
1687
- * A function to determine if two plugins are the same and can be de-duplicated.
1688
- *
1689
- * @remarks
1690
- * If this is not provided, plugins are de-duplicated by comparing their names.
1691
- *
1692
- * @param other - The other plugin to compare against.
1693
- * @returns `true` if the two plugins are the same, `false` otherwise.
1694
- */
1695
- dedupe?: false | ((other: Plugin<any>) => boolean);
1696
- /**
1697
- * A list of pre-requisite plugins that must be loaded before this plugin can be used.
1698
- */
1699
- /**
1700
- * Define environments where this plugin should be active. By default, the plugin is active in all environments.
1701
- *
1702
- * @param environment - The environment to check.
1703
- * @returns `true` if the plugin should be active in the specified environment, `false` otherwise.
1704
- */
1705
- applyToEnvironment?: (environment: EnvironmentResolvedConfig) => boolean | PluginConfig<TContext>;
1706
- }
1707
- //#endregion
1708
- //#region ../plugin-env/src/types/runtime.d.ts
1709
- /**
1710
- * The base environment configuration used by Powerlines applications
1711
- *
1712
- * @remarks
1713
- * This interface is used to define the environment variables, configuration options, and runtime settings used by applications. It is used to provide type safety, autocompletion, and default values for the environment variables. The comments of each variable are used to provide documentation descriptions when running the \`powerlines docs\` command.
1714
- *
1715
- * @categoryDescription Platform
1716
- * The name of the platform the configuration parameter is intended for use in.
1717
- *
1718
- * @showCategories
1719
- */
1720
- interface EnvInterface {
1721
- /**
1722
- * The name of the application.
1723
- *
1724
- * @readonly
1725
- * @category neutral
1726
- */
1727
- readonly APP_NAME: string;
1728
- /**
1729
- * The version of the application.
1730
- *
1731
- * @defaultValue "1.0.0"
1732
- *
1733
- * @readonly
1734
- * @category neutral
1735
- */
1736
- readonly APP_VERSION: string;
1737
- /**
1738
- * The unique identifier for the build.
1739
- *
1740
- * @readonly
1741
- * @category neutral
1742
- */
1743
- readonly BUILD_ID: string;
1744
- /**
1745
- * The timestamp the build was ran at.
1746
- *
1747
- * @readonly
1748
- * @category neutral
1749
- */
1750
- readonly BUILD_TIMESTAMP: string;
1751
- /**
1752
- * A checksum hash created during the build.
1753
- *
1754
- * @readonly
1755
- * @category neutral
1756
- */
1757
- readonly BUILD_CHECKSUM: string;
1758
- /**
1759
- * The unique identifier for the release.
1760
- *
1761
- * @readonly
1762
- * @category neutral
1763
- */
1764
- readonly RELEASE_ID: string;
1765
- /**
1766
- * The tag for the release. This is generally in the format of "\<APP_NAME\>\@\<APP_VERSION\>".
1767
- *
1768
- * @readonly
1769
- * @category neutral
1770
- */
1771
- readonly RELEASE_TAG: string;
1772
- /**
1773
- * The name of the organization that maintains the application.
1774
- *
1775
- * @remarks
1776
- * This variable is used to specify the name of the organization that maintains the application. If not provided in an environment, it will try to use the value in {@link @storm-software/config-tools/StormWorkspaceConfig#organization}.
1777
- *
1778
- * @alias ORG
1779
- * @alias ORG_ID
1780
- * @category neutral
1781
- */
1782
- ORGANIZATION: string;
1783
- /**
1784
- * The platform for which the application was built.
1785
- *
1786
- * @defaultValue "neutral"
1787
- *
1788
- * @category neutral
1789
- */
1790
- PLATFORM: "node" | "neutral" | "browser";
1791
- /**
1792
- * The mode in which the application is running.
1793
- *
1794
- * @defaultValue "production"
1795
- *
1796
- * @alias NODE_ENV
1797
- *
1798
- * @category neutral
1799
- */
1800
- MODE: "development" | "test" | "production";
1801
- /**
1802
- * The environment the application is running in. This value will be populated with the value of `MODE` if not provided.
1803
- *
1804
- * @defaultValue "production"
1805
- *
1806
- * @alias ENV
1807
- * @alias VERCEL_ENV
1808
- * @category neutral
1809
- */
1810
- ENVIRONMENT: string;
1811
- /**
1812
- * Indicates if the application is running in debug mode.
1813
- *
1814
- * @category neutral
1815
- */
1816
- DEBUG: boolean;
1817
- /**
1818
- * An indicator that specifies the current runtime is a test environment.
1819
- *
1820
- * @category neutral
1821
- */
1822
- TEST: boolean;
1823
- /**
1824
- * An indicator that specifies the current runtime is a minimal environment.
1825
- *
1826
- * @category node
1827
- */
1828
- MINIMAL: boolean;
1829
- /**
1830
- * An indicator that specifies the current runtime is a no color environment.
1831
- *
1832
- * @category node
1833
- */
1834
- NO_COLOR: boolean;
1835
- /**
1836
- * An indicator that specifies the current runtime is a force color environment.
1837
- *
1838
- * @category node
1839
- */
1840
- FORCE_COLOR: boolean | number;
1841
- /**
1842
- * An indicator that specifies the current runtime should force hyperlinks in terminal output.
1843
- *
1844
- * @remarks
1845
- * This variable is used to force hyperlinks in terminal output, even if the terminal does not support them. This is useful for debugging and development purposes.
1846
- * @category node
1847
- */
1848
- FORCE_HYPERLINK: boolean | number;
1849
- /**
1850
- * The name of the agent running the application. This variable is set by certain CI/CD systems.
1851
- *
1852
- * @readonly
1853
- * @category neutral
1854
- */
1855
- readonly AGENT_NAME?: string;
1856
- /**
1857
- * The color terminal type. This variable is set by certain terminal emulators.
1858
- *
1859
- * @readonly
1860
- * @category node
1861
- */
1862
- readonly COLORTERM?: string;
1863
- /**
1864
- * The terminal type. This variable is set by certain CI/CD systems.
1865
- *
1866
- * @remarks
1867
- * This variable is used to specify the terminal type that the application is running in. It can be used to determine how to format output for the terminal.
1868
- *
1869
- * @readonly
1870
- * @category node
1871
- */
1872
- readonly TERM?: string;
1873
- /**
1874
- * The terminal program name. This variable is set by certain terminal emulators.
1875
- *
1876
- * @readonly
1877
- * @category node
1878
- */
1879
- readonly TERM_PROGRAM?: string;
1880
- /**
1881
- * The terminal program version. This variable is set by certain terminal emulators.
1882
- *
1883
- * @readonly
1884
- * @category node
1885
- */
1886
- readonly TERM_PROGRAM_VERSION?: string;
1887
- /**
1888
- * The terminal emulator name. This variable is set by certain terminal emulators.
1889
- *
1890
- * @readonly
1891
- * @category node
1892
- */
1893
- readonly TERMINAL_EMULATOR?: string;
1894
- /**
1895
- * The terminal emulator session ID. This variable is set by certain terminal emulators.
1896
- *
1897
- * @readonly
1898
- * @category node
1899
- */
1900
- readonly WT_SESSION?: string;
1901
- /**
1902
- * An indicator that specifies the current terminal is running Terminus Sublime. This variable is set by certain terminal emulators.
1903
- *
1904
- * @readonly
1905
- * @category node
1906
- */
1907
- readonly TERMINUS_SUBLIME?: boolean;
1908
- /**
1909
- * The ConEmu task name. This variable is set by certain terminal emulators.
1910
- *
1911
- * @readonly
1912
- * @category node
1913
- */
1914
- readonly ConEmuTask?: string;
1915
- /**
1916
- * The cursor trace ID. This variable is set by certain terminal emulators.
1917
- *
1918
- * @readonly
1919
- * @category node
1920
- */
1921
- readonly CURSOR_TRACE_ID?: string;
1922
- /**
1923
- * The VTE version. This variable is set by certain terminal emulators.
1924
- *
1925
- * @readonly
1926
- * @category node
1927
- */
1928
- readonly VTE_VERSION?: string;
1929
- /**
1930
- * Indicates if error stack traces should be captured.
1931
- *
1932
- * @category neutral
1933
- */
1934
- STACKTRACE: boolean;
1935
- /**
1936
- * Indicates if error data should be included.
1937
- *
1938
- * @category neutral
1939
- */
1940
- INCLUDE_ERROR_DATA: boolean;
1941
- /**
1942
- * A web page to lookup error messages and display additional information given an error code.
1943
- *
1944
- * @remarks
1945
- * This variable is used to provide a URL to a page that can be used to look up error messages given an error code. This is used to provide a more user-friendly error message to the user.
1946
- *
1947
- * @title Error Details URL
1948
- * @category neutral
1949
- */
1950
- ERROR_URL: string;
1951
- /**
1952
- * The default timezone for the application.
1953
- *
1954
- * @defaultValue "America/New_York"
1955
- * @category neutral
1956
- */
1957
- DEFAULT_TIMEZONE: string;
1958
- /**
1959
- * The default locale to be used in the application.
1960
- *
1961
- * @defaultValue "en_US"
1962
- * @category neutral
1963
- */
1964
- DEFAULT_LOCALE: string;
1965
- /**
1966
- * The default lowest log level to accept. If `null`, the logger will reject all records. This value only applies if `lowestLogLevel` is not provided to the `logs` configuration.
1967
- *
1968
- * @defaultValue "info"
1969
- *
1970
- * @category neutral
1971
- */
1972
- LOG_LEVEL?: LogLevel | null;
1973
- /**
1974
- * An indicator that specifies the current runtime is a continuous integration environment.
1975
- *
1976
- * @title Continuous Integration
1977
- * @alias CONTINUOUS_INTEGRATION
1978
- * @category neutral
1979
- */
1980
- CI: boolean;
1981
- /**
1982
- * The unique identifier for the current run. This value is set by certain CI/CD systems.
1983
- *
1984
- * @readonly
1985
- * @category node
1986
- */
1987
- readonly RUN_ID?: string;
1988
- /**
1989
- * The agola git reference. This value is set by certain CI/CD systems.
1990
- *
1991
- * @readonly
1992
- * @category node
1993
- */
1994
- readonly AGOLA_GIT_REF?: string;
1995
- /**
1996
- * The appcircle build ID. This value is set by certain CI/CD systems.
1997
- *
1998
- * @readonly
1999
- * @category node
2000
- */
2001
- readonly AC_APPCIRCLE?: string;
2002
- /**
2003
- * The appveyor build ID. This value is set by certain CI/CD systems.
2004
- *
2005
- * @readonly
2006
- * @category node
2007
- */
2008
- readonly APPVEYOR?: string;
2009
- /**
2010
- * The codebuild build ID. This value is set by certain CI/CD systems.
2011
- *
2012
- * @readonly
2013
- * @category node
2014
- */
2015
- readonly CODEBUILD?: string;
2016
- /**
2017
- * The task force build ID. This value is set by certain CI/CD systems.
2018
- *
2019
- * @readonly
2020
- * @category node
2021
- */
2022
- readonly TF_BUILD?: string;
2023
- /**
2024
- * The bamboo plan key. This value is set by certain CI/CD systems.
2025
- *
2026
- * @readonly
2027
- * @category node
2028
- */
2029
- readonly bamboo_planKey?: string;
2030
- /**
2031
- * The bitbucket commit. This value is set by certain CI/CD systems.
2032
- *
2033
- * @readonly
2034
- * @category node
2035
- */
2036
- readonly BITBUCKET_COMMIT?: string;
2037
- /**
2038
- * The bitrise build ID. This value is set by certain CI/CD systems.
2039
- *
2040
- * @readonly
2041
- * @category node
2042
- */
2043
- readonly BITRISE_IO?: string;
2044
- /**
2045
- * The buddy workspace ID. This value is set by certain CI/CD systems.
2046
- *
2047
- * @readonly
2048
- * @category node
2049
- */
2050
- readonly BUDDY_WORKSPACE_ID?: string;
2051
- /**
2052
- * The buildkite build ID. This value is set by certain CI/CD systems.
2053
- *
2054
- * @readonly
2055
- * @category node
2056
- */
2057
- readonly BUILDKITE?: string;
2058
- /**
2059
- * The circleci build ID. This value is set by certain CI/CD systems.
2060
- *
2061
- * @readonly
2062
- * @category node
2063
- */
2064
- readonly CIRCLECI?: string;
2065
- /**
2066
- * The cirrus-ci build ID. This value is set by certain CI/CD systems.
2067
- *
2068
- * @readonly
2069
- * @category node
2070
- */
2071
- readonly CIRRUS_CI?: string;
2072
- /**
2073
- * The cf build ID. This value is set by certain CI/CD systems.
2074
- *
2075
- * @readonly
2076
- * @category node
2077
- */
2078
- readonly CF_BUILD_ID?: string;
2079
- /**
2080
- * The cm build ID. This value is set by certain CI/CD systems.
2081
- *
2082
- * @readonly
2083
- * @category node
2084
- */
2085
- readonly CM_BUILD_ID?: string;
2086
- /**
2087
- * The ci name. This value is set by certain CI/CD systems.
2088
- *
2089
- * @readonly
2090
- * @category node
2091
- */
2092
- readonly CI_NAME?: string;
2093
- /**
2094
- * The drone build ID. This value is set by certain CI/CD systems.
2095
- *
2096
- * @readonly
2097
- * @category node
2098
- */
2099
- readonly DRONE?: string;
2100
- /**
2101
- * The dsari build ID. This value is set by certain CI/CD systems.
2102
- *
2103
- * @readonly
2104
- * @category node
2105
- */
2106
- readonly DSARI?: string;
2107
- /**
2108
- * The earthly build ID. This value is set by certain CI/CD systems.
2109
- *
2110
- * @readonly
2111
- * @category node
2112
- */
2113
- readonly EARTHLY_CI?: string;
2114
- /**
2115
- * The eas build ID. This value is set by certain CI/CD systems.
2116
- *
2117
- * @readonly
2118
- * @category node
2119
- */
2120
- readonly EAS_BUILD?: string;
2121
- /**
2122
- * The gerrit project. This value is set by certain CI/CD systems.
2123
- *
2124
- * @readonly
2125
- * @category node
2126
- */
2127
- readonly GERRIT_PROJECT?: string;
2128
- /**
2129
- * The gitea actions build ID. This value is set by certain CI/CD systems.
2130
- *
2131
- * @readonly
2132
- * @category node
2133
- */
2134
- readonly GITEA_ACTIONS?: string;
2135
- /**
2136
- * The github actions build ID. This value is set by certain CI/CD systems.
2137
- *
2138
- * @readonly
2139
- * @category node
2140
- */
2141
- readonly GITHUB_ACTIONS?: string;
2142
- /**
2143
- * The gitlab ci build ID. This value is set by certain CI/CD systems.
2144
- *
2145
- * @readonly
2146
- * @category node
2147
- */
2148
- readonly GITLAB_CI?: string;
2149
- /**
2150
- * The go cd build ID. This value is set by certain CI/CD systems.
2151
- *
2152
- * @readonly
2153
- * @category node
2154
- */
2155
- readonly GOCD?: string;
2156
- /**
2157
- * The builder output build ID. This value is set by certain CI/CD systems.
2158
- *
2159
- * @readonly
2160
- * @category node
2161
- */
2162
- readonly BUILDER_OUTPUT?: string;
2163
- /**
2164
- * The harness build ID. This value is set by certain CI/CD systems.
2165
- *
2166
- * @readonly
2167
- * @category node
2168
- */
2169
- readonly HARNESS_BUILD_ID?: string;
2170
- /**
2171
- * The jenkins url. This value is set by certain CI/CD systems.
2172
- *
2173
- * @readonly
2174
- * @category node
2175
- */
2176
- readonly JENKINS_URL?: string;
2177
- /**
2178
- * The layerci build ID. This value is set by certain CI/CD systems.
2179
- *
2180
- * @readonly
2181
- * @category node
2182
- */
2183
- readonly LAYERCI?: string;
2184
- /**
2185
- * The magnum build ID. This value is set by certain CI/CD systems.
2186
- *
2187
- * @readonly
2188
- * @category node
2189
- */
2190
- readonly MAGNUM?: string;
2191
- /**
2192
- * The netlify build ID. This value is set by certain CI/CD systems.
2193
- *
2194
- * @readonly
2195
- * @category node
2196
- */
2197
- readonly NETLIFY?: string;
2198
- /**
2199
- * The nevercode build ID. This value is set by certain CI/CD systems.
2200
- *
2201
- * @readonly
2202
- * @category node
2203
- */
2204
- readonly NEVERCODE?: string;
2205
- /**
2206
- * The prow job ID. This value is set by certain CI/CD systems.
2207
- *
2208
- * @readonly
2209
- * @category node
2210
- */
2211
- readonly PROW_JOB_ID?: string;
2212
- /**
2213
- * The release build ID. This value is set by certain CI/CD systems.
2214
- *
2215
- * @readonly
2216
- * @category node
2217
- */
2218
- readonly RELEASE_BUILD_ID?: string;
2219
- /**
2220
- * The render build ID. This value is set by certain CI/CD systems.
2221
- *
2222
- * @readonly
2223
- * @category node
2224
- */
2225
- readonly RENDER?: string;
2226
- /**
2227
- * The sailci build ID. This value is set by certain CI/CD systems.
2228
- *
2229
- * @readonly
2230
- * @category node
2231
- */
2232
- readonly SAILCI?: string;
2233
- /**
2234
- * The hudson build ID. This value is set by certain CI/CD systems.
2235
- *
2236
- * @readonly
2237
- * @category node
2238
- */
2239
- readonly HUDSON?: string;
2240
- /**
2241
- * The screwdriver build ID. This value is set by certain CI/CD systems.
2242
- *
2243
- * @readonly
2244
- * @category node
2245
- */
2246
- readonly SCREWDRIVER?: string;
2247
- /**
2248
- * The semaphore build ID. This value is set by certain CI/CD systems.
2249
- *
2250
- * @readonly
2251
- * @category node
2252
- */
2253
- readonly SEMAPHORE?: string;
2254
- /**
2255
- * The sourcehut build ID. This value is set by certain CI/CD systems.
2256
- *
2257
- * @readonly
2258
- * @category node
2259
- */
2260
- readonly SOURCEHUT?: string;
2261
- /**
2262
- * The spaceship build ID. This value is set by certain CI/CD systems.
2263
- *
2264
- * @readonly
2265
- * @category node
2266
- */
2267
- readonly SPACESHIP_CI?: string;
2268
- /**
2269
- * The strider build ID. This value is set by certain CI/CD systems.
2270
- *
2271
- * @readonly
2272
- * @category node
2273
- */
2274
- readonly STRIDER?: string;
2275
- /**
2276
- * The task ID. This value is set by certain CI/CD systems.
2277
- *
2278
- * @readonly
2279
- * @category node
2280
- */
2281
- readonly TASK_ID?: string;
2282
- /**
2283
- * The teamcity version. This value is set by certain CI/CD systems.
2284
- *
2285
- * @readonly
2286
- * @category node
2287
- */
2288
- readonly TEAMCITY_VERSION?: string;
2289
- /**
2290
- * The travis build ID. This value is set by certain CI/CD systems.
2291
- *
2292
- * @readonly
2293
- * @category node
2294
- */
2295
- readonly TRAVIS?: string;
2296
- /**
2297
- * The vela build ID. This value is set by certain CI/CD systems.
2298
- *
2299
- * @readonly
2300
- * @category node
2301
- */
2302
- readonly VELA?: string;
2303
- /**
2304
- * The now builder build ID. This value is set by certain CI/CD systems.
2305
- *
2306
- * @readonly
2307
- * @category node
2308
- */
2309
- readonly NOW_BUILDER?: string;
2310
- /**
2311
- * The appcenter build ID. This value is set by certain CI/CD systems.
2312
- *
2313
- * @readonly
2314
- * @category node
2315
- */
2316
- readonly APPCENTER_BUILD_ID?: string;
2317
- /**
2318
- * The xcode project build ID. This value is set by certain CI/CD systems.
2319
- *
2320
- * @readonly
2321
- * @category node
2322
- */
2323
- readonly CI_XCODE_PROJECT?: string;
2324
- /**
2325
- * The xcode server build ID. This value is set by certain CI/CD systems.
2326
- *
2327
- * @readonly
2328
- * @category node
2329
- */
2330
- readonly XCS?: string;
2331
- /**
2332
- * The application's runtime data directory.
2333
- *
2334
- * @remarks
2335
- * This variable is used to override the base path of the system's local application data directory. This variable is used to set the \`$storm.paths.data\` property.
2336
- *
2337
- * @title Data Directory
2338
- * @category node
2339
- */
2340
- DATA_DIR?: string;
2341
- /**
2342
- * The application's configuration data directory.
2343
- *
2344
- * @remarks
2345
- * This variable is used to override the base path of the system's local application configuration directory. This variable is used to set the \`$storm.paths.config\` property.
2346
- *
2347
- * @title Configuration Directory
2348
- * @category node
2349
- */
2350
- CONFIG_DIR?: string;
2351
- /**
2352
- * The application's cached data directory.
2353
- *
2354
- * @remarks
2355
- * This variable is used to override the base path of the system's local cache data directory. This variable is used to set the \`$storm.paths.cache\` property.
2356
- *
2357
- * @title Cache Directory
2358
- * @category node
2359
- */
2360
- CACHE_DIR?: string;
2361
- /**
2362
- * The application's logging directory.
2363
- *
2364
- * @remarks
2365
- * This variable is used to override the base path of the system's local application log directory. This variable is used to set the \`$storm.paths.log\` property.
2366
- *
2367
- * @title Log Directory
2368
- * @category node
2369
- */
2370
- LOG_DIR?: string;
2371
- /**
2372
- * The application's temporary data directory.
2373
- *
2374
- * @remarks
2375
- * This variable is used to override the base path of the system's local temporary data directory. This variable is used to set the \`$storm.paths.temp\` property.
2376
- *
2377
- * @title Temporary Directory
2378
- * @category node
2379
- */
2380
- TEMP_DIR?: string;
2381
- /**
2382
- * A variable that specifies the current user's local application data directory on Windows.
2383
- *
2384
- * @see https://www.advancedinstaller.com/appdata-localappdata-programdata.html
2385
- *
2386
- * @remarks
2387
- * This variable is used to specify a path to application data that is specific to the current user. This variable can be used to set the \`$storm.paths.data\`, \`$storm.paths.cache\`, and \`$storm.paths.log\` properties.
2388
- *
2389
- * @readonly
2390
- * @category node
2391
- */
2392
- readonly LOCALAPPDATA?: string;
2393
- /**
2394
- * A variable that specifies the application data directory on Windows.
2395
- *
2396
- * @see https://www.advancedinstaller.com/appdata-localappdata-programdata.html
2397
- *
2398
- * @remarks
2399
- * This variable is used to specify a path to application data that is specific to the current user. This variable can be used to set the \`$storm.paths.config\` property.
2400
- *
2401
- * @readonly
2402
- * @category node
2403
- */
2404
- readonly APPDATA?: string;
2405
- /**
2406
- * A variable that specifies the data path in the home directory on Linux systems using the XDG base directory specification.
2407
- *
2408
- * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
2409
- *
2410
- * @remarks
2411
- * This variable is used to specify a path to application data that is specific to the current user. This variable can be used to set the \`$storm.paths.data\` property.
2412
- *
2413
- * @readonly
2414
- * @category node
2415
- */
2416
- readonly XDG_DATA_HOME?: string;
2417
- /**
2418
- * A variable that specifies the configuration path in the home directory on Linux systems using the XDG base directory specification.
2419
- *
2420
- * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
2421
- *
2422
- * @remarks
2423
- * This variable is used to specify a path to configuration data that is specific to the current user. This variable can be used to set the \`$storm.paths.config\` property.
2424
- *
2425
- * @readonly
2426
- * @category node
2427
- */
2428
- readonly XDG_CONFIG_HOME?: string;
2429
- /**
2430
- * A variable that specifies the cache path in the home directory on Linux systems using the XDG base directory specification.
2431
- *
2432
- * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
2433
- *
2434
- * @remarks
2435
- * This variable is used to specify a path to cache data that is specific to the current user. This variable can be used to set the \`$storm.paths.cache\` property.
2436
- *
2437
- * @readonly
2438
- * @category node
2439
- */
2440
- readonly XDG_CACHE_HOME?: string;
2441
- /**
2442
- * A variable that specifies the state directory on Linux systems using the XDG base directory specification.
2443
- *
2444
- * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
2445
- *
2446
- * @remarks
2447
- * This variable is used to specify a path to application state data that is specific to the current user. This variable can be used to set the \`$storm.paths.state\` property.
2448
- *
2449
- * @readonly
2450
- * @category node
2451
- */
2452
- readonly XDG_STATE_HOME?: string;
2453
- /**
2454
- * A variable that specifies the runtime directory on Linux systems using the XDG base directory specification.
2455
- *
2456
- * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
2457
- *
2458
- * @remarks
2459
- * This variable is used to specify a path to runtime data that is specific to the current user. This variable can be used to set the \`$storm.paths.temp\` property.
2460
- *
2461
- * @readonly
2462
- * @category node
2463
- */
2464
- readonly XDG_RUNTIME_DIR?: string;
2465
- /**
2466
- * A variable that specifies the [Devenv](https://devenv.sh/) runtime directory.
2467
- *
2468
- * @see https://devenv.sh/files-and-variables/#devenv_dotfile
2469
- * @see https://nixos.org/
2470
- *
2471
- * @remarks
2472
- * This variable is used to specify a path to application data that is specific to the current [Nix](https://nixos.org/) environment. This variable can be used to set the \`$storm.paths.temp\` property.
2473
- *
2474
- * @category node
2475
- */
2476
- DEVENV_RUNTIME?: string;
2477
- }
2478
- /**
2479
- * The base secrets configuration used by Powerlines applications
2480
- *
2481
- * @remarks
2482
- * This interface is used to define the secret configuration options used by Powerlines applications. It is used to provide type safety, autocompletion, and default values for the environment variables. The comments of each variable are used to provide documentation descriptions when running the \`storm docs\` command. Since these are secrets, no default values should be provided and the values should be kept confidential (excluded from the client).
2483
- */
2484
- interface SecretsInterface {
2485
- /**
2486
- * The secret key used for encryption and decryption.
2487
- *
2488
- * @remarks
2489
- * This variable is used to provide a secret key for encryption and decryption of sensitive data. It is important that this value is kept confidential and not exposed in client-side code or public repositories.
2490
- *
2491
- * @title Encryption Key
2492
- */
2493
- ENCRYPTION_KEY: string;
2494
- }
2495
- //#endregion
2496
- export { BabelResolvedConfig as a, UserConfig as c, PluginContext as i, SecretsInterface as n, ResolvedConfig as o, Plugin as r, BabelUserConfig as s, EnvInterface as t };