@powerlines/plugin-env 0.16.27 → 0.16.29
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 +6 -4
- package/dist/components/docs.d.cts.map +1 -1
- package/dist/components/docs.d.mts.map +1 -1
- package/dist/components/docs.mjs +7 -5
- package/dist/components/docs.mjs.map +1 -1
- package/dist/components/env.cjs +10 -12
- package/dist/components/env.mjs +10 -12
- package/dist/components/env.mjs.map +1 -1
- package/dist/helpers/automd-generator.cjs +1 -1
- package/dist/helpers/automd-generator.mjs +1 -1
- package/dist/helpers/create-reflection-resource.cjs +1 -1
- package/dist/helpers/create-reflection-resource.d.cts +1 -1
- package/dist/helpers/create-reflection-resource.d.mts +1 -1
- package/dist/helpers/create-reflection-resource.mjs +1 -1
- package/dist/helpers/create-reflection-resource.mjs.map +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 +3 -3
- package/dist/index.mjs +3 -3
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/parse-type-definition.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/parse-type-definition.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/parse-type-definition.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/to-array.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/to-array.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/to-array.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.6 → @stryke_path@0.26.7}/node_modules/@stryke/path/dist/is-parent-path.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.6 → @stryke_path@0.26.7}/node_modules/@stryke/path/dist/is-parent-path.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.6 → @stryke_path@0.26.7}/node_modules/@stryke/path/dist/is-parent-path.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.6 → @stryke_path@0.26.7}/node_modules/@stryke/path/dist/is-type.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.6 → @stryke_path@0.26.7}/node_modules/@stryke/path/dist/is-type.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.6 → @stryke_path@0.26.7}/node_modules/@stryke/path/dist/is-type.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.6 → @stryke_path@0.26.7}/node_modules/@stryke/path/dist/join-paths.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.6 → @stryke_path@0.26.7}/node_modules/@stryke/path/dist/join-paths.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.6 → @stryke_path@0.26.7}/node_modules/@stryke/path/dist/join-paths.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.6 → @stryke_path@0.26.7}/node_modules/@stryke/path/dist/regex.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.6 → @stryke_path@0.26.7}/node_modules/@stryke/path/dist/regex.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.6 → @stryke_path@0.26.7}/node_modules/@stryke/path/dist/regex.mjs.map +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.6 → @stryke_path@0.26.7}/node_modules/@stryke/path/dist/slash.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.6 → @stryke_path@0.26.7}/node_modules/@stryke/path/dist/slash.mjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_path@0.26.6 → @stryke_path@0.26.7}/node_modules/@stryke/path/dist/slash.mjs.map +1 -1
- package/package.json +17 -17
- /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +0 -0
- /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.40 → @stryke_convert@0.6.41}/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +0 -0
package/dist/components/docs.cjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
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.7/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");
|
|
6
6
|
let __alloy_js_core = require("@alloy-js/core");
|
|
7
7
|
let __alloy_js_markdown = require("@alloy-js/markdown");
|
|
8
|
+
let __powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
|
|
8
9
|
let __powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
9
10
|
let __powerlines_plugin_alloy_markdown_components_markdown_file = require("@powerlines/plugin-alloy/markdown/components/markdown-file");
|
|
10
11
|
let __powerlines_plugin_alloy_markdown_components_markdown_table = require("@powerlines/plugin-alloy/markdown/components/markdown-table");
|
|
@@ -41,15 +42,16 @@ function EnvDocsFile(props) {
|
|
|
41
42
|
}
|
|
42
43
|
}),
|
|
43
44
|
__alloy_js_core.code`package. These values can be updated in the \`.env\` file in the root of the project.`,
|
|
44
|
-
(0, __alloy_js_core_jsx_runtime.
|
|
45
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
45
46
|
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_markdown.Heading, {
|
|
46
47
|
level: 2 + levelOffset,
|
|
47
48
|
children: "Environment Variables"
|
|
48
49
|
}),
|
|
50
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
49
51
|
__alloy_js_core.code`The below list of environment variables are used as configuration parameters to drive the processing of the application. The data contained in these variables are **not** considered sensitive or confidential. Any values provided in these variables will be available in plain text to the public.`,
|
|
50
|
-
(0, __alloy_js_core_jsx_runtime.
|
|
52
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
51
53
|
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_markdown_components_markdown_table.MarkdownTable, { get data() {
|
|
52
|
-
return reflection?.getProperties().filter((property) => property.getNameAsString() !== "
|
|
54
|
+
return reflection?.getProperties().filter((property) => property.getNameAsString() !== "__POWERLINES_INJECTED__").sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())).map((reflectionProperty) => {
|
|
53
55
|
return {
|
|
54
56
|
name: reflectionProperty.getNameAsString().trim(),
|
|
55
57
|
description: (reflectionProperty.getDescription() ?? "").trim(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.cts","names":[],"sources":["../../src/components/docs.tsx"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"docs.d.cts","names":[],"sources":["../../src/components/docs.tsx"],"sourcesContent":[],"mappings":";;;;;UAmCiB,gBAAA,SAAyB,QAAQ;;;AAAlD;;;;;AAiBA;;cANc;;;;;iBAME,WAAA,QAAmB,mBAAgB,eAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.mts","names":[],"sources":["../../src/components/docs.tsx"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"docs.d.mts","names":[],"sources":["../../src/components/docs.tsx"],"sourcesContent":[],"mappings":";;;;;UAmCiB,gBAAA,SAAyB,QAAQ;;;AAAlD;;;;;AAiBA;;cANc;;;;;iBAME,WAAA,QAAmB,mBAAgB,eAAA,CAAA"}
|
package/dist/components/docs.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.
|
|
1
|
+
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.7/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
|
-
import { createComponent,
|
|
4
|
+
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
5
5
|
import { Show, code } from "@alloy-js/core";
|
|
6
6
|
import { Heading, Link } from "@alloy-js/markdown";
|
|
7
|
+
import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
|
|
7
8
|
import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
8
9
|
import { MarkdownFile } from "@powerlines/plugin-alloy/markdown/components/markdown-file";
|
|
9
10
|
import { MarkdownTable } from "@powerlines/plugin-alloy/markdown/components/markdown-table";
|
|
@@ -40,15 +41,16 @@ function EnvDocsFile(props) {
|
|
|
40
41
|
}
|
|
41
42
|
}),
|
|
42
43
|
code`package. These values can be updated in the \`.env\` file in the root of the project.`,
|
|
43
|
-
|
|
44
|
+
createComponent(Spacing, {}),
|
|
44
45
|
createComponent(Heading, {
|
|
45
46
|
level: 2 + levelOffset,
|
|
46
47
|
children: "Environment Variables"
|
|
47
48
|
}),
|
|
49
|
+
createComponent(Spacing, {}),
|
|
48
50
|
code`The below list of environment variables are used as configuration parameters to drive the processing of the application. The data contained in these variables are **not** considered sensitive or confidential. Any values provided in these variables will be available in plain text to the public.`,
|
|
49
|
-
|
|
51
|
+
createComponent(Spacing, {}),
|
|
50
52
|
createComponent(MarkdownTable, { get data() {
|
|
51
|
-
return reflection?.getProperties().filter((property) => property.getNameAsString() !== "
|
|
53
|
+
return reflection?.getProperties().filter((property) => property.getNameAsString() !== "__POWERLINES_INJECTED__").sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())).map((reflectionProperty) => {
|
|
52
54
|
return {
|
|
53
55
|
name: reflectionProperty.getNameAsString().trim(),
|
|
54
56
|
description: (reflectionProperty.getDescription() ?? "").trim(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.mjs","names":["code","Show","Heading","Link","stringifyType","usePowerlines","MarkdownFile","MarkdownTable","joinPaths","getDocsOutputPath","EnvDocsFile","props","levelOffset","reflection","rest","context","_$createComponent","_$mergeProps","path","children","level","when","packageJson","name","href","title","
|
|
1
|
+
{"version":3,"file":"docs.mjs","names":["code","Show","Heading","Link","stringifyType","Spacing","usePowerlines","MarkdownFile","MarkdownTable","joinPaths","getDocsOutputPath","EnvDocsFile","props","levelOffset","reflection","rest","context","_$createComponent","_$mergeProps","path","children","level","when","packageJson","name","href","title","data","getProperties","filter","property","getNameAsString","sort","a","b","localeCompare","map","reflectionProperty","trim","description","getDescription","type","getType","replaceAll","defaultValue","hasDefault","String","getDefaultValue","includes","required","isValueRequired"],"sources":["../../src/components/docs.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 { code, Show } from \"@alloy-js/core\";\nimport { Heading, Link } from \"@alloy-js/markdown\";\nimport {\n ReflectionClass,\n stringifyType\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 {\n MarkdownFile,\n MarkdownFileProps\n} from \"@powerlines/plugin-alloy/markdown/components/markdown-file\";\nimport { MarkdownTable } from \"@powerlines/plugin-alloy/markdown/components/markdown-table\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { getDocsOutputPath } from \"../helpers/docs-helper\";\nimport { EnvPluginContext } from \"../types/plugin\";\n\nexport interface EnvDocsFileProps extends Partial<MarkdownFileProps> {\n /**\n * The heading level offset to apply to the generated documentation.\n *\n * @remarks\n * This is useful when nesting the documentation within other markdown files.\n *\n * @defaultValue 0\n */\n levelOffset?: number;\n\n reflection: ReflectionClass<any>;\n}\n\n/**\n * Generates the environment configuration markdown documentation for the Powerlines project.\n */\nexport function EnvDocsFile(props: EnvDocsFileProps) {\n const { levelOffset = 0, reflection, ...rest } = props;\n\n const context = usePowerlines<EnvPluginContext>();\n\n return (\n <MarkdownFile\n path={joinPaths(getDocsOutputPath(context), \"env.md\")}\n {...rest}>\n <Heading level={1 + levelOffset}>Environment Configuration</Heading>\n {code`Below is a list of environment variables used by the`}\n <Show when={!!context.packageJson.name}>\n <Link\n href={`https://www.npmjs.com/package/${context.packageJson.name}`}\n title={context.packageJson.name!}\n />\n </Show>\n {code`package. These values can be updated in the \\`.env\\` file in the root of the project.`}\n <Spacing />\n <Heading level={2 + levelOffset}>Environment Variables</Heading>\n <Spacing />\n {code`The below list of environment variables are used as configuration parameters to drive the processing of the application. The data contained in these variables are **not** considered sensitive or confidential. Any values provided in these variables will be available in plain text to the public.`}\n <Spacing />\n <MarkdownTable\n data={\n reflection\n ?.getProperties()\n .filter(\n property =>\n property.getNameAsString() !== \"__POWERLINES_INJECTED__\"\n )\n .sort((a, b) =>\n a.getNameAsString().localeCompare(b.getNameAsString())\n )\n .map(reflectionProperty => {\n return {\n name: reflectionProperty.getNameAsString().trim(),\n description: (reflectionProperty.getDescription() ?? \"\").trim(),\n type: stringifyType(reflectionProperty.getType())\n .trim()\n .replaceAll(\" | \", \", or \"),\n defaultValue: reflectionProperty.hasDefault()\n ? String(reflectionProperty.getDefaultValue())?.includes('\"')\n ? reflectionProperty.getDefaultValue()\n : `\\`${reflectionProperty.getDefaultValue()}\\``\n : \"\",\n required: reflectionProperty.isValueRequired() ? \"\" : \"✔\"\n };\n }) ?? []\n }\n />\n </MarkdownFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAoDA,SAAgBW,YAAYC,OAAyB;CACnD,MAAM,EAAEC,cAAc,GAAGC,YAAY,GAAGC,SAASH;CAEjD,MAAMI,UAAUV,eAAiC;AAEjD,QAAAW,gBACGV,cAAYW,WAAA,EAAA,IACXC,OAAI;AAAA,SAAEV,UAAUC,kBAAkBM,QAAQ,EAAE,SAAS;IAAA,EACjDD,MAAI,EAAA,IAAAK,WAAA;AAAA,SAAA;GAAAH,gBACPf,SAAO;IAACmB,OAAO,IAAIR;IAAWO,UAAA;IAAA,CAAA;GAC9BpB,IAAI;GAAsDiB,gBAC1DhB,MAAI;IAAA,IAACqB,OAAI;AAAA,YAAE,CAAC,CAACN,QAAQO,YAAYC;;IAAI,IAAAJ,WAAA;AAAA,YAAAH,gBACnCd,MAAI;MAAA,IACHsB,OAAI;AAAA,cAAE,iCAAiCT,QAAQO,YAAYC;;MAAM,IACjEE,QAAK;AAAA,cAAEV,QAAQO,YAAYC;;MAAI,CAAA;;IAAA,CAAA;GAGlCxB,IAAI;GAAuFiB,gBAC3FZ,SAAO,EAAA,CAAA;GAAAY,gBACPf,SAAO;IAACmB,OAAO,IAAIR;IAAWO,UAAA;IAAA,CAAA;GAAAH,gBAC9BZ,SAAO,EAAA,CAAA;GACPL,IAAI;GAAwSiB,gBAC5SZ,SAAO,EAAA,CAAA;GAAAY,gBACPT,eAAa,EAAA,IACZmB,OAAI;AAAA,WACFb,YACIc,eAAe,CAChBC,QACCC,aACEA,SAASC,iBAAiB,KAAK,0BAClC,CACAC,MAAMC,GAAGC,MACRD,EAAEF,iBAAiB,CAACI,cAAcD,EAAEH,iBAAiB,CACvD,CAAC,CACAK,KAAIC,uBAAsB;AACzB,YAAO;MACLb,MAAMa,mBAAmBN,iBAAiB,CAACO,MAAM;MACjDC,cAAcF,mBAAmBG,gBAAgB,IAAI,IAAIF,MAAM;MAC/DG,MAAMrC,cAAciC,mBAAmBK,SAAS,CAAC,CAC9CJ,MAAM,CACNK,WAAW,OAAO,QAAQ;MAC7BC,cAAcP,mBAAmBQ,YAAY,GACzCC,OAAOT,mBAAmBU,iBAAiB,CAAC,EAAEC,SAAS,KAAI,GACzDX,mBAAmBU,iBAAiB,GACpC,KAAKV,mBAAmBU,iBAAiB,CAAA,MAC3C;MACJE,UAAUZ,mBAAmBa,iBAAiB,GAAG,KAAK;MACvD;MACD,IAAI,EAAE;MAAA,CAAA;GAAA;IAAA,CAAA,CAAA"}
|
package/dist/components/env.cjs
CHANGED
|
@@ -5,9 +5,9 @@ let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type"
|
|
|
5
5
|
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
6
6
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
7
7
|
let __alloy_js_core = require("@alloy-js/core");
|
|
8
|
+
let __powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
|
|
8
9
|
let __powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
9
10
|
let __alloy_js_typescript = require("@alloy-js/typescript");
|
|
10
|
-
let __powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
|
|
11
11
|
let __powerlines_plugin_alloy_helpers_refkey = require("@powerlines/plugin-alloy/helpers/refkey");
|
|
12
12
|
let __powerlines_plugin_alloy_typescript_components_builtin_file = require("@powerlines/plugin-alloy/typescript/components/builtin-file");
|
|
13
13
|
let __powerlines_plugin_alloy_typescript_components_interface_declaration = require("@powerlines/plugin-alloy/typescript/components/interface-declaration");
|
|
@@ -276,18 +276,16 @@ function EnvBuiltin(props) {
|
|
|
276
276
|
name: "constructor",
|
|
277
277
|
"public": true,
|
|
278
278
|
doc: "Initializes a new instance of the `EnvSerializer` class.",
|
|
279
|
-
children: __alloy_js_core.code`
|
|
280
|
-
super("env");
|
|
279
|
+
children: __alloy_js_core.code`super("env");
|
|
281
280
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
`
|
|
281
|
+
this.deserializeRegistry.register(
|
|
282
|
+
ReflectionKind.boolean,
|
|
283
|
+
(type: Type, state: TemplateState) => {
|
|
284
|
+
state.addSetter(
|
|
285
|
+
\`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()}\`
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
); `
|
|
291
289
|
});
|
|
292
290
|
}
|
|
293
291
|
}),
|
package/dist/components/env.mjs
CHANGED
|
@@ -4,9 +4,9 @@ import { ReflectionClass, ReflectionKind } from "@powerlines/deepkit/vendor/type
|
|
|
4
4
|
import { titleCase } from "@stryke/string-format/title-case";
|
|
5
5
|
import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
6
6
|
import { For, Show, code, computed, splitProps } from "@alloy-js/core";
|
|
7
|
+
import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
|
|
7
8
|
import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
8
9
|
import { ClassDeclaration, ClassMethod, ElseIfClause, FunctionDeclaration, IfStatement, NewExpression, TypeDeclaration, VarDeclaration } from "@alloy-js/typescript";
|
|
9
|
-
import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
|
|
10
10
|
import { refkey } from "@powerlines/plugin-alloy/helpers/refkey";
|
|
11
11
|
import { BuiltinFile } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
|
|
12
12
|
import { InterfaceDeclaration } from "@powerlines/plugin-alloy/typescript/components/interface-declaration";
|
|
@@ -275,18 +275,16 @@ function EnvBuiltin(props) {
|
|
|
275
275
|
name: "constructor",
|
|
276
276
|
"public": true,
|
|
277
277
|
doc: "Initializes a new instance of the `EnvSerializer` class.",
|
|
278
|
-
children: code`
|
|
279
|
-
super("env");
|
|
278
|
+
children: code`super("env");
|
|
280
279
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
`
|
|
280
|
+
this.deserializeRegistry.register(
|
|
281
|
+
ReflectionKind.boolean,
|
|
282
|
+
(type: Type, state: TemplateState) => {
|
|
283
|
+
state.addSetter(
|
|
284
|
+
\`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()}\`
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
); `
|
|
290
288
|
});
|
|
291
289
|
}
|
|
292
290
|
}),
|
|
@@ -1 +1 @@
|
|
|
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`\n super(\"env\");\n\n this.deserializeRegistry.register(\n ReflectionKind.boolean,\n (type: Type, state: TemplateState) => {\n state.addSetter(\n \\`typeof \\${state.accessor.toString()} !== \"boolean\" ? \\${state.accessor.toString()} === 1 || \\${state.accessor.toString()} === \"1\" || \\${state.accessor.toString()}.toLowerCase() === \"t\" || \\${state.accessor.toString()}.toLowerCase() === \"true\" || \\${state.accessor.toString()}.toLowerCase() === \"y\" || \\${state.accessor.toString()}.toLowerCase() === \"yes\" : \\${state.accessor.toString()}\\`\n );\n }\n );\n`}\n </ClassMethod>\n </ClassDeclaration>\n <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,0BAA0Bd,OAAuC;CACxE,MAAM,CAAC,EAAEG,SAASE,UAAUjC,WAAW4B,OAAO,CAAC,WAAW,OAAO,CAAC;AAElE,QAAOhC,IAAI,qBAAqBqC,KAAI,+BAAgCF,QAAQK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B,SAAO,EAAA,CAAA;IAAAqB,gBAEPxB,gBAAc;KAAA,UAAA;KAAA,SAAA;KAGbyB,MAAI;KACJuD,KAAG;KACHC,aAAa7F,IAAI;KAAuD,CAAA;IAAAoC,gBAEzErB,SAAO,EAAA,CAAA;IAAAqB,gBAEPxB,gBAAc;KAAA,UAAA;KAAA,SAAA;KAGbyB,MAAI;KACJuD,KAAG;KACHC,aAAa7F,IAAI;KAAuC,CAAA;IAAAoC,gBAEzDrB,SAAO,EAAA,CAAA;IAAAqB,gBACPjC,MAAI;KAAA,IAACuD,OAAI;AAAA,aAAE8B,QAAQjD,SAAS;;KAAGA;KAAQ,CAAA;IAAA;;EAAA,CAAA,CAAA"}
|
|
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,MAA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ths = require('../node_modules/.pnpm/@stryke_path@0.26.
|
|
2
|
+
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.7/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.7/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
2
2
|
import { __ΩUnresolvedContext } from "powerlines";
|
|
3
3
|
import { defineGenerator } from "automd";
|
|
4
4
|
|
|
@@ -4,7 +4,7 @@ const require_types_plugin = require('../types/plugin.cjs');
|
|
|
4
4
|
/**
|
|
5
5
|
* Creates a reflection resource for the environment configuration.
|
|
6
6
|
*
|
|
7
|
-
* @param
|
|
7
|
+
* @param _context - The environment plugin context.
|
|
8
8
|
* @returns A resource that provides the reflection of the environment configuration.
|
|
9
9
|
*/
|
|
10
10
|
function createReflection(_context) {
|
|
@@ -5,7 +5,7 @@ import { EnvPluginContext } from "../types/plugin.cjs";
|
|
|
5
5
|
/**
|
|
6
6
|
* Creates a reflection resource for the environment configuration.
|
|
7
7
|
*
|
|
8
|
-
* @param
|
|
8
|
+
* @param _context - The environment plugin context.
|
|
9
9
|
* @returns A resource that provides the reflection of the environment configuration.
|
|
10
10
|
*/
|
|
11
11
|
declare function createReflection(_context: EnvPluginContext): {};
|
|
@@ -5,7 +5,7 @@ import { EnvPluginContext } from "../types/plugin.mjs";
|
|
|
5
5
|
/**
|
|
6
6
|
* Creates a reflection resource for the environment configuration.
|
|
7
7
|
*
|
|
8
|
-
* @param
|
|
8
|
+
* @param _context - The environment plugin context.
|
|
9
9
|
* @returns A resource that provides the reflection of the environment configuration.
|
|
10
10
|
*/
|
|
11
11
|
declare function createReflection(_context: EnvPluginContext): {};
|
|
@@ -4,7 +4,7 @@ import { __ΩEnvPluginContext } from "../types/plugin.mjs";
|
|
|
4
4
|
/**
|
|
5
5
|
* Creates a reflection resource for the environment configuration.
|
|
6
6
|
*
|
|
7
|
-
* @param
|
|
7
|
+
* @param _context - The environment plugin context.
|
|
8
8
|
* @returns A resource that provides the reflection of the environment configuration.
|
|
9
9
|
*/
|
|
10
10
|
function createReflection(_context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-reflection-resource.mjs","names":[],"sources":["../../src/helpers/create-reflection-resource.ts"],"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 { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Creates a reflection resource for the environment configuration.\n *\n * @param
|
|
1
|
+
{"version":3,"file":"create-reflection-resource.mjs","names":[],"sources":["../../src/helpers/create-reflection-resource.ts"],"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 { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Creates a reflection resource for the environment configuration.\n *\n * @param _context - The environment plugin context.\n * @returns A resource that provides the reflection of the environment configuration.\n */\nexport function createReflection(_context: EnvPluginContext) {\n // const defaultValue = computed(\n // () => context && loadEnvFromContext(context, process.env)\n // );\n\n return {};\n\n // return computed(() => {\n // result.getProperties().forEach(prop => {\n // const aliases = prop.getAlias();\n // aliases.filter(Boolean).forEach(alias => {\n // result.addProperty({\n // name: alias,\n // optional: prop.isOptional() ? true : undefined,\n // readonly: prop.isReadonly() ? true : undefined,\n // description: prop.getDescription(),\n // visibility: prop.getVisibility(),\n // type: prop.getType(),\n // default: prop.getDefaultValue(),\n // tags: {\n // hidden: prop.isHidden(),\n // ignore: prop.isIgnored(),\n // internal: prop.isInternal(),\n // alias: prop\n // .getAlias()\n // .filter(a => a !== alias)\n // .concat(prop.name),\n // title: prop.getTitle() || titleCase(prop.name),\n // readonly: prop.isReadonly(),\n // permission: prop.getPermission(),\n // domain: prop.getDomain()\n // }\n // });\n // });\n // });\n\n // result.getProperties().forEach(prop => {\n // prop.setDefaultValue(\n // (defaultValue.value as Record<string, any>)?.[prop.getNameAsString()] ??\n // prop\n // .getAlias()\n // .reduce(\n // (ret, alias) =>\n // ret ?? (defaultValue.value as Record<string, any>)?.[alias],\n // undefined\n // ) ??\n // prop.getDefaultValue()\n // );\n // });\n // });\n}\n"],"mappings":";;;;;;;;;;AAYI,QAAO,EAAE;;AA4Cb,iBAAiB,SAAS;OAAO;CAAK;CAAA;CAAA;CAAA;CAAA"}
|
|
@@ -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.7/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.7/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.7/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.7/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.7/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.7/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.7/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
5
|
+
const require_is_parent_path = require('../node_modules/.pnpm/@stryke_path@0.26.7/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.7/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
4
|
+
import { isParentPath } from "../node_modules/.pnpm/@stryke_path@0.26.7/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.7/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');
|
|
@@ -10,8 +10,8 @@ const require_helpers_automd_generator = require('./helpers/automd-generator.cjs
|
|
|
10
10
|
const require_components_docs = require('./components/docs.cjs');
|
|
11
11
|
const require_components_env = require('./components/env.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.41/node_modules/@stryke/convert/dist/parse-type-definition.cjs');
|
|
14
|
+
const require_to_array = require('./node_modules/.pnpm/@stryke_convert@0.6.41/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");
|
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.7/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";
|
|
@@ -8,8 +8,8 @@ import { env } from "./helpers/automd-generator.mjs";
|
|
|
8
8
|
import { EnvDocsFile } from "./components/docs.mjs";
|
|
9
9
|
import { EnvBuiltin } from "./components/env.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.41/node_modules/@stryke/convert/dist/parse-type-definition.mjs";
|
|
12
|
+
import { toArray } from "./node_modules/.pnpm/@stryke_convert@0.6.41/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";
|
|
@@ -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.41/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.41/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.41/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.41/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.41/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.41/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.41/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.41/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.41/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.41/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.41/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.41/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.41/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.41/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.41/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.41/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.41/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.41/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.41/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.41/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.41/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.41/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.7/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.7/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.7/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.7/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.7/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.7/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.7/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.7/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.7/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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ACX,IAAI,OAAO;AACX,MAAK,IAAI,QAAQ,GAAG,SAAS,KAAK,QAAQ,EAAE,OAAO;AAClD,MAAI,QAAQ,KAAK,OAAQ,QAAO,KAAK;WAC5B,SAAS,IAAK;MAClB,QAAO;AACZ,MAAI,SAAS,KAAK;AACjB,OAAI,cAAc,QAAQ,KAAK,SAAS,GAAG,YAAY,SAAS,GAAG;AAClE,QAAI,IAAI,SAAS,KAAK,sBAAsB,KAAK,IAAI,IAAI,SAAS,OAAO,OAAO,IAAI,IAAI,SAAS,OAAO,KACvG;SAAI,IAAI,SAAS,GAAG;MACnB,MAAM,iBAAiB,IAAI,YAAY,IAAI;AAC3C,UAAI,mBAAmB,IAAI;AAC1B,aAAM;AACN,2BAAoB;aACd;AACN,aAAM,IAAI,MAAM,GAAG,eAAe;AAClC,2BAAoB,IAAI,SAAS,IAAI,IAAI,YAAY,IAAI;;AAE1D,kBAAY;AACZ,aAAO;AACP;gBACU,IAAI,SAAS,GAAG;AAC1B,YAAM;AACN,0BAAoB;AACpB,kBAAY;AACZ,aAAO;AACP;;;AAGF,QAAI,gBAAgB;AACnB,YAAO,IAAI,SAAS,IAAI,QAAQ;AAChC,yBAAoB;;UAEf;AACN,QAAI,IAAI,SAAS,EAAG,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.7/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.7/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.7/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.7/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.29",
|
|
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": {
|
|
@@ -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.
|
|
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.
|
|
313
|
-
"@stryke/capnp": "^0.12.
|
|
314
|
-
"@stryke/env": "^0.20.
|
|
315
|
-
"@stryke/fs": "^0.33.
|
|
316
|
-
"@stryke/json": "^0.9.
|
|
317
|
-
"@stryke/string-format": "^0.14.
|
|
318
|
-
"@stryke/type-checks": "^0.5.
|
|
319
|
-
"@stryke/types": "^0.10.
|
|
308
|
+
"@powerlines/plugin-alloy": "^0.24.1",
|
|
309
|
+
"@powerlines/plugin-automd": "^0.1.310",
|
|
310
|
+
"@powerlines/plugin-babel": "^0.12.316",
|
|
311
|
+
"@powerlines/plugin-plugin": "^0.12.261",
|
|
312
|
+
"@storm-software/config-tools": "^1.189.11",
|
|
313
|
+
"@stryke/capnp": "^0.12.69",
|
|
314
|
+
"@stryke/env": "^0.20.61",
|
|
315
|
+
"@stryke/fs": "^0.33.44",
|
|
316
|
+
"@stryke/json": "^0.9.44",
|
|
317
|
+
"@stryke/string-format": "^0.14.3",
|
|
318
|
+
"@stryke/type-checks": "^0.5.26",
|
|
319
|
+
"@stryke/types": "^0.10.40",
|
|
320
320
|
"automd": "^0.4.3",
|
|
321
|
-
"powerlines": "^0.39.
|
|
321
|
+
"powerlines": "^0.39.18"
|
|
322
322
|
},
|
|
323
323
|
"devDependencies": {
|
|
324
|
-
"@powerlines/deepkit": "^0.6.
|
|
325
|
-
"@powerlines/plugin-deepkit": "^0.11.
|
|
324
|
+
"@powerlines/deepkit": "^0.6.89",
|
|
325
|
+
"@powerlines/plugin-deepkit": "^0.11.189",
|
|
326
326
|
"@types/node": "^25.3.3",
|
|
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": "6af904f5f2de5a2f665c47e8330c4a5bb8d2e2ca"
|
|
332
332
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|