@squidcloud/client 1.0.7 → 1.0.10
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/common/src/application.types.d.ts +13 -21
- package/dist/common/src/index.d.ts +1 -0
- package/dist/common/src/integration.types.d.ts +3 -1
- package/dist/common/src/metrics.types.d.ts +1 -1
- package/dist/common/src/utils/id.d.ts +1 -0
- package/dist/index.js +6 -6
- package/dist/index.js.LICENSE.txt +1 -28
- package/dist/package.json +2 -13
- package/dist/typescript-client/src/data.manager.d.ts +3 -0
- package/dist/typescript-client/src/db.dao.d.ts +2 -1
- package/dist/typescript-client/src/document-reference.d.ts +1 -0
- package/dist/typescript-client/src/testing/fake-rpc.manager.d.ts +1 -0
- package/dist/typescript-client/src/testing/squid-env-setup.d.ts +1 -0
- package/package.json +2 -13
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* The buffer module from node.js, for the browser.
|
|
3
|
-
*
|
|
4
|
-
* @author Feross Aboukhadijeh <http://feross.org>
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/*!
|
|
9
|
-
* The buffer module from node.js, for the browser.
|
|
10
|
-
*
|
|
11
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
12
|
-
* @license MIT
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
1
|
/*! *****************************************************************************
|
|
16
2
|
Copyright (c) Microsoft Corporation.
|
|
17
3
|
|
|
@@ -27,7 +13,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
27
13
|
PERFORMANCE OF THIS SOFTWARE.
|
|
28
14
|
***************************************************************************** */
|
|
29
15
|
|
|
30
|
-
/*!
|
|
16
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
31
17
|
|
|
32
18
|
/**
|
|
33
19
|
* @license
|
|
@@ -38,17 +24,4 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
38
24
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
39
25
|
*/
|
|
40
26
|
|
|
41
|
-
/**
|
|
42
|
-
* Wrapper for built-in http.js to emulate the browser XMLHttpRequest object.
|
|
43
|
-
*
|
|
44
|
-
* This can be used with JS designed for browsers to improve reuse of code and
|
|
45
|
-
* allow the use of existing libraries.
|
|
46
|
-
*
|
|
47
|
-
* Usage: include("XMLHttpRequest.js") and use XMLHttpRequest per W3C specs.
|
|
48
|
-
*
|
|
49
|
-
* @author Dan DeFelippi <dan@driverdan.com>
|
|
50
|
-
* @contributor David Ellis <d.f.ellis@ieee.org>
|
|
51
|
-
* @license MIT
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
27
|
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squidcloud/client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "A typescript implementation of the Squid client",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/typescript-client/src/index.d.ts",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"test:cov": "jest --coverage",
|
|
21
21
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
22
22
|
"test:e2e": "jest --config ./test/jest-e2e.json",
|
|
23
|
-
"prepublish": "npm run build",
|
|
24
23
|
"publish:npm": "npm publish --access public"
|
|
25
24
|
},
|
|
26
25
|
"keywords": [
|
|
@@ -31,11 +30,6 @@
|
|
|
31
30
|
"realtime",
|
|
32
31
|
"database"
|
|
33
32
|
],
|
|
34
|
-
"browser": {
|
|
35
|
-
"fs": false,
|
|
36
|
-
"path": false,
|
|
37
|
-
"os": false
|
|
38
|
-
},
|
|
39
33
|
"author": "",
|
|
40
34
|
"license": "ISC",
|
|
41
35
|
"dependencies": {
|
|
@@ -45,12 +39,7 @@
|
|
|
45
39
|
"lodash": "^4.17.21",
|
|
46
40
|
"lokijs": "^1.5.12",
|
|
47
41
|
"rxjs": "7.5.7",
|
|
48
|
-
"socket.io-client": "^4.5.2"
|
|
49
|
-
"browserify-zlib": "^0.2.0",
|
|
50
|
-
"stream-browserify": "^3.0.0",
|
|
51
|
-
"https-browserify": "^1.0.0",
|
|
52
|
-
"stream-http": "^3.2.0",
|
|
53
|
-
"tty-browserify": "^0.0.1"
|
|
42
|
+
"socket.io-client": "^4.5.2"
|
|
54
43
|
},
|
|
55
44
|
"devDependencies": {
|
|
56
45
|
"cpx": "^1.5.0",
|
|
@@ -82,7 +82,10 @@ export declare class DataManager {
|
|
|
82
82
|
private handleIncomingMessages;
|
|
83
83
|
constructor(dbDao: DbDao, mutationSender: MutationSender, socketManager: SocketManagerInterface, querySubscriptionManager: QuerySubscriptionManager, queryBuilderFactory: QueryBuilderFactory, lockManager: LockManager, destructManager: DestructManager, documentIdentityService: DocumentIdentityService);
|
|
84
84
|
getProperties(fullDocIdStr: FullDocIdStr): DocType | undefined;
|
|
85
|
+
/** Whether a document has changes that are out of sync with the server. */
|
|
85
86
|
isDirty(fullDocIdStr: FullDocIdStr): boolean;
|
|
87
|
+
/** Whether the document is tracked by any ongoing queries or outgoing mutations. */
|
|
88
|
+
isTracked(fullDocIdStr: FullDocIdStr): boolean;
|
|
86
89
|
/**
|
|
87
90
|
* Runs the provided function without sending mutations to the server while collecting the updates to the different
|
|
88
91
|
* queries. Local updates will still be applied. Once the batch finishes, all the updates will be sent to the server
|
|
@@ -7,7 +7,8 @@ export declare class DbDao {
|
|
|
7
7
|
constructor();
|
|
8
8
|
saveDocument(fullDocIdStr: FullDocIdStr, properties: DocType | undefined): DbId | undefined;
|
|
9
9
|
removeDocumentFromDb(fullDocIdStr: FullDocIdStr): void;
|
|
10
|
-
|
|
10
|
+
isInMemory(fullDocIdStr: FullDocIdStr): boolean;
|
|
11
|
+
isInDatabase(fullDocIdStr: FullDocIdStr): boolean;
|
|
11
12
|
getDocumentProperties(fullDocIdStr: FullDocIdStr): DocType;
|
|
12
13
|
getDocumentPropertiesOrUndefined(fullDocIdStr: FullDocIdStr): DocType | undefined;
|
|
13
14
|
executeQuery(query: Query): Array<DocType>;
|
|
@@ -11,6 +11,7 @@ export declare class DocumentReference<T extends UserFacingDocType = any> {
|
|
|
11
11
|
data(): T;
|
|
12
12
|
get(): Promise<DocumentReference<T> | undefined>;
|
|
13
13
|
isDirty(): boolean;
|
|
14
|
+
private isTracked;
|
|
14
15
|
update(data: Partial<Record<Paths<T>, any>>, transactionId?: TransactionId): Promise<void>;
|
|
15
16
|
setInPath(path: Paths<T>, value: any, transactionId?: TransactionId): Promise<void>;
|
|
16
17
|
deleteInPath(path: Paths<T>, transactionId?: TransactionId): Promise<void>;
|
|
@@ -12,6 +12,7 @@ export declare class FakeRpcManager extends RpcManager {
|
|
|
12
12
|
path: string;
|
|
13
13
|
message: any;
|
|
14
14
|
}>;
|
|
15
|
+
errorResponses: Array<any>;
|
|
15
16
|
constructor(socketManager: FakeSocketManager, destructManager: DestructManager);
|
|
16
17
|
setStaticHeader(key: string, value: string): void;
|
|
17
18
|
deleteStaticHeader(key: string): void;
|
|
@@ -65,6 +65,7 @@ export declare class SquidEnvSetup {
|
|
|
65
65
|
__docId__: DocId;
|
|
66
66
|
};
|
|
67
67
|
}>, mutationsTimestamp?: number): void;
|
|
68
|
+
simulateErrorResponse(message: string): void;
|
|
68
69
|
runAsync(fn: () => any): void;
|
|
69
70
|
getInternalDocId(idValue: string): string;
|
|
70
71
|
executeQueryOnCollectionA(subscribe?: boolean): QueryResponse;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squidcloud/client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "A typescript implementation of the Squid client",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/typescript-client/src/index.d.ts",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"test:cov": "jest --coverage",
|
|
21
21
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
22
22
|
"test:e2e": "jest --config ./test/jest-e2e.json",
|
|
23
|
-
"prepublish": "npm run build",
|
|
24
23
|
"publish:npm": "npm publish --access public"
|
|
25
24
|
},
|
|
26
25
|
"keywords": [
|
|
@@ -31,11 +30,6 @@
|
|
|
31
30
|
"realtime",
|
|
32
31
|
"database"
|
|
33
32
|
],
|
|
34
|
-
"browser": {
|
|
35
|
-
"fs": false,
|
|
36
|
-
"path": false,
|
|
37
|
-
"os": false
|
|
38
|
-
},
|
|
39
33
|
"author": "",
|
|
40
34
|
"license": "ISC",
|
|
41
35
|
"dependencies": {
|
|
@@ -45,12 +39,7 @@
|
|
|
45
39
|
"lodash": "^4.17.21",
|
|
46
40
|
"lokijs": "^1.5.12",
|
|
47
41
|
"rxjs": "7.5.7",
|
|
48
|
-
"socket.io-client": "^4.5.2"
|
|
49
|
-
"browserify-zlib": "^0.2.0",
|
|
50
|
-
"stream-browserify": "^3.0.0",
|
|
51
|
-
"https-browserify": "^1.0.0",
|
|
52
|
-
"stream-http": "^3.2.0",
|
|
53
|
-
"tty-browserify": "^0.0.1"
|
|
42
|
+
"socket.io-client": "^4.5.2"
|
|
54
43
|
},
|
|
55
44
|
"devDependencies": {
|
|
56
45
|
"cpx": "^1.5.0",
|