Skip to content
Permalink
Browse files

Switch to standard TypeScript import formatting.

  • Loading branch information...
lgarron committed Sep 18, 2019
1 parent 2e4b90e commit e09116d5898d0eb5be7453194bbe362e7d941eed
Showing with 9 additions and 9 deletions.
  1. +2 −2 src/bin/webauthn-json.ts
  2. +4 −4 src/webauthn.ts
  3. +2 −2 test/arraybuffer.ts
  4. +1 −1 test/base64url.spec.ts
@@ -1,13 +1,13 @@
/* tslint:disable:no-console no-var-requires */

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

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

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

export async function create(requestJSON: CredentialCreationOptionsJSON): Promise<PublicKeyCredentialWithAttestationJSON> {
const request = convert(base64urlToBuffer, credentialCreationOptions, requestJSON);
@@ -17,7 +17,7 @@ expect.extend({
};
}
}
return {pass: true, message: () => "OK"};
return { pass: true, message: () => "OK" };
},
});

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

// This is needed to modify the global namespace.
export {};
export { };
@@ -1,4 +1,4 @@
import {base64urlToBuffer, bufferToBase64url} from "../src/base64url";
import { base64urlToBuffer, bufferToBase64url } from "../src/base64url";
import "./arraybuffer";

describe("base64url", () => {

0 comments on commit e09116d

Please sign in to comment.
You can’t perform that action at this time.