@powerlines/plugin-nodejs 0.1.116 → 0.1.118

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 (65) hide show
  1. package/dist/components/env.d.cts +1 -1
  2. package/dist/components/env.d.mts +1 -1
  3. package/dist/index.d.cts +1 -1
  4. package/dist/index.d.mts +1 -1
  5. package/dist/types/plugin.d.cts +2 -2
  6. package/dist/types/plugin.d.mts +2 -2
  7. package/package.json +6 -6
  8. package/dist/deepkit/schemas/reflection.d.cts +0 -1560
  9. package/dist/deepkit/schemas/reflection.d.mts +0 -1560
  10. package/dist/deepkit/src/types.d.cts +0 -10
  11. package/dist/deepkit/src/types.d.mts +0 -10
  12. package/dist/plugin-alloy/src/core/components/source-file.d.cts +0 -23
  13. package/dist/plugin-alloy/src/core/components/source-file.d.mts +0 -23
  14. package/dist/plugin-alloy/src/types/components.d.cts +0 -20
  15. package/dist/plugin-alloy/src/types/components.d.mts +0 -20
  16. package/dist/plugin-alloy/src/types/index.d.cts +0 -2
  17. package/dist/plugin-alloy/src/types/index.d.mts +0 -2
  18. package/dist/plugin-alloy/src/types/plugin.d.cts +0 -36
  19. package/dist/plugin-alloy/src/types/plugin.d.mts +0 -36
  20. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +0 -26
  21. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +0 -26
  22. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +0 -37
  23. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +0 -37
  24. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +0 -16
  25. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +0 -16
  26. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.cts +0 -4
  27. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.mts +0 -4
  28. package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
  29. package/dist/plugin-automd/src/types/plugin.d.mts +0 -38
  30. package/dist/plugin-automd/src/types/toc.d.cts +0 -33
  31. package/dist/plugin-automd/src/types/toc.d.mts +0 -33
  32. package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
  33. package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
  34. package/dist/plugin-env/src/components/env.d.cts +0 -11
  35. package/dist/plugin-env/src/components/env.d.mts +0 -11
  36. package/dist/plugin-env/src/types/plugin.d.cts +0 -149
  37. package/dist/plugin-env/src/types/plugin.d.mts +0 -149
  38. package/dist/plugin-env/src/types/runtime.d.cts +0 -789
  39. package/dist/plugin-env/src/types/runtime.d.mts +0 -789
  40. package/dist/powerlines/src/internal/helpers/hooks.d.cts +0 -47
  41. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -47
  42. package/dist/powerlines/src/types/api.d.cts +0 -104
  43. package/dist/powerlines/src/types/api.d.mts +0 -104
  44. package/dist/powerlines/src/types/babel.d.cts +0 -22
  45. package/dist/powerlines/src/types/babel.d.mts +0 -22
  46. package/dist/powerlines/src/types/build.d.cts +0 -185
  47. package/dist/powerlines/src/types/build.d.mts +0 -185
  48. package/dist/powerlines/src/types/commands.d.cts +0 -8
  49. package/dist/powerlines/src/types/commands.d.mts +0 -8
  50. package/dist/powerlines/src/types/config.d.cts +0 -435
  51. package/dist/powerlines/src/types/config.d.mts +0 -435
  52. package/dist/powerlines/src/types/context.d.cts +0 -514
  53. package/dist/powerlines/src/types/context.d.mts +0 -514
  54. package/dist/powerlines/src/types/fs.d.cts +0 -486
  55. package/dist/powerlines/src/types/fs.d.mts +0 -486
  56. package/dist/powerlines/src/types/hooks.d.cts +0 -32
  57. package/dist/powerlines/src/types/hooks.d.mts +0 -32
  58. package/dist/powerlines/src/types/plugin.d.cts +0 -205
  59. package/dist/powerlines/src/types/plugin.d.mts +0 -205
  60. package/dist/powerlines/src/types/resolved.d.cts +0 -94
  61. package/dist/powerlines/src/types/resolved.d.mts +0 -94
  62. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  63. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  64. package/dist/powerlines/src/types/unplugin.d.cts +0 -22
  65. package/dist/powerlines/src/types/unplugin.d.mts +0 -22
