@moss-dev/moss-wasm 0.17.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-THIRD-PARTY.txt +7181 -0
- package/moss_wasm.d.ts +8 -5
- package/moss_wasm.js +20 -16
- package/moss_wasm_bg.wasm +0 -0
- package/package.json +4 -3
package/moss_wasm.d.ts
CHANGED
|
@@ -90,7 +90,10 @@ export class ProjectKeyAuthenticator {
|
|
|
90
90
|
free(): void;
|
|
91
91
|
[Symbol.dispose](): void;
|
|
92
92
|
getAuthHeader(): Promise<any>;
|
|
93
|
-
|
|
93
|
+
/**
|
|
94
|
+
* Drops the cached token when `rejected`, the header a refused request sent, carries it.
|
|
95
|
+
*/
|
|
96
|
+
invalidate(rejected: string): Promise<any>;
|
|
94
97
|
constructor(project_id: string, project_key: string);
|
|
95
98
|
}
|
|
96
99
|
|
|
@@ -192,7 +195,7 @@ export interface InitOutput {
|
|
|
192
195
|
readonly openSealedModel: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
193
196
|
readonly poolAndNormalize: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
194
197
|
readonly projectkeyauthenticator_getAuthHeader: (a: number) => any;
|
|
195
|
-
readonly projectkeyauthenticator_invalidate: (a: number) => any;
|
|
198
|
+
readonly projectkeyauthenticator_invalidate: (a: number, b: number, c: number) => any;
|
|
196
199
|
readonly projectkeyauthenticator_new: (a: number, b: number, c: number, d: number) => number;
|
|
197
200
|
readonly sdk_version: () => [number, number];
|
|
198
201
|
readonly sealedModelDecryptParams: (a: any, b: number, c: number, d: number) => [number, number, number];
|
|
@@ -202,9 +205,9 @@ export interface InitOutput {
|
|
|
202
205
|
readonly sealedmodel_takeTokenizer: (a: number) => [number, number, number];
|
|
203
206
|
readonly tokenizer_new: (a: number, b: number) => [number, number, number];
|
|
204
207
|
readonly tokenizer_tokenize: (a: number, b: number, c: number) => [number, number, number];
|
|
205
|
-
readonly
|
|
206
|
-
readonly
|
|
207
|
-
readonly
|
|
208
|
+
readonly wasm_bindgen_c5dc276b97d5cca2___convert__closures_____invoke___wasm_bindgen_c5dc276b97d5cca2___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_c5dc276b97d5cca2___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
209
|
+
readonly wasm_bindgen_c5dc276b97d5cca2___convert__closures_____invoke___js_sys_e0971dfed44a4f50___Function_fn_wasm_bindgen_c5dc276b97d5cca2___JsValue_____wasm_bindgen_c5dc276b97d5cca2___sys__Undefined___js_sys_e0971dfed44a4f50___Function_fn_wasm_bindgen_c5dc276b97d5cca2___JsValue_____wasm_bindgen_c5dc276b97d5cca2___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
|
|
210
|
+
readonly wasm_bindgen_c5dc276b97d5cca2___convert__closures_____invoke_______true_: (a: number, b: number) => void;
|
|
208
211
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
209
212
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
210
213
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/moss_wasm.js
CHANGED
|
@@ -548,10 +548,14 @@ export class ProjectKeyAuthenticator {
|
|
|
548
548
|
return ret;
|
|
549
549
|
}
|
|
550
550
|
/**
|
|
551
|
+
* Drops the cached token when `rejected`, the header a refused request sent, carries it.
|
|
552
|
+
* @param {string} rejected
|
|
551
553
|
* @returns {Promise<any>}
|
|
552
554
|
*/
|
|
553
|
-
invalidate() {
|
|
554
|
-
const
|
|
555
|
+
invalidate(rejected) {
|
|
556
|
+
const ptr0 = passStringToWasm0(rejected, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
557
|
+
const len0 = WASM_VECTOR_LEN;
|
|
558
|
+
const ret = wasm.projectkeyauthenticator_invalidate(this.__wbg_ptr, ptr0, len0);
|
|
555
559
|
return ret;
|
|
556
560
|
}
|
|
557
561
|
/**
|
|
@@ -929,7 +933,7 @@ function __wbg_get_imports() {
|
|
|
929
933
|
const ret = arg0.fetch(arg1);
|
|
930
934
|
return ret;
|
|
931
935
|
},
|
|
932
|
-
|
|
936
|
+
__wbg_fetch_f64ced2634302874: function() { return handleError(function (arg0, arg1, arg2) {
|
|
933
937
|
const ret = fetch(getStringFromWasm0(arg0, arg1), arg2);
|
|
934
938
|
return ret;
|
|
935
939
|
}, arguments); },
|
|
@@ -1097,7 +1101,7 @@ function __wbg_get_imports() {
|
|
|
1097
1101
|
const a = state0.a;
|
|
1098
1102
|
state0.a = 0;
|
|
1099
1103
|
try {
|
|
1100
|
-
return
|
|
1104
|
+
return wasm_bindgen_c5dc276b97d5cca2___convert__closures_____invoke___js_sys_e0971dfed44a4f50___Function_fn_wasm_bindgen_c5dc276b97d5cca2___JsValue_____wasm_bindgen_c5dc276b97d5cca2___sys__Undefined___js_sys_e0971dfed44a4f50___Function_fn_wasm_bindgen_c5dc276b97d5cca2___JsValue_____wasm_bindgen_c5dc276b97d5cca2___sys__Undefined_______true_(a, state0.b, arg0, arg1);
|
|
1101
1105
|
} finally {
|
|
1102
1106
|
state0.a = a;
|
|
1103
1107
|
}
|
|
@@ -1131,7 +1135,7 @@ function __wbg_get_imports() {
|
|
|
1131
1135
|
const a = state0.a;
|
|
1132
1136
|
state0.a = 0;
|
|
1133
1137
|
try {
|
|
1134
|
-
return
|
|
1138
|
+
return wasm_bindgen_c5dc276b97d5cca2___convert__closures_____invoke___js_sys_e0971dfed44a4f50___Function_fn_wasm_bindgen_c5dc276b97d5cca2___JsValue_____wasm_bindgen_c5dc276b97d5cca2___sys__Undefined___js_sys_e0971dfed44a4f50___Function_fn_wasm_bindgen_c5dc276b97d5cca2___JsValue_____wasm_bindgen_c5dc276b97d5cca2___sys__Undefined_______true_(a, state0.b, arg0, arg1);
|
|
1135
1139
|
} finally {
|
|
1136
1140
|
state0.a = a;
|
|
1137
1141
|
}
|
|
@@ -1186,7 +1190,7 @@ function __wbg_get_imports() {
|
|
|
1186
1190
|
__wbg_setItem_364a11cf21db9039: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1187
1191
|
arg0.setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1188
1192
|
}, arguments); },
|
|
1189
|
-
|
|
1193
|
+
__wbg_setTimeout_6fe7ca3d5eda2dea: function(arg0, arg1) {
|
|
1190
1194
|
const ret = setTimeout(arg0, arg1);
|
|
1191
1195
|
return ret;
|
|
1192
1196
|
},
|
|
@@ -1285,13 +1289,13 @@ function __wbg_get_imports() {
|
|
|
1285
1289
|
return ret;
|
|
1286
1290
|
},
|
|
1287
1291
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1288
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1289
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1292
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 154, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1293
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_c5dc276b97d5cca2___convert__closures_____invoke___wasm_bindgen_c5dc276b97d5cca2___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_c5dc276b97d5cca2___JsError___true_);
|
|
1290
1294
|
return ret;
|
|
1291
1295
|
},
|
|
1292
1296
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1293
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
1294
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1297
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 49, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1298
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_c5dc276b97d5cca2___convert__closures_____invoke_______true_);
|
|
1295
1299
|
return ret;
|
|
1296
1300
|
},
|
|
1297
1301
|
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
@@ -1330,19 +1334,19 @@ function __wbg_get_imports() {
|
|
|
1330
1334
|
};
|
|
1331
1335
|
}
|
|
1332
1336
|
|
|
1333
|
-
function
|
|
1334
|
-
wasm.
|
|
1337
|
+
function wasm_bindgen_c5dc276b97d5cca2___convert__closures_____invoke_______true_(arg0, arg1) {
|
|
1338
|
+
wasm.wasm_bindgen_c5dc276b97d5cca2___convert__closures_____invoke_______true_(arg0, arg1);
|
|
1335
1339
|
}
|
|
1336
1340
|
|
|
1337
|
-
function
|
|
1338
|
-
const ret = wasm.
|
|
1341
|
+
function wasm_bindgen_c5dc276b97d5cca2___convert__closures_____invoke___wasm_bindgen_c5dc276b97d5cca2___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_c5dc276b97d5cca2___JsError___true_(arg0, arg1, arg2) {
|
|
1342
|
+
const ret = wasm.wasm_bindgen_c5dc276b97d5cca2___convert__closures_____invoke___wasm_bindgen_c5dc276b97d5cca2___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_c5dc276b97d5cca2___JsError___true_(arg0, arg1, arg2);
|
|
1339
1343
|
if (ret[1]) {
|
|
1340
1344
|
throw takeFromExternrefTable0(ret[0]);
|
|
1341
1345
|
}
|
|
1342
1346
|
}
|
|
1343
1347
|
|
|
1344
|
-
function
|
|
1345
|
-
wasm.
|
|
1348
|
+
function wasm_bindgen_c5dc276b97d5cca2___convert__closures_____invoke___js_sys_e0971dfed44a4f50___Function_fn_wasm_bindgen_c5dc276b97d5cca2___JsValue_____wasm_bindgen_c5dc276b97d5cca2___sys__Undefined___js_sys_e0971dfed44a4f50___Function_fn_wasm_bindgen_c5dc276b97d5cca2___JsValue_____wasm_bindgen_c5dc276b97d5cca2___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
|
|
1349
|
+
wasm.wasm_bindgen_c5dc276b97d5cca2___convert__closures_____invoke___js_sys_e0971dfed44a4f50___Function_fn_wasm_bindgen_c5dc276b97d5cca2___JsValue_____wasm_bindgen_c5dc276b97d5cca2___sys__Undefined___js_sys_e0971dfed44a4f50___Function_fn_wasm_bindgen_c5dc276b97d5cca2___JsValue_____wasm_bindgen_c5dc276b97d5cca2___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
|
|
1346
1350
|
}
|
|
1347
1351
|
|
|
1348
1352
|
|
package/moss_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"name": "@moss-dev/moss-wasm",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "Moss WASM bindings for in-browser semantic search",
|
|
5
|
-
"version": "0.
|
|
6
|
-
"license": "SEE LICENSE IN LICENSE",
|
|
5
|
+
"version": "0.18.1",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/usemoss/moss"
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"moss_wasm_bg.wasm",
|
|
13
13
|
"moss_wasm.js",
|
|
14
14
|
"moss_wasm.d.ts",
|
|
15
|
-
"LICENSE.txt"
|
|
15
|
+
"LICENSE.txt",
|
|
16
|
+
"LICENSE-THIRD-PARTY.txt"
|
|
16
17
|
],
|
|
17
18
|
"main": "moss_wasm.js",
|
|
18
19
|
"types": "moss_wasm.d.ts",
|