@glassly/cloud-client 0.4.0-dev.1043 → 0.4.0-dev.1051

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glassly/cloud-client",
3
- "version": "0.4.0-dev.1043",
3
+ "version": "0.4.0-dev.1051",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "exports": {
@@ -12,7 +12,7 @@
12
12
  "test": "bun test"
13
13
  },
14
14
  "dependencies": {
15
- "@glassly/cloud-protocol": "0.4.0-dev.1043",
15
+ "@glassly/cloud-protocol": "0.4.0-dev.1051",
16
16
  "tweetnacl": "^1.0.3"
17
17
  },
18
18
  "devDependencies": {
@@ -196,6 +196,7 @@ export class Core {
196
196
  reportId: string,
197
197
  source: string,
198
198
  entries: ReportLogEntry[],
199
+ options?: { replace?: boolean },
199
200
  ): Promise<AddReportArtifactsResult>;
200
201
  addScreenshots(
201
202
  reportId: string,
@@ -99,10 +99,12 @@ export class Reports {
99
99
  return this.http.post<SubmitReportResult>(REPORTS_PATH, input);
100
100
  }
101
101
 
102
+ /** `replace` swaps out the report's earlier log bundles from `source`. */
102
103
  async addLogs(
103
104
  reportId: string,
104
105
  source: string,
105
106
  entries: ReportLogEntry[],
107
+ options: { replace?: boolean } = {},
106
108
  ): Promise<AddReportArtifactsResult> {
107
109
  return await this.http.post<AddReportArtifactsResult>(
108
110
  `${REPORTS_PATH}/${encodeURIComponent(reportId)}/artifacts`,
@@ -110,6 +112,7 @@ export class Reports {
110
112
  type: "logs",
111
113
  source,
112
114
  entries,
115
+ ...(options.replace ? { replace: true } : {}),
113
116
  },
114
117
  );
115
118
  }