From d189960566558e1c7b3f06e81985ccc35493b0e9 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 25 Mar 2024 16:03:53 +0200 Subject: [PATCH] fix: Generate JavaScript Code from `plugin-pb` (#46) This PR was created by a scheduled workflow to regenerate the JavaScript code from `plugin-pb`. --- protos/plugin/v3/plugin.proto | 1 + protos/plugin/v3/plugin.ts | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/protos/plugin/v3/plugin.proto b/protos/plugin/v3/plugin.proto index b823fb5..116541b 100644 --- a/protos/plugin/v3/plugin.proto +++ b/protos/plugin/v3/plugin.proto @@ -58,6 +58,7 @@ message Init { message Request { bytes spec = 1; // Internal plugin-specific spec bool no_connection = 2; // A flag to indicate plugins should skip establishing a connection + string invocation_id = 3; // unique execution_id that will identify the invocation (sync, migrate etc) } message Response {} } diff --git a/protos/plugin/v3/plugin.ts b/protos/plugin/v3/plugin.ts index 6c5ef7e..fb7a6a4 100644 --- a/protos/plugin/v3/plugin.ts +++ b/protos/plugin/v3/plugin.ts @@ -512,6 +512,7 @@ export namespace cloudquery.plugin.v3 { constructor(data?: any[] | { spec?: Uint8Array; no_connection?: boolean; + invocation_id?: string; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); @@ -522,6 +523,9 @@ export namespace cloudquery.plugin.v3 { if ("no_connection" in data && data.no_connection != undefined) { this.no_connection = data.no_connection; } + if ("invocation_id" in data && data.invocation_id != undefined) { + this.invocation_id = data.invocation_id; + } } } get spec() { @@ -536,9 +540,16 @@ export namespace cloudquery.plugin.v3 { set no_connection(value: boolean) { pb_1.Message.setField(this, 2, value); } + get invocation_id() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set invocation_id(value: string) { + pb_1.Message.setField(this, 3, value); + } static fromObject(data: { spec?: Uint8Array; no_connection?: boolean; + invocation_id?: string; }): Request { const message = new Request({}); if (data.spec != null) { @@ -547,12 +558,16 @@ export namespace cloudquery.plugin.v3 { if (data.no_connection != null) { message.no_connection = data.no_connection; } + if (data.invocation_id != null) { + message.invocation_id = data.invocation_id; + } return message; } toObject() { const data: { spec?: Uint8Array; no_connection?: boolean; + invocation_id?: string; } = {}; if (this.spec != null) { data.spec = this.spec; @@ -560,6 +575,9 @@ export namespace cloudquery.plugin.v3 { if (this.no_connection != null) { data.no_connection = this.no_connection; } + if (this.invocation_id != null) { + data.invocation_id = this.invocation_id; + } return data; } serialize(): Uint8Array; @@ -570,6 +588,8 @@ export namespace cloudquery.plugin.v3 { writer.writeBytes(1, this.spec); if (this.no_connection != false) writer.writeBool(2, this.no_connection); + if (this.invocation_id.length) + writer.writeString(3, this.invocation_id); if (!w) return writer.getResultBuffer(); } @@ -585,6 +605,9 @@ export namespace cloudquery.plugin.v3 { case 2: message.no_connection = reader.readBool(); break; + case 3: + message.invocation_id = reader.readString(); + break; default: reader.skipField(); } }