@powersync/common 0.0.0-dev-20240903063630 → 0.0.0-dev-20240920093037
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/dist/bundle.mjs +18 -0
- package/dist/bundle.mjs.map +1 -0
- package/lib/client/AbstractPowerSyncDatabase.d.ts +22 -15
- package/lib/client/AbstractPowerSyncDatabase.js +51 -36
- package/lib/client/AbstractPowerSyncOpenFactory.d.ts +5 -5
- package/lib/client/AbstractPowerSyncOpenFactory.js +0 -1
- package/lib/client/SQLOpenFactory.d.ts +1 -1
- package/lib/client/SQLOpenFactory.js +0 -1
- package/lib/client/connection/PowerSyncBackendConnector.d.ts +2 -2
- package/lib/client/connection/PowerSyncBackendConnector.js +0 -1
- package/lib/client/connection/PowerSyncCredentials.js +0 -1
- package/lib/client/constants.js +0 -1
- package/lib/client/sync/bucket/BucketStorageAdapter.d.ts +8 -4
- package/lib/client/sync/bucket/BucketStorageAdapter.js +0 -1
- package/lib/client/sync/bucket/CrudBatch.d.ts +1 -1
- package/lib/client/sync/bucket/CrudBatch.js +0 -1
- package/lib/client/sync/bucket/CrudEntry.js +0 -1
- package/lib/client/sync/bucket/CrudTransaction.d.ts +2 -2
- package/lib/client/sync/bucket/CrudTransaction.js +1 -2
- package/lib/client/sync/bucket/OpType.js +0 -1
- package/lib/client/sync/bucket/OplogEntry.d.ts +2 -2
- package/lib/client/sync/bucket/OplogEntry.js +1 -2
- package/lib/client/sync/bucket/SqliteBucketStorage.d.ts +9 -6
- package/lib/client/sync/bucket/SqliteBucketStorage.js +28 -13
- package/lib/client/sync/bucket/SyncDataBatch.d.ts +1 -1
- package/lib/client/sync/bucket/SyncDataBatch.js +1 -2
- package/lib/client/sync/bucket/SyncDataBucket.d.ts +2 -2
- package/lib/client/sync/bucket/SyncDataBucket.js +1 -2
- package/lib/client/sync/stream/AbstractRemote.d.ts +8 -6
- package/lib/client/sync/stream/AbstractRemote.js +17 -7
- package/lib/client/sync/stream/AbstractStreamingSyncImplementation.d.ts +8 -8
- package/lib/client/sync/stream/AbstractStreamingSyncImplementation.js +14 -11
- package/lib/client/sync/stream/streaming-sync-types.d.ts +4 -3
- package/lib/client/sync/stream/streaming-sync-types.js +0 -1
- package/lib/db/DBAdapter.d.ts +1 -1
- package/lib/db/DBAdapter.js +0 -1
- package/lib/db/crud/SyncStatus.js +0 -1
- package/lib/db/crud/UploadQueueStatus.js +0 -1
- package/lib/db/schema/Column.d.ts +30 -0
- package/lib/db/{Column.js → schema/Column.js} +17 -1
- package/lib/db/schema/Index.d.ts +3 -3
- package/lib/db/schema/Index.js +1 -2
- package/lib/db/schema/IndexedColumn.d.ts +2 -2
- package/lib/db/schema/IndexedColumn.js +1 -2
- package/lib/db/schema/Schema.d.ts +6 -7
- package/lib/db/schema/Schema.js +11 -3
- package/lib/db/schema/Table.d.ts +90 -10
- package/lib/db/schema/Table.js +61 -11
- package/lib/db/schema/TableV2.d.ts +8 -30
- package/lib/db/schema/TableV2.js +5 -62
- package/lib/index.d.ts +34 -35
- package/lib/index.js +34 -36
- package/lib/types/types.js +0 -1
- package/lib/utils/AbortOperation.js +0 -1
- package/lib/utils/BaseObserver.js +0 -1
- package/lib/utils/ControlledExecutor.js +0 -1
- package/lib/utils/DataStream.d.ts +1 -1
- package/lib/utils/DataStream.js +1 -2
- package/lib/utils/mutex.js +0 -1
- package/lib/utils/parseQuery.d.ts +1 -1
- package/lib/utils/parseQuery.js +0 -1
- package/lib/utils/throttle.d.ts +14 -0
- package/lib/utils/throttle.js +45 -0
- package/package.json +13 -5
- package/dist/index.js +0 -16
- package/lib/client/AbstractPowerSyncDatabase.js.map +0 -1
- package/lib/client/AbstractPowerSyncOpenFactory.js.map +0 -1
- package/lib/client/SQLOpenFactory.js.map +0 -1
- package/lib/client/connection/PowerSyncBackendConnector.js.map +0 -1
- package/lib/client/connection/PowerSyncCredentials.js.map +0 -1
- package/lib/client/constants.js.map +0 -1
- package/lib/client/sync/bucket/BucketStorageAdapter.js.map +0 -1
- package/lib/client/sync/bucket/CrudBatch.js.map +0 -1
- package/lib/client/sync/bucket/CrudEntry.js.map +0 -1
- package/lib/client/sync/bucket/CrudTransaction.js.map +0 -1
- package/lib/client/sync/bucket/OpType.js.map +0 -1
- package/lib/client/sync/bucket/OplogEntry.js.map +0 -1
- package/lib/client/sync/bucket/SqliteBucketStorage.js.map +0 -1
- package/lib/client/sync/bucket/SyncDataBatch.js.map +0 -1
- package/lib/client/sync/bucket/SyncDataBucket.js.map +0 -1
- package/lib/client/sync/stream/AbstractRemote.js.map +0 -1
- package/lib/client/sync/stream/AbstractStreamingSyncImplementation.js.map +0 -1
- package/lib/client/sync/stream/streaming-sync-types.js.map +0 -1
- package/lib/db/Column.d.ts +0 -19
- package/lib/db/Column.js.map +0 -1
- package/lib/db/DBAdapter.js.map +0 -1
- package/lib/db/crud/SyncStatus.js.map +0 -1
- package/lib/db/crud/UploadQueueStatus.js.map +0 -1
- package/lib/db/schema/Index.js.map +0 -1
- package/lib/db/schema/IndexedColumn.js.map +0 -1
- package/lib/db/schema/Schema.js.map +0 -1
- package/lib/db/schema/Table.js.map +0 -1
- package/lib/db/schema/TableV2.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/types/types.js.map +0 -1
- package/lib/utils/AbortOperation.js.map +0 -1
- package/lib/utils/BaseObserver.js.map +0 -1
- package/lib/utils/ControlledExecutor.js.map +0 -1
- package/lib/utils/DataStream.js.map +0 -1
- package/lib/utils/mutex.js.map +0 -1
- package/lib/utils/parseQuery.js.map +0 -1
- package/lib/utils/strings.d.ts +0 -3
- package/lib/utils/strings.js +0 -10
- package/lib/utils/strings.js.map +0 -1
package/lib/db/schema/TableV2.js
CHANGED
|
@@ -1,65 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { IndexedColumn } from './IndexedColumn';
|
|
4
|
-
import { InvalidSQLCharacters } from './Table';
|
|
5
|
-
const text = {
|
|
6
|
-
type: ColumnType.TEXT
|
|
7
|
-
};
|
|
8
|
-
const integer = {
|
|
9
|
-
type: ColumnType.INTEGER
|
|
10
|
-
};
|
|
11
|
-
const real = {
|
|
12
|
-
type: ColumnType.REAL
|
|
13
|
-
};
|
|
14
|
-
// There is maximum of 127 arguments for any function in SQLite. Currently we use json_object which uses 1 arg per key (column name)
|
|
15
|
-
// and one per value, which limits it to 63 arguments.
|
|
16
|
-
const MAX_AMOUNT_OF_COLUMNS = 63;
|
|
17
|
-
export const column = {
|
|
18
|
-
text,
|
|
19
|
-
integer,
|
|
20
|
-
real
|
|
21
|
-
};
|
|
22
|
-
/*
|
|
1
|
+
import { Table } from './Table.js';
|
|
2
|
+
/**
|
|
23
3
|
Generate a new table from the columns and indexes
|
|
4
|
+
@deprecated You should use {@link Table} instead as it now allows TableV2 syntax.
|
|
5
|
+
This will be removed in the next major release.
|
|
24
6
|
*/
|
|
25
|
-
export class TableV2 {
|
|
26
|
-
columns;
|
|
27
|
-
options;
|
|
28
|
-
indexes;
|
|
29
|
-
constructor(columns, options = {}) {
|
|
30
|
-
this.columns = columns;
|
|
31
|
-
this.options = options;
|
|
32
|
-
this.validateTable(columns);
|
|
33
|
-
if (options?.indexes) {
|
|
34
|
-
this.indexes = Object.entries(options.indexes).map(([name, columns]) => {
|
|
35
|
-
if (name.startsWith('-')) {
|
|
36
|
-
return new Index({
|
|
37
|
-
name: name.substring(1),
|
|
38
|
-
columns: columns.map((c) => new IndexedColumn({ name: c, ascending: false }))
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
return new Index({
|
|
42
|
-
name: name,
|
|
43
|
-
columns: columns.map((c) => new IndexedColumn({ name: c, ascending: true }))
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
validateTable(columns) {
|
|
49
|
-
const columnNames = Object.keys(columns);
|
|
50
|
-
const columnLength = columnNames.length;
|
|
51
|
-
if (columnNames.includes('id')) {
|
|
52
|
-
throw new Error(`An id column is automatically added, custom id columns are not supported`);
|
|
53
|
-
}
|
|
54
|
-
if (columnLength > MAX_AMOUNT_OF_COLUMNS) {
|
|
55
|
-
throw new Error(`TableV2 cannot have more than ${MAX_AMOUNT_OF_COLUMNS} columns`);
|
|
56
|
-
}
|
|
57
|
-
columnNames
|
|
58
|
-
.map((column) => {
|
|
59
|
-
if (InvalidSQLCharacters.test(column)) {
|
|
60
|
-
throw new Error(`Invalid characters in column name: ${column}`);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}
|
|
7
|
+
export class TableV2 extends Table {
|
|
64
8
|
}
|
|
65
|
-
//# sourceMappingURL=TableV2.js.map
|
package/lib/index.d.ts
CHANGED
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
export * from './client/AbstractPowerSyncDatabase';
|
|
2
|
-
export * from './client/AbstractPowerSyncOpenFactory';
|
|
3
|
-
export * from './client/SQLOpenFactory';
|
|
4
|
-
export * from './client/connection/PowerSyncBackendConnector';
|
|
5
|
-
export * from './client/connection/PowerSyncCredentials';
|
|
6
|
-
export * from './client/sync/bucket/BucketStorageAdapter';
|
|
7
|
-
export { UpdateType, CrudEntry, OpId } from './client/sync/bucket/CrudEntry';
|
|
8
|
-
export * from './client/sync/bucket/SqliteBucketStorage';
|
|
9
|
-
export * from './client/sync/bucket/CrudBatch';
|
|
10
|
-
export * from './client/sync/bucket/CrudTransaction';
|
|
11
|
-
export * from './client/sync/bucket/SyncDataBatch';
|
|
12
|
-
export * from './client/sync/bucket/SyncDataBucket';
|
|
13
|
-
export * from './client/sync/bucket/OpType';
|
|
14
|
-
export * from './client/sync/bucket/OplogEntry';
|
|
15
|
-
export * from './client/sync/stream/AbstractRemote';
|
|
16
|
-
export * from './client/sync/stream/AbstractStreamingSyncImplementation';
|
|
17
|
-
export * from './client/sync/stream/streaming-sync-types';
|
|
18
|
-
export { MAX_OP_ID } from './client/constants';
|
|
19
|
-
export * from './db/crud/SyncStatus';
|
|
20
|
-
export * from './db/crud/UploadQueueStatus';
|
|
21
|
-
export * from './db/schema/Schema';
|
|
22
|
-
export * from './db/schema/Table';
|
|
23
|
-
export * from './db/schema/Index';
|
|
24
|
-
export * from './db/schema/IndexedColumn';
|
|
25
|
-
export * from './db/
|
|
26
|
-
export * from './db/
|
|
27
|
-
export * from './db/
|
|
28
|
-
export * from './db/
|
|
29
|
-
export * from './db/
|
|
30
|
-
export * from './utils/AbortOperation';
|
|
31
|
-
export * from './utils/BaseObserver';
|
|
32
|
-
export * from './utils/
|
|
33
|
-
export * from './utils/
|
|
34
|
-
export * from './
|
|
35
|
-
export * from './types/types';
|
|
1
|
+
export * from './client/AbstractPowerSyncDatabase.js';
|
|
2
|
+
export * from './client/AbstractPowerSyncOpenFactory.js';
|
|
3
|
+
export * from './client/SQLOpenFactory.js';
|
|
4
|
+
export * from './client/connection/PowerSyncBackendConnector.js';
|
|
5
|
+
export * from './client/connection/PowerSyncCredentials.js';
|
|
6
|
+
export * from './client/sync/bucket/BucketStorageAdapter.js';
|
|
7
|
+
export { UpdateType, CrudEntry, OpId } from './client/sync/bucket/CrudEntry.js';
|
|
8
|
+
export * from './client/sync/bucket/SqliteBucketStorage.js';
|
|
9
|
+
export * from './client/sync/bucket/CrudBatch.js';
|
|
10
|
+
export * from './client/sync/bucket/CrudTransaction.js';
|
|
11
|
+
export * from './client/sync/bucket/SyncDataBatch.js';
|
|
12
|
+
export * from './client/sync/bucket/SyncDataBucket.js';
|
|
13
|
+
export * from './client/sync/bucket/OpType.js';
|
|
14
|
+
export * from './client/sync/bucket/OplogEntry.js';
|
|
15
|
+
export * from './client/sync/stream/AbstractRemote.js';
|
|
16
|
+
export * from './client/sync/stream/AbstractStreamingSyncImplementation.js';
|
|
17
|
+
export * from './client/sync/stream/streaming-sync-types.js';
|
|
18
|
+
export { MAX_OP_ID } from './client/constants.js';
|
|
19
|
+
export * from './db/crud/SyncStatus.js';
|
|
20
|
+
export * from './db/crud/UploadQueueStatus.js';
|
|
21
|
+
export * from './db/schema/Schema.js';
|
|
22
|
+
export * from './db/schema/Table.js';
|
|
23
|
+
export * from './db/schema/Index.js';
|
|
24
|
+
export * from './db/schema/IndexedColumn.js';
|
|
25
|
+
export * from './db/schema/Column.js';
|
|
26
|
+
export * from './db/schema/TableV2.js';
|
|
27
|
+
export * from './db/crud/SyncStatus.js';
|
|
28
|
+
export * from './db/crud/UploadQueueStatus.js';
|
|
29
|
+
export * from './db/DBAdapter.js';
|
|
30
|
+
export * from './utils/AbortOperation.js';
|
|
31
|
+
export * from './utils/BaseObserver.js';
|
|
32
|
+
export * from './utils/DataStream.js';
|
|
33
|
+
export * from './utils/parseQuery.js';
|
|
34
|
+
export * from './types/types.js';
|
package/lib/index.js
CHANGED
|
@@ -1,36 +1,34 @@
|
|
|
1
|
-
export * from './client/AbstractPowerSyncDatabase';
|
|
2
|
-
export * from './client/AbstractPowerSyncOpenFactory';
|
|
3
|
-
export * from './client/SQLOpenFactory';
|
|
4
|
-
export * from './client/connection/PowerSyncBackendConnector';
|
|
5
|
-
export * from './client/connection/PowerSyncCredentials';
|
|
6
|
-
export * from './client/sync/bucket/BucketStorageAdapter';
|
|
7
|
-
export { UpdateType, CrudEntry } from './client/sync/bucket/CrudEntry';
|
|
8
|
-
export * from './client/sync/bucket/SqliteBucketStorage';
|
|
9
|
-
export * from './client/sync/bucket/CrudBatch';
|
|
10
|
-
export * from './client/sync/bucket/CrudTransaction';
|
|
11
|
-
export * from './client/sync/bucket/SyncDataBatch';
|
|
12
|
-
export * from './client/sync/bucket/SyncDataBucket';
|
|
13
|
-
export * from './client/sync/bucket/OpType';
|
|
14
|
-
export * from './client/sync/bucket/OplogEntry';
|
|
15
|
-
export * from './client/sync/stream/AbstractRemote';
|
|
16
|
-
export * from './client/sync/stream/AbstractStreamingSyncImplementation';
|
|
17
|
-
export * from './client/sync/stream/streaming-sync-types';
|
|
18
|
-
export { MAX_OP_ID } from './client/constants';
|
|
19
|
-
export * from './db/crud/SyncStatus';
|
|
20
|
-
export * from './db/crud/UploadQueueStatus';
|
|
21
|
-
export * from './db/schema/Schema';
|
|
22
|
-
export * from './db/schema/Table';
|
|
23
|
-
export * from './db/schema/Index';
|
|
24
|
-
export * from './db/schema/IndexedColumn';
|
|
25
|
-
export * from './db/
|
|
26
|
-
export * from './db/
|
|
27
|
-
export * from './db/
|
|
28
|
-
export * from './db/
|
|
29
|
-
export * from './db/
|
|
30
|
-
export * from './utils/AbortOperation';
|
|
31
|
-
export * from './utils/BaseObserver';
|
|
32
|
-
export * from './utils/
|
|
33
|
-
export * from './utils/
|
|
34
|
-
export * from './
|
|
35
|
-
export * from './types/types';
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from './client/AbstractPowerSyncDatabase.js';
|
|
2
|
+
export * from './client/AbstractPowerSyncOpenFactory.js';
|
|
3
|
+
export * from './client/SQLOpenFactory.js';
|
|
4
|
+
export * from './client/connection/PowerSyncBackendConnector.js';
|
|
5
|
+
export * from './client/connection/PowerSyncCredentials.js';
|
|
6
|
+
export * from './client/sync/bucket/BucketStorageAdapter.js';
|
|
7
|
+
export { UpdateType, CrudEntry } from './client/sync/bucket/CrudEntry.js';
|
|
8
|
+
export * from './client/sync/bucket/SqliteBucketStorage.js';
|
|
9
|
+
export * from './client/sync/bucket/CrudBatch.js';
|
|
10
|
+
export * from './client/sync/bucket/CrudTransaction.js';
|
|
11
|
+
export * from './client/sync/bucket/SyncDataBatch.js';
|
|
12
|
+
export * from './client/sync/bucket/SyncDataBucket.js';
|
|
13
|
+
export * from './client/sync/bucket/OpType.js';
|
|
14
|
+
export * from './client/sync/bucket/OplogEntry.js';
|
|
15
|
+
export * from './client/sync/stream/AbstractRemote.js';
|
|
16
|
+
export * from './client/sync/stream/AbstractStreamingSyncImplementation.js';
|
|
17
|
+
export * from './client/sync/stream/streaming-sync-types.js';
|
|
18
|
+
export { MAX_OP_ID } from './client/constants.js';
|
|
19
|
+
export * from './db/crud/SyncStatus.js';
|
|
20
|
+
export * from './db/crud/UploadQueueStatus.js';
|
|
21
|
+
export * from './db/schema/Schema.js';
|
|
22
|
+
export * from './db/schema/Table.js';
|
|
23
|
+
export * from './db/schema/Index.js';
|
|
24
|
+
export * from './db/schema/IndexedColumn.js';
|
|
25
|
+
export * from './db/schema/Column.js';
|
|
26
|
+
export * from './db/schema/TableV2.js';
|
|
27
|
+
export * from './db/crud/SyncStatus.js';
|
|
28
|
+
export * from './db/crud/UploadQueueStatus.js';
|
|
29
|
+
export * from './db/DBAdapter.js';
|
|
30
|
+
export * from './utils/AbortOperation.js';
|
|
31
|
+
export * from './utils/BaseObserver.js';
|
|
32
|
+
export * from './utils/DataStream.js';
|
|
33
|
+
export * from './utils/parseQuery.js';
|
|
34
|
+
export * from './types/types.js';
|
package/lib/types/types.js
CHANGED
package/lib/utils/DataStream.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Logger from 'js-logger';
|
|
2
|
-
import { BaseObserver } from './BaseObserver';
|
|
2
|
+
import { BaseObserver } from './BaseObserver.js';
|
|
3
3
|
export const DEFAULT_PRESSURE_LIMITS = {
|
|
4
4
|
highWater: 10,
|
|
5
5
|
lowWater: 0
|
|
@@ -160,4 +160,3 @@ export class DataStream extends BaseObserver {
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
//# sourceMappingURL=DataStream.js.map
|
package/lib/utils/mutex.js
CHANGED
package/lib/utils/parseQuery.js
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Throttle a function to be called at most once every "wait" milliseconds,
|
|
3
|
+
* on the trailing edge.
|
|
4
|
+
*
|
|
5
|
+
* Roughly equivalent to lodash/throttle with {leading: false, trailing: true}
|
|
6
|
+
*/
|
|
7
|
+
export declare function throttleTrailing(func: () => void, wait: number): () => void;
|
|
8
|
+
/**
|
|
9
|
+
* Throttle a function to be called at most once every "wait" milliseconds,
|
|
10
|
+
* on the leading and trailing edge.
|
|
11
|
+
*
|
|
12
|
+
* Roughly equivalent to lodash/throttle with {leading: true, trailing: true}
|
|
13
|
+
*/
|
|
14
|
+
export declare function throttleLeadingTrailing(func: () => void, wait: number): () => void;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Throttle a function to be called at most once every "wait" milliseconds,
|
|
3
|
+
* on the trailing edge.
|
|
4
|
+
*
|
|
5
|
+
* Roughly equivalent to lodash/throttle with {leading: false, trailing: true}
|
|
6
|
+
*/
|
|
7
|
+
export function throttleTrailing(func, wait) {
|
|
8
|
+
let timeoutId = null;
|
|
9
|
+
const later = () => {
|
|
10
|
+
func();
|
|
11
|
+
timeoutId = null;
|
|
12
|
+
};
|
|
13
|
+
return function () {
|
|
14
|
+
if (timeoutId == null) {
|
|
15
|
+
timeoutId = setTimeout(later, wait);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Throttle a function to be called at most once every "wait" milliseconds,
|
|
21
|
+
* on the leading and trailing edge.
|
|
22
|
+
*
|
|
23
|
+
* Roughly equivalent to lodash/throttle with {leading: true, trailing: true}
|
|
24
|
+
*/
|
|
25
|
+
export function throttleLeadingTrailing(func, wait) {
|
|
26
|
+
let timeoutId = null;
|
|
27
|
+
let lastCallTime = 0;
|
|
28
|
+
const invokeFunction = () => {
|
|
29
|
+
func();
|
|
30
|
+
lastCallTime = Date.now();
|
|
31
|
+
timeoutId = null;
|
|
32
|
+
};
|
|
33
|
+
return function () {
|
|
34
|
+
const now = Date.now();
|
|
35
|
+
const timeToWait = wait - (now - lastCallTime);
|
|
36
|
+
if (timeToWait <= 0) {
|
|
37
|
+
// Leading edge: Call the function immediately if enough time has passed
|
|
38
|
+
invokeFunction();
|
|
39
|
+
}
|
|
40
|
+
else if (!timeoutId) {
|
|
41
|
+
// Set a timeout for the trailing edge if not already set
|
|
42
|
+
timeoutId = setTimeout(invokeFunction, timeToWait);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powersync/common",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20240920093037",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"description": "API definitions for JourneyApps PowerSync",
|
|
9
|
-
"
|
|
9
|
+
"type": "module",
|
|
10
|
+
"main": "dist/bundle.mjs",
|
|
11
|
+
"module": "dist/bundle.mjs",
|
|
10
12
|
"types": "lib/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./dist/bundle.mjs",
|
|
16
|
+
"default": "./dist/bundle.mjs",
|
|
17
|
+
"types": "./lib/index.d.ts"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
11
20
|
"author": "JOURNEYAPPS",
|
|
12
21
|
"license": "Apache-2.0",
|
|
13
22
|
"files": [
|
|
@@ -31,7 +40,6 @@
|
|
|
31
40
|
"@rollup/plugin-json": "^6.1.0",
|
|
32
41
|
"@rollup/plugin-node-resolve": "15.2.3",
|
|
33
42
|
"@rollup/plugin-terser": "^0.4.4",
|
|
34
|
-
"@types/lodash": "^4.14.197",
|
|
35
43
|
"@types/node": "^20.5.9",
|
|
36
44
|
"@types/uuid": "^9.0.1",
|
|
37
45
|
"async-mutex": "^0.4.0",
|
|
@@ -40,7 +48,6 @@
|
|
|
40
48
|
"can-ndjson-stream": "^1.0.2",
|
|
41
49
|
"cross-fetch": "^4.0.0",
|
|
42
50
|
"event-iterator": "^2.0.0",
|
|
43
|
-
"lodash": "^4.17.21",
|
|
44
51
|
"rollup": "4.14.3",
|
|
45
52
|
"rsocket-core": "1.0.0-alpha.3",
|
|
46
53
|
"rsocket-websocket-client": "1.0.0-alpha.3",
|
|
@@ -51,7 +58,8 @@
|
|
|
51
58
|
},
|
|
52
59
|
"scripts": {
|
|
53
60
|
"build": "tsc -b && rollup -c rollup.config.mjs",
|
|
54
|
-
"
|
|
61
|
+
"build:prod": "tsc -b --sourceMap false && rollup -c rollup.config.mjs",
|
|
62
|
+
"clean": "rm -rf lib dist tsconfig.tsbuildinfo",
|
|
55
63
|
"test": "vitest"
|
|
56
64
|
}
|
|
57
65
|
}
|