@powerlines/plugin-env 0.16.32 → 0.16.34
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/components/docs.cjs +1 -1
- package/dist/components/docs.mjs +1 -1
- package/dist/components/{env.cjs → env-builtin.cjs} +1 -1
- package/dist/components/{env.d.cts → env-builtin.d.cts} +2 -2
- package/dist/components/env-builtin.d.cts.map +1 -0
- package/dist/components/{env.d.mts → env-builtin.d.mts} +2 -2
- package/dist/components/env-builtin.d.mts.map +1 -0
- package/dist/components/{env.mjs → env-builtin.mjs} +2 -2
- package/dist/components/env-builtin.mjs.map +1 -0
- package/dist/components/index.cjs +3 -3
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/helpers/automd-generator.cjs +1 -1
- package/dist/helpers/automd-generator.mjs +1 -1
- package/dist/helpers/docs-helper.cjs +1 -1
- package/dist/helpers/docs-helper.mjs +1 -1
- package/dist/helpers/load.cjs +1 -1
- package/dist/helpers/load.mjs +1 -1
- package/dist/helpers/persistence.cjs +1 -1
- package/dist/helpers/persistence.mjs +1 -1
- package/dist/helpers/reflect.cjs +2 -2
- package/dist/helpers/reflect.mjs +2 -2
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/parse-type-definition.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/parse-type-definition.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/parse-type-definition.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/to-array.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/to-array.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/to-array.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.12 → @stryke_path@0.26.15}/node_modules/@stryke/path/dist/is-parent-path.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.12 → @stryke_path@0.26.15}/node_modules/@stryke/path/dist/is-parent-path.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.12 → @stryke_path@0.26.15}/node_modules/@stryke/path/dist/is-parent-path.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.12 → @stryke_path@0.26.15}/node_modules/@stryke/path/dist/is-type.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.12 → @stryke_path@0.26.15}/node_modules/@stryke/path/dist/is-type.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.12 → @stryke_path@0.26.15}/node_modules/@stryke/path/dist/is-type.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.12 → @stryke_path@0.26.15}/node_modules/@stryke/path/dist/join-paths.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.12 → @stryke_path@0.26.15}/node_modules/@stryke/path/dist/join-paths.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.12 → @stryke_path@0.26.15}/node_modules/@stryke/path/dist/join-paths.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.12 → @stryke_path@0.26.15}/node_modules/@stryke/path/dist/regex.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.12 → @stryke_path@0.26.15}/node_modules/@stryke/path/dist/regex.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.12 → @stryke_path@0.26.15}/node_modules/@stryke/path/dist/regex.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.12 → @stryke_path@0.26.15}/node_modules/@stryke/path/dist/slash.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.12 → @stryke_path@0.26.15}/node_modules/@stryke/path/dist/slash.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.12 → @stryke_path@0.26.15}/node_modules/@stryke/path/dist/slash.mjs.map +1 -1
- package/package.json +23 -23
- package/dist/components/env.d.cts.map +0 -1
- package/dist/components/env.d.mts.map +0 -1
- package/dist/components/env.mjs.map +0 -1
- /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +0 -0
- /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.46 → @stryke_convert@0.6.49}/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +0 -0
package/dist/components/docs.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.
|
|
2
|
+
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.15/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
3
3
|
const require_helpers_docs_helper = require('../helpers/docs-helper.cjs');
|
|
4
4
|
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
5
5
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
package/dist/components/docs.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.
|
|
1
|
+
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.15/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
2
2
|
import { getDocsOutputPath } from "../helpers/docs-helper.mjs";
|
|
3
3
|
import { stringifyType } from "@powerlines/deepkit/vendor/type";
|
|
4
4
|
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
@@ -14,7 +14,7 @@ let __powerlines_plugin_alloy_typescript_components_interface_declaration = requ
|
|
|
14
14
|
let __powerlines_plugin_alloy_typescript_components_object_declaration = require("@powerlines/plugin-alloy/typescript/components/object-declaration");
|
|
15
15
|
let __powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
|
16
16
|
|
|
17
|
-
//#region src/components/env.tsx
|
|
17
|
+
//#region src/components/env-builtin.tsx
|
|
18
18
|
/**
|
|
19
19
|
* Generates the environment configuration typescript definition for the Powerlines project.
|
|
20
20
|
*/
|
|
@@ -3,7 +3,7 @@ import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
|
|
|
3
3
|
import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
|
|
4
4
|
import { InterfaceDeclarationProps } from "@powerlines/plugin-alloy/typescript/components/interface-declaration";
|
|
5
5
|
|
|
6
|
-
//#region src/components/env.d.ts
|
|
6
|
+
//#region src/components/env-builtin.d.ts
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Generates the environment configuration typescript definition for the Powerlines project.
|
|
@@ -20,4 +20,4 @@ declare function EnvBuiltin(props: EnvBuiltinProps): Children;
|
|
|
20
20
|
declare type __ΩEnvBuiltinProps = any[];
|
|
21
21
|
//#endregion
|
|
22
22
|
export { EnvBuiltin, EnvBuiltinProps, EnvTypeDefinition, __ΩEnvBuiltinProps };
|
|
23
|
-
//# sourceMappingURL=env.d.cts.map
|
|
23
|
+
//# sourceMappingURL=env-builtin.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-builtin.d.cts","names":[],"sources":["../../src/components/env-builtin.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAqEA;AACc,iBADE,iBAAA,CACF,KAAA,EAAL,IAAK,CAAA,yBAAA,EAAA,MAAA,CAAA,CAAA,EAAkC,QAAlC;AAAL,UAkLQ,eAAA,SAAwB,IAlLhC,CAkLqC,gBAlLrC,EAAA,IAAA,CAAA,CAAA;EAAuC,aAAA,CAAA,EAmL9B,QAnL8B;EAAA,UAAA,EAoLlC,eApLkC,CAAA,GAAA,CAAA;AAkLhD;;;;AAAyC,iBAYzB,UAAA,CAZyB,KAAA,EAYP,eAZO,CAAA,EAYQ,QAZR;AAAI,kCAAA,GAAA,EAAA"}
|
|
@@ -3,7 +3,7 @@ import { Children } from "@alloy-js/core";
|
|
|
3
3
|
import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
|
|
4
4
|
import { InterfaceDeclarationProps } from "@powerlines/plugin-alloy/typescript/components/interface-declaration";
|
|
5
5
|
|
|
6
|
-
//#region src/components/env.d.ts
|
|
6
|
+
//#region src/components/env-builtin.d.ts
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Generates the environment configuration typescript definition for the Powerlines project.
|
|
@@ -20,4 +20,4 @@ declare function EnvBuiltin(props: EnvBuiltinProps): Children;
|
|
|
20
20
|
declare type __ΩEnvBuiltinProps = any[];
|
|
21
21
|
//#endregion
|
|
22
22
|
export { EnvBuiltin, EnvBuiltinProps, EnvTypeDefinition, __ΩEnvBuiltinProps };
|
|
23
|
-
//# sourceMappingURL=env.d.mts.map
|
|
23
|
+
//# sourceMappingURL=env-builtin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-builtin.d.mts","names":[],"sources":["../../src/components/env-builtin.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAqEA;AACc,iBADE,iBAAA,CACF,KAAA,EAAL,IAAK,CAAA,yBAAA,EAAA,MAAA,CAAA,CAAA,EAAkC,QAAlC;AAAL,UAkLQ,eAAA,SAAwB,IAlLhC,CAkLqC,gBAlLrC,EAAA,IAAA,CAAA,CAAA;EAAuC,aAAA,CAAA,EAmL9B,QAnL8B;EAAA,UAAA,EAoLlC,eApLkC,CAAA,GAAA,CAAA;AAkLhD;;;;AAAyC,iBAYzB,UAAA,CAZyB,KAAA,EAYP,eAZO,CAAA,EAYQ,QAZR;AAAI,kCAAA,GAAA,EAAA"}
|
|
@@ -13,7 +13,7 @@ import { InterfaceDeclaration } from "@powerlines/plugin-alloy/typescript/compon
|
|
|
13
13
|
import { ObjectDeclaration } from "@powerlines/plugin-alloy/typescript/components/object-declaration";
|
|
14
14
|
import { TSDoc, TSDocExample, TSDocLink, TSDocParam, TSDocRemarks, TSDocReturns, TSDocThrows } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
|
|
15
15
|
|
|
16
|
-
//#region src/components/env.tsx
|
|
16
|
+
//#region src/components/env-builtin.tsx
|
|
17
17
|
/**
|
|
18
18
|
* Generates the environment configuration typescript definition for the Powerlines project.
|
|
19
19
|
*/
|
|
@@ -562,4 +562,4 @@ function EnvBuiltin(props) {
|
|
|
562
562
|
|
|
563
563
|
//#endregion
|
|
564
564
|
export { EnvBuiltin, EnvTypeDefinition };
|
|
565
|
-
//# sourceMappingURL=env.mjs.map
|
|
565
|
+
//# sourceMappingURL=env-builtin.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-builtin.mjs","names":["code","computed","For","Show","splitProps","ClassDeclaration","ClassMethod","ElseIfClause","FunctionDeclaration","IfStatement","NewExpression","TypeDeclaration","VarDeclaration","ReflectionClass","ReflectionKind","Spacing","usePowerlines","refkey","BuiltinFile","InterfaceDeclaration","ObjectDeclaration","TSDoc","TSDocExample","TSDocLink","TSDocParam","TSDocRemarks","TSDocReturns","TSDocThrows","titleCase","defu","loadEnvFromContext","EnvTypeDefinition","props","defaultValue","reflection","context","_$createComponent","name","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","_$createIntrinsic","type","doc","initializer","args","target","entryPath","async","parameters","optional","default","returnType","ender"],"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 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 { 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 { ComponentProps } from \"@powerlines/plugin-alloy/types/components\";\nimport {\n BuiltinFile,\n BuiltinFileProps\n} from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport type { InterfaceDeclarationProps } from \"@powerlines/plugin-alloy/typescript/components/interface-declaration\";\nimport { InterfaceDeclaration } from \"@powerlines/plugin-alloy/typescript/components/interface-declaration\";\nimport { ObjectDeclaration } from \"@powerlines/plugin-alloy/typescript/components/object-declaration\";\nimport {\n TSDoc,\n TSDocExample,\n TSDocLink,\n TSDocParam,\n TSDocRemarks,\n TSDocReturns,\n TSDocThrows\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\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<InterfaceDeclarationProps, \"name\">\n) {\n const [{ defaultValue, reflection }] = splitProps(props, [\n \"defaultValue\",\n \"reflection\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n\n return (\n <>\n <InterfaceDeclaration\n name=\" EnvBase\"\n defaultValue={defaultValue}\n reflection={reflection}\n export={true}\n />\n <Spacing />\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 <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(/^(${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 <ObjectDeclaration\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 <Spacing />\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`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 </ClassMethod>\n </ClassDeclaration>\n <Spacing />\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 <Spacing />\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 <Spacing />\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 <Spacing />\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 <Spacing />\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 <Spacing />\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 <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 />\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":";;;;;;;;;;;;;;;;;;;AAqEA,SAAgB+B,kBACdC,OACA;CACA,MAAM,CAAC,EAAEC,cAAcC,gBAAgB9B,WAAW4B,OAAO,CACvD,gBACA,aACD,CAAC;CAEF,MAAMG,UAAUnB,eAAiC;AAEjD,QAAA;EAAAo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|
-
exports.EnvBuiltin =
|
|
4
|
+
exports.EnvBuiltin = require_components_env_builtin.EnvBuiltin;
|
|
5
5
|
exports.EnvDocsFile = require_components_docs.EnvDocsFile;
|
|
6
|
-
exports.EnvTypeDefinition =
|
|
6
|
+
exports.EnvTypeDefinition = require_components_env_builtin.EnvTypeDefinition;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { EnvDocsFile, EnvDocsFileProps, __ΩEnvDocsFileProps } from "./docs.cjs";
|
|
2
|
-
import { EnvBuiltin, EnvBuiltinProps, EnvTypeDefinition, __ΩEnvBuiltinProps } from "./env.cjs";
|
|
2
|
+
import { EnvBuiltin, EnvBuiltinProps, EnvTypeDefinition, __ΩEnvBuiltinProps } from "./env-builtin.cjs";
|
|
3
3
|
export { EnvBuiltin, EnvBuiltinProps, EnvDocsFile, EnvDocsFileProps, EnvTypeDefinition, __ΩEnvBuiltinProps, __ΩEnvDocsFileProps };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { EnvDocsFile, EnvDocsFileProps, __ΩEnvDocsFileProps } from "./docs.mjs";
|
|
2
|
-
import { EnvBuiltin, EnvBuiltinProps, EnvTypeDefinition, __ΩEnvBuiltinProps } from "./env.mjs";
|
|
2
|
+
import { EnvBuiltin, EnvBuiltinProps, EnvTypeDefinition, __ΩEnvBuiltinProps } from "./env-builtin.mjs";
|
|
3
3
|
export { EnvBuiltin, EnvBuiltinProps, EnvDocsFile, EnvDocsFileProps, EnvTypeDefinition, __ΩEnvBuiltinProps, __ΩEnvDocsFileProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.
|
|
2
|
+
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.15/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
3
3
|
let powerlines = require("powerlines");
|
|
4
4
|
let automd = require("automd");
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.
|
|
1
|
+
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.15/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
2
2
|
import { __ΩUnresolvedContext } from "powerlines";
|
|
3
3
|
import { defineGenerator } from "automd";
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_types_plugin = require('../types/plugin.cjs');
|
|
2
|
-
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.
|
|
2
|
+
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.15/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
3
3
|
|
|
4
4
|
//#region src/helpers/docs-helper.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __ΩEnvPluginContext } from "../types/plugin.mjs";
|
|
2
|
-
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.
|
|
2
|
+
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.15/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/helpers/docs-helper.ts
|
|
5
5
|
/**
|
package/dist/helpers/load.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_types_plugin = require('../types/plugin.cjs');
|
|
3
|
-
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.
|
|
3
|
+
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.15/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
4
4
|
const require_helpers_source_file_env = require('./source-file-env.cjs');
|
|
5
5
|
const require_defu = require('../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs');
|
|
6
6
|
const require_index = require('../node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.cjs');
|
package/dist/helpers/load.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __ΩEnvPluginContext, __ΩEnvPluginOptions } from "../types/plugin.mjs";
|
|
2
|
-
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.
|
|
2
|
+
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.15/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
3
3
|
import { removeEnvPrefix } from "./source-file-env.mjs";
|
|
4
4
|
import { defu } from "../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs";
|
|
5
5
|
import { loadConfig } from "../node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_types_plugin = require('../types/plugin.cjs');
|
|
3
|
-
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.
|
|
3
|
+
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.15/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
4
4
|
const require_helpers_reflect = require('./reflect.cjs');
|
|
5
5
|
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
6
6
|
let powerlines = require("powerlines");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __ΩEnvPluginContext, __ΩEnvPluginResolvedConfig, __ΩEnvType } from "../types/plugin.mjs";
|
|
2
|
-
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.
|
|
2
|
+
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.15/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
3
3
|
import { createEnvReflection } from "./reflect.mjs";
|
|
4
4
|
import { ReflectionClass, ReflectionKind, deserializeType, resolveClassType } from "@powerlines/deepkit/vendor/type";
|
|
5
5
|
import { __ΩContext, __ΩUnresolvedContext } from "powerlines";
|
package/dist/helpers/reflect.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_types_runtime = require('../types/runtime.cjs');
|
|
3
3
|
const require_types_plugin = require('../types/plugin.cjs');
|
|
4
|
-
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.
|
|
5
|
-
const require_is_parent_path = require('../node_modules/.pnpm/@stryke_path@0.26.
|
|
4
|
+
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.15/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
5
|
+
const require_is_parent_path = require('../node_modules/.pnpm/@stryke_path@0.26.15/node_modules/@stryke/path/dist/is-parent-path.cjs');
|
|
6
6
|
const require_helpers_persistence = require('./persistence.cjs');
|
|
7
7
|
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
8
8
|
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
package/dist/helpers/reflect.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __ΩEnvInterface, __ΩSecretsInterface } from "../types/runtime.mjs";
|
|
2
2
|
import { __ΩEnvPluginContext } from "../types/plugin.mjs";
|
|
3
|
-
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.
|
|
4
|
-
import { isParentPath } from "../node_modules/.pnpm/@stryke_path@0.26.
|
|
3
|
+
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.15/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
4
|
+
import { isParentPath } from "../node_modules/.pnpm/@stryke_path@0.26.15/node_modules/@stryke/path/dist/is-parent-path.mjs";
|
|
5
5
|
import { getEnvDefaultTypeDefinition, getSecretsDefaultTypeDefinition, readEnvTypeReflection, readSecretsReflection } from "./persistence.mjs";
|
|
6
6
|
import { ReflectionClass, ReflectionKind, __ΩTypeClass, __ΩTypeObjectLiteral, merge, resolveClassType } from "@powerlines/deepkit/vendor/type";
|
|
7
7
|
import { titleCase } from "@stryke/string-format/title-case";
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
3
|
-
const require_join_paths = require('./node_modules/.pnpm/@stryke_path@0.26.
|
|
3
|
+
const require_join_paths = require('./node_modules/.pnpm/@stryke_path@0.26.15/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
4
4
|
const require_helpers_reflect = require('./helpers/reflect.cjs');
|
|
5
5
|
const require_helpers_persistence = require('./helpers/persistence.cjs');
|
|
6
6
|
const require_defu = require('./node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs');
|
|
@@ -8,10 +8,10 @@ const require_helpers_load = require('./helpers/load.cjs');
|
|
|
8
8
|
const require_helpers_docs_helper = require('./helpers/docs-helper.cjs');
|
|
9
9
|
const require_helpers_automd_generator = require('./helpers/automd-generator.cjs');
|
|
10
10
|
const require_components_docs = require('./components/docs.cjs');
|
|
11
|
-
const
|
|
11
|
+
const require_components_env_builtin = require('./components/env-builtin.cjs');
|
|
12
12
|
const require_babel_plugin = require('./babel/plugin.cjs');
|
|
13
|
-
const require_parse_type_definition = require('./node_modules/.pnpm/@stryke_convert@0.6.
|
|
14
|
-
const require_to_array = require('./node_modules/.pnpm/@stryke_convert@0.6.
|
|
13
|
+
const require_parse_type_definition = require('./node_modules/.pnpm/@stryke_convert@0.6.49/node_modules/@stryke/convert/dist/parse-type-definition.cjs');
|
|
14
|
+
const require_to_array = require('./node_modules/.pnpm/@stryke_convert@0.6.49/node_modules/@stryke/convert/dist/to-array.cjs');
|
|
15
15
|
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
16
16
|
let __stryke_env_types = require("@stryke/env/types");
|
|
17
17
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
@@ -139,7 +139,7 @@ const plugin = (options = {}) => {
|
|
|
139
139
|
const _self$ = this;
|
|
140
140
|
this.debug(`Preparing the Environment runtime artifacts for the Powerlines project.`);
|
|
141
141
|
const result = await require_helpers_persistence.readEnvTypeReflection(this, "env");
|
|
142
|
-
return (0, __powerlines_plugin_alloy_render.render)(this, (0, __alloy_js_core_jsx_runtime.createComponent)(
|
|
142
|
+
return (0, __powerlines_plugin_alloy_render.render)(this, (0, __alloy_js_core_jsx_runtime.createComponent)(require_components_env_builtin.EnvBuiltin, {
|
|
143
143
|
get defaultConfig() {
|
|
144
144
|
return _self$.config.env.defaultConfig;
|
|
145
145
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { joinPaths } from "./node_modules/.pnpm/@stryke_path@0.26.
|
|
1
|
+
import { joinPaths } from "./node_modules/.pnpm/@stryke_path@0.26.15/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
2
2
|
import { reflectEnv, reflectSecrets } from "./helpers/reflect.mjs";
|
|
3
3
|
import { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, readEnvReflection, readEnvTypeReflection, readSecretsReflection, writeEnvReflection, writeEnvTypeReflection } from "./helpers/persistence.mjs";
|
|
4
4
|
import { defu } from "./node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs";
|
|
@@ -6,10 +6,10 @@ import { loadEnv } from "./helpers/load.mjs";
|
|
|
6
6
|
import { getDocsOutputPath } from "./helpers/docs-helper.mjs";
|
|
7
7
|
import { env } from "./helpers/automd-generator.mjs";
|
|
8
8
|
import { EnvDocsFile } from "./components/docs.mjs";
|
|
9
|
-
import { EnvBuiltin } from "./components/env.mjs";
|
|
9
|
+
import { EnvBuiltin } from "./components/env-builtin.mjs";
|
|
10
10
|
import { envBabelPlugin } from "./babel/plugin.mjs";
|
|
11
|
-
import { parseTypeDefinition } from "./node_modules/.pnpm/@stryke_convert@0.6.
|
|
12
|
-
import { toArray } from "./node_modules/.pnpm/@stryke_convert@0.6.
|
|
11
|
+
import { parseTypeDefinition } from "./node_modules/.pnpm/@stryke_convert@0.6.49/node_modules/@stryke/convert/dist/parse-type-definition.mjs";
|
|
12
|
+
import { toArray } from "./node_modules/.pnpm/@stryke_convert@0.6.49/node_modules/@stryke/convert/dist/to-array.mjs";
|
|
13
13
|
import { ReflectionClass, ReflectionKind } from "@powerlines/deepkit/vendor/type";
|
|
14
14
|
import { ENV_PREFIXES } from "@stryke/env/types";
|
|
15
15
|
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["ReflectionClass","ReflectionKind","alloy","render","automd","babel","parseTypeDefinition","toArray","ENV_PREFIXES","existsSync","joinPaths","constantCase","isSetString","defu","envBabelPlugin","EnvDocsFile","EnvBuiltin","env","getDocsOutputPath","loadEnv","getEnvDefaultTypeDefinition","getEnvReflectionsPath","getEnvTypeReflectionsPath","getSecretsDefaultTypeDefinition","readEnvReflection","readEnvTypeReflection","readSecretsReflection","writeEnvReflection","writeEnvTypeReflection","reflectEnv","reflectSecrets","plugin","options","name","config","debug","types","validate","inject","prefix","transform","plugins","file","fs","resolve","warn","envDefaultTypeDefinition","secrets","secretsDefaultTypeDefinition","reduce","ret","formattedPrefix","includes","push","framework","filter","Boolean","replace","configResolved","parsed","used","injected","command","skipCache","persistedMeta","checksum","meta","Error","getProperties","length","envWithAlias","prop","getAlias","Object","entries","forEach","key","value","unprefixedKey","startsWith","slice","aliasKey","find","reverse","hasProperty","getProperty","setDefaultValue","kind","objectLiteral","typeName","description","prepare","_self$","result","_$createComponent","defaultConfig","reflection","order","handler","trace","docs","levelOffset","buildEnd","reflectionPath","generators","vite","envPrefix"],"sources":["../src/index.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 ReflectionClass,\n ReflectionKind\n} from \"@powerlines/deepkit/vendor/type\";\nimport alloy from \"@powerlines/plugin-alloy\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport automd from \"@powerlines/plugin-automd\";\nimport babel from \"@powerlines/plugin-babel\";\nimport { parseTypeDefinition } from \"@stryke/convert/parse-type-definition\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { ENV_PREFIXES } from \"@stryke/env/types\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { constantCase } from \"@stryke/string-format/constant-case\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport {\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport type { UserConfig as ViteUserConfig } from \"vite\";\nimport { envBabelPlugin } from \"./babel/plugin\";\nimport { EnvDocsFile } from \"./components/docs\";\nimport { EnvBuiltin } from \"./components/env\";\nimport { env } from \"./helpers/automd-generator\";\nimport { getDocsOutputPath } from \"./helpers/docs-helper\";\nimport { loadEnv } from \"./helpers/load\";\nimport {\n getEnvDefaultTypeDefinition,\n getEnvReflectionsPath,\n getEnvTypeReflectionsPath,\n getSecretsDefaultTypeDefinition,\n readEnvReflection,\n readEnvTypeReflection,\n readSecretsReflection,\n writeEnvReflection,\n writeEnvTypeReflection\n} from \"./helpers/persistence\";\nimport { reflectEnv, reflectSecrets } from \"./helpers/reflect\";\nimport { EnvPluginContext, EnvPluginOptions } from \"./types/plugin\";\n\ndeclare module \"@powerlines/core\" {\n interface BaseConfig {\n env?: EnvPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to inject environment variables into the source code.\n */\nexport const plugin = <TContext extends EnvPluginContext = EnvPluginContext>(\n options: EnvPluginOptions = {}\n) => {\n return [\n alloy(options.alloy),\n babel(options.babel),\n {\n name: \"env\",\n async config() {\n this.debug(\n \"Providing default configuration for the Powerlines `env` build plugin.\"\n );\n\n const config = {\n env: defu(options, {\n types: {} as TypeDefinitionParameter,\n validate: false,\n inject: false,\n prefix: []\n }),\n transform: {\n babel: {\n plugins: [envBabelPlugin]\n }\n }\n };\n\n if (\n isSetString(config.env.types) ||\n (config.env.types && isSetString(config.env.types.file))\n ) {\n config.env.types = parseTypeDefinition(\n config.env.types\n ) as TypeDefinition;\n\n const file = await this.fs.resolve(config.env.types.file);\n if (file) {\n config.env.types.file = file;\n }\n } else {\n this.warn(\n \"The `env.types` configuration parameter was not provided. Please ensure this is expected.\"\n );\n\n const envDefaultTypeDefinition =\n await getEnvDefaultTypeDefinition(this);\n\n const file = await this.fs.resolve(envDefaultTypeDefinition.file);\n if (file) {\n config.env.types = parseTypeDefinition(\n `${file}#${envDefaultTypeDefinition.name}`\n ) as TypeDefinition;\n }\n }\n\n if (\n isSetString(config.env.secrets) ||\n (config.env.secrets && isSetString(config.env.secrets.file))\n ) {\n config.env.secrets = parseTypeDefinition(\n config.env.secrets\n ) as TypeDefinition;\n\n const file = await this.fs.resolve(config.env.secrets.file);\n if (file) {\n config.env.secrets.file = file;\n }\n } else {\n const secretsDefaultTypeDefinition =\n await getSecretsDefaultTypeDefinition(this);\n\n const file = await this.fs.resolve(secretsDefaultTypeDefinition.file);\n if (file) {\n config.env.secrets = parseTypeDefinition(\n `${file}#${secretsDefaultTypeDefinition.name}`\n ) as TypeDefinition;\n }\n }\n\n config.env.prefix = toArray(\n (config.env.prefix ?? []) as string[]\n ).reduce(\n (ret: string[], prefix: string) => {\n const formattedPrefix = constantCase(prefix);\n if (!ret.includes(formattedPrefix)) {\n ret.push(formattedPrefix);\n }\n\n return ret;\n },\n [\n ...ENV_PREFIXES,\n \"POWERLINES_\",\n this.config.framework &&\n this.config.framework !== \"powerlines\" &&\n `${constantCase(this.config.framework)}_`\n ].filter(Boolean) as string[]\n );\n\n config.env.prefix = toArray(config.env.prefix).reduce((ret, prefix) => {\n if (!ret.includes(prefix.replace(/_$/g, \"\"))) {\n ret.push(prefix.replace(/_$/g, \"\"));\n }\n return ret;\n }, [] as string[]);\n\n return config;\n },\n async configResolved() {\n this.debug(\n `Environment plugin configuration has been resolved for the Powerlines project.`\n );\n\n this.env = defu(\n {\n parsed: await loadEnv(this, this.config.env)\n },\n this.env ?? {},\n {\n types: {\n env: {}\n },\n used: {\n env: {},\n secrets: {}\n },\n parsed: {},\n injected: {}\n }\n ) as EnvPluginContext[\"env\"];\n\n if (\n this.config.command !== \"prepare\" &&\n !this.config.skipCache &&\n this.persistedMeta?.checksum === this.meta.checksum &&\n existsSync(getEnvTypeReflectionsPath(this, \"env\"))\n ) {\n this.debug(\n `Skipping reflection initialization as the meta checksum has not changed.`\n );\n\n this.env.types.env = await readEnvTypeReflection(this, \"env\");\n\n if (existsSync(getEnvReflectionsPath(this, \"env\"))) {\n this.env.used.env = await readEnvReflection(this);\n }\n\n if (existsSync(getEnvTypeReflectionsPath(this, \"secrets\"))) {\n this.env.types.secrets = await readEnvTypeReflection(\n this,\n \"secrets\"\n );\n }\n\n if (existsSync(getEnvReflectionsPath(this, \"secrets\"))) {\n this.env.used.secrets = await readSecretsReflection(this);\n }\n } else {\n this.debug(\n `Starting environment configuration reflection initialization.`\n );\n\n this.env.types.env = await reflectEnv(\n this,\n this.config.env.types?.file,\n this.config.env.types?.name\n );\n if (!this.env.types.env) {\n throw new Error(\n \"Failed to find the environment configuration type reflection in the context.\"\n );\n }\n\n await writeEnvTypeReflection(this, this.env.types.env, \"env\");\n\n this.env.types.secrets = await reflectSecrets(\n this,\n this.config.env.secrets?.file,\n this.config.env.secrets?.name\n );\n if (!this.env.types.secrets) {\n throw new Error(\n \"Failed to find the secrets configuration type reflection in the context.\"\n );\n }\n\n await writeEnvTypeReflection(this, this.env.types.secrets, \"secrets\");\n\n this.debug(\n `Resolved ${\n this.env.types.env.getProperties().length ?? 0\n } environment configuration parameters and ${\n this.env.types.secrets?.getProperties().length ?? 0\n } secret configuration parameters`\n );\n\n const envWithAlias = this.env.types.env\n .getProperties()\n .filter(prop => prop.getAlias().length > 0);\n\n Object.entries(await loadEnv(this, this.config.env)).forEach(\n ([key, value]) => {\n const unprefixedKey = this.config.env.prefix.reduce(\n (ret, prefix) => {\n if (key.replace(/_$/g, \"\").startsWith(prefix)) {\n return key.replace(/_$/g, \"\").slice(prefix.length);\n }\n return ret;\n },\n key\n );\n\n const aliasKey = envWithAlias.find(prop =>\n prop?.getAlias().reverse().includes(unprefixedKey)\n );\n if (this.env.types.env?.hasProperty(unprefixedKey) || aliasKey) {\n this.env.types.env\n .getProperty(unprefixedKey)\n .setDefaultValue(value);\n }\n }\n );\n\n this.env.used.env = new ReflectionClass(\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Env\",\n description: `An object containing the environment configuration parameters used by the ${\n this.config.name\n ? `${this.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n this.env.types.env\n );\n\n await writeEnvReflection(this, this.env.used.env, \"env\");\n\n if (this.env.types.secrets) {\n await writeEnvTypeReflection(\n this,\n this.env.types.secrets,\n \"secrets\"\n );\n\n this.env.used.secrets = new ReflectionClass(\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Secrets\",\n description: `An object containing the secret configuration parameters used by the ${\n this.config.name\n ? `${this.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n this.env.types.secrets\n );\n await writeEnvReflection(this, this.env.used.secrets, \"secrets\");\n }\n }\n },\n async prepare() {\n this.debug(\n `Preparing the Environment runtime artifacts for the Powerlines project.`\n );\n\n const result = await readEnvTypeReflection(this, \"env\");\n\n return render(\n this,\n <EnvBuiltin\n defaultConfig={this.config.env.defaultConfig}\n reflection={result}\n />\n );\n },\n transform: {\n order: \"post\",\n async handler() {\n if (this.env.used.env.getProperties().length > 0) {\n this.trace(\n `Persisting used environment configuration reflections to ${getEnvReflectionsPath(\n this,\n \"env\"\n )}.`\n );\n await writeEnvReflection(this, this.env.used.env, \"env\");\n }\n\n if (this.env.used.secrets.getProperties().length > 0) {\n this.trace(\n `Persisting used secret configuration reflections to ${getEnvReflectionsPath(\n this,\n \"secrets\"\n )}.`\n );\n await writeEnvReflection(this, this.env.used.secrets, \"secrets\");\n }\n }\n },\n async docs() {\n this.debug(\n `Documenting environment variables configuration values in \"${joinPaths(\n getDocsOutputPath(this),\n \"env.md\"\n )}\"`\n );\n\n const result = await readEnvTypeReflection(this, \"env\");\n\n return render(\n this,\n <EnvDocsFile levelOffset={0} reflection={result} />\n );\n },\n async buildEnd() {\n const reflectionPath = getEnvReflectionsPath(this, \"env\");\n\n this.debug(`Writing env reflection types to ${reflectionPath}.`);\n\n await writeEnvReflection(this, this.env.used.env, \"env\");\n }\n },\n {\n name: \"env:automd-generator\",\n config() {\n return {\n automd: defu(options.automd ?? {}, {\n generators: {\n env: env(this)\n }\n })\n };\n }\n },\n {\n name: \"env:vite\",\n vite: {\n configResolved(this: TContext) {\n return {\n envPrefix: this.config?.env?.prefix\n } as ViteUserConfig;\n }\n }\n },\n automd(options.automd)\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,MAAa+B,UACXC,UAA4B,EAAE,KAC3B;AACH,QAAO;EACL9B,MAAM8B,QAAQ9B,MAAM;EACpBG,MAAM2B,QAAQ3B,MAAM;EACpB;GACE4B,MAAM;GACN,MAAMC,SAAS;AACb,SAAKC,MACH,yEACD;IAED,MAAMD,SAAS;KACbjB,KAAKJ,KAAKmB,SAAS;MACjBI,OAAO,EAA6B;MACpCC,UAAU;MACVC,QAAQ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B;;AAGH,kBAAe2B"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["ReflectionClass","ReflectionKind","alloy","render","automd","babel","parseTypeDefinition","toArray","ENV_PREFIXES","existsSync","joinPaths","constantCase","isSetString","defu","envBabelPlugin","EnvDocsFile","EnvBuiltin","env","getDocsOutputPath","loadEnv","getEnvDefaultTypeDefinition","getEnvReflectionsPath","getEnvTypeReflectionsPath","getSecretsDefaultTypeDefinition","readEnvReflection","readEnvTypeReflection","readSecretsReflection","writeEnvReflection","writeEnvTypeReflection","reflectEnv","reflectSecrets","plugin","options","name","config","debug","types","validate","inject","prefix","transform","plugins","file","fs","resolve","warn","envDefaultTypeDefinition","secrets","secretsDefaultTypeDefinition","reduce","ret","formattedPrefix","includes","push","framework","filter","Boolean","replace","configResolved","parsed","used","injected","command","skipCache","persistedMeta","checksum","meta","Error","getProperties","length","envWithAlias","prop","getAlias","Object","entries","forEach","key","value","unprefixedKey","startsWith","slice","aliasKey","find","reverse","hasProperty","getProperty","setDefaultValue","kind","objectLiteral","typeName","description","prepare","_self$","result","_$createComponent","defaultConfig","reflection","order","handler","trace","docs","levelOffset","buildEnd","reflectionPath","generators","vite","envPrefix"],"sources":["../src/index.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 ReflectionClass,\n ReflectionKind\n} from \"@powerlines/deepkit/vendor/type\";\nimport alloy from \"@powerlines/plugin-alloy\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport automd from \"@powerlines/plugin-automd\";\nimport babel from \"@powerlines/plugin-babel\";\nimport { parseTypeDefinition } from \"@stryke/convert/parse-type-definition\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { ENV_PREFIXES } from \"@stryke/env/types\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { constantCase } from \"@stryke/string-format/constant-case\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport {\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport type { UserConfig as ViteUserConfig } from \"vite\";\nimport { envBabelPlugin } from \"./babel/plugin\";\nimport { EnvDocsFile } from \"./components/docs\";\nimport { EnvBuiltin } from \"./components/env-builtin\";\nimport { env } from \"./helpers/automd-generator\";\nimport { getDocsOutputPath } from \"./helpers/docs-helper\";\nimport { loadEnv } from \"./helpers/load\";\nimport {\n getEnvDefaultTypeDefinition,\n getEnvReflectionsPath,\n getEnvTypeReflectionsPath,\n getSecretsDefaultTypeDefinition,\n readEnvReflection,\n readEnvTypeReflection,\n readSecretsReflection,\n writeEnvReflection,\n writeEnvTypeReflection\n} from \"./helpers/persistence\";\nimport { reflectEnv, reflectSecrets } from \"./helpers/reflect\";\nimport { EnvPluginContext, EnvPluginOptions } from \"./types/plugin\";\n\ndeclare module \"@powerlines/core\" {\n interface BaseConfig {\n env?: EnvPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to inject environment variables into the source code.\n */\nexport const plugin = <TContext extends EnvPluginContext = EnvPluginContext>(\n options: EnvPluginOptions = {}\n) => {\n return [\n alloy(options.alloy),\n babel(options.babel),\n {\n name: \"env\",\n async config() {\n this.debug(\n \"Providing default configuration for the Powerlines `env` build plugin.\"\n );\n\n const config = {\n env: defu(options, {\n types: {} as TypeDefinitionParameter,\n validate: false,\n inject: false,\n prefix: []\n }),\n transform: {\n babel: {\n plugins: [envBabelPlugin]\n }\n }\n };\n\n if (\n isSetString(config.env.types) ||\n (config.env.types && isSetString(config.env.types.file))\n ) {\n config.env.types = parseTypeDefinition(\n config.env.types\n ) as TypeDefinition;\n\n const file = await this.fs.resolve(config.env.types.file);\n if (file) {\n config.env.types.file = file;\n }\n } else {\n this.warn(\n \"The `env.types` configuration parameter was not provided. Please ensure this is expected.\"\n );\n\n const envDefaultTypeDefinition =\n await getEnvDefaultTypeDefinition(this);\n\n const file = await this.fs.resolve(envDefaultTypeDefinition.file);\n if (file) {\n config.env.types = parseTypeDefinition(\n `${file}#${envDefaultTypeDefinition.name}`\n ) as TypeDefinition;\n }\n }\n\n if (\n isSetString(config.env.secrets) ||\n (config.env.secrets && isSetString(config.env.secrets.file))\n ) {\n config.env.secrets = parseTypeDefinition(\n config.env.secrets\n ) as TypeDefinition;\n\n const file = await this.fs.resolve(config.env.secrets.file);\n if (file) {\n config.env.secrets.file = file;\n }\n } else {\n const secretsDefaultTypeDefinition =\n await getSecretsDefaultTypeDefinition(this);\n\n const file = await this.fs.resolve(secretsDefaultTypeDefinition.file);\n if (file) {\n config.env.secrets = parseTypeDefinition(\n `${file}#${secretsDefaultTypeDefinition.name}`\n ) as TypeDefinition;\n }\n }\n\n config.env.prefix = toArray(\n (config.env.prefix ?? []) as string[]\n ).reduce(\n (ret: string[], prefix: string) => {\n const formattedPrefix = constantCase(prefix);\n if (!ret.includes(formattedPrefix)) {\n ret.push(formattedPrefix);\n }\n\n return ret;\n },\n [\n ...ENV_PREFIXES,\n \"POWERLINES_\",\n this.config.framework &&\n this.config.framework !== \"powerlines\" &&\n `${constantCase(this.config.framework)}_`\n ].filter(Boolean) as string[]\n );\n\n config.env.prefix = toArray(config.env.prefix).reduce((ret, prefix) => {\n if (!ret.includes(prefix.replace(/_$/g, \"\"))) {\n ret.push(prefix.replace(/_$/g, \"\"));\n }\n return ret;\n }, [] as string[]);\n\n return config;\n },\n async configResolved() {\n this.debug(\n `Environment plugin configuration has been resolved for the Powerlines project.`\n );\n\n this.env = defu(\n {\n parsed: await loadEnv(this, this.config.env)\n },\n this.env ?? {},\n {\n types: {\n env: {}\n },\n used: {\n env: {},\n secrets: {}\n },\n parsed: {},\n injected: {}\n }\n ) as EnvPluginContext[\"env\"];\n\n if (\n this.config.command !== \"prepare\" &&\n !this.config.skipCache &&\n this.persistedMeta?.checksum === this.meta.checksum &&\n existsSync(getEnvTypeReflectionsPath(this, \"env\"))\n ) {\n this.debug(\n `Skipping reflection initialization as the meta checksum has not changed.`\n );\n\n this.env.types.env = await readEnvTypeReflection(this, \"env\");\n\n if (existsSync(getEnvReflectionsPath(this, \"env\"))) {\n this.env.used.env = await readEnvReflection(this);\n }\n\n if (existsSync(getEnvTypeReflectionsPath(this, \"secrets\"))) {\n this.env.types.secrets = await readEnvTypeReflection(\n this,\n \"secrets\"\n );\n }\n\n if (existsSync(getEnvReflectionsPath(this, \"secrets\"))) {\n this.env.used.secrets = await readSecretsReflection(this);\n }\n } else {\n this.debug(\n `Starting environment configuration reflection initialization.`\n );\n\n this.env.types.env = await reflectEnv(\n this,\n this.config.env.types?.file,\n this.config.env.types?.name\n );\n if (!this.env.types.env) {\n throw new Error(\n \"Failed to find the environment configuration type reflection in the context.\"\n );\n }\n\n await writeEnvTypeReflection(this, this.env.types.env, \"env\");\n\n this.env.types.secrets = await reflectSecrets(\n this,\n this.config.env.secrets?.file,\n this.config.env.secrets?.name\n );\n if (!this.env.types.secrets) {\n throw new Error(\n \"Failed to find the secrets configuration type reflection in the context.\"\n );\n }\n\n await writeEnvTypeReflection(this, this.env.types.secrets, \"secrets\");\n\n this.debug(\n `Resolved ${\n this.env.types.env.getProperties().length ?? 0\n } environment configuration parameters and ${\n this.env.types.secrets?.getProperties().length ?? 0\n } secret configuration parameters`\n );\n\n const envWithAlias = this.env.types.env\n .getProperties()\n .filter(prop => prop.getAlias().length > 0);\n\n Object.entries(await loadEnv(this, this.config.env)).forEach(\n ([key, value]) => {\n const unprefixedKey = this.config.env.prefix.reduce(\n (ret, prefix) => {\n if (key.replace(/_$/g, \"\").startsWith(prefix)) {\n return key.replace(/_$/g, \"\").slice(prefix.length);\n }\n return ret;\n },\n key\n );\n\n const aliasKey = envWithAlias.find(prop =>\n prop?.getAlias().reverse().includes(unprefixedKey)\n );\n if (this.env.types.env?.hasProperty(unprefixedKey) || aliasKey) {\n this.env.types.env\n .getProperty(unprefixedKey)\n .setDefaultValue(value);\n }\n }\n );\n\n this.env.used.env = new ReflectionClass(\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Env\",\n description: `An object containing the environment configuration parameters used by the ${\n this.config.name\n ? `${this.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n this.env.types.env\n );\n\n await writeEnvReflection(this, this.env.used.env, \"env\");\n\n if (this.env.types.secrets) {\n await writeEnvTypeReflection(\n this,\n this.env.types.secrets,\n \"secrets\"\n );\n\n this.env.used.secrets = new ReflectionClass(\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Secrets\",\n description: `An object containing the secret configuration parameters used by the ${\n this.config.name\n ? `${this.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n this.env.types.secrets\n );\n await writeEnvReflection(this, this.env.used.secrets, \"secrets\");\n }\n }\n },\n async prepare() {\n this.debug(\n `Preparing the Environment runtime artifacts for the Powerlines project.`\n );\n\n const result = await readEnvTypeReflection(this, \"env\");\n\n return render(\n this,\n <EnvBuiltin\n defaultConfig={this.config.env.defaultConfig}\n reflection={result}\n />\n );\n },\n transform: {\n order: \"post\",\n async handler() {\n if (this.env.used.env.getProperties().length > 0) {\n this.trace(\n `Persisting used environment configuration reflections to ${getEnvReflectionsPath(\n this,\n \"env\"\n )}.`\n );\n await writeEnvReflection(this, this.env.used.env, \"env\");\n }\n\n if (this.env.used.secrets.getProperties().length > 0) {\n this.trace(\n `Persisting used secret configuration reflections to ${getEnvReflectionsPath(\n this,\n \"secrets\"\n )}.`\n );\n await writeEnvReflection(this, this.env.used.secrets, \"secrets\");\n }\n }\n },\n async docs() {\n this.debug(\n `Documenting environment variables configuration values in \"${joinPaths(\n getDocsOutputPath(this),\n \"env.md\"\n )}\"`\n );\n\n const result = await readEnvTypeReflection(this, \"env\");\n\n return render(\n this,\n <EnvDocsFile levelOffset={0} reflection={result} />\n );\n },\n async buildEnd() {\n const reflectionPath = getEnvReflectionsPath(this, \"env\");\n\n this.debug(`Writing env reflection types to ${reflectionPath}.`);\n\n await writeEnvReflection(this, this.env.used.env, \"env\");\n }\n },\n {\n name: \"env:automd-generator\",\n config() {\n return {\n automd: defu(options.automd ?? {}, {\n generators: {\n env: env(this)\n }\n })\n };\n }\n },\n {\n name: \"env:vite\",\n vite: {\n configResolved(this: TContext) {\n return {\n envPrefix: this.config?.env?.prefix\n } as ViteUserConfig;\n }\n }\n },\n automd(options.automd)\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,MAAa+B,UACXC,UAA4B,EAAE,KAC3B;AACH,QAAO;EACL9B,MAAM8B,QAAQ9B,MAAM;EACpBG,MAAM2B,QAAQ3B,MAAM;EACpB;GACE4B,MAAM;GACN,MAAMC,SAAS;AACb,SAAKC,MACH,yEACD;IAED,MAAMD,SAAS;KACbjB,KAAKJ,KAAKmB,SAAS;MACjBI,OAAO,EAA6B;MACpCC,UAAU;MACVC,QAAQ;MACRC,QAAQ,EAAA;MACT,CAAC;KACFC,WAAW,EACTnC,OAAO,EACLoC,SAAS,CAAC3B,eAAc,EAC1B,EACF;KACD;AAED,QACEF,YAAYsB,OAAOjB,IAAImB,MAAM,IAC5BF,OAAOjB,IAAImB,SAASxB,YAAYsB,OAAOjB,IAAImB,MAAMM,KAAM,EACxD;AACAR,YAAOjB,IAAImB,QAAQ9B,oBACjB4B,OAAOjB,IAAImB,MACM;KAEnB,MAAMM,OAAO,MAAM,KAAKC,GAAGC,QAAQV,OAAOjB,IAAImB,MAAMM,KAAK;AACzD,SAAIA,KACFR,QAAOjB,IAAImB,MAAMM,OAAOA;WAErB;AACL,UAAKG,KACH,4FAC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F;AACD,YAAMM,mBAAmB,MAAM,KAAKV,IAAI2C,KAAKb,SAAS,UAAU;;;IAGrE;GACD,MAAMqD,OAAO;AACX,SAAKjE,MACH,8DAA8DzB,UAC5DQ,kBAAkB,KAAK,EACvB,SACD,CAAA,GACF;IAED,MAAM2E,SAAS,MAAMpE,sBAAsB,MAAM,MAAM;AAEvD,WAAOtB,OACL,MAAI2F,gBACH/E,aAAW;KAACsF,aAAa;KAAGL,YAAYH;KAAM,CACjD,CAAC;;GAEH,MAAMS,WAAW;IACf,MAAMC,iBAAiBlF,sBAAsB,MAAM,MAAM;AAEzD,SAAKc,MAAM,mCAAmCoE,eAAc,GAAI;AAEhE,UAAM5E,mBAAmB,MAAM,KAAKV,IAAI2C,KAAK3C,KAAK,MAAM;;GAE3D;EACD;GACEgB,MAAM;GACNC,SAAS;AACP,WAAO,EACL9B,QAAQS,KAAKmB,QAAQ5B,UAAU,EAAE,EAAE,EACjCoG,YAAY,EACVvF,KAAKA,IAAI,KAAI,EACf,EACD,CAAA,EACF;;GAEJ;EACD;GACEgB,MAAM;GACNwE,MAAM,EACJ/C,iBAA+B;AAC7B,WAAO,EACLgD,WAAW,KAAKxE,QAAQjB,KAAKsB,QAC9B;MAEL;GACD;EACDnC,OAAO4B,QAAQ5B,OAAO;EACvB;;AAGH,kBAAe2B"}
|
|
@@ -2,7 +2,7 @@ const require_is_object = require('./type-checks/src/is-object.cjs');
|
|
|
2
2
|
const require_is_string = require('./type-checks/src/is-string.cjs');
|
|
3
3
|
require('./type-checks/src/index.cjs');
|
|
4
4
|
|
|
5
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
5
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/parse-type-definition.mjs
|
|
6
6
|
/**
|
|
7
7
|
* Parse a type definition parameter into a {@link TypeDefinition} object
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@ import { isObject } from "./type-checks/src/is-object.mjs";
|
|
|
2
2
|
import { isString } from "./type-checks/src/is-string.mjs";
|
|
3
3
|
import "./type-checks/src/index.mjs";
|
|
4
4
|
|
|
5
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
5
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/parse-type-definition.mjs
|
|
6
6
|
/**
|
|
7
7
|
* Parse a type definition parameter into a {@link TypeDefinition} object
|
|
8
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-type-definition.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
1
|
+
{"version":3,"file":"parse-type-definition.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/parse-type-definition.mjs"],"sourcesContent":["import { isObject } from \"./type-checks/src/is-object.mjs\";\nimport { isString } from \"./type-checks/src/is-string.mjs\";\nimport \"./type-checks/src/index.mjs\";\n\n//#region src/parse-type-definition.ts\n/**\n* Parse a type definition parameter into a {@link TypeDefinition} object\n*\n* @param param - The parameter to parse\n* @returns The parsed type definition\n*/\nconst parseTypeDefinition = (param) => {\n\tif (isString(param)) {\n\t\tif (param.includes(\":\")) {\n\t\t\tconst params = param.split(\":\");\n\t\t\tif (params.length > 1 && params[0]) return {\n\t\t\t\tfile: params[0],\n\t\t\t\tname: params[1]\n\t\t\t};\n\t\t}\n\t\tif (param.includes(\"#\")) {\n\t\t\tconst params = param.split(\"#\");\n\t\t\tif (params.length > 1 && params[0]) return {\n\t\t\t\tfile: params[0],\n\t\t\t\tname: params[1]\n\t\t\t};\n\t\t}\n\t\treturn { file: param };\n\t}\n\tif (isObject(param)) return {\n\t\tfile: param.file,\n\t\tname: param.name\n\t};\n};\n\n//#endregion\nexport { parseTypeDefinition };\n//# sourceMappingURL=parse-type-definition.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;AAWA,MAAM,uBAAuB,UAAU;AACtC,KAAI,SAAS,MAAM,EAAE;AACpB,MAAI,MAAM,SAAS,IAAI,EAAE;GACxB,MAAM,SAAS,MAAM,MAAM,IAAI;AAC/B,OAAI,OAAO,SAAS,KAAK,OAAO,GAAI,QAAO;IAC1C,MAAM,OAAO;IACb,MAAM,OAAO;IACb;;AAEF,MAAI,MAAM,SAAS,IAAI,EAAE;GACxB,MAAM,SAAS,MAAM,MAAM,IAAI;AAC/B,OAAI,OAAO,SAAS,KAAK,OAAO,GAAI,QAAO;IAC1C,MAAM,OAAO;IACb,MAAM,OAAO;IACb;;AAEF,SAAO,EAAE,MAAM,OAAO;;AAEvB,KAAI,SAAS,MAAM,CAAE,QAAO;EAC3B,MAAM,MAAM;EACZ,MAAM,MAAM;EACZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-array.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
1
|
+
{"version":3,"file":"to-array.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/to-array.mjs"],"sourcesContent":["//#region src/to-array.ts\n/**\n* Convert `Arrayable<T>` to `Array<T>`\n*\n* @param array - The `Arrayable<T>` to convert\n* @returns An `Array<T>` containing the elements of the input\n*/\nfunction toArray(array) {\n\tarray = array ?? [];\n\treturn Array.isArray(array) ? array : [array];\n}\n\n//#endregion\nexport { toArray };\n//# sourceMappingURL=to-array.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;AAOA,SAAS,QAAQ,OAAO;AACvB,SAAQ,SAAS,EAAE;AACnB,QAAO,MAAM,QAAQ,MAAM,GAAG,QAAQ,CAAC,MAAM"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs
|
|
3
3
|
/**
|
|
4
4
|
* Gets the `toStringTag` of `obj`.
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs
|
|
2
2
|
/**
|
|
3
3
|
* Gets the `toStringTag` of `obj`.
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-object-tag.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
1
|
+
{"version":3,"file":"get-object-tag.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs"],"sourcesContent":["//#region ../type-checks/src/get-object-tag.ts\n/**\n* Gets the `toStringTag` of `obj`.\n*\n* @param value - The obj to query.\n* @returns Returns the `toStringTag`.\n*/\nconst getObjectTag = (value) => {\n\tif (value == null) return value === void 0 ? \"[object Undefined]\" : \"[object Null]\";\n\treturn Object.prototype.toString.call(value);\n};\n\n//#endregion\nexport { getObjectTag };\n//# sourceMappingURL=get-object-tag.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;AAOA,MAAM,gBAAgB,UAAU;AAC/B,KAAI,SAAS,KAAM,QAAO,UAAU,KAAK,IAAI,uBAAuB;AACpE,QAAO,OAAO,UAAU,SAAS,KAAK,MAAM"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs
|
|
3
3
|
const isBufferExists = typeof Buffer !== "undefined";
|
|
4
4
|
isBufferExists && Buffer.isBuffer.bind(Buffer);
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs
|
|
2
2
|
const isBufferExists = typeof Buffer !== "undefined";
|
|
3
3
|
isBufferExists && Buffer.isBuffer.bind(Buffer);
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-buffer.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
1
|
+
{"version":3,"file":"is-buffer.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs"],"sourcesContent":["//#region ../type-checks/src/is-buffer.ts\nconst isBufferExists = typeof Buffer !== \"undefined\";\n/**\n* Check if the provided value's type is `Buffer`\n*/\nconst isBuffer = isBufferExists ? Buffer.isBuffer.bind(Buffer) : function isBuffer$1(value) {\n\treturn false;\n};\n\n//#endregion\nexport { isBufferExists };\n//# sourceMappingURL=is-buffer.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAM,iBAAiB,OAAO,WAAW;AAIxB,kBAAiB,OAAO,SAAS,KAAK,OAAO"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_is_plain_object = require('./is-plain-object.cjs');
|
|
2
2
|
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Check if the provided value's type is `Object`
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isPlainObject } from "./is-plain-object.mjs";
|
|
2
2
|
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Check if the provided value's type is `Object`
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-object.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
1
|
+
{"version":3,"file":"is-object.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs"],"sourcesContent":["import { isPlainObject } from \"./is-plain-object.mjs\";\n\n//#region ../type-checks/src/is-object.ts\n/**\n* Check if the provided value's type is `Object`\n*\n* @param value - The value to type check\n* @returns An indicator specifying if the value provided is of type `Object`\n*/\nconst isObject = (value) => {\n\ttry {\n\t\treturn typeof value === \"object\" || Boolean(value) && value?.constructor === Object || isPlainObject(value);\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isObject };\n//# sourceMappingURL=is-object.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;AASA,MAAM,YAAY,UAAU;AAC3B,KAAI;AACH,SAAO,OAAO,UAAU,YAAY,QAAQ,MAAM,IAAI,OAAO,gBAAgB,UAAU,cAAc,MAAM;SACpG;AACP,SAAO"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_get_object_tag = require('./get-object-tag.cjs');
|
|
2
2
|
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
6
6
|
* and has a `typeof` result of "object".
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getObjectTag } from "./get-object-tag.mjs";
|
|
2
2
|
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
6
6
|
* and has a `typeof` result of "object".
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-plain-object.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
1
|
+
{"version":3,"file":"is-plain-object.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs"],"sourcesContent":["import { getObjectTag } from \"./get-object-tag.mjs\";\n\n//#region ../type-checks/src/is-plain-object.ts\n/**\n* Checks if `value` is object-like. A value is object-like if it's not `null`\n* and has a `typeof` result of \"object\".\n*\n* @example\n* ```typescript\n* isObjectLike({})\n* // => true\n*\n* isObjectLike([1, 2, 3])\n* // => true\n*\n* isObjectLike(Function)\n* // => false\n*\n* isObjectLike(null)\n* // => false\n* ```\n*\n* @param value - The value to check.\n* @returns Returns `true` if `value` is object-like, else `false`.\n*/\nconst isObjectLike = (obj) => {\n\treturn typeof obj === \"object\" && obj !== null;\n};\n/**\n* Checks if `obj` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`.\n*\n* @example\n* ```typescript\n* function Foo() {\n* this.a = 1\n* }\n*\n* isPlainObject(new Foo)\n* // => false\n*\n* isPlainObject([1, 2, 3])\n* // => false\n*\n* isPlainObject({ 'x': 0, 'y': 0 })\n* // => true\n*\n* isPlainObject(Object.create(null))\n* // => true\n* ```\n*\n* @param obj - The value to check.\n* @returns Returns `true` if `obj` is a plain object, else `false`.\n*/\nconst isPlainObject = (obj) => {\n\tif (!isObjectLike(obj) || getObjectTag(obj) !== \"[object Object]\") return false;\n\tif (Object.getPrototypeOf(obj) === null) return true;\n\tlet proto = obj;\n\twhile (Object.getPrototypeOf(proto) !== null) proto = Object.getPrototypeOf(proto);\n\treturn Object.getPrototypeOf(obj) === proto;\n};\n\n//#endregion\nexport { isObjectLike, isPlainObject };\n//# sourceMappingURL=is-plain-object.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,gBAAgB,QAAQ;AAC7B,QAAO,OAAO,QAAQ,YAAY,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2B3C,MAAM,iBAAiB,QAAQ;AAC9B,KAAI,CAAC,aAAa,IAAI,IAAI,aAAa,IAAI,KAAK,kBAAmB,QAAO;AAC1E,KAAI,OAAO,eAAe,IAAI,KAAK,KAAM,QAAO;CAChD,IAAI,QAAQ;AACZ,QAAO,OAAO,eAAe,MAAM,KAAK,KAAM,SAAQ,OAAO,eAAe,MAAM;AAClF,QAAO,OAAO,eAAe,IAAI,KAAK"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs
|
|
3
3
|
const isString = (value) => {
|
|
4
4
|
try {
|
|
5
5
|
return typeof value === "string";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs
|
|
2
2
|
const isString = (value) => {
|
|
3
3
|
try {
|
|
4
4
|
return typeof value === "string";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-string.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
1
|
+
{"version":3,"file":"is-string.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs"],"sourcesContent":["//#region ../type-checks/src/is-string.ts\nconst isString = (value) => {\n\ttry {\n\t\treturn typeof value === \"string\";\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isString };\n//# sourceMappingURL=is-string.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAM,YAAY,UAAU;AAC3B,KAAI;AACH,SAAO,OAAO,UAAU;SACjB;AACP,SAAO"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require('./is-buffer.cjs');
|
|
2
2
|
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs
|
|
4
4
|
((Obj) => {
|
|
5
5
|
if (typeof globalThis === "object") return globalThis;
|
|
6
6
|
Object.defineProperty(Obj, "typeDetectGlobalObject", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./is-buffer.mjs";
|
|
2
2
|
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs
|
|
4
4
|
((Obj) => {
|
|
5
5
|
if (typeof globalThis === "object") return globalThis;
|
|
6
6
|
Object.defineProperty(Obj, "typeDetectGlobalObject", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-detect.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.
|
|
1
|
+
{"version":3,"file":"type-detect.mjs","names":[],"sources":["../../../../../../../../../../../../node_modules/.pnpm/@stryke+convert@0.6.49/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs"],"sourcesContent":["import \"./is-buffer.mjs\";\n\n//#region ../type-checks/src/type-detect.ts\nconst globalObject = ((Obj) => {\n\tif (typeof globalThis === \"object\") return globalThis;\n\tObject.defineProperty(Obj, \"typeDetectGlobalObject\", {\n\t\tget() {\n\t\t\treturn this;\n\t\t},\n\t\tconfigurable: true\n\t});\n\treturn globalThis;\n})(Object.prototype);\n\n//#endregion\nexport { };\n//# sourceMappingURL=type-detect.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;EAGuB,QAAQ;AAC9B,KAAI,OAAO,eAAe,SAAU,QAAO;AAC3C,QAAO,eAAe,KAAK,0BAA0B;EACpD,MAAM;AACL,UAAO;;EAER,cAAc;EACd,CAAC;AACF,QAAO;GACL,OAAO,UAAU"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_slash = require('./slash.cjs');
|
|
2
2
|
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.26.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+path@0.26.15/node_modules/@stryke/path/dist/is-parent-path.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Check if a given path is a parent of another path.
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { slash } from "./slash.mjs";
|
|
2
2
|
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.26.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+path@0.26.15/node_modules/@stryke/path/dist/is-parent-path.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Check if a given path is a parent of another path.
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-parent-path.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.
|
|
1
|
+
{"version":3,"file":"is-parent-path.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.15/node_modules/@stryke/path/dist/is-parent-path.mjs"],"sourcesContent":["import { slash } from \"./slash.mjs\";\n\n//#region src/is-parent-path.ts\n/**\n* Check if a given path is a parent of another path.\n*\n* @example\n* ```ts\n* isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/project/src\");\n* // returns true\n* isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/project\");\n* // returns true\n* isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/project/src/other\");\n* // returns false\n* isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/other\");\n* // returns false\n* isParentPath(\"/home/user/project/src/index.ts\", \"/home/user/project/src/index.ts\");\n* // returns false\n* ```\n*\n* @param childPath - The path to check if it is a child of the parent path.\n* @param parentPath - The path to check if it is a parent of the child path.\n* @returns `true` if `childPath` is a child of `parentPath`, otherwise `false`.\n*/\nfunction isParentPath(childPath, parentPath) {\n\tconst normalizedChild = slash(childPath.replaceAll(/\\\\/g, \"/\").replace(/\\/*$/, \"\"))?.toLowerCase();\n\tconst normalizedParent = slash(parentPath.replaceAll(/\\\\/g, \"/\").replace(/\\/*$/, \"\"))?.toLowerCase();\n\treturn childPath !== parentPath && normalizedChild !== normalizedParent && normalizedChild.startsWith(`${normalizedParent}/`);\n}\n\n//#endregion\nexport { isParentPath };\n//# sourceMappingURL=is-parent-path.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwBA,SAAS,aAAa,WAAW,YAAY;CAC5C,MAAM,kBAAkB,MAAM,UAAU,WAAW,OAAO,IAAI,CAAC,QAAQ,QAAQ,GAAG,CAAC,EAAE,aAAa;CAClG,MAAM,mBAAmB,MAAM,WAAW,WAAW,OAAO,IAAI,CAAC,QAAQ,QAAQ,GAAG,CAAC,EAAE,aAAa;AACpG,QAAO,cAAc,cAAc,oBAAoB,oBAAoB,gBAAgB,WAAW,GAAG,iBAAiB,GAAG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_regex = require('./regex.cjs');
|
|
2
2
|
const require_slash = require('./slash.cjs');
|
|
3
3
|
|
|
4
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.26.
|
|
4
|
+
//#region ../../node_modules/.pnpm/@stryke+path@0.26.15/node_modules/@stryke/path/dist/is-type.mjs
|
|
5
5
|
/**
|
|
6
6
|
* Check if the path is an absolute path.
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ABSOLUTE_PATH_REGEX } from "./regex.mjs";
|
|
2
2
|
import { slash } from "./slash.mjs";
|
|
3
3
|
|
|
4
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.26.
|
|
4
|
+
//#region ../../node_modules/.pnpm/@stryke+path@0.26.15/node_modules/@stryke/path/dist/is-type.mjs
|
|
5
5
|
/**
|
|
6
6
|
* Check if the path is an absolute path.
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-type.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.
|
|
1
|
+
{"version":3,"file":"is-type.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.15/node_modules/@stryke/path/dist/is-type.mjs"],"sourcesContent":["import { ABSOLUTE_PATH_REGEX, NPM_SCOPED_PACKAGE_REGEX } from \"./regex.mjs\";\nimport { slash } from \"./slash.mjs\";\n\n//#region src/is-type.ts\n/**\n* Check if the path is an absolute path.\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is an absolute path\n*/\nfunction isAbsolutePath(path) {\n\treturn ABSOLUTE_PATH_REGEX.test(slash(path));\n}\n/**\n* Check if the path is an absolute path.\n*\n* @remarks\n* This is an alias for {@link isAbsolutePath}.\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is an absolute path\n*/\nfunction isAbsolute(path) {\n\treturn isAbsolutePath(path);\n}\n/**\n* Check if the path is a relative path.\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is a relative path\n*/\nfunction isRelativePath(path) {\n\treturn !isAbsolutePath(path);\n}\n/**\n* Check if the path is a relative path.\n*\n* @remarks\n* This is an alias for {@link isRelativePath}.\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is a relative path\n*/\nfunction isRelative(path) {\n\treturn isRelativePath(path);\n}\n/**\n* Check if the path is a npm package path.\n*\n* @remarks\n* This only checks if the path matches the npm namespace scoped package naming convention such as `@scope/package-name`. This is an alias for {@link isNpmScopedPackage}.\n*\n* @example\n* ```ts\n* isNpmScopedPackage(\"@stryke/path\"); // returns true\n* isNpmScopedPackage(\"lodash\"); // returns false\n* isNpmNamespacePackage(\"./src/index.ts\"); // returns false\n* ```\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is a npm package path\n*/\nfunction isNpmScopedPackagePath(path) {\n\treturn NPM_SCOPED_PACKAGE_REGEX.test(slash(path));\n}\n/**\n* Check if the path is a npm package path.\n*\n* @remarks\n* This only checks if the path matches the npm namespace scoped package naming convention such as `@scope/package-name`. This is an alias for {@link isNpmScopedPackagePath}.\n*\n* @example\n* ```ts\n* isNpmScopedPackagePath(\"@stryke/path\"); // returns true\n* isNpmScopedPackagePath(\"lodash\"); // returns false\n* isNpmScopedPackagePath(\"./src/index.ts\"); // returns false\n* ```\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is a npm package path\n*/\nfunction isNpmScopedPackage(path) {\n\treturn isNpmScopedPackagePath(path);\n}\n\n//#endregion\nexport { isAbsolute, isAbsolutePath, isNpmScopedPackage, isNpmScopedPackagePath, isRelative, isRelativePath };\n//# sourceMappingURL=is-type.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;AAUA,SAAS,eAAe,MAAM;AAC7B,QAAO,oBAAoB,KAAK,MAAM,KAAK,CAAC;;;;;;;;;;;AAW7C,SAAS,WAAW,MAAM;AACzB,QAAO,eAAe,KAAK"}
|
|
@@ -2,7 +2,7 @@ const require_regex = require('./regex.cjs');
|
|
|
2
2
|
const require_slash = require('./slash.cjs');
|
|
3
3
|
const require_is_type = require('./is-type.cjs');
|
|
4
4
|
|
|
5
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.26.
|
|
5
|
+
//#region ../../node_modules/.pnpm/@stryke+path@0.26.15/node_modules/@stryke/path/dist/join-paths.mjs
|
|
6
6
|
function normalizeWindowsPath(input = "") {
|
|
7
7
|
if (!input) return input;
|
|
8
8
|
return input.replace(/\\/g, "/").replace(require_regex.DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
|
|
@@ -2,7 +2,7 @@ import { DRIVE_LETTER_REGEX, DRIVE_LETTER_START_REGEX, UNC_REGEX } from "./regex
|
|
|
2
2
|
import { slash } from "./slash.mjs";
|
|
3
3
|
import { isAbsolute } from "./is-type.mjs";
|
|
4
4
|
|
|
5
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.26.
|
|
5
|
+
//#region ../../node_modules/.pnpm/@stryke+path@0.26.15/node_modules/@stryke/path/dist/join-paths.mjs
|
|
6
6
|
function normalizeWindowsPath(input = "") {
|
|
7
7
|
if (!input) return input;
|
|
8
8
|
return input.replace(/\\/g, "/").replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"join-paths.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.
|
|
1
|
+
{"version":3,"file":"join-paths.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.15/node_modules/@stryke/path/dist/join-paths.mjs"],"sourcesContent":["import { DRIVE_LETTER_REGEX, DRIVE_LETTER_START_REGEX, UNC_REGEX } from \"./regex.mjs\";\nimport { isAbsolute } from \"./is-type.mjs\";\nimport { slash } from \"./slash.mjs\";\n\n//#region src/join-paths.ts\nfunction normalizeWindowsPath(input = \"\") {\n\tif (!input) return input;\n\treturn input.replace(/\\\\/g, \"/\").replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());\n}\nfunction correctPaths(path) {\n\tif (!path || path.length === 0) return \".\";\n\tpath = normalizeWindowsPath(path);\n\tconst isUNCPath = path.match(UNC_REGEX);\n\tconst isPathAbsolute = isAbsolute(path);\n\tconst trailingSeparator = path[path.length - 1] === \"/\";\n\tpath = normalizeString(path, !isPathAbsolute);\n\tif (path.length === 0) {\n\t\tif (isPathAbsolute) return \"/\";\n\t\treturn trailingSeparator ? \"./\" : \".\";\n\t}\n\tif (trailingSeparator) path += \"/\";\n\tif (DRIVE_LETTER_REGEX.test(path)) path += \"/\";\n\tif (isUNCPath) {\n\t\tif (!isPathAbsolute) return `//./${path}`;\n\t\treturn `//${path}`;\n\t}\n\treturn isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;\n}\n/**\n* Joins all given path segments together using the platform-specific separator as a delimiter.\n*\n* @remarks\n* Multiple segments can be provided as separate arguments. The resulting path is normalized to remove any redundant or unnecessary segments.\n*\n* @example\n* ```ts\n* import { joinPaths } from 'stryke/path';\n*\n* const fullPath = joinPaths('folder1', 'folder2', '..', 'folder3', 'file.txt');\n* console.log(fullPath); // Output: 'folder1/folder3/file.txt'\n*\n* const absolutePath = joinPaths('/root', 'folder', '.', 'subfolder', 'file.txt');\n* console.log(absolutePath); // Output: '/root/folder/subfolder/file.txt'\n*\n* const windowsPath = joinPaths('C:\\\\', 'Users', 'Public', '..', 'Documents', 'file.txt');\n* console.log(windowsPath); // Output: 'C:/Users/Documents/file.txt'\n*\n* const uncPath = joinPaths('\\\\\\\\Server\\\\Share', 'Folder', 'File.txt');\n* console.log(uncPath); // Output: '//Server/Share/Folder/File.txt'\n* ```\n*\n* @param segments - The path segments to join.\n* @returns The joined and normalized path string.\n*/\nfunction joinPaths(...segments) {\n\tlet result = \"\";\n\tfor (const segment of segments) if (segment && slash(segment).replaceAll(/\\//g, \"\") !== \".\") {\n\t\tif (result) if (slash(segment).replaceAll(/\\//g, \"\") === \"..\") result = slash(result).replace(/\\/+$/, \"\").replace(/\\/*[^/]+$/, \"\");\n\t\telse result = `${slash(result).replace(/\\/+$/, \"\")}/${slash(segment).replace(/^\\/+/, \"\")}`;\n\t\telse if (slash(segment).replaceAll(/\\//g, \"\") !== \"..\") result = segment;\n\t}\n\treturn correctPaths(result);\n}\nconst join = joinPaths;\n/**\n* Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.\n*\n* @param path - The path to normalize.\n* @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.\n* @returns the normalized path string.\n*/\nfunction normalizeString(path, allowAboveRoot) {\n\tlet res = \"\";\n\tlet lastSegmentLength = 0;\n\tlet lastSlash = -1;\n\tlet dots = 0;\n\tlet char = null;\n\tfor (let index = 0; index <= path.length; ++index) {\n\t\tif (index < path.length) char = path[index];\n\t\telse if (char === \"/\") break;\n\t\telse char = \"/\";\n\t\tif (char === \"/\") {\n\t\t\tif (lastSlash === index - 1 || dots === 1) {} else if (dots === 2) {\n\t\t\t\tif (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== \".\" || res[res.length - 2] !== \".\") {\n\t\t\t\t\tif (res.length > 2) {\n\t\t\t\t\t\tconst lastSlashIndex = res.lastIndexOf(\"/\");\n\t\t\t\t\t\tif (lastSlashIndex === -1) {\n\t\t\t\t\t\t\tres = \"\";\n\t\t\t\t\t\t\tlastSegmentLength = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tres = res.slice(0, lastSlashIndex);\n\t\t\t\t\t\t\tlastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlastSlash = index;\n\t\t\t\t\t\tdots = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (res.length > 0) {\n\t\t\t\t\t\tres = \"\";\n\t\t\t\t\t\tlastSegmentLength = 0;\n\t\t\t\t\t\tlastSlash = index;\n\t\t\t\t\t\tdots = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (allowAboveRoot) {\n\t\t\t\t\tres += res.length > 0 ? \"/..\" : \"..\";\n\t\t\t\t\tlastSegmentLength = 2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;\n\t\t\t\telse res = path.slice(lastSlash + 1, index);\n\t\t\t\tlastSegmentLength = index - lastSlash - 1;\n\t\t\t}\n\t\t\tlastSlash = index;\n\t\t\tdots = 0;\n\t\t} else if (char === \".\" && dots !== -1) ++dots;\n\t\telse dots = -1;\n\t}\n\treturn res;\n}\n\n//#endregion\nexport { join, joinPaths };\n//# sourceMappingURL=join-paths.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;AAKA,SAAS,qBAAqB,QAAQ,IAAI;AACzC,KAAI,CAAC,MAAO,QAAO;AACnB,QAAO,MAAM,QAAQ,OAAO,IAAI,CAAC,QAAQ,2BAA2B,MAAM,EAAE,aAAa,CAAC;;AAE3F,SAAS,aAAa,MAAM;AAC3B,KAAI,CAAC,QAAQ,KAAK,WAAW,EAAG,QAAO;AACvC,QAAO,qBAAqB,KAAK;CACjC,MAAM,YAAY,KAAK,MAAM,UAAU;CACvC,MAAM,iBAAiB,WAAW,KAAK;CACvC,MAAM,oBAAoB,KAAK,KAAK,SAAS,OAAO;AACpD,QAAO,gBAAgB,MAAM,CAAC,eAAe;AAC7C,KAAI,KAAK,WAAW,GAAG;AACtB,MAAI,eAAgB,QAAO;AAC3B,SAAO,oBAAoB,OAAO;;AAEnC,KAAI,kBAAmB,SAAQ;AAC/B,KAAI,mBAAmB,KAAK,KAAK,CAAE,SAAQ;AAC3C,KAAI,WAAW;AACd,MAAI,CAAC,eAAgB,QAAO,OAAO;AACnC,SAAO,KAAK;;AAEb,QAAO,kBAAkB,CAAC,WAAW,KAAK,GAAG,IAAI,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4B3D,SAAS,UAAU,GAAG,UAAU;CAC/B,IAAI,SAAS;AACb,MAAK,MAAM,WAAW,SAAU,KAAI,WAAW,MAAM,QAAQ,CAAC,WAAW,OAAO,GAAG,KAAK,KACv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,QAAO,IAAI,KAAK,MAAM,YAAY,GAAG,MAAM;QAC1D,OAAM,KAAK,MAAM,YAAY,GAAG,MAAM;AAC3C,wBAAoB,QAAQ,YAAY;;AAEzC,eAAY;AACZ,UAAO;aACG,SAAS,OAAO,SAAS,GAAI,GAAE;MACrC,QAAO;;AAEb,QAAO"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.26.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@stryke+path@0.26.15/node_modules/@stryke/path/dist/regex.mjs
|
|
3
3
|
const DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
|
|
4
4
|
const DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
|
|
5
5
|
const UNC_REGEX = /^[/\\]{2}/;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.26.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@stryke+path@0.26.15/node_modules/@stryke/path/dist/regex.mjs
|
|
2
2
|
const DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
|
|
3
3
|
const DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
|
|
4
4
|
const UNC_REGEX = /^[/\\]{2}/;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regex.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.
|
|
1
|
+
{"version":3,"file":"regex.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.15/node_modules/@stryke/path/dist/regex.mjs"],"sourcesContent":["//#region src/regex.ts\nconst DRIVE_LETTER_START_REGEX = /^[A-Z]:\\//i;\nconst DRIVE_LETTER_REGEX = /^[A-Z]:$/i;\nconst UNC_REGEX = /^[/\\\\]{2}/;\nconst ABSOLUTE_PATH_REGEX = /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^~[/\\\\]|^[A-Z]:[/\\\\]/i;\nconst ROOT_FOLDER_REGEX = /^\\/([A-Z]:)?$/i;\nconst FILE_EXTENSION_REGEX = /\\.[0-9a-z]+$/i;\nconst FULL_FILE_EXTENSION_REGEX = /(\\.d)?\\.[0-9a-z]+(\\.map)?$/i;\nconst PACKAGE_PATH_REGEX = /^@\\w+\\/.*$/;\nconst NPM_SCOPED_PACKAGE_REGEX = /^(?:@[\\w-]+\\/)?[\\w-]+$/;\n\n//#endregion\nexport { ABSOLUTE_PATH_REGEX, DRIVE_LETTER_REGEX, DRIVE_LETTER_START_REGEX, FILE_EXTENSION_REGEX, FULL_FILE_EXTENSION_REGEX, NPM_SCOPED_PACKAGE_REGEX, PACKAGE_PATH_REGEX, ROOT_FOLDER_REGEX, UNC_REGEX };\n//# sourceMappingURL=regex.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAM,2BAA2B;AACjC,MAAM,qBAAqB;AAC3B,MAAM,YAAY;AAClB,MAAM,sBAAsB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slash.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.
|
|
1
|
+
{"version":3,"file":"slash.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.15/node_modules/@stryke/path/dist/slash.mjs"],"sourcesContent":["import { isAbsolutePath } from \"./is-type.mjs\";\n\n//#region src/slash.ts\n/**\n* Replace backslash to slash\n*\n* @param path - The string to replace\n* @returns The string with replaced backslashes\n*/\nfunction slash(path) {\n\tif (path.startsWith(\"\\\\\\\\?\\\\\")) return path;\n\treturn path.replace(/\\\\/g, \"/\");\n}\n/**\n* Replace backslash to slash and remove unneeded leading and trailing slashes\n*\n* @param path - The string to replace\n* @returns The string with replaced backslashes\n*/\nfunction formatSlash(path) {\n\tconst formatted = slash(path);\n\treturn isAbsolutePath(formatted) ? formatted.replace(/\\/+$/g, \"\") : formatted.replace(/^\\.\\//g, \"\").replace(/\\/+$/g, \"\");\n}\n\n//#endregion\nexport { formatSlash, slash };\n//# sourceMappingURL=slash.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;AASA,SAAS,MAAM,MAAM;AACpB,KAAI,KAAK,WAAW,UAAU,CAAE,QAAO;AACvC,QAAO,KAAK,QAAQ,OAAO,IAAI"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-env",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.34",
|
|
4
4
|
"type": "module",
|
|
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
|
"repository": {
|
|
@@ -112,18 +112,18 @@
|
|
|
112
112
|
"default": "./dist/components/docs.mjs"
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
|
-
"./components/env": {
|
|
115
|
+
"./components/env-builtin": {
|
|
116
116
|
"require": {
|
|
117
|
-
"types": "./dist/components/env.d.cts",
|
|
118
|
-
"default": "./dist/components/env.cjs"
|
|
117
|
+
"types": "./dist/components/env-builtin.d.cts",
|
|
118
|
+
"default": "./dist/components/env-builtin.cjs"
|
|
119
119
|
},
|
|
120
120
|
"import": {
|
|
121
|
-
"types": "./dist/components/env.d.mts",
|
|
122
|
-
"default": "./dist/components/env.mjs"
|
|
121
|
+
"types": "./dist/components/env-builtin.d.mts",
|
|
122
|
+
"default": "./dist/components/env-builtin.mjs"
|
|
123
123
|
},
|
|
124
124
|
"default": {
|
|
125
|
-
"types": "./dist/components/env.d.mts",
|
|
126
|
-
"default": "./dist/components/env.mjs"
|
|
125
|
+
"types": "./dist/components/env-builtin.d.mts",
|
|
126
|
+
"default": "./dist/components/env-builtin.mjs"
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
129
|
"./helpers": {
|
|
@@ -305,28 +305,28 @@
|
|
|
305
305
|
"@alloy-js/typescript": "0.23.0-dev.4",
|
|
306
306
|
"@babel/core": "^7.29.0",
|
|
307
307
|
"@babel/types": "^7.29.0",
|
|
308
|
-
"@powerlines/plugin-alloy": "^0.24.
|
|
309
|
-
"@powerlines/plugin-automd": "^0.1.
|
|
310
|
-
"@powerlines/plugin-babel": "^0.12.
|
|
311
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
312
|
-
"@storm-software/config-tools": "^1.189.
|
|
308
|
+
"@powerlines/plugin-alloy": "^0.24.6",
|
|
309
|
+
"@powerlines/plugin-automd": "^0.1.315",
|
|
310
|
+
"@powerlines/plugin-babel": "^0.12.321",
|
|
311
|
+
"@powerlines/plugin-plugin": "^0.12.266",
|
|
312
|
+
"@storm-software/config-tools": "^1.189.17",
|
|
313
313
|
"@stryke/capnp": "^0.12.75",
|
|
314
|
-
"@stryke/env": "^0.20.
|
|
315
|
-
"@stryke/fs": "^0.33.
|
|
316
|
-
"@stryke/json": "^0.14.
|
|
314
|
+
"@stryke/env": "^0.20.70",
|
|
315
|
+
"@stryke/fs": "^0.33.53",
|
|
316
|
+
"@stryke/json": "^0.14.3",
|
|
317
317
|
"@stryke/string-format": "^0.14.8",
|
|
318
|
-
"@stryke/type-checks": "^0.5.
|
|
319
|
-
"@stryke/types": "^0.10.
|
|
318
|
+
"@stryke/type-checks": "^0.5.34",
|
|
319
|
+
"@stryke/types": "^0.10.48",
|
|
320
320
|
"automd": "^0.4.3",
|
|
321
|
-
"powerlines": "^0.40.
|
|
321
|
+
"powerlines": "^0.40.2"
|
|
322
322
|
},
|
|
323
323
|
"devDependencies": {
|
|
324
|
-
"@powerlines/deepkit": "^0.6.
|
|
325
|
-
"@powerlines/plugin-deepkit": "^0.11.
|
|
326
|
-
"@types/node": "^25.3.
|
|
324
|
+
"@powerlines/deepkit": "^0.6.94",
|
|
325
|
+
"@powerlines/plugin-deepkit": "^0.11.194",
|
|
326
|
+
"@types/node": "^25.3.5",
|
|
327
327
|
"vite": "8.0.0-beta.16"
|
|
328
328
|
},
|
|
329
329
|
"publishConfig": { "access": "public" },
|
|
330
330
|
"types": "./dist/index.d.cts",
|
|
331
|
-
"gitHead": "
|
|
331
|
+
"gitHead": "9d8c7149d35ca03f3ce533b404084b720eecf1a4"
|
|
332
332
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.cts","names":[],"sources":["../../src/components/env.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAqEA;AACc,iBADE,iBAAA,CACF,KAAA,EAAL,IAAK,CAAA,yBAAA,EAAA,MAAA,CAAA,CAAA,EAAkC,QAAlC;AAAL,UAkLQ,eAAA,SAAwB,IAlLhC,CAkLqC,gBAlLrC,EAAA,IAAA,CAAA,CAAA;EAAuC,aAAA,CAAA,EAmL9B,QAnL8B;EAAA,UAAA,EAoLlC,eApLkC,CAAA,GAAA,CAAA;AAkLhD;;;;AAAyC,iBAYzB,UAAA,CAZyB,KAAA,EAYP,eAZO,CAAA,EAYQ,QAZR;AAAI,kCAAA,GAAA,EAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.mts","names":[],"sources":["../../src/components/env.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAqEA;AACc,iBADE,iBAAA,CACF,KAAA,EAAL,IAAK,CAAA,yBAAA,EAAA,MAAA,CAAA,CAAA,EAAkC,QAAlC;AAAL,UAkLQ,eAAA,SAAwB,IAlLhC,CAkLqC,gBAlLrC,EAAA,IAAA,CAAA,CAAA;EAAuC,aAAA,CAAA,EAmL9B,QAnL8B;EAAA,UAAA,EAoLlC,eApLkC,CAAA,GAAA,CAAA;AAkLhD;;;;AAAyC,iBAYzB,UAAA,CAZyB,KAAA,EAYP,eAZO,CAAA,EAYQ,QAZR;AAAI,kCAAA,GAAA,EAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env.mjs","names":["code","computed","For","Show","splitProps","ClassDeclaration","ClassMethod","ElseIfClause","FunctionDeclaration","IfStatement","NewExpression","TypeDeclaration","VarDeclaration","ReflectionClass","ReflectionKind","Spacing","usePowerlines","refkey","BuiltinFile","InterfaceDeclaration","ObjectDeclaration","TSDoc","TSDocExample","TSDocLink","TSDocParam","TSDocRemarks","TSDocReturns","TSDocThrows","titleCase","defu","loadEnvFromContext","EnvTypeDefinition","props","defaultValue","reflection","context","_$createComponent","name","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","_$createIntrinsic","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 { 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 { ComponentProps } from \"@powerlines/plugin-alloy/types/components\";\nimport {\n BuiltinFile,\n BuiltinFileProps\n} from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport type { InterfaceDeclarationProps } from \"@powerlines/plugin-alloy/typescript/components/interface-declaration\";\nimport { InterfaceDeclaration } from \"@powerlines/plugin-alloy/typescript/components/interface-declaration\";\nimport { ObjectDeclaration } from \"@powerlines/plugin-alloy/typescript/components/object-declaration\";\nimport {\n TSDoc,\n TSDocExample,\n TSDocLink,\n TSDocParam,\n TSDocRemarks,\n TSDocReturns,\n TSDocThrows\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\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<InterfaceDeclarationProps, \"name\">\n) {\n const [{ defaultValue, reflection }] = splitProps(props, [\n \"defaultValue\",\n \"reflection\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n\n return (\n <>\n <InterfaceDeclaration\n name=\" EnvBase\"\n defaultValue={defaultValue}\n reflection={reflection}\n export={true}\n />\n <Spacing />\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 <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(/^(${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 <ObjectDeclaration\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 <Spacing />\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`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 </ClassMethod>\n </ClassDeclaration>\n <Spacing />\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 <Spacing />\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 <Spacing />\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 <Spacing />\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 <Spacing />\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 <Spacing />\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 <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 />\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":";;;;;;;;;;;;;;;;;;;AAqEA,SAAgB+B,kBACdC,OACA;CACA,MAAM,CAAC,EAAEC,cAAcC,gBAAgB9B,WAAW4B,OAAO,CACvD,gBACA,aACD,CAAC;CAEF,MAAMG,UAAUnB,eAAiC;AAEjD,QAAA;EAAAoB,gBAEKjB,sBAAoB;GACnBkB,MAAI;GACUJ;GACFC;GAAU,UACd;GAAI,CAAA;EAAAE,gBAEbrB,SAAO,EAAA,CAAA;EAAAqB,gBACPf,OAAK;GAACiB,SAAO;GAAA,IAAAC,WAAA;AAAA,WAAAH,gBACXX,cAAY,EAAAc,UACV,iPAA+O,CAAA;;GAAA,CAAA;EAAAH,gBAGnPzB,iBAAe;GAAC0B,MAAI;GAAA,UAAe;GAAI,IAAAE,WAAA;AAAA,WACrCvC,IAAI;mCACsBmC,QAAQK,OAAOC,IAAIC,OAC/CC,KAAID,WAAU,OAAOA,OAAOE,QAAQ,OAAO,GAAG,CAAA,YAAa,CAC3DC,KAAK,IAAI,CAAA;;;;GAEf,CAAA;EAAAT,gBAEMrB,SAAO,EAAA,CAAA;EAAA;;AAUd,SAAS+B,0BAA0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