diff --git a/README.md b/README.md index 4442134..36ab149 100644 --- a/README.md +++ b/README.md @@ -207,15 +207,19 @@ Sources that encountered errors will send errors on the `query.{uuid}` subject o ## Building -First install the dependencies: +Install the Go dependencies: ```shell -npm i - go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install connectrpc.com/connect/cmd/protoc-gen-connect-go@latest ``` +Install the Node dependencies: + +```shell +npm i +``` + Run `buf` through `npx` to generate the stubs: ```shell diff --git a/buf.gen.yaml b/buf.gen.yaml index f1d2423..4e79aa5 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,22 +1,16 @@ -version: v1 +version: v2 +clean: true plugins: - - plugin: go + - local: protoc-gen-go out: gen/sdp-go - opt: - - paths=source_relative - - plugin: connect-go + opt: paths=source_relative + - local: protoc-gen-connect-go out: gen/sdp-go - opt: - - paths=source_relative - - plugin: es + opt: paths=source_relative + - local: protoc-gen-es out: gen/sdp-js/src/__generated__/ - opt: - - target=ts,import_extension=.ts - - plugin: connect-es + opt: target=ts + include_imports: true + - local: protoc-gen-connect-query out: gen/sdp-js/src/__generated__/ - opt: - - target=ts,import_extension=.ts - - plugin: connect-query - out: gen/sdp-js/src/__generated__/ - opt: - - target=ts,import_extension=.ts + opt: target=ts diff --git a/buf.yaml b/buf.yaml index e9cedcc..ac4db1d 100644 --- a/buf.yaml +++ b/buf.yaml @@ -1,8 +1,15 @@ -version: v1 +version: v2 name: github.com/overmindtech/sdp +lint: + use: + - STANDARD + except: + - FIELD_NOT_REQUIRED + - PACKAGE_NO_IMPORT_CYCLE + disallow_comment_ignores: true breaking: use: - FILE -lint: - use: - - DEFAULT + except: + - EXTENSION_NO_DELETE + - FIELD_SAME_DEFAULT diff --git a/package-lock.json b/package-lock.json index b6f132e..5fbc4b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,10 +9,9 @@ "version": "1.0.0", "license": "ISC", "devDependencies": { - "@bufbuild/buf": "^1.15.0-1", - "@bufbuild/protoc-gen-es": "^1.2.0", - "@connectrpc/protoc-gen-connect-es": "^1.1.2", - "@connectrpc/protoc-gen-connect-query": "^1.0.0" + "@bufbuild/buf": "^1.47.2", + "@bufbuild/protoc-gen-es": "^2.2.2", + "@connectrpc/protoc-gen-connect-query": "^2.0.0" } }, "node_modules/@bufbuild/buf": { @@ -159,22 +158,15 @@ "node": ">=12" } }, - "node_modules/@bufbuild/protobuf": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.10.0.tgz", - "integrity": "sha512-QDdVFLoN93Zjg36NoQPZfsVH9tZew7wKDKyV5qRdj8ntT4wQCOradQjRaTdwMhWUYsgKsvCINKKm87FdEk96Ag==", - "dev": true, - "license": "(Apache-2.0 AND BSD-3-Clause)" - }, "node_modules/@bufbuild/protoc-gen-es": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@bufbuild/protoc-gen-es/-/protoc-gen-es-1.10.0.tgz", - "integrity": "sha512-zBYBsVT/ul4uZb6F+kD7/k4sWNHVVbEPfJwKi0FDr+9VJo8MKIofI6pkr5ksBLr4fi/74r+e/75Xi/0clL5dXg==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@bufbuild/protoc-gen-es/-/protoc-gen-es-2.2.3.tgz", + "integrity": "sha512-hdhIV9NmwXXy24DcbnArauv6L5Dv2PjkO9gz2DUhiZ9HPRpP+rmpT8zo5LohjJiuA7YIQGGKKWSKpRg+xcdLSQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@bufbuild/protobuf": "^1.10.0", - "@bufbuild/protoplugin": "1.10.0" + "@bufbuild/protobuf": "^2.2.3", + "@bufbuild/protoplugin": "2.2.3" }, "bin": { "protoc-gen-es": "bin/protoc-gen-es" @@ -183,7 +175,7 @@ "node": ">=14" }, "peerDependencies": { - "@bufbuild/protobuf": "1.10.0" + "@bufbuild/protobuf": "2.2.3" }, "peerDependenciesMeta": { "@bufbuild/protobuf": { @@ -191,56 +183,48 @@ } } }, - "node_modules/@bufbuild/protoplugin": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-1.10.0.tgz", - "integrity": "sha512-u6NE4vL0lw1+EK4/PiE/SQB7fKO4LRJNTEScIXVOi2x88K/c8WKc/k0KyEaA0asVBMpwekJQZGnRyj04ZtN5Gg==", + "node_modules/@bufbuild/protoc-gen-es/node_modules/@bufbuild/protobuf": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.2.3.tgz", + "integrity": "sha512-tFQoXHJdkEOSwj5tRIZSPNUuXK3RaR7T1nUrPgbYX1pUbvqqaaZAsfo+NXBPsz5rZMSKVFrgK1WL8Q/MSLvprg==", "dev": true, - "license": "(Apache-2.0 AND BSD-3-Clause)", + "license": "(Apache-2.0 AND BSD-3-Clause)" + }, + "node_modules/@bufbuild/protoc-gen-es/node_modules/@bufbuild/protoplugin": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-2.2.3.tgz", + "integrity": "sha512-UsV7mj6NJTZrqIYJK+jNFnnj5tOS7wgNXKyMjebFEpf+OX6pfXE+nx+QPjumOfu4GxdVPfEDnKuwISgqlXSQqw==", + "dev": true, + "license": "Apache-2.0", "dependencies": { - "@bufbuild/protobuf": "1.10.0", - "@typescript/vfs": "^1.4.0", - "typescript": "4.5.2" + "@bufbuild/protobuf": "2.2.3", + "@typescript/vfs": "^1.5.2", + "typescript": "5.4.5" } }, - "node_modules/@connectrpc/protoc-gen-connect-es": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@connectrpc/protoc-gen-connect-es/-/protoc-gen-connect-es-1.6.1.tgz", - "integrity": "sha512-0fHcaADd+GKM0I/koIQpmKg7b+QL18bXlggTUYEAlMFzsd4zN/ApG3235hdUcRyhrAOAItTXxh8ZAV/nNd43Gg==", + "node_modules/@bufbuild/protoc-gen-es/node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true, "license": "Apache-2.0", - "dependencies": { - "@bufbuild/protobuf": "^1.10.0", - "@bufbuild/protoplugin": "^1.10.0" - }, "bin": { - "protoc-gen-connect-es": "bin/protoc-gen-connect-es" + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "@bufbuild/protoc-gen-es": "^1.10.0", - "@connectrpc/connect": "1.6.1" - }, - "peerDependenciesMeta": { - "@bufbuild/protoc-gen-es": { - "optional": true - }, - "@connectrpc/connect": { - "optional": true - } + "node": ">=14.17" } }, "node_modules/@connectrpc/protoc-gen-connect-query": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@connectrpc/protoc-gen-connect-query/-/protoc-gen-connect-query-1.4.2.tgz", - "integrity": "sha512-F2cdrN8p3q+ASO10FgS1ijStkB7QCGsjvLtYPfopCL53zusNbV6W7+0N61QoGJrV/4rdj1gHCigSRCopDcivAg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@connectrpc/protoc-gen-connect-query/-/protoc-gen-connect-query-2.0.0.tgz", + "integrity": "sha512-19L2C+E2JKmt+ZRXj0L2B/htCAJGLPDkg8p9zm0BNgAFaXRmAFiPE1yoozvX6QUVo4JvbEeHWBgoB566/ryN+w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@bufbuild/protobuf": "^1.10.0", - "@bufbuild/protoplugin": "^1.10.0" + "@bufbuild/protobuf": "^2.2.1", + "@bufbuild/protoplugin": "^2.2.1" }, "bin": { "protoc-gen-connect-query": "bin/protoc-gen-connect-query" @@ -249,7 +233,7 @@ "node": ">=16" }, "peerDependencies": { - "@bufbuild/protoc-gen-es": "1.x" + "@bufbuild/protoc-gen-es": "2.x" }, "peerDependenciesMeta": { "@bufbuild/protoc-gen-es": { @@ -257,6 +241,39 @@ } } }, + "node_modules/@connectrpc/protoc-gen-connect-query/node_modules/@bufbuild/protobuf": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.2.3.tgz", + "integrity": "sha512-tFQoXHJdkEOSwj5tRIZSPNUuXK3RaR7T1nUrPgbYX1pUbvqqaaZAsfo+NXBPsz5rZMSKVFrgK1WL8Q/MSLvprg==", + "dev": true, + "license": "(Apache-2.0 AND BSD-3-Clause)" + }, + "node_modules/@connectrpc/protoc-gen-connect-query/node_modules/@bufbuild/protoplugin": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-2.2.3.tgz", + "integrity": "sha512-UsV7mj6NJTZrqIYJK+jNFnnj5tOS7wgNXKyMjebFEpf+OX6pfXE+nx+QPjumOfu4GxdVPfEDnKuwISgqlXSQqw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@bufbuild/protobuf": "2.2.3", + "@typescript/vfs": "^1.5.2", + "typescript": "5.4.5" + } + }, + "node_modules/@connectrpc/protoc-gen-connect-query/node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/@typescript/vfs": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.6.0.tgz", @@ -301,6 +318,7 @@ "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index 9570799..b9f5245 100644 --- a/package.json +++ b/package.json @@ -17,9 +17,8 @@ }, "homepage": "https://github.com/overmindtech/sdp#readme", "devDependencies": { - "@bufbuild/buf": "^1.15.0-1", - "@bufbuild/protoc-gen-es": "^1.2.0", - "@connectrpc/protoc-gen-connect-es": "^1.1.2", - "@connectrpc/protoc-gen-connect-query": "^1.0.0" + "@bufbuild/buf": "^1.47.2", + "@bufbuild/protoc-gen-es": "^2.2.2", + "@connectrpc/protoc-gen-connect-query": "^2.0.0" } }