@powerlines/plugin-env 0.16.116 → 0.16.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/babel/plugin.cjs +2 -5
- package/dist/babel/plugin.mjs +2 -5
- package/dist/babel/plugin.mjs.map +1 -1
- package/dist/components/env-builtin.cjs +1 -1
- package/dist/components/env-builtin.mjs +1 -1
- package/dist/helpers/automd-generator.cjs +1 -3
- package/dist/helpers/automd-generator.d.mts +1 -1
- package/dist/helpers/automd-generator.mjs +1 -3
- package/dist/helpers/automd-generator.mjs.map +1 -1
- package/dist/helpers/load.cjs +1 -3
- package/dist/helpers/load.mjs +1 -3
- package/dist/helpers/load.mjs.map +1 -1
- package/dist/helpers/persistence.cjs +11 -26
- package/dist/helpers/persistence.mjs +12 -27
- package/dist/helpers/persistence.mjs.map +1 -1
- package/dist/helpers/reflect.cjs +6 -15
- package/dist/helpers/reflect.mjs +6 -15
- package/dist/helpers/reflect.mjs.map +1 -1
- package/dist/helpers/template-helpers.cjs +1 -3
- package/dist/helpers/template-helpers.mjs +1 -3
- package/dist/helpers/template-helpers.mjs.map +1 -1
- package/dist/types/plugin.cjs +4 -26
- package/dist/types/plugin.d.mts +4 -4
- package/dist/types/plugin.mjs +4 -26
- package/dist/types/plugin.mjs.map +1 -1
- package/dist/types/runtime.d.cts +3 -0
- package/dist/types/runtime.d.cts.map +1 -1
- package/dist/types/runtime.d.mts +3 -0
- package/dist/types/runtime.d.mts.map +1 -1
- package/dist/types/runtime.mjs.map +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistence.mjs","names":[],"sources":["../../src/helpers/persistence.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 { convertFromCapnp, convertToCapnp } from \"@powerlines/deepkit/capnp\";\nimport { getReflectionsPath } from \"@powerlines/deepkit/resolve-reflections\";\nimport { SerializedTypes } from \"@powerlines/deepkit/schemas/reflection\";\nimport { Reflection } from \"@powerlines/deepkit/types\";\nimport {\n deserializeType,\n ReflectionClass,\n ReflectionKind,\n resolveClassType\n} from \"@powerlines/deepkit/vendor/type\";\nimport * as capnp from \"@stryke/capnp\";\nimport {\n readFileBuffer,\n writeFileBuffer,\n writeFileBufferSync\n} from \"@stryke/fs/buffer\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { isEmptyObject } from \"@stryke/type-checks/is-empty-object\";\nimport type { TypeDefinition } from \"@stryke/types/configuration\";\nimport { existsSync } from \"node:fs\";\nimport { Context, UnresolvedContext } from \"powerlines\";\nimport {\n EnvPluginContext,\n EnvPluginResolvedConfig,\n EnvType\n} from \"../types/plugin\";\nimport { createEnvReflection } from \"./reflect\";\n\n/**\n * Resolves the runtime type definition file for the environment variables.\n *\n * @param context - The plugin context.\n * @returns The runtime type definition file for the environment variables.\n */\nexport async function resolveRuntimeTypeFile(\n context: UnresolvedContext<EnvPluginResolvedConfig>\n): Promise<string> {\n const resolved = await context.fs.resolve(\n \"@powerlines/plugin-env/types/runtime\"\n );\n if (!resolved) {\n throw new Error(\n `Failed to resolve the runtime type definition file for the environment variables. Please ensure that the \"@powerlines/plugin-env\" package is installed.`\n );\n }\n\n return resolved;\n}\n\n/**\n * Gets the default type definition for the environment variables.\n *\n * @param context - The plugin context.\n * @returns The default type definition for the environment variables.\n */\nexport async function getEnvDefaultTypeDefinition(\n context: UnresolvedContext<EnvPluginResolvedConfig>\n): Promise<TypeDefinition> {\n return {\n file: await resolveRuntimeTypeFile(context),\n name: \"EnvInterface\"\n };\n}\n\n/** Gets the default type definition for the environment secrets.\n *\n * @param context - The plugin context.\n * @returns The default type definition for the environment secrets.\n */\nexport async function getSecretsDefaultTypeDefinition(\n context: UnresolvedContext<EnvPluginResolvedConfig>\n): Promise<TypeDefinition> {\n return {\n file: await resolveRuntimeTypeFile(context),\n name: \"SecretsInterface\"\n };\n}\n\n/**\n * Gets the path to the environment type reflections.\n *\n * @param context - The plugin context.\n * @param name - The name of the type reflections.\n * @returns The path to the environment type reflections.\n */\nexport function getEnvTypeReflectionsPath(\n context: Context<EnvPluginResolvedConfig>,\n name: EnvType = \"env\"\n): string {\n return joinPaths(getReflectionsPath(context), \"env\", `${name}-types.bin`);\n}\n\n/**\n * Reads the environment type reflection from the file system.\n *\n * @param context - The plugin context.\n * @param name - The name of the type reflections.\n * @returns The environment type reflection.\n */\nexport async function readEnvTypeReflection(\n context: EnvPluginContext,\n name: EnvType = \"env\"\n): Promise<ReflectionClass<any>> {\n const filePath = getEnvTypeReflectionsPath(context, name);\n if (!existsSync(filePath)) {\n if (!context.env.types.env || isEmptyObject(context.env.types.env)) {\n const reflection = createEnvReflection(context) as Reflection;\n\n const message = new capnp.Message();\n reflection.messageRoot = message.initRoot(SerializedTypes);\n reflection.dataBuffer = message.toArrayBuffer();\n\n context.env.types.env = reflection;\n await writeEnvTypeReflection(context, context.env.types.env, name);\n }\n\n return context.env.types.env;\n }\n\n const buffer = await readFileBuffer(filePath);\n const message = new capnp.Message(buffer, false);\n const messageRoot = message.getRoot(SerializedTypes);\n\n const reflection = resolveClassType(\n deserializeType(convertFromCapnp(messageRoot.types))\n );\n\n context.env.types[name] = reflection;\n context.env.types[name].messageRoot = messageRoot;\n context.env.types[name].dataBuffer = buffer;\n\n return reflection;\n}\n\n/**\n * Writes the environment type reflection to the file system.\n *\n * @param context - The plugin context.\n * @param reflection - The environment type reflection to write.\n * @param name - The name of the type reflections.\n */\nexport async function writeEnvTypeReflection(\n context: EnvPluginContext,\n reflection: ReflectionClass<any>,\n name: EnvType = \"env\"\n) {\n const serialized = reflection.serializeType();\n\n const message = new capnp.Message();\n const root = message.initRoot(SerializedTypes);\n\n convertToCapnp(serialized, root._initTypes(serialized.length));\n\n await writeFileBuffer(\n getEnvTypeReflectionsPath(context, name),\n message.toArrayBuffer()\n );\n}\n\nexport function getEnvReflectionsPath(\n context: EnvPluginContext,\n name: EnvType\n): string {\n return joinPaths(getReflectionsPath(context), \"env\", `${name}.bin`);\n}\n\n/**\n * Reads the environment reflection data from the file system.\n *\n * @param context - The plugin context.\n * @returns The environment reflection data.\n */\nexport async function readEnvReflection(\n context: EnvPluginContext\n): Promise<ReflectionClass<any>> {\n const filePath = getEnvReflectionsPath(context, \"env\");\n if (!existsSync(filePath)) {\n if (!context.env.types.env) {\n context.env.types.env = await readEnvTypeReflection(context, \"env\");\n }\n\n if (!context.env.used.env || isEmptyObject(context.env.used.env)) {\n const reflection = createEnvReflection(context, {\n type: {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Env\",\n description: `An object containing the environment configuration parameters that are used (at least once) by the ${\n context.config.name\n ? `${context.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n superReflection: context.env.types.env\n }) as Reflection;\n reflection.name = \"Env\";\n\n const message = new capnp.Message();\n reflection.messageRoot = message.initRoot(SerializedTypes);\n reflection.dataBuffer = message.toArrayBuffer();\n\n context.env.used.env = reflection;\n await writeEnvReflection(context, context.env.used.env, \"env\");\n }\n\n return context.env.used.env;\n }\n\n const buffer = await readFileBuffer(filePath);\n const message = new capnp.Message(buffer, false);\n const messageRoot = message.getRoot(SerializedTypes);\n\n const reflection = resolveClassType(\n deserializeType(convertFromCapnp(messageRoot.types))\n );\n\n context.env.used.env = reflection;\n context.env.used.env.messageRoot = messageRoot;\n context.env.used.env.dataBuffer = buffer;\n\n return reflection;\n}\n\n/**\n * Reads the secret environment reflection data from the file system.\n *\n * @param context - The plugin context.\n * @returns The environment reflection data.\n */\nexport async function readSecretsReflection(\n context: EnvPluginContext\n): Promise<ReflectionClass<any>> {\n const filePath = getEnvReflectionsPath(context, \"secrets\");\n if (!existsSync(filePath)) {\n if (!context.env.types.secrets) {\n context.env.types.secrets = await readEnvTypeReflection(\n context,\n \"secrets\"\n );\n }\n\n if (!context.env.used.secrets || isEmptyObject(context.env.used.secrets)) {\n const reflection = createEnvReflection(context, {\n type: {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Secrets\",\n description: `An object containing the secret configuration parameters that are used (at least once) by the ${\n context.config.name\n ? `${context.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n superReflection: context.env.types.secrets\n }) as Reflection;\n reflection.name = \"Secrets\";\n\n const message = new capnp.Message();\n reflection.messageRoot = message.initRoot(SerializedTypes);\n reflection.dataBuffer = message.toArrayBuffer();\n\n context.env.used.secrets = reflection;\n await writeEnvReflection(context, context.env.used.secrets, \"secrets\");\n }\n\n return context.env.used.secrets;\n }\n\n const buffer = await readFileBuffer(filePath);\n const message = new capnp.Message(buffer, false);\n const messageRoot = message.getRoot(SerializedTypes);\n\n const reflection = resolveClassType(\n deserializeType(convertFromCapnp(messageRoot.types))\n );\n\n context.env.used.secrets = reflection;\n context.env.used.secrets.messageRoot = messageRoot;\n context.env.used.secrets.dataBuffer = buffer;\n\n return reflection;\n}\n\n/**\n * Writes the environment reflection data to the file system.\n *\n * @param context - The plugin context.\n * @param reflection - The reflection data to write.\n * @param name - The name of the reflection (either \"env\" or \"secrets\").\n */\nexport async function writeEnvReflection(\n context: EnvPluginContext,\n reflection: ReflectionClass<any>,\n name: EnvType = \"env\"\n) {\n const serialized = reflection.serializeType();\n\n const message = new capnp.Message();\n const root = message.initRoot(SerializedTypes);\n\n convertToCapnp(serialized, root._initTypes(serialized.length));\n\n await writeFileBuffer(\n getEnvReflectionsPath(context, name),\n message.toArrayBuffer()\n );\n}\n\n/**\n * Writes the environment reflection data to the file system.\n *\n * @param context - The plugin context.\n * @param reflection - The reflection data to write.\n * @param name - The name of the reflection (either \"env\" or \"secrets\").\n */\nexport function writeEnvReflectionSync(\n context: EnvPluginContext,\n reflection: ReflectionClass<any>,\n name: EnvType = \"env\"\n) {\n const serialized = reflection.serializeType();\n\n const message = new capnp.Message();\n const root = message.initRoot(SerializedTypes);\n\n convertToCapnp(serialized, root._initTypes(serialized.length));\n\n writeFileBufferSync(\n getEnvReflectionsPath(context, name),\n message.toArrayBuffer()\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA2CA,eAAiB,uBAAO,SAAA;CACxB,MAAS,WAAA,MAAA,QAA0B,GAAG,QAAQ,uCAAC;eAE7C,OAAA,IAAA,MAAA,0JAAA;AAED,QAAA;;AAED,uBAAuB,SAAM;OAAU;OAA0B;CAAS;CAAA;CAAA;CAAA;CAAA;;;;;;;AAO1E,eAAG,4BAAA,SAAA;AACC,QAAG;EACH,MAAU,MAAK,uBAAA,QAAA;EACZ,MAAO;EACT;;;;;;;;;;;;;;;AAQL,eAAC,gCAAA,SAAA;AACG,QAAM;EACN,MAAQ,MAAI,uBAA2B,QAAK;EAC9C,MAAA;EACF;;AAEA,gCAA2B,SAAA;OAAA;OAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;AAQ3B,SAAC,0BAAA,SAAA,OAAA,OAAA;AACG,QAAM,UAAU,mBAAkB,QAAA,EAAA,OAAA,GAAA,KAAA,YAAA;;AAEtC,0BAAE,SAAA;OAAA;OAAA;CAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;AAQF,eAAA,sBAAA,SAAA,OAAA,OAAA;;AAEE,KAAA,CAAA,WAAA,SAAA,EAAA;AACM,MAAI,CAAA,QAAQ,IAAI,MAAA,OAAY,cAAgB,QAAA,IAAA,MAAA,IAAA,EAAA;GACnD,MAAA,aAAA,oBAAA,QAAA;GACS,MAAQ,UAAM,IAAO,MAAO,SAAA;AAC5B,cAAW,cAAgB,QAAC,SAAW,gBAAA;AACrC,cAAW,aAAK,QAAgB,eAAY;AACtD,WAAA,IAAA,MAAA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gBAAC,iBAAA,YAAA,MAAA,CAAA,CAAA;AACrC,SAAE,IAAU,KAAC,UAAc;AAC3B,SAAE,IAAU,KAAC,QAAY,cAAS;;AAElC,QAAE;;AAEN,sBAAI,SAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;;CASF,MAAM,aAAa,WAAA,eAAgB;CACjC,MAAA,UAAgB,IAAA,MAAA,SAAiB;4BAClC,QAAA,SAAA,gBAAA;AAED,OAAQ,gBAAe,sBAAU,SAAA,KAAA,EAAA,QAAA,eAAA,CAAA;;AAEnC,mBAAmB,SAAI;OAAY;CAAO;OAAA;CAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;AAQ1C,SAAU,uBAA4B,SAAA,YAAA,OAAA,OAAA;CAClC,MAAA,aAAY,WAAY,eAAe;CACzC,MAAA,UAAA,IAAA,MAAA,SAAA;AAEA,gBAAS,YADE,QAAS,SAAA,gBAAqB,CAChC,WAAA,WAAA,OAAA,CAAA;AACR,qBAAQ,sBAAsB,SAAA,KAAA,EAAA,QAAA,eAAA,CAAA;;AAEjC,uBAAkB,SAAW;OAAA;CAAA;OAAA;CAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA"}
|
|
1
|
+
{"version":3,"file":"persistence.mjs","names":[],"sources":["../../src/helpers/persistence.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 { convertFromCapnp, convertToCapnp } from \"@powerlines/deepkit/capnp\";\nimport { getReflectionsPath } from \"@powerlines/deepkit/resolve-reflections\";\nimport { SerializedTypes } from \"@powerlines/deepkit/schemas/reflection\";\nimport { Reflection } from \"@powerlines/deepkit/types\";\nimport {\n deserializeType,\n ReflectionClass,\n ReflectionKind,\n resolveClassType\n} from \"@powerlines/deepkit/vendor/type\";\nimport * as capnp from \"@stryke/capnp\";\nimport {\n readFileBuffer,\n writeFileBuffer,\n writeFileBufferSync\n} from \"@stryke/fs/buffer\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { isEmptyObject } from \"@stryke/type-checks/is-empty-object\";\nimport type { TypeDefinition } from \"@stryke/types/configuration\";\nimport { existsSync } from \"node:fs\";\nimport { Context, UnresolvedContext } from \"powerlines\";\nimport {\n EnvPluginContext,\n EnvPluginResolvedConfig,\n EnvType\n} from \"../types/plugin\";\nimport { createEnvReflection } from \"./reflect\";\n\n/**\n * Resolves the runtime type definition file for the environment variables.\n *\n * @param context - The plugin context.\n * @returns The runtime type definition file for the environment variables.\n */\nexport async function resolveRuntimeTypeFile(\n context: UnresolvedContext<EnvPluginResolvedConfig>\n): Promise<string> {\n const resolved = await context.fs.resolve(\n \"@powerlines/plugin-env/types/runtime\"\n );\n if (!resolved) {\n throw new Error(\n `Failed to resolve the runtime type definition file for the environment variables. Please ensure that the \"@powerlines/plugin-env\" package is installed.`\n );\n }\n\n return resolved;\n}\n\n/**\n * Gets the default type definition for the environment variables.\n *\n * @param context - The plugin context.\n * @returns The default type definition for the environment variables.\n */\nexport async function getEnvDefaultTypeDefinition(\n context: UnresolvedContext<EnvPluginResolvedConfig>\n): Promise<TypeDefinition> {\n return {\n file: await resolveRuntimeTypeFile(context),\n name: \"EnvInterface\"\n };\n}\n\n/** Gets the default type definition for the environment secrets.\n *\n * @param context - The plugin context.\n * @returns The default type definition for the environment secrets.\n */\nexport async function getSecretsDefaultTypeDefinition(\n context: UnresolvedContext<EnvPluginResolvedConfig>\n): Promise<TypeDefinition> {\n return {\n file: await resolveRuntimeTypeFile(context),\n name: \"SecretsInterface\"\n };\n}\n\n/**\n * Gets the path to the environment type reflections.\n *\n * @param context - The plugin context.\n * @param name - The name of the type reflections.\n * @returns The path to the environment type reflections.\n */\nexport function getEnvTypeReflectionsPath(\n context: Context<EnvPluginResolvedConfig>,\n name: EnvType = \"env\"\n): string {\n return joinPaths(getReflectionsPath(context), \"env\", `${name}-types.bin`);\n}\n\n/**\n * Reads the environment type reflection from the file system.\n *\n * @param context - The plugin context.\n * @param name - The name of the type reflections.\n * @returns The environment type reflection.\n */\nexport async function readEnvTypeReflection(\n context: EnvPluginContext,\n name: EnvType = \"env\"\n): Promise<ReflectionClass<any>> {\n const filePath = getEnvTypeReflectionsPath(context, name);\n if (!existsSync(filePath)) {\n if (!context.env.types.env || isEmptyObject(context.env.types.env)) {\n const reflection = createEnvReflection(context) as Reflection;\n\n const message = new capnp.Message();\n reflection.messageRoot = message.initRoot(SerializedTypes);\n reflection.dataBuffer = message.toArrayBuffer();\n\n context.env.types.env = reflection;\n await writeEnvTypeReflection(context, context.env.types.env, name);\n }\n\n return context.env.types.env;\n }\n\n const buffer = await readFileBuffer(filePath);\n const message = new capnp.Message(buffer, false);\n const messageRoot = message.getRoot(SerializedTypes);\n\n const reflection = resolveClassType(\n deserializeType(convertFromCapnp(messageRoot.types))\n );\n\n context.env.types[name] = reflection;\n context.env.types[name].messageRoot = messageRoot;\n context.env.types[name].dataBuffer = buffer;\n\n return reflection;\n}\n\n/**\n * Writes the environment type reflection to the file system.\n *\n * @param context - The plugin context.\n * @param reflection - The environment type reflection to write.\n * @param name - The name of the type reflections.\n */\nexport async function writeEnvTypeReflection(\n context: EnvPluginContext,\n reflection: ReflectionClass<any>,\n name: EnvType = \"env\"\n) {\n const serialized = reflection.serializeType();\n\n const message = new capnp.Message();\n const root = message.initRoot(SerializedTypes);\n\n convertToCapnp(serialized, root._initTypes(serialized.length));\n\n await writeFileBuffer(\n getEnvTypeReflectionsPath(context, name),\n message.toArrayBuffer()\n );\n}\n\nexport function getEnvReflectionsPath(\n context: EnvPluginContext,\n name: EnvType\n): string {\n return joinPaths(getReflectionsPath(context), \"env\", `${name}.bin`);\n}\n\n/**\n * Reads the environment reflection data from the file system.\n *\n * @param context - The plugin context.\n * @returns The environment reflection data.\n */\nexport async function readEnvReflection(\n context: EnvPluginContext\n): Promise<ReflectionClass<any>> {\n const filePath = getEnvReflectionsPath(context, \"env\");\n if (!existsSync(filePath)) {\n if (!context.env.types.env) {\n context.env.types.env = await readEnvTypeReflection(context, \"env\");\n }\n\n if (!context.env.used.env || isEmptyObject(context.env.used.env)) {\n const reflection = createEnvReflection(context, {\n type: {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Env\",\n description: `An object containing the environment configuration parameters that are used (at least once) by the ${\n context.config.name\n ? `${context.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n superReflection: context.env.types.env\n }) as Reflection;\n reflection.name = \"Env\";\n\n const message = new capnp.Message();\n reflection.messageRoot = message.initRoot(SerializedTypes);\n reflection.dataBuffer = message.toArrayBuffer();\n\n context.env.used.env = reflection;\n await writeEnvReflection(context, context.env.used.env, \"env\");\n }\n\n return context.env.used.env;\n }\n\n const buffer = await readFileBuffer(filePath);\n const message = new capnp.Message(buffer, false);\n const messageRoot = message.getRoot(SerializedTypes);\n\n const reflection = resolveClassType(\n deserializeType(convertFromCapnp(messageRoot.types))\n );\n\n context.env.used.env = reflection;\n context.env.used.env.messageRoot = messageRoot;\n context.env.used.env.dataBuffer = buffer;\n\n return reflection;\n}\n\n/**\n * Reads the secret environment reflection data from the file system.\n *\n * @param context - The plugin context.\n * @returns The environment reflection data.\n */\nexport async function readSecretsReflection(\n context: EnvPluginContext\n): Promise<ReflectionClass<any>> {\n const filePath = getEnvReflectionsPath(context, \"secrets\");\n if (!existsSync(filePath)) {\n if (!context.env.types.secrets) {\n context.env.types.secrets = await readEnvTypeReflection(\n context,\n \"secrets\"\n );\n }\n\n if (!context.env.used.secrets || isEmptyObject(context.env.used.secrets)) {\n const reflection = createEnvReflection(context, {\n type: {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Secrets\",\n description: `An object containing the secret configuration parameters that are used (at least once) by the ${\n context.config.name\n ? `${context.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n superReflection: context.env.types.secrets\n }) as Reflection;\n reflection.name = \"Secrets\";\n\n const message = new capnp.Message();\n reflection.messageRoot = message.initRoot(SerializedTypes);\n reflection.dataBuffer = message.toArrayBuffer();\n\n context.env.used.secrets = reflection;\n await writeEnvReflection(context, context.env.used.secrets, \"secrets\");\n }\n\n return context.env.used.secrets;\n }\n\n const buffer = await readFileBuffer(filePath);\n const message = new capnp.Message(buffer, false);\n const messageRoot = message.getRoot(SerializedTypes);\n\n const reflection = resolveClassType(\n deserializeType(convertFromCapnp(messageRoot.types))\n );\n\n context.env.used.secrets = reflection;\n context.env.used.secrets.messageRoot = messageRoot;\n context.env.used.secrets.dataBuffer = buffer;\n\n return reflection;\n}\n\n/**\n * Writes the environment reflection data to the file system.\n *\n * @param context - The plugin context.\n * @param reflection - The reflection data to write.\n * @param name - The name of the reflection (either \"env\" or \"secrets\").\n */\nexport async function writeEnvReflection(\n context: EnvPluginContext,\n reflection: ReflectionClass<any>,\n name: EnvType = \"env\"\n) {\n const serialized = reflection.serializeType();\n\n const message = new capnp.Message();\n const root = message.initRoot(SerializedTypes);\n\n convertToCapnp(serialized, root._initTypes(serialized.length));\n\n await writeFileBuffer(\n getEnvReflectionsPath(context, name),\n message.toArrayBuffer()\n );\n}\n\n/**\n * Writes the environment reflection data to the file system.\n *\n * @param context - The plugin context.\n * @param reflection - The reflection data to write.\n * @param name - The name of the reflection (either \"env\" or \"secrets\").\n */\nexport function writeEnvReflectionSync(\n context: EnvPluginContext,\n reflection: ReflectionClass<any>,\n name: EnvType = \"env\"\n) {\n const serialized = reflection.serializeType();\n\n const message = new capnp.Message();\n const root = message.initRoot(SerializedTypes);\n\n convertToCapnp(serialized, root._initTypes(serialized.length));\n\n writeFileBufferSync(\n getEnvReflectionsPath(context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C;CAAS;CAAA;CAAA;CAAA;CAAA;;;;;;;;AAQzC,eAAsB,mBAAS,SAAA,YAAA,OAAA,OAAA;CAC7B,MAAA,aAAA,WAAA,eAAA;;AAGA,gBAAgB,YADD,QAAM,SAAA,gBAAwB,CACX,WAAQ,WAAM,OAAA,CAAA;AAChD,OAAM,gBAAc,sBAAgB,SAAgB,KAAA,EAAA,QAAA,eAAA,CAAA;;AAEtD,mBAAmB,SAAE;OAAA;CAAgB;CAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;AAQrC,SAAS,uBAAU,SAAA,YAAA,OAAA,OAAA;CACnB,MAAA,aAAA,WAAA,eAAA;;AAGG,gBAAgB,YADjB,QAAA,SAAA,gBAAA,CAC8B,WAAe,WAAU,OAAK,CAAA;AAC7D,qBAAA,sBAAA,SAAA,KAAA,EAAA,QAAA,eAAA,CAAA;;AAED,uBAAgB,SAAY;OAAW;CAAI;CAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA"}
|
package/dist/helpers/reflect.cjs
CHANGED
|
@@ -3,8 +3,8 @@ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
|
3
3
|
const require_types_runtime = require('../types/runtime.cjs');
|
|
4
4
|
const require_types_plugin = require('../types/plugin.cjs');
|
|
5
5
|
const require_helpers_persistence = require('./persistence.cjs');
|
|
6
|
-
let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
7
6
|
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
7
|
+
let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
8
8
|
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
9
9
|
let _powerlines_deepkit_reflect_type = require("@powerlines/deepkit/reflect-type");
|
|
10
10
|
let _stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
|
|
@@ -24,11 +24,9 @@ function mergeEnvReflections(context, reflections) {
|
|
|
24
24
|
mergeEnvReflections.__type = [
|
|
25
25
|
() => require_types_plugin.__ΩEnvPluginContext,
|
|
26
26
|
"context",
|
|
27
|
-
() => _powerlines_deepkit_vendor_type.ReflectionClass,
|
|
28
27
|
"reflections",
|
|
29
|
-
() => _powerlines_deepkit_vendor_type.ReflectionClass,
|
|
30
28
|
"mergeEnvReflections",
|
|
31
|
-
"Pn!2\"
|
|
29
|
+
"Pn!2\"!F2#!/$"
|
|
32
30
|
];
|
|
33
31
|
function mergeSecretsReflections(context, reflections) {
|
|
34
32
|
return createSecretsReflection(context, { type: (0, _powerlines_deepkit_vendor_type.merge)(reflections.map(__assignType((reflection) => reflection.type, [
|
|
@@ -40,20 +38,15 @@ function mergeSecretsReflections(context, reflections) {
|
|
|
40
38
|
mergeSecretsReflections.__type = [
|
|
41
39
|
() => require_types_plugin.__ΩEnvPluginContext,
|
|
42
40
|
"context",
|
|
43
|
-
() => _powerlines_deepkit_vendor_type.ReflectionClass,
|
|
44
41
|
"reflections",
|
|
45
|
-
() => _powerlines_deepkit_vendor_type.ReflectionClass,
|
|
46
42
|
"mergeSecretsReflections",
|
|
47
|
-
"Pn!2\"
|
|
43
|
+
"Pn!2\"!F2#!/$"
|
|
48
44
|
];
|
|
49
45
|
const __ΩCreateEnvReflectionOptions = [
|
|
50
|
-
"TypeObjectLiteral",
|
|
51
|
-
"TypeClass",
|
|
52
46
|
"type",
|
|
53
|
-
() => _powerlines_deepkit_vendor_type.ReflectionClass,
|
|
54
47
|
"superReflection",
|
|
55
48
|
"CreateEnvReflectionOptions",
|
|
56
|
-
"PP
|
|
49
|
+
"PP!!J4!8!4\"8Mw#y"
|
|
57
50
|
];
|
|
58
51
|
var BaseEnv = class {
|
|
59
52
|
APP_NAME;
|
|
@@ -185,9 +178,8 @@ createEnvReflection.__type = [
|
|
|
185
178
|
() => __ΩCreateEnvReflectionOptions,
|
|
186
179
|
"options",
|
|
187
180
|
() => ({}),
|
|
188
|
-
() => _powerlines_deepkit_vendor_type.ReflectionClass,
|
|
189
181
|
"createEnvReflection",
|
|
190
|
-
"Pn!2\"n#2
|
|
182
|
+
"Pn!2\"n#2$>%!/&"
|
|
191
183
|
];
|
|
192
184
|
function createSecretsReflection(context, options = {}) {
|
|
193
185
|
const parent = options.superReflection ?? new _powerlines_deepkit_vendor_type.ReflectionClass({
|
|
@@ -218,9 +210,8 @@ createSecretsReflection.__type = [
|
|
|
218
210
|
() => __ΩCreateEnvReflectionOptions,
|
|
219
211
|
"options",
|
|
220
212
|
() => ({}),
|
|
221
|
-
() => _powerlines_deepkit_vendor_type.ReflectionClass,
|
|
222
213
|
"createSecretsReflection",
|
|
223
|
-
"Pn!2\"n#2
|
|
214
|
+
"Pn!2\"n#2$>%!/&"
|
|
224
215
|
];
|
|
225
216
|
/**
|
|
226
217
|
* Reflects the environment configuration type definition from the provided file and name, and merges it with the default environment configuration reflection and the currently used environment configuration reflection.
|
package/dist/helpers/reflect.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __ΩEnvInterface, __ΩSecretsInterface } from "../types/runtime.mjs";
|
|
2
2
|
import { __ΩEnvPluginContext } from "../types/plugin.mjs";
|
|
3
3
|
import { getEnvDefaultTypeDefinition, getSecretsDefaultTypeDefinition, readEnvTypeReflection, readSecretsReflection } from "./persistence.mjs";
|
|
4
|
-
import { ReflectionClass, ReflectionKind, merge, resolveClassType } from "@powerlines/deepkit/vendor/type";
|
|
5
4
|
import { titleCase } from "@stryke/string-format/title-case";
|
|
5
|
+
import { ReflectionClass, ReflectionKind, merge, resolveClassType } from "@powerlines/deepkit/vendor/type";
|
|
6
6
|
import { joinPaths } from "@stryke/path/join-paths";
|
|
7
7
|
import { reflectType } from "@powerlines/deepkit/reflect-type";
|
|
8
8
|
import { isParentPath } from "@stryke/path/is-parent-path";
|
|
@@ -22,11 +22,9 @@ function mergeEnvReflections(context, reflections) {
|
|
|
22
22
|
mergeEnvReflections.__type = [
|
|
23
23
|
() => __ΩEnvPluginContext,
|
|
24
24
|
"context",
|
|
25
|
-
() => ReflectionClass,
|
|
26
25
|
"reflections",
|
|
27
|
-
() => ReflectionClass,
|
|
28
26
|
"mergeEnvReflections",
|
|
29
|
-
"Pn!2\"
|
|
27
|
+
"Pn!2\"!F2#!/$"
|
|
30
28
|
];
|
|
31
29
|
function mergeSecretsReflections(context, reflections) {
|
|
32
30
|
return createSecretsReflection(context, { type: merge(reflections.map(__assignType((reflection) => reflection.type, [
|
|
@@ -38,20 +36,15 @@ function mergeSecretsReflections(context, reflections) {
|
|
|
38
36
|
mergeSecretsReflections.__type = [
|
|
39
37
|
() => __ΩEnvPluginContext,
|
|
40
38
|
"context",
|
|
41
|
-
() => ReflectionClass,
|
|
42
39
|
"reflections",
|
|
43
|
-
() => ReflectionClass,
|
|
44
40
|
"mergeSecretsReflections",
|
|
45
|
-
"Pn!2\"
|
|
41
|
+
"Pn!2\"!F2#!/$"
|
|
46
42
|
];
|
|
47
43
|
const __ΩCreateEnvReflectionOptions = [
|
|
48
|
-
"TypeObjectLiteral",
|
|
49
|
-
"TypeClass",
|
|
50
44
|
"type",
|
|
51
|
-
() => ReflectionClass,
|
|
52
45
|
"superReflection",
|
|
53
46
|
"CreateEnvReflectionOptions",
|
|
54
|
-
"PP
|
|
47
|
+
"PP!!J4!8!4\"8Mw#y"
|
|
55
48
|
];
|
|
56
49
|
var BaseEnv = class {
|
|
57
50
|
APP_NAME;
|
|
@@ -183,9 +176,8 @@ createEnvReflection.__type = [
|
|
|
183
176
|
() => __ΩCreateEnvReflectionOptions,
|
|
184
177
|
"options",
|
|
185
178
|
() => ({}),
|
|
186
|
-
() => ReflectionClass,
|
|
187
179
|
"createEnvReflection",
|
|
188
|
-
"Pn!2\"n#2
|
|
180
|
+
"Pn!2\"n#2$>%!/&"
|
|
189
181
|
];
|
|
190
182
|
function createSecretsReflection(context, options = {}) {
|
|
191
183
|
const parent = options.superReflection ?? new ReflectionClass({
|
|
@@ -216,9 +208,8 @@ createSecretsReflection.__type = [
|
|
|
216
208
|
() => __ΩCreateEnvReflectionOptions,
|
|
217
209
|
"options",
|
|
218
210
|
() => ({}),
|
|
219
|
-
() => ReflectionClass,
|
|
220
211
|
"createSecretsReflection",
|
|
221
|
-
"Pn!2\"n#2
|
|
212
|
+
"Pn!2\"n#2$>%!/&"
|
|
222
213
|
];
|
|
223
214
|
/**
|
|
224
215
|
* Reflects the environment configuration type definition from the provided file and name, and merges it with the default environment configuration reflection and the currently used environment configuration reflection.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reflect.mjs","names":[],"sources":["../../src/helpers/reflect.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 { reflectType } from \"@powerlines/deepkit/reflect-type\";\nimport {\n merge,\n ReflectionClass,\n ReflectionKind,\n resolveClassType,\n TypeClass,\n TypeObjectLiteral\n} from \"@powerlines/deepkit/vendor/type\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { EnvPluginContext } from \"../types/plugin\";\nimport { EnvInterface, SecretsInterface } from \"../types/runtime\";\nimport {\n getEnvDefaultTypeDefinition,\n getSecretsDefaultTypeDefinition,\n readEnvTypeReflection,\n readSecretsReflection\n} from \"./persistence\";\n\nexport function mergeEnvReflections(\n context: EnvPluginContext,\n reflections: ReflectionClass<any>[]\n): ReflectionClass<any> {\n const reflection = createEnvReflection(context, {\n type: merge(reflections.map(reflection => reflection.type))\n });\n\n return reflection;\n}\n\nexport function mergeSecretsReflections(\n context: EnvPluginContext,\n reflections: ReflectionClass<any>[]\n): ReflectionClass<any> {\n const reflection = createSecretsReflection(context, {\n type: merge(reflections.map(reflection => reflection.type))\n });\n\n return reflection;\n}\n\nexport interface CreateEnvReflectionOptions {\n type?: TypeObjectLiteral | TypeClass;\n superReflection?: ReflectionClass<any>;\n}\n\nexport class BaseEnv implements EnvInterface {\n APP_NAME!: string;\n\n APP_VERSION!: string;\n\n BUILD_ID!: string;\n\n BUILD_TIMESTAMP!: string;\n\n BUILD_CHECKSUM!: string;\n\n RELEASE_ID!: string;\n\n RELEASE_TAG!: string;\n\n ORGANIZATION!: string;\n\n PLATFORM: \"node\" | \"browser\" | \"neutral\" = \"neutral\";\n\n MODE: \"development\" | \"test\" | \"production\" = \"production\";\n\n ENVIRONMENT!: string;\n\n DEBUG: boolean = false;\n\n TEST: boolean = false;\n\n MINIMAL: boolean = false;\n\n NO_COLOR: boolean = false;\n\n FORCE_COLOR: number | boolean = false;\n\n FORCE_HYPERLINK: number | boolean = false;\n\n STACKTRACE: boolean = false;\n\n INCLUDE_ERROR_DATA: boolean = false;\n\n ERROR_URL!: string;\n\n DEFAULT_TIMEZONE!: string;\n\n DEFAULT_LOCALE!: string;\n\n CI: boolean = false;\n}\n\nexport class BaseSecrets implements SecretsInterface {\n ENCRYPTION_KEY!: string;\n}\n\nexport function createEnvReflection(\n context: EnvPluginContext,\n options: CreateEnvReflectionOptions = {}\n): ReflectionClass<any> {\n const parent =\n options.superReflection ??\n new ReflectionClass({\n kind: ReflectionKind.class,\n description: `The base environment configuration definition for the ${titleCase(\n context.config.name\n )} project.`,\n classType: BaseEnv,\n types: [],\n implements: [\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"EnvInterface\",\n description: `The environment configuration interface definition for the ${titleCase(\n context.config.name\n )} project.`,\n types: []\n }\n ]\n });\n parent.name = \"Env\";\n\n const result = new ReflectionClass(\n options.type ?? {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Env\",\n description: `A schema describing the list of available environment variables that can be used by the ${\n context.config.name\n ? `${titleCase(context.config.name)} application`\n : \"application\"\n }.`,\n types: []\n },\n parent\n );\n result.name = \"Env\";\n\n return result;\n}\n\nexport function createSecretsReflection(\n context: EnvPluginContext,\n options: CreateEnvReflectionOptions = {}\n): ReflectionClass<any> {\n const parent =\n options.superReflection ??\n new ReflectionClass({\n kind: ReflectionKind.class,\n description: `The base secrets configuration definition for the ${titleCase(\n context.config.name\n )} project.`,\n classType: BaseSecrets,\n types: [],\n implements: [\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"SecretsInterface\",\n description: `The secrets configuration interface definition for the ${titleCase(\n context.config.name\n )} project.`,\n types: []\n }\n ]\n });\n parent.name = \"Secrets\";\n\n const result = new ReflectionClass(\n options.type ?? {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Secrets\",\n description: `A schema describing the list of available environment secrets that can be used by the ${\n context.config.name\n ? `${titleCase(context.config.name)} application`\n : \"application\"\n }.`,\n types: []\n },\n parent\n );\n result.name = \"Secrets\";\n\n return result;\n}\n\n/**\n * Reflects the environment configuration type definition from the provided file and name, and merges it with the default environment configuration reflection and the currently used environment configuration reflection.\n *\n * @remarks\n * The resulting reflection will contain the structure of the expected environment variables as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default environment configuration reflection.\n *\n * @param context - The plugin context\n * @param file - The file path to reflect the environment configuration type definition from\n * @param name - The name of the type definition to reflect the environment configuration from, if the file contains multiple type definitions. If not provided, the first type definition found in the file will be used.\n * @returns A reflection of the environment configuration type definition, merged with the default environment configuration reflection and the currently used environment configuration reflection. The resulting reflection will contain the structure of the expected environment variables as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default environment configuration reflection.\n */\nexport async function reflectEnv(\n context: EnvPluginContext,\n file?: string,\n name?: string\n) {\n let config: ReflectionClass<any> | undefined;\n if (file) {\n const configType = await reflectType(context, {\n file: !isParentPath(file, context.workspaceConfig.workspaceRoot)\n ? joinPaths(context.workspaceConfig.workspaceRoot, file)\n : file,\n name\n });\n\n config = resolveClassType(configType);\n }\n\n return mergeEnvReflections(\n context,\n [\n await readEnvTypeReflection(context, \"env\"),\n config,\n resolveClassType(\n await reflectType(context, await getEnvDefaultTypeDefinition(context))\n )\n ].filter(Boolean) as ReflectionClass<any>[]\n );\n}\n\n/**\n * Reflects the secrets configuration type definition from the provided file and name, and merges it with the default secrets configuration reflection and the currently used secrets configuration reflection.\n *\n * @remarks\n * The resulting reflection will contain the structure of the expected environment secrets as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default secrets configuration reflection.\n *\n * @param context - The plugin context\n * @param file - The file path to reflect the secrets configuration type definition from\n * @param name - The name of the type definition to reflect the secrets configuration from, if the file contains multiple type definitions. If not provided, the first type definition found in the file will be used.\n * @returns A reflection of the secrets configuration type definition, merged with the default secrets configuration reflection and the currently used secrets configuration reflection. The resulting reflection will contain the structure of the expected environment secrets as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default secrets configuration reflection.\n */\nexport async function reflectSecrets(\n context: EnvPluginContext,\n file?: string,\n name?: string\n) {\n let config: ReflectionClass<any> | undefined;\n if (file) {\n const configType = await reflectType(context, {\n file: !isParentPath(file, context.workspaceConfig.workspaceRoot)\n ? joinPaths(context.workspaceConfig.workspaceRoot, file)\n : file,\n name\n });\n\n config = resolveClassType(configType);\n }\n\n return mergeSecretsReflections(\n context,\n [\n await readSecretsReflection(context),\n config,\n resolveClassType(\n await reflectType(\n context,\n await getSecretsDefaultTypeDefinition(context)\n )\n )\n ].filter(Boolean) as ReflectionClass<any>[]\n );\n}\n"],"mappings":";;;;;;;;;;AAMA,SAAS,aAAY,IAAI,MAAO;AAC5B,IAAC,SAAU;;;AA0Bf,SAAE,oBAA2B,SAAA,aAAA;AAI3B,QAHA,oBAA+B,SAAA,EAC/B,MAAA,MAAA,YAAqB,IAAA,cAAA,eAAA,WAAA,MAAA;EAAA;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A;CAAA;CAAA;CAAA;CAAA;;;;;;;;;;;;AAYxB,eAAgB,eAAe,SAAa,MAAA,MAAA;CACxC,IAAI;AACJ,KAAI,KAOA,UAAS,iBANU,MAAA,YAAA,SAAA;EACf,MAAC,CAAA,aAAS,MAAA,QAAA,gBAAA,cAAA,GACJ,UAAA,QAAA,gBAAA,eAAA,KAAA,GACV;EACF;EACA,CAAA,CACmB;AAEvB,QAAM,wBAAa,SAAe;EAChC,MAAQ,sBAAQ,QAAA;EACd;EACA,iBAAmB,MAAA,YAAA,SAAA,MAAA,gCAAA,QAAA,CAAA,CAAA;EACpB,CAAC,OAAA,QAAe,CAAC;;AAEtB,eAAe,SAAS;OAAC;CAAsB;CAAW;CAAA;CAAA;CAAA;CAAA;CAAA"}
|
|
1
|
+
{"version":3,"file":"reflect.mjs","names":[],"sources":["../../src/helpers/reflect.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 { reflectType } from \"@powerlines/deepkit/reflect-type\";\nimport {\n merge,\n ReflectionClass,\n ReflectionKind,\n resolveClassType,\n TypeClass,\n TypeObjectLiteral\n} from \"@powerlines/deepkit/vendor/type\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { EnvPluginContext } from \"../types/plugin\";\nimport { EnvInterface, SecretsInterface } from \"../types/runtime\";\nimport {\n getEnvDefaultTypeDefinition,\n getSecretsDefaultTypeDefinition,\n readEnvTypeReflection,\n readSecretsReflection\n} from \"./persistence\";\n\nexport function mergeEnvReflections(\n context: EnvPluginContext,\n reflections: ReflectionClass<any>[]\n): ReflectionClass<any> {\n const reflection = createEnvReflection(context, {\n type: merge(reflections.map(reflection => reflection.type))\n });\n\n return reflection;\n}\n\nexport function mergeSecretsReflections(\n context: EnvPluginContext,\n reflections: ReflectionClass<any>[]\n): ReflectionClass<any> {\n const reflection = createSecretsReflection(context, {\n type: merge(reflections.map(reflection => reflection.type))\n });\n\n return reflection;\n}\n\nexport interface CreateEnvReflectionOptions {\n type?: TypeObjectLiteral | TypeClass;\n superReflection?: ReflectionClass<any>;\n}\n\nexport class BaseEnv implements EnvInterface {\n APP_NAME!: string;\n\n APP_VERSION!: string;\n\n BUILD_ID!: string;\n\n BUILD_TIMESTAMP!: string;\n\n BUILD_CHECKSUM!: string;\n\n RELEASE_ID!: string;\n\n RELEASE_TAG!: string;\n\n ORGANIZATION!: string;\n\n PLATFORM: \"node\" | \"browser\" | \"neutral\" = \"neutral\";\n\n MODE: \"development\" | \"test\" | \"production\" = \"production\";\n\n ENVIRONMENT!: string;\n\n DEBUG: boolean = false;\n\n TEST: boolean = false;\n\n MINIMAL: boolean = false;\n\n NO_COLOR: boolean = false;\n\n FORCE_COLOR: number | boolean = false;\n\n FORCE_HYPERLINK: number | boolean = false;\n\n STACKTRACE: boolean = false;\n\n INCLUDE_ERROR_DATA: boolean = false;\n\n ERROR_URL!: string;\n\n DEFAULT_TIMEZONE!: string;\n\n DEFAULT_LOCALE!: string;\n\n CI: boolean = false;\n}\n\nexport class BaseSecrets implements SecretsInterface {\n ENCRYPTION_KEY!: string;\n}\n\nexport function createEnvReflection(\n context: EnvPluginContext,\n options: CreateEnvReflectionOptions = {}\n): ReflectionClass<any> {\n const parent =\n options.superReflection ??\n new ReflectionClass({\n kind: ReflectionKind.class,\n description: `The base environment configuration definition for the ${titleCase(\n context.config.name\n )} project.`,\n classType: BaseEnv,\n types: [],\n implements: [\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"EnvInterface\",\n description: `The environment configuration interface definition for the ${titleCase(\n context.config.name\n )} project.`,\n types: []\n }\n ]\n });\n parent.name = \"Env\";\n\n const result = new ReflectionClass(\n options.type ?? {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Env\",\n description: `A schema describing the list of available environment variables that can be used by the ${\n context.config.name\n ? `${titleCase(context.config.name)} application`\n : \"application\"\n }.`,\n types: []\n },\n parent\n );\n result.name = \"Env\";\n\n return result;\n}\n\nexport function createSecretsReflection(\n context: EnvPluginContext,\n options: CreateEnvReflectionOptions = {}\n): ReflectionClass<any> {\n const parent =\n options.superReflection ??\n new ReflectionClass({\n kind: ReflectionKind.class,\n description: `The base secrets configuration definition for the ${titleCase(\n context.config.name\n )} project.`,\n classType: BaseSecrets,\n types: [],\n implements: [\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"SecretsInterface\",\n description: `The secrets configuration interface definition for the ${titleCase(\n context.config.name\n )} project.`,\n types: []\n }\n ]\n });\n parent.name = \"Secrets\";\n\n const result = new ReflectionClass(\n options.type ?? {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Secrets\",\n description: `A schema describing the list of available environment secrets that can be used by the ${\n context.config.name\n ? `${titleCase(context.config.name)} application`\n : \"application\"\n }.`,\n types: []\n },\n parent\n );\n result.name = \"Secrets\";\n\n return result;\n}\n\n/**\n * Reflects the environment configuration type definition from the provided file and name, and merges it with the default environment configuration reflection and the currently used environment configuration reflection.\n *\n * @remarks\n * The resulting reflection will contain the structure of the expected environment variables as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default environment configuration reflection.\n *\n * @param context - The plugin context\n * @param file - The file path to reflect the environment configuration type definition from\n * @param name - The name of the type definition to reflect the environment configuration from, if the file contains multiple type definitions. If not provided, the first type definition found in the file will be used.\n * @returns A reflection of the environment configuration type definition, merged with the default environment configuration reflection and the currently used environment configuration reflection. The resulting reflection will contain the structure of the expected environment variables as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default environment configuration reflection.\n */\nexport async function reflectEnv(\n context: EnvPluginContext,\n file?: string,\n name?: string\n) {\n let config: ReflectionClass<any> | undefined;\n if (file) {\n const configType = await reflectType(context, {\n file: !isParentPath(file, context.workspaceConfig.workspaceRoot)\n ? joinPaths(context.workspaceConfig.workspaceRoot, file)\n : file,\n name\n });\n\n config = resolveClassType(configType);\n }\n\n return mergeEnvReflections(\n context,\n [\n await readEnvTypeReflection(context, \"env\"),\n config,\n resolveClassType(\n await reflectType(context, await getEnvDefaultTypeDefinition(context))\n )\n ].filter(Boolean) as ReflectionClass<any>[]\n );\n}\n\n/**\n * Reflects the secrets configuration type definition from the provided file and name, and merges it with the default secrets configuration reflection and the currently used secrets configuration reflection.\n *\n * @remarks\n * The resulting reflection will contain the structure of the expected environment secrets as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default secrets configuration reflection.\n *\n * @param context - The plugin context\n * @param file - The file path to reflect the secrets configuration type definition from\n * @param name - The name of the type definition to reflect the secrets configuration from, if the file contains multiple type definitions. If not provided, the first type definition found in the file will be used.\n * @returns A reflection of the secrets configuration type definition, merged with the default secrets configuration reflection and the currently used secrets configuration reflection. The resulting reflection will contain the structure of the expected environment secrets as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default secrets configuration reflection.\n */\nexport async function reflectSecrets(\n context: EnvPluginContext,\n file?: string,\n name?: string\n) {\n let config: ReflectionClass<any> | undefined;\n if (file) {\n const configType = await reflectType(context, {\n file: !isParentPath(file, context.workspaceConfig.workspaceRoot)\n ? joinPaths(context.workspaceConfig.workspaceRoot, file)\n : file,\n name\n });\n\n config = resolveClassType(configType);\n }\n\n return mergeSecretsReflections(\n context,\n [\n await readSecretsReflection(context),\n config,\n resolveClassType(\n await reflectType(\n context,\n await getSecretsDefaultTypeDefinition(context)\n )\n )\n ].filter(Boolean) as ReflectionClass<any>[]\n );\n}\n"],"mappings":";;;;;;;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EAEO,iBAAS,MAAA,YAAuB,SAAA,MAAA,4BAAA,QAAA,CAAA,CAAA;EACrC,CAAA,OAAS,QAAA,CAAA;;AAEX,WAAG,SAAgB;OAAK;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;;;;;AAYxB,eAAgB,eAAe,SAAa,MAAA,MAAA;CACxC,IAAI;AACJ,KAAI,KAOA,UAAS,iBANU,MAAA,YAAA,SAAA;EACf,MAAC,CAAA,aAAS,MAAA,QAAA,gBAAA,cAAA,GACJ,UAAA,QAAA,gBAAA,eAAA,KAAA,GACV;EACF;EACA,CAAA,CACmB;AAEvB,QAAM,wBAAa,SAAe;EAChC,MAAQ,sBAAQ,QAAA;EACd;EACA,iBAAmB,MAAA,YAAA,SAAA,MAAA,gCAAA,QAAA,CAAA,CAAA;EACpB,CAAC,OAAA,QAAe,CAAC;;AAEtB,eAAe,SAAS;OAAC;CAAsB;CAAW;CAAA;CAAA;CAAA;CAAA;CAAA"}
|
|
@@ -2,7 +2,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_types_plugin = require('../types/plugin.cjs');
|
|
4
4
|
const require_helpers_persistence = require('./persistence.cjs');
|
|
5
|
-
let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
6
5
|
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
7
6
|
|
|
8
7
|
//#region src/helpers/template-helpers.ts
|
|
@@ -61,10 +60,9 @@ createTemplateReflection.__type = [
|
|
|
61
60
|
"context",
|
|
62
61
|
() => require_types_plugin.__ΩEnvType,
|
|
63
62
|
"name",
|
|
64
|
-
() => _powerlines_deepkit_vendor_type.ReflectionClass,
|
|
65
63
|
"createTemplateReflection",
|
|
66
64
|
"Creates the reflection data used when generating runtime template files.",
|
|
67
|
-
"Pn!2\"n#2$
|
|
65
|
+
"Pn!2\"n#2$8!`/%?&"
|
|
68
66
|
];
|
|
69
67
|
|
|
70
68
|
//#endregion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __ΩEnvPluginContext, __ΩEnvType } from "../types/plugin.mjs";
|
|
2
2
|
import { readEnvTypeReflection } from "./persistence.mjs";
|
|
3
|
-
import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
|
|
4
3
|
import { titleCase } from "@stryke/string-format/title-case";
|
|
5
4
|
|
|
6
5
|
//#region src/helpers/template-helpers.ts
|
|
@@ -59,10 +58,9 @@ createTemplateReflection.__type = [
|
|
|
59
58
|
"context",
|
|
60
59
|
() => __ΩEnvType,
|
|
61
60
|
"name",
|
|
62
|
-
() => ReflectionClass,
|
|
63
61
|
"createTemplateReflection",
|
|
64
62
|
"Creates the reflection data used when generating runtime template files.",
|
|
65
|
-
"Pn!2\"n#2$
|
|
63
|
+
"Pn!2\"n#2$8!`/%?&"
|
|
66
64
|
];
|
|
67
65
|
|
|
68
66
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-helpers.mjs","names":[],"sources":["../../src/helpers/template-helpers.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 { ReflectionClass } from \"@powerlines/deepkit/vendor/type\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { EnvPluginContext, EnvType } from \"../types/plugin\";\nimport { readEnvTypeReflection } from \"./persistence\";\n\n/**\n * Creates the reflection data used when generating runtime template files.\n *\n * @param context - The context for the configuration plugin.\n * @param name - The name of the configuration template.\n * @returns The reflection for the specified configuration template.\n */\nexport async function createTemplateReflection(\n context: EnvPluginContext,\n name?: EnvType\n): Promise<ReflectionClass<any>> {\n const reflection = await readEnvTypeReflection(context, name);\n\n reflection.getProperties().forEach(prop => {\n const aliases = prop.getAlias();\n aliases.filter(Boolean).forEach(alias => {\n reflection.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 return reflection;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"template-helpers.mjs","names":[],"sources":["../../src/helpers/template-helpers.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 { ReflectionClass } from \"@powerlines/deepkit/vendor/type\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { EnvPluginContext, EnvType } from \"../types/plugin\";\nimport { readEnvTypeReflection } from \"./persistence\";\n\n/**\n * Creates the reflection data used when generating runtime template files.\n *\n * @param context - The context for the configuration plugin.\n * @param name - The name of the configuration template.\n * @returns The reflection for the specified configuration template.\n */\nexport async function createTemplateReflection(\n context: EnvPluginContext,\n name?: EnvType\n): Promise<ReflectionClass<any>> {\n const reflection = await readEnvTypeReflection(context, name);\n\n reflection.getProperties().forEach(prop => {\n const aliases = prop.getAlias();\n aliases.filter(Boolean).forEach(alias => {\n reflection.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 return reflection;\n}\n"],"mappings":";;;;;AAIA,SAAM,aAAS,IAAW,MAAM;AAC5B,IAAA,SAAW;AACd,QAAS;;;;;;;;;;CAYV,MAAS,aAAA,MAAkB,sBAAkB,SAAe,KAAK;AACjE,YAAS,eAAmB,CAAA,QAAO,cAAc,SAAW;AAEpD,EADC,KAAkB,UAAU,CAC5B,OAAA,QAAsB,CAAC,QAAQ,cAAa,UAAA;;IAEnD,MAAA;IACa,UAAW,KAAK,YAAU,GAAA,OAAW;IACnD,UAAA,KAAA,YAAA,GAAA,OAAA;IACS,aAAc,KAAQ,gBAAQ;IACxB,YAAY,KAAK,eAAc;IAC/B,MAAA,KAAW,SAAQ;IACjC,SAAA,KAAA,iBAAA;IACW,MAAS;KACX,QAAgB,KAAA,UAAA;KAClB,QAAA,KAAA,WAAA;KACE,UAAmB,KAAG,YAAA;KACb,OAAO,gBAEd,OAAgB,cAAgB,MAAA,MAAA,OAAA;MAAA;MAAA;MAAA;MAAA,CAAA,CAAA,CACpB,OAAA,KAAU,KAAA;KAChB,OAAQ,KAAC,UAAc,IAAG,UAAA,KAAA,KAAA;KAC5B,UAAY,KAAA,YAAA;KACV,YAAA,KAAA,eAAA;KACD,QAAK,KAAU,WAAW;KAC3B;IACT,CAAA;KACA;GAAA;GAAY;GAAK;GAAA,CAAA,CAAA;IAClB;EAAC;EAAM;EAAK;EAAS,CAAA,CAAA;AACxB,QAAI;;AAER,yBAAuB,SAAU;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA"}
|
package/dist/types/plugin.cjs
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
-
const require_types_runtime = require('./runtime.cjs');
|
|
4
|
-
let _powerlines_plugin_babel_types = require("@powerlines/plugin-babel/types");
|
|
5
|
-
let _powerlines_plugin_automd_types_plugin = require("@powerlines/plugin-automd/types/plugin");
|
|
6
|
-
let _powerlines_plugin_alloy_types = require("@powerlines/plugin-alloy/types");
|
|
7
|
-
let _powerlines_deepkit_types = require("@powerlines/deepkit/types");
|
|
8
2
|
|
|
9
3
|
//#region src/types/plugin.ts
|
|
10
4
|
const __ΩOmit = [
|
|
@@ -55,29 +49,22 @@ const __ΩEnvPluginOptions = [
|
|
|
55
49
|
"Children",
|
|
56
50
|
"defaultConfig",
|
|
57
51
|
"The default configuration to use when loading environment variables.",
|
|
58
|
-
() => _powerlines_plugin_babel_types.__ΩBabelPluginOptions,
|
|
59
52
|
"babel",
|
|
60
53
|
"Babel configuration options to use when injecting environment variables into the source code.",
|
|
61
|
-
() => _powerlines_plugin_automd_types_plugin.__ΩAutoMDPluginOptions,
|
|
62
54
|
"automd",
|
|
63
55
|
"AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.",
|
|
64
|
-
() => _powerlines_plugin_alloy_types.__ΩAlloyPluginOptions,
|
|
65
56
|
"alloy",
|
|
66
57
|
"Alloy configuration options to use when injecting environment variables into the source code.",
|
|
67
58
|
"EnvPluginOptions",
|
|
68
|
-
"P!.\"o!#P!4#8?$!4%8?&P&&FJ4'8?()4)8>*?+)4,8>*?-\"w.4/8?
|
|
59
|
+
"P!.\"o!#P!4#8?$!4%8?&P&&FJ4'8?()4)8>*?+)4,8>*?-\"w.4/8?0!418?2!438?4!458?6MKw7y"
|
|
69
60
|
];
|
|
70
61
|
const __ΩEnvPluginUserConfig = [
|
|
71
|
-
() => _powerlines_plugin_babel_types.__ΩBabelPluginUserConfig,
|
|
72
|
-
() => _powerlines_plugin_alloy_types.__ΩAlloyPluginUserConfig,
|
|
73
62
|
() => __ΩEnvPluginOptions,
|
|
74
63
|
"env",
|
|
75
64
|
"EnvPluginUserConfig",
|
|
76
|
-
"Pn!
|
|
65
|
+
"P!!Pn!4\"MKw#y"
|
|
77
66
|
];
|
|
78
67
|
const __ΩEnvPluginResolvedConfig = [
|
|
79
|
-
() => _powerlines_plugin_babel_types.__ΩBabelPluginResolvedConfig,
|
|
80
|
-
() => _powerlines_plugin_alloy_types.__ΩAlloyPluginResolvedConfig,
|
|
81
68
|
() => __ΩRequired,
|
|
82
69
|
() => __ΩPick,
|
|
83
70
|
"additionalFiles",
|
|
@@ -97,36 +84,27 @@ const __ΩEnvPluginResolvedConfig = [
|
|
|
97
84
|
"The prefix used for environment variables",
|
|
98
85
|
"env",
|
|
99
86
|
"EnvPluginResolvedConfig",
|
|
100
|
-
"
|
|
87
|
+
"P!!PP!.#o\"#o!\"n&.'o%#o$\"P!4(?)!4*?+)4,?-)4.?/&F40?1MK42MKw3y"
|
|
101
88
|
];
|
|
102
89
|
const __ΩEnvPluginContext = [
|
|
103
90
|
() => __ΩEnvPluginResolvedConfig,
|
|
104
91
|
"TResolvedConfig",
|
|
105
|
-
() => _powerlines_plugin_babel_types.__ΩBabelPluginContext,
|
|
106
|
-
() => _powerlines_plugin_alloy_types.__ΩAlloyPluginContext,
|
|
107
|
-
() => _powerlines_deepkit_types.__ΩReflection,
|
|
108
92
|
"env",
|
|
109
93
|
"The type definitions for the expected env variables",
|
|
110
|
-
() => _powerlines_deepkit_types.__ΩReflection,
|
|
111
94
|
"secrets",
|
|
112
95
|
"The type definitions for the expected env secrets",
|
|
113
96
|
"The type definitions reflection for the env variables and secrets",
|
|
114
97
|
"types",
|
|
115
|
-
() => _powerlines_deepkit_types.__ΩReflection,
|
|
116
|
-
() => require_types_runtime.__ΩEnvInterface,
|
|
117
98
|
"The current env variables reflection",
|
|
118
|
-
() => _powerlines_deepkit_types.__ΩReflection,
|
|
119
|
-
() => require_types_runtime.__ΩSecretsInterface,
|
|
120
99
|
"The current env secrets reflection",
|
|
121
100
|
"The current **used** environment variables and secrets reflection",
|
|
122
101
|
"used",
|
|
123
102
|
"parsed",
|
|
124
103
|
"The parsed .env configuration object",
|
|
125
|
-
() => _powerlines_deepkit_types.__ΩReflection,
|
|
126
104
|
"injected",
|
|
127
105
|
"The injected environment variables and secrets reflection",
|
|
128
106
|
"EnvPluginContext",
|
|
129
|
-
"n!c\"
|
|
107
|
+
"n!c\"P!!PP!4#?$!4%?&M?'4(?'P!4#?)!4%?*M?+4,?+!4-?.!4/?0M4#Mw1y"
|
|
130
108
|
];
|
|
131
109
|
|
|
132
110
|
//#endregion
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { EnvInterface, SecretsInterface } from "./runtime.mjs";
|
|
2
|
-
import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig } from "@powerlines/plugin-babel/types";
|
|
3
|
-
import { AutoMDPluginOptions } from "@powerlines/plugin-automd/types/plugin";
|
|
4
|
-
import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig } from "@powerlines/plugin-alloy/types";
|
|
5
|
-
import { Reflection } from "@powerlines/deepkit/types";
|
|
6
2
|
import { DotenvParseOutput } from "@stryke/env/types";
|
|
7
3
|
import { Children } from "@alloy-js/core";
|
|
4
|
+
import { Reflection } from "@powerlines/deepkit/types";
|
|
5
|
+
import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig } from "@powerlines/plugin-alloy/types";
|
|
6
|
+
import { AutoMDPluginOptions } from "@powerlines/plugin-automd/types/plugin";
|
|
7
|
+
import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig } from "@powerlines/plugin-babel/types";
|
|
8
8
|
import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
9
9
|
|
|
10
10
|
//#region src/types/plugin.d.ts
|
package/dist/types/plugin.mjs
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { __ΩEnvInterface, __ΩSecretsInterface } from "./runtime.mjs";
|
|
2
|
-
import { __ΩBabelPluginContext, __ΩBabelPluginOptions, __ΩBabelPluginResolvedConfig, __ΩBabelPluginUserConfig } from "@powerlines/plugin-babel/types";
|
|
3
|
-
import { __ΩAutoMDPluginOptions } from "@powerlines/plugin-automd/types/plugin";
|
|
4
|
-
import { __ΩAlloyPluginContext, __ΩAlloyPluginOptions, __ΩAlloyPluginResolvedConfig, __ΩAlloyPluginUserConfig } from "@powerlines/plugin-alloy/types";
|
|
5
|
-
import { __ΩReflection } from "@powerlines/deepkit/types";
|
|
6
|
-
|
|
7
1
|
//#region src/types/plugin.ts
|
|
8
2
|
const __ΩOmit = [
|
|
9
3
|
"T",
|
|
@@ -53,29 +47,22 @@ const __ΩEnvPluginOptions = [
|
|
|
53
47
|
"Children",
|
|
54
48
|
"defaultConfig",
|
|
55
49
|
"The default configuration to use when loading environment variables.",
|
|
56
|
-
() => __ΩBabelPluginOptions,
|
|
57
50
|
"babel",
|
|
58
51
|
"Babel configuration options to use when injecting environment variables into the source code.",
|
|
59
|
-
() => __ΩAutoMDPluginOptions,
|
|
60
52
|
"automd",
|
|
61
53
|
"AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.",
|
|
62
|
-
() => __ΩAlloyPluginOptions,
|
|
63
54
|
"alloy",
|
|
64
55
|
"Alloy configuration options to use when injecting environment variables into the source code.",
|
|
65
56
|
"EnvPluginOptions",
|
|
66
|
-
"P!.\"o!#P!4#8?$!4%8?&P&&FJ4'8?()4)8>*?+)4,8>*?-\"w.4/8?
|
|
57
|
+
"P!.\"o!#P!4#8?$!4%8?&P&&FJ4'8?()4)8>*?+)4,8>*?-\"w.4/8?0!418?2!438?4!458?6MKw7y"
|
|
67
58
|
];
|
|
68
59
|
const __ΩEnvPluginUserConfig = [
|
|
69
|
-
() => __ΩBabelPluginUserConfig,
|
|
70
|
-
() => __ΩAlloyPluginUserConfig,
|
|
71
60
|
() => __ΩEnvPluginOptions,
|
|
72
61
|
"env",
|
|
73
62
|
"EnvPluginUserConfig",
|
|
74
|
-
"Pn!
|
|
63
|
+
"P!!Pn!4\"MKw#y"
|
|
75
64
|
];
|
|
76
65
|
const __ΩEnvPluginResolvedConfig = [
|
|
77
|
-
() => __ΩBabelPluginResolvedConfig,
|
|
78
|
-
() => __ΩAlloyPluginResolvedConfig,
|
|
79
66
|
() => __ΩRequired,
|
|
80
67
|
() => __ΩPick,
|
|
81
68
|
"additionalFiles",
|
|
@@ -95,36 +82,27 @@ const __ΩEnvPluginResolvedConfig = [
|
|
|
95
82
|
"The prefix used for environment variables",
|
|
96
83
|
"env",
|
|
97
84
|
"EnvPluginResolvedConfig",
|
|
98
|
-
"
|
|
85
|
+
"P!!PP!.#o\"#o!\"n&.'o%#o$\"P!4(?)!4*?+)4,?-)4.?/&F40?1MK42MKw3y"
|
|
99
86
|
];
|
|
100
87
|
const __ΩEnvPluginContext = [
|
|
101
88
|
() => __ΩEnvPluginResolvedConfig,
|
|
102
89
|
"TResolvedConfig",
|
|
103
|
-
() => __ΩBabelPluginContext,
|
|
104
|
-
() => __ΩAlloyPluginContext,
|
|
105
|
-
() => __ΩReflection,
|
|
106
90
|
"env",
|
|
107
91
|
"The type definitions for the expected env variables",
|
|
108
|
-
() => __ΩReflection,
|
|
109
92
|
"secrets",
|
|
110
93
|
"The type definitions for the expected env secrets",
|
|
111
94
|
"The type definitions reflection for the env variables and secrets",
|
|
112
95
|
"types",
|
|
113
|
-
() => __ΩReflection,
|
|
114
|
-
() => __ΩEnvInterface,
|
|
115
96
|
"The current env variables reflection",
|
|
116
|
-
() => __ΩReflection,
|
|
117
|
-
() => __ΩSecretsInterface,
|
|
118
97
|
"The current env secrets reflection",
|
|
119
98
|
"The current **used** environment variables and secrets reflection",
|
|
120
99
|
"used",
|
|
121
100
|
"parsed",
|
|
122
101
|
"The parsed .env configuration object",
|
|
123
|
-
() => __ΩReflection,
|
|
124
102
|
"injected",
|
|
125
103
|
"The injected environment variables and secrets reflection",
|
|
126
104
|
"EnvPluginContext",
|
|
127
|
-
"n!c\"
|
|
105
|
+
"n!c\"P!!PP!4#?$!4%?&M?'4(?'P!4#?)!4%?*M?+4,?+!4-?.!4/?0M4#Mw1y"
|
|
128
106
|
];
|
|
129
107
|
|
|
130
108
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.mjs","names":[],"sources":["../../src/types/plugin.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 { Children } from \"@alloy-js/core\";\nimport { Reflection } from \"@powerlines/deepkit/types\";\nimport {\n AlloyPluginContext,\n AlloyPluginOptions,\n AlloyPluginResolvedConfig,\n AlloyPluginUserConfig\n} from \"@powerlines/plugin-alloy/types\";\nimport { AutoMDPluginOptions } from \"@powerlines/plugin-automd/types/plugin\";\nimport {\n BabelPluginContext,\n BabelPluginOptions,\n BabelPluginResolvedConfig,\n BabelPluginUserConfig\n} from \"@powerlines/plugin-babel/types\";\nimport type { DotenvParseOutput } from \"@stryke/env/types\";\nimport {\n DotenvConfiguration,\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport { EnvInterface, SecretsInterface } from \"./runtime\";\n\nexport type EnvType = \"env\" | \"secrets\";\n\nexport type EnvPluginOptions = Omit<DotenvConfiguration, \"types\"> & {\n /**\n * A path to the type definition for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `\":\"` or `\"#\"` character. For example: `\"./src/types/env.ts#ConfigConfiguration\"`.\n */\n types?: TypeDefinitionParameter;\n\n /**\n * A path to the type definition for the expected env secret parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `\":\"` or `\"#\"` character. For example: `\"./src/types/env.ts#ConfigSecrets\"`.\n */\n secrets?: TypeDefinitionParameter;\n\n /**\n * An additional prefix (or list of additional prefixes) to apply to the environment variables\n *\n * @remarks\n * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.\n */\n prefix?: string | string[];\n\n /**\n * Should the plugin inject the env variables in the source code with their values?\n *\n * @defaultValue false\n */\n inject?: boolean;\n\n /**\n * Should the plugin validate the loaded environment variables against the provided type definitions?\n *\n * @defaultValue false\n */\n validate?: boolean;\n\n /**\n * The default configuration to use when loading environment variables.\n *\n * @remarks\n * This configuration is used as the base configuration when loading environment variables, and will be overridden by any values found in the `.env` file or the process environment.\n */\n defaultConfig?: Children;\n\n /**\n * Babel configuration options to use when injecting environment variables into the source code.\n *\n * @remarks\n * This option allows you to customize the Babel transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Babel settings.\n */\n babel?: BabelPluginOptions;\n\n /**\n * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.\n *\n * @remarks\n * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.\n */\n automd?: AutoMDPluginOptions;\n\n /**\n * Alloy configuration options to use when injecting environment variables into the source code.\n *\n * @remarks\n * This option allows you to customize the Alloy transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Alloy settings.\n */\n alloy?: AlloyPluginOptions;\n};\n\nexport type EnvPluginUserConfig = BabelPluginUserConfig &\n AlloyPluginUserConfig & {\n env: EnvPluginOptions;\n };\n\nexport type EnvPluginResolvedConfig = BabelPluginResolvedConfig &\n AlloyPluginResolvedConfig & {\n env: Required<Pick<DotenvConfiguration, \"additionalFiles\">> &\n Required<Pick<EnvPluginOptions, \"defaultConfig\">> & {\n /**\n * The type definition for the expected env variable parameters\n *\n * @remarks\n * This value is parsed from the {@link EnvPluginOptions.types} option.\n */\n types: TypeDefinition;\n\n /**\n * The type definition for the expected env secret parameters\n *\n * @remarks\n * This value is parsed from the {@link EnvPluginOptions.secrets} option.\n */\n secrets: TypeDefinition;\n\n /**\n * Should the plugin inject the env variables in the source code with their values?\n *\n * @remarks\n * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.\n */\n inject: boolean;\n\n /**\n * Should the plugin validate the loaded environment variables against the provided type definitions?\n *\n * @remarks\n * This value is the result of reflecting the {@link EnvPluginOptions.validate} option.\n */\n validate: boolean;\n\n /**\n * The prefix used for environment variables\n *\n * @remarks\n * This value is used to filter environment variables that are loaded from the .env file and the process environment.\n */\n prefix: string[];\n };\n };\n\nexport interface EnvPluginContext<\n TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig\n>\n extends\n BabelPluginContext<TResolvedConfig>,\n AlloyPluginContext<TResolvedConfig> {\n env: {\n /**\n * The type definitions reflection for the env variables and secrets\n *\n * @remarks\n * These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.\n */\n types: {\n /**\n * The type definitions for the expected env variables\n */\n env: Reflection;\n\n /**\n * The type definitions for the expected env secrets\n */\n secrets: Reflection;\n };\n\n /**\n * The current **used** environment variables and secrets reflection\n *\n * @remarks\n * This reflection contains the structure of the current environment variables and secrets as defined during the plugin initialization by extracting the values from the source code.\n */\n used: {\n /**\n * The current env variables reflection\n */\n env: Reflection<EnvInterface>;\n\n /**\n * The current env secrets reflection\n */\n secrets: Reflection<SecretsInterface>;\n };\n\n /**\n * The parsed .env configuration object\n *\n * @remarks\n * This value is the result of loading the .env configuration file found in the project root directory and merging it with the values provided at {@link EnvPluginOptions.values}\n */\n parsed: DotenvParseOutput;\n\n /**\n * The injected environment variables and secrets reflection\n *\n * @remarks\n * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.\n */\n injected: Reflection;\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.mjs","names":[],"sources":["../../src/types/plugin.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 { Children } from \"@alloy-js/core\";\nimport { Reflection } from \"@powerlines/deepkit/types\";\nimport {\n AlloyPluginContext,\n AlloyPluginOptions,\n AlloyPluginResolvedConfig,\n AlloyPluginUserConfig\n} from \"@powerlines/plugin-alloy/types\";\nimport { AutoMDPluginOptions } from \"@powerlines/plugin-automd/types/plugin\";\nimport {\n BabelPluginContext,\n BabelPluginOptions,\n BabelPluginResolvedConfig,\n BabelPluginUserConfig\n} from \"@powerlines/plugin-babel/types\";\nimport type { DotenvParseOutput } from \"@stryke/env/types\";\nimport {\n DotenvConfiguration,\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport { EnvInterface, SecretsInterface } from \"./runtime\";\n\nexport type EnvType = \"env\" | \"secrets\";\n\nexport type EnvPluginOptions = Omit<DotenvConfiguration, \"types\"> & {\n /**\n * A path to the type definition for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `\":\"` or `\"#\"` character. For example: `\"./src/types/env.ts#ConfigConfiguration\"`.\n */\n types?: TypeDefinitionParameter;\n\n /**\n * A path to the type definition for the expected env secret parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `\":\"` or `\"#\"` character. For example: `\"./src/types/env.ts#ConfigSecrets\"`.\n */\n secrets?: TypeDefinitionParameter;\n\n /**\n * An additional prefix (or list of additional prefixes) to apply to the environment variables\n *\n * @remarks\n * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.\n */\n prefix?: string | string[];\n\n /**\n * Should the plugin inject the env variables in the source code with their values?\n *\n * @defaultValue false\n */\n inject?: boolean;\n\n /**\n * Should the plugin validate the loaded environment variables against the provided type definitions?\n *\n * @defaultValue false\n */\n validate?: boolean;\n\n /**\n * The default configuration to use when loading environment variables.\n *\n * @remarks\n * This configuration is used as the base configuration when loading environment variables, and will be overridden by any values found in the `.env` file or the process environment.\n */\n defaultConfig?: Children;\n\n /**\n * Babel configuration options to use when injecting environment variables into the source code.\n *\n * @remarks\n * This option allows you to customize the Babel transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Babel settings.\n */\n babel?: BabelPluginOptions;\n\n /**\n * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.\n *\n * @remarks\n * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.\n */\n automd?: AutoMDPluginOptions;\n\n /**\n * Alloy configuration options to use when injecting environment variables into the source code.\n *\n * @remarks\n * This option allows you to customize the Alloy transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Alloy settings.\n */\n alloy?: AlloyPluginOptions;\n};\n\nexport type EnvPluginUserConfig = BabelPluginUserConfig &\n AlloyPluginUserConfig & {\n env: EnvPluginOptions;\n };\n\nexport type EnvPluginResolvedConfig = BabelPluginResolvedConfig &\n AlloyPluginResolvedConfig & {\n env: Required<Pick<DotenvConfiguration, \"additionalFiles\">> &\n Required<Pick<EnvPluginOptions, \"defaultConfig\">> & {\n /**\n * The type definition for the expected env variable parameters\n *\n * @remarks\n * This value is parsed from the {@link EnvPluginOptions.types} option.\n */\n types: TypeDefinition;\n\n /**\n * The type definition for the expected env secret parameters\n *\n * @remarks\n * This value is parsed from the {@link EnvPluginOptions.secrets} option.\n */\n secrets: TypeDefinition;\n\n /**\n * Should the plugin inject the env variables in the source code with their values?\n *\n * @remarks\n * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.\n */\n inject: boolean;\n\n /**\n * Should the plugin validate the loaded environment variables against the provided type definitions?\n *\n * @remarks\n * This value is the result of reflecting the {@link EnvPluginOptions.validate} option.\n */\n validate: boolean;\n\n /**\n * The prefix used for environment variables\n *\n * @remarks\n * This value is used to filter environment variables that are loaded from the .env file and the process environment.\n */\n prefix: string[];\n };\n };\n\nexport interface EnvPluginContext<\n TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig\n>\n extends\n BabelPluginContext<TResolvedConfig>,\n AlloyPluginContext<TResolvedConfig> {\n env: {\n /**\n * The type definitions reflection for the env variables and secrets\n *\n * @remarks\n * These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.\n */\n types: {\n /**\n * The type definitions for the expected env variables\n */\n env: Reflection;\n\n /**\n * The type definitions for the expected env secrets\n */\n secrets: Reflection;\n };\n\n /**\n * The current **used** environment variables and secrets reflection\n *\n * @remarks\n * This reflection contains the structure of the current environment variables and secrets as defined during the plugin initialization by extracting the values from the source code.\n */\n used: {\n /**\n * The current env variables reflection\n */\n env: Reflection<EnvInterface>;\n\n /**\n * The current env secrets reflection\n */\n secrets: Reflection<SecretsInterface>;\n };\n\n /**\n * The parsed .env configuration object\n *\n * @remarks\n * This value is the result of loading the .env configuration file found in the project root directory and merging it with the values provided at {@link EnvPluginOptions.values}\n */\n parsed: DotenvParseOutput;\n\n /**\n * The injected environment variables and secrets reflection\n *\n * @remarks\n * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.\n */\n injected: Reflection;\n };\n}\n"],"mappings":";AAAA,MAAM,UAAU;CAAC;CAAK;OAAW;OAAe;CAAY;CAAQ;CAAC;;;;;;AAErE,MAAM,UAAU;CAAC;CAAI;CAAM;CAAQ;CAAG;;;;;;;AAEtC,MAAM,aAAS;CAAA;CAAY;CAAW;CAAW;CAAU;AAE3D,MAAM,sBAAmB;OAAQ;CAAS;CAAK;CAAa;CAAO;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAInE,MAAC,6BAAkC;OAAO;OAAmB;CAAA;OAAA;OAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAE7D,MAAC,sBAA0B;OAAQ;CAAkB;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA"}
|
package/dist/types/runtime.d.cts
CHANGED
|
@@ -905,6 +905,9 @@ interface EnvInterface {
|
|
|
905
905
|
* @remarks
|
|
906
906
|
* This variable is used to specify a path to application data that is specific to the current [Nix](https://nixos.org/) environment. This variable can be used to set the \`$storm.paths.temp\` property.
|
|
907
907
|
*
|
|
908
|
+
* @readonly
|
|
909
|
+
* @runtime
|
|
910
|
+
* @hidden
|
|
908
911
|
* @category node
|
|
909
912
|
*/
|
|
910
913
|
DEVENV_RUNTIME?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.cts","names":[],"sources":["../../src/types/runtime.ts"],"mappings":";;AA6BA;;;;;;;;;;UAAiB,YAAA;EAqEf;;;;;;EAAA,SA9DS,QAAA;EAyHT;;;;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AA;;;;;;;;;;;EAYA,QAAA;;;;;;;;;;;;;;WAeS,YAAA;;;;;;;;;;;;;;WAeA,OAAA;;;;;;;;;;;;;;WAeA,aAAA;;;;;;;;;;;;;;WAeA,eAAA;;;;;;;;;;;;;;WAeA,cAAA;;;;;;;;;;;;;;WAeA,cAAA;;;;;;;;;;;;;;WAeA,eAAA;;;;;;;;;;;;;;;EAgBT,cAAA;AAAA;;;;;;;UASe,gBAAA;;;;;;;;;EASf,cAAA;AAAA"}
|
package/dist/types/runtime.d.mts
CHANGED
|
@@ -905,6 +905,9 @@ interface EnvInterface {
|
|
|
905
905
|
* @remarks
|
|
906
906
|
* This variable is used to specify a path to application data that is specific to the current [Nix](https://nixos.org/) environment. This variable can be used to set the \`$storm.paths.temp\` property.
|
|
907
907
|
*
|
|
908
|
+
* @readonly
|
|
909
|
+
* @runtime
|
|
910
|
+
* @hidden
|
|
908
911
|
* @category node
|
|
909
912
|
*/
|
|
910
913
|
DEVENV_RUNTIME?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.mts","names":[],"sources":["../../src/types/runtime.ts"],"mappings":";;AA6BA;;;;;;;;;;UAAiB,YAAA;EAqEf;;;;;;EAAA,SA9DS,QAAA;EAyHT;;;;;;;;EAAA,SA/GS,WAAA;EAyMA;;;;;;EAAA,SAjMA,QAAA;EAkQT;;;;;;EAAA,SA1PS,eAAA;EA0TA;;;;;;EAAA,SAlTA,cAAA;EAwXA;;;;;;EAAA,SAhXA,UAAA;EAsbA;;;;;;EAAA,SA9aA,WAAA;EAofA;;;;;;;;;;EAxeT,YAAA;EAslBS;;;;;;;EA7kBT,QAAA;EA4pBS;;;;;;;;;;;EA/oBT,IAAA;EAixBA;;;;;;;EAxwBA,WAAA;
|
|
1
|
+
{"version":3,"file":"runtime.d.mts","names":[],"sources":["../../src/types/runtime.ts"],"mappings":";;AA6BA;;;;;;;;;;UAAiB,YAAA;EAqEf;;;;;;EAAA,SA9DS,QAAA;EAy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