@powerlines/plugin-env 0.16.303 → 0.16.305
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.
|
@@ -9,6 +9,7 @@ let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
|
9
9
|
let _powerlines_plugin_alloy_helpers_refkey = require("@powerlines/plugin-alloy/helpers/refkey");
|
|
10
10
|
let _powerlines_plugin_alloy_typescript_components = require("@powerlines/plugin-alloy/typescript/components");
|
|
11
11
|
let _powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
|
12
|
+
let _stryke_helpers_deep_clone = require("@stryke/helpers/deep-clone");
|
|
12
13
|
let _stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
|
|
13
14
|
|
|
14
15
|
//#region src/components/env-builtin.tsx
|
|
@@ -331,7 +332,12 @@ function EnvBuiltin(props) {
|
|
|
331
332
|
const [{ defaultConfig, children }, rest] = (0, _alloy_js_core.splitProps)(props, ["defaultConfig", "children"]);
|
|
332
333
|
const context = (_powerlines_plugin_alloy_core_contexts_context.usePowerlines.Ω = [["EnvPluginContext", "\"w!"]], (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)());
|
|
333
334
|
const defaultValue = (0, _alloy_js_core.computed)(() => context && require_helpers_load.loadEnvFromContext(context, process.env));
|
|
334
|
-
const
|
|
335
|
+
const schema = (0, _alloy_js_core.computed)(() => {
|
|
336
|
+
const result = (0, _stryke_helpers_deep_clone.deepClone)(context.env.config.schema);
|
|
337
|
+
result.name = "Env";
|
|
338
|
+
return result;
|
|
339
|
+
});
|
|
340
|
+
const schemaGetProperties = (0, _alloy_js_core.computed)(() => (0, _powerlines_schema.getPropertiesList)(schema.value).filter(__assignType((property) => !property?.ignore && !property?.writeOnly, [
|
|
335
341
|
"property",
|
|
336
342
|
"",
|
|
337
343
|
"P\"2!\"/\""
|
|
@@ -341,7 +347,7 @@ function EnvBuiltin(props) {
|
|
|
341
347
|
"",
|
|
342
348
|
"P\"2!\"2\"\"/#"
|
|
343
349
|
])) ?? []);
|
|
344
|
-
const schemaSetProperties = (0, _alloy_js_core.computed)(() => (0, _powerlines_schema.getPropertiesList)(
|
|
350
|
+
const schemaSetProperties = (0, _alloy_js_core.computed)(() => (0, _powerlines_schema.getPropertiesList)(schema.value).filter(__assignType((property) => !property?.ignore && !property?.readOnly, [
|
|
345
351
|
"property",
|
|
346
352
|
"",
|
|
347
353
|
"P\"2!\"/\""
|
|
@@ -351,7 +357,7 @@ function EnvBuiltin(props) {
|
|
|
351
357
|
"",
|
|
352
358
|
"P\"2!\"2\"\"/#"
|
|
353
359
|
])) ?? []);
|
|
354
|
-
const parserCode = (0, _powerlines_schema.generateParserCode)(
|
|
360
|
+
const parserCode = (0, _powerlines_schema.generateParserCode)(schema.value);
|
|
355
361
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components.BuiltinFile, (0, _alloy_js_core_jsx_runtime.mergeProps)({
|
|
356
362
|
id: "env",
|
|
357
363
|
description: "The environment configuration module provides an interface to define environment configuration parameters."
|
|
@@ -359,7 +365,7 @@ function EnvBuiltin(props) {
|
|
|
359
365
|
return [
|
|
360
366
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
361
367
|
get when() {
|
|
362
|
-
return Boolean(
|
|
368
|
+
return Boolean(schema.value);
|
|
363
369
|
},
|
|
364
370
|
get children() {
|
|
365
371
|
return [(0, _alloy_js_core_jsx_runtime.createComponent)(EnvTypeDefinition, { defaultValue }), (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {})];
|
|
@@ -369,7 +375,7 @@ function EnvBuiltin(props) {
|
|
|
369
375
|
name: "initialEnv",
|
|
370
376
|
type: "Partial<Env>",
|
|
371
377
|
get schema() {
|
|
372
|
-
return
|
|
378
|
+
return schema.value;
|
|
373
379
|
},
|
|
374
380
|
"export": true,
|
|
375
381
|
"const": true,
|
|
@@ -414,7 +420,7 @@ function EnvBuiltin(props) {
|
|
|
414
420
|
parse({
|
|
415
421
|
...initialEnv,
|
|
416
422
|
...environmentConfig
|
|
417
|
-
}
|
|
423
|
+
}),
|
|
418
424
|
{
|
|
419
425
|
get: (target: UnprefixedEnv, propertyName: string) => { `,
|
|
420
426
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-builtin.d.cts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"env-builtin.d.cts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":";;;;;;AAiEA;iBAAgB,iBAAA,IAAiB,QAAA;AAAA,UAwLhB,eAAA,SAAwB,IAAA,CAAK,gBAAA;EAC5C,aAAA,GAAgB,QAAA;AAAA;AADlB;;;AAAA,iBAUgB,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-builtin.d.mts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"env-builtin.d.mts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":";;;;;;AAiEA;iBAAgB,iBAAA,IAAiB,QAAA;AAAA,UAwLhB,eAAA,SAAwB,IAAA,CAAK,gBAAA;EAC5C,aAAA,GAAgB,QAAA;AAAA;AADlB;;;AAAA,iBAUgB,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA"}
|
|
@@ -8,6 +8,7 @@ import { ElseIfClause, FunctionDeclaration, IfStatement, InterfaceDeclaration, V
|
|
|
8
8
|
import { refkey } from "@powerlines/plugin-alloy/helpers/refkey";
|
|
9
9
|
import { BuiltinFile, InterfaceDeclaration as InterfaceDeclaration$1, InterfaceMember, ObjectDeclaration, TSDocSchemaProperty } from "@powerlines/plugin-alloy/typescript/components";
|
|
10
10
|
import { TSDoc, TSDocParam, TSDocRemarks, TSDocReturns } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
|
|
11
|
+
import { deepClone } from "@stryke/helpers/deep-clone";
|
|
11
12
|
import { getUnique } from "@stryke/helpers/get-unique";
|
|
12
13
|
|
|
13
14
|
//#region src/components/env-builtin.tsx
|
|
@@ -330,7 +331,12 @@ function EnvBuiltin(props) {
|
|
|
330
331
|
const [{ defaultConfig, children }, rest] = splitProps(props, ["defaultConfig", "children"]);
|
|
331
332
|
const context = (usePowerlines.Ω = [["EnvPluginContext", "\"w!"]], usePowerlines());
|
|
332
333
|
const defaultValue = computed(() => context && loadEnvFromContext(context, process.env));
|
|
333
|
-
const
|
|
334
|
+
const schema = computed(() => {
|
|
335
|
+
const result = deepClone(context.env.config.schema);
|
|
336
|
+
result.name = "Env";
|
|
337
|
+
return result;
|
|
338
|
+
});
|
|
339
|
+
const schemaGetProperties = computed(() => getPropertiesList(schema.value).filter(__assignType((property) => !property?.ignore && !property?.writeOnly, [
|
|
334
340
|
"property",
|
|
335
341
|
"",
|
|
336
342
|
"P\"2!\"/\""
|
|
@@ -340,7 +346,7 @@ function EnvBuiltin(props) {
|
|
|
340
346
|
"",
|
|
341
347
|
"P\"2!\"2\"\"/#"
|
|
342
348
|
])) ?? []);
|
|
343
|
-
const schemaSetProperties = computed(() => getPropertiesList(
|
|
349
|
+
const schemaSetProperties = computed(() => getPropertiesList(schema.value).filter(__assignType((property) => !property?.ignore && !property?.readOnly, [
|
|
344
350
|
"property",
|
|
345
351
|
"",
|
|
346
352
|
"P\"2!\"/\""
|
|
@@ -350,7 +356,7 @@ function EnvBuiltin(props) {
|
|
|
350
356
|
"",
|
|
351
357
|
"P\"2!\"2\"\"/#"
|
|
352
358
|
])) ?? []);
|
|
353
|
-
const parserCode = generateParserCode(
|
|
359
|
+
const parserCode = generateParserCode(schema.value);
|
|
354
360
|
return createComponent(BuiltinFile, mergeProps({
|
|
355
361
|
id: "env",
|
|
356
362
|
description: "The environment configuration module provides an interface to define environment configuration parameters."
|
|
@@ -358,7 +364,7 @@ function EnvBuiltin(props) {
|
|
|
358
364
|
return [
|
|
359
365
|
createComponent(Show, {
|
|
360
366
|
get when() {
|
|
361
|
-
return Boolean(
|
|
367
|
+
return Boolean(schema.value);
|
|
362
368
|
},
|
|
363
369
|
get children() {
|
|
364
370
|
return [createComponent(EnvTypeDefinition, { defaultValue }), createComponent(Spacing, {})];
|
|
@@ -368,7 +374,7 @@ function EnvBuiltin(props) {
|
|
|
368
374
|
name: "initialEnv",
|
|
369
375
|
type: "Partial<Env>",
|
|
370
376
|
get schema() {
|
|
371
|
-
return
|
|
377
|
+
return schema.value;
|
|
372
378
|
},
|
|
373
379
|
"export": true,
|
|
374
380
|
"const": true,
|
|
@@ -413,7 +419,7 @@ function EnvBuiltin(props) {
|
|
|
413
419
|
parse({
|
|
414
420
|
...initialEnv,
|
|
415
421
|
...environmentConfig
|
|
416
|
-
}
|
|
422
|
+
}),
|
|
417
423
|
{
|
|
418
424
|
get: (target: UnprefixedEnv, propertyName: string) => { `,
|
|
419
425
|
createIntrinsic("hbr", {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-builtin.mjs","names":[],"sources":["../../src/components/env-builtin.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 InterfaceDeclaration as BaseInterfaceDeclaration,\n ElseIfClause,\n FunctionDeclaration,\n IfStatement,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { refkey } from \"@powerlines/plugin-alloy/helpers/refkey\";\nimport type { ComponentProps } from \"@powerlines/plugin-alloy/types/components\";\nimport {\n BuiltinFile,\n BuiltinFileProps,\n InterfaceDeclaration,\n InterfaceMember,\n ObjectDeclaration,\n TSDocSchemaProperty\n} from \"@powerlines/plugin-alloy/typescript/components\";\nimport {\n TSDoc,\n TSDocParam,\n TSDocRemarks,\n TSDocReturns\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport {\n generateParserCode,\n getPropertiesList,\n GetPropertiesResult,\n JsonSchema\n} from \"@powerlines/schema\";\nimport { getUnique } from \"@stryke/helpers/get-unique\";\nimport { loadEnvFromContext } from \"../helpers/load\";\nimport type { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Generates the environment configuration typescript definition for the Powerlines project.\n */\nexport function EnvTypeDefinition() {\n const context = usePowerlines<EnvPluginContext>();\n\n return (\n <>\n <InterfaceDeclaration\n name=\"UnprefixedEnv\"\n schema={context.env.config.schema}\n export\n />\n <Spacing />\n <TSDoc heading=\"The environment configuration object with prefixed keys.\">\n <TSDocRemarks>\n {`The \\`Env\\` type extends the \\`UnprefixedEnv\\` 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 <BaseInterfaceDeclaration name=\"Env\" export extends=\"UnprefixedEnv\">\n <For\n each={getUnique(context.config.env.prefix).map(prefix =>\n prefix.replace(/_$/, \"\")\n )}\n doubleHardline>\n {prefix => (\n <For\n each={\n getPropertiesList(context.env.config.schema).filter(\n property => !property.ignore\n ) ?? []\n }\n doubleHardline>\n {property => (\n <>\n <TSDocSchemaProperty\n schema={property}\n defaultValue={property?.default}\n />\n <InterfaceMember\n name={`${prefix}_${property.name}`}\n type={`UnprefixedEnv[\"${property.name}\"]`}\n schema={property}\n required={property.required}\n readOnly={property.readOnly}\n />\n </>\n )}\n </For>\n )}\n </For>\n </BaseInterfaceDeclaration>\n <Spacing />\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(/^(${getUnique(\n 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 name: string;\n property: JsonSchema;\n}\n\nfunction ConfigPropertyGet(props: ConfigPropertyProps) {\n const [{ context, name, property, index }] = splitProps(props, [\n \"context\",\n \"name\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional name={name} context={context} />\n <Show when={property?.alias && property?.alias.length > 0}>\n {code` || `}\n <For each={property?.alias ?? []} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${name}\"];`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional name={name} context={context} />\n <Show when={property?.alias && property?.alias.length > 0}>\n {code` || `}\n <For each={property?.alias ?? []} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${name}\"];`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nfunction ConfigPropertySet(props: ConfigPropertyProps) {\n const [{ context, name, property, index }] = splitProps(props, [\n \"context\",\n \"name\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional name={name} context={context} />\n <Show when={property?.alias && property?.alias.length > 0}>\n {code` || `}\n <For each={property?.alias ?? []} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${name}\"] = newValue;\n return true;\n`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional name={name} context={context} />\n <Show when={property?.alias && property?.alias.length > 0}>\n {code` || `}\n <For each={property?.alias ?? []} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${name}\"] = newValue;\n return true;\n`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nexport interface EnvBuiltinProps extends Omit<BuiltinFileProps, \"id\"> {\n defaultConfig?: Children;\n}\n\nconst createEnvRefkey = refkey(\"createEnv\");\nconst envRefkey = refkey(\"env\");\n\n/**\n * Generates the environment configuration module for the Powerlines project.\n */\nexport function EnvBuiltin(props: EnvBuiltinProps) {\n const [{ defaultConfig, children }, rest] = splitProps(props, [\n \"defaultConfig\",\n \"children\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n const defaultValue = computed(\n () => context && loadEnvFromContext(context, process.env)\n );\n\n const schemaGetProperties = computed(\n () =>\n (getPropertiesList(context.env.config)\n .filter(property => !property?.ignore && !property?.writeOnly)\n .sort((a, b) =>\n !a?.name && !b?.name\n ? 0\n : !a?.name\n ? 1\n : !b?.name\n ? -1\n : a?.name.localeCompare(b?.name)\n ) ?? []) as GetPropertiesResult[]\n );\n const schemaSetProperties = computed(\n () =>\n (getPropertiesList(context.env.config)\n .filter(property => !property?.ignore && !property?.readOnly)\n .sort((a, b) =>\n !a?.name && !b?.name\n ? 0\n : !a?.name\n ? 1\n : !b?.name\n ? -1\n : a?.name.localeCompare(b?.name)\n ) ?? []) as GetPropertiesResult[]\n );\n\n const parserCode = generateParserCode(context.env.config.schema);\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 <Show when={Boolean(context.env.config.schema)}>\n <EnvTypeDefinition defaultValue={defaultValue} />\n <Spacing />\n </Show>\n <ObjectDeclaration\n name=\"initialEnv\"\n type=\"Partial<Env>\"\n schema={context.env.config.schema}\n export\n const\n doc=\"The initial environment configuration object values for the runtime.\"\n />\n <Spacing />\n {parserCode}\n <Spacing />\n <Show when={Boolean(context?.entryPath)}>\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 <FunctionDeclaration\n refkey={createEnvRefkey}\n async={false}\n export\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 parse({\n ...initialEnv,\n ...environmentConfig\n } as Env),\n {\n get: (target: UnprefixedEnv, propertyName: string) => { `}\n <hbr />\n <For each={schemaGetProperties.value}>\n {(property: GetPropertiesResult, index: number) => (\n <ConfigPropertyGet\n index={index}\n context={context}\n name={property.name}\n property={property}\n />\n )}\n </For>\n {code`\n return undefined;\n }, `}\n\n <Spacing />\n {code` set: (target: UnprefixedEnv, propertyName: string, newValue: any) => { `}\n <hbr />\n <For each={schemaSetProperties.value} ender={code` else `}>\n {(property: GetPropertiesResult, index: number) => (\n <ConfigPropertySet\n index={index}\n context={context}\n name={property.name}\n property={property}\n />\n )}\n </For>\n\n <hbr />\n {code`return false;\n }\n }\n );\n`}\n </FunctionDeclaration>\n </Show>\n <Spacing />\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\n const\n initializer={\n <>{code`createEnv(${defaultConfig || \"{}\"} as Partial<Env>);`}</>\n }\n />\n <Spacing />\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 <Spacing />\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 <Spacing />\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 <Spacing />\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 <Spacing />\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 <Spacing />\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 <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BuiltinFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,UAAU;CAAC;CAAI;CAAM;CAAQ;AAAG;;;;;;;AAEtC,SAAM,aAAS,IAAW,MAAM;CAC/B,GAAG,SAAU;CACb,OAAQ;AACT;;;;AA+BA,SAAa,oBAA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W,IAAA;;;;YAKX,CAAA;IACF;GACF,CAAC;GAAG,gBAAe,gBAAA;IACjB,UAAU;IACV,SAAM;IACN,MAAM;IACN,aAAM,IAAW;GACnB,CAAC;GAAG,gBAAa,SAAA,CAAA,CAAA;GAAA,gBAAA,gBAAA;IACf,UAAM;IACN,SAAM;IACN,MAAM;IACN,KAAK;IACL,aAAM,IAAA;GACR,CAAC;GAAG,gBAAY,SAAA,CAAA,CAAA;GAAA,gBAAA,gBAAA;IACd,UAAM;IACN,SAAM;IACN,MAAM;IACN,KAAK;IACL,aAAM,IAAW;GACnB,CAAC;GAAG,gBAAa,SAAA,CAAA,CAAA;GAAA,gBAAA,gBAAA;IACf,UAAM;IACN,SAAM;IACN,MAAM;IACN,KAAK;IACL,aAAY,IAAA;GACd,CAAC;GAAG,gBAAiB,SAAA,CAAA,CAAA;GAAA,gBAAA,gBAAA;IACnB,UAAM;IACN,SAAM;IACN,MAAM;IACN,KAAI;IACL,aAAA,IAAA;GACD,CAAC;GAAA,gBAAS,SAAA,CAAA,CAAA;GAAA,gBAAA,MAAA;;KAET,OAAM,QAAS,QAAW;IACzB;IACQ;GACV,CAAC;EAAC;CACJ,EACF,CAAC,CAAC;AACJ;AACA,WAAU,SAAA;OAAY;CAAA;CAAA;CAAA;CAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"env-builtin.mjs","names":[],"sources":["../../src/components/env-builtin.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 InterfaceDeclaration as BaseInterfaceDeclaration,\n ElseIfClause,\n FunctionDeclaration,\n IfStatement,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { refkey } from \"@powerlines/plugin-alloy/helpers/refkey\";\nimport type { ComponentProps } from \"@powerlines/plugin-alloy/types/components\";\nimport {\n BuiltinFile,\n BuiltinFileProps,\n InterfaceDeclaration,\n InterfaceMember,\n ObjectDeclaration,\n TSDocSchemaProperty\n} from \"@powerlines/plugin-alloy/typescript/components\";\nimport {\n TSDoc,\n TSDocParam,\n TSDocRemarks,\n TSDocReturns\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport {\n generateParserCode,\n getPropertiesList,\n GetPropertiesResult,\n JsonSchema\n} from \"@powerlines/schema\";\nimport { deepClone } from \"@stryke/helpers/deep-clone\";\nimport { getUnique } from \"@stryke/helpers/get-unique\";\nimport { loadEnvFromContext } from \"../helpers/load\";\nimport type { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Generates the environment configuration typescript definition for the Powerlines project.\n */\nexport function EnvTypeDefinition() {\n const context = usePowerlines<EnvPluginContext>();\n\n return (\n <>\n <InterfaceDeclaration\n name=\"UnprefixedEnv\"\n schema={context.env.config.schema}\n export\n />\n <Spacing />\n <TSDoc heading=\"The environment configuration object with prefixed keys.\">\n <TSDocRemarks>\n {`The \\`Env\\` type extends the \\`UnprefixedEnv\\` 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 <BaseInterfaceDeclaration name=\"Env\" export extends=\"UnprefixedEnv\">\n <For\n each={getUnique(context.config.env.prefix).map(prefix =>\n prefix.replace(/_$/, \"\")\n )}\n doubleHardline>\n {prefix => (\n <For\n each={\n getPropertiesList(context.env.config.schema).filter(\n property => !property.ignore\n ) ?? []\n }\n doubleHardline>\n {property => (\n <>\n <TSDocSchemaProperty\n schema={property}\n defaultValue={property?.default}\n />\n <InterfaceMember\n name={`${prefix}_${property.name}`}\n type={`UnprefixedEnv[\"${property.name}\"]`}\n schema={property}\n required={property.required}\n readOnly={property.readOnly}\n />\n </>\n )}\n </For>\n )}\n </For>\n </BaseInterfaceDeclaration>\n <Spacing />\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(/^(${getUnique(\n 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 name: string;\n property: JsonSchema;\n}\n\nfunction ConfigPropertyGet(props: ConfigPropertyProps) {\n const [{ context, name, property, index }] = splitProps(props, [\n \"context\",\n \"name\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional name={name} context={context} />\n <Show when={property?.alias && property?.alias.length > 0}>\n {code` || `}\n <For each={property?.alias ?? []} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${name}\"];`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional name={name} context={context} />\n <Show when={property?.alias && property?.alias.length > 0}>\n {code` || `}\n <For each={property?.alias ?? []} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${name}\"];`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nfunction ConfigPropertySet(props: ConfigPropertyProps) {\n const [{ context, name, property, index }] = splitProps(props, [\n \"context\",\n \"name\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional name={name} context={context} />\n <Show when={property?.alias && property?.alias.length > 0}>\n {code` || `}\n <For each={property?.alias ?? []} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${name}\"] = newValue;\n return true;\n`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional name={name} context={context} />\n <Show when={property?.alias && property?.alias.length > 0}>\n {code` || `}\n <For each={property?.alias ?? []} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${name}\"] = newValue;\n return true;\n`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nexport interface EnvBuiltinProps extends Omit<BuiltinFileProps, \"id\"> {\n defaultConfig?: Children;\n}\n\nconst createEnvRefkey = refkey(\"createEnv\");\nconst envRefkey = refkey(\"env\");\n\n/**\n * Generates the environment configuration module for the Powerlines project.\n */\nexport function EnvBuiltin(props: EnvBuiltinProps) {\n const [{ defaultConfig, children }, rest] = splitProps(props, [\n \"defaultConfig\",\n \"children\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n const defaultValue = computed(\n () => context && loadEnvFromContext(context, process.env)\n );\n\n const schema = computed(() => {\n const result = deepClone(context.env.config.schema);\n result.name = \"Env\";\n return result;\n });\n\n const schemaGetProperties = computed(\n () =>\n (getPropertiesList(schema.value)\n .filter(property => !property?.ignore && !property?.writeOnly)\n .sort((a, b) =>\n !a?.name && !b?.name\n ? 0\n : !a?.name\n ? 1\n : !b?.name\n ? -1\n : a?.name.localeCompare(b?.name)\n ) ?? []) as GetPropertiesResult[]\n );\n const schemaSetProperties = computed(\n () =>\n (getPropertiesList(schema.value)\n .filter(property => !property?.ignore && !property?.readOnly)\n .sort((a, b) =>\n !a?.name && !b?.name\n ? 0\n : !a?.name\n ? 1\n : !b?.name\n ? -1\n : a?.name.localeCompare(b?.name)\n ) ?? []) as GetPropertiesResult[]\n );\n\n const parserCode = generateParserCode(schema.value);\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 <Show when={Boolean(schema.value)}>\n <EnvTypeDefinition defaultValue={defaultValue} />\n <Spacing />\n </Show>\n <ObjectDeclaration\n name=\"initialEnv\"\n type=\"Partial<Env>\"\n schema={schema.value}\n export\n const\n doc=\"The initial environment configuration object values for the runtime.\"\n />\n <Spacing />\n {parserCode}\n <Spacing />\n <Show when={Boolean(context?.entryPath)}>\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 <FunctionDeclaration\n refkey={createEnvRefkey}\n async={false}\n export\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 parse({\n ...initialEnv,\n ...environmentConfig\n }),\n {\n get: (target: UnprefixedEnv, propertyName: string) => { `}\n <hbr />\n <For each={schemaGetProperties.value}>\n {(property: GetPropertiesResult, index: number) => (\n <ConfigPropertyGet\n index={index}\n context={context}\n name={property.name}\n property={property}\n />\n )}\n </For>\n {code`\n return undefined;\n }, `}\n\n <Spacing />\n {code` set: (target: UnprefixedEnv, propertyName: string, newValue: any) => { `}\n <hbr />\n <For each={schemaSetProperties.value} ender={code` else `}>\n {(property: GetPropertiesResult, index: number) => (\n <ConfigPropertySet\n index={index}\n context={context}\n name={property.name}\n property={property}\n />\n )}\n </For>\n\n <hbr />\n {code`return false;\n }\n }\n );\n`}\n </FunctionDeclaration>\n </Show>\n <Spacing />\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\n const\n initializer={\n <>{code`createEnv(${defaultConfig || \"{}\"} as Partial<Env>);`}</>\n }\n />\n <Spacing />\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 <Spacing />\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 <Spacing />\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 <Spacing />\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 <Spacing />\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 <Spacing />\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 <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BuiltinFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;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AAS;IACT,SAAQ;IACR,MAAM;IACN,KAAK;IACL,aAAO,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDT,CAAC;GAAG,gBAAc,SAAA,CAAA,CAAA;GAAA,gBAAA,OAAA;IAChB,SAAM;IACN,IAAE,WAAI;KACJ,OAAI,gBAAa,cAAA,EACjB,UAAY,IAAC;;;;YAKb,CAAA;IACF;GACF,CAAC;GAAG,gBAAkB,gBAAE;IACtB,UAAM;IACN,SAAM;IACN,MAAM;IACN,aAAM,IAAA;GACR,CAAC;GAAG,gBAAiB,SAAA,CAAA,CAAA;GAAA,gBAAA,gBAAA;IACnB,UAAM;IACN,SAAM;IACN,MAAM;IACN,KAAK;IACL,aAAM,IAAW;GACnB,CAAC;GAAG,gBAAI,SAAkB,CAAA,CAAA;GAAA,gBAAA,gBAAA;IACxB,UAAM;IACN,SAAM;IACN,MAAM;IACN,KAAK;IACL,aAAM,IAAW;GACnB,CAAC;GAAG,gBAAe,SAAA,CAAA,CAAA;GAAA,gBAAA,gBAAA;IACjB,UAAM;IACN,SAAM;IACN,MAAM;IACN,KAAK;IACL,aAAa,IAAC;GAChB,CAAC;GAAG,gBAAU,SAAA,CAAA,CAAA;GAAA,gBAAA,gBAAA;IACZ,UAAM;IACN,SAAM;IACN,MAAM;IACN,KAAK;IACL,aAAI,IAAA;GACN,CAAC;GAAA,gBAAA,SAAA,CAAA,CAAA;GAAA,gBAAA,MAAA;IACA,IAAA,OAAS;;IAET;IACE;GACH,CAAC;EAAC;CACJ,EACF,CAAC,CAAC;AACJ;AACA,WAAW,SAAA;OAAA;CAAA;CAAA;CAAA;CAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-env",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.305",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Powerlines plugin for injecting static .env configuration values to the code so that they're accessible at runtime.",
|
|
6
6
|
"keywords": ["dotenv", "powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -250,12 +250,12 @@
|
|
|
250
250
|
"@alloy-js/typescript": "^0.23.0",
|
|
251
251
|
"@babel/core": "8.0.0-rc.6",
|
|
252
252
|
"@babel/types": "8.0.0-rc.6",
|
|
253
|
-
"@powerlines/core": "^0.48.
|
|
254
|
-
"@powerlines/plugin-alloy": "
|
|
255
|
-
"@powerlines/plugin-automd": "
|
|
256
|
-
"@powerlines/plugin-babel": "
|
|
257
|
-
"@powerlines/plugin-plugin": "
|
|
258
|
-
"@powerlines/schema": "
|
|
253
|
+
"@powerlines/core": "^0.48.34",
|
|
254
|
+
"@powerlines/plugin-alloy": "0.26.194",
|
|
255
|
+
"@powerlines/plugin-automd": "0.1.563",
|
|
256
|
+
"@powerlines/plugin-babel": "0.13.98",
|
|
257
|
+
"@powerlines/plugin-plugin": "0.12.514",
|
|
258
|
+
"@powerlines/schema": "0.11.84",
|
|
259
259
|
"@storm-software/config-tools": "^1.190.37",
|
|
260
260
|
"@stryke/capnp": "^0.12.109",
|
|
261
261
|
"@stryke/convert": "^0.7.13",
|
|
@@ -270,9 +270,9 @@
|
|
|
270
270
|
"automd": "^0.4.3",
|
|
271
271
|
"c12": "^3.3.4",
|
|
272
272
|
"defu": "^6.1.7",
|
|
273
|
-
"powerlines": "
|
|
273
|
+
"powerlines": "0.47.102"
|
|
274
274
|
},
|
|
275
275
|
"devDependencies": { "@types/node": "^25.9.1", "vite": "^8.0.14" },
|
|
276
276
|
"publishConfig": { "access": "public" },
|
|
277
|
-
"gitHead": "
|
|
277
|
+
"gitHead": "1babfdc217eff1881035a335d23d26327fad6904"
|
|
278
278
|
}
|