ipa-resign 0.0.5 → 0.0.7

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/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "ipa-resign",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
+ "license": "SEE LICENSE IN LICENSE",
4
5
  "main": "dist/index.js",
5
6
  "module": "dist/index.mjs",
6
7
  "types": "dist/index.d.ts",
7
8
  "files": [
8
9
  "dist/index.js",
9
10
  "dist/index.mjs",
10
- "dist/index.jsc",
11
11
  "dist/index.d.ts",
12
12
  "dist/core",
13
13
  "dist/anisette-browser",
@@ -26,8 +26,8 @@
26
26
  "build:anisette-browser": "node scripts/build-anisette-browser.mjs",
27
27
  "build:sign-browser": "node scripts/build-sign-browser.mjs",
28
28
  "build:browser": "node scripts/build-browser.mjs",
29
+ "build:anisette": "node scripts/build-anisette.mjs",
29
30
  "build:helper:macos": "bash anisette/build.sh",
30
- "build:helper:rust": "bash anisette/build-rs.sh",
31
31
  "watch": "tsc --project tsconfig.json --watch --preserveWatchOutput",
32
32
  "lint": "eslint .",
33
33
  "typecheck": "tsc && tsc -p tsconfig.browser.json --noEmit",
@@ -70,15 +70,15 @@
70
70
  "dts-bundle-generator": "^9.5.1",
71
71
  "esbuild": "^0.25.0",
72
72
  "eslint-config-universe": "^15.0.3",
73
+ "javascript-obfuscator": "^5.6.0",
73
74
  "jest": "^29.7.0",
74
75
  "ts-jest": "^29.3.4",
75
76
  "typescript": "^5.8.3",
76
- "zsign-wasm": "0.0.1"
77
+ "zsign-wasm": "0.0.3"
77
78
  },
78
79
  "dependencies": {
79
80
  "@expo/spawn-async": "^1.7.2",
80
81
  "bplist-parser": "^0.3.0",
81
- "bytenode": "^1.5.7",
82
82
  "debug": "^4.3.4",
83
83
  "fflate": "^0.8.2",
84
84
  "node-fetch": "2.6.7",
@@ -90,6 +90,6 @@
90
90
  "yazl": "^3.3.1"
91
91
  },
92
92
  "volta": {
93
- "node": "18.5.0"
93
+ "node": "20.19.0"
94
94
  }
95
95
  }
