@utoo/web 1.2.0-rc.5 → 1.2.0-rc.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/README.md +52 -0
- package/esm/{8df7dc7828270e8a8ece.wasm → b0afc1b3f31b4fb74f6b.wasm} +0 -0
- package/esm/forkedProject.d.ts +2 -1
- package/esm/forkedProject.js +5 -0
- package/esm/internalProject.d.ts +3 -3
- package/esm/internalProject.js +36 -20
- package/esm/loaderWorker.js +1 -1
- package/esm/project.d.ts +2 -1
- package/esm/project.js +12 -3
- package/esm/sabcom.d.ts +17 -0
- package/esm/sabcom.js +93 -26
- package/esm/serviceWorker.js +1 -0
- package/esm/type.d.ts +38 -0
- package/esm/type.js +44 -0
- package/esm/utoo/index.d.ts +27 -24
- package/esm/utoo/index.js +104 -102
- package/esm/utoo/index_bg.wasm +0 -0
- package/esm/webpackLoaders/{worker/cjs.js → cjs.js} +71 -64
- package/esm/webpackLoaders/loaderWorkerPool.d.ts +2 -0
- package/esm/{loaderWorkerPool.js → webpackLoaders/loaderWorkerPool.js} +30 -18
- package/esm/webpackLoaders/polyfills/fsPolyfill.d.ts +78 -0
- package/esm/webpackLoaders/polyfills/fsPolyfill.js +279 -0
- package/esm/webpackLoaders/polyfills/fsPromisesPolyfill.d.ts +26 -0
- package/esm/webpackLoaders/polyfills/fsPromisesPolyfill.js +112 -0
- package/esm/webpackLoaders/{worker/type.d.ts → type.d.ts} +1 -0
- package/esm/webpackLoaders/{worker/index.js → worker.js} +8 -3
- package/package.json +6 -6
- package/esm/loaderWorkerPool.d.ts +0 -3
- package/esm/webpackLoaders/worker/polyfills/fsPolyfill.d.ts +0 -244
- package/esm/webpackLoaders/worker/polyfills/fsPolyfill.js +0 -369
- package/esm/webpackLoaders/worker/polyfills/fsPromisesPolyfill.d.ts +0 -9
- package/esm/webpackLoaders/worker/polyfills/fsPromisesPolyfill.js +0 -9
- /package/esm/webpackLoaders/{worker/cjs.d.ts → cjs.d.ts} +0 -0
- /package/esm/webpackLoaders/{worker/polyfills → polyfills}/nodePolyFills.d.ts +0 -0
- /package/esm/webpackLoaders/{worker/polyfills → polyfills}/nodePolyFills.js +0 -0
- /package/esm/webpackLoaders/{worker/polyfills → polyfills}/workerThreadsPolyfill.d.ts +0 -0
- /package/esm/webpackLoaders/{worker/polyfills → polyfills}/workerThreadsPolyfill.js +0 -0
- /package/esm/webpackLoaders/{worker/type.js → type.js} +0 -0
- /package/esm/webpackLoaders/{worker/index.d.ts → worker.d.ts} +0 -0
package/esm/utoo/index.js
CHANGED
|
@@ -182,63 +182,63 @@ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
|
182
182
|
: new FinalizationRegistry(state => {
|
|
183
183
|
wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
|
|
184
184
|
});
|
|
185
|
-
function
|
|
185
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
186
186
|
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
187
187
|
const real = (...args) => {
|
|
188
188
|
// First up with a closure we increment the internal reference
|
|
189
189
|
// count. This ensures that the Rust closure environment won't
|
|
190
190
|
// be deallocated while we're invoking it.
|
|
191
191
|
state.cnt++;
|
|
192
|
+
const a = state.a;
|
|
193
|
+
state.a = 0;
|
|
192
194
|
try {
|
|
193
|
-
return f(
|
|
195
|
+
return f(a, state.b, ...args);
|
|
194
196
|
}
|
|
195
197
|
finally {
|
|
196
198
|
if (--state.cnt === 0) {
|
|
197
|
-
wasm.__wbindgen_export_5.get(state.dtor)(
|
|
198
|
-
state.a = 0;
|
|
199
|
+
wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
|
|
199
200
|
CLOSURE_DTORS.unregister(state);
|
|
200
201
|
}
|
|
202
|
+
else {
|
|
203
|
+
state.a = a;
|
|
204
|
+
}
|
|
201
205
|
}
|
|
202
206
|
};
|
|
203
207
|
real.original = state;
|
|
204
208
|
CLOSURE_DTORS.register(real, state, state);
|
|
205
209
|
return real;
|
|
206
210
|
}
|
|
207
|
-
function
|
|
211
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
212
|
+
ptr = ptr >>> 0;
|
|
213
|
+
const mem = getDataViewMemory0();
|
|
214
|
+
const result = [];
|
|
215
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
216
|
+
result.push(takeObject(mem.getUint32(i, true)));
|
|
217
|
+
}
|
|
218
|
+
return result;
|
|
219
|
+
}
|
|
220
|
+
function makeClosure(arg0, arg1, dtor, f) {
|
|
208
221
|
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
209
222
|
const real = (...args) => {
|
|
210
223
|
// First up with a closure we increment the internal reference
|
|
211
224
|
// count. This ensures that the Rust closure environment won't
|
|
212
225
|
// be deallocated while we're invoking it.
|
|
213
226
|
state.cnt++;
|
|
214
|
-
const a = state.a;
|
|
215
|
-
state.a = 0;
|
|
216
227
|
try {
|
|
217
|
-
return f(a, state.b, ...args);
|
|
228
|
+
return f(state.a, state.b, ...args);
|
|
218
229
|
}
|
|
219
230
|
finally {
|
|
220
231
|
if (--state.cnt === 0) {
|
|
221
|
-
wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
|
|
232
|
+
wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
|
|
233
|
+
state.a = 0;
|
|
222
234
|
CLOSURE_DTORS.unregister(state);
|
|
223
235
|
}
|
|
224
|
-
else {
|
|
225
|
-
state.a = a;
|
|
226
|
-
}
|
|
227
236
|
}
|
|
228
237
|
};
|
|
229
238
|
real.original = state;
|
|
230
239
|
CLOSURE_DTORS.register(real, state, state);
|
|
231
240
|
return real;
|
|
232
241
|
}
|
|
233
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
234
|
-
ptr = ptr >>> 0;
|
|
235
|
-
const mem = getDataViewMemory0();
|
|
236
|
-
const result = [];
|
|
237
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
238
|
-
result.push(takeObject(mem.getUint32(i, true)));
|
|
239
|
-
}
|
|
240
|
-
return result;
|
|
241
|
-
}
|
|
242
242
|
function _assertClass(instance, klass) {
|
|
243
243
|
if (!(instance instanceof klass)) {
|
|
244
244
|
throw new Error(`expected instance of ${klass.name}`);
|
|
@@ -271,6 +271,12 @@ export function init_log_filter(filter) {
|
|
|
271
271
|
const len0 = WASM_VECTOR_LEN;
|
|
272
272
|
wasm.init_log_filter(ptr0, len0);
|
|
273
273
|
}
|
|
274
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
275
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
276
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
277
|
+
WASM_VECTOR_LEN = arg.length;
|
|
278
|
+
return ptr;
|
|
279
|
+
}
|
|
274
280
|
/**
|
|
275
281
|
* @param {number} worker_id
|
|
276
282
|
*/
|
|
@@ -284,12 +290,6 @@ export function workerCreated(worker_id) {
|
|
|
284
290
|
export function registerWorkerScheduler(creator, terminator) {
|
|
285
291
|
wasm.registerWorkerScheduler(addHeapObject(creator), addHeapObject(terminator));
|
|
286
292
|
}
|
|
287
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
288
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
289
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
290
|
-
WASM_VECTOR_LEN = arg.length;
|
|
291
|
-
return ptr;
|
|
292
|
-
}
|
|
293
293
|
/**
|
|
294
294
|
* Entry point for web workers
|
|
295
295
|
* @param {number} ptr
|
|
@@ -297,6 +297,15 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
297
297
|
export function wasm_thread_entry_point(ptr) {
|
|
298
298
|
wasm.wasm_thread_entry_point(ptr);
|
|
299
299
|
}
|
|
300
|
+
function __wbg_adapter_4(arg0, arg1, arg2) {
|
|
301
|
+
wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2));
|
|
302
|
+
}
|
|
303
|
+
function __wbg_adapter_11(arg0, arg1) {
|
|
304
|
+
wasm.__wbindgen_export_7(arg0, arg1);
|
|
305
|
+
}
|
|
306
|
+
function __wbg_adapter_18(arg0, arg1, arg2) {
|
|
307
|
+
wasm.__wbindgen_export_8(arg0, arg1, addHeapObject(arg2));
|
|
308
|
+
}
|
|
300
309
|
let stack_pointer = 128;
|
|
301
310
|
function addBorrowedObject(obj) {
|
|
302
311
|
if (stack_pointer == 1)
|
|
@@ -304,23 +313,14 @@ function addBorrowedObject(obj) {
|
|
|
304
313
|
heap[--stack_pointer] = obj;
|
|
305
314
|
return stack_pointer;
|
|
306
315
|
}
|
|
307
|
-
function
|
|
316
|
+
function __wbg_adapter_23(arg0, arg1, arg2) {
|
|
308
317
|
try {
|
|
309
|
-
wasm.
|
|
318
|
+
wasm.__wbindgen_export_9(arg0, arg1, addBorrowedObject(arg2));
|
|
310
319
|
}
|
|
311
320
|
finally {
|
|
312
321
|
heap[stack_pointer++] = undefined;
|
|
313
322
|
}
|
|
314
323
|
}
|
|
315
|
-
function __wbg_adapter_19(arg0, arg1, arg2) {
|
|
316
|
-
wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2));
|
|
317
|
-
}
|
|
318
|
-
function __wbg_adapter_22(arg0, arg1, arg2) {
|
|
319
|
-
wasm.__wbindgen_export_8(arg0, arg1, addHeapObject(arg2));
|
|
320
|
-
}
|
|
321
|
-
function __wbg_adapter_27(arg0, arg1) {
|
|
322
|
-
wasm.__wbindgen_export_9(arg0, arg1);
|
|
323
|
-
}
|
|
324
324
|
function __wbg_adapter_94(arg0, arg1, arg2, arg3) {
|
|
325
325
|
wasm.__wbindgen_export_10(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
326
326
|
}
|
|
@@ -506,10 +506,10 @@ export class Project {
|
|
|
506
506
|
* @param {string} path
|
|
507
507
|
* @returns {Promise<void>}
|
|
508
508
|
*/
|
|
509
|
-
createDir(path) {
|
|
509
|
+
static createDir(path) {
|
|
510
510
|
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
511
511
|
const len0 = WASM_VECTOR_LEN;
|
|
512
|
-
const ret = wasm.project_createDir(
|
|
512
|
+
const ret = wasm.project_createDir(ptr0, len0);
|
|
513
513
|
return takeObject(ret);
|
|
514
514
|
}
|
|
515
515
|
/**
|
|
@@ -517,20 +517,20 @@ export class Project {
|
|
|
517
517
|
* @param {boolean} recursive
|
|
518
518
|
* @returns {Promise<void>}
|
|
519
519
|
*/
|
|
520
|
-
removeDir(path, recursive) {
|
|
520
|
+
static removeDir(path, recursive) {
|
|
521
521
|
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
522
522
|
const len0 = WASM_VECTOR_LEN;
|
|
523
|
-
const ret = wasm.project_removeDir(
|
|
523
|
+
const ret = wasm.project_removeDir(ptr0, len0, recursive);
|
|
524
524
|
return takeObject(ret);
|
|
525
525
|
}
|
|
526
526
|
/**
|
|
527
527
|
* @param {string} path
|
|
528
528
|
* @returns {Promise<void>}
|
|
529
529
|
*/
|
|
530
|
-
removeFile(path) {
|
|
530
|
+
static removeFile(path) {
|
|
531
531
|
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
532
532
|
const len0 = WASM_VECTOR_LEN;
|
|
533
|
-
const ret = wasm.project_removeFile(
|
|
533
|
+
const ret = wasm.project_removeFile(ptr0, len0);
|
|
534
534
|
return takeObject(ret);
|
|
535
535
|
}
|
|
536
536
|
/**
|
|
@@ -538,43 +538,43 @@ export class Project {
|
|
|
538
538
|
* @param {string} content
|
|
539
539
|
* @returns {Promise<void>}
|
|
540
540
|
*/
|
|
541
|
-
writeString(path, content) {
|
|
541
|
+
static writeString(path, content) {
|
|
542
542
|
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
543
543
|
const len0 = WASM_VECTOR_LEN;
|
|
544
544
|
const ptr1 = passStringToWasm0(content, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
545
545
|
const len1 = WASM_VECTOR_LEN;
|
|
546
|
-
const ret = wasm.project_writeString(
|
|
546
|
+
const ret = wasm.project_writeString(ptr0, len0, ptr1, len1);
|
|
547
547
|
return takeObject(ret);
|
|
548
548
|
}
|
|
549
549
|
/**
|
|
550
550
|
* @param {string} path
|
|
551
551
|
* @returns {Promise<void>}
|
|
552
552
|
*/
|
|
553
|
-
createDirAll(path) {
|
|
553
|
+
static createDirAll(path) {
|
|
554
554
|
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
555
555
|
const len0 = WASM_VECTOR_LEN;
|
|
556
|
-
const ret = wasm.project_createDirAll(
|
|
556
|
+
const ret = wasm.project_createDirAll(ptr0, len0);
|
|
557
557
|
return takeObject(ret);
|
|
558
558
|
}
|
|
559
559
|
/**
|
|
560
560
|
* @param {string} path
|
|
561
561
|
* @returns {Promise<string>}
|
|
562
562
|
*/
|
|
563
|
-
readToString(path) {
|
|
563
|
+
static readToString(path) {
|
|
564
564
|
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
565
565
|
const len0 = WASM_VECTOR_LEN;
|
|
566
|
-
const ret = wasm.project_readToString(
|
|
566
|
+
const ret = wasm.project_readToString(ptr0, len0);
|
|
567
567
|
return takeObject(ret);
|
|
568
568
|
}
|
|
569
569
|
/**
|
|
570
570
|
* @returns {string}
|
|
571
571
|
*/
|
|
572
|
-
get cwd() {
|
|
572
|
+
static get cwd() {
|
|
573
573
|
let deferred1_0;
|
|
574
574
|
let deferred1_1;
|
|
575
575
|
try {
|
|
576
576
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
577
|
-
wasm.project_cwd(retptr
|
|
577
|
+
wasm.project_cwd(retptr);
|
|
578
578
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
579
579
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
580
580
|
deferred1_0 = r0;
|
|
@@ -586,30 +586,16 @@ export class Project {
|
|
|
586
586
|
wasm.__wbindgen_export_4(deferred1_0, deferred1_1, 1);
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
/**
|
|
590
|
-
* @param {string} cwd
|
|
591
|
-
* @param {string} thread_url
|
|
592
|
-
*/
|
|
593
|
-
constructor(cwd, thread_url) {
|
|
594
|
-
const ptr0 = passStringToWasm0(cwd, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
595
|
-
const len0 = WASM_VECTOR_LEN;
|
|
596
|
-
const ptr1 = passStringToWasm0(thread_url, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
597
|
-
const len1 = WASM_VECTOR_LEN;
|
|
598
|
-
const ret = wasm.project_new(ptr0, len0, ptr1, len1);
|
|
599
|
-
this.__wbg_ptr = ret >>> 0;
|
|
600
|
-
ProjectFinalization.register(this, this.__wbg_ptr, this);
|
|
601
|
-
return this;
|
|
602
|
-
}
|
|
603
589
|
/**
|
|
604
590
|
* Create a tar.gz archive and return bytes (no file I/O)
|
|
605
591
|
* This is useful for main thread execution without OPFS access
|
|
606
592
|
* @param {any} files
|
|
607
593
|
* @returns {Uint8Array}
|
|
608
594
|
*/
|
|
609
|
-
gzip(files) {
|
|
595
|
+
static gzip(files) {
|
|
610
596
|
try {
|
|
611
597
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
612
|
-
wasm.project_gzip(retptr,
|
|
598
|
+
wasm.project_gzip(retptr, addHeapObject(files));
|
|
613
599
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
614
600
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
615
601
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -622,21 +608,29 @@ export class Project {
|
|
|
622
608
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
623
609
|
}
|
|
624
610
|
}
|
|
611
|
+
/**
|
|
612
|
+
* @param {string} thread_url
|
|
613
|
+
*/
|
|
614
|
+
static init(thread_url) {
|
|
615
|
+
const ptr0 = passStringToWasm0(thread_url, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
616
|
+
const len0 = WASM_VECTOR_LEN;
|
|
617
|
+
wasm.project_init(ptr0, len0);
|
|
618
|
+
}
|
|
625
619
|
/**
|
|
626
620
|
* @param {string} path
|
|
627
621
|
* @returns {Promise<Uint8Array>}
|
|
628
622
|
*/
|
|
629
|
-
read(path) {
|
|
623
|
+
static read(path) {
|
|
630
624
|
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
631
625
|
const len0 = WASM_VECTOR_LEN;
|
|
632
|
-
const ret = wasm.project_read(
|
|
626
|
+
const ret = wasm.project_read(ptr0, len0);
|
|
633
627
|
return takeObject(ret);
|
|
634
628
|
}
|
|
635
629
|
/**
|
|
636
630
|
* @returns {Promise<any>}
|
|
637
631
|
*/
|
|
638
|
-
build() {
|
|
639
|
-
const ret = wasm.project_build(
|
|
632
|
+
static build() {
|
|
633
|
+
const ret = wasm.project_build();
|
|
640
634
|
return takeObject(ret);
|
|
641
635
|
}
|
|
642
636
|
/**
|
|
@@ -644,12 +638,12 @@ export class Project {
|
|
|
644
638
|
* @param {Uint8Array} content
|
|
645
639
|
* @returns {Promise<void>}
|
|
646
640
|
*/
|
|
647
|
-
write(path, content) {
|
|
641
|
+
static write(path, content) {
|
|
648
642
|
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
649
643
|
const len0 = WASM_VECTOR_LEN;
|
|
650
644
|
const ptr1 = passArray8ToWasm0(content, wasm.__wbindgen_export_1);
|
|
651
645
|
const len1 = WASM_VECTOR_LEN;
|
|
652
|
-
const ret = wasm.project_write(
|
|
646
|
+
const ret = wasm.project_write(ptr0, len0, ptr1, len1);
|
|
653
647
|
return takeObject(ret);
|
|
654
648
|
}
|
|
655
649
|
/**
|
|
@@ -657,25 +651,33 @@ export class Project {
|
|
|
657
651
|
* @param {number | null} [max_concurrent_downloads]
|
|
658
652
|
* @returns {Promise<void>}
|
|
659
653
|
*/
|
|
660
|
-
install(package_lock, max_concurrent_downloads) {
|
|
654
|
+
static install(package_lock, max_concurrent_downloads) {
|
|
661
655
|
const ptr0 = passStringToWasm0(package_lock, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
662
656
|
const len0 = WASM_VECTOR_LEN;
|
|
663
|
-
const ret = wasm.project_install(
|
|
657
|
+
const ret = wasm.project_install(ptr0, len0, isLikeNone(max_concurrent_downloads) ? 0x100000001 : (max_concurrent_downloads) >>> 0);
|
|
664
658
|
return takeObject(ret);
|
|
665
659
|
}
|
|
660
|
+
/**
|
|
661
|
+
* @param {string} path
|
|
662
|
+
*/
|
|
663
|
+
static setCwd(path) {
|
|
664
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
665
|
+
const len0 = WASM_VECTOR_LEN;
|
|
666
|
+
wasm.project_setCwd(ptr0, len0);
|
|
667
|
+
}
|
|
666
668
|
/**
|
|
667
669
|
* Calculate MD5 hash of byte content
|
|
668
670
|
* @param {Uint8Array} content
|
|
669
671
|
* @returns {string}
|
|
670
672
|
*/
|
|
671
|
-
sigMd5(content) {
|
|
673
|
+
static sigMd5(content) {
|
|
672
674
|
let deferred2_0;
|
|
673
675
|
let deferred2_1;
|
|
674
676
|
try {
|
|
675
677
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
676
678
|
const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_export_1);
|
|
677
679
|
const len0 = WASM_VECTOR_LEN;
|
|
678
|
-
wasm.project_sigMd5(retptr,
|
|
680
|
+
wasm.project_sigMd5(retptr, ptr0, len0);
|
|
679
681
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
680
682
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
681
683
|
deferred2_0 = r0;
|
|
@@ -691,20 +693,20 @@ export class Project {
|
|
|
691
693
|
* @param {string} path
|
|
692
694
|
* @returns {Promise<Metadata>}
|
|
693
695
|
*/
|
|
694
|
-
metadata(path) {
|
|
696
|
+
static metadata(path) {
|
|
695
697
|
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
696
698
|
const len0 = WASM_VECTOR_LEN;
|
|
697
|
-
const ret = wasm.project_metadata(
|
|
699
|
+
const ret = wasm.project_metadata(ptr0, len0);
|
|
698
700
|
return takeObject(ret);
|
|
699
701
|
}
|
|
700
702
|
/**
|
|
701
703
|
* @param {string} path
|
|
702
704
|
* @returns {Promise<DirEntry[]>}
|
|
703
705
|
*/
|
|
704
|
-
readDir(path) {
|
|
706
|
+
static readDir(path) {
|
|
705
707
|
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
706
708
|
const len0 = WASM_VECTOR_LEN;
|
|
707
|
-
const ret = wasm.project_readDir(
|
|
709
|
+
const ret = wasm.project_readDir(ptr0, len0);
|
|
708
710
|
return takeObject(ret);
|
|
709
711
|
}
|
|
710
712
|
/**
|
|
@@ -712,12 +714,12 @@ export class Project {
|
|
|
712
714
|
* @param {string} dst
|
|
713
715
|
* @returns {Promise<void>}
|
|
714
716
|
*/
|
|
715
|
-
copyFile(src, dst) {
|
|
717
|
+
static copyFile(src, dst) {
|
|
716
718
|
const ptr0 = passStringToWasm0(src, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
717
719
|
const len0 = WASM_VECTOR_LEN;
|
|
718
720
|
const ptr1 = passStringToWasm0(dst, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
719
721
|
const len1 = WASM_VECTOR_LEN;
|
|
720
|
-
const ret = wasm.project_copyFile(
|
|
722
|
+
const ret = wasm.project_copyFile(ptr0, len0, ptr1, len1);
|
|
721
723
|
return takeObject(ret);
|
|
722
724
|
}
|
|
723
725
|
}
|
|
@@ -1741,9 +1743,9 @@ function __wbg_get_imports() {
|
|
|
1741
1743
|
return ret;
|
|
1742
1744
|
}, arguments);
|
|
1743
1745
|
};
|
|
1744
|
-
imports.wbg.
|
|
1745
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1746
|
-
const ret =
|
|
1746
|
+
imports.wbg.__wbindgen_cast_0ca71f183bd17ba7 = function (arg0, arg1) {
|
|
1747
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 8631, function: Function { arguments: [Ref(NamedExternref("MessageEvent"))], shim_idx: 8632, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1748
|
+
const ret = makeMutClosure(arg0, arg1, 8631, __wbg_adapter_23);
|
|
1747
1749
|
return addHeapObject(ret);
|
|
1748
1750
|
};
|
|
1749
1751
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function (arg0, arg1) {
|
|
@@ -1751,21 +1753,11 @@ function __wbg_get_imports() {
|
|
|
1751
1753
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1752
1754
|
return addHeapObject(ret);
|
|
1753
1755
|
};
|
|
1754
|
-
imports.wbg.__wbindgen_cast_320e55bca3a693f6 = function (arg0, arg1) {
|
|
1755
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 8608, function: Function { arguments: [Ref(NamedExternref("MessageEvent"))], shim_idx: 8631, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1756
|
-
const ret = makeMutClosure(arg0, arg1, 8608, __wbg_adapter_4);
|
|
1757
|
-
return addHeapObject(ret);
|
|
1758
|
-
};
|
|
1759
1756
|
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function (arg0) {
|
|
1760
1757
|
// Cast intrinsic for `U64 -> Externref`.
|
|
1761
1758
|
const ret = BigInt.asUintN(64, arg0);
|
|
1762
1759
|
return addHeapObject(ret);
|
|
1763
1760
|
};
|
|
1764
|
-
imports.wbg.__wbindgen_cast_6c005a14a1fbf1c5 = function (arg0, arg1) {
|
|
1765
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 595, function: Function { arguments: [], shim_idx: 596, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1766
|
-
const ret = makeMutClosure(arg0, arg1, 595, __wbg_adapter_27);
|
|
1767
|
-
return addHeapObject(ret);
|
|
1768
|
-
};
|
|
1769
1761
|
imports.wbg.__wbindgen_cast_76322aab70622876 = function (arg0, arg1) {
|
|
1770
1762
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
1771
1763
|
wasm.__wbindgen_export_4(arg0, arg1 * 4, 4);
|
|
@@ -1782,12 +1774,17 @@ function __wbg_get_imports() {
|
|
|
1782
1774
|
};
|
|
1783
1775
|
imports.wbg.__wbindgen_cast_7b3678bd8e0fb80b = function (arg0, arg1) {
|
|
1784
1776
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 8626, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 8627, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1785
|
-
const ret = makeMutClosure(arg0, arg1, 8626,
|
|
1777
|
+
const ret = makeMutClosure(arg0, arg1, 8626, __wbg_adapter_4);
|
|
1786
1778
|
return addHeapObject(ret);
|
|
1787
1779
|
};
|
|
1788
1780
|
imports.wbg.__wbindgen_cast_884165a22f3e9702 = function (arg0, arg1) {
|
|
1789
1781
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 8626, function: Function { arguments: [Externref], shim_idx: 8627, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1790
|
-
const ret = makeMutClosure(arg0, arg1, 8626,
|
|
1782
|
+
const ret = makeMutClosure(arg0, arg1, 8626, __wbg_adapter_4);
|
|
1783
|
+
return addHeapObject(ret);
|
|
1784
|
+
};
|
|
1785
|
+
imports.wbg.__wbindgen_cast_8b2c5f11dff5b9ba = function (arg0, arg1) {
|
|
1786
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 8626, function: Function { arguments: [], shim_idx: 599, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1787
|
+
const ret = makeMutClosure(arg0, arg1, 8626, __wbg_adapter_11);
|
|
1791
1788
|
return addHeapObject(ret);
|
|
1792
1789
|
};
|
|
1793
1790
|
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function (arg0) {
|
|
@@ -1795,9 +1792,14 @@ function __wbg_get_imports() {
|
|
|
1795
1792
|
const ret = arg0;
|
|
1796
1793
|
return addHeapObject(ret);
|
|
1797
1794
|
};
|
|
1798
|
-
imports.wbg.
|
|
1799
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1800
|
-
const ret =
|
|
1795
|
+
imports.wbg.__wbindgen_cast_9f714a98b1af7c37 = function (arg0, arg1) {
|
|
1796
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 8610, function: Function { arguments: [NamedExternref("Array<any>")], shim_idx: 8611, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
1797
|
+
const ret = makeClosure(arg0, arg1, 8610, __wbg_adapter_18);
|
|
1798
|
+
return addHeapObject(ret);
|
|
1799
|
+
};
|
|
1800
|
+
imports.wbg.__wbindgen_cast_a5ee8c63b746891b = function (arg0, arg1) {
|
|
1801
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 598, function: Function { arguments: [], shim_idx: 599, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1802
|
+
const ret = makeMutClosure(arg0, arg1, 598, __wbg_adapter_11);
|
|
1801
1803
|
return addHeapObject(ret);
|
|
1802
1804
|
};
|
|
1803
1805
|
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function (arg0) {
|
package/esm/utoo/index_bg.wasm
CHANGED
|
Binary file
|