@palantir/pack.state.core 0.2.2 → 0.3.1
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/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-transpileBrowser.log +2 -1
- package/.turbo/turbo-transpileCjs.log +2 -1
- package/.turbo/turbo-transpileEsm.log +2 -1
- package/.turbo/turbo-transpileTypes.log +1 -1
- package/.turbo/turbo-typecheck.log +1 -1
- package/CHANGELOG.md +35 -0
- package/build/browser/index.js +11 -4
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.cjs +11 -4
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +43 -22
- package/build/esm/index.js +11 -4
- package/build/esm/index.js.map +1 -1
- package/build/types/__tests__/testUtils.d.ts.map +1 -1
- package/build/types/index.d.ts +3 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/service/BaseYjsDocumentService.d.ts +13 -9
- package/build/types/service/BaseYjsDocumentService.d.ts.map +1 -1
- package/build/types/service/InMemoryDocumentService.d.ts.map +1 -1
- package/build/types/types/CreateDocumentMetadata.d.ts +6 -0
- package/build/types/types/CreateDocumentMetadata.d.ts.map +1 -0
- package/build/types/types/DocumentService.d.ts +19 -5
- package/build/types/types/DocumentService.d.ts.map +1 -1
- package/build/types/types/StateModule.d.ts +12 -13
- package/build/types/types/StateModule.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/__tests__/testUtils.ts +2 -1
- package/src/index.ts +7 -1
- package/src/service/BaseYjsDocumentService.ts +19 -6
- package/src/service/InMemoryDocumentService.ts +10 -7
- package/src/types/CreateDocumentMetadata.ts +23 -0
- package/src/types/DocumentService.ts +18 -3
- package/src/types/StateModule.ts +13 -13
package/.turbo/turbo-lint.log
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
> @palantir/pack.state.core@0.
|
|
2
|
+
> @palantir/pack.state.core@0.3.1 transpileBrowser /home/runner/work/pack/pack/packages/state/core
|
|
3
3
|
> monorepo-transpile -f esm -m bundle -t browser
|
|
4
4
|
|
|
5
|
+
[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
|
|
5
6
|
👍
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
> @palantir/pack.state.core@0.
|
|
2
|
+
> @palantir/pack.state.core@0.3.1 transpileCjs /home/runner/work/pack/pack/packages/state/core
|
|
3
3
|
> monorepo-transpile -f cjs -m bundle -t node
|
|
4
4
|
|
|
5
|
+
[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
|
|
5
6
|
👍
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
> @palantir/pack.state.core@0.
|
|
2
|
+
> @palantir/pack.state.core@0.3.1 transpileEsm /home/runner/work/pack/pack/packages/state/core
|
|
3
3
|
> monorepo-transpile -f esm -m bundle -t node
|
|
4
4
|
|
|
5
|
+
[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
|
|
5
6
|
👍
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @palantir/pack.state.core
|
|
2
2
|
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5120719: Update dependency ranges
|
|
8
|
+
- Updated dependencies [5120719]
|
|
9
|
+
- @palantir/pack.document-schema.model-types@0.3.1
|
|
10
|
+
- @palantir/pack.core@0.2.2
|
|
11
|
+
|
|
12
|
+
## 0.3.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- 15f7f90: fix search api to match required types and add search pagination
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 9f45b8e: Improve document creation API to separate create request from raw API types
|
|
21
|
+
- 571578c: Add Booleans to pack.schema
|
|
22
|
+
- 87f1e63: Support for demo mode (offline) document services
|
|
23
|
+
- e6e40f7: Improve demo mode services and add offline demo oauth implementation
|
|
24
|
+
- 7ee55de: Bump dependencies
|
|
25
|
+
- 4a44875: Remove bun-specific scripts and dependency
|
|
26
|
+
- Updated dependencies [9f45b8e]
|
|
27
|
+
- Updated dependencies [571578c]
|
|
28
|
+
- Updated dependencies [862daf6]
|
|
29
|
+
- Updated dependencies [e6e40f7]
|
|
30
|
+
- Updated dependencies [15f7f90]
|
|
31
|
+
- Updated dependencies [7ee55de]
|
|
32
|
+
- Updated dependencies [4a44875]
|
|
33
|
+
- Updated dependencies [8057223]
|
|
34
|
+
- Updated dependencies [19b8f5b]
|
|
35
|
+
- @palantir/pack.document-schema.model-types@0.3.0
|
|
36
|
+
- @palantir/pack.core@0.2.1
|
|
37
|
+
|
|
3
38
|
## 0.2.2
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
package/build/browser/index.js
CHANGED
|
@@ -466,9 +466,11 @@ function yMapToState(yMap) {
|
|
|
466
466
|
// src/service/BaseYjsDocumentService.ts
|
|
467
467
|
var BaseYjsDocumentService = class {
|
|
468
468
|
documents = /* @__PURE__ */ new Map();
|
|
469
|
-
|
|
469
|
+
isDemo;
|
|
470
|
+
constructor(app, logger, options) {
|
|
470
471
|
this.app = app;
|
|
471
472
|
this.logger = logger;
|
|
473
|
+
this.isDemo = options?.isDemo;
|
|
472
474
|
}
|
|
473
475
|
createDocRef = (id, schema) => {
|
|
474
476
|
const temporaryRef = createDocRef(this.app, id, schema);
|
|
@@ -588,6 +590,7 @@ var BaseYjsDocumentService = class {
|
|
|
588
590
|
updateMetadataStatus(internalDoc, docRef, update) {
|
|
589
591
|
if (update.load != null || update.live != null) {
|
|
590
592
|
internalDoc.metadataStatus = {
|
|
593
|
+
isDemo: this.isDemo,
|
|
591
594
|
load: update.load ?? internalDoc.metadataStatus.load,
|
|
592
595
|
live: update.live ?? internalDoc.metadataStatus.live
|
|
593
596
|
};
|
|
@@ -602,6 +605,7 @@ var BaseYjsDocumentService = class {
|
|
|
602
605
|
updateDataStatus(internalDoc, docRef, update) {
|
|
603
606
|
if (update.load != null || update.live != null) {
|
|
604
607
|
internalDoc.dataStatus = {
|
|
608
|
+
isDemo: this.isDemo,
|
|
605
609
|
load: update.load ?? internalDoc.dataStatus.load,
|
|
606
610
|
live: update.live ?? internalDoc.dataStatus.live
|
|
607
611
|
};
|
|
@@ -1259,7 +1263,7 @@ var InMemoryDocumentService = class extends BaseYjsDocumentService {
|
|
|
1259
1263
|
const results = [];
|
|
1260
1264
|
const {
|
|
1261
1265
|
documentName,
|
|
1262
|
-
|
|
1266
|
+
pageSize
|
|
1263
1267
|
} = options ?? {};
|
|
1264
1268
|
for (const [docId, internalDoc] of this.documents.entries()) {
|
|
1265
1269
|
if (internalDoc.metadata?.documentTypeName === documentTypeName) {
|
|
@@ -1270,12 +1274,15 @@ var InMemoryDocumentService = class extends BaseYjsDocumentService {
|
|
|
1270
1274
|
...internalDoc.metadata,
|
|
1271
1275
|
id: docId
|
|
1272
1276
|
});
|
|
1273
|
-
if (
|
|
1277
|
+
if (pageSize && results.length >= pageSize) {
|
|
1274
1278
|
break;
|
|
1275
1279
|
}
|
|
1276
1280
|
}
|
|
1277
1281
|
}
|
|
1278
|
-
return Promise.resolve(
|
|
1282
|
+
return Promise.resolve({
|
|
1283
|
+
data: results,
|
|
1284
|
+
nextPageToken: void 0
|
|
1285
|
+
});
|
|
1279
1286
|
};
|
|
1280
1287
|
// Lifecycle method implementations
|
|
1281
1288
|
onMetadataSubscriptionOpened(internalDoc, docRef) {
|