@powerlines/plugin-react 0.1.134 → 0.1.135

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 (203) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +29 -0
  2. package/dist/components/index.cjs +2 -3
  3. package/dist/components/index.d.cts +1 -3
  4. package/dist/components/index.d.mts +1 -4
  5. package/dist/components/index.mjs +1 -2
  6. package/dist/components/react-optimized.cjs +48 -2
  7. package/dist/components/react-optimized.d.cts +13 -2
  8. package/dist/components/react-optimized.d.mts +13 -3
  9. package/dist/components/react-optimized.mjs +45 -1
  10. package/dist/deepkit/schemas/reflection.cjs +3940 -0
  11. package/dist/{plugin-CJdK9GYW.d.cts → deepkit/schemas/reflection.d.cts} +1 -331
  12. package/dist/{plugin-Noy_HIP5.d.mts → deepkit/schemas/reflection.d.mts} +59 -389
  13. package/dist/deepkit/schemas/reflection.mjs +3938 -0
  14. package/dist/deepkit/schemas/reflection2.cjs +4112 -0
  15. package/dist/deepkit/schemas/reflection2.mjs +4110 -0
  16. package/dist/deepkit/src/capnp.cjs +913 -0
  17. package/dist/deepkit/src/capnp.mjs +911 -0
  18. package/dist/deepkit/src/esbuild-plugin.cjs +47 -0
  19. package/dist/deepkit/src/esbuild-plugin.mjs +46 -0
  20. package/dist/deepkit/src/reflect-type.cjs +22 -0
  21. package/dist/deepkit/src/reflect-type.mjs +20 -0
  22. package/dist/deepkit/src/resolve-reflections.cjs +16 -0
  23. package/dist/deepkit/src/resolve-reflections.mjs +15 -0
  24. package/dist/deepkit/src/transformer.cjs +52 -0
  25. package/dist/deepkit/src/transformer.mjs +49 -0
  26. package/dist/deepkit/src/transpile.cjs +29 -0
  27. package/dist/deepkit/src/transpile.mjs +27 -0
  28. package/dist/deepkit/src/types.d.cts +10 -0
  29. package/dist/deepkit/src/types.d.mts +10 -0
  30. package/dist/deepkit/src/utilities.cjs +66 -0
  31. package/dist/deepkit/src/utilities.mjs +65 -0
  32. package/dist/index.cjs +16 -11295
  33. package/dist/index.d.cts +5 -7
  34. package/dist/index.d.mts +6 -8
  35. package/dist/index.mjs +7 -11280
  36. package/dist/plugin-alloy/src/core/components/output.cjs +45 -0
  37. package/dist/plugin-alloy/src/core/components/output.mjs +44 -0
  38. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +22 -0
  39. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +21 -0
  40. package/dist/plugin-alloy/src/core/components/source-file.cjs +64 -0
  41. package/dist/plugin-alloy/src/core/components/source-file.d.cts +23 -0
  42. package/dist/plugin-alloy/src/core/components/source-file.d.mts +23 -0
  43. package/dist/plugin-alloy/src/core/components/source-file.mjs +62 -0
  44. package/dist/plugin-alloy/src/core/contexts/context.cjs +60 -0
  45. package/dist/plugin-alloy/src/core/contexts/context.mjs +54 -0
  46. package/dist/plugin-alloy/src/core/contexts/index.cjs +2 -0
  47. package/dist/plugin-alloy/src/core/contexts/index.mjs +4 -0
  48. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +46 -0
  49. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +42 -0
  50. package/dist/plugin-alloy/src/helpers/refkey.cjs +16 -0
  51. package/dist/plugin-alloy/src/helpers/refkey.mjs +15 -0
  52. package/dist/plugin-alloy/src/index.cjs +93 -0
  53. package/dist/plugin-alloy/src/index.mjs +91 -0
  54. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +7 -0
  55. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +9 -0
  56. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +5 -0
  57. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +7 -0
  58. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +17 -0
  59. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +17 -0
  60. package/dist/plugin-alloy/src/types/components.d.cts +22 -0
  61. package/dist/{components-Bs3-ohmM.d.mts → plugin-alloy/src/types/components.d.mts} +2 -1
  62. package/dist/plugin-alloy/src/types/index.d.mts +2 -0
  63. package/dist/plugin-alloy/src/types/plugin.d.cts +37 -0
  64. package/dist/plugin-alloy/src/types/plugin.d.mts +37 -0
  65. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +57 -0
  66. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +25 -0
  67. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +26 -0
  68. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +56 -0
  69. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +126 -0
  70. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +124 -0
  71. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +442 -0
  72. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +27 -0
  73. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +28 -0
  74. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +433 -0
  75. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +194 -0
  76. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +14 -0
  77. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +15 -0
  78. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +191 -0
  79. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +68 -0
  80. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +67 -0
  81. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +124 -0
  82. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +123 -0
  83. package/dist/plugin-automd/src/index.cjs +101 -0
  84. package/dist/plugin-automd/src/index.mjs +98 -0
  85. package/dist/plugin-automd/src/types/plugin.d.cts +38 -0
  86. package/dist/plugin-automd/src/types/plugin.d.mts +40 -0
  87. package/dist/plugin-automd/src/types/toc.d.cts +33 -0
  88. package/dist/plugin-automd/src/types/toc.d.mts +33 -0
  89. package/dist/plugin-babel/src/helpers/ast-utils.cjs +10 -0
  90. package/dist/plugin-babel/src/helpers/ast-utils.mjs +9 -0
  91. package/dist/plugin-babel/src/helpers/create-plugin.cjs +41 -0
  92. package/dist/plugin-babel/src/helpers/create-plugin.mjs +39 -0
  93. package/dist/plugin-babel/src/helpers/filters.cjs +23 -0
  94. package/dist/plugin-babel/src/helpers/filters.mjs +21 -0
  95. package/dist/plugin-babel/src/helpers/index.cjs +5 -0
  96. package/dist/plugin-babel/src/helpers/index.mjs +7 -0
  97. package/dist/plugin-babel/src/helpers/module-helpers.cjs +38 -0
  98. package/dist/plugin-babel/src/helpers/module-helpers.mjs +35 -0
  99. package/dist/plugin-babel/src/helpers/options.cjs +50 -0
  100. package/dist/plugin-babel/src/helpers/options.mjs +47 -0
  101. package/dist/plugin-babel/src/index.cjs +91 -0
  102. package/dist/plugin-babel/src/index.mjs +89 -0
  103. package/dist/plugin-babel/src/types/index.d.mts +1 -0
  104. package/dist/plugin-babel/src/types/plugin.d.cts +15 -0
  105. package/dist/plugin-babel/src/types/plugin.d.mts +15 -0
  106. package/dist/plugin-env/src/babel/index.cjs +1 -0
  107. package/dist/plugin-env/src/babel/index.mjs +3 -0
  108. package/dist/plugin-env/src/babel/plugin.cjs +121 -0
  109. package/dist/plugin-env/src/babel/plugin.mjs +119 -0
  110. package/dist/plugin-env/src/components/docs.cjs +9 -0
  111. package/dist/plugin-env/src/components/docs.mjs +11 -0
  112. package/dist/plugin-env/src/components/env.cjs +575 -0
  113. package/dist/plugin-env/src/components/env.mjs +572 -0
  114. package/dist/plugin-env/src/components/index.cjs +2 -0
  115. package/dist/plugin-env/src/components/index.mjs +4 -0
  116. package/dist/plugin-env/src/helpers/automd-generator.cjs +22 -0
  117. package/dist/plugin-env/src/helpers/automd-generator.mjs +21 -0
  118. package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +55 -0
  119. package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +54 -0
  120. package/dist/plugin-env/src/helpers/index.cjs +6 -0
  121. package/dist/plugin-env/src/helpers/index.mjs +8 -0
  122. package/dist/plugin-env/src/helpers/load.cjs +83 -0
  123. package/dist/plugin-env/src/helpers/load.mjs +80 -0
  124. package/dist/plugin-env/src/helpers/persistence.cjs +199 -0
  125. package/dist/plugin-env/src/helpers/persistence.mjs +188 -0
  126. package/dist/plugin-env/src/helpers/reflect.cjs +111 -0
  127. package/dist/plugin-env/src/helpers/reflect.mjs +103 -0
  128. package/dist/plugin-env/src/helpers/source-file-env.cjs +24 -0
  129. package/dist/plugin-env/src/helpers/source-file-env.mjs +23 -0
  130. package/dist/plugin-env/src/helpers/template-helpers.cjs +2 -0
  131. package/dist/plugin-env/src/helpers/template-helpers.mjs +4 -0
  132. package/dist/plugin-env/src/index.cjs +175 -0
  133. package/dist/plugin-env/src/index.mjs +173 -0
  134. package/dist/plugin-env/src/types/plugin.d.cts +151 -0
  135. package/dist/plugin-env/src/types/plugin.d.mts +153 -0
  136. package/dist/{runtime-B8Zgz0Kb.d.cts → plugin-env/src/types/runtime.d.cts} +2 -2
  137. package/dist/{runtime-BFnA_zZ8.d.mts → plugin-env/src/types/runtime.d.mts} +2 -2
  138. package/dist/powerlines/src/lib/build/esbuild.cjs +102 -0
  139. package/dist/powerlines/src/lib/build/esbuild.mjs +100 -0
  140. package/dist/powerlines/src/lib/entry.cjs +12 -0
  141. package/dist/powerlines/src/lib/entry.mjs +14 -0
  142. package/dist/powerlines/src/lib/logger.cjs +41 -0
  143. package/dist/powerlines/src/lib/logger.mjs +39 -0
  144. package/dist/powerlines/src/lib/typescript/tsconfig.cjs +38 -0
  145. package/dist/powerlines/src/lib/typescript/tsconfig.mjs +35 -0
  146. package/dist/powerlines/src/lib/utilities/bundle.cjs +35 -0
  147. package/dist/powerlines/src/lib/utilities/bundle.mjs +34 -0
  148. package/dist/powerlines/src/lib/utilities/resolve.cjs +30 -0
  149. package/dist/powerlines/src/lib/utilities/resolve.mjs +29 -0
  150. package/dist/powerlines/src/plugin-utils/paths.cjs +1 -0
  151. package/dist/powerlines/src/plugin-utils/paths.mjs +3 -0
  152. package/dist/powerlines/src/types/babel.d.cts +22 -0
  153. package/dist/powerlines/src/types/babel.d.mts +22 -0
  154. package/dist/powerlines/src/types/build.d.cts +145 -0
  155. package/dist/powerlines/src/types/build.d.mts +145 -0
  156. package/dist/powerlines/src/types/commands.d.cts +8 -0
  157. package/dist/powerlines/src/types/commands.d.mts +9 -0
  158. package/dist/powerlines/src/types/config.d.cts +387 -0
  159. package/dist/powerlines/src/types/config.d.mts +388 -0
  160. package/dist/powerlines/src/types/context.d.cts +414 -0
  161. package/dist/powerlines/src/types/context.d.mts +416 -0
  162. package/dist/powerlines/src/types/fs.d.cts +486 -0
  163. package/dist/powerlines/src/types/fs.d.mts +486 -0
  164. package/dist/powerlines/src/types/hooks.d.mts +2 -0
  165. package/dist/powerlines/src/types/plugin.d.cts +231 -0
  166. package/dist/powerlines/src/types/plugin.d.mts +231 -0
  167. package/dist/powerlines/src/types/resolved.d.cts +82 -0
  168. package/dist/powerlines/src/types/resolved.d.mts +82 -0
  169. package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
  170. package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
  171. package/dist/types/index.cjs +0 -3
  172. package/dist/types/index.d.cts +2 -5
  173. package/dist/types/index.d.mts +2 -6
  174. package/dist/types/index.mjs +0 -4
  175. package/dist/types/plugin.cjs +0 -1
  176. package/dist/types/plugin.d.cts +72 -3
  177. package/dist/types/plugin.d.mts +72 -4
  178. package/dist/types/plugin.mjs +0 -2
  179. package/dist/types/runtime.cjs +0 -1
  180. package/dist/types/runtime.d.cts +14 -3
  181. package/dist/types/runtime.d.mts +14 -3
  182. package/dist/types/runtime.mjs +0 -2
  183. package/package.json +6 -6
  184. package/dist/components-BWLXb7a2.cjs +0 -0
  185. package/dist/components-D-mbfYAe.mjs +0 -1
  186. package/dist/index-B8OHl-c_.d.mts +0 -1
  187. package/dist/index-CFG0_wK4.d.cts +0 -1
  188. package/dist/index-DNLi60D-.d.mts +0 -1
  189. package/dist/index-_wQ5ClJU.d.cts +0 -1
  190. package/dist/plugin-jZ9N9Mz-.mjs +0 -1
  191. package/dist/plugin-pBKbb5K9.cjs +0 -0
  192. package/dist/react-optimized-BpFTLlx0.mjs +0 -937
  193. package/dist/react-optimized-CVXQfO40.d.mts +0 -88
  194. package/dist/react-optimized-Kv14o38g.cjs +0 -1078
  195. package/dist/react-optimized-NGRcJkqA.d.cts +0 -105
  196. package/dist/resolved-CTt23qfE.d.cts +0 -1795
  197. package/dist/resolved-Nive48eM.d.mts +0 -1796
  198. package/dist/runtime-B-KyPHeI.d.mts +0 -15
  199. package/dist/runtime-BKY6WvHV.mjs +0 -1
  200. package/dist/runtime-Bp9G0scd.cjs +0 -0
  201. package/dist/runtime-Dm--tkdO.d.cts +0 -15
  202. package/dist/types--fVOUYBq.mjs +0 -1
  203. package/dist/types-a8gm_IaQ.cjs +0 -0
