@forge/cli-shared 8.3.0-next.1 → 8.3.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/CHANGELOG.md +22 -0
- package/out/graphql/debugging-graphql-runner.d.ts +2 -0
- package/out/graphql/debugging-graphql-runner.d.ts.map +1 -1
- package/out/graphql/debugging-graphql-runner.js +25 -2
- package/out/graphql/graphql-types.d.ts +413 -44
- package/out/graphql/graphql-types.d.ts.map +1 -1
- package/out/graphql/graphql-types.js +31 -22
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @forge/cli-shared
|
|
2
2
|
|
|
3
|
+
## 8.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 10ac877: Support devspace in forge create command flow
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 10c0bc6: Add egress support for custom URL schemes. Allow custom custom URL schemes as autoconvert patterns.
|
|
12
|
+
- 568c31b: Add support for developer space in forge register command
|
|
13
|
+
- f181a03: Added sensitive token filtering
|
|
14
|
+
- Updated dependencies [10c0bc6]
|
|
15
|
+
- Updated dependencies [6447811]
|
|
16
|
+
- Updated dependencies [2f446cf]
|
|
17
|
+
- @forge/manifest@10.2.1
|
|
18
|
+
|
|
19
|
+
## 8.3.0-next.2
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- f181a03: Added sensitive token filtering
|
|
24
|
+
|
|
3
25
|
## 8.3.0-next.1
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -5,7 +5,9 @@ export declare class DebuggingGraphqlRunner implements GraphQLRunner {
|
|
|
5
5
|
private readonly innerClient;
|
|
6
6
|
private readonly endpoint;
|
|
7
7
|
private readonly logger;
|
|
8
|
+
private readonly sensitivePatterns;
|
|
8
9
|
constructor(innerClient: GraphQLRunner, endpoint: string, logger: Logger);
|
|
10
|
+
private filterSensitiveData;
|
|
9
11
|
run<TVariables extends Variables, TResponse>(query: string, variables: TVariables): Promise<{
|
|
10
12
|
requestId: string | undefined;
|
|
11
13
|
response: TResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugging-graphql-runner.d.ts","sourceRoot":"","sources":["../../src/graphql/debugging-graphql-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG5D,wBAAgB,SAAS,CAAC,SAAS,EAAE,GAAG,UAEvC;AAED,qBAAa,sBAAuB,YAAW,aAAa;
|
|
1
|
+
{"version":3,"file":"debugging-graphql-runner.d.ts","sourceRoot":"","sources":["../../src/graphql/debugging-graphql-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG5D,wBAAgB,SAAS,CAAC,SAAS,EAAE,GAAG,UAEvC;AAED,qBAAa,sBAAuB,YAAW,aAAa;IAKxD,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IALzB,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA6B;gBAG5C,WAAW,EAAE,aAAa,EAC1B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM;IAGjC,OAAO,CAAC,mBAAmB;IAsBd,GAAG,CAAC,UAAU,SAAS,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU;;;;CAY/F"}
|
|
@@ -10,15 +10,38 @@ class DebuggingGraphqlRunner {
|
|
|
10
10
|
innerClient;
|
|
11
11
|
endpoint;
|
|
12
12
|
logger;
|
|
13
|
+
sensitivePatterns = [/X-Amz-Security-Token/i];
|
|
13
14
|
constructor(innerClient, endpoint, logger) {
|
|
14
15
|
this.innerClient = innerClient;
|
|
15
16
|
this.endpoint = endpoint;
|
|
16
17
|
this.logger = logger;
|
|
17
18
|
}
|
|
19
|
+
filterSensitiveData(data) {
|
|
20
|
+
if (!data)
|
|
21
|
+
return data;
|
|
22
|
+
if (Array.isArray(data)) {
|
|
23
|
+
return data.map((item) => this.filterSensitiveData(item));
|
|
24
|
+
}
|
|
25
|
+
if (typeof data === 'object' && data !== null) {
|
|
26
|
+
const filtered = { ...data };
|
|
27
|
+
for (const key of Object.keys(filtered)) {
|
|
28
|
+
if (this.sensitivePatterns.some((pattern) => pattern.test(key))) {
|
|
29
|
+
delete filtered[key];
|
|
30
|
+
}
|
|
31
|
+
else if (typeof filtered[key] === 'object' && filtered[key] !== null) {
|
|
32
|
+
filtered[key] = this.filterSensitiveData(filtered[key]);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return filtered;
|
|
36
|
+
}
|
|
37
|
+
return data;
|
|
38
|
+
}
|
|
18
39
|
async run(query, variables) {
|
|
19
|
-
this.
|
|
40
|
+
const filteredVariables = this.filterSensitiveData(variables);
|
|
41
|
+
this.logger.trace(ui_1.Text.graphQL.request(this.endpoint, query, stringify(filteredVariables)));
|
|
20
42
|
const { requestId, response } = await this.innerClient.run(query, variables);
|
|
21
|
-
this.
|
|
43
|
+
const filteredResponse = this.filterSensitiveData(response);
|
|
44
|
+
this.logger.trace(ui_1.Text.graphQL.response(stringify(filteredResponse), requestId));
|
|
22
45
|
return { requestId, response };
|
|
23
46
|
}
|
|
24
47
|
}
|