Comparing version 4.0.5 to 4.0.10
/* tslint:disable */ | ||
/** | ||
* @returns {void} | ||
*/ | ||
@@ -10,7 +9,63 @@ export function run(): void; | ||
free(): void; | ||
/** | ||
* @param {Uint8Array} buffer | ||
* @returns {Course} | ||
*/ | ||
static from_proto(buffer: Uint8Array): Course; | ||
/** | ||
* @param {Uint8Array} buffer | ||
* @returns {Course} | ||
*/ | ||
static from_boxed_proto(buffer: Uint8Array): Course; | ||
/** | ||
* @param {any} course | ||
* @returns {Course} | ||
*/ | ||
static from_js(course: any): Course; | ||
to_proto(): Uint8Array; | ||
to_js(): any; | ||
/** | ||
* @param {Uint8Array} buffer | ||
* @returns {any[]} | ||
*/ | ||
static from_packed_js(buffer: Uint8Array): any[]; | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
into_proto(): Uint8Array; | ||
/** | ||
* @returns {any} | ||
*/ | ||
into_js(): any; | ||
} | ||
/** | ||
*/ | ||
export class Course2 { | ||
free(): void; | ||
/** | ||
* @param {Uint8Array} buffer | ||
* @returns {Course2} | ||
*/ | ||
static from_proto(buffer: Uint8Array): Course2; | ||
/** | ||
* @param {Uint8Array} buffer | ||
* @returns {Course2} | ||
*/ | ||
static from_boxed_proto(buffer: Uint8Array): Course2; | ||
/** | ||
* @param {any} course | ||
* @returns {Course2} | ||
*/ | ||
static from_js(course: any): Course2; | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
into_proto(): Uint8Array; | ||
/** | ||
* @returns {any} | ||
*/ | ||
into_js(): any; | ||
/** | ||
* @param {Uint8Array} course | ||
* @returns {Uint8Array} | ||
*/ | ||
static decrypt(course: Uint8Array): Uint8Array; | ||
} |
478
cemu_smm.js
@@ -1,10 +0,3 @@ | ||
import * as wasm from './cemu_smm_bg'; | ||
import * as wasm from './cemu_smm_bg.wasm'; | ||
/** | ||
* @returns {void} | ||
*/ | ||
export function run() { | ||
return wasm.run(); | ||
} | ||
let cachegetUint8Memory = null; | ||
@@ -44,20 +37,12 @@ function getUint8Memory() { | ||
function getArrayU8FromWasm(ptr, len) { | ||
return getUint8Memory().subarray(ptr / 1, ptr / 1 + len); | ||
} | ||
let cachedGlobalArgumentPtr = null; | ||
function globalArgumentPtr() { | ||
if (cachedGlobalArgumentPtr === null) { | ||
cachedGlobalArgumentPtr = wasm.__wbindgen_global_argument_ptr(); | ||
let cachegetInt32Memory = null; | ||
function getInt32Memory() { | ||
if (cachegetInt32Memory === null || cachegetInt32Memory.buffer !== wasm.memory.buffer) { | ||
cachegetInt32Memory = new Int32Array(wasm.memory.buffer); | ||
} | ||
return cachedGlobalArgumentPtr; | ||
return cachegetInt32Memory; | ||
} | ||
let cachegetUint32Memory = null; | ||
function getUint32Memory() { | ||
if (cachegetUint32Memory === null || cachegetUint32Memory.buffer !== wasm.memory.buffer) { | ||
cachegetUint32Memory = new Uint32Array(wasm.memory.buffer); | ||
} | ||
return cachegetUint32Memory; | ||
function getArrayU8FromWasm(ptr, len) { | ||
return getUint8Memory().subarray(ptr / 1, ptr / 1 + len); | ||
} | ||
@@ -79,84 +64,29 @@ | ||
let cachedTextDecoder = new TextDecoder('utf-8'); | ||
function getStringFromWasm(ptr, len) { | ||
return cachedTextDecoder.decode(getUint8Memory().subarray(ptr, ptr + len)); | ||
} | ||
function handleError(exnptr, e) { | ||
const view = getUint32Memory(); | ||
view[exnptr / 4] = 1; | ||
view[exnptr / 4 + 1] = addHeapObject(e); | ||
} | ||
export function __widl_f_create_element_Document(arg0, arg1, arg2, exnptr) { | ||
let varg1 = getStringFromWasm(arg1, arg2); | ||
try { | ||
return addHeapObject(getObject(arg0).createElement(varg1)); | ||
} catch (e) { | ||
handleError(exnptr, e); | ||
let cachegetUint32Memory = null; | ||
function getUint32Memory() { | ||
if (cachegetUint32Memory === null || cachegetUint32Memory.buffer !== wasm.memory.buffer) { | ||
cachegetUint32Memory = new Uint32Array(wasm.memory.buffer); | ||
} | ||
return cachegetUint32Memory; | ||
} | ||
function isLikeNone(x) { | ||
return x === undefined || x === null; | ||
} | ||
export function __widl_f_body_Document(arg0) { | ||
const val = getObject(arg0).body; | ||
return isLikeNone(val) ? 0 : addHeapObject(val); | ||
} | ||
export function __widl_f_append_child_Node(arg0, arg1, exnptr) { | ||
try { | ||
return addHeapObject(getObject(arg0).appendChild(getObject(arg1))); | ||
} catch (e) { | ||
handleError(exnptr, e); | ||
function getArrayJsValueFromWasm(ptr, len) { | ||
const mem = getUint32Memory(); | ||
const slice = mem.subarray(ptr / 4, ptr / 4 + len); | ||
const result = []; | ||
for (let i = 0; i < slice.length; i++) { | ||
result.push(takeObject(slice[i])); | ||
} | ||
return result; | ||
} | ||
export function __widl_f_set_text_content_Node(arg0, arg1, arg2) { | ||
let varg1 = arg1 == 0 ? undefined : getStringFromWasm(arg1, arg2); | ||
getObject(arg0).textContent = varg1; | ||
/** | ||
*/ | ||
export function run() { | ||
wasm.run(); | ||
} | ||
export function __widl_instanceof_Window(idx) { return getObject(idx) instanceof Window ? 1 : 0; } | ||
const lTextEncoder = typeof TextEncoder === 'undefined' ? require('util').TextEncoder : TextEncoder; | ||
export function __widl_f_document_Window(arg0) { | ||
let cachedTextEncoder = new lTextEncoder('utf-8'); | ||
const val = getObject(arg0).document; | ||
return isLikeNone(val) ? 0 : addHeapObject(val); | ||
} | ||
export function __wbg_newnoargs_cb83ac9bfa714d41(arg0, arg1) { | ||
let varg0 = getStringFromWasm(arg0, arg1); | ||
return addHeapObject(new Function(varg0)); | ||
} | ||
export function __wbg_call_75755734bfea4d37(arg0, arg1, exnptr) { | ||
try { | ||
return addHeapObject(getObject(arg0).call(getObject(arg1))); | ||
} catch (e) { | ||
handleError(exnptr, e); | ||
} | ||
} | ||
export function __wbg_error_4bb6c2a97407129a(arg0, arg1) { | ||
let varg0 = getStringFromWasm(arg0, arg1); | ||
varg0 = varg0.slice(); | ||
wasm.__wbindgen_free(arg0, arg1 * 1); | ||
console.error(varg0); | ||
} | ||
export function __wbg_new_59cb74e423758ede() { | ||
return addHeapObject(new Error()); | ||
} | ||
let cachedTextEncoder = new TextEncoder('utf-8'); | ||
let passStringToWasm; | ||
@@ -166,16 +96,24 @@ if (typeof cachedTextEncoder.encodeInto === 'function') { | ||
let size = arg.length; | ||
let ptr = wasm.__wbindgen_malloc(size); | ||
let writeOffset = 0; | ||
while (true) { | ||
const view = getUint8Memory().subarray(ptr + writeOffset, ptr + size); | ||
const { read, written } = cachedTextEncoder.encodeInto(arg, view); | ||
writeOffset += written; | ||
if (read === arg.length) { | ||
break; | ||
let offset = 0; | ||
{ | ||
const mem = getUint8Memory(); | ||
for (; offset < arg.length; offset++) { | ||
const code = arg.charCodeAt(offset); | ||
if (code > 0x7F) break; | ||
mem[ptr + offset] = code; | ||
} | ||
arg = arg.substring(read); | ||
ptr = wasm.__wbindgen_realloc(ptr, size, size += arg.length * 3); | ||
} | ||
WASM_VECTOR_LEN = writeOffset; | ||
if (offset !== arg.length) { | ||
arg = arg.slice(offset); | ||
ptr = wasm.__wbindgen_realloc(ptr, size, size = offset + arg.length * 3); | ||
const view = getUint8Memory().subarray(ptr + offset, ptr + size); | ||
const ret = cachedTextEncoder.encodeInto(arg, view); | ||
offset += ret.written; | ||
} | ||
WASM_VECTOR_LEN = offset; | ||
return ptr; | ||
@@ -186,6 +124,22 @@ }; | ||
const buf = cachedTextEncoder.encode(arg); | ||
const ptr = wasm.__wbindgen_malloc(buf.length); | ||
getUint8Memory().set(buf, ptr); | ||
WASM_VECTOR_LEN = buf.length; | ||
let size = arg.length; | ||
let ptr = wasm.__wbindgen_malloc(size); | ||
let offset = 0; | ||
{ | ||
const mem = getUint8Memory(); | ||
for (; offset < arg.length; offset++) { | ||
const code = arg.charCodeAt(offset); | ||
if (code > 0x7F) break; | ||
mem[ptr + offset] = code; | ||
} | ||
} | ||
if (offset !== arg.length) { | ||
const buf = cachedTextEncoder.encode(arg.slice(offset)); | ||
ptr = wasm.__wbindgen_realloc(ptr, size, size = offset + buf.length); | ||
getUint8Memory().set(buf, ptr + offset); | ||
offset += buf.length; | ||
} | ||
WASM_VECTOR_LEN = offset; | ||
return ptr; | ||
@@ -195,30 +149,17 @@ }; | ||
export function __wbg_stack_558ba5917b466edd(ret, arg0) { | ||
const lTextDecoder = typeof TextDecoder === 'undefined' ? require('util').TextDecoder : TextDecoder; | ||
const retptr = passStringToWasm(getObject(arg0).stack); | ||
const retlen = WASM_VECTOR_LEN; | ||
const mem = getUint32Memory(); | ||
mem[ret / 4] = retptr; | ||
mem[ret / 4 + 1] = retlen; | ||
let cachedTextDecoder = new lTextDecoder('utf-8'); | ||
function getStringFromWasm(ptr, len) { | ||
return cachedTextDecoder.decode(getUint8Memory().subarray(ptr, ptr + len)); | ||
} | ||
export function __wbindgen_json_parse(ptr, len) { return addHeapObject(JSON.parse(getStringFromWasm(ptr, len))); } | ||
export function __wbindgen_json_serialize(idx, ptrptr) { | ||
const ptr = passStringToWasm(JSON.stringify(getObject(idx))); | ||
getUint32Memory()[ptrptr / 4] = ptr; | ||
return WASM_VECTOR_LEN; | ||
function handleError(e) { | ||
wasm.__wbindgen_exn_store(addHeapObject(e)); | ||
} | ||
export function __wbindgen_rethrow(idx) { throw takeObject(idx); } | ||
export function __wbindgen_throw(ptr, len) { | ||
throw new Error(getStringFromWasm(ptr, len)); | ||
function isLikeNone(x) { | ||
return x === undefined || x === null; | ||
} | ||
function freeCourse(ptr) { | ||
wasm.__wbg_course_free(ptr); | ||
} | ||
/** | ||
@@ -238,5 +179,5 @@ */ | ||
this.ptr = 0; | ||
freeCourse(ptr); | ||
wasm.__wbg_course_free(ptr); | ||
} | ||
/** | ||
@@ -247,12 +188,4 @@ * @param {Uint8Array} buffer | ||
static from_proto(buffer) { | ||
const ptr0 = passArray8ToWasm(buffer); | ||
const len0 = WASM_VECTOR_LEN; | ||
try { | ||
return Course.__wrap(wasm.course_from_proto(ptr0, len0)); | ||
} finally { | ||
wasm.__wbindgen_free(ptr0, len0 * 1); | ||
} | ||
const ret = wasm.course_from_proto(passArray8ToWasm(buffer), WASM_VECTOR_LEN); | ||
return Course.__wrap(ret); | ||
} | ||
@@ -264,5 +197,4 @@ /** | ||
static from_boxed_proto(buffer) { | ||
const ptr0 = passArray8ToWasm(buffer); | ||
const len0 = WASM_VECTOR_LEN; | ||
return Course.__wrap(wasm.course_from_boxed_proto(ptr0, len0)); | ||
const ret = wasm.course_from_boxed_proto(passArray8ToWasm(buffer), WASM_VECTOR_LEN); | ||
return Course.__wrap(ret); | ||
} | ||
@@ -274,32 +206,254 @@ /** | ||
static from_js(course) { | ||
return Course.__wrap(wasm.course_from_js(addHeapObject(course))); | ||
const ret = wasm.course_from_js(addHeapObject(course)); | ||
return Course.__wrap(ret); | ||
} | ||
/** | ||
* @param {Uint8Array} buffer | ||
* @returns {any[]} | ||
*/ | ||
static from_packed_js(buffer) { | ||
const retptr = 8; | ||
const ret = wasm.course_from_packed_js(retptr, passArray8ToWasm(buffer), WASM_VECTOR_LEN); | ||
const memi32 = getInt32Memory(); | ||
const v0 = getArrayJsValueFromWasm(memi32[retptr / 4 + 0], memi32[retptr / 4 + 1]).slice(); | ||
wasm.__wbindgen_free(memi32[retptr / 4 + 0], memi32[retptr / 4 + 1] * 4); | ||
return v0; | ||
} | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
to_proto() { | ||
const retptr = globalArgumentPtr(); | ||
wasm.course_to_proto(retptr, this.ptr); | ||
const mem = getUint32Memory(); | ||
const rustptr = mem[retptr / 4]; | ||
const rustlen = mem[retptr / 4 + 1]; | ||
into_proto() { | ||
const retptr = 8; | ||
const ret = wasm.course_into_proto(retptr, this.ptr); | ||
const memi32 = getInt32Memory(); | ||
const v0 = getArrayU8FromWasm(memi32[retptr / 4 + 0], memi32[retptr / 4 + 1]).slice(); | ||
wasm.__wbindgen_free(memi32[retptr / 4 + 0], memi32[retptr / 4 + 1] * 1); | ||
return v0; | ||
} | ||
/** | ||
* @returns {any} | ||
*/ | ||
into_js() { | ||
const ret = wasm.course_into_js(this.ptr); | ||
return takeObject(ret); | ||
} | ||
} | ||
/** | ||
*/ | ||
export class Course2 { | ||
const realRet = getArrayU8FromWasm(rustptr, rustlen).slice(); | ||
wasm.__wbindgen_free(rustptr, rustlen * 1); | ||
return realRet; | ||
static __wrap(ptr) { | ||
const obj = Object.create(Course2.prototype); | ||
obj.ptr = ptr; | ||
return obj; | ||
} | ||
free() { | ||
const ptr = this.ptr; | ||
this.ptr = 0; | ||
wasm.__wbg_course2_free(ptr); | ||
} | ||
/** | ||
* @param {Uint8Array} buffer | ||
* @returns {Course2} | ||
*/ | ||
static from_proto(buffer) { | ||
const ret = wasm.course2_from_proto(passArray8ToWasm(buffer), WASM_VECTOR_LEN); | ||
return Course2.__wrap(ret); | ||
} | ||
/** | ||
* @param {Uint8Array} buffer | ||
* @returns {Course2} | ||
*/ | ||
static from_boxed_proto(buffer) { | ||
const ret = wasm.course2_from_boxed_proto(passArray8ToWasm(buffer), WASM_VECTOR_LEN); | ||
return Course2.__wrap(ret); | ||
} | ||
/** | ||
* @param {any} course | ||
* @returns {Course2} | ||
*/ | ||
static from_js(course) { | ||
const ret = wasm.course2_from_js(addHeapObject(course)); | ||
return Course2.__wrap(ret); | ||
} | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
into_proto() { | ||
const retptr = 8; | ||
const ret = wasm.course2_into_proto(retptr, this.ptr); | ||
const memi32 = getInt32Memory(); | ||
const v0 = getArrayU8FromWasm(memi32[retptr / 4 + 0], memi32[retptr / 4 + 1]).slice(); | ||
wasm.__wbindgen_free(memi32[retptr / 4 + 0], memi32[retptr / 4 + 1] * 1); | ||
return v0; | ||
} | ||
/** | ||
* @returns {any} | ||
*/ | ||
to_js() { | ||
return takeObject(wasm.course_to_js(this.ptr)); | ||
into_js() { | ||
const ret = wasm.course2_into_js(this.ptr); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {Uint8Array} course | ||
* @returns {Uint8Array} | ||
*/ | ||
static decrypt(course) { | ||
const retptr = 8; | ||
const ret = wasm.course2_decrypt(retptr, passArray8ToWasm(course), WASM_VECTOR_LEN); | ||
const memi32 = getInt32Memory(); | ||
const v0 = getArrayU8FromWasm(memi32[retptr / 4 + 0], memi32[retptr / 4 + 1]).slice(); | ||
wasm.__wbindgen_free(memi32[retptr / 4 + 0], memi32[retptr / 4 + 1] * 1); | ||
return v0; | ||
} | ||
} | ||
export function __wbindgen_object_clone_ref(idx) { | ||
return addHeapObject(getObject(idx)); | ||
} | ||
export const __wbindgen_json_serialize = function(arg0, arg1) { | ||
const ret = JSON.stringify(getObject(arg1)); | ||
const ret0 = passStringToWasm(ret); | ||
const ret1 = WASM_VECTOR_LEN; | ||
getInt32Memory()[arg0 / 4 + 0] = ret0; | ||
getInt32Memory()[arg0 / 4 + 1] = ret1; | ||
}; | ||
export function __wbindgen_object_drop_ref(i) { dropObject(i); } | ||
export const __wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
export const __wbindgen_string_new = function(arg0, arg1) { | ||
const ret = getStringFromWasm(arg0, arg1); | ||
return addHeapObject(ret); | ||
}; | ||
export const __wbindgen_json_parse = function(arg0, arg1) { | ||
const ret = JSON.parse(getStringFromWasm(arg0, arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
export const __widl_instanceof_Window = function(arg0) { | ||
const ret = getObject(arg0) instanceof Window; | ||
return ret; | ||
}; | ||
export const __widl_f_create_element_Document = function(arg0, arg1, arg2) { | ||
try { | ||
const ret = getObject(arg0).createElement(getStringFromWasm(arg1, arg2)); | ||
return addHeapObject(ret); | ||
} catch (e) { | ||
handleError(e) | ||
} | ||
}; | ||
export const __widl_f_body_Document = function(arg0) { | ||
const ret = getObject(arg0).body; | ||
return isLikeNone(ret) ? 0 : addHeapObject(ret); | ||
}; | ||
export const __widl_f_append_child_Node = function(arg0, arg1) { | ||
try { | ||
const ret = getObject(arg0).appendChild(getObject(arg1)); | ||
return addHeapObject(ret); | ||
} catch (e) { | ||
handleError(e) | ||
} | ||
}; | ||
export const __widl_f_set_text_content_Node = function(arg0, arg1, arg2) { | ||
getObject(arg0).textContent = arg1 === 0 ? undefined : getStringFromWasm(arg1, arg2); | ||
}; | ||
export const __widl_f_document_Window = function(arg0) { | ||
const ret = getObject(arg0).document; | ||
return isLikeNone(ret) ? 0 : addHeapObject(ret); | ||
}; | ||
export const __wbg_call_1fc553129cb17c3c = function(arg0, arg1) { | ||
try { | ||
const ret = getObject(arg0).call(getObject(arg1)); | ||
return addHeapObject(ret); | ||
} catch (e) { | ||
handleError(e) | ||
} | ||
}; | ||
export const __wbindgen_object_clone_ref = function(arg0) { | ||
const ret = getObject(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
export const __wbg_newnoargs_368b05293a3f44de = function(arg0, arg1) { | ||
const ret = new Function(getStringFromWasm(arg0, arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
export const __wbg_globalThis_8df2c73db5eac245 = function() { | ||
try { | ||
const ret = globalThis.globalThis; | ||
return addHeapObject(ret); | ||
} catch (e) { | ||
handleError(e) | ||
} | ||
}; | ||
export const __wbg_self_937dd9f384d2384a = function() { | ||
try { | ||
const ret = self.self; | ||
return addHeapObject(ret); | ||
} catch (e) { | ||
handleError(e) | ||
} | ||
}; | ||
export const __wbg_window_425d3fa09c43ece4 = function() { | ||
try { | ||
const ret = window.window; | ||
return addHeapObject(ret); | ||
} catch (e) { | ||
handleError(e) | ||
} | ||
}; | ||
export const __wbg_global_2c090b42ef2744b9 = function() { | ||
try { | ||
const ret = global.global; | ||
return addHeapObject(ret); | ||
} catch (e) { | ||
handleError(e) | ||
} | ||
}; | ||
export const __wbindgen_is_undefined = function(arg0) { | ||
const ret = getObject(arg0) === undefined; | ||
return ret; | ||
}; | ||
export const __wbg_new_59cb74e423758ede = function() { | ||
const ret = new Error(); | ||
return addHeapObject(ret); | ||
}; | ||
export const __wbg_stack_558ba5917b466edd = function(arg0, arg1) { | ||
const ret = getObject(arg1).stack; | ||
const ret0 = passStringToWasm(ret); | ||
const ret1 = WASM_VECTOR_LEN; | ||
getInt32Memory()[arg0 / 4 + 0] = ret0; | ||
getInt32Memory()[arg0 / 4 + 1] = ret1; | ||
}; | ||
export const __wbg_error_4bb6c2a97407129a = function(arg0, arg1) { | ||
const v0 = getStringFromWasm(arg0, arg1).slice(); | ||
wasm.__wbindgen_free(arg0, arg1 * 1); | ||
console.error(v0); | ||
}; | ||
export const __wbindgen_throw = function(arg0, arg1) { | ||
throw new Error(getStringFromWasm(arg0, arg1)); | ||
}; | ||
export const __wbindgen_rethrow = function(arg0) { | ||
throw takeObject(arg0); | ||
}; | ||
@@ -7,3 +7,3 @@ { | ||
"description": "A utility library for Super Mario Maker and possibly Super Mario Maker 2 in the future to read and manipulate game files.", | ||
"version": "4.0.5", | ||
"version": "4.0.10", | ||
"license": "MIT", | ||
@@ -21,3 +21,3 @@ "repository": { | ||
"types": "cemu_smm.d.ts", | ||
"sideEffects": "false" | ||
"sideEffects": false | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
2213197
457