@powersync/web 0.0.0-dev-20251203144301 → 0.0.0-dev-20260112083235
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 +1 -1
- package/dist/0b19af1befc07ce338dd.wasm +0 -0
- package/dist/2632c3bda9473da74fd5.wasm +0 -0
- package/dist/64f5351ba3784bfe2f3e.wasm +0 -0
- package/dist/9318ca94aac4d0fe0135.wasm +0 -0
- package/dist/_journeyapps_wa-sqlite-_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapp-89f0ba.index.umd.js +1875 -0
- package/dist/_journeyapps_wa-sqlite-_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapp-89f0ba.index.umd.js.map +1 -0
- package/dist/_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapps_wa-sqlite_src_example-685f6c0.index.umd.js +567 -0
- package/dist/_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapps_wa-sqlite_src_example-685f6c0.index.umd.js.map +1 -0
- package/dist/_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapps_wa-sqlite_src_example-685f6c1.index.umd.js +567 -0
- package/dist/_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapps_wa-sqlite_src_example-685f6c1.index.umd.js.map +1 -0
- package/dist/index.umd.js +7107 -4249
- package/dist/index.umd.js.map +1 -1
- package/dist/worker/SharedSyncImplementation.umd.js +337 -2101
- package/dist/worker/SharedSyncImplementation.umd.js.map +1 -1
- package/dist/worker/WASQLiteDB.umd.js +182 -1931
- package/dist/worker/WASQLiteDB.umd.js.map +1 -1
- package/dist/worker/node_modules_bson_lib_bson_mjs.umd.js +3 -3
- package/dist/worker/node_modules_bson_lib_bson_mjs.umd.js.map +1 -1
- package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_mc-wa-sqlite-async_mjs.umd.js +22 -9
- package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_mc-wa-sqlite-async_mjs.umd.js.map +1 -1
- package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_mc-wa-sqlite_mjs.umd.js +22 -9
- package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_mc-wa-sqlite_mjs.umd.js.map +1 -1
- package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_wa-sqlite-async_mjs.umd.js +22 -9
- package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_wa-sqlite-async_mjs.umd.js.map +1 -1
- package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_wa-sqlite_mjs.umd.js +22 -9
- package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_wa-sqlite_mjs.umd.js.map +1 -1
- package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js.umd.js +1206 -3
- package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js.umd.js.map +1 -1
- package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_IDBBatchAtomicVFS_js.umd.js +1209 -6
- package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_IDBBatchAtomicVFS_js.umd.js.map +1 -1
- package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_OPFSCoopSyncVFS_js.umd.js +1820 -0
- package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_OPFSCoopSyncVFS_js.umd.js.map +1 -0
- package/lib/package.json +20 -15
- package/lib/src/db/PowerSyncDatabase.d.ts +3 -1
- package/lib/src/db/PowerSyncDatabase.js +19 -7
- package/lib/src/db/adapters/AbstractWebPowerSyncDatabaseOpenFactory.d.ts +1 -1
- package/lib/src/db/adapters/AbstractWebPowerSyncDatabaseOpenFactory.js +1 -1
- package/lib/src/db/adapters/AbstractWebSQLOpenFactory.d.ts +2 -2
- package/lib/src/db/adapters/AbstractWebSQLOpenFactory.js +2 -2
- package/lib/src/db/adapters/AsyncDatabaseConnection.d.ts +1 -9
- package/lib/src/db/adapters/AsyncDatabaseConnection.js +1 -11
- package/lib/src/db/adapters/LockedAsyncDatabaseAdapter.d.ts +3 -3
- package/lib/src/db/adapters/LockedAsyncDatabaseAdapter.js +25 -12
- package/lib/src/db/adapters/WebDBAdapter.d.ts +1 -1
- package/lib/src/db/adapters/WorkerWrappedAsyncDatabaseConnection.d.ts +2 -2
- package/lib/src/db/adapters/WorkerWrappedAsyncDatabaseConnection.js +1 -2
- package/lib/src/db/adapters/wa-sqlite/WASQLiteConnection.d.ts +2 -2
- package/lib/src/db/adapters/wa-sqlite/WASQLiteConnection.js +12 -3
- package/lib/src/db/adapters/wa-sqlite/WASQLiteDBAdapter.d.ts +3 -3
- package/lib/src/db/adapters/wa-sqlite/WASQLiteDBAdapter.js +5 -5
- package/lib/src/db/adapters/wa-sqlite/WASQLiteOpenFactory.d.ts +4 -4
- package/lib/src/db/adapters/wa-sqlite/WASQLiteOpenFactory.js +6 -6
- package/lib/src/db/adapters/wa-sqlite/WASQLitePowerSyncDatabaseOpenFactory.d.ts +1 -1
- package/lib/src/db/adapters/wa-sqlite/WASQLitePowerSyncDatabaseOpenFactory.js +3 -3
- package/lib/src/db/sync/SharedWebStreamingSyncImplementation.d.ts +4 -4
- package/lib/src/db/sync/SharedWebStreamingSyncImplementation.js +5 -5
- package/lib/src/db/sync/WebRemote.js +1 -1
- package/lib/src/db/sync/WebStreamingSyncImplementation.d.ts +1 -1
- package/lib/src/db/sync/WebStreamingSyncImplementation.js +1 -1
- package/lib/src/index.d.ts +12 -12
- package/lib/src/index.js +12 -12
- package/lib/src/worker/db/SharedWASQLiteConnection.d.ts +2 -2
- package/lib/src/worker/db/WASQLiteDB.worker.js +4 -3
- package/lib/src/worker/db/WorkerWASQLiteConnection.d.ts +2 -2
- package/lib/src/worker/db/WorkerWASQLiteConnection.js +1 -1
- package/lib/src/worker/db/open-worker-database.d.ts +2 -2
- package/lib/src/worker/db/open-worker-database.js +1 -1
- package/lib/src/worker/sync/BroadcastLogger.d.ts +1 -1
- package/lib/src/worker/sync/SharedSyncImplementation.d.ts +4 -4
- package/lib/src/worker/sync/SharedSyncImplementation.js +84 -83
- package/lib/src/worker/sync/SharedSyncImplementation.worker.js +2 -2
- package/lib/src/worker/sync/WorkerClient.d.ts +1 -1
- package/lib/src/worker/sync/WorkerClient.js +2 -2
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +21 -16
- package/src/db/PowerSyncDatabase.ts +23 -8
- package/src/db/adapters/AbstractWebPowerSyncDatabaseOpenFactory.ts +1 -1
- package/src/db/adapters/AbstractWebSQLOpenFactory.ts +3 -3
- package/src/db/adapters/AsyncDatabaseConnection.ts +1 -13
- package/src/db/adapters/LockedAsyncDatabaseAdapter.ts +30 -14
- package/src/db/adapters/WebDBAdapter.ts +1 -1
- package/src/db/adapters/WorkerWrappedAsyncDatabaseConnection.ts +3 -4
- package/src/db/adapters/wa-sqlite/WASQLiteConnection.ts +14 -5
- package/src/db/adapters/wa-sqlite/WASQLiteDBAdapter.ts +7 -7
- package/src/db/adapters/wa-sqlite/WASQLiteOpenFactory.ts +7 -7
- package/src/db/adapters/wa-sqlite/WASQLitePowerSyncDatabaseOpenFactory.ts +3 -3
- package/src/db/sync/SharedWebStreamingSyncImplementation.ts +7 -7
- package/src/db/sync/WebRemote.ts +1 -1
- package/src/db/sync/WebStreamingSyncImplementation.ts +2 -2
- package/src/index.ts +12 -12
- package/src/worker/db/SharedWASQLiteConnection.ts +2 -2
- package/src/worker/db/WASQLiteDB.worker.ts +6 -5
- package/src/worker/db/WorkerWASQLiteConnection.ts +2 -2
- package/src/worker/db/open-worker-database.ts +2 -2
- package/src/worker/sync/BroadcastLogger.ts +1 -1
- package/src/worker/sync/SharedSyncImplementation.ts +92 -89
- package/src/worker/sync/SharedSyncImplementation.worker.ts +2 -2
- package/src/worker/sync/WorkerClient.ts +2 -2
- package/dist/1807036ae51c10ee4d23.wasm +0 -0
- package/dist/307d8ce2280e3bae09d5.wasm +0 -0
- package/dist/cd8b9e8f4c87bf81c169.wasm +0 -0
- package/dist/e797080f5ed0b5324166.wasm +0 -0
- package/lib/src/worker/db/opfs.d.ts +0 -96
- package/lib/src/worker/db/opfs.js +0 -582
- package/src/worker/db/opfs.ts +0 -623
- /package/bin/{powersync.js → powersync.cjs} +0 -0
|
@@ -17,18 +17,18 @@ import {
|
|
|
17
17
|
} from '@powersync/common';
|
|
18
18
|
import { Mutex } from 'async-mutex';
|
|
19
19
|
import * as Comlink from 'comlink';
|
|
20
|
-
import { WebRemote } from '../../db/sync/WebRemote';
|
|
20
|
+
import { WebRemote } from '../../db/sync/WebRemote.js';
|
|
21
21
|
import {
|
|
22
22
|
WebStreamingSyncImplementation,
|
|
23
23
|
WebStreamingSyncImplementationOptions
|
|
24
|
-
} from '../../db/sync/WebStreamingSyncImplementation';
|
|
24
|
+
} from '../../db/sync/WebStreamingSyncImplementation.js';
|
|
25
25
|
|
|
26
|
-
import { OpenAsyncDatabaseConnection } from '../../db/adapters/AsyncDatabaseConnection';
|
|
27
|
-
import { LockedAsyncDatabaseAdapter } from '../../db/adapters/LockedAsyncDatabaseAdapter';
|
|
28
|
-
import { WorkerWrappedAsyncDatabaseConnection } from '../../db/adapters/WorkerWrappedAsyncDatabaseConnection';
|
|
29
|
-
import { ResolvedWebSQLOpenOptions } from '../../db/adapters/web-sql-flags';
|
|
30
|
-
import { AbstractSharedSyncClientProvider } from './AbstractSharedSyncClientProvider';
|
|
31
|
-
import { BroadcastLogger } from './BroadcastLogger';
|
|
26
|
+
import { OpenAsyncDatabaseConnection } from '../../db/adapters/AsyncDatabaseConnection.js';
|
|
27
|
+
import { LockedAsyncDatabaseAdapter } from '../../db/adapters/LockedAsyncDatabaseAdapter.js';
|
|
28
|
+
import { WorkerWrappedAsyncDatabaseConnection } from '../../db/adapters/WorkerWrappedAsyncDatabaseConnection.js';
|
|
29
|
+
import { ResolvedWebSQLOpenOptions } from '../../db/adapters/web-sql-flags.js';
|
|
30
|
+
import { AbstractSharedSyncClientProvider } from './AbstractSharedSyncClientProvider.js';
|
|
31
|
+
import { BroadcastLogger } from './BroadcastLogger.js';
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* @internal
|
|
@@ -190,7 +190,8 @@ export class SharedSyncImplementation extends BaseObserver<SharedSyncImplementat
|
|
|
190
190
|
*/
|
|
191
191
|
protected async getRandomWrappedPort(): Promise<WrappedSyncPort | undefined> {
|
|
192
192
|
return await this.portMutex.runExclusive(() => {
|
|
193
|
-
|
|
193
|
+
const nonClosingPorts = this.ports.filter((p) => !p.isClosing);
|
|
194
|
+
return nonClosingPorts[Math.floor(Math.random() * nonClosingPorts.length)];
|
|
194
195
|
});
|
|
195
196
|
}
|
|
196
197
|
|
|
@@ -276,6 +277,15 @@ export class SharedSyncImplementation extends BaseObserver<SharedSyncImplementat
|
|
|
276
277
|
// We may have missed some table updates while the database was closed.
|
|
277
278
|
// We can poke the crud in case we missed any updates.
|
|
278
279
|
this.connectionManager.syncStreamImplementation?.triggerCrudUpload();
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* FIXME or IMPROVE ME
|
|
283
|
+
* The Rust client implementation stores sync state on the connection level.
|
|
284
|
+
* Reopening the database causes a state machine error which should cause the
|
|
285
|
+
* StreamingSyncImplementation to reconnect. It would be nicer if we could trigger
|
|
286
|
+
* this reconnect earlier.
|
|
287
|
+
* This reconnect is not required for IndexedDB.
|
|
288
|
+
*/
|
|
279
289
|
}
|
|
280
290
|
});
|
|
281
291
|
|
|
@@ -495,94 +505,87 @@ export class SharedSyncImplementation extends BaseObserver<SharedSyncImplementat
|
|
|
495
505
|
* Opens a worker wrapped database connection. Using the last connected client port.
|
|
496
506
|
*/
|
|
497
507
|
protected async openInternalDB() {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
throw new Error(`Could not open DB connection since no client is connected.`);
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
// Fail-safe timeout for opening a database connection.
|
|
507
|
-
const timeout = setTimeout(() => {
|
|
508
|
-
abortController.abort();
|
|
509
|
-
}, 10_000);
|
|
510
|
-
|
|
511
|
-
/**
|
|
512
|
-
* Handle cases where the client might close while opening a connection.
|
|
513
|
-
*/
|
|
514
|
-
const abortController = new AbortController();
|
|
515
|
-
const closeListener = () => {
|
|
516
|
-
abortController.abort();
|
|
517
|
-
};
|
|
508
|
+
const client = await this.getRandomWrappedPort();
|
|
509
|
+
if (!client) {
|
|
510
|
+
// Should not really happen in practice
|
|
511
|
+
throw new Error(`Could not open DB connection since no client is connected.`);
|
|
512
|
+
}
|
|
518
513
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
514
|
+
// Fail-safe timeout for opening a database connection.
|
|
515
|
+
const timeout = setTimeout(() => {
|
|
516
|
+
abortController.abort();
|
|
517
|
+
}, 10_000);
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Handle cases where the client might close while opening a connection.
|
|
521
|
+
*/
|
|
522
|
+
const abortController = new AbortController();
|
|
523
|
+
const closeListener = () => {
|
|
524
|
+
abortController.abort();
|
|
525
|
+
};
|
|
525
526
|
|
|
526
|
-
|
|
527
|
+
const removeCloseListener = () => {
|
|
528
|
+
const index = client.closeListeners.indexOf(closeListener);
|
|
529
|
+
if (index >= 0) {
|
|
530
|
+
client.closeListeners.splice(index, 1);
|
|
531
|
+
}
|
|
532
|
+
};
|
|
527
533
|
|
|
528
|
-
|
|
529
|
-
action: () => client.clientProvider.getDBWorkerPort(),
|
|
530
|
-
signal: abortController.signal,
|
|
531
|
-
cleanupOnAbort: (port) => {
|
|
532
|
-
port.close();
|
|
533
|
-
}
|
|
534
|
-
}).catch((ex) => {
|
|
535
|
-
removeCloseListener();
|
|
536
|
-
throw ex;
|
|
537
|
-
});
|
|
534
|
+
client.closeListeners.push(closeListener);
|
|
538
535
|
|
|
539
|
-
|
|
540
|
-
|
|
536
|
+
const workerPort = await withAbort({
|
|
537
|
+
action: () => client.clientProvider.getDBWorkerPort(),
|
|
538
|
+
signal: abortController.signal,
|
|
539
|
+
cleanupOnAbort: (port) => {
|
|
540
|
+
port.close();
|
|
541
|
+
}
|
|
542
|
+
}).catch((ex) => {
|
|
543
|
+
removeCloseListener();
|
|
544
|
+
throw ex;
|
|
545
|
+
});
|
|
541
546
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
547
|
+
const remote = Comlink.wrap<OpenAsyncDatabaseConnection>(workerPort);
|
|
548
|
+
const identifier = this.syncParams!.dbParams.dbFilename;
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* The open could fail if the tab is closed while we're busy opening the database.
|
|
552
|
+
* This operation is typically executed inside an exclusive portMutex lock.
|
|
553
|
+
* We typically execute the closeListeners using the portMutex in a different context.
|
|
554
|
+
* We can't rely on the closeListeners to abort the operation if the tab is closed.
|
|
555
|
+
*/
|
|
556
|
+
const db = await withAbort({
|
|
557
|
+
action: () => remote(this.syncParams!.dbParams),
|
|
558
|
+
signal: abortController.signal,
|
|
559
|
+
cleanupOnAbort: (db) => {
|
|
560
|
+
db.close();
|
|
561
|
+
}
|
|
562
|
+
}).finally(() => {
|
|
563
|
+
// We can remove the close listener here since we no longer need it past this point.
|
|
564
|
+
removeCloseListener();
|
|
565
|
+
});
|
|
558
566
|
|
|
559
|
-
|
|
567
|
+
clearTimeout(timeout);
|
|
560
568
|
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
569
|
+
const wrapped = new WorkerWrappedAsyncDatabaseConnection({
|
|
570
|
+
remote,
|
|
571
|
+
baseConnection: db,
|
|
572
|
+
identifier,
|
|
573
|
+
// It's possible for this worker to outlive the client hosting the database for us. We need to be prepared for
|
|
574
|
+
// that and ensure pending requests are aborted when the tab is closed.
|
|
575
|
+
remoteCanCloseUnexpectedly: true
|
|
576
|
+
});
|
|
577
|
+
client.closeListeners.push(async () => {
|
|
578
|
+
this.logger.info('Aborting open connection because associated tab closed.');
|
|
579
|
+
/**
|
|
580
|
+
* Don't await this close operation. It might never resolve if the tab is closed.
|
|
581
|
+
* We mark the remote as closed first, this will reject any pending requests.
|
|
582
|
+
* We then call close. The close operation is configured to fire-and-forget, the main promise will reject immediately.
|
|
583
|
+
*/
|
|
584
|
+
wrapped.markRemoteClosed();
|
|
585
|
+
wrapped.close().catch((ex) => this.logger.warn('error closing database connection', ex));
|
|
586
|
+
});
|
|
579
587
|
|
|
580
|
-
|
|
581
|
-
} catch (ex) {
|
|
582
|
-
this.logger.warn('Error opening internal DB', ex);
|
|
583
|
-
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
584
|
-
}
|
|
585
|
-
}
|
|
588
|
+
return wrapped;
|
|
586
589
|
}
|
|
587
590
|
|
|
588
591
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createBaseLogger } from '@powersync/common';
|
|
2
|
-
import { SharedSyncImplementation } from './SharedSyncImplementation';
|
|
3
|
-
import { WorkerClient } from './WorkerClient';
|
|
2
|
+
import { SharedSyncImplementation } from './SharedSyncImplementation.js';
|
|
3
|
+
import { WorkerClient } from './WorkerClient.js';
|
|
4
4
|
|
|
5
5
|
const _self: SharedWorkerGlobalScope = self as any;
|
|
6
6
|
const logger = createBaseLogger();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ILogLevel, PowerSyncConnectionOptions, SubscribedStream } from '@powersync/common';
|
|
2
2
|
import * as Comlink from 'comlink';
|
|
3
|
-
import { getNavigatorLocks } from '../../shared/navigator';
|
|
3
|
+
import { getNavigatorLocks } from '../../shared/navigator.js';
|
|
4
4
|
import {
|
|
5
5
|
ManualSharedSyncPayload,
|
|
6
6
|
SharedSyncClientEvent,
|
|
7
7
|
SharedSyncImplementation,
|
|
8
8
|
SharedSyncInitOptions,
|
|
9
9
|
WrappedSyncPort
|
|
10
|
-
} from './SharedSyncImplementation';
|
|
10
|
+
} from './SharedSyncImplementation.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* A client to the shared sync worker.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { FacadeVFS } from '@journeyapps/wa-sqlite/src/FacadeVFS.js';
|
|
2
|
-
export declare class OPFSCoopSyncVFS extends FacadeVFS {
|
|
3
|
-
#private;
|
|
4
|
-
/** @type {Map<number, File>} */ mapIdToFile: Map<any, any>;
|
|
5
|
-
lastError: null;
|
|
6
|
-
log: null;
|
|
7
|
-
/** @type {Map<string, PersistentFile>} */ persistentFiles: Map<any, any>;
|
|
8
|
-
/** @type {Map<string, FileSystemSyncAccessHandle>} */ boundAccessHandles: Map<any, any>;
|
|
9
|
-
/** @type {Set<FileSystemSyncAccessHandle>} */ unboundAccessHandles: Set<unknown>;
|
|
10
|
-
/** @type {Set<string>} */ accessiblePaths: Set<unknown>;
|
|
11
|
-
releaser: null;
|
|
12
|
-
static create(name: any, module: any): Promise<OPFSCoopSyncVFS>;
|
|
13
|
-
constructor(name: any, module: any);
|
|
14
|
-
/**
|
|
15
|
-
* @param {string?} zName
|
|
16
|
-
* @param {number} fileId
|
|
17
|
-
* @param {number} flags
|
|
18
|
-
* @param {DataView} pOutFlags
|
|
19
|
-
* @returns {number}
|
|
20
|
-
*/
|
|
21
|
-
jOpen(zName: any, fileId: any, flags: any, pOutFlags: any): 0 | 5 | 14;
|
|
22
|
-
/**
|
|
23
|
-
* @param {string} zName
|
|
24
|
-
* @param {number} syncDir
|
|
25
|
-
* @returns {number}
|
|
26
|
-
*/
|
|
27
|
-
jDelete(zName: any, syncDir: any): 0 | 2570;
|
|
28
|
-
/**
|
|
29
|
-
* @param {string} zName
|
|
30
|
-
* @param {number} flags
|
|
31
|
-
* @param {DataView} pResOut
|
|
32
|
-
* @returns {number}
|
|
33
|
-
*/
|
|
34
|
-
jAccess(zName: any, flags: any, pResOut: any): 0 | 3338;
|
|
35
|
-
/**
|
|
36
|
-
* @param {number} fileId
|
|
37
|
-
* @returns {number}
|
|
38
|
-
*/
|
|
39
|
-
jClose(fileId: any): 0 | 4106;
|
|
40
|
-
/**
|
|
41
|
-
* @param {number} fileId
|
|
42
|
-
* @param {Uint8Array} pData
|
|
43
|
-
* @param {number} iOffset
|
|
44
|
-
* @returns {number}
|
|
45
|
-
*/
|
|
46
|
-
jRead(fileId: any, pData: any, iOffset: any): 0 | 522 | 266;
|
|
47
|
-
/**
|
|
48
|
-
* @param {number} fileId
|
|
49
|
-
* @param {Uint8Array} pData
|
|
50
|
-
* @param {number} iOffset
|
|
51
|
-
* @returns {number}
|
|
52
|
-
*/
|
|
53
|
-
jWrite(fileId: any, pData: any, iOffset: any): 0 | 778;
|
|
54
|
-
/**
|
|
55
|
-
* @param {number} fileId
|
|
56
|
-
* @param {number} iSize
|
|
57
|
-
* @returns {number}
|
|
58
|
-
*/
|
|
59
|
-
jTruncate(fileId: any, iSize: any): 0 | 1546;
|
|
60
|
-
/**
|
|
61
|
-
* @param {number} fileId
|
|
62
|
-
* @param {number} flags
|
|
63
|
-
* @returns {number}
|
|
64
|
-
*/
|
|
65
|
-
jSync(fileId: any, flags: any): 0 | 1034;
|
|
66
|
-
/**
|
|
67
|
-
* @param {number} fileId
|
|
68
|
-
* @param {DataView} pSize64
|
|
69
|
-
* @returns {number}
|
|
70
|
-
*/
|
|
71
|
-
jFileSize(fileId: any, pSize64: any): 0 | 1802;
|
|
72
|
-
/**
|
|
73
|
-
* @param {number} fileId
|
|
74
|
-
* @param {number} lockType
|
|
75
|
-
* @returns {number}
|
|
76
|
-
*/
|
|
77
|
-
jLock(fileId: any, lockType: any): 0 | 5;
|
|
78
|
-
/**
|
|
79
|
-
* @param {number} fileId
|
|
80
|
-
* @param {number} lockType
|
|
81
|
-
* @returns {number}
|
|
82
|
-
*/
|
|
83
|
-
jUnlock(fileId: any, lockType: any): 0;
|
|
84
|
-
/**
|
|
85
|
-
* @param {number} fileId
|
|
86
|
-
* @param {number} op
|
|
87
|
-
* @param {DataView} pArg
|
|
88
|
-
* @returns {number|Promise<number>}
|
|
89
|
-
*/
|
|
90
|
-
jFileControl(fileId: any, op: any, pArg: any): 10 | 12;
|
|
91
|
-
/**
|
|
92
|
-
* @param {Uint8Array} zBuf
|
|
93
|
-
* @returns
|
|
94
|
-
*/
|
|
95
|
-
jGetLastError(zBuf: any): 0;
|
|
96
|
-
}
|