Skip to content

Commit fb8dfd8

Browse files
fix: Generate JavaScript Code from plugin-pb (#174)
This PR was created by a scheduled workflow to regenerate the JavaScript code from `plugin-pb`.
1 parent ffc061b commit fb8dfd8

2 files changed

Lines changed: 19 additions & 40 deletions

File tree

‎protos/plugin/v3/plugin.proto‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ message TestConnection {
248248
}
249249

250250
message AssessTables {
251+
// TABLE_REMOVED applies to tables only, all other values apply to tables and columns
251252
enum Category {
252253
CATEGORY_UNKNOWN = 0;
253254
CATEGORY_NO_CHANGE = 1;
@@ -268,6 +269,7 @@ message AssessTables {
268269
string before = 2;
269270
string after = 3;
270271
}
272+
// Safe mode is a migration with migrate_force false, forced mode with migrate_force true
271273
message ColumnFinding {
272274
string column_name = 1;
273275
Category category = 2;
@@ -285,8 +287,8 @@ message AssessTables {
285287
string forced_mode_behavior = 4;
286288
repeated ColumnFinding columns = 5;
287289
repeated Evidence evidence = 6;
288-
bool coverage_incomplete = 7;
289-
string coverage_incomplete_reason = 8;
290+
// Non-empty when the assessment could not cover the whole table
291+
string incomplete_coverage_reason = 7;
290292
}
291293
message Request {
292294
repeated TablePair tables = 1;

‎protos/plugin/v3/plugin.ts‎

Lines changed: 15 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4151,8 +4151,7 @@ export namespace cloudquery.plugin.v3 {
41514151
forced_mode_behavior?: string;
41524152
columns?: AssessTables.ColumnFinding[];
41534153
evidence?: AssessTables.Evidence[];
4154-
coverage_incomplete?: boolean;
4155-
coverage_incomplete_reason?: string;
4154+
incomplete_coverage_reason?: string;
41564155
}) {
41574156
super();
41584157
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5, 6], this.#one_of_decls);
@@ -4175,11 +4174,8 @@ export namespace cloudquery.plugin.v3 {
41754174
if ("evidence" in data && data.evidence != undefined) {
41764175
this.evidence = data.evidence;
41774176
}
4178-
if ("coverage_incomplete" in data && data.coverage_incomplete != undefined) {
4179-
this.coverage_incomplete = data.coverage_incomplete;
4180-
}
4181-
if ("coverage_incomplete_reason" in data && data.coverage_incomplete_reason != undefined) {
4182-
this.coverage_incomplete_reason = data.coverage_incomplete_reason;
4177+
if ("incomplete_coverage_reason" in data && data.incomplete_coverage_reason != undefined) {
4178+
this.incomplete_coverage_reason = data.incomplete_coverage_reason;
41834179
}
41844180
}
41854181
}
@@ -4219,27 +4215,20 @@ export namespace cloudquery.plugin.v3 {
42194215
set evidence(value: AssessTables.Evidence[]) {
42204216
pb_1.Message.setRepeatedWrapperField(this, 6, value);
42214217
}
4222-
get coverage_incomplete() {
4223-
return pb_1.Message.getFieldWithDefault(this, 7, false) as boolean;
4218+
get incomplete_coverage_reason() {
4219+
return pb_1.Message.getFieldWithDefault(this, 7, "") as string;
42244220
}
4225-
set coverage_incomplete(value: boolean) {
4221+
set incomplete_coverage_reason(value: string) {
42264222
pb_1.Message.setField(this, 7, value);
42274223
}
4228-
get coverage_incomplete_reason() {
4229-
return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
4230-
}
4231-
set coverage_incomplete_reason(value: string) {
4232-
pb_1.Message.setField(this, 8, value);
4233-
}
42344224
static fromObject(data: {
42354225
table_name?: string;
42364226
category?: AssessTables.Category;
42374227
safe_mode_behavior?: string;
42384228
forced_mode_behavior?: string;
42394229
columns?: ReturnType<typeof AssessTables.ColumnFinding.prototype.toObject>[];
42404230
evidence?: ReturnType<typeof AssessTables.Evidence.prototype.toObject>[];
4241-
coverage_incomplete?: boolean;
4242-
coverage_incomplete_reason?: string;
4231+
incomplete_coverage_reason?: string;
42434232
}): TableFinding {
42444233
const message = new TableFinding({});
42454234
if (data.table_name != null) {
@@ -4260,11 +4249,8 @@ export namespace cloudquery.plugin.v3 {
42604249
if (data.evidence != null) {
42614250
message.evidence = data.evidence.map(item => AssessTables.Evidence.fromObject(item));
42624251
}
4263-
if (data.coverage_incomplete != null) {
4264-
message.coverage_incomplete = data.coverage_incomplete;
4265-
}
4266-
if (data.coverage_incomplete_reason != null) {
4267-
message.coverage_incomplete_reason = data.coverage_incomplete_reason;
4252+
if (data.incomplete_coverage_reason != null) {
4253+
message.incomplete_coverage_reason = data.incomplete_coverage_reason;
42684254
}
42694255
return message;
42704256
}
@@ -4276,8 +4262,7 @@ export namespace cloudquery.plugin.v3 {
42764262
forced_mode_behavior?: string;
42774263
columns?: ReturnType<typeof AssessTables.ColumnFinding.prototype.toObject>[];
42784264
evidence?: ReturnType<typeof AssessTables.Evidence.prototype.toObject>[];
4279-
coverage_incomplete?: boolean;
4280-
coverage_incomplete_reason?: string;
4265+
incomplete_coverage_reason?: string;
42814266
} = {};
42824267
if (this.table_name != null) {
42834268
data.table_name = this.table_name;
@@ -4297,11 +4282,8 @@ export namespace cloudquery.plugin.v3 {
42974282
if (this.evidence != null) {
42984283
data.evidence = this.evidence.map((item: AssessTables.Evidence) => item.toObject());
42994284
}
4300-
if (this.coverage_incomplete != null) {
4301-
data.coverage_incomplete = this.coverage_incomplete;
4302-
}
4303-
if (this.coverage_incomplete_reason != null) {
4304-
data.coverage_incomplete_reason = this.coverage_incomplete_reason;
4285+
if (this.incomplete_coverage_reason != null) {
4286+
data.incomplete_coverage_reason = this.incomplete_coverage_reason;
43054287
}
43064288
return data;
43074289
}
@@ -4321,10 +4303,8 @@ export namespace cloudquery.plugin.v3 {
43214303
writer.writeRepeatedMessage(5, this.columns, (item: AssessTables.ColumnFinding) => item.serialize(writer));
43224304
if (this.evidence.length)
43234305
writer.writeRepeatedMessage(6, this.evidence, (item: AssessTables.Evidence) => item.serialize(writer));
4324-
if (this.coverage_incomplete != false)
4325-
writer.writeBool(7, this.coverage_incomplete);
4326-
if (this.coverage_incomplete_reason.length)
4327-
writer.writeString(8, this.coverage_incomplete_reason);
4306+
if (this.incomplete_coverage_reason.length)
4307+
writer.writeString(7, this.incomplete_coverage_reason);
43284308
if (!w)
43294309
return writer.getResultBuffer();
43304310
}
@@ -4353,10 +4333,7 @@ export namespace cloudquery.plugin.v3 {
43534333
reader.readMessage(message.evidence, () => pb_1.Message.addToRepeatedWrapperField(message, 6, AssessTables.Evidence.deserialize(reader), AssessTables.Evidence));
43544334
break;
43554335
case 7:
4356-
message.coverage_incomplete = reader.readBool();
4357-
break;
4358-
case 8:
4359-
message.coverage_incomplete_reason = reader.readString();
4336+
message.incomplete_coverage_reason = reader.readString();
43604337
break;
43614338
default: reader.skipField();
43624339
}

0 commit comments

Comments
 (0)