@imferno/wasm 2.0.1-beta.9550ead → 2.0.1-beta.9de606c
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 +45 -25
- package/imferno_wasm.js +92 -58
- 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
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export interface Asset {
|
|
4
4
|
id: ImfUuid;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
packingList: boolean | null;
|
|
6
|
+
chunkList: ChunkList;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export interface AssetList {
|
|
@@ -12,12 +12,12 @@ export interface AssetList {
|
|
|
12
12
|
|
|
13
13
|
export interface AssetMap {
|
|
14
14
|
id: ImfUuid;
|
|
15
|
-
|
|
15
|
+
annotationText: string | null;
|
|
16
16
|
creator: string | null;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
volumeCount: number;
|
|
18
|
+
issueDate: string;
|
|
19
19
|
issuer: string | null;
|
|
20
|
-
|
|
20
|
+
assetList: AssetList;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export interface AudienceElement {
|
|
@@ -71,7 +71,7 @@ export interface CDCIDescriptor {
|
|
|
71
71
|
|
|
72
72
|
export interface Chunk {
|
|
73
73
|
path: string;
|
|
74
|
-
|
|
74
|
+
volumeIndex: number;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
export interface ChunkList {
|
|
@@ -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 {
|
|
@@ -439,7 +439,7 @@ export interface VideoSubDescriptors {
|
|
|
439
439
|
}
|
|
440
440
|
|
|
441
441
|
export interface VolumeIndex {
|
|
442
|
-
|
|
442
|
+
index: number;
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
export interface WAVEPCMDescriptor {
|
|
@@ -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,48 @@ 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
|
+
}
|
|
79
113
|
function __wbg_get_imports() {
|
|
80
114
|
const import0 = {
|
|
81
115
|
__proto__: null,
|
|
82
|
-
|
|
116
|
+
__wbg_Error_3639a60ed15f87e7: function(arg0, arg1) {
|
|
83
117
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
84
118
|
return ret;
|
|
85
119
|
},
|
|
86
|
-
|
|
120
|
+
__wbg_Number_a3d737fd183f7dca: function(arg0) {
|
|
87
121
|
const ret = Number(arg0);
|
|
88
122
|
return ret;
|
|
89
123
|
},
|
|
@@ -94,68 +128,68 @@ function __wbg_get_imports() {
|
|
|
94
128
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
95
129
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
96
130
|
},
|
|
97
|
-
|
|
131
|
+
__wbg___wbindgen_bigint_get_as_i64_3af6d4ca77193a4b: function(arg0, arg1) {
|
|
98
132
|
const v = arg1;
|
|
99
133
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
100
134
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
101
135
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
102
136
|
},
|
|
103
|
-
|
|
137
|
+
__wbg___wbindgen_boolean_get_c3dd5c39f1b5a12b: function(arg0) {
|
|
104
138
|
const v = arg0;
|
|
105
139
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
106
140
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
107
141
|
},
|
|
108
|
-
|
|
142
|
+
__wbg___wbindgen_debug_string_07cb72cfcc952e2b: function(arg0, arg1) {
|
|
109
143
|
const ret = debugString(arg1);
|
|
110
144
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
111
145
|
const len1 = WASM_VECTOR_LEN;
|
|
112
146
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
113
147
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
114
148
|
},
|
|
115
|
-
|
|
149
|
+
__wbg___wbindgen_in_2617fa76397620d3: function(arg0, arg1) {
|
|
116
150
|
const ret = arg0 in arg1;
|
|
117
151
|
return ret;
|
|
118
152
|
},
|
|
119
|
-
|
|
153
|
+
__wbg___wbindgen_is_bigint_d6a8167cac401b95: function(arg0) {
|
|
120
154
|
const ret = typeof(arg0) === 'bigint';
|
|
121
155
|
return ret;
|
|
122
156
|
},
|
|
123
|
-
|
|
157
|
+
__wbg___wbindgen_is_function_2f0fd7ceb86e64c5: function(arg0) {
|
|
124
158
|
const ret = typeof(arg0) === 'function';
|
|
125
159
|
return ret;
|
|
126
160
|
},
|
|
127
|
-
|
|
161
|
+
__wbg___wbindgen_is_null_066086be3abe9bb3: function(arg0) {
|
|
128
162
|
const ret = arg0 === null;
|
|
129
163
|
return ret;
|
|
130
164
|
},
|
|
131
|
-
|
|
165
|
+
__wbg___wbindgen_is_object_5b22ff2418063a9c: function(arg0) {
|
|
132
166
|
const val = arg0;
|
|
133
167
|
const ret = typeof(val) === 'object' && val !== null;
|
|
134
168
|
return ret;
|
|
135
169
|
},
|
|
136
|
-
|
|
170
|
+
__wbg___wbindgen_is_string_eddc07a3efad52e6: function(arg0) {
|
|
137
171
|
const ret = typeof(arg0) === 'string';
|
|
138
172
|
return ret;
|
|
139
173
|
},
|
|
140
|
-
|
|
174
|
+
__wbg___wbindgen_is_undefined_244a92c34d3b6ec0: function(arg0) {
|
|
141
175
|
const ret = arg0 === undefined;
|
|
142
176
|
return ret;
|
|
143
177
|
},
|
|
144
|
-
|
|
178
|
+
__wbg___wbindgen_jsval_eq_403eaa3610500a25: function(arg0, arg1) {
|
|
145
179
|
const ret = arg0 === arg1;
|
|
146
180
|
return ret;
|
|
147
181
|
},
|
|
148
|
-
|
|
182
|
+
__wbg___wbindgen_jsval_loose_eq_1978f1e77b4bce62: function(arg0, arg1) {
|
|
149
183
|
const ret = arg0 == arg1;
|
|
150
184
|
return ret;
|
|
151
185
|
},
|
|
152
|
-
|
|
186
|
+
__wbg___wbindgen_number_get_dd6d69a6079f26f1: function(arg0, arg1) {
|
|
153
187
|
const obj = arg1;
|
|
154
188
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
155
189
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
156
190
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
157
191
|
},
|
|
158
|
-
|
|
192
|
+
__wbg___wbindgen_string_get_965592073e5d848c: function(arg0, arg1) {
|
|
159
193
|
const obj = arg1;
|
|
160
194
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
161
195
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -163,34 +197,34 @@ function __wbg_get_imports() {
|
|
|
163
197
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
164
198
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
165
199
|
},
|
|
166
|
-
|
|
200
|
+
__wbg___wbindgen_throw_9c75d47bf9e7731e: function(arg0, arg1) {
|
|
167
201
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
168
202
|
},
|
|
169
|
-
|
|
203
|
+
__wbg_call_add9e5a76382e668: function() { return handleError(function (arg0, arg1) {
|
|
170
204
|
const ret = arg0.call(arg1);
|
|
171
205
|
return ret;
|
|
172
206
|
}, arguments); },
|
|
173
|
-
|
|
207
|
+
__wbg_done_b1afd6201ac045e0: function(arg0) {
|
|
174
208
|
const ret = arg0.done;
|
|
175
209
|
return ret;
|
|
176
210
|
},
|
|
177
|
-
|
|
211
|
+
__wbg_entries_bb9843ba73dc70d6: function(arg0) {
|
|
178
212
|
const ret = Object.entries(arg0);
|
|
179
213
|
return ret;
|
|
180
214
|
},
|
|
181
|
-
|
|
215
|
+
__wbg_getTime_e599bee315e19eba: function(arg0) {
|
|
182
216
|
const ret = arg0.getTime();
|
|
183
217
|
return ret;
|
|
184
218
|
},
|
|
185
|
-
|
|
186
|
-
const ret = Reflect.get(arg0, arg1);
|
|
187
|
-
return ret;
|
|
188
|
-
}, arguments); },
|
|
189
|
-
__wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
|
|
219
|
+
__wbg_get_652f640b3b0b6e3e: function(arg0, arg1) {
|
|
190
220
|
const ret = arg0[arg1 >>> 0];
|
|
191
221
|
return ret;
|
|
192
222
|
},
|
|
193
|
-
|
|
223
|
+
__wbg_get_9cfea9b7bbf12a15: function() { return handleError(function (arg0, arg1) {
|
|
224
|
+
const ret = Reflect.get(arg0, arg1);
|
|
225
|
+
return ret;
|
|
226
|
+
}, arguments); },
|
|
227
|
+
__wbg_get_unchecked_be562b1421656321: function(arg0, arg1) {
|
|
194
228
|
const ret = arg0[arg1 >>> 0];
|
|
195
229
|
return ret;
|
|
196
230
|
},
|
|
@@ -198,7 +232,7 @@ function __wbg_get_imports() {
|
|
|
198
232
|
const ret = arg0[arg1];
|
|
199
233
|
return ret;
|
|
200
234
|
},
|
|
201
|
-
|
|
235
|
+
__wbg_instanceof_ArrayBuffer_eab9f28fbec23477: function(arg0) {
|
|
202
236
|
let result;
|
|
203
237
|
try {
|
|
204
238
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -208,7 +242,7 @@ function __wbg_get_imports() {
|
|
|
208
242
|
const ret = result;
|
|
209
243
|
return ret;
|
|
210
244
|
},
|
|
211
|
-
|
|
245
|
+
__wbg_instanceof_Map_10d4edf60fcf9327: function(arg0) {
|
|
212
246
|
let result;
|
|
213
247
|
try {
|
|
214
248
|
result = arg0 instanceof Map;
|
|
@@ -218,7 +252,7 @@ function __wbg_get_imports() {
|
|
|
218
252
|
const ret = result;
|
|
219
253
|
return ret;
|
|
220
254
|
},
|
|
221
|
-
|
|
255
|
+
__wbg_instanceof_Uint8Array_57d77acd50e4c44d: function(arg0) {
|
|
222
256
|
let result;
|
|
223
257
|
try {
|
|
224
258
|
result = arg0 instanceof Uint8Array;
|
|
@@ -228,71 +262,71 @@ function __wbg_get_imports() {
|
|
|
228
262
|
const ret = result;
|
|
229
263
|
return ret;
|
|
230
264
|
},
|
|
231
|
-
|
|
265
|
+
__wbg_isArray_c6c6ef8308995bcf: function(arg0) {
|
|
232
266
|
const ret = Array.isArray(arg0);
|
|
233
267
|
return ret;
|
|
234
268
|
},
|
|
235
|
-
|
|
269
|
+
__wbg_isSafeInteger_3c56c421a5b4cce4: function(arg0) {
|
|
236
270
|
const ret = Number.isSafeInteger(arg0);
|
|
237
271
|
return ret;
|
|
238
272
|
},
|
|
239
|
-
|
|
273
|
+
__wbg_iterator_9d68985a1d096fc2: function() {
|
|
240
274
|
const ret = Symbol.iterator;
|
|
241
275
|
return ret;
|
|
242
276
|
},
|
|
243
|
-
|
|
277
|
+
__wbg_length_0a6ce016dc1460b0: function(arg0) {
|
|
244
278
|
const ret = arg0.length;
|
|
245
279
|
return ret;
|
|
246
280
|
},
|
|
247
|
-
|
|
281
|
+
__wbg_length_ba3c032602efe310: function(arg0) {
|
|
248
282
|
const ret = arg0.length;
|
|
249
283
|
return ret;
|
|
250
284
|
},
|
|
251
285
|
__wbg_log_3a9854467c45b73c: function(arg0, arg1) {
|
|
252
286
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
253
287
|
},
|
|
254
|
-
|
|
288
|
+
__wbg_new_0_e486ec9936f7edbf: function() {
|
|
255
289
|
const ret = new Date();
|
|
256
290
|
return ret;
|
|
257
291
|
},
|
|
258
|
-
|
|
259
|
-
const ret = new
|
|
260
|
-
return ret;
|
|
261
|
-
},
|
|
262
|
-
__wbg_new_5f486cdf45a04d78: function(arg0) {
|
|
263
|
-
const ret = new Uint8Array(arg0);
|
|
292
|
+
__wbg_new_2fad8ca02fd00684: function() {
|
|
293
|
+
const ret = new Object();
|
|
264
294
|
return ret;
|
|
265
295
|
},
|
|
266
|
-
|
|
296
|
+
__wbg_new_3baa8d9866155c79: function() {
|
|
267
297
|
const ret = new Array();
|
|
268
298
|
return ret;
|
|
269
299
|
},
|
|
270
|
-
|
|
271
|
-
const ret = new
|
|
300
|
+
__wbg_new_46ae4e4ff2a07a64: function() {
|
|
301
|
+
const ret = new Map();
|
|
272
302
|
return ret;
|
|
273
303
|
},
|
|
274
|
-
|
|
275
|
-
const ret = arg0
|
|
304
|
+
__wbg_new_8454eee672b2ba6e: function(arg0) {
|
|
305
|
+
const ret = new Uint8Array(arg0);
|
|
276
306
|
return ret;
|
|
277
|
-
},
|
|
278
|
-
|
|
307
|
+
},
|
|
308
|
+
__wbg_next_261c3c48c6e309a5: function(arg0) {
|
|
279
309
|
const ret = arg0.next;
|
|
280
310
|
return ret;
|
|
281
311
|
},
|
|
282
|
-
|
|
312
|
+
__wbg_next_aacee310bcfe6461: function() { return handleError(function (arg0) {
|
|
313
|
+
const ret = arg0.next();
|
|
314
|
+
return ret;
|
|
315
|
+
}, arguments); },
|
|
316
|
+
__wbg_prototypesetcall_fd4050e806e1d519: function(arg0, arg1, arg2) {
|
|
283
317
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
284
318
|
},
|
|
285
|
-
__wbg_set_282384002438957f: function(arg0, arg1, arg2) {
|
|
286
|
-
arg0[arg1 >>> 0] = arg2;
|
|
287
|
-
},
|
|
288
319
|
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
289
320
|
arg0[arg1] = arg2;
|
|
290
321
|
},
|
|
291
|
-
|
|
322
|
+
__wbg_set_82f7a370f604db70: function(arg0, arg1, arg2) {
|
|
292
323
|
const ret = arg0.set(arg1, arg2);
|
|
293
324
|
return ret;
|
|
294
325
|
},
|
|
295
|
-
|
|
326
|
+
__wbg_set_f614f6a0608d1d1d: function(arg0, arg1, arg2) {
|
|
327
|
+
arg0[arg1 >>> 0] = arg2;
|
|
328
|
+
},
|
|
329
|
+
__wbg_value_f852716acdeb3e82: function(arg0) {
|
|
296
330
|
const ret = arg0.value;
|
|
297
331
|
return ret;
|
|
298
332
|
},
|
|
@@ -417,8 +451,7 @@ function getDataViewMemory0() {
|
|
|
417
451
|
}
|
|
418
452
|
|
|
419
453
|
function getStringFromWasm0(ptr, len) {
|
|
420
|
-
|
|
421
|
-
return decodeText(ptr, len);
|
|
454
|
+
return decodeText(ptr >>> 0, len);
|
|
422
455
|
}
|
|
423
456
|
|
|
424
457
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -514,8 +547,9 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
514
547
|
|
|
515
548
|
let WASM_VECTOR_LEN = 0;
|
|
516
549
|
|
|
517
|
-
let wasmModule, wasm;
|
|
550
|
+
let wasmModule, wasmInstance, wasm;
|
|
518
551
|
function __wbg_finalize_init(instance, module) {
|
|
552
|
+
wasmInstance = instance;
|
|
519
553
|
wasm = instance.exports;
|
|
520
554
|
wasmModule = module;
|
|
521
555
|
cachedDataViewMemory0 = null;
|
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();
|