@imferno/wasm 2.0.1-beta.ceb7ee2 → 2.0.1-beta.ec7f4cb
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/codes.d.ts +7 -0
- package/codes.js +7 -0
- package/imferno_wasm.d.ts +37 -17
- package/imferno_wasm.js +86 -51
- package/imferno_wasm_bg.wasm +0 -0
- package/imferno_wasm_bg.wasm.d.ts +2 -0
- package/index.js +12 -0
- package/package.json +1 -1
package/codes.d.ts
CHANGED
|
@@ -336,5 +336,12 @@ export declare const codes: {
|
|
|
336
336
|
readonly Imferno: {
|
|
337
337
|
readonly UnreferencedAsset: "IMFERNO:Package/UnreferencedAsset";
|
|
338
338
|
readonly UnlistedEssence: "IMFERNO:Package/UnlistedEssence";
|
|
339
|
+
readonly ParseError: "IMFERNO:Package/ParseError";
|
|
340
|
+
readonly PklParseError: "IMFERNO:Package/PklParseError";
|
|
341
|
+
readonly XmlAssetParseError: "IMFERNO:Package/XmlAssetParseError";
|
|
342
|
+
readonly XmlReadError: "IMFERNO:Package/XmlReadError";
|
|
343
|
+
readonly ReadDirError: "IMFERNO:Package/ReadDirError";
|
|
344
|
+
readonly DirEntryError: "IMFERNO:Package/DirEntryError";
|
|
345
|
+
readonly PathTraversal: "IMFERNO:Package/PathTraversal";
|
|
339
346
|
}
|
|
340
347
|
};
|
package/codes.js
CHANGED
|
@@ -336,5 +336,12 @@ export const codes = {
|
|
|
336
336
|
Imferno: {
|
|
337
337
|
UnreferencedAsset: "IMFERNO:Package/UnreferencedAsset",
|
|
338
338
|
UnlistedEssence: "IMFERNO:Package/UnlistedEssence",
|
|
339
|
+
ParseError: "IMFERNO:Package/ParseError",
|
|
340
|
+
PklParseError: "IMFERNO:Package/PklParseError",
|
|
341
|
+
XmlAssetParseError: "IMFERNO:Package/XmlAssetParseError",
|
|
342
|
+
XmlReadError: "IMFERNO:Package/XmlReadError",
|
|
343
|
+
ReadDirError: "IMFERNO:Package/ReadDirError",
|
|
344
|
+
DirEntryError: "IMFERNO:Package/DirEntryError",
|
|
345
|
+
PathTraversal: "IMFERNO:Package/PathTraversal",
|
|
339
346
|
}
|
|
340
347
|
};
|
package/imferno_wasm.d.ts
CHANGED
|
@@ -119,7 +119,7 @@ export interface ContentMaturityRating {
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
export interface ContentMaturityRatingList {
|
|
122
|
-
|
|
122
|
+
contentMaturityRatings: ContentMaturityRating[];
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
export interface ContentVersion {
|
|
@@ -128,7 +128,7 @@ export interface ContentVersion {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
export interface ContentVersionList {
|
|
131
|
-
|
|
131
|
+
contentVersions: ContentVersion[];
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
export interface DCTimedTextDescriptor {
|
|
@@ -155,7 +155,7 @@ export interface EssenceDescriptor {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
export interface EssenceDescriptorList {
|
|
158
|
-
|
|
158
|
+
essenceDescriptors: EssenceDescriptor[];
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
export interface ExtensionProperties {
|
|
@@ -261,7 +261,7 @@ export interface JPEG2000SubDescriptor {
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
export interface LanguageList {
|
|
264
|
-
|
|
264
|
+
languages: LanguageTag[];
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
export interface LanguageString {
|
|
@@ -276,7 +276,7 @@ export interface Locale {
|
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
export interface LocaleList {
|
|
279
|
-
|
|
279
|
+
locales: Locale[];
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
export interface MainAudioSequence {
|
|
@@ -360,7 +360,7 @@ export interface RGBALayoutComponent {
|
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
export interface RegionList {
|
|
363
|
-
|
|
363
|
+
regions: string[];
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
export interface Resolution {
|
|
@@ -380,11 +380,11 @@ export interface Resource {
|
|
|
380
380
|
repeatCount?: number | null;
|
|
381
381
|
keyId?: ImfUuid | null;
|
|
382
382
|
hash?: string | null;
|
|
383
|
-
|
|
383
|
+
markers?: MarkerInfo[];
|
|
384
384
|
}
|
|
385
385
|
|
|
386
386
|
export interface ResourceList {
|
|
387
|
-
|
|
387
|
+
resources?: Resource[];
|
|
388
388
|
}
|
|
389
389
|
|
|
390
390
|
export interface Segment {
|
|
@@ -393,18 +393,18 @@ export interface Segment {
|
|
|
393
393
|
}
|
|
394
394
|
|
|
395
395
|
export interface SegmentList {
|
|
396
|
-
|
|
396
|
+
segments: Segment[];
|
|
397
397
|
}
|
|
398
398
|
|
|
399
399
|
export interface SequenceList {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
400
|
+
markerSequences?: MarkerSequence[];
|
|
401
|
+
mainImageSequences?: MainImageSequence[];
|
|
402
|
+
mainAudioSequences?: MainAudioSequence[];
|
|
403
|
+
subtitlesSequences?: SubtitlesSequence[];
|
|
404
|
+
hearingImpairedCaptionsSequences?: HearingImpairedCaptionsSequence[];
|
|
405
|
+
forcedNarrativeSequences?: ForcedNarrativeSequence[];
|
|
406
|
+
iabSequences?: IABSequence[];
|
|
407
|
+
isxdSequences?: ISXDSequence[];
|
|
408
408
|
}
|
|
409
409
|
|
|
410
410
|
export interface SoundfieldGroupLabelSubDescriptor {
|
|
@@ -505,6 +505,24 @@ export function getVersion(): string;
|
|
|
505
505
|
*/
|
|
506
506
|
export function init(): void;
|
|
507
507
|
|
|
508
|
+
/**
|
|
509
|
+
* Parse an IMF package from in-memory files, returning the full parsed package.
|
|
510
|
+
*
|
|
511
|
+
* Unlike `buildReport` which returns a summary, this returns the complete
|
|
512
|
+
* `Imferno` struct with all essence descriptors, locales, content versions, etc.
|
|
513
|
+
*/
|
|
514
|
+
export function parsePackage(files: any): any;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Parse and validate an IMF package in one call.
|
|
518
|
+
*
|
|
519
|
+
* Returns `{ package, validation }` where `package` is the full `Imferno`
|
|
520
|
+
* struct and `validation` is the `ValidationReport` with all findings.
|
|
521
|
+
*
|
|
522
|
+
* This is the recommended entry point.
|
|
523
|
+
*/
|
|
524
|
+
export function validate(files: any, options: any): any;
|
|
525
|
+
|
|
508
526
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
509
527
|
|
|
510
528
|
export interface InitOutput {
|
|
@@ -513,6 +531,8 @@ export interface InitOutput {
|
|
|
513
531
|
readonly formatReport: (a: any) => [number, number, number, number];
|
|
514
532
|
readonly getVersion: () => [number, number];
|
|
515
533
|
readonly init: () => void;
|
|
534
|
+
readonly parsePackage: (a: any) => [number, number, number];
|
|
535
|
+
readonly validate: (a: any, b: any) => [number, number, number];
|
|
516
536
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
517
537
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
518
538
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/imferno_wasm.js
CHANGED
|
@@ -76,14 +76,49 @@ export function init() {
|
|
|
76
76
|
wasm.init();
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
/**
|
|
80
|
+
* Parse an IMF package from in-memory files, returning the full parsed package.
|
|
81
|
+
*
|
|
82
|
+
* Unlike `buildReport` which returns a summary, this returns the complete
|
|
83
|
+
* `Imferno` struct with all essence descriptors, locales, content versions, etc.
|
|
84
|
+
* @param {any} files
|
|
85
|
+
* @returns {any}
|
|
86
|
+
*/
|
|
87
|
+
export function parsePackage(files) {
|
|
88
|
+
const ret = wasm.parsePackage(files);
|
|
89
|
+
if (ret[2]) {
|
|
90
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
91
|
+
}
|
|
92
|
+
return takeFromExternrefTable0(ret[0]);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Parse and validate an IMF package in one call.
|
|
97
|
+
*
|
|
98
|
+
* Returns `{ package, validation }` where `package` is the full `Imferno`
|
|
99
|
+
* struct and `validation` is the `ValidationReport` with all findings.
|
|
100
|
+
*
|
|
101
|
+
* This is the recommended entry point.
|
|
102
|
+
* @param {any} files
|
|
103
|
+
* @param {any} options
|
|
104
|
+
* @returns {any}
|
|
105
|
+
*/
|
|
106
|
+
export function validate(files, options) {
|
|
107
|
+
const ret = wasm.validate(files, options);
|
|
108
|
+
if (ret[2]) {
|
|
109
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
110
|
+
}
|
|
111
|
+
return takeFromExternrefTable0(ret[0]);
|
|
112
|
+
}
|
|
113
|
+
|
|
79
114
|
function __wbg_get_imports() {
|
|
80
115
|
const import0 = {
|
|
81
116
|
__proto__: null,
|
|
82
|
-
|
|
117
|
+
__wbg_Error_55538483de6e3abe: function(arg0, arg1) {
|
|
83
118
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
84
119
|
return ret;
|
|
85
120
|
},
|
|
86
|
-
|
|
121
|
+
__wbg_Number_f257194b7002d6f9: function(arg0) {
|
|
87
122
|
const ret = Number(arg0);
|
|
88
123
|
return ret;
|
|
89
124
|
},
|
|
@@ -94,68 +129,68 @@ function __wbg_get_imports() {
|
|
|
94
129
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
95
130
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
96
131
|
},
|
|
97
|
-
|
|
132
|
+
__wbg___wbindgen_bigint_get_as_i64_a738e80c0fe6f6a7: function(arg0, arg1) {
|
|
98
133
|
const v = arg1;
|
|
99
134
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
100
135
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
101
136
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
102
137
|
},
|
|
103
|
-
|
|
138
|
+
__wbg___wbindgen_boolean_get_fe2a24fdfdb4064f: function(arg0) {
|
|
104
139
|
const v = arg0;
|
|
105
140
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
106
141
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
107
142
|
},
|
|
108
|
-
|
|
143
|
+
__wbg___wbindgen_debug_string_d89627202d0155b7: function(arg0, arg1) {
|
|
109
144
|
const ret = debugString(arg1);
|
|
110
145
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
111
146
|
const len1 = WASM_VECTOR_LEN;
|
|
112
147
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
113
148
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
114
149
|
},
|
|
115
|
-
|
|
150
|
+
__wbg___wbindgen_in_fe3eb6a509f75744: function(arg0, arg1) {
|
|
116
151
|
const ret = arg0 in arg1;
|
|
117
152
|
return ret;
|
|
118
153
|
},
|
|
119
|
-
|
|
154
|
+
__wbg___wbindgen_is_bigint_ca270ac12ef71091: function(arg0) {
|
|
120
155
|
const ret = typeof(arg0) === 'bigint';
|
|
121
156
|
return ret;
|
|
122
157
|
},
|
|
123
|
-
|
|
158
|
+
__wbg___wbindgen_is_function_2a95406423ea8626: function(arg0) {
|
|
124
159
|
const ret = typeof(arg0) === 'function';
|
|
125
160
|
return ret;
|
|
126
161
|
},
|
|
127
|
-
|
|
162
|
+
__wbg___wbindgen_is_null_8d90524c9e0af183: function(arg0) {
|
|
128
163
|
const ret = arg0 === null;
|
|
129
164
|
return ret;
|
|
130
165
|
},
|
|
131
|
-
|
|
166
|
+
__wbg___wbindgen_is_object_59a002e76b059312: function(arg0) {
|
|
132
167
|
const val = arg0;
|
|
133
168
|
const ret = typeof(val) === 'object' && val !== null;
|
|
134
169
|
return ret;
|
|
135
170
|
},
|
|
136
|
-
|
|
171
|
+
__wbg___wbindgen_is_string_624d5244bb2bc87c: function(arg0) {
|
|
137
172
|
const ret = typeof(arg0) === 'string';
|
|
138
173
|
return ret;
|
|
139
174
|
},
|
|
140
|
-
|
|
175
|
+
__wbg___wbindgen_is_undefined_87a3a837f331fef5: function(arg0) {
|
|
141
176
|
const ret = arg0 === undefined;
|
|
142
177
|
return ret;
|
|
143
178
|
},
|
|
144
|
-
|
|
179
|
+
__wbg___wbindgen_jsval_eq_eedd705f9f2a4f35: function(arg0, arg1) {
|
|
145
180
|
const ret = arg0 === arg1;
|
|
146
181
|
return ret;
|
|
147
182
|
},
|
|
148
|
-
|
|
183
|
+
__wbg___wbindgen_jsval_loose_eq_cf851f110c48f9ba: function(arg0, arg1) {
|
|
149
184
|
const ret = arg0 == arg1;
|
|
150
185
|
return ret;
|
|
151
186
|
},
|
|
152
|
-
|
|
187
|
+
__wbg___wbindgen_number_get_769f3676dc20c1d7: function(arg0, arg1) {
|
|
153
188
|
const obj = arg1;
|
|
154
189
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
155
190
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
156
191
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
157
192
|
},
|
|
158
|
-
|
|
193
|
+
__wbg___wbindgen_string_get_f1161390414f9b59: function(arg0, arg1) {
|
|
159
194
|
const obj = arg1;
|
|
160
195
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
161
196
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -163,34 +198,34 @@ function __wbg_get_imports() {
|
|
|
163
198
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
164
199
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
165
200
|
},
|
|
166
|
-
|
|
201
|
+
__wbg___wbindgen_throw_5549492daedad139: function(arg0, arg1) {
|
|
167
202
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
168
203
|
},
|
|
169
|
-
|
|
204
|
+
__wbg_call_6ae20895a60069a2: function() { return handleError(function (arg0, arg1) {
|
|
170
205
|
const ret = arg0.call(arg1);
|
|
171
206
|
return ret;
|
|
172
207
|
}, arguments); },
|
|
173
|
-
|
|
208
|
+
__wbg_done_19f92cb1f8738aba: function(arg0) {
|
|
174
209
|
const ret = arg0.done;
|
|
175
210
|
return ret;
|
|
176
211
|
},
|
|
177
|
-
|
|
212
|
+
__wbg_entries_28ed7cb892e12eff: function(arg0) {
|
|
178
213
|
const ret = Object.entries(arg0);
|
|
179
214
|
return ret;
|
|
180
215
|
},
|
|
181
|
-
|
|
216
|
+
__wbg_getTime_c3af35594e283356: function(arg0) {
|
|
182
217
|
const ret = arg0.getTime();
|
|
183
218
|
return ret;
|
|
184
219
|
},
|
|
185
|
-
|
|
186
|
-
const ret = Reflect.get(arg0, arg1);
|
|
187
|
-
return ret;
|
|
188
|
-
}, arguments); },
|
|
189
|
-
__wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
|
|
220
|
+
__wbg_get_94f5fc088edd3138: function(arg0, arg1) {
|
|
190
221
|
const ret = arg0[arg1 >>> 0];
|
|
191
222
|
return ret;
|
|
192
223
|
},
|
|
193
|
-
|
|
224
|
+
__wbg_get_a50328e7325d7f9b: function() { return handleError(function (arg0, arg1) {
|
|
225
|
+
const ret = Reflect.get(arg0, arg1);
|
|
226
|
+
return ret;
|
|
227
|
+
}, arguments); },
|
|
228
|
+
__wbg_get_unchecked_7c6bbabf5b0b1fbf: function(arg0, arg1) {
|
|
194
229
|
const ret = arg0[arg1 >>> 0];
|
|
195
230
|
return ret;
|
|
196
231
|
},
|
|
@@ -198,7 +233,7 @@ function __wbg_get_imports() {
|
|
|
198
233
|
const ret = arg0[arg1];
|
|
199
234
|
return ret;
|
|
200
235
|
},
|
|
201
|
-
|
|
236
|
+
__wbg_instanceof_ArrayBuffer_8d855993947fc3a2: function(arg0) {
|
|
202
237
|
let result;
|
|
203
238
|
try {
|
|
204
239
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -208,7 +243,7 @@ function __wbg_get_imports() {
|
|
|
208
243
|
const ret = result;
|
|
209
244
|
return ret;
|
|
210
245
|
},
|
|
211
|
-
|
|
246
|
+
__wbg_instanceof_Map_238410f1463c05ed: function(arg0) {
|
|
212
247
|
let result;
|
|
213
248
|
try {
|
|
214
249
|
result = arg0 instanceof Map;
|
|
@@ -218,7 +253,7 @@ function __wbg_get_imports() {
|
|
|
218
253
|
const ret = result;
|
|
219
254
|
return ret;
|
|
220
255
|
},
|
|
221
|
-
|
|
256
|
+
__wbg_instanceof_Uint8Array_ce24d58a5f4bdcc3: function(arg0) {
|
|
222
257
|
let result;
|
|
223
258
|
try {
|
|
224
259
|
result = arg0 instanceof Uint8Array;
|
|
@@ -228,71 +263,71 @@ function __wbg_get_imports() {
|
|
|
228
263
|
const ret = result;
|
|
229
264
|
return ret;
|
|
230
265
|
},
|
|
231
|
-
|
|
266
|
+
__wbg_isArray_867202cf8f195ed8: function(arg0) {
|
|
232
267
|
const ret = Array.isArray(arg0);
|
|
233
268
|
return ret;
|
|
234
269
|
},
|
|
235
|
-
|
|
270
|
+
__wbg_isSafeInteger_1dfae065cbfe1915: function(arg0) {
|
|
236
271
|
const ret = Number.isSafeInteger(arg0);
|
|
237
272
|
return ret;
|
|
238
273
|
},
|
|
239
|
-
|
|
274
|
+
__wbg_iterator_54661826e186eb6a: function() {
|
|
240
275
|
const ret = Symbol.iterator;
|
|
241
276
|
return ret;
|
|
242
277
|
},
|
|
243
|
-
|
|
278
|
+
__wbg_length_e6e1633fbea6cfa9: function(arg0) {
|
|
244
279
|
const ret = arg0.length;
|
|
245
280
|
return ret;
|
|
246
281
|
},
|
|
247
|
-
|
|
282
|
+
__wbg_length_fae3e439140f48a4: function(arg0) {
|
|
248
283
|
const ret = arg0.length;
|
|
249
284
|
return ret;
|
|
250
285
|
},
|
|
251
286
|
__wbg_log_3a9854467c45b73c: function(arg0, arg1) {
|
|
252
287
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
253
288
|
},
|
|
254
|
-
|
|
255
|
-
const ret = new
|
|
289
|
+
__wbg_new_0934b88171ef61b0: function() {
|
|
290
|
+
const ret = new Map();
|
|
256
291
|
return ret;
|
|
257
292
|
},
|
|
258
|
-
|
|
259
|
-
const ret = new
|
|
293
|
+
__wbg_new_0_e649c99e7382313f: function() {
|
|
294
|
+
const ret = new Date();
|
|
260
295
|
return ret;
|
|
261
296
|
},
|
|
262
|
-
|
|
297
|
+
__wbg_new_1d96678aaacca32e: function(arg0) {
|
|
263
298
|
const ret = new Uint8Array(arg0);
|
|
264
299
|
return ret;
|
|
265
300
|
},
|
|
266
|
-
|
|
301
|
+
__wbg_new_4370be21fa2b2f80: function() {
|
|
267
302
|
const ret = new Array();
|
|
268
303
|
return ret;
|
|
269
304
|
},
|
|
270
|
-
|
|
305
|
+
__wbg_new_48e1d86cfd30c8e7: function() {
|
|
271
306
|
const ret = new Object();
|
|
272
307
|
return ret;
|
|
273
308
|
},
|
|
274
|
-
|
|
275
|
-
const ret = arg0.next();
|
|
276
|
-
return ret;
|
|
277
|
-
}, arguments); },
|
|
278
|
-
__wbg_next_e01a967809d1aa68: function(arg0) {
|
|
309
|
+
__wbg_next_55d835fe0ab5b3e7: function(arg0) {
|
|
279
310
|
const ret = arg0.next;
|
|
280
311
|
return ret;
|
|
281
312
|
},
|
|
282
|
-
|
|
313
|
+
__wbg_next_e34cfb9df1518d7c: function() { return handleError(function (arg0) {
|
|
314
|
+
const ret = arg0.next();
|
|
315
|
+
return ret;
|
|
316
|
+
}, arguments); },
|
|
317
|
+
__wbg_prototypesetcall_3875d54d12ef2eec: function(arg0, arg1, arg2) {
|
|
283
318
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
284
319
|
},
|
|
285
|
-
|
|
320
|
+
__wbg_set_4702dfa37c77f492: function(arg0, arg1, arg2) {
|
|
286
321
|
arg0[arg1 >>> 0] = arg2;
|
|
287
322
|
},
|
|
288
323
|
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
289
324
|
arg0[arg1] = arg2;
|
|
290
325
|
},
|
|
291
|
-
|
|
326
|
+
__wbg_set_8c6629931852a4a5: function(arg0, arg1, arg2) {
|
|
292
327
|
const ret = arg0.set(arg1, arg2);
|
|
293
328
|
return ret;
|
|
294
329
|
},
|
|
295
|
-
|
|
330
|
+
__wbg_value_d5b248ce8419bd1b: function(arg0) {
|
|
296
331
|
const ret = arg0.value;
|
|
297
332
|
return ret;
|
|
298
333
|
},
|
package/imferno_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -5,6 +5,8 @@ export const buildReport: (a: any, b: any) => [number, number, number];
|
|
|
5
5
|
export const formatReport: (a: any) => [number, number, number, number];
|
|
6
6
|
export const getVersion: () => [number, number];
|
|
7
7
|
export const init: () => void;
|
|
8
|
+
export const parsePackage: (a: any) => [number, number, number];
|
|
9
|
+
export const validate: (a: any, b: any) => [number, number, number];
|
|
8
10
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
9
11
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
10
12
|
export const __wbindgen_exn_store: (a: number) => void;
|
package/index.js
CHANGED
|
@@ -42,6 +42,18 @@ export async function formatReport(report) {
|
|
|
42
42
|
return wasm.formatReport(report);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
// Parse an IMF package, returning the full Imferno struct (no validation)
|
|
46
|
+
export async function parsePackage(files) {
|
|
47
|
+
await ensureInit();
|
|
48
|
+
return wasm.parsePackage(files);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Parse + validate — returns { package, validation }
|
|
52
|
+
export async function validate(files, options) {
|
|
53
|
+
await ensureInit();
|
|
54
|
+
return wasm.validate(files, options);
|
|
55
|
+
}
|
|
56
|
+
|
|
45
57
|
// Utility
|
|
46
58
|
export async function getVersion() {
|
|
47
59
|
await ensureInit();
|