Skip to content
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: 3 additions & 0 deletions .github/workflows/typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ jobs:
run: npm run typecheck
- name: Run Unit Tests
run: npm test
env:
INTEROP: true
OSC_ACCESS_TOKEN: ${{ secrets.OSC_ACCESS_TOKEN }}
3 changes: 2 additions & 1 deletion src/cat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,16 @@
* Common Access Token Claims
*/
export type CommonAccessTokenClaims = {
[key: string]: string | number | Map<number | string, any>;

Check warning on line 154 in src/cat.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
};
export type CommonAccessTokenDict = {
[key: string]: string | number | { [key: string]: any };

Check warning on line 157 in src/cat.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
};
export type CommonAccessTokenValue =
| string
| number
| Buffer
| Map<number | string, any>;

Check warning on line 163 in src/cat.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type

/**
* CWT Encryption Key
Expand Down Expand Up @@ -214,7 +214,7 @@
if (key === claimsToLabels['catu'] && !(dict[param] instanceof Map)) {
map.set(
key,
CommonAccessTokenUri.fromDictTags(dict[param] as any).payload

Check warning on line 217 in src/cat.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
);
} else if (
key === claimsToLabels['catr'] &&
Expand Down Expand Up @@ -343,7 +343,8 @@
const decoded = decoder.decode(coseMessage).value;
const coseTag = new cbor.Tag(decoded, 17);
const cwtTag = new cbor.Tag(coseTag, CWT_TAG);
this.data = cbor.encode(cwtTag);
Log(cwtTag, { depth: null });
this.data = encoder.encode(cwtTag);
} else {
const plaintext = cbor.encode(this.payload).toString('hex');
this.data = await cose.mac.create(headers, plaintext, recipient);
Expand Down
Loading