diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cc7fc76..e4df6aa 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.0.16" + ".": "0.0.17" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 66d6aa2..5ee21e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [0.0.17](https://github.com/cloudquery/plugin-pb-javascript/compare/v0.0.16...v0.0.17) (2024-04-01) + + +### Bug Fixes + +* **deps:** Update dependency @grpc/grpc-js to v1.10.4 ([#48](https://github.com/cloudquery/plugin-pb-javascript/issues/48)) ([de6ded9](https://github.com/cloudquery/plugin-pb-javascript/commit/de6ded95b65291735fc3729aba1a5d3437366b02)) +* **deps:** Update dependency @tsconfig/node16 to v16.1.3 ([#49](https://github.com/cloudquery/plugin-pb-javascript/issues/49)) ([5371541](https://github.com/cloudquery/plugin-pb-javascript/commit/5371541871dadaecbae82fdb91bf86172a281f8a)) +* Generate JavaScript Code from `plugin-pb` ([#46](https://github.com/cloudquery/plugin-pb-javascript/issues/46)) ([d189960](https://github.com/cloudquery/plugin-pb-javascript/commit/d189960566558e1c7b3f06e81985ccc35493b0e9)) + ## [0.0.16](https://github.com/cloudquery/plugin-pb-javascript/compare/v0.0.15...v0.0.16) (2024-03-01) diff --git a/package-lock.json b/package-lock.json index 78d41b5..001248b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@cloudquery/plugin-pb-javascript", - "version": "0.0.16", + "version": "0.0.17", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@cloudquery/plugin-pb-javascript", - "version": "0.0.16", + "version": "0.0.17", "license": "MPL-2.0", "dependencies": { "google-protobuf": "^3.21.2" @@ -24,27 +24,26 @@ } }, "node_modules/@grpc/grpc-js": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.10.1.tgz", - "integrity": "sha512-55ONqFytZExfOIjF1RjXPcVmT/jJqFzbbDqxK9jmRV4nxiYWtL9hENSW1Jfx0SdZfrvoqd44YJ/GJTqfRrawSQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.10.4.tgz", + "integrity": "sha512-MqBisuxTkYvPFnEiu+dag3xG/NBUDzSbAFAWlzfkGnQkjVZ6by3h4atbBc+Ikqup1z5BfB4BN18gKWR1YyppNw==", "dev": true, "dependencies": { - "@grpc/proto-loader": "^0.7.8", - "@types/node": ">=12.12.47" + "@grpc/proto-loader": "^0.7.10", + "@js-sdsl/ordered-map": "^4.4.2" }, "engines": { - "node": "^8.13.0 || >=10.10.0" + "node": ">=12.10.0" } }, "node_modules/@grpc/proto-loader": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.8.tgz", - "integrity": "sha512-GU12e2c8dmdXb7XUlOgYWZ2o2i+z9/VeACkxTA/zzAe2IjclC5PnVL0lpgjhrqfpDYHzM8B1TF6pqWegMYAzlA==", + "version": "0.7.12", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.12.tgz", + "integrity": "sha512-DCVwMxqYzpUCiDMl7hQ384FqP4T3DbNpXU8pt681l3UWCip1WUiD5JrkImUwCB9a7f2cq4CUTmi5r/xIMRPY1Q==", "dev": true, "dependencies": { - "@types/long": "^4.0.1", "lodash.camelcase": "^4.3.0", - "long": "^4.0.0", + "long": "^5.0.0", "protobufjs": "^7.2.4", "yargs": "^17.7.2" }, @@ -55,6 +54,16 @@ "node": ">=6" } }, + "node_modules/@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, "node_modules/@mapbox/node-pre-gyp": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", @@ -140,9 +149,9 @@ "dev": true }, "node_modules/@tsconfig/node16": { - "version": "16.1.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-16.1.1.tgz", - "integrity": "sha512-+pio93ejHN4nINX4pXqfnR/fPLRtJBaT4ORaa5RH0Oc1zoYmo2B2koG+M328CQhHKn1Wj6FcOxCDFXAot9NhvA==", + "version": "16.1.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-16.1.3.tgz", + "integrity": "sha512-9nTOUBn+EMKO6rtSZJk+DcqsfgtlERGT9XPJ5PRj/HNENPCBY1yu/JEj5wT6GLtbCLBO2k46SeXDaY0pjMqypw==", "dev": true }, "node_modules/@types/google-protobuf": { @@ -151,12 +160,6 @@ "integrity": "sha512-40um9QqwHjRS92qnOaDpL7RmDK15NuZYo9HihiJRbYkMQZlWnuH8AdvbMy8/o6lgLmKbDUKa+OALCltHdbOTpQ==", "dev": true }, - "node_modules/@types/long": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", - "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==", - "dev": true - }, "node_modules/@types/node": { "version": "20.4.6", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.6.tgz", @@ -498,9 +501,9 @@ "dev": true }, "node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", "dev": true }, "node_modules/lru-cache": { @@ -701,12 +704,6 @@ "node": ">=12.0.0" } }, - "node_modules/protobufjs/node_modules/long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", - "dev": true - }, "node_modules/protoc-gen-ts": { "version": "0.8.7", "resolved": "https://registry.npmjs.org/protoc-gen-ts/-/protoc-gen-ts-0.8.7.tgz", diff --git a/package.json b/package.json index c49207f..48fa96f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cloudquery/plugin-pb-javascript", - "version": "0.0.16", + "version": "0.0.17", "files": [ "dist" ], 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(); } }