configorama 1.1.0 → 1.2.1
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/README.md +10 -1
- package/cli.js +14 -1
- package/package.json +9 -4
- package/plugins/onepassword/index.js +15 -4
- package/plugins/onepassword/normalize.js +13 -1
- package/src/errors.js +3 -0
- package/src/index.js +19 -0
- package/src/main.js +18 -29
- package/src/utils/parsing/detectFormat.js +70 -0
- package/src/utils/parsing/detectFormat.test.js +68 -0
- package/src/utils/parsing/parse.js +1 -35
- package/src/utils/setup/applyAnswers.js +41 -0
- package/src/utils/setup/setupEngine.js +85 -0
- package/src/utils/setup/stdoutRedirect.js +48 -0
- package/src/utils/setup/writeAnswers.js +50 -0
- package/src/utils/setup/writeDotenv.js +142 -0
- package/src/utils/ui/configWizard.js +20 -1
- package/types/src/capabilities.d.ts +8 -0
- package/types/src/capabilities.d.ts.map +1 -0
- package/types/src/display.d.ts +62 -0
- package/types/src/display.d.ts.map +1 -0
- package/types/src/errors.d.ts +20 -0
- package/types/src/errors.d.ts.map +1 -0
- package/types/src/index.d.ts +119 -0
- package/types/src/index.d.ts.map +1 -1
- package/types/src/main.d.ts +23 -16
- package/types/src/main.d.ts.map +1 -1
- package/types/src/metadata.d.ts +28 -0
- package/types/src/metadata.d.ts.map +1 -0
- package/types/src/parsers/dotenv.d.ts +6 -0
- package/types/src/parsers/dotenv.d.ts.map +1 -0
- package/types/src/parsers/esm.d.ts.map +1 -1
- package/types/src/parsers/typescript.d.ts.map +1 -1
- package/types/src/resolvers/valueFromCron.d.ts.map +1 -1
- package/types/src/resolvers/valueFromEval.d.ts.map +1 -1
- package/types/src/resolvers/valueFromFile.d.ts +4 -0
- package/types/src/resolvers/valueFromFile.d.ts.map +1 -1
- package/types/src/resolvers/valueFromGit.d.ts.map +1 -1
- package/types/src/resolvers/valueFromOptions.d.ts +1 -0
- package/types/src/resolvers/valueFromOptions.d.ts.map +1 -1
- package/types/src/sync.d.ts.map +1 -1
- package/types/src/utils/BoundedMap.d.ts +10 -0
- package/types/src/utils/BoundedMap.d.ts.map +1 -0
- package/types/src/utils/PromiseTracker.d.ts +1 -1
- package/types/src/utils/PromiseTracker.d.ts.map +1 -1
- package/types/src/utils/filters/filterArgs.d.ts +13 -0
- package/types/src/utils/filters/filterArgs.d.ts.map +1 -0
- package/types/src/utils/filters/oneOf.d.ts +7 -0
- package/types/src/utils/filters/oneOf.d.ts.map +1 -0
- package/types/src/utils/introspection/audit.d.ts +14 -0
- package/types/src/utils/introspection/audit.d.ts.map +1 -0
- package/types/src/utils/introspection/graph.d.ts +4 -0
- package/types/src/utils/introspection/graph.d.ts.map +1 -0
- package/types/src/utils/introspection/model.d.ts +43 -0
- package/types/src/utils/introspection/model.d.ts.map +1 -0
- package/types/src/utils/parsing/commentAnnotations.d.ts +18 -0
- package/types/src/utils/parsing/commentAnnotations.d.ts.map +1 -0
- package/types/src/utils/parsing/detectFormat.d.ts +17 -0
- package/types/src/utils/parsing/detectFormat.d.ts.map +1 -0
- package/types/src/utils/parsing/enrichMetadata.d.ts.map +1 -1
- package/types/src/utils/parsing/extractComment.d.ts +20 -0
- package/types/src/utils/parsing/extractComment.d.ts.map +1 -0
- package/types/src/utils/parsing/parse.d.ts.map +1 -1
- package/types/src/utils/parsing/preProcess.d.ts.map +1 -1
- package/types/src/utils/paths/fileType.d.ts +15 -0
- package/types/src/utils/paths/fileType.d.ts.map +1 -0
- package/types/src/utils/paths/findLineForKey.d.ts +9 -0
- package/types/src/utils/paths/findLineForKey.d.ts.map +1 -1
- package/types/src/utils/paths/ignorePaths.d.ts +5 -0
- package/types/src/utils/paths/ignorePaths.d.ts.map +1 -0
- package/types/src/utils/redaction/redact.d.ts +10 -0
- package/types/src/utils/redaction/redact.d.ts.map +1 -0
- package/types/src/utils/redaction/setupRedaction.d.ts +5 -0
- package/types/src/utils/redaction/setupRedaction.d.ts.map +1 -0
- package/types/src/utils/requirements/configRequirements.d.ts +70 -0
- package/types/src/utils/requirements/configRequirements.d.ts.map +1 -0
- package/types/src/utils/requirements/serializeRequirements.d.ts +63 -0
- package/types/src/utils/requirements/serializeRequirements.d.ts.map +1 -0
- package/types/src/utils/security/dotenvFileRefs.d.ts +13 -0
- package/types/src/utils/security/dotenvFileRefs.d.ts.map +1 -0
- package/types/src/utils/security/evalSafety.d.ts +17 -0
- package/types/src/utils/security/evalSafety.d.ts.map +1 -0
- package/types/src/utils/security/safetyPolicy.d.ts +15 -0
- package/types/src/utils/security/safetyPolicy.d.ts.map +1 -0
- package/types/src/utils/setup/applyAnswers.d.ts +34 -0
- package/types/src/utils/setup/applyAnswers.d.ts.map +1 -0
- package/types/src/utils/setup/setupEngine.d.ts +89 -0
- package/types/src/utils/setup/setupEngine.d.ts.map +1 -0
- package/types/src/utils/setup/stdoutRedirect.d.ts +10 -0
- package/types/src/utils/setup/stdoutRedirect.d.ts.map +1 -0
- package/types/src/utils/setup/writeAnswers.d.ts +17 -0
- package/types/src/utils/setup/writeAnswers.d.ts.map +1 -0
- package/types/src/utils/setup/writeDotenv.d.ts +27 -0
- package/types/src/utils/setup/writeDotenv.d.ts.map +1 -0
- package/types/src/utils/strings/didYouMean.d.ts +23 -0
- package/types/src/utils/strings/didYouMean.d.ts.map +1 -0
- package/types/src/utils/strings/formatFunctionArgs.d.ts.map +1 -1
- package/types/src/utils/strings/replaceAll.d.ts.map +1 -1
- package/types/src/utils/strings/splitByComma.d.ts.map +1 -1
- package/types/src/utils/ui/configWizard.d.ts +51 -7
- package/types/src/utils/ui/configWizard.d.ts.map +1 -1
- package/types/src/utils/ui/createEditorLink.d.ts +7 -0
- package/types/src/utils/ui/createEditorLink.d.ts.map +1 -1
- package/types/src/utils/ui/promptDescriptors.d.ts +39 -0
- package/types/src/utils/ui/promptDescriptors.d.ts.map +1 -0
- package/types/src/utils/variables/cleanVariable.d.ts.map +1 -1
- package/types/src/utils/variables/getVariableType.d.ts.map +1 -1
- package/types/src/utils/variables/variableUtils.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valueFromFile.d.ts","sourceRoot":"","sources":["../../../src/resolvers/valueFromFile.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"valueFromFile.d.ts","sourceRoot":"","sources":["../../../src/resolvers/valueFromFile.js"],"names":[],"mappings":"AAoGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,sCAnBG;IAAoB,UAAU,EAAtB,MAAM;IACK,aAAa;IACZ,cAAc,EAA1B,MAAM;IACM,mBAAmB,EAA/B,MAAM;IACM,aAAa,EAAzB,MAAM;IACM,IAAI,EAAhB,MAAM;IACM,cAAc,EAA1B,MAAM;IACM,MAAM,EAAlB,MAAM;IACQ,cAAc;IAChB,aAAa,EAAzB,MAAM;IACM,aAAa,EAAzB,MAAM;IACM,SAAS,EAArB,MAAM;IACM,SAAS,EAArB,MAAM;IACoB,gBAAgB,GAA1C,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IACN,YAAY,GAAzB,MAAM;CACd,kBAAQ,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,GAAG,CAAC,CA6WxB;AA/ZD;;;;;GAKG;AACH,2CAJW,MAAM,YACN,MAAM,GACJ,GAAC,CAoBb;AAyYD;;;;;;GAMG;AACH,qDAJW,MAAM,qBACN,MAAM,GACJ;IAAE,aAAa,EAAE,MAAM,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,GAAC,IAAI,CAAA;CAAE,CAkBhE;AAED;;;;;;GAMG;AACH,sDALW,MAAM,qBACN,MAAM,yBACN,OAAO,GACL,MAAM,EAAE,CAcpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valueFromGit.d.ts","sourceRoot":"","sources":["../../../src/resolvers/valueFromGit.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"valueFromGit.d.ts","sourceRoot":"","sources":["../../../src/resolvers/valueFromGit.js"],"names":[],"mappings":"AAsZiB;;;;;;;;EAUhB"}
|
|
@@ -3,6 +3,7 @@ declare function getValueFromOptions(variableString: any, options: any): Promise
|
|
|
3
3
|
export declare let type: string;
|
|
4
4
|
export declare let source: string;
|
|
5
5
|
export declare let prefix: string;
|
|
6
|
+
export declare let prefixes: string[];
|
|
6
7
|
export declare let syntax: string;
|
|
7
8
|
export declare let description: string;
|
|
8
9
|
export { optRefSyntax as match, getValueFromOptions as resolver };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valueFromOptions.d.ts","sourceRoot":"","sources":["../../../src/resolvers/valueFromOptions.js"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"valueFromOptions.d.ts","sourceRoot":"","sources":["../../../src/resolvers/valueFromOptions.js"],"names":[],"mappings":"AAEA,mCAAgD;AAEhD,sFAIC"}
|
package/types/src/sync.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/sync.js"],"names":[],"mappings":"AASiB,
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/sync.js"],"names":[],"mappings":"AASiB,qDA+CD,SAAI,kBAoDnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoundedMap.d.ts","sourceRoot":"","sources":["../../../src/utils/BoundedMap.js"],"names":[],"mappings":";AAGA;IACE,8BAGC;IAFC,oBAAqB;IACrB,iBAAuB;IAEzB,mBAEC;IACD,uBAEC;IACD,gCAOC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromiseTracker.d.ts","sourceRoot":"","sources":["../../../src/utils/PromiseTracker.js"],"names":[],"mappings":";AAGA;IAIE,cAOC;IANC,mBAAqB;IACrB,eAAoB;IAEpB,oBAAyB;IACzB,kBAA2B;IAC3B,eAAe;IAEjB,
|
|
1
|
+
{"version":3,"file":"PromiseTracker.d.ts","sourceRoot":"","sources":["../../../src/utils/PromiseTracker.js"],"names":[],"mappings":";AAGA;IAIE,cAOC;IANC,mBAAqB;IACrB,eAAoB;IAEpB,oBAAyB;IACzB,kBAA2B;IAC3B,eAAe;IAEjB,sCAOC;IAFG,yBAAyD;IAG7D,eAuBC;IACD,aAIC;IACD,uFA+BC;IACD,iCAEC;IACD,wCAIC;IAED,wCAKC;IAED,8CAqBC;IAED,wCAoBC;IACD,oBAEC;IACD,oBAEC;IACD,gBAEC;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export class ResolvedFilterArg {
|
|
2
|
+
constructor(value: any);
|
|
3
|
+
value: any;
|
|
4
|
+
__resolvedFilterArg: boolean;
|
|
5
|
+
toString(): string;
|
|
6
|
+
valueOf(): any;
|
|
7
|
+
}
|
|
8
|
+
export function decodeFilterArg(value: any): any;
|
|
9
|
+
export function encodeFilterArg(value: any): string;
|
|
10
|
+
export function isEncodedFilterArg(value: any): boolean;
|
|
11
|
+
export function isResolvedFilterArg(value: any): boolean;
|
|
12
|
+
export function unwrapFilterArg(value: any): any;
|
|
13
|
+
//# sourceMappingURL=filterArgs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterArgs.d.ts","sourceRoot":"","sources":["../../../../src/utils/filters/filterArgs.js"],"names":[],"mappings":"AAEA;IACE,wBAGC;IAFC,WAAkB;IAClB,6BAA+B;IAGjC,mBAEC;IAED,eAEC;CACF;AAoBD,iDAIC;AAZD,oDAEC;AAED,wDAEC;AAQD,yDAEC;AAED,iDAEC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function parseOneOfFilter(filter: any): {
|
|
2
|
+
dynamic: boolean;
|
|
3
|
+
allowedValues: string[];
|
|
4
|
+
};
|
|
5
|
+
export function parseOneOfLiteral(rawValue: any): string | number;
|
|
6
|
+
export function validateOneOf(value: any, ...rawArgs: any[]): any;
|
|
7
|
+
//# sourceMappingURL=oneOf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oneOf.d.ts","sourceRoot":"","sources":["../../../../src/utils/filters/oneOf.js"],"names":[],"mappings":"AA0BA;;;EAmBC;AA3BD,kEAMC;AAuBD,kEAuBC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function buildAuditReport(introspection: any, options?: {}): {
|
|
2
|
+
schemaVersion: number;
|
|
3
|
+
safeMode: boolean;
|
|
4
|
+
findings: any[];
|
|
5
|
+
diagnostics: any;
|
|
6
|
+
summary: {
|
|
7
|
+
high: number;
|
|
8
|
+
medium: number;
|
|
9
|
+
low: number;
|
|
10
|
+
info: number;
|
|
11
|
+
total: number;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../../src/utils/introspection/audit.js"],"names":[],"mappings":"AASA;;;;;;;;;;;;EAyDC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../../src/utils/introspection/graph.js"],"names":[],"mappings":"AA+BA,iEAKC;AAjBD,0CAUC;AAzBD,8CASC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export const SCHEMA_VERSION: 1;
|
|
2
|
+
export function buildIntrospection(enrichedMetadata?: {}, options?: {}): {
|
|
3
|
+
schemaVersion: number;
|
|
4
|
+
nodes: ({
|
|
5
|
+
id: string;
|
|
6
|
+
kind: string;
|
|
7
|
+
variable: any;
|
|
8
|
+
variableType: any;
|
|
9
|
+
sourceClass: any;
|
|
10
|
+
risk: string;
|
|
11
|
+
severity: string;
|
|
12
|
+
paths: any[];
|
|
13
|
+
sensitive: boolean;
|
|
14
|
+
} | {
|
|
15
|
+
id: string;
|
|
16
|
+
kind: string;
|
|
17
|
+
path: any;
|
|
18
|
+
relativePath: any;
|
|
19
|
+
exists: any;
|
|
20
|
+
risk: string;
|
|
21
|
+
severity: string;
|
|
22
|
+
})[];
|
|
23
|
+
edges: {
|
|
24
|
+
from: string;
|
|
25
|
+
to: string;
|
|
26
|
+
kind: string;
|
|
27
|
+
}[];
|
|
28
|
+
diagnostics: {
|
|
29
|
+
code: string;
|
|
30
|
+
severity: string;
|
|
31
|
+
variable: any;
|
|
32
|
+
message: string;
|
|
33
|
+
}[];
|
|
34
|
+
summary: {
|
|
35
|
+
nodes: number;
|
|
36
|
+
edges: number;
|
|
37
|
+
diagnostics: number;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export function normalizeVariableType(type: any): any;
|
|
41
|
+
export function riskForVariable(variableType: any, variable: any): "none" | "data_flow_expression" | "process_spawn" | "executable_code" | "local_file_read";
|
|
42
|
+
export function severityForRisk(risk: any): "info" | "high" | "medium" | "low";
|
|
43
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../src/utils/introspection/model.js"],"names":[],"mappings":"AAKA,6BAAuB,CAAC,CAAA;AA2DxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2GC;AAxJD,sDAKC;AAED,6JAUC;AAED,+EAKC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const KNOWN_TAGS: Set<string>;
|
|
2
|
+
export function parseCommentAnnotations(input: any): {
|
|
3
|
+
plainText: string;
|
|
4
|
+
tags: {};
|
|
5
|
+
annotations: {
|
|
6
|
+
description: string;
|
|
7
|
+
obtainHint: string;
|
|
8
|
+
examples: string[];
|
|
9
|
+
defaultHint: string;
|
|
10
|
+
sensitive: boolean;
|
|
11
|
+
group: string;
|
|
12
|
+
deprecationMessage: string;
|
|
13
|
+
};
|
|
14
|
+
description: any;
|
|
15
|
+
descriptionSource: string;
|
|
16
|
+
};
|
|
17
|
+
export function parseSensitive(value: any): boolean;
|
|
18
|
+
//# sourceMappingURL=commentAnnotations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commentAnnotations.d.ts","sourceRoot":"","sources":["../../../../src/utils/parsing/commentAnnotations.js"],"names":[],"mappings":"AAAA,qCAQE;AA0DF;;;;;;;;;;;;;;EAkCC;AAnED,oDAMC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detect config format from file contents when the extension is missing or
|
|
3
|
+
* unrecognized.
|
|
4
|
+
* @param {string} contents - Raw file contents
|
|
5
|
+
* @returns {string} Detected file extension (e.g. '.json', '.yml', '.toml', '.env')
|
|
6
|
+
*/
|
|
7
|
+
export function detectFormat(contents: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Whether every meaningful line is a flat KEY=VALUE assignment (dotenv shape).
|
|
10
|
+
* Deliberately variable-syntax-agnostic: it inspects line structure, not the
|
|
11
|
+
* variable delimiters, so it works whether a config uses ${...}, $[...], or a
|
|
12
|
+
* custom syntax. Blank lines and #/; comments are ignored.
|
|
13
|
+
* @param {string} text - Trimmed file contents
|
|
14
|
+
* @returns {boolean} True for flat key=value content with no YAML/TOML structure
|
|
15
|
+
*/
|
|
16
|
+
export function isFlatKeyValue(text: string): boolean;
|
|
17
|
+
//# sourceMappingURL=detectFormat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detectFormat.d.ts","sourceRoot":"","sources":["../../../../src/utils/parsing/detectFormat.js"],"names":[],"mappings":"AA6BA;;;;;GAKG;AACH,uCAHW,MAAM,GACJ,MAAM,CAkClB;AA/DD;;;;;;;GAOG;AACH,qCAHW,MAAM,GACJ,OAAO,CAiBnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enrichMetadata.d.ts","sourceRoot":"","sources":["../../../../src/utils/parsing/enrichMetadata.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"enrichMetadata.d.ts","sourceRoot":"","sources":["../../../../src/utils/parsing/enrichMetadata.js"],"names":[],"mappings":";AAsHA;;;;;;;;;;;;;GAaG;AACH,0CAZW,MAAM,sBACN,MAAM,kBACN,MAAM,wCAEN,MAAM,cACN,MAAM,wCAEN,MAAM,YACN,MAAM,0BAEJ,OAAO,CAAC,MAAM,CAAC,CAysB3B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function extractComment(configPath: any, lines: any, fileType: any): {
|
|
2
|
+
description: any;
|
|
3
|
+
descriptionSource: any;
|
|
4
|
+
annotations: {
|
|
5
|
+
description: string;
|
|
6
|
+
obtainHint: string;
|
|
7
|
+
examples: string[];
|
|
8
|
+
defaultHint: string;
|
|
9
|
+
sensitive: boolean;
|
|
10
|
+
group: string;
|
|
11
|
+
deprecationMessage: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export function findCommentStart(line: any, markers: any): {
|
|
15
|
+
index: number;
|
|
16
|
+
marker: any;
|
|
17
|
+
};
|
|
18
|
+
export function getCommentMarkers(fileType: any): string[];
|
|
19
|
+
export function getLeadingComment(lines: any, lineIndex: any, markers: any): string;
|
|
20
|
+
//# sourceMappingURL=extractComment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractComment.d.ts","sourceRoot":"","sources":["../../../../src/utils/parsing/extractComment.js"],"names":[],"mappings":"AA+GA;;;;;;;;;;;;EA0BC;AAtHD;;;EAgCC;AAhDD,2DAMC;AAuDD,oFAGC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../../src/utils/parsing/parse.js"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../../src/utils/parsing/parse.js"],"names":[],"mappings":";;;;cA4Bc,MAAM;;;;cACN,MAAM;;;;eACN,MAAM;;;;kBACN,cAAe;;;;;;eA+If,MAAM;;;;kBACN,cAAe;;AArJ7B;;;;;;GAMG;AAEH;;;;GAIG;AACH,iFAHW,YAAY,OAsItB;AAED;;;;GAIG;AAEH;;;;;GAKG;AACH,oCAJW,MAAM,SACN,gBAAgB,OAW1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preProcess.d.ts","sourceRoot":"","sources":["../../../../src/utils/parsing/preProcess.js"],"names":[],"mappings":";AASA;;;;;;;;GAQG;AACH,+DANW,MAAM,mCAGd;IAA0B,eAAe,GAAjC,OAAO;CACf,
|
|
1
|
+
{"version":3,"file":"preProcess.d.ts","sourceRoot":"","sources":["../../../../src/utils/parsing/preProcess.js"],"names":[],"mappings":";AASA;;;;;;;;GAQG;AACH,+DANW,MAAM,mCAGd;IAA0B,eAAe,GAAjC,OAAO;CACf,OA6XF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a path is a dotenv file (.env, .env.local, deploy.env, ...).
|
|
3
|
+
* `path.extname('.env')` is '' (dotfile), so detection is by basename.
|
|
4
|
+
* @param {string} filePath - File path or name
|
|
5
|
+
* @returns {boolean} True for dotenv files
|
|
6
|
+
*/
|
|
7
|
+
export function isEnvFile(filePath: string): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Normalized config file type: '.env' for dotenv files, else the lowercased
|
|
10
|
+
* extension.
|
|
11
|
+
* @param {string} filePath - File path or name
|
|
12
|
+
* @returns {string} File type (e.g. '.yml', '.env', '')
|
|
13
|
+
*/
|
|
14
|
+
export function configFileType(filePath: string): string;
|
|
15
|
+
//# sourceMappingURL=fileType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fileType.d.ts","sourceRoot":"","sources":["../../../../src/utils/paths/fileType.js"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,oCAHW,MAAM,GACJ,OAAO,CAKnB;AAED;;;;;GAKG;AACH,yCAHW,MAAM,GACJ,MAAM,CAKlB"}
|
|
@@ -9,4 +9,13 @@
|
|
|
9
9
|
* @returns {number} Line number (1-indexed) or 0 if not found
|
|
10
10
|
*/
|
|
11
11
|
export function findLineForKey(keyToFind: string, lines: string[], fileType: string): number;
|
|
12
|
+
/**
|
|
13
|
+
* Walk a dot-separated config path through raw file lines to find the exact line.
|
|
14
|
+
* YAML uses indentation-based nesting, JSON uses brace-based nesting.
|
|
15
|
+
* @param {string} configPath - Dot-separated path (e.g. 'resources.Parameters.Description')
|
|
16
|
+
* @param {string[]} lines - Array of file lines
|
|
17
|
+
* @param {string} fileType - File extension (e.g., '.yml', '.json')
|
|
18
|
+
* @returns {number} Line number (1-indexed) or 0 if not found
|
|
19
|
+
*/
|
|
20
|
+
export function findLineByPath(configPath: string, lines: string[], fileType: string): number;
|
|
12
21
|
//# sourceMappingURL=findLineForKey.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findLineForKey.d.ts","sourceRoot":"","sources":["../../../../src/utils/paths/findLineForKey.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AACH,0CALW,MAAM,SACN,MAAM,EAAE,YACR,MAAM,GACJ,MAAM,
|
|
1
|
+
{"version":3,"file":"findLineForKey.d.ts","sourceRoot":"","sources":["../../../../src/utils/paths/findLineForKey.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AACH,0CALW,MAAM,SACN,MAAM,EAAE,YACR,MAAM,GACJ,MAAM,CAqClB;AAED;;;;;;;GAOG;AACH,2CALW,MAAM,SACN,MAAM,EAAE,YACR,MAAM,GACJ,MAAM,CAclB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export const DEFAULT_IGNORE_PATHS: string[];
|
|
2
|
+
export function normalizeIgnorePaths(options?: {}): any[];
|
|
3
|
+
export function compileIgnorePaths(patterns: any): string[][];
|
|
4
|
+
export function shouldIgnorePath(pathValue: any, compiledPatterns: any): any;
|
|
5
|
+
//# sourceMappingURL=ignorePaths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignorePaths.d.ts","sourceRoot":"","sources":["../../../../src/utils/paths/ignorePaths.js"],"names":[],"mappings":"AAAA,4CAeC;AA0CD,0DAOC;AAED,8DAEC;AAED,6EAIC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const DEFAULT_SENSITIVE_PATTERNS: RegExp[];
|
|
2
|
+
export const REDACTED_VALUE: "********";
|
|
3
|
+
export function cloneJson(value: any): any;
|
|
4
|
+
export function getSensitivePatterns(options?: {}): RegExp[];
|
|
5
|
+
export function isSensitiveName(name: any, options?: {}): boolean;
|
|
6
|
+
export function isSensitiveVariable(name: any, options?: {}): any;
|
|
7
|
+
export function redactObjectByPaths(value: any, paths?: any[]): any;
|
|
8
|
+
export function redactRequirementValue(requirement: any, value: any): any;
|
|
9
|
+
export function redactValue(value: any): string;
|
|
10
|
+
//# sourceMappingURL=redact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../../../../src/utils/redaction/redact.js"],"names":[],"mappings":"AAIA,kDASC;AAXD,6BAAuB,UAAU,CAAA;AAajC,2CAGC;AAOD,6DAGC;AAED,kEAIC;AAQD,kEAIC;AAOD,oEAQC;AAED,0EAEC;AAjBD,gDAGC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { REDACTED_VALUE } from "./redact";
|
|
2
|
+
export function redactConfigByRequirements(config: any, requirements: any): any;
|
|
3
|
+
export function redactUserInputsByRequirements(userInputs: any, requirements: any): any;
|
|
4
|
+
export { REDACTED_VALUE };
|
|
5
|
+
//# sourceMappingURL=setupRedaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupRedaction.d.ts","sourceRoot":"","sources":["../../../../src/utils/redaction/setupRedaction.js"],"names":[],"mappings":";AA2BA,gFAaC;AA5BD,wFAaC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export function buildConfigRequirements(analysis: any): {
|
|
2
|
+
name: any;
|
|
3
|
+
variable: any;
|
|
4
|
+
variableType: any;
|
|
5
|
+
sourceClass: any;
|
|
6
|
+
type: any;
|
|
7
|
+
description: any;
|
|
8
|
+
descriptionSource: any;
|
|
9
|
+
allowedValues: any;
|
|
10
|
+
sensitive: any;
|
|
11
|
+
sensitiveSource: string;
|
|
12
|
+
required: boolean;
|
|
13
|
+
default: any;
|
|
14
|
+
defaultHint: any;
|
|
15
|
+
obtainHint: any;
|
|
16
|
+
examples: any[];
|
|
17
|
+
group: any;
|
|
18
|
+
deprecationMessage: any;
|
|
19
|
+
fileExists: any;
|
|
20
|
+
innerVariables: any;
|
|
21
|
+
paths: any[];
|
|
22
|
+
conflicts: {
|
|
23
|
+
field: any;
|
|
24
|
+
values: any;
|
|
25
|
+
paths: any[];
|
|
26
|
+
}[];
|
|
27
|
+
occurrences: any;
|
|
28
|
+
}[];
|
|
29
|
+
export function buildRequirement(varKey: any, entry: any): {
|
|
30
|
+
name: any;
|
|
31
|
+
variable: any;
|
|
32
|
+
variableType: any;
|
|
33
|
+
sourceClass: any;
|
|
34
|
+
type: any;
|
|
35
|
+
description: any;
|
|
36
|
+
descriptionSource: any;
|
|
37
|
+
allowedValues: any;
|
|
38
|
+
sensitive: any;
|
|
39
|
+
sensitiveSource: string;
|
|
40
|
+
required: boolean;
|
|
41
|
+
default: any;
|
|
42
|
+
defaultHint: any;
|
|
43
|
+
obtainHint: any;
|
|
44
|
+
examples: any[];
|
|
45
|
+
group: any;
|
|
46
|
+
deprecationMessage: any;
|
|
47
|
+
fileExists: any;
|
|
48
|
+
innerVariables: any;
|
|
49
|
+
paths: any[];
|
|
50
|
+
conflicts: {
|
|
51
|
+
field: any;
|
|
52
|
+
values: any;
|
|
53
|
+
paths: any[];
|
|
54
|
+
}[];
|
|
55
|
+
occurrences: any;
|
|
56
|
+
};
|
|
57
|
+
export function cleanDefaultValue(value: any): any;
|
|
58
|
+
export function collectConflicts({ typeEntries, defaultEntries, allowedSets, scalarAnnotationEntries }: {
|
|
59
|
+
typeEntries: any;
|
|
60
|
+
defaultEntries: any;
|
|
61
|
+
allowedSets: any;
|
|
62
|
+
scalarAnnotationEntries?: {};
|
|
63
|
+
}): {
|
|
64
|
+
field: any;
|
|
65
|
+
values: any;
|
|
66
|
+
paths: any[];
|
|
67
|
+
}[];
|
|
68
|
+
export function normalizeType(type: any): any;
|
|
69
|
+
export function normalizeVariableType(variableType: any): any;
|
|
70
|
+
//# sourceMappingURL=configRequirements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configRequirements.d.ts","sourceRoot":"","sources":["../../../../src/utils/requirements/configRequirements.js"],"names":[],"mappings":"AAgVA;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKC;AAvED;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgEC;AAjTD,mDAKC;AA8MD;;;;;;;;;IAwBC;AAhPD,8CAGC;AAPD,8DAEC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export function getHow(requirement: any): string;
|
|
2
|
+
export function getSummary(requirements: any): {
|
|
3
|
+
total: any;
|
|
4
|
+
required: any;
|
|
5
|
+
optional: any;
|
|
6
|
+
sensitive: any;
|
|
7
|
+
};
|
|
8
|
+
export function isMissingConcreteFileRequirement(requirement: any): boolean;
|
|
9
|
+
export function serializeRequirements(analysis: any, options?: {}): {
|
|
10
|
+
schemaVersion: number;
|
|
11
|
+
config: any;
|
|
12
|
+
summary: {
|
|
13
|
+
total: any;
|
|
14
|
+
required: any;
|
|
15
|
+
optional: any;
|
|
16
|
+
sensitive: any;
|
|
17
|
+
};
|
|
18
|
+
requirements: {
|
|
19
|
+
name: any;
|
|
20
|
+
variable: any;
|
|
21
|
+
variableType: any;
|
|
22
|
+
sourceClass: any;
|
|
23
|
+
type: any;
|
|
24
|
+
description: any;
|
|
25
|
+
descriptionSource: any;
|
|
26
|
+
allowedValues: any;
|
|
27
|
+
sensitive: any;
|
|
28
|
+
sensitiveSource: string;
|
|
29
|
+
required: boolean;
|
|
30
|
+
default: any;
|
|
31
|
+
defaultHint: any;
|
|
32
|
+
obtainHint: any;
|
|
33
|
+
examples: any[];
|
|
34
|
+
group: any;
|
|
35
|
+
deprecationMessage: any;
|
|
36
|
+
fileExists: any;
|
|
37
|
+
innerVariables: any;
|
|
38
|
+
paths: any[];
|
|
39
|
+
conflicts: {
|
|
40
|
+
field: any;
|
|
41
|
+
values: any;
|
|
42
|
+
paths: any[];
|
|
43
|
+
}[];
|
|
44
|
+
occurrences: any;
|
|
45
|
+
}[];
|
|
46
|
+
ask: {
|
|
47
|
+
name: any;
|
|
48
|
+
variable: any;
|
|
49
|
+
variableType: any;
|
|
50
|
+
type: any;
|
|
51
|
+
sensitive: any;
|
|
52
|
+
description: any;
|
|
53
|
+
obtainHint: any;
|
|
54
|
+
examples: any;
|
|
55
|
+
defaultHint: any;
|
|
56
|
+
group: any;
|
|
57
|
+
deprecationMessage: any;
|
|
58
|
+
paths: any;
|
|
59
|
+
how: string;
|
|
60
|
+
}[];
|
|
61
|
+
};
|
|
62
|
+
export function shouldAsk(requirement: any): boolean;
|
|
63
|
+
//# sourceMappingURL=serializeRequirements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializeRequirements.d.ts","sourceRoot":"","sources":["../../../../src/utils/requirements/serializeRequirements.js"],"names":[],"mappings":"AAqCA,iDAeC;AApCD;;;;;EAOC;AAQD,4EAIC;AA8DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcC;AAzDD,qDAQC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const DOTENV_SENSITIVITY_REASON: "dotenv_file";
|
|
2
|
+
export function applyDotenvFileRefMetadata(target: any, source: any): any;
|
|
3
|
+
export function getDotenvFileRefMetadata(source?: {}): {
|
|
4
|
+
sensitive: boolean;
|
|
5
|
+
sensitivityReason: string;
|
|
6
|
+
dotenvFile: boolean;
|
|
7
|
+
dotenvReadScope: any;
|
|
8
|
+
};
|
|
9
|
+
export function hasFileAccessor(variableString: any): boolean;
|
|
10
|
+
export function normalizeDotenvFileVariable(variableString: any): string;
|
|
11
|
+
export function isDotenvFilePath(filePath: any): boolean;
|
|
12
|
+
export function isIniLikeFilePath(filePath: any): boolean;
|
|
13
|
+
//# sourceMappingURL=dotenvFileRefs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dotenvFileRefs.d.ts","sourceRoot":"","sources":["../../../../src/utils/security/dotenvFileRefs.js"],"names":[],"mappings":"AAKA,wCAAkC,aAAa,CAAA;AAkH/C,0EAIC;AAzCD;;;;;EAiBC;AArFD,8DAKC;AAkFD,yEAWC;AAzGD,yDAKC;AAsGD,0DAGC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const FORBIDDEN_KEYS: Set<string>;
|
|
2
|
+
export const SOURCE_ESCAPE_PATTERN: RegExp;
|
|
3
|
+
/**
|
|
4
|
+
* Walk a subscript/justin AST and return the first disallowed access found.
|
|
5
|
+
* Node shapes: [null, literal] | ['.', obj, propName] | ['[]', obj, keyNode] |
|
|
6
|
+
* [op, ...children]; bare identifiers are plain strings.
|
|
7
|
+
* @param {*} node - a subscript AST node
|
|
8
|
+
* @returns {string|null} the offending key (or '<computed-key>'), else null
|
|
9
|
+
*/
|
|
10
|
+
export function findForbiddenAccess(node: any): string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Throw if an eval expression attempts a prototype-chain escape.
|
|
13
|
+
* @param {string} expression - the raw expression inside eval(...)
|
|
14
|
+
* @param {*} [ast] - the parsed subscript AST, when available
|
|
15
|
+
*/
|
|
16
|
+
export function assertSafeEvalExpression(expression: string, ast?: any): void;
|
|
17
|
+
//# sourceMappingURL=evalSafety.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evalSafety.d.ts","sourceRoot":"","sources":["../../../../src/utils/security/evalSafety.js"],"names":[],"mappings":"AAMA,yCAQE;AAIF,2CAA+G;AAE/G;;;;;;GAMG;AACH,0CAHW,GAAC,GACC,MAAM,GAAC,IAAI,CAgCvB;AAED;;;;GAIG;AACH,qDAHW,MAAM,QACN,GAAC,QAgBX"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const EXECUTABLE_EXTENSIONS: Set<string>;
|
|
2
|
+
export function assertCustomFunctionsAllowed(functions: any, policy: any): void;
|
|
3
|
+
export function assertCustomResolversAllowed(variableSources: any, policy: any): void;
|
|
4
|
+
export function assertSafeConfigInput(filePath: any, policy: any): void;
|
|
5
|
+
export function checkFileAccess(filePath: any, policy: any, context?: {}): void;
|
|
6
|
+
export function normalizeSafetyPolicy(settings?: {}, context?: {}): {
|
|
7
|
+
safeMode: boolean;
|
|
8
|
+
blockExecutableFiles: boolean;
|
|
9
|
+
blockCustomResolvers: boolean;
|
|
10
|
+
blockCustomFunctions: boolean;
|
|
11
|
+
blockDotEnv: boolean;
|
|
12
|
+
restrictFileRoots: boolean;
|
|
13
|
+
allowedFileRoots: string[];
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=safetyPolicy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safetyPolicy.d.ts","sourceRoot":"","sources":["../../../../src/utils/security/safetyPolicy.js"],"names":[],"mappings":"AAIA,gDAAqG;AAyFrG,gFAOC;AAhBD,sFAOC;AAlBD,wEASC;AA/BD,gFAoBC;AAvDD;;;;;;;;EAkBC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type ResolutionContext = {
|
|
2
|
+
/**
|
|
3
|
+
* - options hive for ${opt:...} variables
|
|
4
|
+
*/
|
|
5
|
+
options: {
|
|
6
|
+
[x: string]: any;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* - env target; pass process.env or a plain object
|
|
10
|
+
*/
|
|
11
|
+
env: {
|
|
12
|
+
[x: string]: any;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* - config object under resolution
|
|
16
|
+
*/
|
|
17
|
+
config: {
|
|
18
|
+
[x: string]: any;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @typedef {Object} ResolutionContext
|
|
23
|
+
* @property {Object.<string, any>} options - options hive for ${opt:...} variables
|
|
24
|
+
* @property {Object.<string, any>} env - env target; pass process.env or a plain object
|
|
25
|
+
* @property {Object.<string, any>} config - config object under resolution
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Apply answers from the setup wizard to a resolution context
|
|
29
|
+
* @param {ResolutionContext} context - context to mutate
|
|
30
|
+
* @param {Object} [answers] - answer groups { options, env, self, dotProp }
|
|
31
|
+
* @returns {ResolutionContext} the same context, mutated
|
|
32
|
+
*/
|
|
33
|
+
export function applyAnswers(context: ResolutionContext, answers?: any): ResolutionContext;
|
|
34
|
+
//# sourceMappingURL=applyAnswers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyAnswers.d.ts","sourceRoot":"","sources":["../../../../src/utils/setup/applyAnswers.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA;;;;;GAKG;AAEH;;;;;GAKG;AACH,sCAJW,iBAAiB,kBAEf,iBAAiB,CAqB7B"}
|