@protontech/pass-rust-core
Advanced tools
Comparing version 0.7.6 to 0.7.7
{ | ||
"name": "@protontech/pass-rust-core", | ||
"version": "0.7.6", | ||
"version": "0.7.7", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "proton_pass_web_bg.wasm", |
@@ -7,2 +7,22 @@ let wasm; | ||
const heap = new Array(128).fill(undefined); | ||
heap.push(undefined, null, true, false); | ||
function getObject(idx) { return heap[idx]; } | ||
let heap_next = heap.length; | ||
function dropObject(idx) { | ||
if (idx < 132) return; | ||
heap[idx] = heap_next; | ||
heap_next = idx; | ||
} | ||
function takeObject(idx) { | ||
const ret = getObject(idx); | ||
dropObject(idx); | ||
return ret; | ||
} | ||
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; | ||
@@ -28,8 +48,2 @@ | ||
const heap = new Array(128).fill(undefined); | ||
heap.push(undefined, null, true, false); | ||
let heap_next = heap.length; | ||
function addHeapObject(obj) { | ||
@@ -44,16 +58,2 @@ if (heap_next === heap.length) heap.push(heap.length + 1); | ||
function getObject(idx) { return heap[idx]; } | ||
function dropObject(idx) { | ||
if (idx < 132) return; | ||
heap[idx] = heap_next; | ||
heap_next = idx; | ||
} | ||
function takeObject(idx) { | ||
const ret = getObject(idx); | ||
dropObject(idx); | ||
return ret; | ||
} | ||
let WASM_VECTOR_LEN = 0; | ||
@@ -524,2 +524,33 @@ | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
export function get_root_domain(input) { | ||
let deferred3_0; | ||
let deferred3_1; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.get_root_domain(retptr, ptr0, len0); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
var r3 = getInt32Memory0()[retptr / 4 + 3]; | ||
var ptr2 = r0; | ||
var len2 = r1; | ||
if (r3) { | ||
ptr2 = 0; len2 = 0; | ||
throw takeObject(r2); | ||
} | ||
deferred3_0 = ptr2; | ||
deferred3_1 = len2; | ||
return getStringFromWasm0(ptr2, len2); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); | ||
} | ||
} | ||
function handleError(f, args) { | ||
@@ -533,2 +564,6 @@ try { | ||
export function __wbindgen_object_drop_ref(arg0) { | ||
takeObject(arg0); | ||
}; | ||
export function __wbindgen_error_new(arg0, arg1) { | ||
@@ -539,11 +574,2 @@ const ret = new Error(getStringFromWasm0(arg0, arg1)); | ||
export function __wbindgen_object_clone_ref(arg0) { | ||
const ret = getObject(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
export function __wbindgen_object_drop_ref(arg0) { | ||
takeObject(arg0); | ||
}; | ||
export function __wbindgen_is_undefined(arg0) { | ||
@@ -585,2 +611,7 @@ const ret = getObject(arg0) === undefined; | ||
export function __wbindgen_object_clone_ref(arg0) { | ||
const ret = getObject(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
export function __wbg_new_abda76e883ba8a5f() { | ||
@@ -587,0 +618,0 @@ const ret = new Error(); |
@@ -93,40 +93,7 @@ /* tslint:disable */ | ||
export function parse_create_passkey_data(request: string): WasmCreatePasskeyData; | ||
export type WasmCreditCardType = "Visa" | "Mastercard" | "AmericanExpress" | "DinersClub" | "Discover" | "JCB" | "UnionPay" | "Maestro" | "Elo" | "Mir" | "Hiper" | "Hipercard" | "Unknown"; | ||
export type WasmStringList = string[]; | ||
export interface WasmLogin { | ||
title: string; | ||
username: string; | ||
password: string; | ||
totp: string | undefined; | ||
urls: string[]; | ||
} | ||
export interface WasmRandomPasswordConfig { | ||
length: number; | ||
numbers: boolean; | ||
uppercase_letters: boolean; | ||
symbols: boolean; | ||
} | ||
export type WasmWordSeparator = "Hyphens" | "Spaces" | "Periods" | "Commas" | "Underscores" | "Numbers" | "NumbersAndSymbols"; | ||
export interface WasmPassphraseConfig { | ||
separator: WasmWordSeparator; | ||
capitalise: boolean; | ||
include_numbers: boolean; | ||
count: number; | ||
} | ||
export type WasmPasswordScore = "Vulnerable" | "Weak" | "Strong"; | ||
export type WasmPasswordPenalty = "NoLowercase" | "NoUppercase" | "NoNumbers" | "NoSymbols" | "Short" | "Consecutive" | "Progressive" | "ContainsCommonPassword" | "ShortWordList"; | ||
export interface WasmPasswordScoreResult { | ||
numeric_score: number; | ||
password_score: WasmPasswordScore; | ||
penalties: WasmPasswordPenalty[]; | ||
} | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
export function get_root_domain(input: string): string; | ||
export type WasmAuthenticatorAttachment = "platform" | "cross-platform"; | ||
@@ -208,1 +175,39 @@ | ||
export interface WasmRandomPasswordConfig { | ||
length: number; | ||
numbers: boolean; | ||
uppercase_letters: boolean; | ||
symbols: boolean; | ||
} | ||
export type WasmWordSeparator = "Hyphens" | "Spaces" | "Periods" | "Commas" | "Underscores" | "Numbers" | "NumbersAndSymbols"; | ||
export interface WasmPassphraseConfig { | ||
separator: WasmWordSeparator; | ||
capitalise: boolean; | ||
include_numbers: boolean; | ||
count: number; | ||
} | ||
export type WasmPasswordScore = "Vulnerable" | "Weak" | "Strong"; | ||
export type WasmPasswordPenalty = "NoLowercase" | "NoUppercase" | "NoNumbers" | "NoSymbols" | "Short" | "Consecutive" | "Progressive" | "ContainsCommonPassword" | "ShortWordList"; | ||
export interface WasmPasswordScoreResult { | ||
numeric_score: number; | ||
password_score: WasmPasswordScore; | ||
penalties: WasmPasswordPenalty[]; | ||
} | ||
export type WasmStringList = string[]; | ||
export type WasmCreditCardType = "Visa" | "Mastercard" | "AmericanExpress" | "DinersClub" | "Discover" | "JCB" | "UnionPay" | "Maestro" | "Elo" | "Mir" | "Hiper" | "Hipercard" | "Unknown"; | ||
export interface WasmLogin { | ||
title: string; | ||
username: string; | ||
password: string; | ||
totp: string | undefined; | ||
urls: string[]; | ||
} | ||
Sorry, the diff of this file is not supported yet
2572605
979