Comparing version 4.0.24 to 4.0.25
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
*/ | ||
export function run(): void; | ||
/** | ||
* Super Mario Maker course file. | ||
* | ||
* This struct is a wrapper to hold a [SMMCourse](crate::proto::SMMCourse) struct which can be serialized via Protocol Buffer. | ||
*/ | ||
export class Course { | ||
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; | ||
/** | ||
* @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 | ||
* @param {Uint8Array | undefined} thumb | ||
* @returns {Course2} | ||
*/ | ||
static from_proto(buffer: Uint8Array, thumb?: Uint8Array): Course2; | ||
/** | ||
* @param {Uint8Array} buffer | ||
* @param {Uint8Array | undefined} thumb | ||
* @returns {Course2} | ||
*/ | ||
static from_boxed_proto(buffer: Uint8Array, thumb?: Uint8Array): Course2; | ||
/** | ||
* @param {any} course | ||
* @param {Uint8Array | undefined} thumb | ||
* @returns {Course2} | ||
*/ | ||
static from_js(course: any, thumb?: Uint8Array): Course2; | ||
/** | ||
* @param {Uint8Array} buffer | ||
* @returns {any[]} | ||
*/ | ||
static from_packed_js(buffer: Uint8Array): any[]; | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
into_proto(): Uint8Array; | ||
/** | ||
* @returns {any} | ||
*/ | ||
into_js(): any; | ||
/** | ||
* @param {Uint8Array} course | ||
* @returns {Uint8Array} | ||
*/ | ||
static decrypt(course: Uint8Array): Uint8Array; | ||
/** | ||
* @param {Uint8Array} course | ||
* @returns {Uint8Array} | ||
*/ | ||
static encrypt(course: Uint8Array): Uint8Array; | ||
} | ||
/** | ||
*/ | ||
export class Thumbnail2 { | ||
free(): void; | ||
} |
512
cemu_smm.js
import * as wasm from './cemu_smm_bg.wasm'; | ||
const heap = new Array(32); | ||
heap.fill(undefined); | ||
heap.push(undefined, null, true, false); | ||
function getObject(idx) { return heap[idx]; } | ||
let WASM_VECTOR_LEN = 0; | ||
let cachegetUint8Memory0 = null; | ||
function getUint8Memory0() { | ||
if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) { | ||
cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer); | ||
} | ||
return cachegetUint8Memory0; | ||
} | ||
const lTextEncoder = typeof TextEncoder === 'undefined' ? require('util').TextEncoder : TextEncoder; | ||
let cachedTextEncoder = new lTextEncoder('utf-8'); | ||
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' | ||
? function (arg, view) { | ||
return cachedTextEncoder.encodeInto(arg, view); | ||
} | ||
: function (arg, view) { | ||
const buf = cachedTextEncoder.encode(arg); | ||
view.set(buf); | ||
return { | ||
read: arg.length, | ||
written: buf.length | ||
}; | ||
}); | ||
function passStringToWasm0(arg, malloc, realloc) { | ||
if (realloc === undefined) { | ||
const buf = cachedTextEncoder.encode(arg); | ||
const ptr = malloc(buf.length); | ||
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf); | ||
WASM_VECTOR_LEN = buf.length; | ||
return ptr; | ||
} | ||
let len = arg.length; | ||
let ptr = malloc(len); | ||
const mem = getUint8Memory0(); | ||
let offset = 0; | ||
for (; offset < len; offset++) { | ||
const code = arg.charCodeAt(offset); | ||
if (code > 0x7F) break; | ||
mem[ptr + offset] = code; | ||
} | ||
if (offset !== len) { | ||
if (offset !== 0) { | ||
arg = arg.slice(offset); | ||
} | ||
ptr = realloc(ptr, len, len = offset + arg.length * 3); | ||
const view = getUint8Memory0().subarray(ptr + offset, ptr + len); | ||
const ret = encodeString(arg, view); | ||
offset += ret.written; | ||
} | ||
WASM_VECTOR_LEN = offset; | ||
return ptr; | ||
} | ||
let cachegetInt32Memory0 = null; | ||
function getInt32Memory0() { | ||
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) { | ||
cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer); | ||
} | ||
return cachegetInt32Memory0; | ||
} | ||
let heap_next = heap.length; | ||
function dropObject(idx) { | ||
if (idx < 36) return; | ||
heap[idx] = heap_next; | ||
heap_next = idx; | ||
} | ||
function takeObject(idx) { | ||
const ret = getObject(idx); | ||
dropObject(idx); | ||
return ret; | ||
} | ||
const lTextDecoder = typeof TextDecoder === 'undefined' ? require('util').TextDecoder : TextDecoder; | ||
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); | ||
cachedTextDecoder.decode(); | ||
function getStringFromWasm0(ptr, len) { | ||
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); | ||
} | ||
function addHeapObject(obj) { | ||
if (heap_next === heap.length) heap.push(heap.length + 1); | ||
const idx = heap_next; | ||
heap_next = heap[idx]; | ||
heap[idx] = obj; | ||
return idx; | ||
} | ||
function passArray8ToWasm0(arg, malloc) { | ||
const ptr = malloc(arg.length * 1); | ||
getUint8Memory0().set(arg, ptr / 1); | ||
WASM_VECTOR_LEN = arg.length; | ||
return ptr; | ||
} | ||
let cachegetUint32Memory0 = null; | ||
function getUint32Memory0() { | ||
if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) { | ||
cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); | ||
} | ||
return cachegetUint32Memory0; | ||
} | ||
function getArrayJsValueFromWasm0(ptr, len) { | ||
const mem = getUint32Memory0(); | ||
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; | ||
} | ||
function getArrayU8FromWasm0(ptr, len) { | ||
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len); | ||
} | ||
function isLikeNone(x) { | ||
return x === undefined || x === null; | ||
} | ||
/** | ||
*/ | ||
export function run() { | ||
wasm.run(); | ||
} | ||
function handleError(e) { | ||
wasm.__wbindgen_exn_store(addHeapObject(e)); | ||
} | ||
/** | ||
* Super Mario Maker course file. | ||
* | ||
* This struct is a wrapper to hold a [SMMCourse](crate::proto::SMMCourse) struct which can be serialized via Protocol Buffer. | ||
*/ | ||
export class Course { | ||
static __wrap(ptr) { | ||
const obj = Object.create(Course.prototype); | ||
obj.ptr = ptr; | ||
return obj; | ||
} | ||
free() { | ||
const ptr = this.ptr; | ||
this.ptr = 0; | ||
wasm.__wbg_course_free(ptr); | ||
} | ||
/** | ||
* @param {Uint8Array} buffer | ||
* @returns {Course} | ||
*/ | ||
static from_proto(buffer) { | ||
var ptr0 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
var ret = wasm.course_from_proto(ptr0, len0); | ||
return Course.__wrap(ret); | ||
} | ||
/** | ||
* @param {Uint8Array} buffer | ||
* @returns {Course} | ||
*/ | ||
static from_boxed_proto(buffer) { | ||
var ptr0 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
var ret = wasm.course_from_boxed_proto(ptr0, len0); | ||
return Course.__wrap(ret); | ||
} | ||
/** | ||
* @param {any} course | ||
* @returns {Course} | ||
*/ | ||
static from_js(course) { | ||
var ret = wasm.course_from_js(addHeapObject(course)); | ||
return Course.__wrap(ret); | ||
} | ||
/** | ||
* @param {Uint8Array} buffer | ||
* @returns {any[]} | ||
*/ | ||
static from_packed_js(buffer) { | ||
var ptr0 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
wasm.course_from_packed_js(8, ptr0, len0); | ||
var r0 = getInt32Memory0()[8 / 4 + 0]; | ||
var r1 = getInt32Memory0()[8 / 4 + 1]; | ||
var v1 = getArrayJsValueFromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_free(r0, r1 * 4); | ||
return v1; | ||
} | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
into_proto() { | ||
wasm.course_into_proto(8, this.ptr); | ||
var r0 = getInt32Memory0()[8 / 4 + 0]; | ||
var r1 = getInt32Memory0()[8 / 4 + 1]; | ||
var v0 = getArrayU8FromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_free(r0, r1 * 1); | ||
return v0; | ||
} | ||
/** | ||
* @returns {any} | ||
*/ | ||
into_js() { | ||
var ret = wasm.course_into_js(this.ptr); | ||
return takeObject(ret); | ||
} | ||
} | ||
/** | ||
*/ | ||
export class Course2 { | ||
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 | ||
* @param {Uint8Array | undefined} thumb | ||
* @returns {Course2} | ||
*/ | ||
static from_proto(buffer, thumb) { | ||
var ptr0 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
var ptr1 = isLikeNone(thumb) ? 0 : passArray8ToWasm0(thumb, wasm.__wbindgen_malloc); | ||
var len1 = WASM_VECTOR_LEN; | ||
var ret = wasm.course2_from_proto(ptr0, len0, ptr1, len1); | ||
return Course2.__wrap(ret); | ||
} | ||
/** | ||
* @param {Uint8Array} buffer | ||
* @param {Uint8Array | undefined} thumb | ||
* @returns {Course2} | ||
*/ | ||
static from_boxed_proto(buffer, thumb) { | ||
var ptr0 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
var ptr1 = isLikeNone(thumb) ? 0 : passArray8ToWasm0(thumb, wasm.__wbindgen_malloc); | ||
var len1 = WASM_VECTOR_LEN; | ||
var ret = wasm.course2_from_boxed_proto(ptr0, len0, ptr1, len1); | ||
return Course2.__wrap(ret); | ||
} | ||
/** | ||
* @param {any} course | ||
* @param {Uint8Array | undefined} thumb | ||
* @returns {Course2} | ||
*/ | ||
static from_js(course, thumb) { | ||
var ptr0 = isLikeNone(thumb) ? 0 : passArray8ToWasm0(thumb, wasm.__wbindgen_malloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
var ret = wasm.course2_from_js(addHeapObject(course), ptr0, len0); | ||
return Course2.__wrap(ret); | ||
} | ||
/** | ||
* @param {Uint8Array} buffer | ||
* @returns {any[]} | ||
*/ | ||
static from_packed_js(buffer) { | ||
var ptr0 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
wasm.course2_from_packed_js(8, ptr0, len0); | ||
var r0 = getInt32Memory0()[8 / 4 + 0]; | ||
var r1 = getInt32Memory0()[8 / 4 + 1]; | ||
var v1 = getArrayJsValueFromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_free(r0, r1 * 4); | ||
return v1; | ||
} | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
into_proto() { | ||
wasm.course2_into_proto(8, this.ptr); | ||
var r0 = getInt32Memory0()[8 / 4 + 0]; | ||
var r1 = getInt32Memory0()[8 / 4 + 1]; | ||
var v0 = getArrayU8FromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_free(r0, r1 * 1); | ||
return v0; | ||
} | ||
/** | ||
* @returns {any} | ||
*/ | ||
into_js() { | ||
var ret = wasm.course2_into_js(this.ptr); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {Uint8Array} course | ||
* @returns {Uint8Array} | ||
*/ | ||
static decrypt(course) { | ||
var ptr0 = passArray8ToWasm0(course, wasm.__wbindgen_malloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
wasm.course2_decrypt(8, ptr0, len0); | ||
var r0 = getInt32Memory0()[8 / 4 + 0]; | ||
var r1 = getInt32Memory0()[8 / 4 + 1]; | ||
var v1 = getArrayU8FromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_free(r0, r1 * 1); | ||
return v1; | ||
} | ||
/** | ||
* @param {Uint8Array} course | ||
* @returns {Uint8Array} | ||
*/ | ||
static encrypt(course) { | ||
var ptr0 = passArray8ToWasm0(course, wasm.__wbindgen_malloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
wasm.course2_encrypt(8, ptr0, len0); | ||
var r0 = getInt32Memory0()[8 / 4 + 0]; | ||
var r1 = getInt32Memory0()[8 / 4 + 1]; | ||
var v1 = getArrayU8FromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_free(r0, r1 * 1); | ||
return v1; | ||
} | ||
} | ||
/** | ||
*/ | ||
export class Thumbnail2 { | ||
free() { | ||
const ptr = this.ptr; | ||
this.ptr = 0; | ||
wasm.__wbg_thumbnail2_free(ptr); | ||
} | ||
} | ||
export const __wbindgen_json_serialize = function(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
var ret = JSON.stringify(obj === undefined ? null : obj); | ||
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len0; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr0; | ||
}; | ||
export const __wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
export const __wbindgen_string_new = function(arg0, arg1) { | ||
var ret = getStringFromWasm0(arg0, arg1); | ||
return addHeapObject(ret); | ||
}; | ||
export const __wbindgen_json_parse = function(arg0, arg1) { | ||
var ret = JSON.parse(getStringFromWasm0(arg0, arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
export const __widl_instanceof_Window = function(arg0) { | ||
var ret = getObject(arg0) instanceof Window; | ||
return ret; | ||
}; | ||
export const __widl_f_create_element_Document = function(arg0, arg1, arg2) { | ||
try { | ||
var ret = getObject(arg0).createElement(getStringFromWasm0(arg1, arg2)); | ||
return addHeapObject(ret); | ||
} catch (e) { | ||
handleError(e) | ||
} | ||
}; | ||
export const __widl_f_body_Document = function(arg0) { | ||
var ret = getObject(arg0).body; | ||
return isLikeNone(ret) ? 0 : addHeapObject(ret); | ||
}; | ||
export const __widl_f_append_child_Node = function(arg0, arg1) { | ||
try { | ||
var 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 : getStringFromWasm0(arg1, arg2); | ||
}; | ||
export const __widl_f_document_Window = function(arg0) { | ||
var ret = getObject(arg0).document; | ||
return isLikeNone(ret) ? 0 : addHeapObject(ret); | ||
}; | ||
export const __wbg_call_12b949cfc461d154 = function(arg0, arg1) { | ||
try { | ||
var ret = getObject(arg0).call(getObject(arg1)); | ||
return addHeapObject(ret); | ||
} catch (e) { | ||
handleError(e) | ||
} | ||
}; | ||
export const __wbindgen_object_clone_ref = function(arg0) { | ||
var ret = getObject(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
export const __wbg_newnoargs_c4b2cbbd30e2d057 = function(arg0, arg1) { | ||
var ret = new Function(getStringFromWasm0(arg0, arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
export const __wbg_globalThis_22e06d4bea0084e3 = function() { | ||
try { | ||
var ret = globalThis.globalThis; | ||
return addHeapObject(ret); | ||
} catch (e) { | ||
handleError(e) | ||
} | ||
}; | ||
export const __wbg_self_00b0599bca667294 = function() { | ||
try { | ||
var ret = self.self; | ||
return addHeapObject(ret); | ||
} catch (e) { | ||
handleError(e) | ||
} | ||
}; | ||
export const __wbg_window_aa795c5aad79b8ac = function() { | ||
try { | ||
var ret = window.window; | ||
return addHeapObject(ret); | ||
} catch (e) { | ||
handleError(e) | ||
} | ||
}; | ||
export const __wbg_global_cc239dc2303f417c = function() { | ||
try { | ||
var ret = global.global; | ||
return addHeapObject(ret); | ||
} catch (e) { | ||
handleError(e) | ||
} | ||
}; | ||
export const __wbindgen_is_undefined = function(arg0) { | ||
var ret = getObject(arg0) === undefined; | ||
return ret; | ||
}; | ||
export const __wbg_new_59cb74e423758ede = function() { | ||
var ret = new Error(); | ||
return addHeapObject(ret); | ||
}; | ||
export const __wbg_stack_558ba5917b466edd = function(arg0, arg1) { | ||
var ret = getObject(arg1).stack; | ||
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len0; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr0; | ||
}; | ||
export const __wbg_error_4bb6c2a97407129a = function(arg0, arg1) { | ||
try { | ||
console.error(getStringFromWasm0(arg0, arg1)); | ||
} finally { | ||
wasm.__wbindgen_free(arg0, arg1); | ||
} | ||
}; | ||
export const __wbindgen_throw = function(arg0, arg1) { | ||
throw new Error(getStringFromWasm0(arg0, arg1)); | ||
}; | ||
export const __wbindgen_rethrow = function(arg0) { | ||
throw takeObject(arg0); | ||
}; | ||
@@ -7,3 +7,3 @@ { | ||
"description": "A utility library for Super Mario Maker and Super Mario Maker 2 to read and manipulate game files.", | ||
"version": "4.0.24", | ||
"version": "4.0.25", | ||
"license": "MIT", | ||
@@ -10,0 +10,0 @@ "repository": { |
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
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
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
4137
3
2