Skip to content

Commit

Permalink
added typescript types
Browse files Browse the repository at this point in the history
  • Loading branch information
uebelack committed Feb 17, 2024
1 parent 9ca6974 commit fc9ece9
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
run: yarn install
- name: Lint
run: yarn lint
- name: Types
run: yarn types
- name: Test
run: yarn test --coverage
- name: Coveralls
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</div>

## About
The App Attest service, offers a method for confirming that connections to your server originate from authentic instances of your app. While generating assertions and attestations within your app is relatively straightforward, the process of verifying them on the server side is a bit of a challenge. This library provides two methods for verifying attestations and assertions on the server side for JavaScript based backends.
The App Attest service, offers a method for confirming that connections to your server originate from authentic instances of your app. While generating assertions and attestations within your app is relatively straightforward, the process of verifying them on the server side is a bit of a challenge. This library provides two methods for verifying attestations and assertions on the server side for JavaScript or TypeScript based backends.

See https://developer.apple.com/documentation/devicecheck/establishing_your_app_s_integrity for details.

Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "node-app-attest",
"version": "0.0.4",
"version": "0.0.5",
"description": "A JavaScript implementation of the App Attest protocol, which checks whether clients connecting to your server are valid instances of your app.",
"repository": "https://github.com/uebelack/node-app-attest",
"author": "David Übelacker",
"license": "MIT",
"type": "module",
"main": "src/index.js",
"types": "types/index.d.ts",
"keywords": [
"apple",
"mobile",
Expand All @@ -19,14 +20,16 @@
],
"scripts": {
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"types": "tsc",
"lint": "eslint ."
},
"devDependencies": {
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.6.3",
"jest": "^29.7.0"
"jest": "^29.7.0",
"typescript": "^5.3.3"
},
"dependencies": {
"asn1js": "^3.0.5",
Expand Down
11 changes: 11 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"include": ["src/**/*"],
"compilerOptions": {
"allowJs": true,
"skipLibCheck": true,
"declaration": true,
"emitDeclarationOnly": true,
"outDir": "types",
"declarationMap": true,
}
}
4 changes: 4 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import verifyAttestation from './verifyAttestation.js';
import verifyAssertion from './verifyAssertion.js';
export { verifyAttestation, verifyAssertion };
//# sourceMappingURL=index.d.ts.map
1 change: 1 addition & 0 deletions types/index.d.ts.map

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

5 changes: 5 additions & 0 deletions types/verifyAssertion.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default verifyAssertion;
declare function verifyAssertion(params: any): {
signCount: any;
};
//# sourceMappingURL=verifyAssertion.d.ts.map
1 change: 1 addition & 0 deletions types/verifyAssertion.d.ts.map

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

7 changes: 7 additions & 0 deletions types/verifyAttestation.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default verifyAttestation;
declare function verifyAttestation(params: any): {
keyId: any;
publicKey: any;
environment: string;
};
//# sourceMappingURL=verifyAttestation.d.ts.map
1 change: 1 addition & 0 deletions types/verifyAttestation.d.ts.map

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

5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3328,6 +3328,11 @@ typed-array-length@^1.0.4:
for-each "^0.3.3"
is-typed-array "^1.1.9"

typescript@^5.3.3:
version "5.3.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==

unbox-primitive@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e"
Expand Down

0 comments on commit fc9ece9

Please sign in to comment.