@powerlines/plugin-env 0.16.301 → 0.16.302
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.
|
@@ -382,26 +382,26 @@ function EnvBuiltin(props) {
|
|
|
382
382
|
doc: "The initial environment configuration object values for the runtime."
|
|
383
383
|
}),
|
|
384
384
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
385
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
|
|
386
|
-
heading: "Initializes the Powerlines environment configuration module.",
|
|
387
|
-
get children() {
|
|
388
|
-
return [
|
|
389
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `This function initializes the Powerlines environment configuration object.` }),
|
|
390
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocParam, {
|
|
391
|
-
name: "environmentConfig",
|
|
392
|
-
children: `The dynamic/runtime configuration - this could include the current environment variables or any other environment-specific settings provided by the runtime.`
|
|
393
|
-
}),
|
|
394
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocReturns, { children: `The initialized Powerlines configuration object.` })
|
|
395
|
-
];
|
|
396
|
-
}
|
|
397
|
-
}),
|
|
398
385
|
parserCode,
|
|
386
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
399
387
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
400
388
|
get when() {
|
|
401
389
|
return Boolean(context?.entryPath);
|
|
402
390
|
},
|
|
403
391
|
get children() {
|
|
404
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
392
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
|
|
393
|
+
heading: "Initializes the Powerlines environment configuration module.",
|
|
394
|
+
get children() {
|
|
395
|
+
return [
|
|
396
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `This function initializes the Powerlines environment configuration object.` }),
|
|
397
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocParam, {
|
|
398
|
+
name: "environmentConfig",
|
|
399
|
+
children: `The dynamic/runtime configuration - this could include the current environment variables or any other environment-specific settings provided by the runtime.`
|
|
400
|
+
}),
|
|
401
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocReturns, { children: `The initialized Powerlines configuration object.` })
|
|
402
|
+
];
|
|
403
|
+
}
|
|
404
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
405
405
|
refkey: createEnvRefkey,
|
|
406
406
|
async: false,
|
|
407
407
|
"export": true,
|
|
@@ -479,7 +479,7 @@ function EnvBuiltin(props) {
|
|
|
479
479
|
`
|
|
480
480
|
];
|
|
481
481
|
}
|
|
482
|
-
});
|
|
482
|
+
})];
|
|
483
483
|
}
|
|
484
484
|
}),
|
|
485
485
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
@@ -381,26 +381,26 @@ function EnvBuiltin(props) {
|
|
|
381
381
|
doc: "The initial environment configuration object values for the runtime."
|
|
382
382
|
}),
|
|
383
383
|
createComponent(Spacing, {}),
|
|
384
|
-
createComponent(TSDoc, {
|
|
385
|
-
heading: "Initializes the Powerlines environment configuration module.",
|
|
386
|
-
get children() {
|
|
387
|
-
return [
|
|
388
|
-
createComponent(TSDocRemarks, { children: `This function initializes the Powerlines environment configuration object.` }),
|
|
389
|
-
createComponent(TSDocParam, {
|
|
390
|
-
name: "environmentConfig",
|
|
391
|
-
children: `The dynamic/runtime configuration - this could include the current environment variables or any other environment-specific settings provided by the runtime.`
|
|
392
|
-
}),
|
|
393
|
-
createComponent(TSDocReturns, { children: `The initialized Powerlines configuration object.` })
|
|
394
|
-
];
|
|
395
|
-
}
|
|
396
|
-
}),
|
|
397
384
|
parserCode,
|
|
385
|
+
createComponent(Spacing, {}),
|
|
398
386
|
createComponent(Show, {
|
|
399
387
|
get when() {
|
|
400
388
|
return Boolean(context?.entryPath);
|
|
401
389
|
},
|
|
402
390
|
get children() {
|
|
403
|
-
return createComponent(
|
|
391
|
+
return [createComponent(TSDoc, {
|
|
392
|
+
heading: "Initializes the Powerlines environment configuration module.",
|
|
393
|
+
get children() {
|
|
394
|
+
return [
|
|
395
|
+
createComponent(TSDocRemarks, { children: `This function initializes the Powerlines environment configuration object.` }),
|
|
396
|
+
createComponent(TSDocParam, {
|
|
397
|
+
name: "environmentConfig",
|
|
398
|
+
children: `The dynamic/runtime configuration - this could include the current environment variables or any other environment-specific settings provided by the runtime.`
|
|
399
|
+
}),
|
|
400
|
+
createComponent(TSDocReturns, { children: `The initialized Powerlines configuration object.` })
|
|
401
|
+
];
|
|
402
|
+
}
|
|
403
|
+
}), createComponent(FunctionDeclaration, {
|
|
404
404
|
refkey: createEnvRefkey,
|
|
405
405
|
async: false,
|
|
406
406
|
"export": true,
|
|
@@ -478,7 +478,7 @@ function EnvBuiltin(props) {
|
|
|
478
478
|
`
|
|
479
479
|
];
|
|
480
480
|
}
|
|
481
|
-
});
|
|
481
|
+
})];
|
|
482
482
|
}
|
|
483
483
|
}),
|
|
484
484
|
createComponent(Spacing, {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-builtin.mjs","names":[],"sources":["../../src/components/env-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n code,\n computed,\n For,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n InterfaceDeclaration as BaseInterfaceDeclaration,\n ElseIfClause,\n FunctionDeclaration,\n IfStatement,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { refkey } from \"@powerlines/plugin-alloy/helpers/refkey\";\nimport type { ComponentProps } from \"@powerlines/plugin-alloy/types/components\";\nimport {\n BuiltinFile,\n BuiltinFileProps,\n InterfaceDeclaration,\n InterfaceMember,\n ObjectDeclaration,\n TSDocSchemaProperty\n} from \"@powerlines/plugin-alloy/typescript/components\";\nimport {\n TSDoc,\n TSDocParam,\n TSDocRemarks,\n TSDocReturns\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport {\n generateParserCode,\n getPropertiesList,\n GetPropertiesResult,\n JsonSchema\n} from \"@powerlines/schema\";\nimport { getUnique } from \"@stryke/helpers/get-unique\";\nimport { loadEnvFromContext } from \"../helpers/load\";\nimport type { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Generates the environment configuration typescript definition for the Powerlines project.\n */\nexport function EnvTypeDefinition() {\n const context = usePowerlines<EnvPluginContext>();\n\n return (\n <>\n <InterfaceDeclaration\n name=\"UnprefixedEnv\"\n schema={context.env.config.schema}\n export\n />\n <Spacing />\n <TSDoc heading=\"The environment configuration object with prefixed keys.\">\n <TSDocRemarks>\n {`The \\`Env\\` type extends the \\`UnprefixedEnv\\` interface by including additional keys that are prefixed according to the project's configuration. This allows for flexibility in accessing environment variables with different naming conventions.`}\n </TSDocRemarks>\n </TSDoc>\n <BaseInterfaceDeclaration name=\"Env\" export extends=\"UnprefixedEnv\">\n <For\n each={getUnique(context.config.env.prefix).map(prefix =>\n prefix.replace(/_$/, \"\")\n )}\n doubleHardline>\n {prefix => (\n <For\n each={\n getPropertiesList(context.env.config.schema).filter(\n property => !property.ignore\n ) ?? []\n }\n doubleHardline>\n {property => (\n <>\n <TSDocSchemaProperty\n schema={property}\n defaultValue={property?.default}\n />\n <InterfaceMember\n name={`${prefix}_${property.name}`}\n type={`UnprefixedEnv[\"${property.name}\"]`}\n schema={property}\n required={property.required}\n readOnly={property.readOnly}\n />\n </>\n )}\n </For>\n )}\n </For>\n </BaseInterfaceDeclaration>\n <Spacing />\n </>\n );\n}\n\ninterface ConfigPropertyConditionalProps extends ComponentProps {\n context: EnvPluginContext;\n name: string;\n}\n\nfunction ConfigPropertyConditional(props: ConfigPropertyConditionalProps) {\n const [{ context, name }] = splitProps(props, [\"context\", \"name\"]);\n\n return code`propertyName === \"${name}\" || propertyName.replace(/^(${getUnique(\n context.config.env.prefix\n .sort((a, b) =>\n a.startsWith(b) ? -1 : b.startsWith(a) ? 1 : a.localeCompare(b)\n )\n .map(prefix => `${prefix.replace(/_$/, \"\")}_`)\n ).join(\"|\")})/g, \"\").toLowerCase().replace(/[\\\\s\\\\-_]+/g, \"\") === \"${name\n .toLowerCase()\n .replace(/[\\s\\-_]+/g, \"\")}\"`;\n}\n\ninterface ConfigPropertyProps extends ComponentProps {\n index: number;\n context: EnvPluginContext;\n name: string;\n property: JsonSchema;\n}\n\nfunction ConfigPropertyGet(props: ConfigPropertyProps) {\n const [{ context, name, property, index }] = splitProps(props, [\n \"context\",\n \"name\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional name={name} context={context} />\n <Show when={property?.alias && property?.alias.length > 0}>\n {code` || `}\n <For each={property?.alias ?? []} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${name}\"];`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional name={name} context={context} />\n <Show when={property?.alias && property?.alias.length > 0}>\n {code` || `}\n <For each={property?.alias ?? []} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${name}\"];`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nfunction ConfigPropertySet(props: ConfigPropertyProps) {\n const [{ context, name, property, index }] = splitProps(props, [\n \"context\",\n \"name\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional name={name} context={context} />\n <Show when={property?.alias && property?.alias.length > 0}>\n {code` || `}\n <For each={property?.alias ?? []} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${name}\"] = newValue;\n return true;\n`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional name={name} context={context} />\n <Show when={property?.alias && property?.alias.length > 0}>\n {code` || `}\n <For each={property?.alias ?? []} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${name}\"] = newValue;\n return true;\n`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nexport interface EnvBuiltinProps extends Omit<BuiltinFileProps, \"id\"> {\n defaultConfig?: Children;\n}\n\nconst createEnvRefkey = refkey(\"createEnv\");\nconst envRefkey = refkey(\"env\");\n\n/**\n * Generates the environment configuration module for the Powerlines project.\n */\nexport function EnvBuiltin(props: EnvBuiltinProps) {\n const [{ defaultConfig, children }, rest] = splitProps(props, [\n \"defaultConfig\",\n \"children\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n const defaultValue = computed(\n () => context && loadEnvFromContext(context, process.env)\n );\n\n const schemaGetProperties = computed(\n () =>\n (getPropertiesList(context.env.config)\n .filter(property => !property?.ignore && !property?.writeOnly)\n .sort((a, b) =>\n !a?.name && !b?.name\n ? 0\n : !a?.name\n ? 1\n : !b?.name\n ? -1\n : a?.name.localeCompare(b?.name)\n ) ?? []) as GetPropertiesResult[]\n );\n const schemaSetProperties = computed(\n () =>\n (getPropertiesList(context.env.config)\n .filter(property => !property?.ignore && !property?.readOnly)\n .sort((a, b) =>\n !a?.name && !b?.name\n ? 0\n : !a?.name\n ? 1\n : !b?.name\n ? -1\n : a?.name.localeCompare(b?.name)\n ) ?? []) as GetPropertiesResult[]\n );\n\n const parserCode = generateParserCode(context.env.config.schema);\n\n return (\n <BuiltinFile\n id=\"env\"\n description=\"The environment configuration module provides an interface to define environment configuration parameters.\"\n {...rest}>\n <Show when={Boolean(context.env.config.schema)}>\n <EnvTypeDefinition defaultValue={defaultValue} />\n <Spacing />\n </Show>\n <ObjectDeclaration\n name=\"initialEnv\"\n type=\"Partial<Env>\"\n schema={context.env.config.schema}\n export\n const\n doc=\"The initial environment configuration object values for the runtime.\"\n />\n <Spacing />\n <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 {parserCode}\n <Show when={Boolean(context?.entryPath)}>\n <FunctionDeclaration\n refkey={createEnvRefkey}\n async={false}\n export\n name=\"createEnv\"\n parameters={[\n {\n name: \"environmentConfig\",\n type: `Partial<Env>`,\n optional: false,\n default: \"{}\"\n }\n ]}\n returnType=\"Env\">\n {code`\n return new Proxy<Env>(\n parse({\n ...initialEnv,\n ...environmentConfig\n } as Env),\n {\n get: (target: UnprefixedEnv, propertyName: string) => { `}\n <hbr />\n <For each={schemaGetProperties.value}>\n {(property: GetPropertiesResult, index: number) => (\n <ConfigPropertyGet\n index={index}\n context={context}\n name={property.name}\n property={property}\n />\n )}\n </For>\n {code`\n return undefined;\n }, `}\n\n <Spacing />\n {code` set: (target: UnprefixedEnv, propertyName: string, newValue: any) => { `}\n <hbr />\n <For each={schemaSetProperties.value} ender={code` else `}>\n {(property: GetPropertiesResult, index: number) => (\n <ConfigPropertySet\n index={index}\n context={context}\n name={property.name}\n property={property}\n />\n )}\n </For>\n\n <hbr />\n {code`return false;\n }\n }\n );\n`}\n </FunctionDeclaration>\n </Show>\n <Spacing />\n <TSDoc heading=\"The environment configuration object.\">\n <TSDocRemarks>\n {`This object provides access to the environment configuration parameters in the application runtime.`}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n refkey={envRefkey}\n name=\"env\"\n type=\"Env\"\n export\n const\n initializer={\n <>{code`createEnv(${defaultConfig || \"{}\"} as Partial<Env>);`}</>\n }\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isCI\"\n doc=\"Detect if the application is running in a continuous integration (CI) environment.\"\n initializer={code`Boolean(\n env.CI ||\n env.RUN_ID ||\n env.AGOLA_GIT_REF ||\n env.AC_APPCIRCLE ||\n env.APPVEYOR ||\n env.CODEBUILD ||\n env.TF_BUILD ||\n env.bamboo_planKey ||\n env.BITBUCKET_COMMIT ||\n env.BITRISE_IO ||\n env.BUDDY_WORKSPACE_ID ||\n env.BUILDKITE ||\n env.CIRCLECI ||\n env.CIRRUS_CI ||\n env.CF_BUILD_ID ||\n env.CM_BUILD_ID ||\n env.CI_NAME ||\n env.DRONE ||\n env.DSARI ||\n env.EARTHLY_CI ||\n env.EAS_BUILD ||\n env.GERRIT_PROJECT ||\n env.GITEA_ACTIONS ||\n env.GITHUB_ACTIONS ||\n env.GITLAB_CI ||\n env.GOCD ||\n env.BUILDER_OUTPUT ||\n env.HARNESS_BUILD_ID ||\n env.JENKINS_URL ||\n env.LAYERCI ||\n env.MAGNUM ||\n env.NETLIFY ||\n env.NEVERCODE ||\n env.PROW_JOB_ID ||\n env.RELEASE_BUILD_ID ||\n env.RENDER ||\n env.SAILCI ||\n env.HUDSON ||\n env.SCREWDRIVER ||\n env.SEMAPHORE ||\n env.SOURCEHUT ||\n env.STRIDER ||\n env.TASK_ID ||\n env.RUN_ID ||\n env.TEAMCITY_VERSION ||\n env.TRAVIS ||\n env.VELA ||\n env.NOW_BUILDER ||\n env.APPCENTER_BUILD_ID ||\n env.CI_XCODE_PROJECT ||\n env.XCS || false\n ); `}\n />\n <Spacing />\n\n <TSDoc heading=\"Detect the \\`mode\\` of the current runtime environment.\">\n <TSDocRemarks>\n {code`The \\`mode\\` is determined by the \\`MODE\\` environment variable, or falls back to the \\`NEXT_PUBLIC_VERCEL_ENV\\`, \\`NODE_ENV\\`, or defaults to \\`production\\`. While the value can potentially be any string, it is generally recommended to only allow a value in the following list:\n - \\`production\\`\n - \\`test\\`\n - \\`development\\`\n `}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n export\n const\n name=\"mode\"\n initializer={code`String(env.MODE) || \"production\"; `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isProduction\"\n doc='Detect if the application is running in `\"production\"` mode'\n initializer={code`[\"prd\", \"prod\", \"production\"].includes(mode.toLowerCase()); `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isTest\"\n doc='Detect if the application is running in `\"test\"` mode'\n initializer={code`[\"tst\", \"test\", \"testing\", \"stg\", \"stage\", \"staging\"].includes(mode.toLowerCase()) || env.TEST; `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isDevelopment\"\n doc='Detect if the application is running in `\"development\"` mode'\n initializer={code`[\"dev\", \"development\"].includes(mode.toLowerCase()); `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isDebug\"\n doc=\"Detect if the application is currently being debugged\"\n initializer={code`Boolean(isDevelopment && env.DEBUG); `}\n />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BuiltinFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,UAAU;CAAC;CAAI;CAAM;CAAQ;AAAG;;;;;;;AAEtC,SAAM,aAAS,IAAW,MAAM;CAC/B,GAAG,SAAU;CACb,OAAQ;AACT;;;;AA+BA,SAAa,oBAAA;CACX,MAAA,WAAgB,cAAA,IAAA,CAAA,CAAA,oBAAA,MAAA,CAAA,GAAA,cAAA;CAChB,OAAA;EAAA,gBAAoB,wBAAA;GACpB,MAAA;GACA,IAAA,SAAA;IACA,OAAA,QAAA,IAAA,OAAA;GACA;GACF,UAAO;EACL,CAAA;EAAA,gBAAK,SAAA,CAAA,CAAA;EAAA,gBAAA,OAAA;GACL,SAAU;GACV,IAAA,WAAY;IACZ,OAAA,gBAAA,cAAA,EACM,UAAC,sPACH,CAAC;GACL;EACA,CAAA;EAAA,gBAAiB,sBAAA;GACjB,MAAA;GACA,UAAA;GACA,WAAO;GACT,IAAQ,WAAW;IACb,OAAG,gBAAqB,KAAM;KAC7B,IAAK,OAAE;;;;;;KAEZ;KACC,gBAAc;KACf,IAAA,WAAA;MACK,OAAS,cAAA,WAAoB,gBAAA,KAAA;OAC5B,IAAQ,OAAE;;;;;;OAET;OACJ,gBAAA;OACE,IAAA,WAAA;QACO,OAAA,cAAa,aAAA,CAAA,gBAAA,qBAAA;SACX,QAAQ;SAChB,IAAA,eAAA;UACD,OAAA,UAAA;SACS;QACH,CAAA,GAAA,gBAAa,iBAA0B;SAC3C,IAAA,OAAY;UACH,OAAM,GAAI,OAAC,GAAQ,SAAM;SACjC;SACG,IAAA,OAAA;UACN,OAAA,kBAAoC,SAAO,KAAO;SAChD;SACO,QAAA;SACJ,IAAO,WAAY;UACpB,OAAA,SAAA;SACD;SACC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BAAA;IACZ;GACF,CAAC;GAAG,gBAAM,SAAA,CAAA,CAAA;GAAA,gBAAA,gBAAA;IACR,UAAO;IACP,SAAM;IACN,MAAM;IACN,KAAK;IACL,aAAQ,IAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDnB,CAAC;GAAG,gBAAiB,SAAA,CAAA,CAAA;GAAA,gBAAA,OAAA;IACnB,SAAM;IACN,IAAE,WAAa;KACb,OAAI,gBAAO,cAAA,EACX,UAAW,IAAA;;;;YAKX,CAAA;IACF;GACF,CAAC;GAAG,gBAAU,gBAAA;IACZ,UAAM;IACN,SAAM;IACN,MAAM;IACN,aAAa,IAAE;GACjB,CAAC;GAAG,gBAAY,SAAA,CAAA,CAAA;GAAA,gBAAA,gBAAA;IACd,UAAM;IACN,SAAM;IACN,MAAM;IACN,KAAK;IACL,aAAa,IAAC;GAChB,CAAC;GAAG,gBAAY,SAAA,CAAA,CAAA;GAAA,gBAAA,gBAAA;IACd,UAAM;IACN,SAAM;IACN,MAAM;IACN,KAAK;IACL,aAAa,IAAE;GACjB,CAAC;GAAG,gBAAa,SAAA,CAAA,CAAA;GAAA,gBAAA,gBAAA;IACf,UAAM;IACN,SAAM;IACN,MAAM;IACN,KAAK;IACL,aAAM,IAAW;GACnB,CAAC;GAAG,gBAAI,SAAoB,CAAA,CAAA;GAAA,gBAAA,gBAAA;IAC1B,UAAM;IACN,SAAS;IACT,MAAI;IACL,KAAA;IACA,aAAS,IAAA;;;;IAET,IAAK,OAAC;KACJ,OAAA,QAAY,QAAA;IACb;IACM;GACR,CAAC;EAAC;CACJ,EACF,CAAC,CAAC;AACJ;AACA,WAAQ,SAAK;OAAA;CAAA;CAAA;CAAA;CAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"env-builtin.mjs","names":[],"sources":["../../src/components/env-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n code,\n computed,\n For,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n InterfaceDeclaration as BaseInterfaceDeclaration,\n ElseIfClause,\n FunctionDeclaration,\n IfStatement,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { refkey } from \"@powerlines/plugin-alloy/helpers/refkey\";\nimport type { ComponentProps } from \"@powerlines/plugin-alloy/types/components\";\nimport {\n BuiltinFile,\n BuiltinFileProps,\n InterfaceDeclaration,\n InterfaceMember,\n ObjectDeclaration,\n TSDocSchemaProperty\n} from \"@powerlines/plugin-alloy/typescript/components\";\nimport {\n TSDoc,\n TSDocParam,\n TSDocRemarks,\n TSDocReturns\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport {\n generateParserCode,\n getPropertiesList,\n GetPropertiesResult,\n JsonSchema\n} from \"@powerlines/schema\";\nimport { getUnique } from \"@stryke/helpers/get-unique\";\nimport { loadEnvFromContext } from \"../helpers/load\";\nimport type { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Generates the environment configuration typescript definition for the Powerlines project.\n */\nexport function EnvTypeDefinition() {\n const context = usePowerlines<EnvPluginContext>();\n\n return (\n <>\n <InterfaceDeclaration\n name=\"UnprefixedEnv\"\n schema={context.env.config.schema}\n export\n />\n <Spacing />\n <TSDoc heading=\"The environment configuration object with prefixed keys.\">\n <TSDocRemarks>\n {`The \\`Env\\` type extends the \\`UnprefixedEnv\\` interface by including additional keys that are prefixed according to the project's configuration. This allows for flexibility in accessing environment variables with different naming conventions.`}\n </TSDocRemarks>\n </TSDoc>\n <BaseInterfaceDeclaration name=\"Env\" export extends=\"UnprefixedEnv\">\n <For\n each={getUnique(context.config.env.prefix).map(prefix =>\n prefix.replace(/_$/, \"\")\n )}\n doubleHardline>\n {prefix => (\n <For\n each={\n getPropertiesList(context.env.config.schema).filter(\n property => !property.ignore\n ) ?? []\n }\n doubleHardline>\n {property => (\n <>\n <TSDocSchemaProperty\n schema={property}\n defaultValue={property?.default}\n />\n <InterfaceMember\n name={`${prefix}_${property.name}`}\n type={`UnprefixedEnv[\"${property.name}\"]`}\n schema={property}\n required={property.required}\n readOnly={property.readOnly}\n />\n </>\n )}\n </For>\n )}\n </For>\n </BaseInterfaceDeclaration>\n <Spacing />\n </>\n );\n}\n\ninterface ConfigPropertyConditionalProps extends ComponentProps {\n context: EnvPluginContext;\n name: string;\n}\n\nfunction ConfigPropertyConditional(props: ConfigPropertyConditionalProps) {\n const [{ context, name }] = splitProps(props, [\"context\", \"name\"]);\n\n return code`propertyName === \"${name}\" || propertyName.replace(/^(${getUnique(\n context.config.env.prefix\n .sort((a, b) =>\n a.startsWith(b) ? -1 : b.startsWith(a) ? 1 : a.localeCompare(b)\n )\n .map(prefix => `${prefix.replace(/_$/, \"\")}_`)\n ).join(\"|\")})/g, \"\").toLowerCase().replace(/[\\\\s\\\\-_]+/g, \"\") === \"${name\n .toLowerCase()\n .replace(/[\\s\\-_]+/g, \"\")}\"`;\n}\n\ninterface ConfigPropertyProps extends ComponentProps {\n index: number;\n context: EnvPluginContext;\n name: string;\n property: JsonSchema;\n}\n\nfunction ConfigPropertyGet(props: ConfigPropertyProps) {\n const [{ context, name, property, index }] = splitProps(props, [\n \"context\",\n \"name\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional name={name} context={context} />\n <Show when={property?.alias && property?.alias.length > 0}>\n {code` || `}\n <For each={property?.alias ?? []} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${name}\"];`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional name={name} context={context} />\n <Show when={property?.alias && property?.alias.length > 0}>\n {code` || `}\n <For each={property?.alias ?? []} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${name}\"];`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nfunction ConfigPropertySet(props: ConfigPropertyProps) {\n const [{ context, name, property, index }] = splitProps(props, [\n \"context\",\n \"name\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional name={name} context={context} />\n <Show when={property?.alias && property?.alias.length > 0}>\n {code` || `}\n <For each={property?.alias ?? []} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${name}\"] = newValue;\n return true;\n`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional name={name} context={context} />\n <Show when={property?.alias && property?.alias.length > 0}>\n {code` || `}\n <For each={property?.alias ?? []} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${name}\"] = newValue;\n return true;\n`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nexport interface EnvBuiltinProps extends Omit<BuiltinFileProps, \"id\"> {\n defaultConfig?: Children;\n}\n\nconst createEnvRefkey = refkey(\"createEnv\");\nconst envRefkey = refkey(\"env\");\n\n/**\n * Generates the environment configuration module for the Powerlines project.\n */\nexport function EnvBuiltin(props: EnvBuiltinProps) {\n const [{ defaultConfig, children }, rest] = splitProps(props, [\n \"defaultConfig\",\n \"children\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n const defaultValue = computed(\n () => context && loadEnvFromContext(context, process.env)\n );\n\n const schemaGetProperties = computed(\n () =>\n (getPropertiesList(context.env.config)\n .filter(property => !property?.ignore && !property?.writeOnly)\n .sort((a, b) =>\n !a?.name && !b?.name\n ? 0\n : !a?.name\n ? 1\n : !b?.name\n ? -1\n : a?.name.localeCompare(b?.name)\n ) ?? []) as GetPropertiesResult[]\n );\n const schemaSetProperties = computed(\n () =>\n (getPropertiesList(context.env.config)\n .filter(property => !property?.ignore && !property?.readOnly)\n .sort((a, b) =>\n !a?.name && !b?.name\n ? 0\n : !a?.name\n ? 1\n : !b?.name\n ? -1\n : a?.name.localeCompare(b?.name)\n ) ?? []) as GetPropertiesResult[]\n );\n\n const parserCode = generateParserCode(context.env.config.schema);\n\n return (\n <BuiltinFile\n id=\"env\"\n description=\"The environment configuration module provides an interface to define environment configuration parameters.\"\n {...rest}>\n <Show when={Boolean(context.env.config.schema)}>\n <EnvTypeDefinition defaultValue={defaultValue} />\n <Spacing />\n </Show>\n <ObjectDeclaration\n name=\"initialEnv\"\n type=\"Partial<Env>\"\n schema={context.env.config.schema}\n export\n const\n doc=\"The initial environment configuration object values for the runtime.\"\n />\n <Spacing />\n {parserCode}\n <Spacing />\n <Show when={Boolean(context?.entryPath)}>\n <TSDoc heading=\"Initializes the Powerlines environment configuration module.\">\n <TSDocRemarks>\n {`This function initializes the Powerlines environment configuration object.`}\n </TSDocRemarks>\n <TSDocParam name=\"environmentConfig\">\n {`The dynamic/runtime configuration - this could include the current environment variables or any other environment-specific settings provided by the runtime.`}\n </TSDocParam>\n <TSDocReturns>\n {`The initialized Powerlines configuration object.`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n refkey={createEnvRefkey}\n async={false}\n export\n name=\"createEnv\"\n parameters={[\n {\n name: \"environmentConfig\",\n type: `Partial<Env>`,\n optional: false,\n default: \"{}\"\n }\n ]}\n returnType=\"Env\">\n {code`\n return new Proxy<Env>(\n parse({\n ...initialEnv,\n ...environmentConfig\n } as Env),\n {\n get: (target: UnprefixedEnv, propertyName: string) => { `}\n <hbr />\n <For each={schemaGetProperties.value}>\n {(property: GetPropertiesResult, index: number) => (\n <ConfigPropertyGet\n index={index}\n context={context}\n name={property.name}\n property={property}\n />\n )}\n </For>\n {code`\n return undefined;\n }, `}\n\n <Spacing />\n {code` set: (target: UnprefixedEnv, propertyName: string, newValue: any) => { `}\n <hbr />\n <For each={schemaSetProperties.value} ender={code` else `}>\n {(property: GetPropertiesResult, index: number) => (\n <ConfigPropertySet\n index={index}\n context={context}\n name={property.name}\n property={property}\n />\n )}\n </For>\n\n <hbr />\n {code`return false;\n }\n }\n );\n`}\n </FunctionDeclaration>\n </Show>\n <Spacing />\n <TSDoc heading=\"The environment configuration object.\">\n <TSDocRemarks>\n {`This object provides access to the environment configuration parameters in the application runtime.`}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n refkey={envRefkey}\n name=\"env\"\n type=\"Env\"\n export\n const\n initializer={\n <>{code`createEnv(${defaultConfig || \"{}\"} as Partial<Env>);`}</>\n }\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isCI\"\n doc=\"Detect if the application is running in a continuous integration (CI) environment.\"\n initializer={code`Boolean(\n env.CI ||\n env.RUN_ID ||\n env.AGOLA_GIT_REF ||\n env.AC_APPCIRCLE ||\n env.APPVEYOR ||\n env.CODEBUILD ||\n env.TF_BUILD ||\n env.bamboo_planKey ||\n env.BITBUCKET_COMMIT ||\n env.BITRISE_IO ||\n env.BUDDY_WORKSPACE_ID ||\n env.BUILDKITE ||\n env.CIRCLECI ||\n env.CIRRUS_CI ||\n env.CF_BUILD_ID ||\n env.CM_BUILD_ID ||\n env.CI_NAME ||\n env.DRONE ||\n env.DSARI ||\n env.EARTHLY_CI ||\n env.EAS_BUILD ||\n env.GERRIT_PROJECT ||\n env.GITEA_ACTIONS ||\n env.GITHUB_ACTIONS ||\n env.GITLAB_CI ||\n env.GOCD ||\n env.BUILDER_OUTPUT ||\n env.HARNESS_BUILD_ID ||\n env.JENKINS_URL ||\n env.LAYERCI ||\n env.MAGNUM ||\n env.NETLIFY ||\n env.NEVERCODE ||\n env.PROW_JOB_ID ||\n env.RELEASE_BUILD_ID ||\n env.RENDER ||\n env.SAILCI ||\n env.HUDSON ||\n env.SCREWDRIVER ||\n env.SEMAPHORE ||\n env.SOURCEHUT ||\n env.STRIDER ||\n env.TASK_ID ||\n env.RUN_ID ||\n env.TEAMCITY_VERSION ||\n env.TRAVIS ||\n env.VELA ||\n env.NOW_BUILDER ||\n env.APPCENTER_BUILD_ID ||\n env.CI_XCODE_PROJECT ||\n env.XCS || false\n ); `}\n />\n <Spacing />\n\n <TSDoc heading=\"Detect the \\`mode\\` of the current runtime environment.\">\n <TSDocRemarks>\n {code`The \\`mode\\` is determined by the \\`MODE\\` environment variable, or falls back to the \\`NEXT_PUBLIC_VERCEL_ENV\\`, \\`NODE_ENV\\`, or defaults to \\`production\\`. While the value can potentially be any string, it is generally recommended to only allow a value in the following list:\n - \\`production\\`\n - \\`test\\`\n - \\`development\\`\n `}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n export\n const\n name=\"mode\"\n initializer={code`String(env.MODE) || \"production\"; `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isProduction\"\n doc='Detect if the application is running in `\"production\"` mode'\n initializer={code`[\"prd\", \"prod\", \"production\"].includes(mode.toLowerCase()); `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isTest\"\n doc='Detect if the application is running in `\"test\"` mode'\n initializer={code`[\"tst\", \"test\", \"testing\", \"stg\", \"stage\", \"staging\"].includes(mode.toLowerCase()) || env.TEST; `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isDevelopment\"\n doc='Detect if the application is running in `\"development\"` mode'\n initializer={code`[\"dev\", \"development\"].includes(mode.toLowerCase()); `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isDebug\"\n doc=\"Detect if the application is currently being debugged\"\n initializer={code`Boolean(isDevelopment && env.DEBUG); `}\n />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BuiltinFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,UAAU;CAAC;CAAI;CAAM;CAAQ;AAAG;;;;;;;AAEtC,SAAM,aAAS,IAAW,MAAM;CAC/B,GAAG,SAAU;CACb,OAAQ;AACT;;;;AA+BA,SAAa,oBAAA;CACX,MAAA,WAAgB,cAAA,IAAA,CAAA,CAAA,oBAAA,MAAA,CAAA,GAAA,cAAA;CAChB,OAAA;EAAA,gBAAoB,wBAAA;GACpB,MAAA;GACA,IAAA,SAAA;IACA,OAAA,QAAA,IAAA,OAAA;GACA;GACF,UAAO;EACL,CAAA;EAAA,gBAAK,SAAA,CAAA,CAAA;EAAA,gBAAA,OAAA;GACL,SAAU;GACV,IAAA,WAAY;IACZ,OAAA,gBAAA,cAAA,EACM,UAAC,sPACH,CAAC;GACL;EACA,CAAA;EAAA,gBAAiB,sBAAA;GACjB,MAAA;GACA,UAAA;GACA,WAAO;GACT,IAAQ,WAAW;IACb,OAAG,gBAAqB,KAAM;KAC7B,IAAK,OAAE;;;;;;KAEZ;KACC,gBAAc;KACf,IAAA,WAAA;MACK,OAAS,cAAA,WAAoB,gBAAA,KAAA;OAC5B,IAAQ,OAAE;;;;;;OAET;OACJ,gBAAA;OACE,IAAA,WAAA;QACO,OAAA,cAAa,aAAA,CAAA,gBAAA,qBAAA;SACX,QAAQ;SAChB,IAAA,eAAA;UACD,OAAA,UAAA;SACS;QACH,CAAA,GAAA,gBAAa,iBAA0B;SAC3C,IAAA,OAAY;UACH,OAAM,GAAI,OAAC,GAAQ,SAAM;SACjC;SACG,IAAA,OAAA;UACN,OAAA,kBAAoC,SAAO,KAAO;SAChD;SACO,QAAA;SACJ,IAAO,WAAY;UACp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(context: EnvPluginContext, parsed: DotenvPar
|
|
|
24
24
|
ERROR_URL: string | undefined;
|
|
25
25
|
ORGANIZATION: string | undefined;
|
|
26
26
|
PLATFORM: "node" | "browser" | "neutral";
|
|
27
|
-
MODE: "
|
|
27
|
+
MODE: "test" | "development" | "production";
|
|
28
28
|
TEST: boolean;
|
|
29
29
|
DEBUG: boolean;
|
|
30
30
|
STACKTRACE: boolean;
|
|
31
|
-
RUNTIME: "
|
|
31
|
+
RUNTIME: "edge" | "browser" | "nodejs" | "workerd" | undefined;
|
|
32
32
|
ENVIRONMENT: string;
|
|
33
33
|
};
|
|
34
34
|
declare function loadEnv<TEnv extends DotenvParseOutput = DotenvParseOutput>(context: EnvPluginContext, options?: EnvPluginOptions): Promise<TEnv>;
|
package/dist/helpers/load.d.mts
CHANGED
|
@@ -24,11 +24,11 @@ declare function loadEnvFromContext(context: EnvPluginContext, parsed: DotenvPar
|
|
|
24
24
|
ERROR_URL: string | undefined;
|
|
25
25
|
ORGANIZATION: string | undefined;
|
|
26
26
|
PLATFORM: "node" | "browser" | "neutral";
|
|
27
|
-
MODE: "
|
|
27
|
+
MODE: "test" | "development" | "production";
|
|
28
28
|
TEST: boolean;
|
|
29
29
|
DEBUG: boolean;
|
|
30
30
|
STACKTRACE: boolean;
|
|
31
|
-
RUNTIME: "
|
|
31
|
+
RUNTIME: "edge" | "browser" | "nodejs" | "workerd" | undefined;
|
|
32
32
|
ENVIRONMENT: string;
|
|
33
33
|
};
|
|
34
34
|
declare function loadEnv<TEnv extends DotenvParseOutput = DotenvParseOutput>(context: EnvPluginContext, options?: EnvPluginOptions): Promise<TEnv>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-env",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.302",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Powerlines plugin for injecting static .env configuration values to the code so that they're accessible at runtime.",
|
|
6
6
|
"keywords": ["dotenv", "powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -362,12 +362,12 @@
|
|
|
362
362
|
"@alloy-js/typescript": "^0.23.0",
|
|
363
363
|
"@babel/core": "8.0.0-rc.6",
|
|
364
364
|
"@babel/types": "8.0.0-rc.6",
|
|
365
|
-
"@powerlines/core": "0.48.32",
|
|
366
|
-
"@powerlines/plugin-alloy": "0.26.
|
|
367
|
-
"@powerlines/plugin-automd": "0.1.
|
|
368
|
-
"@powerlines/plugin-babel": "0.13.
|
|
369
|
-
"@powerlines/plugin-plugin": "0.12.
|
|
370
|
-
"@powerlines/schema": "0.11.
|
|
365
|
+
"@powerlines/core": "^0.48.32",
|
|
366
|
+
"@powerlines/plugin-alloy": "0.26.191",
|
|
367
|
+
"@powerlines/plugin-automd": "0.1.560",
|
|
368
|
+
"@powerlines/plugin-babel": "0.13.95",
|
|
369
|
+
"@powerlines/plugin-plugin": "0.12.511",
|
|
370
|
+
"@powerlines/schema": "0.11.81",
|
|
371
371
|
"@storm-software/config-tools": "^1.190.37",
|
|
372
372
|
"@stryke/capnp": "^0.12.108",
|
|
373
373
|
"@stryke/convert": "^0.7.13",
|
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
"automd": "^0.4.3",
|
|
383
383
|
"c12": "^3.3.4",
|
|
384
384
|
"defu": "^6.1.7",
|
|
385
|
-
"powerlines": "0.47.
|
|
385
|
+
"powerlines": "0.47.99"
|
|
386
386
|
},
|
|
387
387
|
"devDependencies": { "@types/node": "^25.9.1", "vite": "^8.0.14" },
|
|
388
388
|
"publishConfig": { "access": "public" },
|
|
@@ -399,5 +399,5 @@
|
|
|
399
399
|
"tinyrainbow": "3.1.0",
|
|
400
400
|
"vitest": "4.1.7"
|
|
401
401
|
},
|
|
402
|
-
"gitHead": "
|
|
402
|
+
"gitHead": "11b392585b2086772822dd103176c9d58e30dc9c"
|
|
403
403
|
}
|