@powerlines/plugin-env 0.16.234 → 0.16.235
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 +23 -71
- package/dist/babel/plugin.d.cts.map +1 -1
- package/dist/babel/plugin.d.mts.map +1 -1
- package/dist/babel/plugin.mjs +23 -71
- package/dist/babel/plugin.mjs.map +1 -1
- package/dist/components/docs.cjs +14 -14
- package/dist/components/docs.d.cts +0 -2
- package/dist/components/docs.d.cts.map +1 -1
- package/dist/components/docs.d.mts +0 -2
- package/dist/components/docs.d.mts.map +1 -1
- package/dist/components/docs.mjs +14 -14
- package/dist/components/docs.mjs.map +1 -1
- package/dist/components/env-builtin.cjs +233 -426
- package/dist/components/env-builtin.d.cts +1 -4
- package/dist/components/env-builtin.d.cts.map +1 -1
- package/dist/components/env-builtin.d.mts +1 -4
- package/dist/components/env-builtin.d.mts.map +1 -1
- package/dist/components/env-builtin.mjs +236 -428
- package/dist/components/env-builtin.mjs.map +1 -1
- package/dist/helpers/index.cjs +9 -26
- package/dist/helpers/index.d.cts +3 -5
- package/dist/helpers/index.d.mts +3 -5
- package/dist/helpers/index.mjs +3 -5
- package/dist/helpers/load.cjs +8 -7
- package/dist/helpers/load.d.cts +3 -3
- package/dist/helpers/load.d.cts.map +1 -1
- package/dist/helpers/load.d.mts +3 -3
- package/dist/helpers/load.d.mts.map +1 -1
- package/dist/helpers/load.mjs +7 -6
- package/dist/helpers/load.mjs.map +1 -1
- package/dist/helpers/schema.cjs +206 -0
- package/dist/helpers/schema.d.cts +53 -0
- package/dist/helpers/schema.d.cts.map +1 -0
- package/dist/helpers/schema.d.mts +53 -0
- package/dist/helpers/schema.d.mts.map +1 -0
- package/dist/helpers/schema.mjs +199 -0
- package/dist/helpers/schema.mjs.map +1 -0
- package/dist/index.cjs +23 -201
- package/dist/index.d.cts +2 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +25 -203
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs +1 -0
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.mjs +2 -2
- package/dist/types/plugin.cjs +16 -24
- package/dist/types/plugin.d.cts +23 -57
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +23 -57
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/plugin.mjs +16 -25
- package/dist/types/plugin.mjs.map +1 -1
- package/package.json +12 -26
- package/dist/helpers/create-reflection-resource.cjs +0 -23
- package/dist/helpers/create-reflection-resource.d.cts +0 -13
- package/dist/helpers/create-reflection-resource.d.cts.map +0 -1
- package/dist/helpers/create-reflection-resource.d.mts +0 -13
- package/dist/helpers/create-reflection-resource.d.mts.map +0 -1
- package/dist/helpers/create-reflection-resource.mjs +0 -23
- package/dist/helpers/create-reflection-resource.mjs.map +0 -1
- package/dist/helpers/persistence.cjs +0 -309
- package/dist/helpers/persistence.d.cts +0 -84
- package/dist/helpers/persistence.d.cts.map +0 -1
- package/dist/helpers/persistence.d.mts +0 -84
- package/dist/helpers/persistence.d.mts.map +0 -1
- package/dist/helpers/persistence.mjs +0 -297
- package/dist/helpers/persistence.mjs.map +0 -1
- package/dist/helpers/reflect.cjs +0 -290
- package/dist/helpers/reflect.d.cts +0 -68
- package/dist/helpers/reflect.d.cts.map +0 -1
- package/dist/helpers/reflect.d.mts +0 -68
- package/dist/helpers/reflect.d.mts.map +0 -1
- package/dist/helpers/reflect.mjs +0 -281
- package/dist/helpers/reflect.mjs.map +0 -1
- package/dist/helpers/template-helpers.cjs +0 -70
- package/dist/helpers/template-helpers.d.cts +0 -15
- package/dist/helpers/template-helpers.d.cts.map +0 -1
- package/dist/helpers/template-helpers.d.mts +0 -15
- package/dist/helpers/template-helpers.d.mts.map +0 -1
- package/dist/helpers/template-helpers.mjs +0 -69
- package/dist/helpers/template-helpers.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-env",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.235",
|
|
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"],
|
|
@@ -69,30 +69,18 @@
|
|
|
69
69
|
"import": "./dist/helpers/automd-generator.mjs",
|
|
70
70
|
"require": "./dist/helpers/automd-generator.cjs"
|
|
71
71
|
},
|
|
72
|
-
"./helpers/create-reflection-resource": {
|
|
73
|
-
"import": "./dist/helpers/create-reflection-resource.mjs",
|
|
74
|
-
"require": "./dist/helpers/create-reflection-resource.cjs"
|
|
75
|
-
},
|
|
76
72
|
"./helpers/load": {
|
|
77
73
|
"import": "./dist/helpers/load.mjs",
|
|
78
74
|
"require": "./dist/helpers/load.cjs"
|
|
79
75
|
},
|
|
80
|
-
"./helpers/
|
|
81
|
-
"import": "./dist/helpers/
|
|
82
|
-
"require": "./dist/helpers/
|
|
83
|
-
},
|
|
84
|
-
"./helpers/reflect": {
|
|
85
|
-
"import": "./dist/helpers/reflect.mjs",
|
|
86
|
-
"require": "./dist/helpers/reflect.cjs"
|
|
76
|
+
"./helpers/schema": {
|
|
77
|
+
"import": "./dist/helpers/schema.mjs",
|
|
78
|
+
"require": "./dist/helpers/schema.cjs"
|
|
87
79
|
},
|
|
88
80
|
"./helpers/source-file-env": {
|
|
89
81
|
"import": "./dist/helpers/source-file-env.mjs",
|
|
90
82
|
"require": "./dist/helpers/source-file-env.cjs"
|
|
91
83
|
},
|
|
92
|
-
"./helpers/template-helpers": {
|
|
93
|
-
"import": "./dist/helpers/template-helpers.mjs",
|
|
94
|
-
"require": "./dist/helpers/template-helpers.cjs"
|
|
95
|
-
},
|
|
96
84
|
"./types": {
|
|
97
85
|
"import": "./dist/types/index.mjs",
|
|
98
86
|
"require": "./dist/types/index.cjs"
|
|
@@ -119,14 +107,12 @@
|
|
|
119
107
|
"@alloy-js/typescript": "^0.23.0",
|
|
120
108
|
"@babel/core": "8.0.0-rc.5",
|
|
121
109
|
"@babel/types": "8.0.0-rc.5",
|
|
122
|
-
"@powerlines/core": "^0.15.
|
|
123
|
-
"@powerlines/
|
|
124
|
-
"@powerlines/plugin-
|
|
125
|
-
"@powerlines/plugin-
|
|
126
|
-
"@powerlines/plugin-
|
|
127
|
-
"@powerlines/
|
|
128
|
-
"@powerlines/plugin-plugin": "^0.12.455",
|
|
129
|
-
"@powerlines/schema": "^0.11.21",
|
|
110
|
+
"@powerlines/core": "^0.15.21",
|
|
111
|
+
"@powerlines/plugin-alloy": "^0.26.127",
|
|
112
|
+
"@powerlines/plugin-automd": "^0.1.505",
|
|
113
|
+
"@powerlines/plugin-babel": "^0.13.40",
|
|
114
|
+
"@powerlines/plugin-plugin": "^0.12.456",
|
|
115
|
+
"@powerlines/schema": "^0.11.22",
|
|
130
116
|
"@storm-software/config-tools": "^1.190.20",
|
|
131
117
|
"@stryke/capnp": "^0.12.102",
|
|
132
118
|
"@stryke/convert": "^0.7.7",
|
|
@@ -141,9 +127,9 @@
|
|
|
141
127
|
"automd": "^0.4.3",
|
|
142
128
|
"c12": "^3.3.4",
|
|
143
129
|
"defu": "^6.1.7",
|
|
144
|
-
"powerlines": "^0.47.
|
|
130
|
+
"powerlines": "^0.47.44"
|
|
145
131
|
},
|
|
146
132
|
"devDependencies": { "@types/node": "^25.9.0", "vite": "^8.0.13" },
|
|
147
133
|
"publishConfig": { "access": "public" },
|
|
148
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "16ef39e52310d2e7caf811d48ff02e4237fd9900"
|
|
149
135
|
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_types_plugin = require('../types/plugin.cjs');
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/create-reflection-resource.ts
|
|
5
|
-
/**
|
|
6
|
-
* Creates a reflection resource for the environment configuration.
|
|
7
|
-
*
|
|
8
|
-
* @param _context - The environment plugin context.
|
|
9
|
-
* @returns A resource that provides the reflection of the environment configuration.
|
|
10
|
-
*/
|
|
11
|
-
function createReflection(_context) {
|
|
12
|
-
return {};
|
|
13
|
-
}
|
|
14
|
-
createReflection.__type = [
|
|
15
|
-
() => require_types_plugin.__ΩEnvPluginContext,
|
|
16
|
-
"_context",
|
|
17
|
-
"createReflection",
|
|
18
|
-
"Creates a reflection resource for the environment configuration.",
|
|
19
|
-
"Pn!2\"\"/#?$"
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
//#endregion
|
|
23
|
-
exports.createReflection = createReflection;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { EnvPluginContext } from "../types/plugin.cjs";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/create-reflection-resource.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Creates a reflection resource for the environment configuration.
|
|
6
|
-
*
|
|
7
|
-
* @param _context - The environment plugin context.
|
|
8
|
-
* @returns A resource that provides the reflection of the environment configuration.
|
|
9
|
-
*/
|
|
10
|
-
declare function createReflection(_context: EnvPluginContext): {};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { createReflection };
|
|
13
|
-
//# sourceMappingURL=create-reflection-resource.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-reflection-resource.d.cts","names":[],"sources":["../../src/helpers/create-reflection-resource.ts"],"mappings":";;;;;AA0BA;;;;iBAAgB,gBAAA,CAAiB,QAA0B,EAAhB,gBAAgB"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { EnvPluginContext } from "../types/plugin.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/create-reflection-resource.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Creates a reflection resource for the environment configuration.
|
|
6
|
-
*
|
|
7
|
-
* @param _context - The environment plugin context.
|
|
8
|
-
* @returns A resource that provides the reflection of the environment configuration.
|
|
9
|
-
*/
|
|
10
|
-
declare function createReflection(_context: EnvPluginContext): {};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { createReflection };
|
|
13
|
-
//# sourceMappingURL=create-reflection-resource.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-reflection-resource.d.mts","names":[],"sources":["../../src/helpers/create-reflection-resource.ts"],"mappings":";;;;;AA0BA;;;;iBAAgB,gBAAA,CAAiB,QAA0B,EAAhB,gBAAgB"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { __ΩEnvPluginContext } from "../types/plugin.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/create-reflection-resource.ts
|
|
4
|
-
/**
|
|
5
|
-
* Creates a reflection resource for the environment configuration.
|
|
6
|
-
*
|
|
7
|
-
* @param _context - The environment plugin context.
|
|
8
|
-
* @returns A resource that provides the reflection of the environment configuration.
|
|
9
|
-
*/
|
|
10
|
-
function createReflection(_context) {
|
|
11
|
-
return {};
|
|
12
|
-
}
|
|
13
|
-
createReflection.__type = [
|
|
14
|
-
() => __ΩEnvPluginContext,
|
|
15
|
-
"_context",
|
|
16
|
-
"createReflection",
|
|
17
|
-
"Creates a reflection resource for the environment configuration.",
|
|
18
|
-
"Pn!2\"\"/#?$"
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
//#endregion
|
|
22
|
-
export { createReflection };
|
|
23
|
-
//# sourceMappingURL=create-reflection-resource.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-reflection-resource.mjs","names":[],"sources":["../../src/helpers/create-reflection-resource.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Creates a reflection resource for the environment configuration.\n *\n * @param _context - The environment plugin context.\n * @returns A resource that provides the reflection of the environment configuration.\n */\nexport function createReflection(_context: EnvPluginContext) {\n // const defaultValue = computed(\n // () => context && loadEnvFromContext(context, process.env)\n // );\n\n return {};\n\n // return computed(() => {\n // result.getProperties().forEach(prop => {\n // const aliases = prop.getAlias();\n // aliases.filter(Boolean).forEach(alias => {\n // result.addProperty({\n // name: alias,\n // optional: prop.isOptional() ? true : undefined,\n // readonly: prop.isReadonly() ? true : undefined,\n // description: prop.getDescription(),\n // visibility: prop.getVisibility(),\n // type: prop.getType(),\n // default: prop.getDefaultValue(),\n // tags: {\n // hidden: prop.isHidden(),\n // ignore: prop.isIgnored(),\n // internal: prop.isInternal(),\n // alias: prop\n // .getAlias()\n // .filter(a => a !== alias)\n // .concat(prop.name),\n // title: prop.getTitle() || titleCase(prop.name),\n // readonly: prop.isReadonly(),\n // permission: prop.getPermission(),\n // domain: prop.getDomain()\n // }\n // });\n // });\n // });\n\n // result.getProperties().forEach(prop => {\n // prop.setDefaultValue(\n // (defaultValue.value as Record<string, any>)?.[prop.getNameAsString()] ??\n // prop\n // .getAlias()\n // .reduce(\n // (ret, alias) =>\n // ret ?? (defaultValue.value as Record<string, any>)?.[alias],\n // undefined\n // ) ??\n // prop.getDefaultValue()\n // );\n // });\n // });\n}\n"],"mappings":";;;;;;;;;;CAYC,OAAQ,CAAC;AA2CV;AACA,iBAAe,SAAQ;OAAK;CAAU;CAAA;CAAA;CAAA;AAAA"}
|
|
@@ -1,309 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
-
const require_types_plugin = require('../types/plugin.cjs');
|
|
4
|
-
const require_helpers_reflect = require('./reflect.cjs');
|
|
5
|
-
let _powerlines_deepkit_capnp = require("@powerlines/deepkit/capnp");
|
|
6
|
-
let _powerlines_deepkit_resolve_reflections = require("@powerlines/deepkit/resolve-reflections");
|
|
7
|
-
let _powerlines_deepkit_schemas_reflection = require("@powerlines/deepkit/schemas/reflection");
|
|
8
|
-
let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
9
|
-
let _stryke_capnp = require("@stryke/capnp");
|
|
10
|
-
_stryke_capnp = require_runtime.__toESM(_stryke_capnp, 1);
|
|
11
|
-
let _stryke_fs_buffer = require("@stryke/fs/buffer");
|
|
12
|
-
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
13
|
-
let _stryke_type_checks_is_empty_object = require("@stryke/type-checks/is-empty-object");
|
|
14
|
-
let node_fs = require("node:fs");
|
|
15
|
-
|
|
16
|
-
//#region src/helpers/persistence.ts
|
|
17
|
-
/**
|
|
18
|
-
* Resolves the runtime type definition file for the environment variables.
|
|
19
|
-
*
|
|
20
|
-
* @param context - The plugin context.
|
|
21
|
-
* @returns The runtime type definition file for the environment variables.
|
|
22
|
-
*/
|
|
23
|
-
async function resolveRuntimeTypeFile(context) {
|
|
24
|
-
const resolved = await context.fs.resolve("@powerlines/plugin-env/types/env");
|
|
25
|
-
if (!resolved) throw new Error(`Failed to resolve the runtime type definition file for the environment variables. Please ensure that the "@powerlines/plugin-env" package is installed.`);
|
|
26
|
-
return resolved;
|
|
27
|
-
}
|
|
28
|
-
resolveRuntimeTypeFile.__type = [
|
|
29
|
-
"context",
|
|
30
|
-
"resolveRuntimeTypeFile",
|
|
31
|
-
"Resolves the runtime type definition file for the environment variables.",
|
|
32
|
-
"P!2!&`/\"?#"
|
|
33
|
-
];
|
|
34
|
-
/**
|
|
35
|
-
* Gets the default type definition for the environment variables.
|
|
36
|
-
*
|
|
37
|
-
* @param context - The plugin context.
|
|
38
|
-
* @returns The default type definition for the environment variables.
|
|
39
|
-
*/
|
|
40
|
-
async function getEnvDefaultTypeDefinition(context) {
|
|
41
|
-
return {
|
|
42
|
-
file: await resolveRuntimeTypeFile(context),
|
|
43
|
-
name: "EnvInterface"
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
getEnvDefaultTypeDefinition.__type = [
|
|
47
|
-
"context",
|
|
48
|
-
"getEnvDefaultTypeDefinition",
|
|
49
|
-
"Gets the default type definition for the environment variables.",
|
|
50
|
-
"P\"2!!`/\"?#"
|
|
51
|
-
];
|
|
52
|
-
/** Gets the default type definition for the environment secrets.
|
|
53
|
-
*
|
|
54
|
-
* @param context - The plugin context.
|
|
55
|
-
* @returns The default type definition for the environment secrets.
|
|
56
|
-
*/
|
|
57
|
-
async function getSecretsDefaultTypeDefinition(context) {
|
|
58
|
-
return {
|
|
59
|
-
file: await resolveRuntimeTypeFile(context),
|
|
60
|
-
name: "SecretsInterface"
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
getSecretsDefaultTypeDefinition.__type = [
|
|
64
|
-
"context",
|
|
65
|
-
"getSecretsDefaultTypeDefinition",
|
|
66
|
-
"P\"2!!`/\""
|
|
67
|
-
];
|
|
68
|
-
/**
|
|
69
|
-
* Gets the path to the environment type reflections.
|
|
70
|
-
*
|
|
71
|
-
* @param context - The plugin context.
|
|
72
|
-
* @param name - The name of the type reflections.
|
|
73
|
-
* @returns The path to the environment type reflections.
|
|
74
|
-
*/
|
|
75
|
-
function getEnvTypeReflectionsPath(context, name = "env") {
|
|
76
|
-
return (0, _stryke_path_join_paths.joinPaths)((0, _powerlines_deepkit_resolve_reflections.getReflectionsPath)(context), "env", `${name}-types.bin`);
|
|
77
|
-
}
|
|
78
|
-
getEnvTypeReflectionsPath.__type = [
|
|
79
|
-
() => require_types_plugin.__ΩEnvPluginContext,
|
|
80
|
-
"context",
|
|
81
|
-
() => require_types_plugin.__ΩEnvType,
|
|
82
|
-
"name",
|
|
83
|
-
() => "env",
|
|
84
|
-
"getEnvTypeReflectionsPath",
|
|
85
|
-
"Gets the path to the environment type reflections.",
|
|
86
|
-
"Pn!2\"n#2$>%&/&?'"
|
|
87
|
-
];
|
|
88
|
-
/**
|
|
89
|
-
* Reads the environment type reflection from the file system.
|
|
90
|
-
*
|
|
91
|
-
* @param context - The plugin context.
|
|
92
|
-
* @param name - The name of the type reflections.
|
|
93
|
-
* @returns The environment type reflection.
|
|
94
|
-
*/
|
|
95
|
-
async function readEnvTypeReflection(context, name = "env") {
|
|
96
|
-
const filePath = getEnvTypeReflectionsPath(context, name);
|
|
97
|
-
if (!(0, node_fs.existsSync)(filePath)) {
|
|
98
|
-
if (!context.env.types.env || (0, _stryke_type_checks_is_empty_object.isEmptyObject)(context.env.types.env)) {
|
|
99
|
-
const reflection = require_helpers_reflect.createEnvReflection(context);
|
|
100
|
-
const message = new _stryke_capnp.Message();
|
|
101
|
-
reflection.messageRoot = message.initRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes);
|
|
102
|
-
reflection.dataBuffer = message.toArrayBuffer();
|
|
103
|
-
context.env.types.env = reflection;
|
|
104
|
-
await writeEnvTypeReflection(context, context.env.types.env, name);
|
|
105
|
-
}
|
|
106
|
-
return context.env.types.env;
|
|
107
|
-
}
|
|
108
|
-
const buffer = await (0, _stryke_fs_buffer.readFileBuffer)(filePath);
|
|
109
|
-
const messageRoot = new _stryke_capnp.Message(buffer, false).getRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes);
|
|
110
|
-
const reflection = (0, _powerlines_deepkit_vendor_type.resolveClassType)((0, _powerlines_deepkit_vendor_type.deserializeType)((0, _powerlines_deepkit_capnp.convertFromCapnp)(messageRoot.types)));
|
|
111
|
-
context.env.types[name] = reflection;
|
|
112
|
-
context.env.types[name].messageRoot = messageRoot;
|
|
113
|
-
context.env.types[name].dataBuffer = buffer;
|
|
114
|
-
return reflection;
|
|
115
|
-
}
|
|
116
|
-
readEnvTypeReflection.__type = [
|
|
117
|
-
() => require_types_plugin.__ΩEnvPluginContext,
|
|
118
|
-
"context",
|
|
119
|
-
() => require_types_plugin.__ΩEnvType,
|
|
120
|
-
"name",
|
|
121
|
-
() => "env",
|
|
122
|
-
"readEnvTypeReflection",
|
|
123
|
-
"Reads the environment type reflection from the file system.",
|
|
124
|
-
"Pn!2\"n#2$>%!`/&?'"
|
|
125
|
-
];
|
|
126
|
-
/**
|
|
127
|
-
* Writes the environment type reflection to the file system.
|
|
128
|
-
*
|
|
129
|
-
* @param context - The plugin context.
|
|
130
|
-
* @param reflection - The environment type reflection to write.
|
|
131
|
-
* @param name - The name of the type reflections.
|
|
132
|
-
*/
|
|
133
|
-
async function writeEnvTypeReflection(context, reflection, name = "env") {
|
|
134
|
-
const serialized = reflection.serializeType();
|
|
135
|
-
const message = new _stryke_capnp.Message();
|
|
136
|
-
(0, _powerlines_deepkit_capnp.convertToCapnp)(serialized, message.initRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes)._initTypes(serialized.length));
|
|
137
|
-
await (0, _stryke_fs_buffer.writeFileBuffer)(getEnvTypeReflectionsPath(context, name), message.toArrayBuffer());
|
|
138
|
-
}
|
|
139
|
-
writeEnvTypeReflection.__type = [
|
|
140
|
-
() => require_types_plugin.__ΩEnvPluginContext,
|
|
141
|
-
"context",
|
|
142
|
-
"reflection",
|
|
143
|
-
() => require_types_plugin.__ΩEnvType,
|
|
144
|
-
"name",
|
|
145
|
-
() => "env",
|
|
146
|
-
"writeEnvTypeReflection",
|
|
147
|
-
"Writes the environment type reflection to the file system.",
|
|
148
|
-
"Pn!2\"!2#n$2%>&\"/'?("
|
|
149
|
-
];
|
|
150
|
-
function getEnvReflectionsPath(context, name) {
|
|
151
|
-
return (0, _stryke_path_join_paths.joinPaths)((0, _powerlines_deepkit_resolve_reflections.getReflectionsPath)(context), "env", `${name}.bin`);
|
|
152
|
-
}
|
|
153
|
-
getEnvReflectionsPath.__type = [
|
|
154
|
-
() => require_types_plugin.__ΩEnvPluginContext,
|
|
155
|
-
"context",
|
|
156
|
-
() => require_types_plugin.__ΩEnvType,
|
|
157
|
-
"name",
|
|
158
|
-
"getEnvReflectionsPath",
|
|
159
|
-
"Pn!2\"n#2$&/%"
|
|
160
|
-
];
|
|
161
|
-
/**
|
|
162
|
-
* Reads the environment reflection data from the file system.
|
|
163
|
-
*
|
|
164
|
-
* @param context - The plugin context.
|
|
165
|
-
* @returns The environment reflection data.
|
|
166
|
-
*/
|
|
167
|
-
async function readEnvReflection(context) {
|
|
168
|
-
const filePath = getEnvReflectionsPath(context, "env");
|
|
169
|
-
if (!(0, node_fs.existsSync)(filePath)) {
|
|
170
|
-
if (!context.env.types.env) context.env.types.env = await readEnvTypeReflection(context, "env");
|
|
171
|
-
if (!context.env.used.env || (0, _stryke_type_checks_is_empty_object.isEmptyObject)(context.env.used.env)) {
|
|
172
|
-
const reflection = require_helpers_reflect.createEnvReflection(context, {
|
|
173
|
-
type: {
|
|
174
|
-
kind: _powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
|
|
175
|
-
typeName: "Env",
|
|
176
|
-
description: `An object containing the environment configuration parameters that are used (at least once) by the ${context.config.name ? `${context.config.name} application` : "application"}.`,
|
|
177
|
-
types: []
|
|
178
|
-
},
|
|
179
|
-
superReflection: context.env.types.env
|
|
180
|
-
});
|
|
181
|
-
reflection.name = "Env";
|
|
182
|
-
const message = new _stryke_capnp.Message();
|
|
183
|
-
reflection.messageRoot = message.initRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes);
|
|
184
|
-
reflection.dataBuffer = message.toArrayBuffer();
|
|
185
|
-
context.env.used.env = reflection;
|
|
186
|
-
await writeEnvReflection(context, context.env.used.env, "env");
|
|
187
|
-
}
|
|
188
|
-
return context.env.used.env;
|
|
189
|
-
}
|
|
190
|
-
const buffer = await (0, _stryke_fs_buffer.readFileBuffer)(filePath);
|
|
191
|
-
const messageRoot = new _stryke_capnp.Message(buffer, false).getRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes);
|
|
192
|
-
const reflection = (0, _powerlines_deepkit_vendor_type.resolveClassType)((0, _powerlines_deepkit_vendor_type.deserializeType)((0, _powerlines_deepkit_capnp.convertFromCapnp)(messageRoot.types)));
|
|
193
|
-
context.env.used.env = reflection;
|
|
194
|
-
context.env.used.env.messageRoot = messageRoot;
|
|
195
|
-
context.env.used.env.dataBuffer = buffer;
|
|
196
|
-
return reflection;
|
|
197
|
-
}
|
|
198
|
-
readEnvReflection.__type = [
|
|
199
|
-
() => require_types_plugin.__ΩEnvPluginContext,
|
|
200
|
-
"context",
|
|
201
|
-
"readEnvReflection",
|
|
202
|
-
"Reads the environment reflection data from the file system.",
|
|
203
|
-
"Pn!2\"!`/#?$"
|
|
204
|
-
];
|
|
205
|
-
/**
|
|
206
|
-
* Reads the secret environment reflection data from the file system.
|
|
207
|
-
*
|
|
208
|
-
* @param context - The plugin context.
|
|
209
|
-
* @returns The environment reflection data.
|
|
210
|
-
*/
|
|
211
|
-
async function readSecretsReflection(context) {
|
|
212
|
-
const filePath = getEnvReflectionsPath(context, "secrets");
|
|
213
|
-
if (!(0, node_fs.existsSync)(filePath)) {
|
|
214
|
-
if (!context.env.types.secrets) context.env.types.secrets = await readEnvTypeReflection(context, "secrets");
|
|
215
|
-
if (!context.env.used.secrets || (0, _stryke_type_checks_is_empty_object.isEmptyObject)(context.env.used.secrets)) {
|
|
216
|
-
const reflection = require_helpers_reflect.createEnvReflection(context, {
|
|
217
|
-
type: {
|
|
218
|
-
kind: _powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
|
|
219
|
-
typeName: "Secrets",
|
|
220
|
-
description: `An object containing the secret configuration parameters that are used (at least once) by the ${context.config.name ? `${context.config.name} application` : "application"}.`,
|
|
221
|
-
types: []
|
|
222
|
-
},
|
|
223
|
-
superReflection: context.env.types.secrets
|
|
224
|
-
});
|
|
225
|
-
reflection.name = "Secrets";
|
|
226
|
-
const message = new _stryke_capnp.Message();
|
|
227
|
-
reflection.messageRoot = message.initRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes);
|
|
228
|
-
reflection.dataBuffer = message.toArrayBuffer();
|
|
229
|
-
context.env.used.secrets = reflection;
|
|
230
|
-
await writeEnvReflection(context, context.env.used.secrets, "secrets");
|
|
231
|
-
}
|
|
232
|
-
return context.env.used.secrets;
|
|
233
|
-
}
|
|
234
|
-
const buffer = await (0, _stryke_fs_buffer.readFileBuffer)(filePath);
|
|
235
|
-
const messageRoot = new _stryke_capnp.Message(buffer, false).getRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes);
|
|
236
|
-
const reflection = (0, _powerlines_deepkit_vendor_type.resolveClassType)((0, _powerlines_deepkit_vendor_type.deserializeType)((0, _powerlines_deepkit_capnp.convertFromCapnp)(messageRoot.types)));
|
|
237
|
-
context.env.used.secrets = reflection;
|
|
238
|
-
context.env.used.secrets.messageRoot = messageRoot;
|
|
239
|
-
context.env.used.secrets.dataBuffer = buffer;
|
|
240
|
-
return reflection;
|
|
241
|
-
}
|
|
242
|
-
readSecretsReflection.__type = [
|
|
243
|
-
() => require_types_plugin.__ΩEnvPluginContext,
|
|
244
|
-
"context",
|
|
245
|
-
"readSecretsReflection",
|
|
246
|
-
"Reads the secret environment reflection data from the file system.",
|
|
247
|
-
"Pn!2\"!`/#?$"
|
|
248
|
-
];
|
|
249
|
-
/**
|
|
250
|
-
* Writes the environment reflection data to the file system.
|
|
251
|
-
*
|
|
252
|
-
* @param context - The plugin context.
|
|
253
|
-
* @param reflection - The reflection data to write.
|
|
254
|
-
* @param name - The name of the reflection (either "env" or "secrets").
|
|
255
|
-
*/
|
|
256
|
-
async function writeEnvReflection(context, reflection, name = "env") {
|
|
257
|
-
const serialized = reflection.serializeType();
|
|
258
|
-
const message = new _stryke_capnp.Message();
|
|
259
|
-
(0, _powerlines_deepkit_capnp.convertToCapnp)(serialized, message.initRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes)._initTypes(serialized.length));
|
|
260
|
-
await (0, _stryke_fs_buffer.writeFileBuffer)(getEnvReflectionsPath(context, name), message.toArrayBuffer());
|
|
261
|
-
}
|
|
262
|
-
writeEnvReflection.__type = [
|
|
263
|
-
() => require_types_plugin.__ΩEnvPluginContext,
|
|
264
|
-
"context",
|
|
265
|
-
"reflection",
|
|
266
|
-
() => require_types_plugin.__ΩEnvType,
|
|
267
|
-
"name",
|
|
268
|
-
() => "env",
|
|
269
|
-
"writeEnvReflection",
|
|
270
|
-
"Writes the environment reflection data to the file system.",
|
|
271
|
-
"Pn!2\"!2#n$2%>&\"/'?("
|
|
272
|
-
];
|
|
273
|
-
/**
|
|
274
|
-
* Writes the environment reflection data to the file system.
|
|
275
|
-
*
|
|
276
|
-
* @param context - The plugin context.
|
|
277
|
-
* @param reflection - The reflection data to write.
|
|
278
|
-
* @param name - The name of the reflection (either "env" or "secrets").
|
|
279
|
-
*/
|
|
280
|
-
function writeEnvReflectionSync(context, reflection, name = "env") {
|
|
281
|
-
const serialized = reflection.serializeType();
|
|
282
|
-
const message = new _stryke_capnp.Message();
|
|
283
|
-
(0, _powerlines_deepkit_capnp.convertToCapnp)(serialized, message.initRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes)._initTypes(serialized.length));
|
|
284
|
-
(0, _stryke_fs_buffer.writeFileBufferSync)(getEnvReflectionsPath(context, name), message.toArrayBuffer());
|
|
285
|
-
}
|
|
286
|
-
writeEnvReflectionSync.__type = [
|
|
287
|
-
() => require_types_plugin.__ΩEnvPluginContext,
|
|
288
|
-
"context",
|
|
289
|
-
"reflection",
|
|
290
|
-
() => require_types_plugin.__ΩEnvType,
|
|
291
|
-
"name",
|
|
292
|
-
() => "env",
|
|
293
|
-
"writeEnvReflectionSync",
|
|
294
|
-
"Writes the environment reflection data to the file system.",
|
|
295
|
-
"Pn!2\"!2#n$2%>&\"/'?("
|
|
296
|
-
];
|
|
297
|
-
|
|
298
|
-
//#endregion
|
|
299
|
-
exports.getEnvDefaultTypeDefinition = getEnvDefaultTypeDefinition;
|
|
300
|
-
exports.getEnvReflectionsPath = getEnvReflectionsPath;
|
|
301
|
-
exports.getEnvTypeReflectionsPath = getEnvTypeReflectionsPath;
|
|
302
|
-
exports.getSecretsDefaultTypeDefinition = getSecretsDefaultTypeDefinition;
|
|
303
|
-
exports.readEnvReflection = readEnvReflection;
|
|
304
|
-
exports.readEnvTypeReflection = readEnvTypeReflection;
|
|
305
|
-
exports.readSecretsReflection = readSecretsReflection;
|
|
306
|
-
exports.resolveRuntimeTypeFile = resolveRuntimeTypeFile;
|
|
307
|
-
exports.writeEnvReflection = writeEnvReflection;
|
|
308
|
-
exports.writeEnvReflectionSync = writeEnvReflectionSync;
|
|
309
|
-
exports.writeEnvTypeReflection = writeEnvTypeReflection;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { EnvPluginContext, EnvType } from "../types/plugin.cjs";
|
|
2
|
-
import { UnresolvedContext } from "powerlines";
|
|
3
|
-
import { TypeDefinition } from "@stryke/types/configuration";
|
|
4
|
-
import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
|
|
5
|
-
|
|
6
|
-
//#region src/helpers/persistence.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* Resolves the runtime type definition file for the environment variables.
|
|
9
|
-
*
|
|
10
|
-
* @param context - The plugin context.
|
|
11
|
-
* @returns The runtime type definition file for the environment variables.
|
|
12
|
-
*/
|
|
13
|
-
declare function resolveRuntimeTypeFile(context: UnresolvedContext): Promise<string>;
|
|
14
|
-
/**
|
|
15
|
-
* Gets the default type definition for the environment variables.
|
|
16
|
-
*
|
|
17
|
-
* @param context - The plugin context.
|
|
18
|
-
* @returns The default type definition for the environment variables.
|
|
19
|
-
*/
|
|
20
|
-
declare function getEnvDefaultTypeDefinition<TContext extends UnresolvedContext>(context: TContext): Promise<TypeDefinition>;
|
|
21
|
-
/** Gets the default type definition for the environment secrets.
|
|
22
|
-
*
|
|
23
|
-
* @param context - The plugin context.
|
|
24
|
-
* @returns The default type definition for the environment secrets.
|
|
25
|
-
*/
|
|
26
|
-
declare function getSecretsDefaultTypeDefinition<TContext extends UnresolvedContext>(context: TContext): Promise<TypeDefinition>;
|
|
27
|
-
/**
|
|
28
|
-
* Gets the path to the environment type reflections.
|
|
29
|
-
*
|
|
30
|
-
* @param context - The plugin context.
|
|
31
|
-
* @param name - The name of the type reflections.
|
|
32
|
-
* @returns The path to the environment type reflections.
|
|
33
|
-
*/
|
|
34
|
-
declare function getEnvTypeReflectionsPath(context: EnvPluginContext, name?: EnvType): string;
|
|
35
|
-
/**
|
|
36
|
-
* Reads the environment type reflection from the file system.
|
|
37
|
-
*
|
|
38
|
-
* @param context - The plugin context.
|
|
39
|
-
* @param name - The name of the type reflections.
|
|
40
|
-
* @returns The environment type reflection.
|
|
41
|
-
*/
|
|
42
|
-
declare function readEnvTypeReflection(context: EnvPluginContext, name?: EnvType): Promise<ReflectionClass<any>>;
|
|
43
|
-
/**
|
|
44
|
-
* Writes the environment type reflection to the file system.
|
|
45
|
-
*
|
|
46
|
-
* @param context - The plugin context.
|
|
47
|
-
* @param reflection - The environment type reflection to write.
|
|
48
|
-
* @param name - The name of the type reflections.
|
|
49
|
-
*/
|
|
50
|
-
declare function writeEnvTypeReflection(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): Promise<void>;
|
|
51
|
-
declare function getEnvReflectionsPath(context: EnvPluginContext, name: EnvType): string;
|
|
52
|
-
/**
|
|
53
|
-
* Reads the environment reflection data from the file system.
|
|
54
|
-
*
|
|
55
|
-
* @param context - The plugin context.
|
|
56
|
-
* @returns The environment reflection data.
|
|
57
|
-
*/
|
|
58
|
-
declare function readEnvReflection(context: EnvPluginContext): Promise<ReflectionClass<any>>;
|
|
59
|
-
/**
|
|
60
|
-
* Reads the secret environment reflection data from the file system.
|
|
61
|
-
*
|
|
62
|
-
* @param context - The plugin context.
|
|
63
|
-
* @returns The environment reflection data.
|
|
64
|
-
*/
|
|
65
|
-
declare function readSecretsReflection(context: EnvPluginContext): Promise<ReflectionClass<any>>;
|
|
66
|
-
/**
|
|
67
|
-
* Writes the environment reflection data to the file system.
|
|
68
|
-
*
|
|
69
|
-
* @param context - The plugin context.
|
|
70
|
-
* @param reflection - The reflection data to write.
|
|
71
|
-
* @param name - The name of the reflection (either "env" or "secrets").
|
|
72
|
-
*/
|
|
73
|
-
declare function writeEnvReflection(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): Promise<void>;
|
|
74
|
-
/**
|
|
75
|
-
* Writes the environment reflection data to the file system.
|
|
76
|
-
*
|
|
77
|
-
* @param context - The plugin context.
|
|
78
|
-
* @param reflection - The reflection data to write.
|
|
79
|
-
* @param name - The name of the reflection (either "env" or "secrets").
|
|
80
|
-
*/
|
|
81
|
-
declare function writeEnvReflectionSync(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): void;
|
|
82
|
-
//#endregion
|
|
83
|
-
export { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, readEnvReflection, readEnvTypeReflection, readSecretsReflection, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
|
|
84
|
-
//# sourceMappingURL=persistence.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"persistence.d.cts","names":[],"sources":["../../src/helpers/persistence.ts"],"mappings":";;;;;;;;AAgDA;;;;iBAAsB,sBAAA,CACpB,OAAA,EAAS,iBAAA,GACR,OAAO;;;;AAAA;AAiBV;;iBAAsB,2BAAA,kBACH,iBAAA,CAAA,CACjB,OAAA,EAAS,QAAA,GAAW,OAAA,CAAQ,cAAA;;;;;;iBAYR,+BAAA,kBACH,iBAAA,CAAA,CACjB,OAAA,EAAS,QAAA,GAAW,OAAA,CAAQ,cAAA;;;;;;;;iBAcd,yBAAA,CACd,OAAA,EAAS,gBAAA,EACT,IAAA,GAAM,OAAe;AAlBvB;;;;;;;AAAA,iBA8BsB,qBAAA,CACpB,OAAA,EAAS,gBAAA,EACT,IAAA,GAAM,OAAA,GACL,OAAA,CAAQ,eAAA;;;;;;;;iBAuCW,sBAAA,CACpB,OAAA,EAAS,gBAAA,EACT,UAAA,EAAY,eAAA,OACZ,IAAA,GAAM,OAAA,GAAe,OAAA;AAAA,iBAeP,qBAAA,CACd,OAAA,EAAS,gBAAA,EACT,IAAA,EAAM,OAAO;AA5Ef;;;;;;AAAA,iBAuFsB,iBAAA,CACpB,OAAA,EAAS,gBAAA,GACR,OAAA,CAAQ,eAAA;;;AAvFY;AAYvB;;;iBAkIsB,qBAAA,CACpB,OAAA,EAAS,gBAAA,GACR,OAAA,CAAQ,eAAA;;;;;;;;iBA2DW,kBAAA,CACpB,OAAA,EAAS,gBAAA,EACT,UAAA,EAAY,eAAA,OACZ,IAAA,GAAM,OAAA,GAAe,OAAA;;;;;AA/LG;AAuC1B;;iBA8KgB,sBAAA,CACd,OAAA,EAAS,gBAAA,EACT,UAAA,EAAY,eAAA,OACZ,IAAA,GAAM,OAAA"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { EnvPluginContext, EnvType } from "../types/plugin.mjs";
|
|
2
|
-
import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
|
|
3
|
-
import { UnresolvedContext } from "powerlines";
|
|
4
|
-
import { TypeDefinition } from "@stryke/types/configuration";
|
|
5
|
-
|
|
6
|
-
//#region src/helpers/persistence.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* Resolves the runtime type definition file for the environment variables.
|
|
9
|
-
*
|
|
10
|
-
* @param context - The plugin context.
|
|
11
|
-
* @returns The runtime type definition file for the environment variables.
|
|
12
|
-
*/
|
|
13
|
-
declare function resolveRuntimeTypeFile(context: UnresolvedContext): Promise<string>;
|
|
14
|
-
/**
|
|
15
|
-
* Gets the default type definition for the environment variables.
|
|
16
|
-
*
|
|
17
|
-
* @param context - The plugin context.
|
|
18
|
-
* @returns The default type definition for the environment variables.
|
|
19
|
-
*/
|
|
20
|
-
declare function getEnvDefaultTypeDefinition<TContext extends UnresolvedContext>(context: TContext): Promise<TypeDefinition>;
|
|
21
|
-
/** Gets the default type definition for the environment secrets.
|
|
22
|
-
*
|
|
23
|
-
* @param context - The plugin context.
|
|
24
|
-
* @returns The default type definition for the environment secrets.
|
|
25
|
-
*/
|
|
26
|
-
declare function getSecretsDefaultTypeDefinition<TContext extends UnresolvedContext>(context: TContext): Promise<TypeDefinition>;
|
|
27
|
-
/**
|
|
28
|
-
* Gets the path to the environment type reflections.
|
|
29
|
-
*
|
|
30
|
-
* @param context - The plugin context.
|
|
31
|
-
* @param name - The name of the type reflections.
|
|
32
|
-
* @returns The path to the environment type reflections.
|
|
33
|
-
*/
|
|
34
|
-
declare function getEnvTypeReflectionsPath(context: EnvPluginContext, name?: EnvType): string;
|
|
35
|
-
/**
|
|
36
|
-
* Reads the environment type reflection from the file system.
|
|
37
|
-
*
|
|
38
|
-
* @param context - The plugin context.
|
|
39
|
-
* @param name - The name of the type reflections.
|
|
40
|
-
* @returns The environment type reflection.
|
|
41
|
-
*/
|
|
42
|
-
declare function readEnvTypeReflection(context: EnvPluginContext, name?: EnvType): Promise<ReflectionClass<any>>;
|
|
43
|
-
/**
|
|
44
|
-
* Writes the environment type reflection to the file system.
|
|
45
|
-
*
|
|
46
|
-
* @param context - The plugin context.
|
|
47
|
-
* @param reflection - The environment type reflection to write.
|
|
48
|
-
* @param name - The name of the type reflections.
|
|
49
|
-
*/
|
|
50
|
-
declare function writeEnvTypeReflection(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): Promise<void>;
|
|
51
|
-
declare function getEnvReflectionsPath(context: EnvPluginContext, name: EnvType): string;
|
|
52
|
-
/**
|
|
53
|
-
* Reads the environment reflection data from the file system.
|
|
54
|
-
*
|
|
55
|
-
* @param context - The plugin context.
|
|
56
|
-
* @returns The environment reflection data.
|
|
57
|
-
*/
|
|
58
|
-
declare function readEnvReflection(context: EnvPluginContext): Promise<ReflectionClass<any>>;
|
|
59
|
-
/**
|
|
60
|
-
* Reads the secret environment reflection data from the file system.
|
|
61
|
-
*
|
|
62
|
-
* @param context - The plugin context.
|
|
63
|
-
* @returns The environment reflection data.
|
|
64
|
-
*/
|
|
65
|
-
declare function readSecretsReflection(context: EnvPluginContext): Promise<ReflectionClass<any>>;
|
|
66
|
-
/**
|
|
67
|
-
* Writes the environment reflection data to the file system.
|
|
68
|
-
*
|
|
69
|
-
* @param context - The plugin context.
|
|
70
|
-
* @param reflection - The reflection data to write.
|
|
71
|
-
* @param name - The name of the reflection (either "env" or "secrets").
|
|
72
|
-
*/
|
|
73
|
-
declare function writeEnvReflection(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): Promise<void>;
|
|
74
|
-
/**
|
|
75
|
-
* Writes the environment reflection data to the file system.
|
|
76
|
-
*
|
|
77
|
-
* @param context - The plugin context.
|
|
78
|
-
* @param reflection - The reflection data to write.
|
|
79
|
-
* @param name - The name of the reflection (either "env" or "secrets").
|
|
80
|
-
*/
|
|
81
|
-
declare function writeEnvReflectionSync(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): void;
|
|
82
|
-
//#endregion
|
|
83
|
-
export { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, readEnvReflection, readEnvTypeReflection, readSecretsReflection, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
|
|
84
|
-
//# sourceMappingURL=persistence.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"persistence.d.mts","names":[],"sources":["../../src/helpers/persistence.ts"],"mappings":";;;;;;;;AAgDA;;;;iBAAsB,sBAAA,CACpB,OAAA,EAAS,iBAAA,GACR,OAAO;;;;AAAA;AAiBV;;iBAAsB,2BAAA,kBACH,iBAAA,CAAA,CACjB,OAAA,EAAS,QAAA,GAAW,OAAA,CAAQ,cAAA;;;;;;iBAYR,+BAAA,kBACH,iBAAA,CAAA,CACjB,OAAA,EAAS,QAAA,GAAW,OAAA,CAAQ,cAAA;;;;;;;;iBAcd,yBAAA,CACd,OAAA,EAAS,gBAAA,EACT,IAAA,GAAM,OAAe;AAlBvB;;;;;;;AAAA,iBA8BsB,qBAAA,CACpB,OAAA,EAAS,gBAAA,EACT,IAAA,GAAM,OAAA,GACL,OAAA,CAAQ,eAAA;;;;;;;;iBAuCW,sBAAA,CACpB,OAAA,EAAS,gBAAA,EACT,UAAA,EAAY,eAAA,OACZ,IAAA,GAAM,OAAA,GAAe,OAAA;AAAA,iBAeP,qBAAA,CACd,OAAA,EAAS,gBAAA,EACT,IAAA,EAAM,OAAO;AA5Ef;;;;;;AAAA,iBAuFsB,iBAAA,CACpB,OAAA,EAAS,gBAAA,GACR,OAAA,CAAQ,eAAA;;;AAvFY;AAYvB;;;iBAkIsB,qBAAA,CACpB,OAAA,EAAS,gBAAA,GACR,OAAA,CAAQ,eAAA;;;;;;;;iBA2DW,kBAAA,CACpB,OAAA,EAAS,gBAAA,EACT,UAAA,EAAY,eAAA,OACZ,IAAA,GAAM,OAAA,GAAe,OAAA;;;;;AA/LG;AAuC1B;;iBA8KgB,sBAAA,CACd,OAAA,EAAS,gBAAA,EACT,UAAA,EAAY,eAAA,OACZ,IAAA,GAAM,OAAA"}
|