-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from PeculiarVentures/update-deps
Update dependencies and improve code structure
- Loading branch information
Showing
313 changed files
with
5,094 additions
and
4,030 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"semi": true, | ||
"trailingComma": "all", | ||
"singleQuote": false, | ||
"printWidth": 100 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// @ts-check | ||
|
||
import eslint from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
export default tseslint.config( | ||
eslint.configs.recommended, | ||
tseslint.configs.recommended, | ||
{ | ||
ignores: ['packages/*/build/**', 'packages/*/*.mjs'], | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
// eslint-disable-next-line no-undef | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
roots: ['<rootDir>/packages'], | ||
testMatch: ['**/*.spec.ts', '**/test/**/*.ts'], | ||
moduleNameMapper: { | ||
'^@peculiar/asn1-(.*)$': '<rootDir>/packages/$1/src' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export enum Version { | ||
v1 = 1, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import * as assert from "assert"; | ||
import * as assert from "node:assert"; | ||
import { AsnConvert } from "@peculiar/asn1-schema"; | ||
import { Timestamp, Version } from "../src"; | ||
|
||
context("adobe-acrobat", () => { | ||
|
||
context("Timestamp", () => { | ||
|
||
describe("adobe-acrobat", () => { | ||
describe("Timestamp", () => { | ||
it("parse", () => { | ||
const hex = "304c0201018644687474703a2f2f6161746c2d74696d657374616d702e676c6f62616c7369676e2e636f6d2f7473612f616f68666577617432333839353335666e6173676e6c67356d3233010100"; | ||
const hex = | ||
"304c0201018644687474703a2f2f6161746c2d74696d657374616d702e676c6f62616c7369676e2e636f6d2f7473612f616f68666577617432333839353335666e6173676e6c67356d3233010100"; | ||
|
||
const timestamp = AsnConvert.parse(Buffer.from(hex, "hex"), Timestamp); | ||
assert.strictEqual(timestamp.version, Version.v1); | ||
assert.strictEqual(timestamp.location.uniformResourceIdentifier, "http://aatl-timestamp.globalsign.com/tsa/aohfewat2389535fnasgnlg5m23"); | ||
assert.strictEqual( | ||
timestamp.location.uniformResourceIdentifier, | ||
"http://aatl-timestamp.globalsign.com/tsa/aohfewat2389535fnasgnlg5m23", | ||
); | ||
assert.strictEqual(timestamp.requiresAuth, false); | ||
}); | ||
|
||
}); | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.