@forge/cli-shared 8.0.0-next.15 → 8.0.0-next.9
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 +0 -46
- package/out/app-logs/graphql-client.d.ts +1 -1
- package/out/app-logs/graphql-client.d.ts.map +1 -1
- package/out/app-logs/graphql-client.js +18 -33
- package/out/app-logs/view-logs.d.ts +2 -4
- package/out/app-logs/view-logs.d.ts.map +1 -1
- package/out/app-logs/view-logs.js +3 -4
- package/out/graphql/graphql-types.d.ts +75 -401
- package/out/graphql/graphql-types.d.ts.map +1 -1
- package/out/graphql/graphql-types.js +26 -75
- package/out/shared/test.d.ts.map +1 -1
- package/out/shared/test.js +2 -1
- package/out/ui/command-line-ui.d.ts +1 -0
- package/out/ui/command-line-ui.d.ts.map +1 -1
- package/out/ui/command-line-ui.js +5 -0
- package/out/ui/logger.d.ts +1 -0
- package/out/ui/logger.d.ts.map +1 -1
- package/out/ui/logger.js +2 -0
- package/out/ui/text.d.ts +14 -0
- package/out/ui/text.d.ts.map +1 -1
- package/out/ui/text.js +20 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,51 +1,5 @@
|
|
|
1
1
|
# @forge/cli-shared
|
|
2
2
|
|
|
3
|
-
## 8.0.0-next.15
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Updated dependencies [3d96d1c]
|
|
8
|
-
- @forge/manifest@10.0.0-next.13
|
|
9
|
-
|
|
10
|
-
## 8.0.0-next.14
|
|
11
|
-
|
|
12
|
-
### Minor Changes
|
|
13
|
-
|
|
14
|
-
- ba634d9: Remove further sandbox runtime related components
|
|
15
|
-
|
|
16
|
-
### Patch Changes
|
|
17
|
-
|
|
18
|
-
- Updated dependencies [ba634d9]
|
|
19
|
-
- @forge/manifest@10.0.0-next.12
|
|
20
|
-
|
|
21
|
-
## 8.0.0-next.13
|
|
22
|
-
|
|
23
|
-
### Patch Changes
|
|
24
|
-
|
|
25
|
-
- Updated dependencies [1992aaf]
|
|
26
|
-
- Updated dependencies [c2e09b9]
|
|
27
|
-
- @forge/manifest@10.0.0-next.11
|
|
28
|
-
|
|
29
|
-
## 8.0.0-next.12
|
|
30
|
-
|
|
31
|
-
### Major Changes
|
|
32
|
-
|
|
33
|
-
- d33186c: Resolved sorting issue in the displayed log lines
|
|
34
|
-
|
|
35
|
-
## 8.0.0-next.11
|
|
36
|
-
|
|
37
|
-
### Patch Changes
|
|
38
|
-
|
|
39
|
-
- Updated dependencies [e6cd96a]
|
|
40
|
-
- @forge/manifest@10.0.0-next.10
|
|
41
|
-
|
|
42
|
-
## 8.0.0-next.10
|
|
43
|
-
|
|
44
|
-
### Patch Changes
|
|
45
|
-
|
|
46
|
-
- Updated dependencies [33c5750]
|
|
47
|
-
- @forge/manifest@10.0.0-next.9
|
|
48
|
-
|
|
49
3
|
## 8.0.0-next.9
|
|
50
4
|
|
|
51
5
|
### Patch Changes
|
|
@@ -18,7 +18,7 @@ export declare class LogsGraphQLClient implements ViewAppLogsClient {
|
|
|
18
18
|
function?: string | undefined;
|
|
19
19
|
trigger?: string | undefined;
|
|
20
20
|
}>;
|
|
21
|
-
viewAppLogsV2(details: AppLogsDetailsV2, invocationMap: Map<string, Invocation>,
|
|
21
|
+
viewAppLogsV2(details: AppLogsDetailsV2, invocationMap: Map<string, Invocation>, totalRecieved: number): Promise<Invocation[]>;
|
|
22
22
|
viewAppLogs(details: AppLogsDetails): Promise<Invocation[]>;
|
|
23
23
|
private extractInvocationInfo;
|
|
24
24
|
private extractLogLines;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/app-logs/graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6E,aAAa,EAAE,MAAM,YAAY,CAAC;AAEtH,OAAO,EACL,wBAAwB,EACxB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACj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AAqB;IAU7B,OAAO,CAAC,eAAe;YAcT,iBAAiB;CAqDhC"}
|
|
@@ -34,7 +34,7 @@ class LogsGraphQLClient {
|
|
|
34
34
|
logs: result.lines.map(sanitizeLogLine)
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
async viewAppLogsV2(details, invocationMap,
|
|
37
|
+
async viewAppLogsV2(details, invocationMap, totalRecieved) {
|
|
38
38
|
const query = `
|
|
39
39
|
query forge_cli_getApplicationLogsV2(
|
|
40
40
|
$appId: String!,
|
|
@@ -79,48 +79,33 @@ class LogsGraphQLClient {
|
|
|
79
79
|
throw new MissingAppLogsError();
|
|
80
80
|
}
|
|
81
81
|
for (const logLine of result.appLogsWithMetaData.appLogs) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
logsMetadata.logs.push({
|
|
94
|
-
message: logLine.message || undefined,
|
|
95
|
-
other: logLine.other ? JSON.parse(logLine.other) : [],
|
|
96
|
-
level: logLine.lvl || undefined,
|
|
97
|
-
timestamp: logLine.ts
|
|
98
|
-
});
|
|
99
|
-
invocationMap.set(logLine.invocationId, logsMetadata);
|
|
82
|
+
let logsMetadata = invocationMap.get(logLine.invocationId);
|
|
83
|
+
if (!logsMetadata) {
|
|
84
|
+
logsMetadata = {
|
|
85
|
+
id: logLine.invocationId,
|
|
86
|
+
appVersion: logLine.appVersion,
|
|
87
|
+
function: logLine.functionKey || undefined,
|
|
88
|
+
trigger: undefined,
|
|
89
|
+
logs: []
|
|
90
|
+
};
|
|
100
91
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
{
|
|
107
|
-
message: logLine.message || undefined,
|
|
108
|
-
other: logLine.other ? JSON.parse(logLine.other) : [],
|
|
109
|
-
level: logLine.lvl || undefined,
|
|
110
|
-
timestamp: logLine.ts
|
|
111
|
-
}
|
|
112
|
-
]
|
|
92
|
+
logsMetadata.logs.push({
|
|
93
|
+
message: logLine.message || undefined,
|
|
94
|
+
other: logLine.other ? JSON.parse(logLine.other) : [],
|
|
95
|
+
level: logLine.lvl || undefined,
|
|
96
|
+
timestamp: logLine.ts
|
|
113
97
|
});
|
|
98
|
+
invocationMap.set(logLine.invocationId, logsMetadata);
|
|
114
99
|
}
|
|
115
100
|
const serverSideMaxLimit = result.appLogsWithMetaData.appLogs.length;
|
|
116
101
|
totalRecieved += serverSideMaxLimit;
|
|
117
102
|
if (result.appLogsWithMetaData.hasNextPage && details.maxLimit > totalRecieved) {
|
|
118
103
|
details.offset = details.offset + serverSideMaxLimit;
|
|
119
104
|
details.limit = details.limit - serverSideMaxLimit;
|
|
120
|
-
return this.viewAppLogsV2(details, invocationMap,
|
|
105
|
+
return this.viewAppLogsV2(details, invocationMap, totalRecieved);
|
|
121
106
|
}
|
|
122
107
|
const invocations = [...invocationMap.values()];
|
|
123
|
-
return
|
|
108
|
+
return invocations;
|
|
124
109
|
}
|
|
125
110
|
async viewAppLogs(details) {
|
|
126
111
|
const query = `
|
|
@@ -18,13 +18,11 @@ export interface QueryDetails {
|
|
|
18
18
|
context?: InstallContext;
|
|
19
19
|
startTime?: string | null;
|
|
20
20
|
containers?: boolean;
|
|
21
|
-
grouped?: boolean;
|
|
22
21
|
}
|
|
23
22
|
export declare type AppLogsDetails = {
|
|
24
23
|
appId: string;
|
|
25
24
|
environmentId: string;
|
|
26
25
|
limit: number;
|
|
27
|
-
grouped?: boolean;
|
|
28
26
|
startTime?: string | null;
|
|
29
27
|
contextAri?: [Ari];
|
|
30
28
|
runtime?: string | null;
|
|
@@ -62,7 +60,7 @@ export declare enum Runtime {
|
|
|
62
60
|
}
|
|
63
61
|
export interface ViewAppLogsClient {
|
|
64
62
|
viewAppLogs(details: AppLogsDetails): Promise<Invocation[]>;
|
|
65
|
-
viewAppLogsV2(details: AppLogsDetailsV2, invocationMap: Map<string, Invocation>,
|
|
63
|
+
viewAppLogsV2(details: AppLogsDetailsV2, invocationMap: Map<string, Invocation>, totalRecieved: number): Promise<Invocation[]>;
|
|
66
64
|
viewInvocationLogs(details: AppInvocationLogsDetails): Promise<Invocation>;
|
|
67
65
|
}
|
|
68
66
|
export declare class ViewAppLogsCommand {
|
|
@@ -72,7 +70,7 @@ export declare class ViewAppLogsCommand {
|
|
|
72
70
|
private readonly logsClient;
|
|
73
71
|
private readonly statsigService;
|
|
74
72
|
constructor(getAppConfig: AppConfigProvider, appEnvironmentClient: AppEnvironmentClient, globalEdgeClient: GlobalEdgeClient, logsClient: ViewAppLogsClient, statsigService: StatsigService);
|
|
75
|
-
getAll({ environmentKey, limit, context, startTime,
|
|
73
|
+
getAll({ environmentKey, limit, context, startTime, containers }: QueryDetails): Promise<Invocation[]>;
|
|
76
74
|
getLogs(details: AppLogsDetails): Promise<Invocation[]>;
|
|
77
75
|
getOne(details: InvocationQueryDetails): Promise<Invocation>;
|
|
78
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-logs.d.ts","sourceRoot":"","sources":["../../src/app-logs/view-logs.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAmB,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,GAAG,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WA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,CAAC,QAAQ,CAAC,oBAAoB;IACrC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAJd,YAAY,EAAE,iBAAiB,EAC/B,oBAAoB,EAAE,oBAAoB,EAC1C,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,iBAAiB,EAC7B,cAAc,EAAE,cAAc;IAGpC,MAAM,CAAC,EAClB,cAAc,EACd,KAAK,EACL,OAAO,EACP,SAAgB,EAChB,UAAkB,EACnB,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IA8B1B,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IA2BvD,MAAM,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC;CAI1E"}
|
|
@@ -21,7 +21,7 @@ class ViewAppLogsCommand {
|
|
|
21
21
|
this.logsClient = logsClient;
|
|
22
22
|
this.statsigService = statsigService;
|
|
23
23
|
}
|
|
24
|
-
async getAll({ environmentKey, limit, context, startTime = null,
|
|
24
|
+
async getAll({ environmentKey, limit, context, startTime = null, containers = false }) {
|
|
25
25
|
const { id: appId } = await this.getAppConfig();
|
|
26
26
|
const [environmentId, cloudId] = await Promise.all([
|
|
27
27
|
this.appEnvironmentClient.getAppEnvironmentId(appId, environmentKey),
|
|
@@ -33,8 +33,7 @@ class ViewAppLogsCommand {
|
|
|
33
33
|
environmentId,
|
|
34
34
|
limit,
|
|
35
35
|
startTime,
|
|
36
|
-
contextAri: contextAri ? [contextAri] : undefined
|
|
37
|
-
grouped
|
|
36
|
+
contextAri: contextAri ? [contextAri] : undefined
|
|
38
37
|
};
|
|
39
38
|
if (containers) {
|
|
40
39
|
details.runtime = Runtime.CONTAINER.toLowerCase();
|
|
@@ -64,7 +63,7 @@ class ViewAppLogsCommand {
|
|
|
64
63
|
dateSearchInput,
|
|
65
64
|
queryStartTime: earliestStart.toISOString(),
|
|
66
65
|
maxLimit: details.limit
|
|
67
|
-
}, new Map(),
|
|
66
|
+
}, new Map(), 0);
|
|
68
67
|
}
|
|
69
68
|
async getOne(details) {
|
|
70
69
|
return this.logsClient.viewInvocationLogs({ invocationId: details.invocationId });
|