Skip to content

Commit

Permalink
Switch to standard TypeScript import formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarron committed Sep 18, 2019
1 parent 2e4b90e commit e09116d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/bin/webauthn-json.ts
@@ -1,13 +1,13 @@
/* tslint:disable:no-console no-var-requires */ /* tslint:disable:no-console no-var-requires */


declare const version: string; declare const version: string;
import {schema} from "../index"; import { schema } from "../index";


const help = `Usage: ${process.argv[1]} schema`; const help = `Usage: ${process.argv[1]} schema`;


const command = process.argv[2]; const command = process.argv[2];
if (command === "schema") { if (command === "schema") {
const schemaWithVersion = {...schema, version}; const schemaWithVersion = { ...schema, version };
console.log(JSON.stringify(schemaWithVersion, null, " ")); console.log(JSON.stringify(schemaWithVersion, null, " "));
} else { } else {
console.log(help); console.log(help);
Expand Down
8 changes: 4 additions & 4 deletions src/webauthn.ts
@@ -1,7 +1,7 @@
import {base64urlToBuffer, bufferToBase64url} from "./base64url"; import { base64urlToBuffer, bufferToBase64url } from "./base64url";
import {CredentialCreationOptionsJSON, CredentialRequestOptionsJSON, PublicKeyCredentialWithAssertionJSON, PublicKeyCredentialWithAttestationJSON} from "./json"; import { CredentialCreationOptionsJSON, CredentialRequestOptionsJSON, PublicKeyCredentialWithAssertionJSON, PublicKeyCredentialWithAttestationJSON } from "./json";
import {convert} from "./schema-format"; import { convert } from "./schema-format";
import {credentialCreationOptions, credentialRequestOptions, publicKeyCredentialWithAssertion, publicKeyCredentialWithAttestation} from "./webauthn-schema"; import { credentialCreationOptions, credentialRequestOptions, publicKeyCredentialWithAssertion, publicKeyCredentialWithAttestation } from "./webauthn-schema";


export async function create(requestJSON: CredentialCreationOptionsJSON): Promise<PublicKeyCredentialWithAttestationJSON> { export async function create(requestJSON: CredentialCreationOptionsJSON): Promise<PublicKeyCredentialWithAttestationJSON> {
const request = convert(base64urlToBuffer, credentialCreationOptions, requestJSON); const request = convert(base64urlToBuffer, credentialCreationOptions, requestJSON);
Expand Down
4 changes: 2 additions & 2 deletions test/arraybuffer.ts
Expand Up @@ -17,7 +17,7 @@ expect.extend({
}; };
} }
} }
return {pass: true, message: () => "OK"}; return { pass: true, message: () => "OK" };
}, },
}); });


Expand All @@ -30,4 +30,4 @@ declare global {
} }


// This is needed to modify the global namespace. // This is needed to modify the global namespace.
export {}; export { };
2 changes: 1 addition & 1 deletion test/base64url.spec.ts
@@ -1,4 +1,4 @@
import {base64urlToBuffer, bufferToBase64url} from "../src/base64url"; import { base64urlToBuffer, bufferToBase64url } from "../src/base64url";
import "./arraybuffer"; import "./arraybuffer";


describe("base64url", () => { describe("base64url", () => {
Expand Down

0 comments on commit e09116d

Please sign in to comment.