@@ -1,24 +1,5 @@
1
- import { i as UserConfig, n as ResolvedConfig, o as PluginContext, r as BabelUserConfig, t as BabelResolvedConfig } from "./resolved-CTt23qfE.cjs";
2
- import { n as SecretsInterface, t as EnvInterface } from "./runtime-B8Zgz0Kb.cjs";
3
- import { Children, PrintTreeOptions } from "@alloy-js/core";
4
- import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
5
- import { Children as Children$1 } from "@alloy-js/core/jsx-runtime";
6
- import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
7
1
  import * as $ from "@stryke/capnp";
8
- import { Config } from "automd";
9
- import { DotenvParseOutput } from "@stryke/env/types";
10
- import { PluginOptions } from "babel-plugin-react-compiler";
11
2
 
12
- //#region ../plugin-babel/src/types/plugin.d.ts
13
- type BabelPluginOptions = Partial<BabelUserConfig>;
14
- type BabelPluginUserConfig = UserConfig;
15
- interface BabelPluginResolvedConfig extends ResolvedConfig {
16
- transform: {
17
- babel: BabelResolvedConfig;
18
- };
19
- }
20
- type BabelPluginContext<TResolvedConfig extends BabelPluginResolvedConfig = BabelPluginResolvedConfig> = PluginContext<TResolvedConfig>;
21
- //#endregion
22
3
  //#region ../deepkit/schemas/reflection.d.ts
