@usebruno/filestore 0.11.0 → 0.13.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/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/workers/worker-script.js +1 -1
- package/dist/cjs/workers/worker-script.js.map +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/workers/worker-script.js +1 -1
- package/dist/esm/workers/worker-script.js.map +1 -1
- package/dist/formats/bru/utils/redact-large-text-blocks.d.ts.map +1 -1
- package/dist/formats/yml/common/omit-headers.d.ts +3 -0
- package/dist/formats/yml/common/omit-headers.d.ts.map +1 -0
- package/dist/formats/yml/common/scripts.d.ts +3 -5
- package/dist/formats/yml/common/scripts.d.ts.map +1 -1
- package/dist/formats/yml/index.d.ts +3 -1
- package/dist/formats/yml/index.d.ts.map +1 -1
- package/dist/formats/yml/items/parseGraphQLRequest.d.ts.map +1 -1
- package/dist/formats/yml/items/parseGrpcRequest.d.ts.map +1 -1
- package/dist/formats/yml/items/parseHttpRequest.d.ts.map +1 -1
- package/dist/formats/yml/items/stringifyGraphQLRequest.d.ts.map +1 -1
- package/dist/formats/yml/items/stringifyGrpcRequest.d.ts.map +1 -1
- package/dist/formats/yml/items/stringifyHttpRequest.d.ts.map +1 -1
- package/dist/formats/yml/items/stringifyWebsocketRequest.d.ts.map +1 -1
- package/dist/formats/yml/mockServerTypes.d.ts +95 -0
- package/dist/formats/yml/mockServerTypes.d.ts.map +1 -0
- package/dist/formats/yml/parseCollection.d.ts.map +1 -1
- package/dist/formats/yml/parseEnvironment.d.ts.map +1 -1
- package/dist/formats/yml/parseFolder.d.ts.map +1 -1
- package/dist/formats/yml/parseMockServer.d.ts +4 -0
- package/dist/formats/yml/parseMockServer.d.ts.map +1 -0
- package/dist/formats/yml/stringifyCollection.d.ts.map +1 -1
- package/dist/formats/yml/stringifyEnvironment.d.ts.map +1 -1
- package/dist/formats/yml/stringifyFolder.d.ts.map +1 -1
- package/dist/formats/yml/stringifyMockServer.d.ts +4 -0
- package/dist/formats/yml/stringifyMockServer.d.ts.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/workers/WorkerQueue/index.d.ts +3 -2
- package/dist/workers/WorkerQueue/index.d.ts.map +1 -1
- package/dist/workers/index.d.ts +4 -0
- package/dist/workers/index.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/constants.ts +5 -1
- package/src/formats/bru/tests/redact-large-text-blocks.spec.js +220 -1
- package/src/formats/bru/utils/redact-large-text-blocks.ts +46 -1
- package/src/formats/yml/common/omit-headers.spec.ts +16 -0
- package/src/formats/yml/common/omit-headers.ts +12 -0
- package/src/formats/yml/common/scripts.spec.ts +155 -0
- package/src/formats/yml/common/scripts.ts +55 -29
- package/src/formats/yml/grpc-round-trip.spec.ts +110 -0
- package/src/formats/yml/index.ts +5 -1
- package/src/formats/yml/items/parseGraphQLRequest.ts +6 -16
- package/src/formats/yml/items/parseGrpcRequest.ts +14 -6
- package/src/formats/yml/items/parseHttpRequest.ts +10 -14
- package/src/formats/yml/items/stringifyGraphQLRequest.ts +8 -14
- package/src/formats/yml/items/stringifyGrpcRequest.ts +2 -1
- package/src/formats/yml/items/stringifyHttpRequest.ts +13 -13
- package/src/formats/yml/items/stringifyWebsocketRequest.ts +3 -1
- package/src/formats/yml/mockServerTypes.ts +95 -0
- package/src/formats/yml/parseCollection.spec.ts +123 -0
- package/src/formats/yml/parseCollection.ts +23 -14
- package/src/formats/yml/parseEnvironment.spec.ts +49 -0
- package/src/formats/yml/parseEnvironment.ts +6 -0
- package/src/formats/yml/parseFolder.spec.ts +18 -0
- package/src/formats/yml/parseFolder.ts +5 -1
- package/src/formats/yml/parseMockServer.spec.ts +180 -0
- package/src/formats/yml/parseMockServer.ts +113 -0
- package/src/formats/yml/script.spec.ts +159 -0
- package/src/formats/yml/stringifyCollection.spec.ts +146 -0
- package/src/formats/yml/stringifyCollection.ts +29 -19
- package/src/formats/yml/stringifyEnvironment.spec.ts +58 -0
- package/src/formats/yml/stringifyEnvironment.ts +6 -0
- package/src/formats/yml/stringifyFolder.spec.ts +23 -0
- package/src/formats/yml/stringifyFolder.ts +10 -3
- package/src/formats/yml/stringifyMockServer.spec.ts +177 -0
- package/src/formats/yml/stringifyMockServer.ts +129 -0
- package/src/formats/yml/tests/defaultEnvironment.spec.js +50 -0
- package/src/formats/yml/tests/stringifyEnvironment.spec.ts +26 -0
- package/src/formats/yml/utils.ts +1 -1
- package/src/index.ts +34 -1
- package/src/maxRedirects.spec.ts +144 -0
- package/src/types.ts +1 -0
- package/src/workers/WorkerQueue/index.ts +10 -2
- package/src/workers/index.ts +25 -1
- package/src/workers/worker-script.ts +45 -21
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redact-large-text-blocks.d.ts","sourceRoot":"","sources":["../../../../src/formats/bru/utils/redact-large-text-blocks.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,aAAa,EAAE,CAAC;CACzB;
|
|
1
|
+
{"version":3,"file":"redact-large-text-blocks.d.ts","sourceRoot":"","sources":["../../../../src/formats/bru/utils/redact-large-text-blocks.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,aAAa,EAAE,CAAC;CACzB;AA6ED,eAAO,MAAM,wBAAwB,YAAa,MAAM,KAAG,eAoC1D,CAAC;AAEF,eAAO,MAAM,qBAAqB,yBAA0B,aAAa,EAAE,MAoB1E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"omit-headers.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/common/omit-headers.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,gBAAiB,OAAO,KAAG,MAAM,EAAE,GAAG,SAUtE,CAAC"}
|
|
@@ -3,12 +3,10 @@ import type { FolderRequest as BrunoFolderRequest } from '@usebruno/schema-types
|
|
|
3
3
|
import type { HttpRequest as BrunoHttpRequest } from '@usebruno/schema-types/requests/http';
|
|
4
4
|
import type { WebSocketRequest as BrunoWebSocketRequest } from '@usebruno/schema-types/requests/websocket';
|
|
5
5
|
import type { GrpcRequest as BrunoGrpcRequest } from '@usebruno/schema-types/requests/grpc';
|
|
6
|
-
|
|
6
|
+
import type { Script as BrunoScript } from '@usebruno/schema-types/common/scripts';
|
|
7
|
+
export declare const toOpenCollectionScripts: (request: BrunoFolderRequest | BrunoHttpRequest | BrunoWebSocketRequest | BrunoGrpcRequest | null | undefined, allowedKeys: string[]) => Scripts | undefined;
|
|
7
8
|
export declare const toBrunoScripts: (scripts: Scripts | null | undefined) => {
|
|
8
|
-
script?:
|
|
9
|
-
req?: string;
|
|
10
|
-
res?: string;
|
|
11
|
-
};
|
|
9
|
+
script?: BrunoScript;
|
|
12
10
|
tests?: string;
|
|
13
11
|
} | undefined;
|
|
14
12
|
//# sourceMappingURL=scripts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scripts.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/common/scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"scripts.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/common/scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkC,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACpG,OAAO,KAAK,EAAE,aAAa,IAAI,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AACpG,OAAO,KAAK,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,KAAK,EAAE,gBAAgB,IAAI,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAC3G,OAAO,KAAK,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEnF,eAAO,MAAM,uBAAuB,YAAa,kBAAkB,GAAG,gBAAgB,GAAG,qBAAqB,GAAG,gBAAgB,GAAG,IAAI,GAAG,SAAS,eAAe,MAAM,EAAE,KAAG,OAAO,GAAG,SA6BvL,CAAC;AAEF,eAAO,MAAM,cAAc,YAAa,OAAO,GAAG,IAAI,GAAG,SAAS,KAAG;IACnE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,SAgDH,CAAC"}
|
|
@@ -2,9 +2,11 @@ import parseYmlItem from './parseItem';
|
|
|
2
2
|
import parseYmlFolder from './parseFolder';
|
|
3
3
|
import parseYmlCollection from './parseCollection';
|
|
4
4
|
import parseYmlEnvironment from './parseEnvironment';
|
|
5
|
+
import parseYmlMockServer from './parseMockServer';
|
|
5
6
|
import stringifyYmlItem from './stringifyItem';
|
|
6
7
|
import stringifyYmlFolder from './stringifyFolder';
|
|
7
8
|
import stringifyYmlCollection from './stringifyCollection';
|
|
8
9
|
import stringifyYmlEnvironment from './stringifyEnvironment';
|
|
9
|
-
|
|
10
|
+
import stringifyYmlMockServer from './stringifyMockServer';
|
|
11
|
+
export { parseYmlItem, parseYmlFolder, parseYmlCollection, parseYmlEnvironment, parseYmlMockServer, stringifyYmlItem, stringifyYmlFolder, stringifyYmlCollection, stringifyYmlEnvironment, stringifyYmlMockServer };
|
|
10
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,aAAa,CAAC;AACvC,OAAO,cAAc,MAAM,eAAe,CAAC;AAC3C,OAAO,kBAAkB,MAAM,mBAAmB,CAAC;AACnD,OAAO,mBAAmB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,aAAa,CAAC;AACvC,OAAO,cAAc,MAAM,eAAe,CAAC;AAC3C,OAAO,kBAAkB,MAAM,mBAAmB,CAAC;AACnD,OAAO,mBAAmB,MAAM,oBAAoB,CAAC;AACrD,OAAO,kBAAkB,MAAM,mBAAmB,CAAC;AAEnD,OAAO,gBAAgB,MAAM,iBAAiB,CAAC;AAC/C,OAAO,kBAAkB,MAAM,mBAAmB,CAAC;AACnD,OAAO,sBAAsB,MAAM,uBAAuB,CAAC;AAC3D,OAAO,uBAAuB,MAAM,wBAAwB,CAAC;AAC7D,OAAO,sBAAsB,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EACL,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseGraphQLRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/parseGraphQLRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAA6C,MAAM,wCAAwC,CAAC;AAE3H,OAAO,KAAK,EAAE,cAAc,EAAuC,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"parseGraphQLRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/parseGraphQLRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAA6C,MAAM,wCAAwC,CAAC;AAE3H,OAAO,KAAK,EAAE,cAAc,EAAuC,MAAM,wCAAwC,CAAC;AAYlH,QAAA,MAAM,mBAAmB,cAAe,cAAc,KAAG,SAsHxD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseGrpcRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/parseGrpcRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAoC,MAAM,qCAAqC,CAAC;AAkCzG,QAAA,MAAM,gBAAgB,cAAe,WAAW,KAAG,
|
|
1
|
+
{"version":3,"file":"parseGrpcRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/parseGrpcRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAoC,MAAM,qCAAqC,CAAC;AAkCzG,QAAA,MAAM,gBAAgB,cAAe,WAAW,KAAG,SA0GlD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseHttpRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/parseHttpRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAA6C,MAAM,wCAAwC,CAAC;AAE3H,OAAO,KAAK,EAAE,WAAW,EAAmB,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"parseHttpRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/parseHttpRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAA6C,MAAM,wCAAwC,CAAC;AAE3H,OAAO,KAAK,EAAE,WAAW,EAAmB,MAAM,qCAAqC,CAAC;AAexF,QAAA,MAAM,gBAAgB,cAAe,WAAW,KAAG,SAyLlD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringifyGraphQLRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/stringifyGraphQLRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAA6C,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"stringifyGraphQLRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/stringifyGraphQLRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAA6C,MAAM,wCAAwC,CAAC;AAqB3H,QAAA,MAAM,uBAAuB,SAAU,SAAS,KAAG,MA6IlD,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringifyGrpcRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/stringifyGrpcRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"stringifyGrpcRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/stringifyGrpcRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAgBhF,QAAA,MAAM,oBAAoB,SAAU,SAAS,KAAG,MAqH/C,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringifyHttpRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/stringifyHttpRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAA6C,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"stringifyHttpRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/stringifyHttpRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAA6C,MAAM,wCAAwC,CAAC;AAwB3H,QAAA,MAAM,oBAAoB,SAAU,SAAS,KAAG,MA6M/C,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringifyWebsocketRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/stringifyWebsocketRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"stringifyWebsocketRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/stringifyWebsocketRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAehF,QAAA,MAAM,yBAAyB,SAAU,SAAS,KAAG,MA+GpD,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { HttpRequestHeader, HttpResponseHeader, HttpRequestParam, HttpRequestBody } from '@opencollection/types/requests/http';
|
|
2
|
+
export interface MockRuleCondition {
|
|
3
|
+
target?: string;
|
|
4
|
+
key?: string;
|
|
5
|
+
operator?: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface MockRouteRules {
|
|
9
|
+
operator?: 'AND' | 'OR';
|
|
10
|
+
conditions?: MockRuleCondition[];
|
|
11
|
+
}
|
|
12
|
+
export interface MockRouteEntry {
|
|
13
|
+
name?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
request?: {
|
|
16
|
+
method?: string;
|
|
17
|
+
url?: string;
|
|
18
|
+
headers?: HttpRequestHeader[];
|
|
19
|
+
params?: HttpRequestParam[];
|
|
20
|
+
body?: HttpRequestBody;
|
|
21
|
+
};
|
|
22
|
+
response?: {
|
|
23
|
+
status?: number;
|
|
24
|
+
statusText?: string;
|
|
25
|
+
headers?: HttpResponseHeader[];
|
|
26
|
+
body?: {
|
|
27
|
+
type?: string;
|
|
28
|
+
data?: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
rules?: MockRouteRules;
|
|
32
|
+
copiedFrom?: {
|
|
33
|
+
example?: string | null;
|
|
34
|
+
requestPath?: string | null;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export interface MockServerFile {
|
|
38
|
+
info?: {
|
|
39
|
+
name?: string;
|
|
40
|
+
type?: 'mock';
|
|
41
|
+
};
|
|
42
|
+
mock?: {
|
|
43
|
+
port?: number;
|
|
44
|
+
delay?: number;
|
|
45
|
+
source?: {
|
|
46
|
+
type?: 'collection' | 'spec';
|
|
47
|
+
path?: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
routes?: MockRouteEntry[];
|
|
51
|
+
}
|
|
52
|
+
export interface BrunoMockRoute {
|
|
53
|
+
name: string;
|
|
54
|
+
description: string;
|
|
55
|
+
request: {
|
|
56
|
+
url: string;
|
|
57
|
+
method: string;
|
|
58
|
+
headers: any[];
|
|
59
|
+
params: any[];
|
|
60
|
+
body: any;
|
|
61
|
+
};
|
|
62
|
+
response: {
|
|
63
|
+
status: number;
|
|
64
|
+
statusText: string;
|
|
65
|
+
headers: any[];
|
|
66
|
+
body: {
|
|
67
|
+
type: string;
|
|
68
|
+
content: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
rules: {
|
|
72
|
+
operator: 'AND' | 'OR';
|
|
73
|
+
conditions: Array<{
|
|
74
|
+
target: string;
|
|
75
|
+
key: string;
|
|
76
|
+
operator: string;
|
|
77
|
+
value: string;
|
|
78
|
+
}>;
|
|
79
|
+
};
|
|
80
|
+
copiedFrom?: {
|
|
81
|
+
exampleName: string | null;
|
|
82
|
+
requestPathname: string | null;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
export interface BrunoMockServer {
|
|
86
|
+
name: string;
|
|
87
|
+
port: number | null;
|
|
88
|
+
delay: number;
|
|
89
|
+
source: {
|
|
90
|
+
type: 'collection' | 'spec';
|
|
91
|
+
path: string;
|
|
92
|
+
} | null;
|
|
93
|
+
routes: BrunoMockRoute[];
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=mockServerTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockServerTypes.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/mockServerTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAEpI,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE;QACR,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,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AE;QACR,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,GAAG,EAAE,CAAC;QACf,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM,CAAC;YACb,OAAO,EAAE,MAAM,CAAC;SACjB,CAAC;KACH,CAAC;IACF,KAAK,EAAE;QACL,QAAQ,EAAE,KAAK,GAAG,IAAI,CAAC;QACvB,UAAU,EAAE,KAAK,CAAC;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KACrF,CAAC;IACF,UAAU,CAAC,EAAE;QACX,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;KAChC,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE;QACN,IAAI,EAAE,YAAY,GAAG,MAAM,CAAC;QAC5B,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,IAAI,CAAC;IACT,MAAM,EAAE,cAAc,EAAE,CAAC;CAC1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseCollection.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/parseCollection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"parseCollection.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/parseCollection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAW3E,UAAU,gBAAgB;IACxB,cAAc,EAAE,UAAU,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC;AAED,QAAA,MAAM,eAAe,cAAe,MAAM,KAAG,gBAgO5C,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseEnvironment.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/parseEnvironment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,IAAI,gBAAgB,EAC/B,mBAAmB,IAAI,wBAAwB,EAC/C,yBAAyB,IAAI,8BAA8B,EAE5D,MAAM,+CAA+C,CAAC;AAEvD,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"parseEnvironment.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/parseEnvironment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,IAAI,gBAAgB,EAC/B,mBAAmB,IAAI,wBAAwB,EAC/C,yBAAyB,IAAI,8BAA8B,EAE5D,MAAM,+CAA+C,CAAC;AAEvD,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAWvF,eAAO,MAAM,2BAA2B,cAAe,CAAC,QAAQ,GAAG,cAAc,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,KAAG,CAAC,wBAAwB,GAAG,8BAA8B,CAAC,EAgDpK,CAAC;AAgCF,QAAA,MAAM,gBAAgB,cAAe,MAAM,KAAG,gBA0B7C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseFolder.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/parseFolder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAU3E,QAAA,MAAM,WAAW,cAAe,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"parseFolder.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/parseFolder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAU3E,QAAA,MAAM,WAAW,cAAe,MAAM,KAAG,UA6ExC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseMockServer.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/parseMockServer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAGV,eAAe,EAGhB,MAAM,mBAAmB,CAAC;AAuE3B,QAAA,MAAM,eAAe,YAAa,MAAM,KAAG,eA4B1C,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringifyCollection.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/stringifyCollection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stringifyCollection.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/stringifyCollection.ts"],"names":[],"mappings":"AAqEA,QAAA,MAAM,mBAAmB,mBAAoB,GAAG,eAAe,GAAG,KAAG,MAqOpE,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringifyEnvironment.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/stringifyEnvironment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,IAAI,gBAAgB,EAC/B,mBAAmB,IAAI,wBAAwB,EAC/C,yBAAyB,IAAI,8BAA8B,EAE5D,MAAM,+CAA+C,CAAC;AAEvD,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"stringifyEnvironment.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/stringifyEnvironment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,IAAI,gBAAgB,EAC/B,mBAAmB,IAAI,wBAAwB,EAC/C,yBAAyB,IAAI,8BAA8B,EAE5D,MAAM,+CAA+C,CAAC;AAEvD,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAOvF,eAAO,MAAM,oCAAoC,cAAe,CAAC,wBAAwB,GAAG,8BAA8B,CAAC,EAAE,KAAG,CAAC,QAAQ,GAAG,cAAc,CAAC,EAAE,GAAG,SA2C/J,CAAC;AA8BF,QAAA,MAAM,oBAAoB,gBAAiB,gBAAgB,KAAG,MAgC7D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringifyFolder.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/stringifyFolder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"stringifyFolder.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/stringifyFolder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAoC3E,QAAA,MAAM,eAAe,eAAgB,UAAU,KAAG,MA4EjD,CAAC;AACF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringifyMockServer.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/stringifyMockServer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAGV,eAAe,EAEhB,MAAM,mBAAmB,CAAC;AAkF3B,QAAA,MAAM,mBAAmB,eAAgB,eAAe,KAAG,MAkC1D,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -12,12 +12,26 @@ export declare const parseRequestViaWorker: (content: string, options: {
|
|
|
12
12
|
export declare const stringifyRequestViaWorker: (requestObj: any, options: {
|
|
13
13
|
format: CollectionFormat;
|
|
14
14
|
}) => Promise<string>;
|
|
15
|
+
export declare const parseFolderViaWorker: (content: string, options: {
|
|
16
|
+
format: CollectionFormat;
|
|
17
|
+
}) => Promise<any>;
|
|
18
|
+
export declare const stringifyFolderViaWorker: (folderObj: any, options: {
|
|
19
|
+
format: CollectionFormat;
|
|
20
|
+
}) => Promise<string>;
|
|
21
|
+
export declare const parseEnvironmentViaWorker: (content: string, options: {
|
|
22
|
+
format: CollectionFormat;
|
|
23
|
+
}) => Promise<any>;
|
|
24
|
+
export declare const stringifyEnvironmentViaWorker: (envObj: any, options: {
|
|
25
|
+
format: CollectionFormat;
|
|
26
|
+
}) => Promise<string>;
|
|
15
27
|
export declare const parseCollection: (content: string, options?: ParseOptions) => any;
|
|
16
28
|
export declare const stringifyCollection: (collectionObj: BrunoCollection, brunoConfig: any, options?: StringifyOptions) => string;
|
|
17
29
|
export declare const parseFolder: (content: string, options?: ParseOptions) => any;
|
|
18
30
|
export declare const stringifyFolder: (folderObj: any, options?: StringifyOptions) => string;
|
|
19
31
|
export declare const parseEnvironment: (content: string, options?: ParseOptions) => any;
|
|
20
32
|
export declare const stringifyEnvironment: (envObj: BrunoEnvironment, options?: StringifyOptions) => string;
|
|
33
|
+
export declare const parseMockServer: (content: string, options?: ParseOptions) => any;
|
|
34
|
+
export declare const stringifyMockServer: (mockServerObj: any, options?: StringifyOptions) => string;
|
|
21
35
|
export declare const parseDotEnv: (content: string) => Record<string, string>;
|
|
22
36
|
export { redactLargeBruTextBlocks, restoreRedactedBlocks };
|
|
23
37
|
export type { RedactedBlock, RedactionResult } from './formats/bru/utils/redact-large-text-blocks';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+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AW,qBAAqB;IACpC,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Worker } from 'node:worker_threads';
|
|
3
|
+
type WorkerTaskType = 'parse' | 'stringify' | 'parseFolder' | 'stringifyFolder' | 'parseEnvironment' | 'stringifyEnvironment';
|
|
3
4
|
interface QueuedTask {
|
|
4
5
|
priority: number;
|
|
5
6
|
scriptPath: string;
|
|
6
7
|
data: any;
|
|
7
|
-
taskType:
|
|
8
|
+
taskType: WorkerTaskType;
|
|
8
9
|
resolve?: (value: any) => void;
|
|
9
10
|
reject?: (reason?: any) => void;
|
|
10
11
|
}
|
|
@@ -19,7 +20,7 @@ declare class WorkerQueue {
|
|
|
19
20
|
runWorker({ scriptPath, data, taskType }: {
|
|
20
21
|
scriptPath: string;
|
|
21
22
|
data: any;
|
|
22
|
-
taskType:
|
|
23
|
+
taskType: WorkerTaskType;
|
|
23
24
|
}): Promise<unknown>;
|
|
24
25
|
cleanup(): Promise<void>;
|
|
25
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workers/WorkerQueue/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,UAAU,UAAU;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workers/WorkerQueue/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,KAAK,cAAc,GACb,OAAO,GACP,WAAW,GACX,aAAa,GACb,iBAAiB,GACjB,kBAAkB,GAClB,sBAAsB,CAAC;AAE7B,UAAU,UAAU;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CACjC;AAED,cAAM,WAAW;IACf,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,YAAY,CAAU;IAC9B,OAAO,CAAC,OAAO,CAAyB;;IAQlC,sBAAsB,CAAC,UAAU,EAAE,MAAM;IASzC,OAAO,CAAC,IAAI,EAAE,UAAU;IAUxB,YAAY;IAmBZ,SAAS,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,GAAG,CAAC;QAAC,QAAQ,EAAE,cAAc,CAAA;KAAE;IAwCrG,OAAO;CAWd;AAED,eAAe,WAAW,CAAC"}
|
package/dist/workers/index.d.ts
CHANGED
|
@@ -6,6 +6,10 @@ declare class BruParserWorker {
|
|
|
6
6
|
private enqueueTask;
|
|
7
7
|
parseRequest(data: any, format?: CollectionFormat): Promise<any>;
|
|
8
8
|
stringifyRequest(data: any, format?: CollectionFormat): Promise<any>;
|
|
9
|
+
parseFolder(data: any, format?: CollectionFormat): Promise<any>;
|
|
10
|
+
stringifyFolder(data: any, format?: CollectionFormat): Promise<any>;
|
|
11
|
+
parseEnvironment(data: any, format?: CollectionFormat): Promise<any>;
|
|
12
|
+
stringifyEnvironment(data: any, format?: CollectionFormat): Promise<any>;
|
|
9
13
|
cleanup(): Promise<void>;
|
|
10
14
|
}
|
|
11
15
|
export default BruParserWorker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAoClD,cAAM,eAAe;IACnB,OAAO,CAAC,YAAY,CAAwB;;IAS5C,OAAO,CAAC,cAAc;YAUR,WAAW;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAoClD,cAAM,eAAe;IACnB,OAAO,CAAC,YAAY,CAAwB;;IAS5C,OAAO,CAAC,cAAc;YAUR,WAAW;IAqBnB,YAAY,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,GAAE,gBAA4C,GAAG,OAAO,CAAC,GAAG,CAAC;IAI3F,gBAAgB,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,GAAE,gBAA4C,GAAG,OAAO,CAAC,GAAG,CAAC;IAI/F,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,GAAE,gBAA4C,GAAG,OAAO,CAAC,GAAG,CAAC;IAI1F,eAAe,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,GAAE,gBAA4C,GAAG,OAAO,CAAC,GAAG,CAAC;IAI9F,gBAAgB,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,GAAE,gBAA4C,GAAG,OAAO,CAAC,GAAG,CAAC;IAI/F,oBAAoB,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,GAAE,gBAA4C,GAAG,OAAO,CAAC,GAAG,CAAC;IAInG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAM/B;AAED,eAAe,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usebruno/filestore",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"@types/jest": "^29.5.11",
|
|
30
30
|
"@types/lodash": "^4.14.191",
|
|
31
31
|
"@types/node": "^24.1.0",
|
|
32
|
-
"@opencollection/types": "0.
|
|
33
|
-
"@usebruno/schema-types": "0.
|
|
32
|
+
"@opencollection/types": "0.14.0",
|
|
33
|
+
"@usebruno/schema-types": "0.9.0",
|
|
34
34
|
"babel-jest": "^29.7.0",
|
|
35
35
|
"jest": "^29.2.0",
|
|
36
|
-
"nanoid": "3.3.
|
|
36
|
+
"nanoid": "3.3.18",
|
|
37
37
|
"rimraf": "^3.0.2",
|
|
38
38
|
"rollup": "3.30.0",
|
|
39
39
|
"rollup-plugin-dts": "^5.0.0",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@types/nanoid": "^2.1.0",
|
|
49
|
-
"@usebruno/common": "0.
|
|
50
|
-
"@usebruno/lang": "0.
|
|
51
|
-
"ajv": "^8.
|
|
49
|
+
"@usebruno/common": "0.26.0",
|
|
50
|
+
"@usebruno/lang": "0.40.0",
|
|
51
|
+
"ajv": "^8.18.0",
|
|
52
52
|
"lodash": "4.18.1",
|
|
53
|
-
"yaml": "
|
|
53
|
+
"yaml": "2.3.4"
|
|
54
54
|
}
|
|
55
55
|
}
|
package/src/constants.ts
CHANGED
|
@@ -4,9 +4,13 @@ import type { ExternalSecretProviderType } from '@usebruno/schema-types/collecti
|
|
|
4
4
|
export const DEFAULT_COLLECTION_FORMAT: CollectionFormat = 'yml';
|
|
5
5
|
|
|
6
6
|
// Each provider type stores its secret reference under a different key.
|
|
7
|
-
export const SECRET_PROVIDER_IDENTIFIER_FIELDS: Record<
|
|
7
|
+
export const SECRET_PROVIDER_IDENTIFIER_FIELDS: Record<
|
|
8
|
+
ExternalSecretProviderType,
|
|
9
|
+
'path' | 'secretName' | 'vaultName' | 'projectId'
|
|
10
|
+
> = {
|
|
8
11
|
'aws-secrets-manager': 'secretName',
|
|
9
12
|
'azure-key-vault': 'vaultName',
|
|
13
|
+
'gcp-secrets-manager': 'projectId',
|
|
10
14
|
'hashicorp-vault-cloud': 'path',
|
|
11
15
|
'hashicorp-vault-server': 'path'
|
|
12
16
|
};
|