Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: No files generated by Buf.build inside NPM package [DEV-3499] #206

Merged
merged 2 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ jobs:
with:
node-version: 18
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: "Install buf CLI"
uses: bufbuild/buf-setup-action@v1.28.1
with:
buf_user: ${{ secrets.BUF_USER }}
buf_api_token: ${{ secrets.BUF_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: "Clean install dependencies"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
- name: "Install buf CLI"
uses: bufbuild/buf-setup-action@v1.28.1
with:
buf_user: ${{ secrets.BUF_USER }}
buf_api_token: ${{ secrets.BUF_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Build
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
- name: "Install buf CLI"
uses: bufbuild/buf-setup-action@v1.28.1
with:
buf_user: ${{ secrets.BUF_USER }}
buf_api_token: ${{ secrets.BUF_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Generate TypeScript code for Protobufs
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
with:
node-version: 18
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: "Obtain Github App token"
id: app-token
Expand All @@ -32,6 +31,8 @@ jobs:
- name: "Install buf CLI"
uses: bufbuild/buf-setup-action@v1.28.1
with:
buf_user: ${{ secrets.BUF_USER }}
buf_api_token: ${{ secrets.BUF_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: "Clean install dependencies"
Expand Down
2 changes: 1 addition & 1 deletion cheqd/did/v2/diddoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ type Exact<P, I extends P> = P extends Builtin ? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };

function toTimestamp(date: Date): Timestamp {
const seconds = numberToLong(date.getTime() / 1_000);
const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
const nanos = (date.getTime() % 1_000) * 1_000_000;
return { seconds, nanos };
}
Expand Down
2 changes: 1 addition & 1 deletion cheqd/resource/v2/resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ type Exact<P, I extends P> = P extends Builtin ? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };

function toTimestamp(date: Date): Timestamp {
const seconds = numberToLong(date.getTime() / 1_000);
const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
const nanos = (date.getTime() % 1_000) * 1_000_000;
return { seconds, nanos };
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"type": "module",
"files": [
"amino/**/*",
"cheqd/**/*",
"cosmos/**/*",
"cosmos_proto/**/*",
Expand Down