@powerlines/plugin-date 0.12.66 → 0.12.68
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.
- package/dist/_virtual/rolldown_runtime.cjs +1 -0
- package/dist/{chunk-BGGBqwuQ.mjs → _virtual/rolldown_runtime.mjs} +1 -1
- package/dist/alloy/src/core/components/output.cjs +1 -0
- package/dist/alloy/src/core/components/output.mjs +1 -0
- package/dist/alloy/src/core/components/single-line-comment.cjs +1 -0
- package/dist/alloy/src/core/components/single-line-comment.mjs +1 -0
- package/dist/alloy/src/core/components/source-file.cjs +1 -0
- package/dist/alloy/src/core/components/source-file.mjs +1 -0
- package/dist/alloy/src/core/contexts/context.cjs +1 -0
- package/dist/alloy/src/core/contexts/context.mjs +1 -0
- package/dist/alloy/src/core/contexts/reflection.cjs +1 -0
- package/dist/alloy/src/core/contexts/reflection.mjs +1 -0
- package/dist/alloy/src/create-plugin.cjs +2 -0
- package/dist/alloy/src/create-plugin.mjs +2 -0
- package/dist/alloy/src/helpers/refkey.cjs +1 -0
- package/dist/alloy/src/helpers/refkey.mjs +1 -0
- package/dist/alloy/src/markdown/components/markdown-file.cjs +1 -0
- package/dist/alloy/src/markdown/components/markdown-file.mjs +1 -0
- package/dist/alloy/src/markdown/components/markdown-table.cjs +1 -0
- package/dist/alloy/src/markdown/components/markdown-table.mjs +1 -0
- package/dist/alloy/src/markdown/contexts/markdown-table.cjs +1 -0
- package/dist/alloy/src/markdown/contexts/markdown-table.mjs +1 -0
- package/dist/alloy/src/typescript/components/builtin-file.cjs +1 -0
- package/dist/alloy/src/typescript/components/builtin-file.mjs +1 -0
- package/dist/alloy/src/typescript/components/tsdoc-reflection.cjs +1 -0
- package/dist/alloy/src/typescript/components/tsdoc-reflection.mjs +1 -0
- package/dist/alloy/src/typescript/components/tsdoc.cjs +1 -0
- package/dist/alloy/src/typescript/components/tsdoc.mjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-file.cjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-file.mjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-interface.cjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-interface.mjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-object.cjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-object.mjs +1 -0
- package/dist/components/date-fns.cjs +513 -0
- package/dist/components/date-fns.d.cts +13 -0
- package/dist/components/date-fns.d.mts +13 -0
- package/dist/components/date-fns.mjs +513 -0
- package/dist/components/dayjs.cjs +458 -0
- package/dist/components/dayjs.d.cts +13 -0
- package/dist/components/dayjs.d.mts +13 -0
- package/dist/components/dayjs.mjs +458 -0
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.d.mts +4 -0
- package/dist/components/index.mjs +1 -0
- package/dist/components/luxon.cjs +462 -0
- package/dist/components/luxon.d.cts +13 -0
- package/dist/components/luxon.d.mts +13 -0
- package/dist/components/luxon.mjs +462 -0
- package/dist/components/moment.cjs +448 -0
- package/dist/components/moment.d.cts +13 -0
- package/dist/components/moment.d.mts +13 -0
- package/dist/components/moment.mjs +448 -0
- package/dist/deepkit/schemas/reflection.cjs +1 -0
- package/dist/deepkit/schemas/reflection.d.cts +1560 -0
- package/dist/deepkit/schemas/reflection.d.mts +1560 -0
- package/dist/deepkit/schemas/reflection.mjs +1 -0
- package/dist/deepkit/schemas/reflection2.cjs +1 -0
- package/dist/deepkit/schemas/reflection2.mjs +1 -0
- package/dist/deepkit/src/capnp.cjs +1 -0
- package/dist/deepkit/src/capnp.mjs +1 -0
- package/dist/deepkit/src/reflect-type.cjs +1 -0
- package/dist/deepkit/src/reflect-type.mjs +1 -0
- package/dist/deepkit/src/resolve-reflections.cjs +1 -0
- package/dist/deepkit/src/resolve-reflections.mjs +1 -0
- package/dist/deepkit/src/types.d.cts +10 -0
- package/dist/deepkit/src/types.d.mts +10 -0
- package/dist/deepkit/src/utilities.cjs +1 -0
- package/dist/deepkit/src/utilities.mjs +1 -0
- package/dist/deepkit/src/vendor/type.cjs +1 -0
- package/dist/deepkit/src/vendor/type.d.cts +7 -0
- package/dist/deepkit/src/vendor/type.d.mts +7 -0
- package/dist/deepkit/src/vendor/type.mjs +1 -0
- package/dist/index.cjs +1 -1953
- package/dist/index.d.cts +7 -40
- package/dist/index.d.mts +9 -40
- package/dist/index.mjs +1 -1950
- package/dist/plugin-babel/src/helpers/ast-utils.cjs +1 -0
- package/dist/plugin-babel/src/helpers/ast-utils.mjs +1 -0
- package/dist/plugin-babel/src/helpers/create-plugin.cjs +1 -0
- package/dist/plugin-babel/src/helpers/create-plugin.mjs +1 -0
- package/dist/plugin-babel/src/helpers/filters.cjs +1 -0
- package/dist/plugin-babel/src/helpers/filters.mjs +1 -0
- package/dist/plugin-babel/src/helpers/index.cjs +1 -0
- package/dist/plugin-babel/src/helpers/index.mjs +1 -0
- package/dist/plugin-babel/src/helpers/module-helpers.cjs +1 -0
- package/dist/plugin-babel/src/helpers/module-helpers.mjs +1 -0
- package/dist/plugin-babel/src/helpers/options.cjs +1 -0
- package/dist/plugin-babel/src/helpers/options.mjs +1 -0
- package/dist/plugin-babel/src/index.cjs +1 -0
- package/dist/plugin-babel/src/index.mjs +1 -0
- package/dist/plugin-babel/src/types/index.d.mts +1 -0
- package/dist/plugin-babel/src/types/plugin.d.cts +15 -0
- package/dist/plugin-babel/src/types/plugin.d.mts +15 -0
- package/dist/plugin-env/src/babel/index.cjs +1 -0
- package/dist/plugin-env/src/babel/index.mjs +1 -0
- package/dist/plugin-env/src/babel/plugin.cjs +5 -0
- package/dist/plugin-env/src/babel/plugin.mjs +5 -0
- package/dist/plugin-env/src/components/docs.cjs +1 -0
- package/dist/plugin-env/src/components/docs.mjs +1 -0
- package/dist/plugin-env/src/components/env.cjs +34 -0
- package/dist/plugin-env/src/components/env.mjs +31 -0
- package/dist/plugin-env/src/components/index.cjs +1 -0
- package/dist/plugin-env/src/components/index.mjs +1 -0
- package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +1 -0
- package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +1 -0
- package/dist/plugin-env/src/helpers/index.cjs +1 -0
- package/dist/plugin-env/src/helpers/index.mjs +1 -0
- package/dist/plugin-env/src/helpers/load.cjs +1 -0
- package/dist/plugin-env/src/helpers/load.mjs +1 -0
- package/dist/plugin-env/src/helpers/persistence.cjs +1 -0
- package/dist/plugin-env/src/helpers/persistence.mjs +1 -0
- package/dist/plugin-env/src/helpers/reflect.cjs +1 -0
- package/dist/plugin-env/src/helpers/reflect.mjs +1 -0
- package/dist/plugin-env/src/helpers/source-file-env.cjs +1 -0
- package/dist/plugin-env/src/helpers/source-file-env.mjs +1 -0
- package/dist/plugin-env/src/helpers/template-helpers.cjs +1 -0
- package/dist/plugin-env/src/helpers/template-helpers.mjs +1 -0
- package/dist/plugin-env/src/index.cjs +16 -0
- package/dist/plugin-env/src/index.mjs +16 -0
- package/dist/plugin-env/src/types/plugin.d.cts +135 -0
- package/dist/plugin-env/src/types/plugin.d.mts +136 -0
- package/dist/plugin-env/src/types/runtime.d.cts +792 -0
- package/dist/plugin-env/src/types/runtime.d.mts +792 -0
- package/dist/powerlines/src/lib/build/esbuild.cjs +14 -0
- package/dist/powerlines/src/lib/build/esbuild.mjs +14 -0
- package/dist/powerlines/src/lib/entry.cjs +1 -0
- package/dist/powerlines/src/lib/entry.mjs +1 -0
- package/dist/powerlines/src/lib/logger.cjs +1 -0
- package/dist/powerlines/src/lib/logger.mjs +1 -0
- package/dist/powerlines/src/lib/utilities/bundle.cjs +1 -0
- package/dist/powerlines/src/lib/utilities/bundle.mjs +1 -0
- package/dist/powerlines/src/lib/utilities/file-header.cjs +10 -0
- package/dist/powerlines/src/lib/utilities/file-header.mjs +10 -0
- package/dist/powerlines/src/lib/utilities/resolve.cjs +1 -0
- package/dist/powerlines/src/lib/utilities/resolve.mjs +1 -0
- package/dist/powerlines/src/plugin-utils/helpers.cjs +1 -0
- package/dist/powerlines/src/plugin-utils/helpers.mjs +1 -0
- package/dist/powerlines/src/plugin-utils/paths.cjs +1 -0
- package/dist/powerlines/src/plugin-utils/paths.mjs +1 -0
- package/dist/powerlines/src/types/babel.d.cts +22 -0
- package/dist/powerlines/src/types/babel.d.mts +22 -0
- package/dist/powerlines/src/types/build.d.cts +139 -0
- package/dist/powerlines/src/types/build.d.mts +139 -0
- package/dist/powerlines/src/types/commands.d.cts +8 -0
- package/dist/powerlines/src/types/commands.d.mts +9 -0
- package/dist/powerlines/src/types/config.d.cts +356 -0
- package/dist/powerlines/src/types/config.d.mts +357 -0
- package/dist/powerlines/src/types/context.d.cts +358 -0
- package/dist/powerlines/src/types/context.d.mts +360 -0
- package/dist/powerlines/src/types/fs.d.cts +458 -0
- package/dist/powerlines/src/types/fs.d.mts +458 -0
- package/dist/powerlines/src/types/hooks.d.mts +2 -0
- package/dist/powerlines/src/types/plugin.d.cts +232 -0
- package/dist/powerlines/src/types/plugin.d.mts +232 -0
- package/dist/powerlines/src/types/resolved.d.cts +82 -0
- package/dist/powerlines/src/types/resolved.d.mts +82 -0
- package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
- package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
- package/dist/types/index.cjs +0 -1
- package/dist/types/index.d.cts +2 -3
- package/dist/types/index.d.mts +2 -3
- package/dist/types/index.mjs +1 -1
- package/dist/types/plugin.cjs +0 -1
- package/dist/types/plugin.d.cts +42 -1
- package/dist/types/plugin.d.mts +42 -1
- package/dist/types/plugin.mjs +1 -1
- package/dist/types/runtime.cjs +0 -1
- package/dist/types/runtime.d.cts +710 -1
- package/dist/types/runtime.d.mts +710 -1
- package/dist/types/runtime.mjs +1 -1
- package/package.json +7 -7
- package/dist/index-CmCelmEL.d.cts +0 -1
- package/dist/index-ColiPbLk.d.mts +0 -1
- package/dist/plugin-CU36jSR5.d.mts +0 -4211
- package/dist/plugin-DHXHjv16.cjs +0 -0
- package/dist/plugin-DxCv7BdD.d.cts +0 -4212
- package/dist/plugin-alze5tBm.mjs +0 -1
- package/dist/runtime-0ZpEtv0G.mjs +0 -1
- package/dist/runtime-B8LVkjWB.d.cts +0 -711
- package/dist/runtime-D4zTdSwv.cjs +0 -0
- package/dist/runtime-DPe0V01H.d.mts +0 -711
- package/dist/types-CBTc19th.cjs +0 -0
- package/dist/types-CZFQnkin.mjs +0 -1
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { Reflection } from "../../../deepkit/src/types.mjs";
|
|
2
|
+
import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig } from "../../../plugin-babel/src/types/plugin.mjs";
|
|
3
|
+
import "../../../plugin-babel/src/types/index.mjs";
|
|
4
|
+
import { EnvInterface, SecretsInterface } from "./runtime.mjs";
|
|
5
|
+
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
6
|
+
import { DotenvParseOutput } from "@stryke/env/types";
|
|
7
|
+
import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
8
|
+
|
|
9
|
+
//#region ../plugin-env/src/types/plugin.d.ts
|
|
10
|
+
type EnvPluginOptions = Omit<DotenvConfiguration, "types"> & {
|
|
11
|
+
/**
|
|
12
|
+
* 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"`.
|
|
13
|
+
*/
|
|
14
|
+
types?: TypeDefinitionParameter;
|
|
15
|
+
/**
|
|
16
|
+
* 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"`.
|
|
17
|
+
*/
|
|
18
|
+
secrets?: TypeDefinitionParameter;
|
|
19
|
+
/**
|
|
20
|
+
* An additional prefix (or list of additional prefixes) to apply to the environment variables
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.
|
|
24
|
+
*/
|
|
25
|
+
prefix?: string | string[];
|
|
26
|
+
/**
|
|
27
|
+
* Should the plugin inject the env variables in the source code with their values?
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* This option is set to `true` when building an application project.
|
|
31
|
+
*
|
|
32
|
+
* @defaultValue false
|
|
33
|
+
*/
|
|
34
|
+
inject?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The default configuration to use when loading environment variables.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* 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.
|
|
40
|
+
*/
|
|
41
|
+
defaultConfig?: Children;
|
|
42
|
+
/**
|
|
43
|
+
* Babel configuration options to use when injecting environment variables into the source code.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* 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.
|
|
47
|
+
*/
|
|
48
|
+
babel?: BabelPluginOptions;
|
|
49
|
+
};
|
|
50
|
+
type EnvPluginUserConfig = BabelPluginUserConfig & {
|
|
51
|
+
env: EnvPluginOptions;
|
|
52
|
+
};
|
|
53
|
+
type EnvPluginResolvedConfig = BabelPluginResolvedConfig & {
|
|
54
|
+
env: Required<Pick<DotenvConfiguration, "additionalFiles">> & Required<Pick<EnvPluginOptions, "defaultConfig">> & {
|
|
55
|
+
/**
|
|
56
|
+
* The type definition for the expected env variable parameters
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* This value is parsed from the {@link EnvPluginOptions.types} option.
|
|
60
|
+
*/
|
|
61
|
+
types: TypeDefinition;
|
|
62
|
+
/**
|
|
63
|
+
* The type definition for the expected env secret parameters
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* This value is parsed from the {@link EnvPluginOptions.secrets} option.
|
|
67
|
+
*/
|
|
68
|
+
secrets: TypeDefinition;
|
|
69
|
+
/**
|
|
70
|
+
* Should the plugin inject the env variables in the source code with their values?
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* This value is the result of reflecting the {@link EnvPluginOptions.inject} option.
|
|
74
|
+
*/
|
|
75
|
+
inject: EnvPluginOptions["inject"];
|
|
76
|
+
/**
|
|
77
|
+
* The prefix used for environment variables
|
|
78
|
+
*
|
|
79
|
+
* @remarks
|
|
80
|
+
* This value is used to filter environment variables that are loaded from the .env file and the process environment.
|
|
81
|
+
*/
|
|
82
|
+
prefix: string[];
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig> {
|
|
86
|
+
env: {
|
|
87
|
+
/**
|
|
88
|
+
* The type definitions reflection for the env variables and secrets
|
|
89
|
+
*
|
|
90
|
+
* @remarks
|
|
91
|
+
* These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.
|
|
92
|
+
*/
|
|
93
|
+
types: {
|
|
94
|
+
/**
|
|
95
|
+
* The type definitions for the expected env variables
|
|
96
|
+
*/
|
|
97
|
+
env: Reflection;
|
|
98
|
+
/**
|
|
99
|
+
* The type definitions for the expected env secrets
|
|
100
|
+
*/
|
|
101
|
+
secrets: Reflection;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* The current **used** environment variables and secrets reflection
|
|
105
|
+
*
|
|
106
|
+
* @remarks
|
|
107
|
+
* 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.
|
|
108
|
+
*/
|
|
109
|
+
used: {
|
|
110
|
+
/**
|
|
111
|
+
* The current env variables reflection
|
|
112
|
+
*/
|
|
113
|
+
env: Reflection<EnvInterface>;
|
|
114
|
+
/**
|
|
115
|
+
* The current env secrets reflection
|
|
116
|
+
*/
|
|
117
|
+
secrets: Reflection<SecretsInterface>;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* The parsed .env configuration object
|
|
121
|
+
*
|
|
122
|
+
* @remarks
|
|
123
|
+
* 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}
|
|
124
|
+
*/
|
|
125
|
+
parsed: DotenvParseOutput;
|
|
126
|
+
/**
|
|
127
|
+
* The injected environment variables and secrets reflection
|
|
128
|
+
*
|
|
129
|
+
* @remarks
|
|
130
|
+
* This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.
|
|
131
|
+
*/
|
|
132
|
+
injected: Reflection;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
136
|
+
export { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig };
|