feat: update WASM loading in initLibcurl and enhance error logging in Anisette class
This commit is contained in:
@@ -10,7 +10,7 @@ export async function initLibcurl(): Promise<void> {
|
||||
const wsProto = location.protocol === "https:" ? "wss:" : "ws:";
|
||||
let wsUrl = `${wsProto}//${location.host}/wisp/`;
|
||||
libcurl.set_websocket(wsUrl);
|
||||
await libcurl.load_wasm("/libcurl.wasm");
|
||||
await libcurl.load_wasm();
|
||||
initialized = true;
|
||||
})();
|
||||
|
||||
|
||||
@@ -1,21 +1,26 @@
|
||||
{
|
||||
"name": "@lbr77/anisette-js",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.2",
|
||||
"description": "High-level JavaScript/TypeScript API for Apple Anisette headers via WASM",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./src/index.ts",
|
||||
"browser": "./src/browser.ts"
|
||||
}
|
||||
"browser": "./dist/browser.js",
|
||||
"import": "./dist/index.js",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"./browser": {
|
||||
"types": "./dist/browser.d.ts",
|
||||
"default": "./dist/browser.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"./src/anisette_rs.js",
|
||||
"./src/anisette_rs.node.js"
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsc && cp src/anisette_rs.js dist/ && cp src/anisette_rs.node.js dist/",
|
||||
@@ -28,8 +33,8 @@
|
||||
"@types/node": "^25.3.2"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://npm.pkg.github.com",
|
||||
"access": "restricted"
|
||||
"registry": "https://registry.npmjs.org/",
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -100,7 +100,8 @@ export class Anisette {
|
||||
mountIdbfsPaths(bridge, libraryPath, provisioningPath);
|
||||
try {
|
||||
await bridge.syncIdbfsFromStorage();
|
||||
} catch {
|
||||
} catch (err) {
|
||||
console.log("[anisette] Failed to sync IDBFS from storage:", err);
|
||||
// Ignore errors - might be first run with no existing data
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user