@lorion-org/runtime-config-node 1.0.0-beta.0
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/LICENSE +21 -0
- package/README.md +200 -0
- package/dist/index.cjs +586 -0
- package/dist/index.d.cts +174 -0
- package/dist/index.d.ts +174 -0
- package/dist/index.js +526 -0
- package/examples/env-assignments.ts +21 -0
- package/examples/load-runtime-config-tree.ts +17 -0
- package/examples/query-runtime-config-tree.ts +53 -0
- package/examples/source-and-scope-files.ts +24 -0
- package/package.json +61 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { ErrorObject, Options } from 'ajv';
|
|
2
|
+
import { ProjectRuntimeConfigEnvVarsOptions, SectionedRuntimeConfig, ConfigVisibility, RuntimeConfigSection, RuntimeConfigFragment, RuntimeEnvVars, RuntimeConfigFragmentMap } from '@lorion-org/runtime-config';
|
|
3
|
+
|
|
4
|
+
type RuntimeConfigPaths = {
|
|
5
|
+
varDir: string;
|
|
6
|
+
runtimeConfigDir: string;
|
|
7
|
+
scopeDir: string;
|
|
8
|
+
filePath: string;
|
|
9
|
+
};
|
|
10
|
+
type RuntimeConfigPathOptions = {
|
|
11
|
+
fileName?: string;
|
|
12
|
+
runtimeConfigDirName?: string;
|
|
13
|
+
};
|
|
14
|
+
type RuntimeConfigSource = RuntimeConfigPathOptions & {
|
|
15
|
+
varDir: string;
|
|
16
|
+
};
|
|
17
|
+
type RuntimeConfigPathPatternSource = {
|
|
18
|
+
paths: string[];
|
|
19
|
+
};
|
|
20
|
+
type RuntimeConfigSourceFile = {
|
|
21
|
+
configPath: string;
|
|
22
|
+
pattern: string;
|
|
23
|
+
scopeId: string;
|
|
24
|
+
};
|
|
25
|
+
type ResolveRuntimeConfigSourceOptions = RuntimeConfigPathOptions & {
|
|
26
|
+
defaultVarDir?: string;
|
|
27
|
+
env?: Record<string, string | undefined>;
|
|
28
|
+
envKey?: string;
|
|
29
|
+
varDir?: string;
|
|
30
|
+
};
|
|
31
|
+
type RuntimeConfigEnvFileOptions = RuntimeConfigPathOptions & ProjectRuntimeConfigEnvVarsOptions;
|
|
32
|
+
type WriteFileOptions = {
|
|
33
|
+
createDir?: boolean;
|
|
34
|
+
};
|
|
35
|
+
type WriteJsonFileOptions = WriteFileOptions & {
|
|
36
|
+
pretty?: boolean;
|
|
37
|
+
};
|
|
38
|
+
type ReadJsonFileOptions<T> = {
|
|
39
|
+
defaultValue?: T;
|
|
40
|
+
onParseError?: (error: unknown, filePath: string) => void;
|
|
41
|
+
};
|
|
42
|
+
type RuntimeConfigSchemaValidationTarget = {
|
|
43
|
+
configPath: string;
|
|
44
|
+
schemaPath: string;
|
|
45
|
+
scopeId: string;
|
|
46
|
+
};
|
|
47
|
+
type RuntimeConfigSchemaValidationErrorFormatter = (target: RuntimeConfigSchemaValidationTarget, validationError: ErrorObject) => Error;
|
|
48
|
+
type ValidateRuntimeConfigSchemaTargetsOptions = {
|
|
49
|
+
ajvOptions?: Options;
|
|
50
|
+
formatError?: RuntimeConfigSchemaValidationErrorFormatter;
|
|
51
|
+
};
|
|
52
|
+
type RuntimeConfigListEntry = {
|
|
53
|
+
contextIds: string[];
|
|
54
|
+
path: string;
|
|
55
|
+
privateKeys: string[];
|
|
56
|
+
publicKeys: string[];
|
|
57
|
+
scopeId: string;
|
|
58
|
+
};
|
|
59
|
+
type RuntimeConfigListOptions = RuntimeConfigPathOptions & {
|
|
60
|
+
contextInputKey?: string;
|
|
61
|
+
};
|
|
62
|
+
type RuntimeConfigListResult = {
|
|
63
|
+
fileName: string;
|
|
64
|
+
scopes: RuntimeConfigListEntry[];
|
|
65
|
+
varDir: string;
|
|
66
|
+
};
|
|
67
|
+
type RuntimeConfigShowResult = {
|
|
68
|
+
config?: RuntimeConfigFragment;
|
|
69
|
+
exists: boolean;
|
|
70
|
+
fileName: string;
|
|
71
|
+
path: string;
|
|
72
|
+
scopeId: string;
|
|
73
|
+
varDir: string;
|
|
74
|
+
};
|
|
75
|
+
type RuntimeConfigProjectOptions = RuntimeConfigPathOptions & {
|
|
76
|
+
contextInputKey?: string;
|
|
77
|
+
contextOutputKey?: string;
|
|
78
|
+
scopeIds?: string[];
|
|
79
|
+
};
|
|
80
|
+
type RuntimeConfigProjectResult = {
|
|
81
|
+
fileName: string;
|
|
82
|
+
runtimeConfig: SectionedRuntimeConfig;
|
|
83
|
+
scopeIds: string[];
|
|
84
|
+
varDir: string;
|
|
85
|
+
};
|
|
86
|
+
type RuntimeConfigValueQueryOptions = RuntimeConfigProjectOptions & {
|
|
87
|
+
contextId?: string;
|
|
88
|
+
visibility?: ConfigVisibility;
|
|
89
|
+
};
|
|
90
|
+
type RuntimeConfigValueResult = {
|
|
91
|
+
contextId?: string;
|
|
92
|
+
exists: boolean;
|
|
93
|
+
fileName: string;
|
|
94
|
+
key: string;
|
|
95
|
+
scopeId: string;
|
|
96
|
+
value?: unknown;
|
|
97
|
+
varDir: string;
|
|
98
|
+
visibility: ConfigVisibility;
|
|
99
|
+
};
|
|
100
|
+
type RuntimeConfigScopeViewOptions = RuntimeConfigProjectOptions & {
|
|
101
|
+
contextId?: string;
|
|
102
|
+
visibility?: ConfigVisibility;
|
|
103
|
+
};
|
|
104
|
+
type RuntimeConfigScopeViewResult = {
|
|
105
|
+
config: RuntimeConfigSection;
|
|
106
|
+
contextId?: string;
|
|
107
|
+
fileName: string;
|
|
108
|
+
scopeId: string;
|
|
109
|
+
varDir: string;
|
|
110
|
+
visibility: ConfigVisibility;
|
|
111
|
+
};
|
|
112
|
+
type RuntimeConfigSchemaTargetInput = {
|
|
113
|
+
cwd?: string;
|
|
114
|
+
scopeId: string;
|
|
115
|
+
};
|
|
116
|
+
type RuntimeConfigValidationEntry = {
|
|
117
|
+
configPath: string;
|
|
118
|
+
schemaPath: string;
|
|
119
|
+
scopeId: string;
|
|
120
|
+
};
|
|
121
|
+
type RuntimeConfigValidationSkippedEntry = {
|
|
122
|
+
configPath?: string;
|
|
123
|
+
reason: 'missing-config' | 'missing-schema' | 'missing-scope-dir';
|
|
124
|
+
schemaPath?: string;
|
|
125
|
+
scopeId: string;
|
|
126
|
+
};
|
|
127
|
+
type ValidateRuntimeConfigScopesOptions = RuntimeConfigPathOptions & {
|
|
128
|
+
formatError?: RuntimeConfigSchemaValidationErrorFormatter;
|
|
129
|
+
schemaFileName?: string;
|
|
130
|
+
};
|
|
131
|
+
type ValidateRuntimeConfigPatternSourceScopesOptions = Pick<ValidateRuntimeConfigScopesOptions, 'formatError' | 'schemaFileName'>;
|
|
132
|
+
type RuntimeConfigValidateResult = {
|
|
133
|
+
fileName: string;
|
|
134
|
+
skipped: RuntimeConfigValidationSkippedEntry[];
|
|
135
|
+
validated: RuntimeConfigValidationEntry[];
|
|
136
|
+
varDir: string;
|
|
137
|
+
};
|
|
138
|
+
declare function ensureParentDir(filePath: string): void;
|
|
139
|
+
declare function readTextFile(filePath: string): string | undefined;
|
|
140
|
+
declare function writeTextFile(filePath: string, data: string, options?: WriteFileOptions): void;
|
|
141
|
+
declare function readJsonFile<T>(filePath: string, options?: ReadJsonFileOptions<T>): T | undefined;
|
|
142
|
+
declare function readRequiredJsonFile<T>(filePath: string): T;
|
|
143
|
+
declare function writeJsonFile(filePath: string, data: unknown, options?: WriteJsonFileOptions): void;
|
|
144
|
+
declare function resolveRuntimeConfigPaths(varDir: string, scopeId: string, options?: RuntimeConfigPathOptions): RuntimeConfigPaths;
|
|
145
|
+
declare function resolveRuntimeConfigSource(options?: ResolveRuntimeConfigSourceOptions): RuntimeConfigSource;
|
|
146
|
+
declare function resolveRuntimeConfigFilePath(varDir: string, scopeId: string, filename: string, options?: RuntimeConfigPathOptions): string;
|
|
147
|
+
declare function resolveRuntimeConfigScopeFilePath(source: RuntimeConfigSource, scopeId: string, fileName: string): string;
|
|
148
|
+
declare function readRuntimeConfigScopeJson<T>(source: RuntimeConfigSource, scopeId: string, fileName: string, options?: ReadJsonFileOptions<T>): T | undefined;
|
|
149
|
+
declare function writeRuntimeConfigScopeJson(source: RuntimeConfigSource, scopeId: string, fileName: string, data: unknown, options?: WriteJsonFileOptions): void;
|
|
150
|
+
declare function resolveRuntimeConfigPublicRootPath(source: RuntimeConfigSource): string;
|
|
151
|
+
declare function resolveRuntimeConfigPublicFilePath(source: RuntimeConfigSource, relativePath: string): string;
|
|
152
|
+
declare function resolveRuntimeConfigSourceFiles(source: RuntimeConfigPathPatternSource): RuntimeConfigSourceFile[];
|
|
153
|
+
declare function loadRuntimeConfigSourceTree(source: RuntimeConfigPathPatternSource): RuntimeConfigFragmentMap;
|
|
154
|
+
declare function resolveRuntimeConfigSourcePublicRootPath(source: RuntimeConfigPathPatternSource): string | undefined;
|
|
155
|
+
declare function listRuntimeConfigScopeFiles(varDir: string, scopeId: string, subdir: string, options?: RuntimeConfigPathOptions & {
|
|
156
|
+
extension?: string;
|
|
157
|
+
}): string[];
|
|
158
|
+
declare function collectRuntimeConfigFragmentFiles(runtimeConfigDir: string, options?: RuntimeConfigPathOptions): string[];
|
|
159
|
+
declare function parseRuntimeConfigFragmentFiles(filePaths: string[], runtimeConfigDir: string, options?: RuntimeConfigPathOptions): RuntimeConfigFragmentMap;
|
|
160
|
+
declare function loadRuntimeConfigFragment(varDir: string, scopeId: string, options?: RuntimeConfigPathOptions): RuntimeConfigFragment | undefined;
|
|
161
|
+
declare function writeRuntimeConfigFragment(varDir: string, scopeId: string, config: RuntimeConfigFragment, options?: RuntimeConfigPathOptions & WriteJsonFileOptions): void;
|
|
162
|
+
declare function validateRuntimeConfigSchemaTargets(targets: RuntimeConfigSchemaValidationTarget[], options?: ValidateRuntimeConfigSchemaTargetsOptions): void;
|
|
163
|
+
declare function loadRuntimeConfigTree(varDir: string, options?: RuntimeConfigPathOptions): RuntimeConfigFragmentMap;
|
|
164
|
+
declare function loadRuntimeConfigEnvVars(varDir: string, options?: RuntimeConfigEnvFileOptions): RuntimeEnvVars;
|
|
165
|
+
declare function loadRuntimeConfigShellAssignments(varDir: string, options?: RuntimeConfigEnvFileOptions): string;
|
|
166
|
+
declare function listRuntimeConfigFragments(varDir: string, options?: RuntimeConfigListOptions): RuntimeConfigListResult;
|
|
167
|
+
declare function showRuntimeConfigFragment(varDir: string, scopeId: string, options?: RuntimeConfigPathOptions): RuntimeConfigShowResult;
|
|
168
|
+
declare function projectRuntimeConfigTree(varDir: string, options?: RuntimeConfigProjectOptions): RuntimeConfigProjectResult;
|
|
169
|
+
declare function getRuntimeConfigValue(varDir: string, scopeId: string, key: string, options?: RuntimeConfigValueQueryOptions): RuntimeConfigValueResult;
|
|
170
|
+
declare function getRuntimeConfigScopeView(varDir: string, scopeId: string, options?: RuntimeConfigScopeViewOptions): RuntimeConfigScopeViewResult;
|
|
171
|
+
declare function validateRuntimeConfigScopes(varDir: string, targets: RuntimeConfigSchemaTargetInput[], options?: ValidateRuntimeConfigScopesOptions): RuntimeConfigValidateResult;
|
|
172
|
+
declare function validateRuntimeConfigSourceScopes(source: RuntimeConfigPathPatternSource, targets: RuntimeConfigSchemaTargetInput[], options?: ValidateRuntimeConfigPatternSourceScopesOptions): RuntimeConfigValidateResult;
|
|
173
|
+
|
|
174
|
+
export { type ReadJsonFileOptions, type ResolveRuntimeConfigSourceOptions, type RuntimeConfigEnvFileOptions, type RuntimeConfigListEntry, type RuntimeConfigListOptions, type RuntimeConfigListResult, type RuntimeConfigPathOptions, type RuntimeConfigPathPatternSource, type RuntimeConfigPaths, type RuntimeConfigProjectOptions, type RuntimeConfigProjectResult, type RuntimeConfigSchemaTargetInput, type RuntimeConfigSchemaValidationErrorFormatter, type RuntimeConfigSchemaValidationTarget, type RuntimeConfigScopeViewOptions, type RuntimeConfigScopeViewResult, type RuntimeConfigShowResult, type RuntimeConfigSource, type RuntimeConfigSourceFile, type RuntimeConfigValidateResult, type RuntimeConfigValidationEntry, type RuntimeConfigValidationSkippedEntry, type RuntimeConfigValueQueryOptions, type RuntimeConfigValueResult, type ValidateRuntimeConfigPatternSourceScopesOptions, type ValidateRuntimeConfigSchemaTargetsOptions, type ValidateRuntimeConfigScopesOptions, type WriteFileOptions, type WriteJsonFileOptions, collectRuntimeConfigFragmentFiles, ensureParentDir, getRuntimeConfigScopeView, getRuntimeConfigValue, listRuntimeConfigFragments, listRuntimeConfigScopeFiles, loadRuntimeConfigEnvVars, loadRuntimeConfigFragment, loadRuntimeConfigShellAssignments, loadRuntimeConfigSourceTree, loadRuntimeConfigTree, parseRuntimeConfigFragmentFiles, projectRuntimeConfigTree, readJsonFile, readRequiredJsonFile, readRuntimeConfigScopeJson, readTextFile, resolveRuntimeConfigFilePath, resolveRuntimeConfigPaths, resolveRuntimeConfigPublicFilePath, resolveRuntimeConfigPublicRootPath, resolveRuntimeConfigScopeFilePath, resolveRuntimeConfigSource, resolveRuntimeConfigSourceFiles, resolveRuntimeConfigSourcePublicRootPath, showRuntimeConfigFragment, validateRuntimeConfigSchemaTargets, validateRuntimeConfigScopes, validateRuntimeConfigSourceScopes, writeJsonFile, writeRuntimeConfigFragment, writeRuntimeConfigScopeJson, writeTextFile };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { ErrorObject, Options } from 'ajv';
|
|
2
|
+
import { ProjectRuntimeConfigEnvVarsOptions, SectionedRuntimeConfig, ConfigVisibility, RuntimeConfigSection, RuntimeConfigFragment, RuntimeEnvVars, RuntimeConfigFragmentMap } from '@lorion-org/runtime-config';
|
|
3
|
+
|
|
4
|
+
type RuntimeConfigPaths = {
|
|
5
|
+
varDir: string;
|
|
6
|
+
runtimeConfigDir: string;
|
|
7
|
+
scopeDir: string;
|
|
8
|
+
filePath: string;
|
|
9
|
+
};
|
|
10
|
+
type RuntimeConfigPathOptions = {
|
|
11
|
+
fileName?: string;
|
|
12
|
+
runtimeConfigDirName?: string;
|
|
13
|
+
};
|
|
14
|
+
type RuntimeConfigSource = RuntimeConfigPathOptions & {
|
|
15
|
+
varDir: string;
|
|
16
|
+
};
|
|
17
|
+
type RuntimeConfigPathPatternSource = {
|
|
18
|
+
paths: string[];
|
|
19
|
+
};
|
|
20
|
+
type RuntimeConfigSourceFile = {
|
|
21
|
+
configPath: string;
|
|
22
|
+
pattern: string;
|
|
23
|
+
scopeId: string;
|
|
24
|
+
};
|
|
25
|
+
type ResolveRuntimeConfigSourceOptions = RuntimeConfigPathOptions & {
|
|
26
|
+
defaultVarDir?: string;
|
|
27
|
+
env?: Record<string, string | undefined>;
|
|
28
|
+
envKey?: string;
|
|
29
|
+
varDir?: string;
|
|
30
|
+
};
|
|
31
|
+
type RuntimeConfigEnvFileOptions = RuntimeConfigPathOptions & ProjectRuntimeConfigEnvVarsOptions;
|
|
32
|
+
type WriteFileOptions = {
|
|
33
|
+
createDir?: boolean;
|
|
34
|
+
};
|
|
35
|
+
type WriteJsonFileOptions = WriteFileOptions & {
|
|
36
|
+
pretty?: boolean;
|
|
37
|
+
};
|
|
38
|
+
type ReadJsonFileOptions<T> = {
|
|
39
|
+
defaultValue?: T;
|
|
40
|
+
onParseError?: (error: unknown, filePath: string) => void;
|
|
41
|
+
};
|
|
42
|
+
type RuntimeConfigSchemaValidationTarget = {
|
|
43
|
+
configPath: string;
|
|
44
|
+
schemaPath: string;
|
|
45
|
+
scopeId: string;
|
|
46
|
+
};
|
|
47
|
+
type RuntimeConfigSchemaValidationErrorFormatter = (target: RuntimeConfigSchemaValidationTarget, validationError: ErrorObject) => Error;
|
|
48
|
+
type ValidateRuntimeConfigSchemaTargetsOptions = {
|
|
49
|
+
ajvOptions?: Options;
|
|
50
|
+
formatError?: RuntimeConfigSchemaValidationErrorFormatter;
|
|
51
|
+
};
|
|
52
|
+
type RuntimeConfigListEntry = {
|
|
53
|
+
contextIds: string[];
|
|
54
|
+
path: string;
|
|
55
|
+
privateKeys: string[];
|
|
56
|
+
publicKeys: string[];
|
|
57
|
+
scopeId: string;
|
|
58
|
+
};
|
|
59
|
+
type RuntimeConfigListOptions = RuntimeConfigPathOptions & {
|
|
60
|
+
contextInputKey?: string;
|
|
61
|
+
};
|
|
62
|
+
type RuntimeConfigListResult = {
|
|
63
|
+
fileName: string;
|
|
64
|
+
scopes: RuntimeConfigListEntry[];
|
|
65
|
+
varDir: string;
|
|
66
|
+
};
|
|
67
|
+
type RuntimeConfigShowResult = {
|
|
68
|
+
config?: RuntimeConfigFragment;
|
|
69
|
+
exists: boolean;
|
|
70
|
+
fileName: string;
|
|
71
|
+
path: string;
|
|
72
|
+
scopeId: string;
|
|
73
|
+
varDir: string;
|
|
74
|
+
};
|
|
75
|
+
type RuntimeConfigProjectOptions = RuntimeConfigPathOptions & {
|
|
76
|
+
contextInputKey?: string;
|
|
77
|
+
contextOutputKey?: string;
|
|
78
|
+
scopeIds?: string[];
|
|
79
|
+
};
|
|
80
|
+
type RuntimeConfigProjectResult = {
|
|
81
|
+
fileName: string;
|
|
82
|
+
runtimeConfig: SectionedRuntimeConfig;
|
|
83
|
+
scopeIds: string[];
|
|
84
|
+
varDir: string;
|
|
85
|
+
};
|
|
86
|
+
type RuntimeConfigValueQueryOptions = RuntimeConfigProjectOptions & {
|
|
87
|
+
contextId?: string;
|
|
88
|
+
visibility?: ConfigVisibility;
|
|
89
|
+
};
|
|
90
|
+
type RuntimeConfigValueResult = {
|
|
91
|
+
contextId?: string;
|
|
92
|
+
exists: boolean;
|
|
93
|
+
fileName: string;
|
|
94
|
+
key: string;
|
|
95
|
+
scopeId: string;
|
|
96
|
+
value?: unknown;
|
|
97
|
+
varDir: string;
|
|
98
|
+
visibility: ConfigVisibility;
|
|
99
|
+
};
|
|
100
|
+
type RuntimeConfigScopeViewOptions = RuntimeConfigProjectOptions & {
|
|
101
|
+
contextId?: string;
|
|
102
|
+
visibility?: ConfigVisibility;
|
|
103
|
+
};
|
|
104
|
+
type RuntimeConfigScopeViewResult = {
|
|
105
|
+
config: RuntimeConfigSection;
|
|
106
|
+
contextId?: string;
|
|
107
|
+
fileName: string;
|
|
108
|
+
scopeId: string;
|
|
109
|
+
varDir: string;
|
|
110
|
+
visibility: ConfigVisibility;
|
|
111
|
+
};
|
|
112
|
+
type RuntimeConfigSchemaTargetInput = {
|
|
113
|
+
cwd?: string;
|
|
114
|
+
scopeId: string;
|
|
115
|
+
};
|
|
116
|
+
type RuntimeConfigValidationEntry = {
|
|
117
|
+
configPath: string;
|
|
118
|
+
schemaPath: string;
|
|
119
|
+
scopeId: string;
|
|
120
|
+
};
|
|
121
|
+
type RuntimeConfigValidationSkippedEntry = {
|
|
122
|
+
configPath?: string;
|
|
123
|
+
reason: 'missing-config' | 'missing-schema' | 'missing-scope-dir';
|
|
124
|
+
schemaPath?: string;
|
|
125
|
+
scopeId: string;
|
|
126
|
+
};
|
|
127
|
+
type ValidateRuntimeConfigScopesOptions = RuntimeConfigPathOptions & {
|
|
128
|
+
formatError?: RuntimeConfigSchemaValidationErrorFormatter;
|
|
129
|
+
schemaFileName?: string;
|
|
130
|
+
};
|
|
131
|
+
type ValidateRuntimeConfigPatternSourceScopesOptions = Pick<ValidateRuntimeConfigScopesOptions, 'formatError' | 'schemaFileName'>;
|
|
132
|
+
type RuntimeConfigValidateResult = {
|
|
133
|
+
fileName: string;
|
|
134
|
+
skipped: RuntimeConfigValidationSkippedEntry[];
|
|
135
|
+
validated: RuntimeConfigValidationEntry[];
|
|
136
|
+
varDir: string;
|
|
137
|
+
};
|
|
138
|
+
declare function ensureParentDir(filePath: string): void;
|
|
139
|
+
declare function readTextFile(filePath: string): string | undefined;
|
|
140
|
+
declare function writeTextFile(filePath: string, data: string, options?: WriteFileOptions): void;
|
|
141
|
+
declare function readJsonFile<T>(filePath: string, options?: ReadJsonFileOptions<T>): T | undefined;
|
|
142
|
+
declare function readRequiredJsonFile<T>(filePath: string): T;
|
|
143
|
+
declare function writeJsonFile(filePath: string, data: unknown, options?: WriteJsonFileOptions): void;
|
|
144
|
+
declare function resolveRuntimeConfigPaths(varDir: string, scopeId: string, options?: RuntimeConfigPathOptions): RuntimeConfigPaths;
|
|
145
|
+
declare function resolveRuntimeConfigSource(options?: ResolveRuntimeConfigSourceOptions): RuntimeConfigSource;
|
|
146
|
+
declare function resolveRuntimeConfigFilePath(varDir: string, scopeId: string, filename: string, options?: RuntimeConfigPathOptions): string;
|
|
147
|
+
declare function resolveRuntimeConfigScopeFilePath(source: RuntimeConfigSource, scopeId: string, fileName: string): string;
|
|
148
|
+
declare function readRuntimeConfigScopeJson<T>(source: RuntimeConfigSource, scopeId: string, fileName: string, options?: ReadJsonFileOptions<T>): T | undefined;
|
|
149
|
+
declare function writeRuntimeConfigScopeJson(source: RuntimeConfigSource, scopeId: string, fileName: string, data: unknown, options?: WriteJsonFileOptions): void;
|
|
150
|
+
declare function resolveRuntimeConfigPublicRootPath(source: RuntimeConfigSource): string;
|
|
151
|
+
declare function resolveRuntimeConfigPublicFilePath(source: RuntimeConfigSource, relativePath: string): string;
|
|
152
|
+
declare function resolveRuntimeConfigSourceFiles(source: RuntimeConfigPathPatternSource): RuntimeConfigSourceFile[];
|
|
153
|
+
declare function loadRuntimeConfigSourceTree(source: RuntimeConfigPathPatternSource): RuntimeConfigFragmentMap;
|
|
154
|
+
declare function resolveRuntimeConfigSourcePublicRootPath(source: RuntimeConfigPathPatternSource): string | undefined;
|
|
155
|
+
declare function listRuntimeConfigScopeFiles(varDir: string, scopeId: string, subdir: string, options?: RuntimeConfigPathOptions & {
|
|
156
|
+
extension?: string;
|
|
157
|
+
}): string[];
|
|
158
|
+
declare function collectRuntimeConfigFragmentFiles(runtimeConfigDir: string, options?: RuntimeConfigPathOptions): string[];
|
|
159
|
+
declare function parseRuntimeConfigFragmentFiles(filePaths: string[], runtimeConfigDir: string, options?: RuntimeConfigPathOptions): RuntimeConfigFragmentMap;
|
|
160
|
+
declare function loadRuntimeConfigFragment(varDir: string, scopeId: string, options?: RuntimeConfigPathOptions): RuntimeConfigFragment | undefined;
|
|
161
|
+
declare function writeRuntimeConfigFragment(varDir: string, scopeId: string, config: RuntimeConfigFragment, options?: RuntimeConfigPathOptions & WriteJsonFileOptions): void;
|
|
162
|
+
declare function validateRuntimeConfigSchemaTargets(targets: RuntimeConfigSchemaValidationTarget[], options?: ValidateRuntimeConfigSchemaTargetsOptions): void;
|
|
163
|
+
declare function loadRuntimeConfigTree(varDir: string, options?: RuntimeConfigPathOptions): RuntimeConfigFragmentMap;
|
|
164
|
+
declare function loadRuntimeConfigEnvVars(varDir: string, options?: RuntimeConfigEnvFileOptions): RuntimeEnvVars;
|
|
165
|
+
declare function loadRuntimeConfigShellAssignments(varDir: string, options?: RuntimeConfigEnvFileOptions): string;
|
|
166
|
+
declare function listRuntimeConfigFragments(varDir: string, options?: RuntimeConfigListOptions): RuntimeConfigListResult;
|
|
167
|
+
declare function showRuntimeConfigFragment(varDir: string, scopeId: string, options?: RuntimeConfigPathOptions): RuntimeConfigShowResult;
|
|
168
|
+
declare function projectRuntimeConfigTree(varDir: string, options?: RuntimeConfigProjectOptions): RuntimeConfigProjectResult;
|
|
169
|
+
declare function getRuntimeConfigValue(varDir: string, scopeId: string, key: string, options?: RuntimeConfigValueQueryOptions): RuntimeConfigValueResult;
|
|
170
|
+
declare function getRuntimeConfigScopeView(varDir: string, scopeId: string, options?: RuntimeConfigScopeViewOptions): RuntimeConfigScopeViewResult;
|
|
171
|
+
declare function validateRuntimeConfigScopes(varDir: string, targets: RuntimeConfigSchemaTargetInput[], options?: ValidateRuntimeConfigScopesOptions): RuntimeConfigValidateResult;
|
|
172
|
+
declare function validateRuntimeConfigSourceScopes(source: RuntimeConfigPathPatternSource, targets: RuntimeConfigSchemaTargetInput[], options?: ValidateRuntimeConfigPatternSourceScopesOptions): RuntimeConfigValidateResult;
|
|
173
|
+
|
|
174
|
+
export { type ReadJsonFileOptions, type ResolveRuntimeConfigSourceOptions, type RuntimeConfigEnvFileOptions, type RuntimeConfigListEntry, type RuntimeConfigListOptions, type RuntimeConfigListResult, type RuntimeConfigPathOptions, type RuntimeConfigPathPatternSource, type RuntimeConfigPaths, type RuntimeConfigProjectOptions, type RuntimeConfigProjectResult, type RuntimeConfigSchemaTargetInput, type RuntimeConfigSchemaValidationErrorFormatter, type RuntimeConfigSchemaValidationTarget, type RuntimeConfigScopeViewOptions, type RuntimeConfigScopeViewResult, type RuntimeConfigShowResult, type RuntimeConfigSource, type RuntimeConfigSourceFile, type RuntimeConfigValidateResult, type RuntimeConfigValidationEntry, type RuntimeConfigValidationSkippedEntry, type RuntimeConfigValueQueryOptions, type RuntimeConfigValueResult, type ValidateRuntimeConfigPatternSourceScopesOptions, type ValidateRuntimeConfigSchemaTargetsOptions, type ValidateRuntimeConfigScopesOptions, type WriteFileOptions, type WriteJsonFileOptions, collectRuntimeConfigFragmentFiles, ensureParentDir, getRuntimeConfigScopeView, getRuntimeConfigValue, listRuntimeConfigFragments, listRuntimeConfigScopeFiles, loadRuntimeConfigEnvVars, loadRuntimeConfigFragment, loadRuntimeConfigShellAssignments, loadRuntimeConfigSourceTree, loadRuntimeConfigTree, parseRuntimeConfigFragmentFiles, projectRuntimeConfigTree, readJsonFile, readRequiredJsonFile, readRuntimeConfigScopeJson, readTextFile, resolveRuntimeConfigFilePath, resolveRuntimeConfigPaths, resolveRuntimeConfigPublicFilePath, resolveRuntimeConfigPublicRootPath, resolveRuntimeConfigScopeFilePath, resolveRuntimeConfigSource, resolveRuntimeConfigSourceFiles, resolveRuntimeConfigSourcePublicRootPath, showRuntimeConfigFragment, validateRuntimeConfigSchemaTargets, validateRuntimeConfigScopes, validateRuntimeConfigSourceScopes, writeJsonFile, writeRuntimeConfigFragment, writeRuntimeConfigScopeJson, writeTextFile };
|