@@ -1,47 +0,0 @@
1
- /**
2
- * Unified WASM loader with automatic environment detection
3
- * Uses import.meta.url + protocol detection to support both Node.js and Browser
4
- *
5
- * Browser (Vite/Webpack/etc): https://... or http://... -> anisette_rs.js + .wasm
6
- * Node.js: file://... -> anisette_rs.node.js + .wasm
7
- */
8
- export type EmscriptenModule = any;
9
- export interface ModuleOverrides {
10
- [key: string]: any;
11
- }
12
- /**
13
- * Load the Emscripten WASM module with automatic environment detection.
14
- *
15
- * This function automatically:
16
- * - Detects Node.js vs Browser environment via import.meta.url protocol
17
- * - Loads the appropriate WASM build (node or web)
18
- * - Configures locateFile to find the .wasm binary
19
- * - Initializes the module with optional overrides
20
- *
21
- * @param moduleOverrides - Optional Emscripten module configuration overrides
22
- * @returns Initialized Emscripten module with all exports (_malloc, _free, _anisette_* etc.)
23
- *
24
- * @example
25
- * ```ts
26
- * // Browser (Vue/React/Next.js) and Node.js - same code!
27
- * const module = await loadWasmModule();
28
- *
29
- * // With custom overrides
30
- * const module = await loadWasmModule({
31
- * print: (text: string) => console.log("WASM:", text),
32
- * printErr: (text: string) => console.error("WASM Error:", text),
33
- * });
34
- * ```
35
- */
36
- export declare function loadWasmModule(moduleOverrides?: ModuleOverrides): Promise<EmscriptenModule>;
37
- /**
38
- * Convenience function to check if running in Node.js environment.
39
- * Uses the same protocol detection as the loader.
40
- */
41
- export declare function isNodeEnvironment(): boolean;
42
- /**
43
- * Get the resolved WASM binary path (useful for debugging).
44
- */
45
- export declare function getWasmBinaryPath(): string;
46
- export { loadWasmModule as loadWasm };
47
- //# sourceMappingURL=unified-wasm-loader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unified-wasm-loader.d.ts","sourceRoot":"","sources":["../src/unified-wasm-loader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAiBH,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAEnC,MAAM,WAAW,eAAe;IAE9B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,cAAc,CAClC,eAAe,GAAE,eAAoB,GACpC,OAAO,CAAC,gBAAgB,CAAC,CAqB3B;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAGD,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,CAAC"}
@@ -1,77 +0,0 @@
1
- /**
2
- * Unified WASM loader with automatic environment detection
3
- * Uses import.meta.url + protocol detection to support both Node.js and Browser
4
- *
5
- * Browser (Vite/Webpack/etc): https://... or http://... -> anisette_rs.js + .wasm
6
- * Node.js: file://... -> anisette_rs.node.js + .wasm
7
- */
8
- // Get the base URL from import.meta.url
9
- const MODULE_URL = new URL(import.meta.url);
10
- const IS_NODE = MODULE_URL.protocol === "file:";
11
- // Determine which WASM build to use based on environment
12
- const WASM_JS_PATH = IS_NODE
13
- ? new URL("./dist/anisette_rs.node.js", MODULE_URL)
14
- : new URL("./dist/anisette_rs.js", MODULE_URL);
15
- const WASM_BINARY_PATH = IS_NODE
16
- ? new URL("./dist/anisette_rs.node.wasm", MODULE_URL)
17
- : new URL("./dist/anisette_rs.wasm", MODULE_URL);
18
- /**
19
- * Load the Emscripten WASM module with automatic environment detection.
20
- *
21
- * This function automatically:
22
- * - Detects Node.js vs Browser environment via import.meta.url protocol
23
- * - Loads the appropriate WASM build (node or web)
24
- * - Configures locateFile to find the .wasm binary
25
- * - Initializes the module with optional overrides
26
- *
27
- * @param moduleOverrides - Optional Emscripten module configuration overrides
28
- * @returns Initialized Emscripten module with all exports (_malloc, _free, _anisette_* etc.)
29
- *
30
- * @example
31
- * ```ts
32
- * // Browser (Vue/React/Next.js) and Node.js - same code!
33
- * const module = await loadWasmModule();
34
- *
35
- * // With custom overrides
36
- * const module = await loadWasmModule({
37
- * print: (text: string) => console.log("WASM:", text),
38
- * printErr: (text: string) => console.error("WASM Error:", text),
39
- * });
40
- * ```
41
- */
42
- export async function loadWasmModule(moduleOverrides = {}) {
43
- // Dynamic import of the appropriate Emscripten glue file
44
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
45
- const { default: ModuleFactory } = await import(WASM_JS_PATH.href);
46
- // In browser: let Emscripten use default fetch behavior
47
- // In Node.js: provide locateFile to resolve the .wasm path
48
- const config = IS_NODE
49
- ? {
50
- ...moduleOverrides,
51
- locateFile: (filename) => {
52
- if (filename.endsWith(".wasm")) {
53
- // In Node.js, return the absolute file path
54
- return WASM_BINARY_PATH.pathname;
55
- }
56
- return filename;
57
- },
58
- }
59
- : moduleOverrides;
60
- return ModuleFactory(config);
61
- }
62
- /**
63
- * Convenience function to check if running in Node.js environment.
64
- * Uses the same protocol detection as the loader.
65
- */
66
- export function isNodeEnvironment() {
67
- return IS_NODE;
68
- }
69
- /**
70
- * Get the resolved WASM binary path (useful for debugging).
71
- */
72
- export function getWasmBinaryPath() {
73
- return IS_NODE ? WASM_BINARY_PATH.pathname : WASM_BINARY_PATH.href;
74
- }
75
- // Re-export for backward compatibility
76
- export { loadWasmModule as loadWasm };
77
- //# sourceMappingURL=unified-wasm-loader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unified-wasm-loader.js","sourceRoot":"","sources":["../src/unified-wasm-loader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,wCAAwC;AACxC,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5C,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,KAAK,OAAO,CAAC;AAEhD,yDAAyD;AACzD,MAAM,YAAY,GAAG,OAAO;IAC1B,CAAC,CAAC,IAAI,GAAG,CAAC,gCAAgC,EAAE,UAAU,CAAC;IACvD,CAAC,CAAC,IAAI,GAAG,CAAC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