diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 8b0ef6c..0b495a7 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -1,6 +1,7 @@ name: "Run Buf Code Generation" on: + workflow_dispatch: {} workflow_call: inputs: codegen-artifact: @@ -29,8 +30,9 @@ jobs: node-version: 20.11.0 cache: "npm" - - name: Add node_modules to PATH - run: echo "$(pwd)/node_modules/.bin" >> "$GITHUB_PATH" + - name: Install node protoc plugins + run: | + npm install -g @bufbuild/protoc-gen-es @connectrpc/protoc-gen-connect-es - name: Install Prost from Cargo uses: baptiste0928/cargo-install@v2 @@ -52,11 +54,6 @@ jobs: with: crate: protoc-gen-tonic - - name: Install Protoc Plugins from npm - run: | - npm install @connectrpc/protoc-gen-connect-es - npm install @bufbuild/protoc-gen-es - - name: Setup Haskell id: setup-hs uses: haskell-actions/setup@v2 @@ -73,7 +70,9 @@ jobs: uses: actions/cache/restore@v4 id: cache-cabal-build env: - key: ${{ runner.os }}-ghc-${{ steps.setup-hs.outputs.ghc-version }}-cabal-${{ steps.setup-hs.outputs.cabal-version }} + key: + ${{ runner.os }}-ghc-${{ steps.setup-hs.outputs.ghc-version + }}-cabal-${{ steps.setup-hs.outputs.cabal-version }} with: path: ${{ steps.setup-hs.outputs.cabal-store }} key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }} @@ -84,7 +83,7 @@ jobs: run: cabal install proto-lens-protoc-0.8.0.0 - name: Install Buf from npm - run: npm install @bufbuild/buf + run: npm install -g @bufbuild/buf - name: Generate code run: buf generate @@ -92,7 +91,7 @@ jobs: - name: Create codegen artifact uses: actions/upload-artifact@v4 with: - name: ${{ inputs.codegen-artifact }} + name: codegen path: "gen/**" - name: Cache Cabal diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index a27047e..0000000 --- a/package-lock.json +++ /dev/null @@ -1,232 +0,0 @@ -{ - "name": "spec", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "dependencies": { - "@bufbuild/buf": "^1.29.0", - "@bufbuild/protoc-gen-es": "^1.7.0", - "@connectrpc/protoc-gen-connect-es": "^1.3.0" - } - }, - "node_modules/@bufbuild/buf": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/@bufbuild/buf/-/buf-1.29.0.tgz", - "integrity": "sha512-euksXeFtvlvAV5j94LqXb69qQcJvFfo8vN1d3cx+IzhOKoipykuQQTq7mOWVo2R0kdk6yIMBLBofOYOsh0Df8g==", - "hasInstallScript": true, - "bin": { - "buf": "bin/buf", - "protoc-gen-buf-breaking": "bin/protoc-gen-buf-breaking", - "protoc-gen-buf-lint": "bin/protoc-gen-buf-lint" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@bufbuild/buf-darwin-arm64": "1.29.0", - "@bufbuild/buf-darwin-x64": "1.29.0", - "@bufbuild/buf-linux-aarch64": "1.29.0", - "@bufbuild/buf-linux-x64": "1.29.0", - "@bufbuild/buf-win32-arm64": "1.29.0", - "@bufbuild/buf-win32-x64": "1.29.0" - } - }, - "node_modules/@bufbuild/buf-darwin-arm64": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.29.0.tgz", - "integrity": "sha512-5hKxsARoY2WpWq1n5ONFqqGuauHb4yILKXCy37KRYCKiRLWmIP5yI3gWvWHKoH7sUJWTQmBqdJoCvYQr6ahQnw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@bufbuild/buf-darwin-x64": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.29.0.tgz", - "integrity": "sha512-wOAPxbPLBns4AHiComWtdO1sx1J1p6mDYTbqmloHuI+B5U2rDbMsoHoe4nBcoMF8+RHxoqjypha29wVo6yzbZg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@bufbuild/buf-linux-aarch64": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.29.0.tgz", - "integrity": "sha512-jLk2J/wyyM7KNJ/DkLfhy3eS2/Bdb70e/56adMkapSoLJmghnpgxW+oFznMxxQUX5I9BU5hTn1UhDFxgLwhP7g==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@bufbuild/buf-linux-x64": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.29.0.tgz", - "integrity": "sha512-heLOywj3Oaoh69RnTx7tHsuz6rEnvz77bghLEOghsrjBR6Jcpcwc137EZR4kRTIWJNrE8Kmo3RVeXlv144qQIQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@bufbuild/buf-win32-arm64": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.29.0.tgz", - "integrity": "sha512-Eglyvr3PLqVucuHBcQ61conyBgH9BRaoLpKWcce1gYBVlxMQM1NxjVjGOWihxQ1dXXw5qZXmYfVODf3gSwPMuQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@bufbuild/buf-win32-x64": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.29.0.tgz", - "integrity": "sha512-wRk6co+nqHqEq4iLolXgej0jUVlWlTtGHjKaq54lTbKZrwxrBgql6qS06abgNPRASX0++XT9m3QRZ97qEIC/HQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@bufbuild/protobuf": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.7.0.tgz", - "integrity": "sha512-jIsRadRsyxf6ERBU1auY2c1k3doFdqh15F4HRZs4BELVuBtpN+3ipkXqcsWE+rD+EQNigeR29SfQ+ES6UX/jGg==" - }, - "node_modules/@bufbuild/protoc-gen-es": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@bufbuild/protoc-gen-es/-/protoc-gen-es-1.7.0.tgz", - "integrity": "sha512-b9LwP8p+9ywtCM1P1pqQBrJF4RPyWbzhM8mTHvLEtHglogso70kmDmoIcqJ+kS/+65Bc7ilHFVGJF95GceLy1Q==", - "dependencies": { - "@bufbuild/protobuf": "^1.7.0", - "@bufbuild/protoplugin": "1.7.0" - }, - "bin": { - "protoc-gen-es": "bin/protoc-gen-es" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@bufbuild/protobuf": "1.7.0" - }, - "peerDependenciesMeta": { - "@bufbuild/protobuf": { - "optional": true - } - } - }, - "node_modules/@bufbuild/protoplugin": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-1.7.0.tgz", - "integrity": "sha512-NgiGDjef/yijoVxevLLlIWY7RAqNmBEADMgdJ4VKvvlyNnO6xNslFZx/g+jlY2KW+vKjj+2Fcr3n0fSDDN4Asw==", - "dependencies": { - "@bufbuild/protobuf": "1.7.0", - "@typescript/vfs": "^1.4.0", - "typescript": "4.5.2" - } - }, - "node_modules/@connectrpc/protoc-gen-connect-es": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@connectrpc/protoc-gen-connect-es/-/protoc-gen-connect-es-1.3.0.tgz", - "integrity": "sha512-UbQN48c0zafo5EFSsh3POIJP6ofYiAgKE1aFOZ2Er4W3flUYihydZdM6TQauPkn7jDj4w9jjLSTTZ9//ecUbPA==", - "dependencies": { - "@bufbuild/protobuf": "^1.6.0", - "@bufbuild/protoplugin": "^1.6.0" - }, - "bin": { - "protoc-gen-connect-es": "bin/protoc-gen-connect-es" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "@bufbuild/protoc-gen-es": "^1.6.0", - "@connectrpc/connect": "1.3.0" - }, - "peerDependenciesMeta": { - "@bufbuild/protoc-gen-es": { - "optional": true - }, - "@connectrpc/connect": { - "optional": true - } - } - }, - "node_modules/@typescript/vfs": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.5.0.tgz", - "integrity": "sha512-AJS307bPgbsZZ9ggCT3wwpg3VbTKMFNHfaY/uF0ahSkYYrPF2dSSKDNIDIQAHm9qJqbLvCsSJH7yN4Vs/CsMMg==", - "dependencies": { - "debug": "^4.1.1" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/typescript": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", - "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 404bb4e..0000000 --- a/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "dependencies": { - "@bufbuild/buf": "^1.29.0", - "@bufbuild/protoc-gen-es": "^1.7.0", - "@connectrpc/protoc-gen-connect-es": "^1.3.0" - } -}