@@ -1,149 +0,0 @@
1
- import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig } from "../../../plugin-babel/src/types/plugin.cjs";
2
- import { Reflection } from "../../../deepkit/src/types.cjs";
3
- import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig } from "../../../plugin-alloy/src/types/plugin.cjs";
4
- import "../../../plugin-alloy/src/types/index.cjs";
5
- import { AutoMDPluginOptions } from "../../../plugin-automd/src/types/plugin.cjs";
6
- import { EnvInterface, SecretsInterface } from "./runtime.cjs";
7
- import { Children } from "@alloy-js/core";
8
- import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
9
- import { DotenvParseOutput } from "@stryke/env/types";
10
-
11
- //#region ../plugin-env/src/types/plugin.d.ts
12
- type EnvPluginOptions = Omit<DotenvConfiguration, "types"> & {
13
- /**
14
- * 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"`.
15
- */
16
- types?: TypeDefinitionParameter;
17
- /**
18
- * 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"`.
19
- */
20
- secrets?: TypeDefinitionParameter;
21
- /**
22
- * An additional prefix (or list of additional prefixes) to apply to the environment variables
23
- *
24
- * @remarks
25
- * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.
26
- */
27
- prefix?: string | string[];
28
- /**
29
- * Should the plugin inject the env variables in the source code with their values?
30
- *
31
- * @defaultValue false
32
- */
33
- inject?: boolean;
34
- /**
35
- * The default configuration to use when loading environment variables.
36
- *
37
- * @remarks
38
- * 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.
39
- */
40
- defaultConfig?: Children;
41
- /**
42
- * Babel configuration options to use when injecting environment variables into the source code.
43
- *
44
- * @remarks
45
- * 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.
46
- */
47
- babel?: BabelPluginOptions;
48
- /**
49
- * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.
50
- *
51
- * @remarks
52
- * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.
53
- */
54
- automd?: AutoMDPluginOptions;
55
- /**
56
- * Alloy configuration options to use when injecting environment variables into the source code.
57
- *
58
- * @remarks
59
- * 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.
60
- */
61
- alloy?: AlloyPluginOptions;
62
- };
63
- type EnvPluginUserConfig = BabelPluginUserConfig & AlloyPluginUserConfig & {
64
- env: EnvPluginOptions;
65
- };
66
- type EnvPluginResolvedConfig = BabelPluginResolvedConfig & AlloyPluginResolvedConfig & {
67
- env: Required<Pick<DotenvConfiguration, "additionalFiles">> & Required<Pick<EnvPluginOptions, "defaultConfig">> & {
68
- /**
69
- * The type definition for the expected env variable parameters
70
- *
71
- * @remarks
72
- * This value is parsed from the {@link EnvPluginOptions.types} option.
73
- */
74
- types: TypeDefinition;
75
- /**
76
- * The type definition for the expected env secret parameters
77
- *
78
- * @remarks
79
- * This value is parsed from the {@link EnvPluginOptions.secrets} option.
80
- */
81
- secrets: TypeDefinition;
82
- /**
83
- * Should the plugin inject the env variables in the source code with their values?
84
- *
85
- * @remarks
86
- * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.
87
- */
88
- inject: EnvPluginOptions["inject"];
89
- /**
90
- * The prefix used for environment variables
91
- *
92
- * @remarks
93
- * This value is used to filter environment variables that are loaded from the .env file and the process environment.
94
- */
95
- prefix: string[];
96
- };
97
- };
98
- interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig>, AlloyPluginContext<TResolvedConfig> {
99
- env: {
100
- /**
101
- * The type definitions reflection for the env variables and secrets
102
- *
103
- * @remarks
104
- * These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.
105
- */
106
- types: {
107
- /**
108
- * The type definitions for the expected env variables
109
- */
110
- env: Reflection;
111
- /**
112
- * The type definitions for the expected env secrets
113
- */
114
- secrets: Reflection;
115
- };
116
- /**
117
- * The current **used** environment variables and secrets reflection
118
- *
119
- * @remarks
120
- * 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.
121
- */
122
- used: {
123
- /**
124
- * The current env variables reflection
125
- */
126
- env: Reflection<EnvInterface>;
127
- /**
128
- * The current env secrets reflection
129
- */
130
- secrets: Reflection<SecretsInterface>;
131
- };
132
- /**
133
- * The parsed .env configuration object
134
- *
135
- * @remarks
136
- * 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}
137
- */
138
- parsed: DotenvParseOutput;
139
- /**
140
- * The injected environment variables and secrets reflection
141
- *
142
- * @remarks
143
- * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.
144
- */
145
- injected: Reflection;
146
- };
147
- }
148
- //#endregion
149
- export { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig };
@@ -1,149 +0,0 @@
1
- import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig } from "../../../plugin-babel/src/types/plugin.mjs";
2
- import { Reflection } from "../../../deepkit/src/types.mjs";
3
- import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig } from "../../../plugin-alloy/src/types/plugin.mjs";
4
- import "../../../plugin-alloy/src/types/index.mjs";
5
- import { AutoMDPluginOptions } from "../../../plugin-automd/src/types/plugin.mjs";
6
- import { EnvInterface, SecretsInterface } from "./runtime.mjs";
7
- import { Children } from "@alloy-js/core";
8
- import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
9
- import { DotenvParseOutput } from "@stryke/env/types";
10
-
11
- //#region ../plugin-env/src/types/plugin.d.ts
12
- type EnvPluginOptions = Omit<DotenvConfiguration, "types"> & {
13
- /**
14
- * 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"`.
15
- */
16
- types?: TypeDefinitionParameter;
17
- /**
18
- * 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"`.
19
- */
20
- secrets?: TypeDefinitionParameter;
21
- /**
22
- * An additional prefix (or list of additional prefixes) to apply to the environment variables
23
- *
24
- * @remarks
25
- * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.
26
- */
27
- prefix?: string | string[];
28
- /**
29
- * Should the plugin inject the env variables in the source code with their values?
30
- *
31
- * @defaultValue false
32
- */
33
- inject?: boolean;
34
- /**
35
- * The default configuration to use when loading environment variables.
36
- *
37
- * @remarks
38
- * 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.
39
- */
40
- defaultConfig?: Children;
41
- /**
42
- * Babel configuration options to use when injecting environment variables into the source code.
43
- *
44
- * @remarks
45
- * 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.
46
- */
47
- babel?: BabelPluginOptions;
48
- /**
49
- * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.
50
- *
51
- * @remarks
52
- * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.
53
- */
54
- automd?: AutoMDPluginOptions;
55
- /**
56
- * Alloy configuration options to use when injecting environment variables into the source code.
57
- *
58
- * @remarks
59
- * 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.
60
- */
61
- alloy?: AlloyPluginOptions;
62
- };
63
- type EnvPluginUserConfig = BabelPluginUserConfig & AlloyPluginUserConfig & {
64
- env: EnvPluginOptions;
65
- };
66
- type EnvPluginResolvedConfig = BabelPluginResolvedConfig & AlloyPluginResolvedConfig & {
67
- env: Required<Pick<DotenvConfiguration, "additionalFiles">> & Required<Pick<EnvPluginOptions, "defaultConfig">> & {
68
- /**
69
- * The type definition for the expected env variable parameters
70
- *
71
- * @remarks
72
- * This value is parsed from the {@link EnvPluginOptions.types} option.
73
- */
74
- types: TypeDefinition;
75
- /**
76
- * The type definition for the expected env secret parameters
77
- *
78
- * @remarks
79
- * This value is parsed from the {@link EnvPluginOptions.secrets} option.
80
- */
81
- secrets: TypeDefinition;
82
- /**
83
- * Should the plugin inject the env variables in the source code with their values?
84
- *
85
- * @remarks
86
- * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.
87
- */
88
- inject: EnvPluginOptions["inject"];
89
- /**
90
- * The prefix used for environment variables
91
- *
92
- * @remarks
93
- * This value is used to filter environment variables that are loaded from the .env file and the process environment.
94
- */
95
- prefix: string[];
96
- };
97
- };
98
- interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig>, AlloyPluginContext<TResolvedConfig> {
99
- env: {
100
- /**
101
- * The type definitions reflection for the env variables and secrets
102
- *
103
- * @remarks
104
- * These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.
105
- */
106
- types: {
107
- /**
108
- * The type definitions for the expected env variables
109
- */
110
- env: Reflection;
111
- /**
112
- * The type definitions for the expected env secrets
113
- */
114
- secrets: Reflection;
115
- };
116
- /**
117
- * The current **used** environment variables and secrets reflection
118
- *
119
- * @remarks
120
- * 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.
121
- */
122
- used: {
123
- /**
124
- * The current env variables reflection
125
- */
126
- env: Reflection<EnvInterface>;
127
- /**
128
- * The current env secrets reflection
129
- */
130
- secrets: Reflection<SecretsInterface>;
131
- };
132
- /**
133
- * The parsed .env configuration object
134
- *
135
- * @remarks
136
- * 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}
137
- */
138
- parsed: DotenvParseOutput;
139
- /**
140
- * The injected environment variables and secrets reflection
141
- *
142
- * @remarks
143
- * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.
144
- */
145
- injected: Reflection;
146
- };
147
- }
148
- //#endregion
149
- export { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig };