@powerlines/plugin-env 0.15.144 → 0.15.146
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/babel/index.d.cts +3 -3
- package/dist/babel/index.d.mts +3 -3
- package/dist/babel/plugin.d.cts +3 -3
- package/dist/babel/plugin.d.mts +3 -3
- package/dist/components/docs.cjs +1 -8
- package/dist/components/docs.d.cts +1 -1
- package/dist/components/docs.d.mts +1 -1
- package/dist/components/docs.mjs +1 -8
- package/dist/components/env.cjs +1 -3
- package/dist/components/env.d.cts +1 -1
- package/dist/components/env.d.mts +1 -1
- package/dist/components/env.mjs +1 -3
- package/dist/components/index.cjs +2 -4
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +2 -4
- package/dist/create-reflection-resource-3svZm2rY.d.cts +14 -0
- package/dist/create-reflection-resource-3svZm2rY.d.cts.map +1 -0
- package/dist/create-reflection-resource-CCpA76Yq.d.mts +14 -0
- package/dist/create-reflection-resource-CCpA76Yq.d.mts.map +1 -0
- package/dist/create-reflection-resource-D0QrD1Td.mjs +23 -0
- package/dist/create-reflection-resource-D0QrD1Td.mjs.map +1 -0
- package/dist/create-reflection-resource-d2zdTyOE.cjs +27 -0
- package/dist/{docs-DbRoWmL_.mjs → docs-B4Bd2HuK.mjs} +8 -11
- package/dist/docs-B4Bd2HuK.mjs.map +1 -0
- package/dist/{docs-B0d8pdIg.d.mts → docs-BAKwE4PJ.d.cts} +3 -1
- package/dist/docs-BAKwE4PJ.d.cts.map +1 -0
- package/dist/{docs-DMfzQuvP.d.cts → docs-CVf-w8oz.d.mts} +3 -1
- package/dist/docs-CVf-w8oz.d.mts.map +1 -0
- package/dist/{docs-B-SDRHeg.cjs → docs-ClXTdyjQ.cjs} +6 -9
- package/dist/{env-BIyd8CTA.d.cts → env-D0KBPuAd.d.mts} +3 -1
- package/dist/env-D0KBPuAd.d.mts.map +1 -0
- package/dist/{env-BKmI7DyR.d.mts → env-DwM7pJm7.d.cts} +3 -1
- package/dist/env-DwM7pJm7.d.cts.map +1 -0
- package/dist/{env-R63eR4RP.cjs → env-iQh74nl2.cjs} +13 -18
- package/dist/{env-D9oCn-AS.mjs → env-z7LbFLP0.mjs} +15 -20
- package/dist/env-z7LbFLP0.mjs.map +1 -0
- package/dist/helpers/create-reflection-resource.cjs +2 -9
- package/dist/helpers/create-reflection-resource.d.cts +2 -2
- package/dist/helpers/create-reflection-resource.d.mts +2 -2
- package/dist/helpers/create-reflection-resource.mjs +2 -9
- package/dist/helpers/index.cjs +2 -2
- package/dist/helpers/index.d.cts +2 -2
- package/dist/helpers/index.d.mts +2 -2
- package/dist/helpers/index.mjs +2 -2
- package/dist/index-Bdi8CvaN.d.cts.map +1 -1
- package/dist/index-Drhzdkqe.d.mts.map +1 -1
- package/dist/index.cjs +16 -8
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +16 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
- package/dist/create-reflection-resource-B3friIs9.mjs +0 -98
- package/dist/create-reflection-resource-B3friIs9.mjs.map +0 -1
- package/dist/create-reflection-resource-BJj83ii4.cjs +0 -103
- package/dist/create-reflection-resource-DSLbLsX2.d.cts +0 -16
- package/dist/create-reflection-resource-DSLbLsX2.d.cts.map +0 -1
- package/dist/create-reflection-resource-DwWJAo-G.d.mts +0 -16
- package/dist/create-reflection-resource-DwWJAo-G.d.mts.map +0 -1
- package/dist/docs-B0d8pdIg.d.mts.map +0 -1
- package/dist/docs-DMfzQuvP.d.cts.map +0 -1
- package/dist/docs-DbRoWmL_.mjs.map +0 -1
- package/dist/env-BIyd8CTA.d.cts.map +0 -1
- package/dist/env-BKmI7DyR.d.mts.map +0 -1
- package/dist/env-D9oCn-AS.mjs.map +0 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CNVrAnJR.cjs');
|
|
2
2
|
const require_defu = require('./defu-CrqNIh1A.cjs');
|
|
3
3
|
const require_load = require('./load-DPB0maqs.cjs');
|
|
4
|
-
const require_create_reflection_resource = require('./create-reflection-resource-BJj83ii4.cjs');
|
|
5
4
|
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
6
5
|
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
7
|
-
let __alloy_js_core = require("@alloy-js/core");
|
|
8
6
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
7
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
9
8
|
let __powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
10
9
|
let __alloy_js_typescript = require("@alloy-js/typescript");
|
|
11
10
|
let __powerlines_plugin_alloy_helpers_refkey = require("@powerlines/plugin-alloy/helpers/refkey");
|
|
@@ -13,7 +12,6 @@ let __powerlines_plugin_alloy_typescript_components_builtin_file = require("@pow
|
|
|
13
12
|
let __powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
|
14
13
|
let __powerlines_plugin_alloy_typescript_components_typescript_interface = require("@powerlines/plugin-alloy/typescript/components/typescript-interface");
|
|
15
14
|
let __powerlines_plugin_alloy_typescript_components_typescript_object = require("@powerlines/plugin-alloy/typescript/components/typescript-object");
|
|
16
|
-
let __stryke_type_checks_is_null = require("@stryke/type-checks/is-null");
|
|
17
15
|
|
|
18
16
|
//#region src/components/env.tsx
|
|
19
17
|
/**
|
|
@@ -21,8 +19,7 @@ let __stryke_type_checks_is_null = require("@stryke/type-checks/is-null");
|
|
|
21
19
|
*/
|
|
22
20
|
function EnvTypeDefinition(props) {
|
|
23
21
|
const [{ defaultValue, reflection }] = (0, __alloy_js_core.splitProps)(props, ["defaultValue", "reflection"]);
|
|
24
|
-
const context = (0, __powerlines_plugin_alloy_core_contexts_context.
|
|
25
|
-
if (!context) return null;
|
|
22
|
+
const context = (0, __powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
|
|
26
23
|
return [
|
|
27
24
|
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_typescript_interface.TypeScriptInterface, {
|
|
28
25
|
name: " EnvBase",
|
|
@@ -54,7 +51,6 @@ function EnvTypeDefinition(props) {
|
|
|
54
51
|
}
|
|
55
52
|
function ConfigPropertyConditional(props) {
|
|
56
53
|
const [{ context, name }] = (0, __alloy_js_core.splitProps)(props, ["context", "name"]);
|
|
57
|
-
if (!context) return null;
|
|
58
54
|
return __alloy_js_core.code`propertyName === "${name}" || propertyName.replace(/^(${context.config.env.prefix.sort((a, b) => a.startsWith(b) ? -1 : b.startsWith(a) ? 1 : a.localeCompare(b)).map((prefix) => `${prefix.replace(/_$/, "")}_`).join("|")})/g, "").toLowerCase().replace(/[\\s\\-_]+/g, "") === "${name.toLowerCase().replace(/[\s\-_]+/g, "")}"`;
|
|
59
55
|
}
|
|
60
56
|
function ConfigPropertyGet(props) {
|
|
@@ -63,7 +59,6 @@ function ConfigPropertyGet(props) {
|
|
|
63
59
|
"property",
|
|
64
60
|
"index"
|
|
65
61
|
]);
|
|
66
|
-
if (!context) return null;
|
|
67
62
|
return [index === 0 ? (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.IfStatement, {
|
|
68
63
|
get condition() {
|
|
69
64
|
return [(0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
|
|
@@ -128,7 +123,6 @@ function ConfigPropertySet(props) {
|
|
|
128
123
|
"property",
|
|
129
124
|
"index"
|
|
130
125
|
]);
|
|
131
|
-
if (!context) return null;
|
|
132
126
|
return [index === 0 ? (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.IfStatement, {
|
|
133
127
|
get condition() {
|
|
134
128
|
return [(0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
|
|
@@ -200,19 +194,22 @@ const envSerializerRefkey = (0, __powerlines_plugin_alloy_helpers_refkey.refkey)
|
|
|
200
194
|
* Generates the environment configuration module for the Powerlines project.
|
|
201
195
|
*/
|
|
202
196
|
function EnvBuiltin(props) {
|
|
203
|
-
const [{ defaultConfig, children }, rest] = (0, __alloy_js_core.splitProps)(props, [
|
|
204
|
-
|
|
197
|
+
const [{ defaultConfig, reflection, children }, rest] = (0, __alloy_js_core.splitProps)(props, [
|
|
198
|
+
"defaultConfig",
|
|
199
|
+
"reflection",
|
|
200
|
+
"children"
|
|
201
|
+
]);
|
|
202
|
+
const context = (0, __powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
|
|
205
203
|
const defaultValue = (0, __alloy_js_core.computed)(() => context && require_load.loadEnvFromContext(context, process.env));
|
|
206
|
-
const reflection = require_create_reflection_resource.createReflectionResource(context);
|
|
207
204
|
const envInstance = (0, __alloy_js_core.computed)(() => {
|
|
208
205
|
return new __powerlines_deepkit_vendor_type.ReflectionClass({
|
|
209
206
|
kind: __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
|
|
210
207
|
description: `The initial environment configuration state for the ${(0, __stryke_string_format_title_case.titleCase)(context?.config?.name)} project.`,
|
|
211
208
|
types: []
|
|
212
|
-
}, reflection
|
|
209
|
+
}, reflection);
|
|
213
210
|
});
|
|
214
|
-
const reflectionGetProperties = (0, __alloy_js_core.computed)(() => reflection
|
|
215
|
-
const reflectionSetProperties = (0, __alloy_js_core.computed)(() => reflection
|
|
211
|
+
const reflectionGetProperties = (0, __alloy_js_core.computed)(() => reflection?.getProperties().filter((property) => !property.isIgnored()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())) ?? []);
|
|
212
|
+
const reflectionSetProperties = (0, __alloy_js_core.computed)(() => reflection?.getProperties().filter((property) => !property.isIgnored() && !property.isReadonly()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())) ?? []);
|
|
216
213
|
return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_builtin_file.BuiltinFile, (0, __alloy_js_core_jsx_runtime.mergeProps)({
|
|
217
214
|
id: "env",
|
|
218
215
|
description: "The environment configuration module provides an interface to define environment configuration parameters."
|
|
@@ -235,7 +232,7 @@ function EnvBuiltin(props) {
|
|
|
235
232
|
return [
|
|
236
233
|
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
237
234
|
get when() {
|
|
238
|
-
return
|
|
235
|
+
return Boolean(reflection);
|
|
239
236
|
},
|
|
240
237
|
get children() {
|
|
241
238
|
return [
|
|
@@ -243,9 +240,7 @@ function EnvBuiltin(props) {
|
|
|
243
240
|
get defaultValue() {
|
|
244
241
|
return defaultValue.value;
|
|
245
242
|
},
|
|
246
|
-
|
|
247
|
-
return reflection.data;
|
|
248
|
-
}
|
|
243
|
+
reflection
|
|
249
244
|
}),
|
|
250
245
|
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
251
246
|
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { t as defu } from "./defu-DV5Grr85.mjs";
|
|
2
2
|
import { n as loadEnvFromContext } from "./load-Dr5ybfL7.mjs";
|
|
3
|
-
import { t as createReflectionResource } from "./create-reflection-resource-B3friIs9.mjs";
|
|
4
3
|
import { ReflectionClass, ReflectionKind } from "@powerlines/deepkit/vendor/type";
|
|
5
4
|
import { titleCase } from "@stryke/string-format/title-case";
|
|
6
|
-
import { For, Show, code, computed, splitProps } from "@alloy-js/core";
|
|
7
5
|
import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
8
|
-
import {
|
|
6
|
+
import { For, Show, code, computed, splitProps } from "@alloy-js/core";
|
|
7
|
+
import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
9
8
|
import { ClassDeclaration, ClassMethod, ElseIfClause, FunctionDeclaration, IfStatement, NewExpression, TypeDeclaration, VarDeclaration } from "@alloy-js/typescript";
|
|
10
9
|
import { refkey } from "@powerlines/plugin-alloy/helpers/refkey";
|
|
11
10
|
import { BuiltinFile } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
|
|
12
11
|
import { TSDoc, TSDocExample, TSDocLink, TSDocParam, TSDocRemarks, TSDocReturns, TSDocThrows } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
|
|
13
12
|
import { TypeScriptInterface } from "@powerlines/plugin-alloy/typescript/components/typescript-interface";
|
|
14
13
|
import { TypescriptObject } from "@powerlines/plugin-alloy/typescript/components/typescript-object";
|
|
15
|
-
import { isNull } from "@stryke/type-checks/is-null";
|
|
16
14
|
|
|
17
15
|
//#region src/components/env.tsx
|
|
18
16
|
/**
|
|
@@ -20,8 +18,7 @@ import { isNull } from "@stryke/type-checks/is-null";
|
|
|
20
18
|
*/
|
|
21
19
|
function EnvTypeDefinition(props) {
|
|
22
20
|
const [{ defaultValue, reflection }] = splitProps(props, ["defaultValue", "reflection"]);
|
|
23
|
-
const context =
|
|
24
|
-
if (!context) return null;
|
|
21
|
+
const context = usePowerlines();
|
|
25
22
|
return [
|
|
26
23
|
createComponent(TypeScriptInterface, {
|
|
27
24
|
name: " EnvBase",
|
|
@@ -53,7 +50,6 @@ function EnvTypeDefinition(props) {
|
|
|
53
50
|
}
|
|
54
51
|
function ConfigPropertyConditional(props) {
|
|
55
52
|
const [{ context, name }] = splitProps(props, ["context", "name"]);
|
|
56
|
-
if (!context) return null;
|
|
57
53
|
return code`propertyName === "${name}" || propertyName.replace(/^(${context.config.env.prefix.sort((a, b) => a.startsWith(b) ? -1 : b.startsWith(a) ? 1 : a.localeCompare(b)).map((prefix) => `${prefix.replace(/_$/, "")}_`).join("|")})/g, "").toLowerCase().replace(/[\\s\\-_]+/g, "") === "${name.toLowerCase().replace(/[\s\-_]+/g, "")}"`;
|
|
58
54
|
}
|
|
59
55
|
function ConfigPropertyGet(props) {
|
|
@@ -62,7 +58,6 @@ function ConfigPropertyGet(props) {
|
|
|
62
58
|
"property",
|
|
63
59
|
"index"
|
|
64
60
|
]);
|
|
65
|
-
if (!context) return null;
|
|
66
61
|
return [index === 0 ? createComponent(IfStatement, {
|
|
67
62
|
get condition() {
|
|
68
63
|
return [createComponent(ConfigPropertyConditional, {
|
|
@@ -127,7 +122,6 @@ function ConfigPropertySet(props) {
|
|
|
127
122
|
"property",
|
|
128
123
|
"index"
|
|
129
124
|
]);
|
|
130
|
-
if (!context) return null;
|
|
131
125
|
return [index === 0 ? createComponent(IfStatement, {
|
|
132
126
|
get condition() {
|
|
133
127
|
return [createComponent(ConfigPropertyConditional, {
|
|
@@ -199,19 +193,22 @@ const envSerializerRefkey = refkey("EnvSerializer");
|
|
|
199
193
|
* Generates the environment configuration module for the Powerlines project.
|
|
200
194
|
*/
|
|
201
195
|
function EnvBuiltin(props) {
|
|
202
|
-
const [{ defaultConfig, children }, rest] = splitProps(props, [
|
|
203
|
-
|
|
196
|
+
const [{ defaultConfig, reflection, children }, rest] = splitProps(props, [
|
|
197
|
+
"defaultConfig",
|
|
198
|
+
"reflection",
|
|
199
|
+
"children"
|
|
200
|
+
]);
|
|
201
|
+
const context = usePowerlines();
|
|
204
202
|
const defaultValue = computed(() => context && loadEnvFromContext(context, process.env));
|
|
205
|
-
const reflection = createReflectionResource(context);
|
|
206
203
|
const envInstance = computed(() => {
|
|
207
204
|
return new ReflectionClass({
|
|
208
205
|
kind: ReflectionKind.objectLiteral,
|
|
209
206
|
description: `The initial environment configuration state for the ${titleCase(context?.config?.name)} project.`,
|
|
210
207
|
types: []
|
|
211
|
-
}, reflection
|
|
208
|
+
}, reflection);
|
|
212
209
|
});
|
|
213
|
-
const reflectionGetProperties = computed(() => reflection
|
|
214
|
-
const reflectionSetProperties = computed(() => reflection
|
|
210
|
+
const reflectionGetProperties = computed(() => reflection?.getProperties().filter((property) => !property.isIgnored()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())) ?? []);
|
|
211
|
+
const reflectionSetProperties = computed(() => reflection?.getProperties().filter((property) => !property.isIgnored() && !property.isReadonly()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())) ?? []);
|
|
215
212
|
return createComponent(BuiltinFile, mergeProps({
|
|
216
213
|
id: "env",
|
|
217
214
|
description: "The environment configuration module provides an interface to define environment configuration parameters."
|
|
@@ -234,7 +231,7 @@ function EnvBuiltin(props) {
|
|
|
234
231
|
return [
|
|
235
232
|
createComponent(Show, {
|
|
236
233
|
get when() {
|
|
237
|
-
return
|
|
234
|
+
return Boolean(reflection);
|
|
238
235
|
},
|
|
239
236
|
get children() {
|
|
240
237
|
return [
|
|
@@ -242,9 +239,7 @@ function EnvBuiltin(props) {
|
|
|
242
239
|
get defaultValue() {
|
|
243
240
|
return defaultValue.value;
|
|
244
241
|
},
|
|
245
|
-
|
|
246
|
-
return reflection.data;
|
|
247
|
-
}
|
|
242
|
+
reflection
|
|
248
243
|
}),
|
|
249
244
|
createIntrinsic("hbr", {}),
|
|
250
245
|
createIntrinsic("hbr", {})
|
|
@@ -584,4 +579,4 @@ function EnvBuiltin(props) {
|
|
|
584
579
|
|
|
585
580
|
//#endregion
|
|
586
581
|
export { EnvTypeDefinition as n, EnvBuiltin as t };
|
|
587
|
-
//# sourceMappingURL=env-
|
|
582
|
+
//# sourceMappingURL=env-z7LbFLP0.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-z7LbFLP0.mjs","names":["code","computed","For","Show","splitProps","ClassDeclaration","ClassMethod","ElseIfClause","FunctionDeclaration","IfStatement","NewExpression","TypeDeclaration","VarDeclaration","ReflectionClass","ReflectionKind","usePowerlines","refkey","BuiltinFile","TSDoc","TSDocExample","TSDocLink","TSDocParam","TSDocRemarks","TSDocReturns","TSDocThrows","TypeScriptInterface","TypescriptObject","titleCase","defu","loadEnvFromContext","EnvTypeDefinition","props","defaultValue","reflection","context","_$createComponent","name","_$createIntrinsic","heading","children","config","env","prefix","map","replace","join","ConfigPropertyConditional","sort","a","b","startsWith","localeCompare","toLowerCase","ConfigPropertyGet","property","index","condition","getNameAsString","when","_$memo","getAlias","length","each","joiner","alias","ConfigPropertySet","createEnvRefkey","envRefkey","envSerializerRefkey","EnvBuiltin","defaultConfig","rest","process","envInstance","result","kind","objectLiteral","description","types","reflectionGetProperties","getProperties","filter","isIgnored","reflectionSetProperties","isReadonly","_$mergeProps","id","imports","Boolean","value","type","doc","initializer","args","target","entryPath","async","parameters","optional","default","returnType","ender"],"sources":["../src/components/env.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n code,\n computed,\n For,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n ClassDeclaration,\n ClassMethod,\n ElseIfClause,\n FunctionDeclaration,\n IfStatement,\n NewExpression,\n TypeDeclaration,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport {\n ReflectionClass,\n ReflectionKind,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { refkey } from \"@powerlines/plugin-alloy/helpers/refkey\";\nimport { ComponentProps } from \"@powerlines/plugin-alloy/types/components\";\nimport {\n BuiltinFile,\n BuiltinFileProps\n} from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport {\n TSDoc,\n TSDocExample,\n TSDocLink,\n TSDocParam,\n TSDocRemarks,\n TSDocReturns,\n TSDocThrows\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport {\n TypeScriptInterface,\n TypeScriptInterfaceProps\n} from \"@powerlines/plugin-alloy/typescript/components/typescript-interface\";\nimport { TypescriptObject } from \"@powerlines/plugin-alloy/typescript/components/typescript-object\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport defu from \"defu\";\nimport { loadEnvFromContext } from \"../helpers/load\";\nimport { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Generates the environment configuration typescript definition for the Powerlines project.\n */\nexport function EnvTypeDefinition(\n props: Omit<TypeScriptInterfaceProps, \"name\">\n) {\n const [{ defaultValue, reflection }] = splitProps(props, [\n \"defaultValue\",\n \"reflection\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n\n return (\n <>\n <TypeScriptInterface\n name=\" EnvBase\"\n defaultValue={defaultValue}\n reflection={reflection}\n export={true}\n />\n <hbr />\n <hbr />\n\n <TSDoc heading=\"The environment configuration object with prefixed keys.\">\n <TSDocRemarks>\n {`The \\`Env\\` type extends the \\`EnvBase\\` interface by including additional keys that are prefixed according to the project's configuration. This allows for flexibility in accessing environment variables with different naming conventions.`}\n </TSDocRemarks>\n </TSDoc>\n <TypeDeclaration name=\"Env\" export={true}>\n {code` {\n [Key in keyof EnvBase as Key ${context.config.env.prefix\n .map(prefix => `| \\`${prefix.replace(/_$/g, \"\")}_\\${Key}\\``)\n .join(\" \")}]: EnvBase[Key];\n}\n`}\n </TypeDeclaration>\n <hbr />\n <hbr />\n </>\n );\n}\n\ninterface ConfigPropertyConditionalProps extends ComponentProps {\n context: EnvPluginContext;\n name: string;\n}\n\nfunction ConfigPropertyConditional(props: ConfigPropertyConditionalProps) {\n const [{ context, name }] = splitProps(props, [\"context\", \"name\"]);\n\n return code`propertyName === \"${name}\" || propertyName.replace(/^(${context.config.env.prefix\n .sort((a, b) =>\n a.startsWith(b) ? -1 : b.startsWith(a) ? 1 : a.localeCompare(b)\n )\n .map(prefix => `${prefix.replace(/_$/, \"\")}_`)\n .join(\"|\")})/g, \"\").toLowerCase().replace(/[\\\\s\\\\-_]+/g, \"\") === \"${name\n .toLowerCase()\n .replace(/[\\s\\-_]+/g, \"\")}\"`;\n}\n\ninterface ConfigPropertyProps extends ComponentProps {\n index: number;\n context: EnvPluginContext;\n property: ReflectionProperty;\n}\n\nfunction ConfigPropertyGet(props: ConfigPropertyProps) {\n const [{ context, property, index }] = splitProps(props, [\n \"context\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${property.getNameAsString()}\"];`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${property.getNameAsString()}\"];`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nfunction ConfigPropertySet(props: ConfigPropertyProps) {\n const [{ context, property, index }] = splitProps(props, [\n \"context\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${property.getNameAsString()}\"] = newValue;\n return true;\n`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${property.getNameAsString()}\"] = newValue;\n return true;\n`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nexport interface EnvBuiltinProps extends Omit<BuiltinFileProps, \"id\"> {\n defaultConfig?: Children;\n reflection: ReflectionClass<any>;\n}\n\nconst createEnvRefkey = refkey(\"createEnv\");\nconst envRefkey = refkey(\"env\");\nconst envSerializerRefkey = refkey(\"EnvSerializer\");\n\n/**\n * Generates the environment configuration module for the Powerlines project.\n */\nexport function EnvBuiltin(props: EnvBuiltinProps) {\n const [{ defaultConfig, reflection, children }, rest] = splitProps(props, [\n \"defaultConfig\",\n \"reflection\",\n \"children\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n const defaultValue = computed(\n () => context && loadEnvFromContext(context, process.env)\n );\n\n const envInstance = computed(() => {\n const result = new ReflectionClass(\n {\n kind: ReflectionKind.objectLiteral,\n description: `The initial environment configuration state for the ${titleCase(\n context?.config?.name\n )} project.`,\n types: []\n },\n reflection\n );\n\n return result;\n });\n\n const reflectionGetProperties = computed(\n () =>\n reflection\n ?.getProperties()\n .filter(property => !property.isIgnored())\n .sort((a, b) =>\n a.getNameAsString().localeCompare(b.getNameAsString())\n ) ?? []\n );\n const reflectionSetProperties = computed(\n () =>\n reflection\n ?.getProperties()\n .filter(property => !property.isIgnored() && !property.isReadonly())\n .sort((a, b) =>\n a.getNameAsString().localeCompare(b.getNameAsString())\n ) ?? []\n );\n\n return (\n <BuiltinFile\n id=\"env\"\n description=\"The environment configuration module provides an interface to define environment configuration parameters.\"\n {...rest}\n imports={defu(\n {\n \"@powerlines/deepkit/vendor/type\": [\n \"stringify\",\n \"serializer\",\n \"serializeFunction\",\n \"deserializeFunction\",\n \"ReflectionKind\",\n \"Serializer\",\n \"TemplateState\",\n \"Type\",\n \"TypeProperty\",\n \"TypePropertySignature\"\n ]\n },\n rest.imports ?? {}\n )}>\n <Show when={Boolean(reflection)}>\n <EnvTypeDefinition\n defaultValue={defaultValue.value}\n reflection={reflection}\n />\n <hbr />\n <hbr />\n </Show>\n\n <TypescriptObject\n name=\"initialEnv\"\n type=\"Partial<EnvBase>\"\n defaultValue={defaultValue}\n reflection={envInstance}\n export={true}\n const={true}\n doc=\"The initial environment configuration object values for the runtime.\"\n />\n <hbr />\n <hbr />\n\n <TSDoc heading=\"The environment configuration serializer for the Powerlines application.\">\n <TSDocLink>\n {`https://deepkit.io/docs/serialization/serializers`}\n </TSDocLink>\n <TSDocLink>\n {`https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918`}\n </TSDocLink>\n <TSDocRemarks>\n {`This serializer is used to serialize and deserialize the Powerlines environment configuration.`}\n </TSDocRemarks>\n </TSDoc>\n <ClassDeclaration\n refkey={envSerializerRefkey}\n name=\"EnvSerializer\"\n extends=\"Serializer\"\n export={true}>\n <ClassMethod\n name=\"constructor\"\n public={true}\n doc=\"Initializes a new instance of the `EnvSerializer` class.\">\n {code`\n super(\"env\");\n\n this.deserializeRegistry.register(\n ReflectionKind.boolean,\n (type: Type, state: TemplateState) => {\n state.addSetter(\n \\`typeof \\${state.accessor.toString()} !== \"boolean\" ? \\${state.accessor.toString()} === 1 || \\${state.accessor.toString()} === \"1\" || \\${state.accessor.toString()}.toLowerCase() === \"t\" || \\${state.accessor.toString()}.toLowerCase() === \"true\" || \\${state.accessor.toString()}.toLowerCase() === \"y\" || \\${state.accessor.toString()}.toLowerCase() === \"yes\" : \\${state.accessor.toString()}\\`\n );\n }\n );\n`}\n </ClassMethod>\n </ClassDeclaration>\n <hbr />\n <hbr />\n\n <TSDoc heading=\"A {@link EnvSerializer | environment configuration serializer} instance for the Powerlines application.\">\n <TSDocLink>\n {`https://deepkit.io/docs/serialization/serializers`}\n </TSDocLink>\n <TSDocLink>\n {`https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918`}\n </TSDocLink>\n <TSDocRemarks>\n {`This serializer is used to serialize and deserialize the Powerlines environment configuration.`}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n name=\"envSerializer\"\n export={false}\n const={true}\n initializer={<NewExpression args={[]} target=\"EnvSerializer\" />}\n />\n <hbr />\n <hbr />\n\n <TSDoc heading=\"Serialize a environment configuration object to JSON data objects (not a JSON string).\">\n <TSDocRemarks>\n {`The resulting JSON object can be stringified using \\`JSON.stringify()\\`.`}\n </TSDocRemarks>\n <TSDocExample>{`const json = serializeEnv(env);`}</TSDocExample>\n <TSDocThrows>\n {`ValidationError when serialization or validation fails.`}\n </TSDocThrows>\n </TSDoc>\n <VarDeclaration\n name=\"serializeEnv\"\n export={true}\n const={true}\n initializer={\"serializeFunction<EnvBase>(envSerializer)\"}\n />\n <hbr />\n <hbr />\n\n <TSDoc heading=\"Deserialize a environment configuration object from JSON data objects to JavaScript objects, without running any validators.\">\n <TSDocRemarks>\n {`Types that are already correct will be used as-is.`}\n </TSDocRemarks>\n <TSDocExample>{`const env = deserializeEnv(json);`}</TSDocExample>\n <TSDocThrows>\n {`ValidationError when deserialization fails.`}\n </TSDocThrows>\n </TSDoc>\n <VarDeclaration\n name=\"deserializeEnv\"\n export={true}\n const={true}\n initializer=\"deserializeFunction<EnvBase>(envSerializer)\"\n />\n <hbr />\n <hbr />\n\n <TSDoc heading=\"Initializes the Powerlines environment configuration module.\">\n <TSDocRemarks>\n {`This function initializes the Powerlines environment configuration object.`}\n </TSDocRemarks>\n <TSDocParam name=\"environmentConfig\">\n {`The dynamic/runtime configuration - this could include the current environment variables or any other environment-specific settings provided by the runtime.`}\n </TSDocParam>\n <TSDocReturns>\n {`The initialized Powerlines configuration object.`}\n </TSDocReturns>\n </TSDoc>\n <Show when={Boolean(context?.entryPath)}>\n <FunctionDeclaration\n refkey={createEnvRefkey}\n async={false}\n export={true}\n name=\"createEnv\"\n parameters={[\n {\n name: \"environmentConfig\",\n type: `Partial<Env>`,\n optional: false,\n default: \"{}\"\n }\n ]}\n returnType=\"Env\">\n {code`\n return new Proxy<Env>(\n deserializeEnv({\n ...initialEnv,\n ...environmentConfig\n }) as Env,\n {\n get: (target: EnvBase, propertyName: string) => { `}\n <hbr />\n\n <For each={reflectionGetProperties}>\n {(property: ReflectionProperty, index: number) => (\n <ConfigPropertyGet\n index={index}\n context={context}\n property={property}\n />\n )}\n </For>\n {code`\n return undefined;\n }, `}\n\n <hbr />\n <hbr />\n {code` set: (target: EnvBase, propertyName: string, newValue: any) => { `}\n <hbr />\n\n <For each={reflectionSetProperties} ender={code` else `}>\n {(property: ReflectionProperty, index: number) => (\n <ConfigPropertySet\n index={index}\n context={context}\n property={property}\n />\n )}\n </For>\n\n <hbr />\n {code`return false;\n }\n }\n );\n`}\n </FunctionDeclaration>\n </Show>\n <hbr />\n <hbr />\n <hbr />\n\n <TSDoc heading=\"The environment configuration object.\">\n <TSDocRemarks>\n {`This object provides access to the environment configuration parameters in the application runtime.`}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n refkey={envRefkey}\n name=\"env\"\n type=\"Env\"\n export={true}\n const={true}\n initializer={\n <>{code`createEnv(${defaultConfig || \"{}\"} as Partial<Env>);`}</>\n }\n />\n <hbr />\n <hbr />\n\n <VarDeclaration\n export\n const\n name=\"isCI\"\n doc=\"Detect if the application is running in a continuous integration (CI) environment.\"\n initializer={code`Boolean(\n env.CI ||\n env.RUN_ID ||\n env.AGOLA_GIT_REF ||\n env.AC_APPCIRCLE ||\n env.APPVEYOR ||\n env.CODEBUILD ||\n env.TF_BUILD ||\n env.bamboo_planKey ||\n env.BITBUCKET_COMMIT ||\n env.BITRISE_IO ||\n env.BUDDY_WORKSPACE_ID ||\n env.BUILDKITE ||\n env.CIRCLECI ||\n env.CIRRUS_CI ||\n env.CF_BUILD_ID ||\n env.CM_BUILD_ID ||\n env.CI_NAME ||\n env.DRONE ||\n env.DSARI ||\n env.EARTHLY_CI ||\n env.EAS_BUILD ||\n env.GERRIT_PROJECT ||\n env.GITEA_ACTIONS ||\n env.GITHUB_ACTIONS ||\n env.GITLAB_CI ||\n env.GOCD ||\n env.BUILDER_OUTPUT ||\n env.HARNESS_BUILD_ID ||\n env.JENKINS_URL ||\n env.LAYERCI ||\n env.MAGNUM ||\n env.NETLIFY ||\n env.NEVERCODE ||\n env.PROW_JOB_ID ||\n env.RELEASE_BUILD_ID ||\n env.RENDER ||\n env.SAILCI ||\n env.HUDSON ||\n env.SCREWDRIVER ||\n env.SEMAPHORE ||\n env.SOURCEHUT ||\n env.STRIDER ||\n env.TASK_ID ||\n env.RUN_ID ||\n env.TEAMCITY_VERSION ||\n env.TRAVIS ||\n env.VELA ||\n env.NOW_BUILDER ||\n env.APPCENTER_BUILD_ID ||\n env.CI_XCODE_PROJECT ||\n env.XCS || false\n );\n `}\n />\n <hbr />\n <hbr />\n\n <TSDoc heading=\"Detect the \\`mode\\` of the current runtime environment.\">\n <TSDocRemarks>\n {code`The \\`mode\\` is determined by the \\`MODE\\` environment variable, or falls back to the \\`NEXT_PUBLIC_VERCEL_ENV\\`, \\`NODE_ENV\\`, or defaults to \\`production\\`. While the value can potentially be any string, it is generally recommended to only allow a value in the following list:\n - \\`production\\`\n - \\`test\\`\n - \\`development\\`\n `}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n export\n const\n name=\"mode\"\n initializer={code`String(env.MODE) || \"production\"; `}\n />\n <hbr />\n <hbr />\n\n <VarDeclaration\n export\n const\n name=\"isProduction\"\n doc='Detect if the application is running in `\"production\"` mode'\n initializer={code`[\"prd\", \"prod\", \"production\"].includes(mode.toLowerCase()); `}\n />\n <hbr />\n <hbr />\n\n <VarDeclaration\n export\n const\n name=\"isTest\"\n doc='Detect if the application is running in `\"test\"` mode'\n initializer={code`[\"tst\", \"test\", \"testing\", \"stg\", \"stage\", \"staging\"].includes(mode.toLowerCase()) || env.TEST; `}\n />\n <hbr />\n <hbr />\n\n <VarDeclaration\n export\n const\n name=\"isDevelopment\"\n doc='Detect if the application is running in `\"development\"` mode'\n initializer={code`[\"dev\", \"development\"].includes(mode.toLowerCase()); `}\n />\n <hbr />\n <hbr />\n\n <VarDeclaration\n export\n const\n name=\"isDebug\"\n doc=\"Detect if the application is currently being debugged\"\n initializer={code`Boolean(isDevelopment && env.DEBUG); `}\n />\n <hbr />\n <hbr />\n <Show when={Boolean(children)}>{children}</Show>\n </BuiltinFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAsEA,SAAgB8B,kBACdC,OACA;CACA,MAAM,CAAC,EAAEC,cAAcC,gBAAgB7B,WAAW2B,OAAO,CACvD,gBACA,aACD,CAAC;CAEF,MAAMG,UAAUnB,eAAiC;AAEjD,QAAA;EAAAoB,gBAEKV,qBAAmB;GAClBW,MAAI;GACUJ;GACFC;GAAU,UACd;GAAI,CAAA;EAAAI,gBAAA,OAAA,EAAA,CAAA;EAAAA,gBAAA,OAAA,EAAA,CAAA;EAAAF,gBAKbjB,OAAK;GAACoB,SAAO;GAAA,IAAAC,WAAA;AAAA,WAAAJ,gBACXb,cAAY,EAAAiB,UACV,iPAA+O,CAAA;;GAAA,CAAA;EAAAJ,gBAGnPxB,iBAAe;GAACyB,MAAI;GAAA,UAAe;GAAI,IAAAG,WAAA;AAAA,WACrCvC,IAAI;mCACsBkC,QAAQM,OAAOC,IAAIC,OAC/CC,KAAID,WAAU,OAAOA,OAAOE,QAAQ,OAAO,GAAG,CAAA,YAAa,CAC3DC,KAAK,IAAI,CAAA;;;;GAEf,CAAA;EAAAR,gBAAA,OAAA,EAAA,CAAA;EAAAA,gBAAA,OAAA,EAAA,CAAA;EAAA;;AAaD,SAASS,0BAA0Bf,OAAuC;CACxE,MAAM,CAAC,EAAEG,SAASE,UAAUhC,WAAW2B,OAAO,CAAC,WAAW,OAAO,CAAC;AAElE,QAAO/B,IAAI,qBAAqBoC,KAAI,+BAAgCF,QAAQM,OAAOC,IAAIC,OACpFK,MAAMC,GAAGC,MACRD,EAAEE,WAAW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AA,EAAA,CAAA;IAAAF,gBAKtDvB,gBAAc;KAAA,UAAA;KAAA,SAAA;KAGbwB,MAAI;KACJuD,KAAG;KACHC,aAAa5F,IAAI;KAA8D,CAAA;IAAAqC,gBAAA,OAAA,EAAA,CAAA;IAAAA,gBAAA,OAAA,EAAA,CAAA;IAAAF,gBAKhFvB,gBAAc;KAAA,UAAA;KAAA,SAAA;KAGbwB,MAAI;KACJuD,KAAG;KACHC,aAAa5F,IAAI;KAAkG,CAAA;IAAAqC,gBAAA,OAAA,EAAA,CAAA;IAAAA,gBAAA,OAAA,EAAA,CAAA;IAAAF,gBAKpHvB,gBAAc;KAAA,UAAA;KAAA,SAAA;KAGbwB,MAAI;KACJuD,KAAG;KACHC,aAAa5F,IAAI;KAAuD,CAAA;IAAAqC,gBAAA,OAAA,EAAA,CAAA;IAAAA,gBAAA,OAAA,EAAA,CAAA;IAAAF,gBAKzEvB,gBAAc;KAAA,UAAA;KAAA,SAAA;KAGbwB,MAAI;KACJuD,KAAG;KACHC,aAAa5F,IAAI;KAAuC,CAAA;IAAAqC,gBAAA,OAAA,EAAA,CAAA;IAAAA,gBAAA,OAAA,EAAA,CAAA;IAAAF,gBAIzDhC,MAAI;KAAA,IAACuD,OAAI;AAAA,aAAE8B,QAAQjD,SAAS;;KAAGA;KAAQ,CAAA;IAAA;;EAAA,CAAA,CAAA"}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
require('../runtime-g0TEIoZK.cjs');
|
|
2
2
|
require('../plugin-CM1TSv1B.cjs');
|
|
3
|
-
require('../
|
|
4
|
-
require('../persistence-D_clXRxP.cjs');
|
|
5
|
-
require('../source-file-env-4Vdtzc5-.cjs');
|
|
6
|
-
require('../defu-CrqNIh1A.cjs');
|
|
7
|
-
require('../load-DPB0maqs.cjs');
|
|
8
|
-
require('../confbox.DA7CpUDY-r6FXRsI6.cjs');
|
|
9
|
-
require('../confbox.DnMsyigM-C13n3X-S.cjs');
|
|
10
|
-
const require_create_reflection_resource = require('../create-reflection-resource-BJj83ii4.cjs');
|
|
3
|
+
const require_create_reflection_resource = require('../create-reflection-resource-d2zdTyOE.cjs');
|
|
11
4
|
|
|
12
|
-
exports.
|
|
5
|
+
exports.createReflection = require_create_reflection_resource.createReflection;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../runtime-BDzzR4wH.cjs";
|
|
2
2
|
import "../plugin-CSe5f2cD.cjs";
|
|
3
|
-
import { t as
|
|
4
|
-
export {
|
|
3
|
+
import { t as createReflection } from "../create-reflection-resource-3svZm2rY.cjs";
|
|
4
|
+
export { createReflection };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../runtime-lYSIZdMn.mjs";
|
|
2
2
|
import "../plugin-DMbVjdcQ.mjs";
|
|
3
|
-
import { t as
|
|
4
|
-
export {
|
|
3
|
+
import { t as createReflection } from "../create-reflection-resource-CCpA76Yq.mjs";
|
|
4
|
+
export { createReflection };
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import "../runtime-C5ukCv3P.mjs";
|
|
2
2
|
import "../plugin-eBjQJP6x.mjs";
|
|
3
|
-
import "../
|
|
4
|
-
import "../persistence-BsBxs9wt.mjs";
|
|
5
|
-
import "../source-file-env-Tj-6qobx.mjs";
|
|
6
|
-
import "../defu-DV5Grr85.mjs";
|
|
7
|
-
import "../load-Dr5ybfL7.mjs";
|
|
8
|
-
import "../confbox.DA7CpUDY-DShUZ_rW.mjs";
|
|
9
|
-
import "../confbox.DnMsyigM-V6Wj0LPC.mjs";
|
|
10
|
-
import { t as createReflectionResource } from "../create-reflection-resource-B3friIs9.mjs";
|
|
3
|
+
import { t as createReflection } from "../create-reflection-resource-D0QrD1Td.mjs";
|
|
11
4
|
|
|
12
|
-
export {
|
|
5
|
+
export { createReflection };
|
package/dist/helpers/index.cjs
CHANGED
|
@@ -8,14 +8,14 @@ require('../defu-CrqNIh1A.cjs');
|
|
|
8
8
|
const require_load = require('../load-DPB0maqs.cjs');
|
|
9
9
|
require('../confbox.DA7CpUDY-r6FXRsI6.cjs');
|
|
10
10
|
require('../confbox.DnMsyigM-C13n3X-S.cjs');
|
|
11
|
-
const require_create_reflection_resource = require('../create-reflection-resource-
|
|
11
|
+
const require_create_reflection_resource = require('../create-reflection-resource-d2zdTyOE.cjs');
|
|
12
12
|
require('../helpers-DgYP3uej.cjs');
|
|
13
13
|
|
|
14
14
|
exports.BaseEnv = require_persistence.BaseEnv;
|
|
15
15
|
exports.BaseSecrets = require_persistence.BaseSecrets;
|
|
16
16
|
exports.__ΩCreateEnvReflectionOptions = require_persistence.__ΩCreateEnvReflectionOptions;
|
|
17
17
|
exports.createEnvReflection = require_persistence.createEnvReflection;
|
|
18
|
-
exports.
|
|
18
|
+
exports.createReflection = require_create_reflection_resource.createReflection;
|
|
19
19
|
exports.createSecretsReflection = require_persistence.createSecretsReflection;
|
|
20
20
|
exports.createTemplateReflection = require_template_helpers.createTemplateReflection;
|
|
21
21
|
exports.formatEnvField = require_source_file_env.formatEnvField;
|
package/dist/helpers/index.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../runtime-BDzzR4wH.cjs";
|
|
2
2
|
import "../plugin-CSe5f2cD.cjs";
|
|
3
|
-
import { t as
|
|
3
|
+
import { t as createReflection } from "../create-reflection-resource-3svZm2rY.cjs";
|
|
4
4
|
import { n as loadEnvFromContext, t as loadEnv } from "../load-PHGmxX_X.cjs";
|
|
5
5
|
import { a as readEnvReflection, c as resolveRuntimeTypeFile, d as writeEnvTypeReflection, i as getSecretsDefaultTypeDefinition, l as writeEnvReflection, n as getEnvReflectionsPath, o as readEnvTypeReflection, r as getEnvTypeReflectionsPath, s as readSecretsReflection, t as getEnvDefaultTypeDefinition, u as writeEnvReflectionSync } from "../persistence-BR4cUaN6.cjs";
|
|
6
6
|
import { a as createEnvReflection, c as mergeSecretsReflections, i as __ΩCreateEnvReflectionOptions, l as reflectEnv, n as BaseSecrets, o as createSecretsReflection, r as CreateEnvReflectionOptions, s as mergeEnvReflections, t as BaseEnv, u as reflectSecrets } from "../reflect-Dm8a3c29.cjs";
|
|
7
7
|
import { n as removeEnvPrefix, t as formatEnvField } from "../source-file-env-Brfopjyr.cjs";
|
|
8
8
|
import { t as createTemplateReflection } from "../template-helpers-zyitPfMz.cjs";
|
|
9
9
|
import "../index-CEDY7cmG.cjs";
|
|
10
|
-
export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, __ΩCreateEnvReflectionOptions, createEnvReflection,
|
|
10
|
+
export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, __ΩCreateEnvReflectionOptions, createEnvReflection, createReflection, createSecretsReflection, createTemplateReflection, formatEnvField, getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, loadEnv, loadEnvFromContext, mergeEnvReflections, mergeSecretsReflections, readEnvReflection, readEnvTypeReflection, readSecretsReflection, reflectEnv, reflectSecrets, removeEnvPrefix, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
|
package/dist/helpers/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../runtime-lYSIZdMn.mjs";
|
|
2
2
|
import "../plugin-DMbVjdcQ.mjs";
|
|
3
|
-
import { t as
|
|
3
|
+
import { t as createReflection } from "../create-reflection-resource-CCpA76Yq.mjs";
|
|
4
4
|
import { n as loadEnvFromContext, t as loadEnv } from "../load-GpP6cojj.mjs";
|
|
5
5
|
import { a as readEnvReflection, c as resolveRuntimeTypeFile, d as writeEnvTypeReflection, i as getSecretsDefaultTypeDefinition, l as writeEnvReflection, n as getEnvReflectionsPath, o as readEnvTypeReflection, r as getEnvTypeReflectionsPath, s as readSecretsReflection, t as getEnvDefaultTypeDefinition, u as writeEnvReflectionSync } from "../persistence-DrKQZNCv.mjs";
|
|
6
6
|
import { a as createEnvReflection, c as mergeSecretsReflections, i as __ΩCreateEnvReflectionOptions, l as reflectEnv, n as BaseSecrets, o as createSecretsReflection, r as CreateEnvReflectionOptions, s as mergeEnvReflections, t as BaseEnv, u as reflectSecrets } from "../reflect-Dpz8ifa0.mjs";
|
|
7
7
|
import { n as removeEnvPrefix, t as formatEnvField } from "../source-file-env-DWejSP2U.mjs";
|
|
8
8
|
import { t as createTemplateReflection } from "../template-helpers-1SKodHKt.mjs";
|
|
9
9
|
import "../index-dhjtMp5F.mjs";
|
|
10
|
-
export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, __ΩCreateEnvReflectionOptions, createEnvReflection,
|
|
10
|
+
export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, __ΩCreateEnvReflectionOptions, createEnvReflection, createReflection, createSecretsReflection, createTemplateReflection, formatEnvField, getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, loadEnv, loadEnvFromContext, mergeEnvReflections, mergeSecretsReflections, readEnvReflection, readEnvTypeReflection, readSecretsReflection, reflectEnv, reflectSecrets, removeEnvPrefix, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import "../defu-DV5Grr85.mjs";
|
|
|
8
8
|
import { n as loadEnvFromContext, t as loadEnv } from "../load-Dr5ybfL7.mjs";
|
|
9
9
|
import "../confbox.DA7CpUDY-DShUZ_rW.mjs";
|
|
10
10
|
import "../confbox.DnMsyigM-V6Wj0LPC.mjs";
|
|
11
|
-
import { t as
|
|
11
|
+
import { t as createReflection } from "../create-reflection-resource-D0QrD1Td.mjs";
|
|
12
12
|
import "../helpers-45e1bvAO.mjs";
|
|
13
13
|
|
|
14
|
-
export { BaseEnv, BaseSecrets, __ΩCreateEnvReflectionOptions, createEnvReflection,
|
|
14
|
+
export { BaseEnv, BaseSecrets, __ΩCreateEnvReflectionOptions, createEnvReflection, createReflection, createSecretsReflection, createTemplateReflection, formatEnvField, getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, loadEnv, loadEnvFromContext, mergeEnvReflections, mergeSecretsReflections, readEnvReflection, readEnvTypeReflection, readSecretsReflection, reflectEnv, reflectSecrets, removeEnvPrefix, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-Bdi8CvaN.d.cts","names":[],"sources":["../src/index.tsx","../src/babel/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index-Bdi8CvaN.d.cts","names":[],"sources":["../src/index.tsx","../src/babel/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAqZc,cAlVD,MAkVC,EAAA,CAAA,iBAlV0B,gBAkV1B,GAlV6C,gBAkV7C,CAAA,CAAA,OAAA,CAAA,EAjVH,gBAiVG,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA,EAAA;;;cCnXD,gBAAc,iBAAA,CAAA,kCAAA,iBAmM1B,uBAAA,GAnM0B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-Drhzdkqe.d.mts","names":[],"sources":["../src/index.tsx","../src/babel/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index-Drhzdkqe.d.mts","names":[],"sources":["../src/index.tsx","../src/babel/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAqZc,cAlVD,MAkVC,EAAA,CAAA,iBAlV0B,gBAkV1B,GAlV6C,gBAkV7C,CAAA,CAAA,OAAA,CAAA,EAjVH,gBAiVG,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA,EAAA;;;cCnXD,gBAAc,iBAAA,CAAA,kCAAA,iBAmM1B,uBAAA,GAnM0B"}
|
package/dist/index.cjs
CHANGED
|
@@ -11,12 +11,12 @@ const require_defu = require('./defu-CrqNIh1A.cjs');
|
|
|
11
11
|
const require_load = require('./load-DPB0maqs.cjs');
|
|
12
12
|
require('./confbox.DA7CpUDY-r6FXRsI6.cjs');
|
|
13
13
|
require('./confbox.DnMsyigM-C13n3X-S.cjs');
|
|
14
|
-
const require_create_reflection_resource = require('./create-reflection-resource-
|
|
14
|
+
const require_create_reflection_resource = require('./create-reflection-resource-d2zdTyOE.cjs');
|
|
15
15
|
require('./helpers-DgYP3uej.cjs');
|
|
16
16
|
const require_docs_helper = require('./docs-helper-4MoQ5-R3.cjs');
|
|
17
17
|
const require_automd_generator = require('./automd-generator-BNg74tyV.cjs');
|
|
18
|
-
const require_docs = require('./docs-
|
|
19
|
-
const require_env = require('./env-
|
|
18
|
+
const require_docs = require('./docs-ClXTdyjQ.cjs');
|
|
19
|
+
const require_env = require('./env-iQh74nl2.cjs');
|
|
20
20
|
require('./components-BUo6Koax.cjs');
|
|
21
21
|
const require_plugin$1 = require('./plugin-CSVnrdpE.cjs');
|
|
22
22
|
require('./babel-BZqmdVF4.cjs');
|
|
@@ -296,9 +296,13 @@ const plugin = (options = {}) => {
|
|
|
296
296
|
async prepare() {
|
|
297
297
|
const _self$ = this;
|
|
298
298
|
this.debug(`Preparing the Environment runtime artifacts for the Powerlines project.`);
|
|
299
|
-
await
|
|
300
|
-
|
|
301
|
-
|
|
299
|
+
const result = await require_persistence.readEnvTypeReflection(this, "env");
|
|
300
|
+
await this.render((0, __alloy_js_core_jsx_runtime.createComponent)(require_env.EnvBuiltin, {
|
|
301
|
+
get defaultConfig() {
|
|
302
|
+
return _self$.config.env.defaultConfig;
|
|
303
|
+
},
|
|
304
|
+
reflection: result
|
|
305
|
+
}));
|
|
302
306
|
},
|
|
303
307
|
transform: {
|
|
304
308
|
order: "post",
|
|
@@ -315,7 +319,11 @@ const plugin = (options = {}) => {
|
|
|
315
319
|
},
|
|
316
320
|
async docs() {
|
|
317
321
|
this.debug(`Documenting environment variables configuration values in "${require_join_paths.joinPaths(require_docs_helper.getDocsOutputPath(this), "env.md")}"`);
|
|
318
|
-
await
|
|
322
|
+
const result = await require_persistence.readEnvTypeReflection(this, "env");
|
|
323
|
+
await this.render((0, __alloy_js_core_jsx_runtime.createComponent)(require_docs.EnvDocsFile, {
|
|
324
|
+
levelOffset: 0,
|
|
325
|
+
reflection: result
|
|
326
|
+
}));
|
|
319
327
|
},
|
|
320
328
|
async buildEnd() {
|
|
321
329
|
const reflectionPath = require_persistence.getEnvReflectionsPath(this, "env");
|
|
@@ -355,7 +363,7 @@ exports.__ΩEnvPluginUserConfig = require_plugin.__ΩEnvPluginUserConfig;
|
|
|
355
363
|
exports.__ΩEnvType = require_plugin.__ΩEnvType;
|
|
356
364
|
exports.__ΩSecretsInterface = require_runtime.__ΩSecretsInterface;
|
|
357
365
|
exports.createEnvReflection = require_persistence.createEnvReflection;
|
|
358
|
-
exports.
|
|
366
|
+
exports.createReflection = require_create_reflection_resource.createReflection;
|
|
359
367
|
exports.createSecretsReflection = require_persistence.createSecretsReflection;
|
|
360
368
|
exports.createTemplateReflection = require_template_helpers.createTemplateReflection;
|
|
361
369
|
exports.default = src_default;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i as __ΩSecretsInterface, n as SecretsInterface, r as __ΩEnvInterface, t as EnvInterface } from "./runtime-BDzzR4wH.cjs";
|
|
2
2
|
import { a as EnvType, c as __ΩEnvPluginResolvedConfig, i as EnvPluginUserConfig, l as __ΩEnvPluginUserConfig, n as EnvPluginOptions, o as __ΩEnvPluginContext, r as EnvPluginResolvedConfig, s as __ΩEnvPluginOptions, t as EnvPluginContext, u as __ΩEnvType } from "./plugin-CSe5f2cD.cjs";
|
|
3
|
-
import { n as EnvDocsFileProps, r as __ΩEnvDocsFileProps, t as EnvDocsFile } from "./docs-
|
|
4
|
-
import { i as __ΩEnvBuiltinProps, n as EnvBuiltinProps, r as EnvTypeDefinition, t as EnvBuiltin } from "./env-
|
|
3
|
+
import { n as EnvDocsFileProps, r as __ΩEnvDocsFileProps, t as EnvDocsFile } from "./docs-BAKwE4PJ.cjs";
|
|
4
|
+
import { i as __ΩEnvBuiltinProps, n as EnvBuiltinProps, r as EnvTypeDefinition, t as EnvBuiltin } from "./env-DwM7pJm7.cjs";
|
|
5
5
|
import "./index-uTS5iDq_.cjs";
|
|
6
|
-
import { t as
|
|
6
|
+
import { t as createReflection } from "./create-reflection-resource-3svZm2rY.cjs";
|
|
7
7
|
import { n as loadEnvFromContext, t as loadEnv } from "./load-PHGmxX_X.cjs";
|
|
8
8
|
import { a as readEnvReflection, c as resolveRuntimeTypeFile, d as writeEnvTypeReflection, i as getSecretsDefaultTypeDefinition, l as writeEnvReflection, n as getEnvReflectionsPath, o as readEnvTypeReflection, r as getEnvTypeReflectionsPath, s as readSecretsReflection, t as getEnvDefaultTypeDefinition, u as writeEnvReflectionSync } from "./persistence-BR4cUaN6.cjs";
|
|
9
9
|
import { a as createEnvReflection, c as mergeSecretsReflections, i as __ΩCreateEnvReflectionOptions, l as reflectEnv, n as BaseSecrets, o as createSecretsReflection, r as CreateEnvReflectionOptions, s as mergeEnvReflections, t as BaseEnv, u as reflectSecrets } from "./reflect-Dm8a3c29.cjs";
|
|
@@ -12,4 +12,4 @@ import { t as createTemplateReflection } from "./template-helpers-zyitPfMz.cjs";
|
|
|
12
12
|
import "./index-CEDY7cmG.cjs";
|
|
13
13
|
import "./index-DSiHnMH2.cjs";
|
|
14
14
|
import { n as plugin, t as envBabelPlugin } from "./index-Bdi8CvaN.cjs";
|
|
15
|
-
export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, EnvBuiltin, EnvBuiltinProps, EnvDocsFile, EnvDocsFileProps, EnvInterface, EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, EnvTypeDefinition, SecretsInterface, __ΩCreateEnvReflectionOptions, __ΩEnvBuiltinProps, __ΩEnvDocsFileProps, __ΩEnvInterface, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType, __ΩSecretsInterface, createEnvReflection,
|
|
15
|
+
export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, EnvBuiltin, EnvBuiltinProps, EnvDocsFile, EnvDocsFileProps, EnvInterface, EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, EnvTypeDefinition, SecretsInterface, __ΩCreateEnvReflectionOptions, __ΩEnvBuiltinProps, __ΩEnvDocsFileProps, __ΩEnvInterface, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType, __ΩSecretsInterface, createEnvReflection, createReflection, createSecretsReflection, createTemplateReflection, plugin as default, plugin, envBabelPlugin, formatEnvField, getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, loadEnv, loadEnvFromContext, mergeEnvReflections, mergeSecretsReflections, readEnvReflection, readEnvTypeReflection, readSecretsReflection, reflectEnv, reflectSecrets, removeEnvPrefix, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i as __ΩSecretsInterface, n as SecretsInterface, r as __ΩEnvInterface, t as EnvInterface } from "./runtime-lYSIZdMn.mjs";
|
|
2
2
|
import { a as EnvType, c as __ΩEnvPluginResolvedConfig, i as EnvPluginUserConfig, l as __ΩEnvPluginUserConfig, n as EnvPluginOptions, o as __ΩEnvPluginContext, r as EnvPluginResolvedConfig, s as __ΩEnvPluginOptions, t as EnvPluginContext, u as __ΩEnvType } from "./plugin-DMbVjdcQ.mjs";
|
|
3
|
-
import { n as EnvDocsFileProps, r as __ΩEnvDocsFileProps, t as EnvDocsFile } from "./docs-
|
|
4
|
-
import { i as __ΩEnvBuiltinProps, n as EnvBuiltinProps, r as EnvTypeDefinition, t as EnvBuiltin } from "./env-
|
|
3
|
+
import { n as EnvDocsFileProps, r as __ΩEnvDocsFileProps, t as EnvDocsFile } from "./docs-CVf-w8oz.mjs";
|
|
4
|
+
import { i as __ΩEnvBuiltinProps, n as EnvBuiltinProps, r as EnvTypeDefinition, t as EnvBuiltin } from "./env-D0KBPuAd.mjs";
|
|
5
5
|
import "./index-BNRXMhlr.mjs";
|
|
6
|
-
import { t as
|
|
6
|
+
import { t as createReflection } from "./create-reflection-resource-CCpA76Yq.mjs";
|
|
7
7
|
import { n as loadEnvFromContext, t as loadEnv } from "./load-GpP6cojj.mjs";
|
|
8
8
|
import { a as readEnvReflection, c as resolveRuntimeTypeFile, d as writeEnvTypeReflection, i as getSecretsDefaultTypeDefinition, l as writeEnvReflection, n as getEnvReflectionsPath, o as readEnvTypeReflection, r as getEnvTypeReflectionsPath, s as readSecretsReflection, t as getEnvDefaultTypeDefinition, u as writeEnvReflectionSync } from "./persistence-DrKQZNCv.mjs";
|
|
9
9
|
import { a as createEnvReflection, c as mergeSecretsReflections, i as __ΩCreateEnvReflectionOptions, l as reflectEnv, n as BaseSecrets, o as createSecretsReflection, r as CreateEnvReflectionOptions, s as mergeEnvReflections, t as BaseEnv, u as reflectSecrets } from "./reflect-Dpz8ifa0.mjs";
|
|
@@ -12,4 +12,4 @@ import { t as createTemplateReflection } from "./template-helpers-1SKodHKt.mjs";
|
|
|
12
12
|
import "./index-dhjtMp5F.mjs";
|
|
13
13
|
import "./index-CREkvfw9.mjs";
|
|
14
14
|
import { n as plugin, t as envBabelPlugin } from "./index-Drhzdkqe.mjs";
|
|
15
|
-
export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, EnvBuiltin, EnvBuiltinProps, EnvDocsFile, EnvDocsFileProps, EnvInterface, EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, EnvTypeDefinition, SecretsInterface, __ΩCreateEnvReflectionOptions, __ΩEnvBuiltinProps, __ΩEnvDocsFileProps, __ΩEnvInterface, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType, __ΩSecretsInterface, createEnvReflection,
|
|
15
|
+
export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, EnvBuiltin, EnvBuiltinProps, EnvDocsFile, EnvDocsFileProps, EnvInterface, EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, EnvTypeDefinition, SecretsInterface, __ΩCreateEnvReflectionOptions, __ΩEnvBuiltinProps, __ΩEnvDocsFileProps, __ΩEnvInterface, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType, __ΩSecretsInterface, createEnvReflection, createReflection, createSecretsReflection, createTemplateReflection, plugin as default, plugin, envBabelPlugin, formatEnvField, getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, loadEnv, loadEnvFromContext, mergeEnvReflections, mergeSecretsReflections, readEnvReflection, readEnvTypeReflection, readSecretsReflection, reflectEnv, reflectSecrets, removeEnvPrefix, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
|
package/dist/index.mjs
CHANGED
|
@@ -9,12 +9,12 @@ import { t as defu } from "./defu-DV5Grr85.mjs";
|
|
|
9
9
|
import { n as loadEnvFromContext, t as loadEnv } from "./load-Dr5ybfL7.mjs";
|
|
10
10
|
import "./confbox.DA7CpUDY-DShUZ_rW.mjs";
|
|
11
11
|
import "./confbox.DnMsyigM-V6Wj0LPC.mjs";
|
|
12
|
-
import { t as
|
|
12
|
+
import { t as createReflection } from "./create-reflection-resource-D0QrD1Td.mjs";
|
|
13
13
|
import "./helpers-45e1bvAO.mjs";
|
|
14
14
|
import { t as getDocsOutputPath } from "./docs-helper-2fe7M3Th.mjs";
|
|
15
15
|
import { t as env } from "./automd-generator-DoKLIMuw.mjs";
|
|
16
|
-
import { t as EnvDocsFile } from "./docs-
|
|
17
|
-
import { n as EnvTypeDefinition, t as EnvBuiltin } from "./env-
|
|
16
|
+
import { t as EnvDocsFile } from "./docs-B4Bd2HuK.mjs";
|
|
17
|
+
import { n as EnvTypeDefinition, t as EnvBuiltin } from "./env-z7LbFLP0.mjs";
|
|
18
18
|
import "./components-DDFmImcI.mjs";
|
|
19
19
|
import { t as envBabelPlugin } from "./plugin-Vyvy9w9Z.mjs";
|
|
20
20
|
import "./babel-DgietUY3.mjs";
|
|
@@ -291,9 +291,13 @@ const plugin = (options = {}) => {
|
|
|
291
291
|
async prepare() {
|
|
292
292
|
const _self$ = this;
|
|
293
293
|
this.debug(`Preparing the Environment runtime artifacts for the Powerlines project.`);
|
|
294
|
-
await this
|
|
295
|
-
|
|
296
|
-
|
|
294
|
+
const result = await readEnvTypeReflection(this, "env");
|
|
295
|
+
await this.render(createComponent(EnvBuiltin, {
|
|
296
|
+
get defaultConfig() {
|
|
297
|
+
return _self$.config.env.defaultConfig;
|
|
298
|
+
},
|
|
299
|
+
reflection: result
|
|
300
|
+
}));
|
|
297
301
|
},
|
|
298
302
|
transform: {
|
|
299
303
|
order: "post",
|
|
@@ -310,7 +314,11 @@ const plugin = (options = {}) => {
|
|
|
310
314
|
},
|
|
311
315
|
async docs() {
|
|
312
316
|
this.debug(`Documenting environment variables configuration values in "${joinPaths(getDocsOutputPath(this), "env.md")}"`);
|
|
313
|
-
await this
|
|
317
|
+
const result = await readEnvTypeReflection(this, "env");
|
|
318
|
+
await this.render(createComponent(EnvDocsFile, {
|
|
319
|
+
levelOffset: 0,
|
|
320
|
+
reflection: result
|
|
321
|
+
}));
|
|
314
322
|
},
|
|
315
323
|
async buildEnd() {
|
|
316
324
|
const reflectionPath = getEnvReflectionsPath(this, "env");
|
|
@@ -336,5 +344,5 @@ const plugin = (options = {}) => {
|
|
|
336
344
|
var src_default = plugin;
|
|
337
345
|
|
|
338
346
|
//#endregion
|
|
339
|
-
export { BaseEnv, BaseSecrets, EnvBuiltin, EnvDocsFile, EnvTypeDefinition, __ΩCreateEnvReflectionOptions, __ΩEnvInterface, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType, __ΩSecretsInterface, createEnvReflection,
|
|
347
|
+
export { BaseEnv, BaseSecrets, EnvBuiltin, EnvDocsFile, EnvTypeDefinition, __ΩCreateEnvReflectionOptions, __ΩEnvInterface, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType, __ΩSecretsInterface, createEnvReflection, createReflection, createSecretsReflection, createTemplateReflection, src_default as default, envBabelPlugin, formatEnvField, getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, loadEnv, loadEnvFromContext, mergeEnvReflections, mergeSecretsReflections, plugin, readEnvReflection, readEnvTypeReflection, readSecretsReflection, reflectEnv, reflectSecrets, removeEnvPrefix, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
|
|
340
348
|
//# sourceMappingURL=index.mjs.map
|