23
4
  declare const ReflectionKind: {
24
5
  readonly NEVER: 0;
@@ -1576,315 +1557,4 @@ declare class SerializedTypes extends $.Struct {
1576
1557
  toString(): string;
1577
1558
  }
1578
1559
  //#endregion
1579
- //#region ../deepkit/src/types.d.ts
1580
- type Reflection<T extends Record<string, any> = Record<string, any>> = ReflectionClass<T> & {
1581
- dataBuffer?: ArrayBuffer;
1582
- messageRoot?: SerializedTypes;
1583
- };
1584
- //#endregion
1585
- //#region ../plugin-alloy/src/types/plugin.d.ts
1586
- type AlloyPluginOptions = Partial<PrintTreeOptions> & {
1587
- /**
1588
- * If true, the Alloy framework is used to generate Typescript output files.
1589
- *
1590
- * @defaultValue true
1591
- */
1592
- typescript?: boolean;
1593
- /**
1594
- * If true, the Alloy framework is used to generate JSON output files.
1595
- *
1596
- * @defaultValue false
1597
- */
1598
- json?: boolean;
1599
- /**
1600
- * If true, the Alloy framework is used to generate Markdown output files.
1601
- *
1602
- * @defaultValue false
1603
- */
1604
- markdown?: boolean;
1605
- };
1606
- type AlloyPluginUserConfig = UserConfig & {
1607
- alloy?: AlloyPluginOptions;
1608
- };
1609
- type AlloyPluginResolvedConfig = ResolvedConfig & {
1610
- alloy: AlloyPluginOptions;
1611
- };
1612
- type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
1613
- render: <TContext extends AlloyPluginContext>(this: TContext, children: Children) => Promise<void>;
1614
- };
1615
- //#endregion
1616
- //#region ../plugin-automd/src/types/toc.d.ts
1617
- interface TOCOptions {
1618
- /**
1619
- * A slugify function to generate slugs for the headings.
1620
- */
1621
- slugify?: (str: string) => string;
1622
- /**
1623
- * The maximum depth of headings to include in the TOC.
1624
- *
1625
- * @defaultValue 6
1626
- */
1627
- maxDepth?: number;
1628
- /**
1629
- * Whether to include the first H1 heading in the TOC.
1630
- */
1631
- firstH1?: boolean;
1632
- /**
1633
- * The bullet character to use for list items in the TOC.
1634
- *
1635
- * @defaultValue "-"
1636
- */
1637
- bullets?: string;
1638
- /**
1639
- * A prefix to add to each heading in the TOC.
1640
- */
1641
- prefix?: string;
1642
- /**
1643
- * A filter function to determine which headings to include in the TOC.
1644
- */
1645
- filter?: (str: string, level: number) => boolean;
1646
- }
1647
- //#endregion
1648
- //#region ../plugin-automd/src/types/plugin.d.ts
1649
- type AutoMDPluginOptions = Omit<Config, "dir" | "watch" | "onWatch" | "prefix"> & {
1650
- /**
1651
- * Path to the AutoMD configuration file.
1652
- *
1653
- * @remarks
1654
- * If not provided, the plugin will use the default AutoMD configuration resolution mechanism.
1655
- */
1656
- configFile?: string;
1657
- /**
1658
- * An indicator specifying whether or not issues found by AutoMD during the prepare task are considered fatal.
1659
- *
1660
- * @defaultValue true
1661
- */
1662
- allowIssues?: boolean;
1663
- /**
1664
- * Alternate prefix strings to use for finding generators
1665
- *
1666
- * @remarks
1667
- * By default, AutoMD looks for generators with the "automd" prefix, so that any `<!-- automd:generator [...args] --> ... <!-- /automd -->` comments will be picked up. If you want to use different prefixes (for example, to avoid conflicts with other tools), you would provide a value like "myPrefix" and AutoMD would also look for `<!-- myPrefix:generator [...args] --> ... <!-- /myPrefix -->` comments.
1668
- *
1669
- * @defaultValue ["automd", "powerlines", "\{framework\}"]
1670
- */
1671
- prefix?: string | string[];
1672
- /**
1673
- * Table of Contents generator options
1674
- *
1675
- * @remarks
1676
- * If set to `false`, the built-in Table of Contents generator will be disabled.
1677
- */
1678
- toc?: false | TOCOptions;
1679
- };
1680
- //#endregion
1681
- //#region ../plugin-env/src/types/plugin.d.ts
1682
- type EnvPluginOptions = Omit<DotenvConfiguration, "types"> & {
1683
- /**
1684
- * A path to the type definition for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `":"` or `"#"` character. For example: `"./src/types/env.ts#ConfigConfiguration"`.
1685
- */
1686
- types?: TypeDefinitionParameter;
1687
- /**
1688
- * A path to the type definition for the expected env secret parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `":"` or `"#"` character. For example: `"./src/types/env.ts#ConfigSecrets"`.
1689
- */
1690
- secrets?: TypeDefinitionParameter;
1691
- /**
1692
- * An additional prefix (or list of additional prefixes) to apply to the environment variables
1693
- *
1694
- * @remarks
1695
- * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.
1696
- */
1697
- prefix?: string | string[];
1698
- /**
1699
- * Should the plugin inject the env variables in the source code with their values?
1700
- *
1701
- * @remarks
1702
- * This option is set to `true` when building an application project.
1703
- *
1704
- * @defaultValue false
1705
- */
1706
- inject?: boolean;
1707
- /**
1708
- * The default configuration to use when loading environment variables.
1709
- *
1710
- * @remarks
1711
- * This configuration is used as the base configuration when loading environment variables, and will be overridden by any values found in the `.env` file or the process environment.
1712
- */
1713
- defaultConfig?: Children$1;
1714
- /**
1715
- * Babel configuration options to use when injecting environment variables into the source code.
1716
- *
1717
- * @remarks
1718
- * This option allows you to customize the Babel transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Babel settings.
1719
- */
1720
- babel?: BabelPluginOptions;
1721
- /**
1722
- * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.
1723
- *
1724
- * @remarks
1725
- * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.
1726
- */
1727
- automd?: AutoMDPluginOptions;
1728
- /**
1729
- * Alloy configuration options to use when injecting environment variables into the source code.
1730
- *
1731
- * @remarks
1732
- * This option allows you to customize the Alloy transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Alloy settings.
1733
- */
1734
- alloy?: AlloyPluginOptions;
1735
- };
1736
- type EnvPluginUserConfig = BabelPluginUserConfig & AlloyPluginUserConfig & {
1737
- env: EnvPluginOptions;
1738
- };
1739
- type EnvPluginResolvedConfig = BabelPluginResolvedConfig & AlloyPluginResolvedConfig & {
1740
- env: Required<Pick<DotenvConfiguration, "additionalFiles">> & Required<Pick<EnvPluginOptions, "defaultConfig">> & {
1741
- /**
1742
- * The type definition for the expected env variable parameters
1743
- *
1744
- * @remarks
1745
- * This value is parsed from the {@link EnvPluginOptions.types} option.
1746
- */
1747
- types: TypeDefinition;
1748
- /**
1749
- * The type definition for the expected env secret parameters
1750
- *
1751
- * @remarks
1752
- * This value is parsed from the {@link EnvPluginOptions.secrets} option.
1753
- */
1754
- secrets: TypeDefinition;
1755
- /**
1756
- * Should the plugin inject the env variables in the source code with their values?
1757
- *
1758
- * @remarks
1759
- * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.
1760
- */
1761
- inject: EnvPluginOptions["inject"];
1762
- /**
1763
- * The prefix used for environment variables
1764
- *
1765
- * @remarks
1766
- * This value is used to filter environment variables that are loaded from the .env file and the process environment.
1767
- */
1768
- prefix: string[];
1769
- };
1770
- };
1771
- interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig>, AlloyPluginContext<TResolvedConfig> {
1772
- env: {
1773
- /**
1774
- * The type definitions reflection for the env variables and secrets
1775
- *
1776
- * @remarks
1777
- * These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.
1778
- */
1779
- types: {
1780
- /**
1781
- * The type definitions for the expected env variables
1782
- */
1783
- env: Reflection;
1784
- /**
1785
- * The type definitions for the expected env secrets
1786
- */
1787
- secrets: Reflection;
1788
- };
1789
- /**
1790
- * The current **used** environment variables and secrets reflection
1791
- *
1792
- * @remarks
1793
- * This reflection contains the structure of the current environment variables and secrets as defined during the plugin initialization by extracting the values from the source code.
1794
- */
1795
- used: {
1796
- /**
1797
- * The current env variables reflection
1798
- */
1799
- env: Reflection<EnvInterface>;
1800
- /**
1801
- * The current env secrets reflection
1802
- */
1803
- secrets: Reflection<SecretsInterface>;
1804
- };
1805
- /**
1806
- * The parsed .env configuration object
1807
- *
1808
- * @remarks
1809
- * This value is the result of loading the .env configuration file found in the project root directory and merging it with the values provided at {@link EnvPluginOptions.values}
1810
- */
1811
- parsed: DotenvParseOutput;
1812
- /**
1813
- * The injected environment variables and secrets reflection
1814
- *
1815
- * @remarks
1816
- * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.
1817
- */
1818
- injected: Reflection;
1819
- };
1820
- }
1821
- //#endregion
1822
- //#region src/types/plugin.d.ts
1823
- type ReactCompilerOptions = Omit<PluginOptions, "logger">;
1824
- interface ReactPluginOptions {
1825
- /**
1826
- * Control where the JSX factory is imported from.
1827
- *
1828
- * @see https://esbuild.github.io/api/#jsx-import-source
1829
- *
1830
- * @defaultValue "react"
1831
- */
1832
- jsxImportSource?: string;
1833
- /**
1834
- * Control how JSX is transformed.
1835
- *
1836
- * @remarks
1837
- * Skipping React import with classic runtime is not supported from v4
1838
- *
1839
- * @defaultValue "automatic"
1840
- */
1841
- jsxRuntime?: "classic" | "automatic";
1842
- /**
1843
- * Options provided to the [React Compiler](https://npmjs.com/package/babel-plugin-react-compiler).
1844
- *
1845
- * @see https://github.com/facebook/react/blob/main/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts#L55
1846
- * @see https://react.dev/blog/2025/04/21/react-compiler-rc
1847
- *
1848
- * @remarks
1849
- * Set to `false` to disable the React Compiler. By default, the React Compiler is enabled and target is set to React 19.
1850
- */
1851
- compiler?: ReactCompilerOptions | false;
1852
- /**
1853
- * React Fast Refresh runtime URL prefix.
1854
- *
1855
- * @remarks
1856
- * Useful in a module federation context to enable HMR by specifying the host application URL in the Vite config of a remote application.
1857
- *
1858
- * @example
1859
- * reactRefreshHost: 'http://localhost:3000'
1860
- */
1861
- reactRefreshHost?: string;
1862
- /**
1863
- * Options to pass to the [Babel plugin](https://npmjs.com/package/\@powerlines/plugin-babel).
1864
- */
1865
- babel?: Partial<BabelPluginOptions>;
1866
- /**
1867
- * Options to pass to the [Env plugin](https://npmjs.com/package/\@powerlines/plugin-env).
1868
- */
1869
- env?: Partial<Omit<EnvPluginOptions, "babel">>;
1870
- }
1871
- type ReactPluginUserConfig = EnvPluginUserConfig & {
1872
- /**
1873
- * Options for the React plugin.
1874
- */
1875
- react?: ReactPluginOptions;
1876
- };
1877
- type ReactPluginResolvedConfig = EnvPluginResolvedConfig & {
1878
- /**
1879
- * Options for the React plugin.
1880
- */
1881
- react: ReactPluginOptions;
1882
- };
1883
- interface ReactPluginContext<TResolvedConfig extends ReactPluginResolvedConfig = ReactPluginResolvedConfig> extends EnvPluginContext<TResolvedConfig> {}
1884
- declare type __ΩReactCompilerOptions = any[];
1885
- declare type __ΩReactPluginOptions = any[];
1886
- declare type __ΩReactPluginUserConfig = any[];
1887
- declare type __ΩReactPluginResolvedConfig = any[];
1888
- declare type __ΩReactPluginContext = any[];
1889
- //#endregion
1890
- export { ReactPluginUserConfig as a, __ΩReactPluginOptions as c, ReactPluginResolvedConfig as i, __ΩReactPluginResolvedConfig as l, ReactPluginContext as n, __ΩReactCompilerOptions as o, ReactPluginOptions as r, __ΩReactPluginContext as s, ReactCompilerOptions as t, __ΩReactPluginUserConfig as u };
1560
+ export { SerializedTypes };