@squidcloud/client 1.0.9 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.9",
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",
@@ -57,7 +57,6 @@
57
57
  "tsconfig-paths-webpack-plugin": "^4.0.0",
58
58
  "tscpaths": "^0.0.9",
59
59
  "webpack": "^5.75.0",
60
- "webpack-cli": "^5.0.0",
61
- "webpack-node-externals": "^3.0.0"
60
+ "webpack-cli": "^5.0.0"
62
61
  }
63
62
  }
@@ -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
- isDbDifferentThanInMemory(fullDocIdStr: FullDocIdStr): boolean;
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.9",
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",
@@ -57,7 +57,6 @@
57
57
  "tsconfig-paths-webpack-plugin": "^4.0.0",
58
58
  "tscpaths": "^0.0.9",
59
59
  "webpack": "^5.75.0",
60
- "webpack-cli": "^5.0.0",
61
- "webpack-node-externals": "^3.0.0"
60
+ "webpack-cli": "^5.0.0"
62
61
  }
63
62
  }