@fluidframework/aqueduct 0.56.3 → 0.57.0-51086

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.
Files changed (32) hide show
  1. package/dist/container-services/containerServices.d.ts +2 -2
  2. package/dist/container-services/containerServices.d.ts.map +1 -1
  3. package/dist/container-services/containerServices.js.map +1 -1
  4. package/dist/data-object-factories/dataObjectFactory.d.ts +2 -2
  5. package/dist/data-object-factories/dataObjectFactory.d.ts.map +1 -1
  6. package/dist/data-object-factories/dataObjectFactory.js.map +1 -1
  7. package/dist/data-object-factories/pureDataObjectFactory.d.ts +8 -8
  8. package/dist/data-object-factories/pureDataObjectFactory.d.ts.map +1 -1
  9. package/dist/data-object-factories/pureDataObjectFactory.js.map +1 -1
  10. package/dist/data-objects/index.d.ts +1 -1
  11. package/dist/data-objects/index.d.ts.map +1 -1
  12. package/dist/data-objects/index.js.map +1 -1
  13. package/dist/data-objects/pureDataObject.d.ts +16 -21
  14. package/dist/data-objects/pureDataObject.d.ts.map +1 -1
  15. package/dist/data-objects/pureDataObject.js +7 -23
  16. package/dist/data-objects/pureDataObject.js.map +1 -1
  17. package/dist/data-objects/types.d.ts +2 -7
  18. package/dist/data-objects/types.d.ts.map +1 -1
  19. package/dist/data-objects/types.js.map +1 -1
  20. package/dist/test/tsconfig.tsbuildinfo +32 -138
  21. package/dist/utils/containerInteractions.d.ts +4 -4
  22. package/dist/utils/containerInteractions.d.ts.map +1 -1
  23. package/dist/utils/containerInteractions.js.map +1 -1
  24. package/lib/container-services/containerServices.js.map +1 -1
  25. package/lib/data-object-factories/dataObjectFactory.js.map +1 -1
  26. package/lib/data-object-factories/pureDataObjectFactory.js.map +1 -1
  27. package/lib/data-objects/index.js.map +1 -1
  28. package/lib/data-objects/pureDataObject.js +7 -23
  29. package/lib/data-objects/pureDataObject.js.map +1 -1
  30. package/lib/data-objects/types.js.map +1 -1
  31. package/lib/utils/containerInteractions.js.map +1 -1
  32. package/package.json +15 -15
@@ -537,8 +537,8 @@
537
537
  "affectsGlobalScope": false
538
538
  },
539
539
  "../../../../../node_modules/@fluidframework/container-definitions/dist/runtime.d.ts": {
540
- "version": "473255881f89181920c6f65bdc33cb57639240a7934ea3304f2d20c8f3b24ca8",
541
- "signature": "473255881f89181920c6f65bdc33cb57639240a7934ea3304f2d20c8f3b24ca8",
540
+ "version": "26c98bfa706fffbaf75ec5795c3f28914613246702c394ee016f781a9bea03f4",
541
+ "signature": "26c98bfa706fffbaf75ec5795c3f28914613246702c394ee016f781a9bea03f4",
542
542
  "affectsGlobalScope": false
543
543
  },
544
544
  "../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/chaincode.d.ts": {
@@ -562,8 +562,8 @@
562
562
  "affectsGlobalScope": false
563
563
  },
564
564
  "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts": {
565
- "version": "355d4c8a667da051a5b56d78367696df9aa5026619021ff7f65734c5fa68a16f",
566
- "signature": "355d4c8a667da051a5b56d78367696df9aa5026619021ff7f65734c5fa68a16f",
565
+ "version": "eff90c8fb7521204ef889ea0684748a7ff8a1b62a7e0cc23ace822a96d1bff44",
566
+ "signature": "eff90c8fb7521204ef889ea0684748a7ff8a1b62a7e0cc23ace822a96d1bff44",
567
567
  "affectsGlobalScope": false
568
568
  },
569
569
  "../../../../runtime/runtime-definitions/dist/garbageCollection.d.ts": {
@@ -582,13 +582,13 @@
582
582
  "affectsGlobalScope": false
583
583
  },
584
584
  "../../../../runtime/runtime-definitions/dist/dataStoreContext.d.ts": {
585
- "version": "8024f017b2b6f63d677f8745385686c279fc7a7ba16e134044cc80cab754c340",
586
- "signature": "8024f017b2b6f63d677f8745385686c279fc7a7ba16e134044cc80cab754c340",
585
+ "version": "e1ba1e707ed1b2d3cee85d4d37da9d40bb89adf5266c9220133d73b28bb6a79a",
586
+ "signature": "e1ba1e707ed1b2d3cee85d4d37da9d40bb89adf5266c9220133d73b28bb6a79a",
587
587
  "affectsGlobalScope": false
588
588
  },
589
589
  "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts": {
590
- "version": "2a55461732c804903dc710da278eaeccb85c1ec6bf1178b96d64a941264e0dbf",
591
- "signature": "2a55461732c804903dc710da278eaeccb85c1ec6bf1178b96d64a941264e0dbf",
590
+ "version": "bcb2b5ec9bb438a4a2ec0b66e7c623ed32784dedc3ef49b6ef48c700085dd803",
591
+ "signature": "bcb2b5ec9bb438a4a2ec0b66e7c623ed32784dedc3ef49b6ef48c700085dd803",
592
592
  "affectsGlobalScope": false
593
593
  },
594
594
  "../../../../runtime/runtime-definitions/dist/index.d.ts": {
@@ -597,8 +597,8 @@
597
597
  "affectsGlobalScope": false
598
598
  },
599
599
  "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts": {
600
- "version": "25b17a9b2a85ef22c4d68e2854eb62965097519f3eb93554f73441bda318a763",
601
- "signature": "25b17a9b2a85ef22c4d68e2854eb62965097519f3eb93554f73441bda318a763",
600
+ "version": "0e368dbd4c727af2fa8b246fa54574abc97a11b81d185304e464bb715bc78064",
601
+ "signature": "0e368dbd4c727af2fa8b246fa54574abc97a11b81d185304e464bb715bc78064",
602
602
  "affectsGlobalScope": false
603
603
  },
604
604
  "../../../../runtime/container-runtime-definitions/dist/index.d.ts": {
@@ -717,8 +717,8 @@
717
717
  "affectsGlobalScope": false
718
718
  },
719
719
  "../container-services/containerServices.d.ts": {
720
- "version": "87eef33abe98506414e223d1564466240006d2688739b198d46b3dc5f8e183ce",
721
- "signature": "87eef33abe98506414e223d1564466240006d2688739b198d46b3dc5f8e183ce",
720
+ "version": "ba92aeb236b7772678af8fb07bb94c60f4a80b0cfbca187b782cdbb3da865951",
721
+ "signature": "ba92aeb236b7772678af8fb07bb94c60f4a80b0cfbca187b782cdbb3da865951",
722
722
  "affectsGlobalScope": false
723
723
  },
724
724
  "../container-services/index.d.ts": {
@@ -737,8 +737,8 @@
737
737
  "affectsGlobalScope": false
738
738
  },
739
739
  "../../../view-interfaces/dist/mountableView.d.ts": {
740
- "version": "9b30de49f7a5aabaa420c2496125638fac3b889c7f7655cc2c8001a90073f335",
741
- "signature": "9b30de49f7a5aabaa420c2496125638fac3b889c7f7655cc2c8001a90073f335",
740
+ "version": "d222657ed86e3666f87d8dfea01469fd3bb844672c2e1325b0eb72abd4d44ec4",
741
+ "signature": "d222657ed86e3666f87d8dfea01469fd3bb844672c2e1325b0eb72abd4d44ec4",
742
742
  "affectsGlobalScope": false
743
743
  },
744
744
  "../../../view-interfaces/dist/index.d.ts": {
@@ -817,11 +817,7 @@
817
817
  "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
818
818
  "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
819
819
  "../../../../../node_modules/@fluidframework/protocol-definitions/dist/index.d.ts",
820
- "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts",
821
- "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts",
822
- "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts",
823
- "../../../view-interfaces/dist/htmlView.d.ts",
824
- "../../../view-interfaces/dist/mountableView.d.ts"
820
+ "../../../view-interfaces/dist/htmlView.d.ts"
825
821
  ],
826
822
  "../../../../../node_modules/@fluidframework/container-definitions/dist/error.d.ts": [
827
823
  "../../../../../node_modules/@fluidframework/common-definitions/dist/index.d.ts"
@@ -848,11 +844,7 @@
848
844
  "../../../../../node_modules/@fluidframework/container-definitions/dist/runtime.d.ts",
849
845
  "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
850
846
  "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
851
- "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts",
852
- "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts",
853
- "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts",
854
- "../../../view-interfaces/dist/htmlView.d.ts",
855
- "../../../view-interfaces/dist/mountableView.d.ts"
847
+ "../../../view-interfaces/dist/htmlView.d.ts"
856
848
  ],
857
849
  "../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts": [
858
850
  "../../../../../node_modules/@fluidframework/common-definitions/dist/index.d.ts",
@@ -866,11 +858,7 @@
866
858
  "../../../../../node_modules/@fluidframework/driver-definitions/dist/index.d.ts",
867
859
  "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
868
860
  "../../../../../node_modules/@fluidframework/protocol-definitions/dist/index.d.ts",
869
- "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts",
870
- "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts",
871
- "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts",
872
- "../../../view-interfaces/dist/htmlView.d.ts",
873
- "../../../view-interfaces/dist/mountableView.d.ts"
861
+ "../../../view-interfaces/dist/htmlView.d.ts"
874
862
  ],
875
863
  "../../../../../node_modules/@fluidframework/container-definitions/dist/proxyLoader.d.ts": [
876
864
  "../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
@@ -928,11 +916,7 @@
928
916
  "../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/chaincode.d.ts",
929
917
  "../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
930
918
  "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
931
- "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts",
932
- "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts",
933
- "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts",
934
- "../../../view-interfaces/dist/htmlView.d.ts",
935
- "../../../view-interfaces/dist/mountableView.d.ts"
919
+ "../../../view-interfaces/dist/htmlView.d.ts"
936
920
  ],
937
921
  "../../../../../node_modules/@fluidframework/protocol-definitions/dist/clients.d.ts": [
938
922
  "../../../../../node_modules/@fluidframework/protocol-definitions/dist/users.d.ts"
@@ -1241,42 +1225,22 @@
1241
1225
  "../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/chaincode.d.ts",
1242
1226
  "../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
1243
1227
  "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
1244
- "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
1245
- "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts",
1246
- "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts",
1247
- "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts",
1248
- "../../../view-interfaces/dist/mountableView.d.ts"
1228
+ "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts"
1249
1229
  ],
1250
1230
  "../../../view-interfaces/dist/index.d.ts": [
1251
1231
  "../../../view-interfaces/dist/htmlView.d.ts",
1252
1232
  "../../../view-interfaces/dist/mountableView.d.ts"
1253
1233
  ],
1254
1234
  "../../../view-interfaces/dist/mountableView.d.ts": [
1255
- "../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
1256
- "../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/chaincode.d.ts",
1257
- "../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
1258
- "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
1259
- "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
1260
- "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts",
1261
- "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts",
1262
- "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts",
1263
- "../../../view-interfaces/dist/htmlView.d.ts"
1235
+ "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts"
1264
1236
  ],
1265
1237
  "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts": [
1266
1238
  "../../../../../node_modules/@fluidframework/common-definitions/dist/index.d.ts",
1267
- "../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
1268
1239
  "../../../../../node_modules/@fluidframework/container-definitions/dist/index.d.ts",
1269
- "../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/chaincode.d.ts",
1270
- "../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
1271
1240
  "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
1272
1241
  "../../../../../node_modules/@fluidframework/driver-definitions/dist/index.d.ts",
1273
- "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
1274
1242
  "../../../../../node_modules/@fluidframework/protocol-definitions/dist/index.d.ts",
1275
- "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts",
1276
- "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts",
1277
- "../../../../runtime/runtime-definitions/dist/index.d.ts",
1278
- "../../../view-interfaces/dist/htmlView.d.ts",
1279
- "../../../view-interfaces/dist/mountableView.d.ts"
1243
+ "../../../../runtime/runtime-definitions/dist/index.d.ts"
1280
1244
  ],
1281
1245
  "../../../../runtime/container-runtime-definitions/dist/index.d.ts": [
1282
1246
  "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts"
@@ -1320,27 +1284,10 @@
1320
1284
  "../../../../runtime/runtime-definitions/dist/summary.d.ts"
1321
1285
  ],
1322
1286
  "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts": [
1323
- "../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
1324
- "../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/chaincode.d.ts",
1325
- "../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
1326
- "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
1327
- "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
1328
- "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts",
1329
- "../../../../runtime/runtime-definitions/dist/dataStoreContext.d.ts",
1330
- "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts",
1331
- "../../../view-interfaces/dist/htmlView.d.ts",
1332
- "../../../view-interfaces/dist/mountableView.d.ts"
1287
+ "../../../../runtime/runtime-definitions/dist/dataStoreContext.d.ts"
1333
1288
  ],
1334
1289
  "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts": [
1335
- "../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
1336
- "../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/chaincode.d.ts",
1337
- "../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
1338
- "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
1339
- "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
1340
- "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts",
1341
- "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts",
1342
- "../../../view-interfaces/dist/htmlView.d.ts",
1343
- "../../../view-interfaces/dist/mountableView.d.ts"
1290
+ "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts"
1344
1291
  ],
1345
1292
  "../../../../runtime/runtime-definitions/dist/index.d.ts": [
1346
1293
  "../../../../runtime/runtime-definitions/dist/dataStoreContext.d.ts",
@@ -1443,11 +1390,7 @@
1443
1390
  "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
1444
1391
  "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
1445
1392
  "../../../../../node_modules/@fluidframework/protocol-definitions/dist/index.d.ts",
1446
- "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts",
1447
- "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts",
1448
- "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts",
1449
- "../../../view-interfaces/dist/htmlView.d.ts",
1450
- "../../../view-interfaces/dist/mountableView.d.ts"
1393
+ "../../../view-interfaces/dist/htmlView.d.ts"
1451
1394
  ],
1452
1395
  "../../../../../node_modules/@fluidframework/container-definitions/dist/error.d.ts": [
1453
1396
  "../../../../../node_modules/@fluidframework/common-definitions/dist/index.d.ts"
@@ -1474,11 +1417,7 @@
1474
1417
  "../../../../../node_modules/@fluidframework/container-definitions/dist/runtime.d.ts",
1475
1418
  "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
1476
1419
  "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
1477
- "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts",
1478
- "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts",
1479
- "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts",
1480
- "../../../view-interfaces/dist/htmlView.d.ts",
1481
- "../../../view-interfaces/dist/mountableView.d.ts"
1420
+ "../../../view-interfaces/dist/htmlView.d.ts"
1482
1421
  ],
1483
1422
  "../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts": [
1484
1423
  "../../../../../node_modules/@fluidframework/common-definitions/dist/index.d.ts",
@@ -1492,11 +1431,7 @@
1492
1431
  "../../../../../node_modules/@fluidframework/driver-definitions/dist/index.d.ts",
1493
1432
  "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
1494
1433
  "../../../../../node_modules/@fluidframework/protocol-definitions/dist/index.d.ts",
1495
- "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts",
1496
- "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts",
1497
- "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts",
1498
- "../../../view-interfaces/dist/htmlView.d.ts",
1499
- "../../../view-interfaces/dist/mountableView.d.ts"
1434
+ "../../../view-interfaces/dist/htmlView.d.ts"
1500
1435
  ],
1501
1436
  "../../../../../node_modules/@fluidframework/container-definitions/dist/proxyLoader.d.ts": [
1502
1437
  "../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
@@ -1554,11 +1489,7 @@
1554
1489
  "../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/chaincode.d.ts",
1555
1490
  "../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
1556
1491
  "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
1557
- "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts",
1558
- "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts",
1559
- "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts",
1560
- "../../../view-interfaces/dist/htmlView.d.ts",
1561
- "../../../view-interfaces/dist/mountableView.d.ts"
1492
+ "../../../view-interfaces/dist/htmlView.d.ts"
1562
1493
  ],
1563
1494
  "../../../../../node_modules/@fluidframework/protocol-definitions/dist/clients.d.ts": [
1564
1495
  "../../../../../node_modules/@fluidframework/protocol-definitions/dist/users.d.ts"
@@ -1851,42 +1782,22 @@
1851
1782
  "../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/chaincode.d.ts",
1852
1783
  "../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
1853
1784
  "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
1854
- "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
1855
- "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts",
1856
- "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts",
1857
- "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts",
1858
- "../../../view-interfaces/dist/mountableView.d.ts"
1785
+ "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts"
1859
1786
  ],
1860
1787
  "../../../view-interfaces/dist/index.d.ts": [
1861
1788
  "../../../view-interfaces/dist/htmlView.d.ts",
1862
1789
  "../../../view-interfaces/dist/mountableView.d.ts"
1863
1790
  ],
1864
1791
  "../../../view-interfaces/dist/mountableView.d.ts": [
1865
- "../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
1866
- "../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/chaincode.d.ts",
1867
- "../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
1868
- "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
1869
- "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
1870
- "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts",
1871
- "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts",
1872
- "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts",
1873
- "../../../view-interfaces/dist/htmlView.d.ts"
1792
+ "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts"
1874
1793
  ],
1875
1794
  "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts": [
1876
1795
  "../../../../../node_modules/@fluidframework/common-definitions/dist/index.d.ts",
1877
- "../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
1878
1796
  "../../../../../node_modules/@fluidframework/container-definitions/dist/index.d.ts",
1879
- "../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/chaincode.d.ts",
1880
- "../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
1881
1797
  "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
1882
1798
  "../../../../../node_modules/@fluidframework/driver-definitions/dist/index.d.ts",
1883
- "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
1884
1799
  "../../../../../node_modules/@fluidframework/protocol-definitions/dist/index.d.ts",
1885
- "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts",
1886
- "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts",
1887
- "../../../../runtime/runtime-definitions/dist/index.d.ts",
1888
- "../../../view-interfaces/dist/htmlView.d.ts",
1889
- "../../../view-interfaces/dist/mountableView.d.ts"
1800
+ "../../../../runtime/runtime-definitions/dist/index.d.ts"
1890
1801
  ],
1891
1802
  "../../../../runtime/container-runtime-definitions/dist/index.d.ts": [
1892
1803
  "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts"
@@ -1930,27 +1841,10 @@
1930
1841
  "../../../../runtime/runtime-definitions/dist/summary.d.ts"
1931
1842
  ],
1932
1843
  "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts": [
1933
- "../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
1934
- "../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/chaincode.d.ts",
1935
- "../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
1936
- "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
1937
- "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
1938
- "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts",
1939
- "../../../../runtime/runtime-definitions/dist/dataStoreContext.d.ts",
1940
- "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts",
1941
- "../../../view-interfaces/dist/htmlView.d.ts",
1942
- "../../../view-interfaces/dist/mountableView.d.ts"
1844
+ "../../../../runtime/runtime-definitions/dist/dataStoreContext.d.ts"
1943
1845
  ],
1944
1846
  "../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts": [
1945
- "../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
1946
- "../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/chaincode.d.ts",
1947
- "../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
1948
- "../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
1949
- "../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
1950
- "../../../../runtime/container-runtime-definitions/dist/containerRuntime.d.ts",
1951
- "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts",
1952
- "../../../view-interfaces/dist/htmlView.d.ts",
1953
- "../../../view-interfaces/dist/mountableView.d.ts"
1847
+ "../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts"
1954
1848
  ],
1955
1849
  "../../../../runtime/runtime-definitions/dist/index.d.ts": [
1956
1850
  "../../../../runtime/runtime-definitions/dist/dataStoreContext.d.ts",
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { FluidObject, IFluidObject } from "@fluidframework/core-interfaces";
5
+ import { FluidObject } from "@fluidframework/core-interfaces";
6
6
  import { IContainer } from "@fluidframework/container-definitions";
7
7
  /**
8
8
  * Helper function for getting the default Fluid Object from a Container. This function only works for
@@ -12,7 +12,7 @@ import { IContainer } from "@fluidframework/container-definitions";
12
12
  *
13
13
  * @param container - Container you're attempting to get the object from
14
14
  */
15
- export declare function getDefaultObjectFromContainer<T = IFluidObject & FluidObject>(container: IContainer): Promise<T>;
15
+ export declare function getDefaultObjectFromContainer<T = FluidObject>(container: IContainer): Promise<T>;
16
16
  /**
17
17
  * Helper function for getting as Fluid Object from a Container given a Unique Id. This function only works for
18
18
  * Containers that support getting FluidObjects via request.
@@ -22,7 +22,7 @@ export declare function getDefaultObjectFromContainer<T = IFluidObject & FluidOb
22
22
  * @param id - Unique id of the FluidObject
23
23
  * @param container - Container you're attempting to get the object from
24
24
  */
25
- export declare function getObjectWithIdFromContainer<T = IFluidObject & FluidObject>(id: string, container: IContainer): Promise<T>;
25
+ export declare function getObjectWithIdFromContainer<T = FluidObject>(id: string, container: IContainer): Promise<T>;
26
26
  /**
27
27
  * Helper function for getting a Fluid Object from a Container given a path/url. This function only works for
28
28
  * Containers that support getting FluidObjects via request.
@@ -32,5 +32,5 @@ export declare function getObjectWithIdFromContainer<T = IFluidObject & FluidObj
32
32
  * @param path - Unique path/url of the FluidObject
33
33
  * @param container - Container you're attempting to get the object from
34
34
  */
35
- export declare function getObjectFromContainer<T = IFluidObject & FluidObject>(path: string, container: IContainer): Promise<T>;
35
+ export declare function getObjectFromContainer<T = FluidObject>(path: string, container: IContainer): Promise<T>;
36
36
  //# sourceMappingURL=containerInteractions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"containerInteractions.d.ts","sourceRoot":"","sources":["../../src/utils/containerInteractions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAEnE;;;;;;;GAOG;AACH,wBAAsB,6BAA6B,CAAC,CAAC,GAAG,YAAY,GAAG,WAAW,EAAE,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,CAarH;AAED;;;;;;;;GAQG;AACH,wBAAsB,4BAA4B,CAAC,CAAC,GAAG,YAAY,GAAG,WAAW,EAC7E,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,CAajD;AAED;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAAC,CAAC,GAAG,YAAY,GAAG,WAAW,EACvE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,CAWnD"}
1
+ {"version":3,"file":"containerInteractions.d.ts","sourceRoot":"","sources":["../../src/utils/containerInteractions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAEnE;;;;;;;GAOG;AACH,wBAAsB,6BAA6B,CAAC,CAAC,GAAG,WAAW,EAAE,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,CAatG;AAED;;;;;;;;GAQG;AACH,wBAAsB,4BAA4B,CAAC,CAAC,GAAG,WAAW,EAC9D,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,CAajD;AAED;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAAC,CAAC,GAAG,WAAW,E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,CAAC,CAAC;KACxE;IAED,+DAA+D;IAC/D,OAAO,QAAQ,CAAC,KAAK,CAAC;AAC1B,CAAC;AAdD,oEAcC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,sBAAsB,CACxC,IAAY,EAAE,SAAqB;IACnC,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;IAExD,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,QAAQ,KAAK,cAAc,EAAE;QACjE,MAAM,IAAI,KAAK,CAAC,mDAAmD,IAAI,GAAG,CAAC,CAAC;KAC/E;SAAM,IAAI,QAAQ,CAAC,KAAK,KAAK,SAAS,EAAE;QACrC,MAAM,IAAI,KAAK,CAAC,iCAAiC,IAAI,GAAG,CAAC,CAAC;KAC7D;IAED,+DAA+D;IAC/D,OAAO,QAAQ,CAAC,KAAK,CAAC;AAC1B,CAAC;AAZD,wDAYC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { FluidObject, IFluidObject } from \"@fluidframework/core-interfaces\";\nimport { IContainer } from \"@fluidframework/container-definitions\";\n\n/**\n * Helper function for getting the default Fluid Object from a Container. This function only works for\n * Containers that support \"/\" request.\n *\n * T - defines the type you expect to be returned\n *\n * @param container - Container you're attempting to get the object from\n */\nexport async function getDefaultObjectFromContainer<T = IFluidObject & FluidObject>(container: IContainer): Promise<T> {\n const url = \"/\";\n const response = await container.request({ url });\n\n // Verify the response\n if (response.status !== 200 || response.mimeType !== \"fluid/object\") {\n throw new Error(`Unable to retrieve Fluid object at URL: \"${url}\"`);\n } else if (response.value === undefined) {\n throw new Error(`Empty response from URL: \"${url}\"`);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return response.value;\n}\n\n/**\n * Helper function for getting as Fluid Object from a Container given a Unique Id. This function only works for\n * Containers that support getting FluidObjects via request.\n *\n * T - defines the type you expect to be returned\n *\n * @param id - Unique id of the FluidObject\n * @param container - Container you're attempting to get the object from\n */\nexport async function getObjectWithIdFromContainer<T = IFluidObject & FluidObject>(\n id: string, container: IContainer): Promise<T> {\n const url = `/${id}`;\n const response = await container.request({ url });\n\n // Verify the response\n if (response.status !== 200 || response.mimeType !== \"fluid/object\") {\n throw new Error(`Unable to retrieve Fluid object with ID: \"${id}\" from URL: \"${url}\"`);\n } else if (response.value === undefined) {\n throw new Error(`Empty response for ID: \"${id}\" from URL: \"${url}\"`);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return response.value;\n}\n\n/**\n * Helper function for getting a Fluid Object from a Container given a path/url. This function only works for\n * Containers that support getting FluidObjects via request.\n *\n * T - defines the type you expect to be returned\n *\n * @param path - Unique path/url of the FluidObject\n * @param container - Container you're attempting to get the object from\n */\nexport async function getObjectFromContainer<T = IFluidObject & FluidObject>(\n path: string, container: IContainer): Promise<T> {\n const response = await container.request({ url: path });\n\n if (response.status !== 200 || response.mimeType !== \"fluid/object\") {\n throw new Error(`Unable to retrieve Fluid object with from URL: \"${path}\"`);\n } else if (response.value === undefined) {\n throw new Error(`Empty response for from URL: \"${path}\"`);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return response.value;\n}\n"]}
1
+ {"version":3,"file":"containerInteractions.js","sourceRoot":"","sources":["../../src/utils/containerInteractions.ts"],"names":[],"mappings":";;;AAOA;;;;;;;GAOG;AACI,KAAK,UAAU,6BAA6B,CAAkB,SAAqB;IACtF,MAAM,GAAG,GAAG,GAAG,CAAC;IAChB,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;IAElD,sBAAsB;IACtB,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,QAAQ,KAAK,cAAc,EAAE;QACjE,MAAM,IAAI,KAAK,CAAC,4CAA4C,GAAG,GAAG,CAA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AAG,CAAC,CAAC;KAC7D;IAED,+DAA+D;IAC/D,OAAO,QAAQ,CAAC,KAAK,CAAC;AAC1B,CAAC;AAZD,wDAYC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { FluidObject } from \"@fluidframework/core-interfaces\";\nimport { IContainer } from \"@fluidframework/container-definitions\";\n\n/**\n * Helper function for getting the default Fluid Object from a Container. This function only works for\n * Containers that support \"/\" request.\n *\n * T - defines the type you expect to be returned\n *\n * @param container - Container you're attempting to get the object from\n */\nexport async function getDefaultObjectFromContainer<T = FluidObject>(container: IContainer): Promise<T> {\n const url = \"/\";\n const response = await container.request({ url });\n\n // Verify the response\n if (response.status !== 200 || response.mimeType !== \"fluid/object\") {\n throw new Error(`Unable to retrieve Fluid object at URL: \"${url}\"`);\n } else if (response.value === undefined) {\n throw new Error(`Empty response from URL: \"${url}\"`);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return response.value;\n}\n\n/**\n * Helper function for getting as Fluid Object from a Container given a Unique Id. This function only works for\n * Containers that support getting FluidObjects via request.\n *\n * T - defines the type you expect to be returned\n *\n * @param id - Unique id of the FluidObject\n * @param container - Container you're attempting to get the object from\n */\nexport async function getObjectWithIdFromContainer<T = FluidObject>(\n id: string, container: IContainer): Promise<T> {\n const url = `/${id}`;\n const response = await container.request({ url });\n\n // Verify the response\n if (response.status !== 200 || response.mimeType !== \"fluid/object\") {\n throw new Error(`Unable to retrieve Fluid object with ID: \"${id}\" from URL: \"${url}\"`);\n } else if (response.value === undefined) {\n throw new Error(`Empty response for ID: \"${id}\" from URL: \"${url}\"`);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return response.value;\n}\n\n/**\n * Helper function for getting a Fluid Object from a Container given a path/url. This function only works for\n * Containers that support getting FluidObjects via request.\n *\n * T - defines the type you expect to be returned\n *\n * @param path - Unique path/url of the FluidObject\n * @param container - Container you're attempting to get the object from\n */\nexport async function getObjectFromContainer<T = FluidObject>(\n path: string, container: IContainer): Promise<T> {\n const response = await container.request({ url: path });\n\n if (response.status !== 200 || response.mimeType !== \"fluid/object\") {\n throw new Error(`Unable to retrieve Fluid object with from URL: \"${path}\"`);\n } else if (response.value === undefined) {\n throw new Error(`Empty response for from URL: \"${path}\"`);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return response.value;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"containerServices.js","sourceRoot":"","sources":["../../src/container-services/containerServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAEH,iBAAiB,EACjB,mBAAmB,GACtB,MAAM,+BAA+B,CAAC;AAEvC,iCAAiC;AACjC,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;AAKhD;;GAEG;AACH,MAAM,OAAgB,oBAAoB;IAGtC,YAA+B,OAA0B;QAA1B,YAAO,GAAP,OAAO,CAAmB;IACzD,CAAC;IAHD,IAAW,YAAY,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC;IAKnC,KAAK,CAAC,OAAO,CAAC,OAAiB;QAClC,OAAO;YACH,MAAM,EAAE,GAAG;YACX,QAAQ,EAAE,cAAc;YACxB,KAAK,EAAE,IAAI;SACd,CAAC;IACN,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,gCAAgC;IAGlC,YACqB,SAA+D;QAA/D,cAAS,GAAT,SAAS,CAAsD;IAChF,CAAC;IAEE,KAAK,CAAC,UAAU,CAAC,OAA0B;QAC9C,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;SAC1C;QACD,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;CACJ;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAChD,CAAC,eAAgD,EAAyB,EAAE;IACxE,MAAM,SAAS,GAAkD,IAAI,GAAG,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AK,EAAE,OAAO;SACjB,CAAC;IACN,CAAC,CAAC;AACN,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResponse, IFluidObject, IFluidRouter, IRequest, FluidObject } from \"@fluidframework/core-interfaces\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { RuntimeRequestHandler } from \"@fluidframework/request-handler\";\nimport {\n RequestParser,\n create404Response,\n createResponseError,\n} from \"@fluidframework/runtime-utils\";\n\n// TODO: should this just be \"s\"?\nexport const serviceRoutePathRoot = \"_services\";\n\nexport type ContainerServiceRegistryEntries = Iterable<[string, (runtime: IContainerRuntime) =>\n Promise<IFluidObject & FluidObject>]>;\n\n/**\n * This class is a simple starter class for building a Container Service. It simply provides routing\n */\nexport abstract class BaseContainerService implements IFluidRouter {\n public get IFluidRouter() { return this; }\n\n constructor(protected readonly runtime: IContainerRuntime) {\n }\n\n public async request(request: IRequest): Promise<IResponse> {\n return {\n status: 200,\n mimeType: \"fluid/object\",\n value: this,\n };\n }\n}\n\n/**\n * ContainerService Factory that will only create one instance of the service for the Container.\n */\nclass SingletonContainerServiceFactory {\n private service: Promise<FluidObject> | undefined;\n\n public constructor(\n private readonly serviceFn: (runtime: IContainerRuntime) => Promise<FluidObject>,\n ) { }\n\n public async getService(runtime: IContainerRuntime): Promise<IFluidObject & FluidObject> {\n if (!this.service) {\n this.service = this.serviceFn(runtime);\n }\n return this.service;\n }\n}\n\n/**\n * Given a collection of IContainerServices will produce a RequestHandler for them all\n * @param serviceRegistry - Collection of Container Services\n */\nexport const generateContainerServicesRequestHandler =\n (serviceRegistry: ContainerServiceRegistryEntries): RuntimeRequestHandler => {\n const factories: Map<string, SingletonContainerServiceFactory> = new Map();\n new Map(serviceRegistry).forEach((fn, id) => {\n factories.set(id, new SingletonContainerServiceFactory(fn));\n });\n\n return async (request: RequestParser, runtime: IContainerRuntime) => {\n if (request.pathParts[0] !== serviceRoutePathRoot) {\n // If the request is not for a service we return undefined so the next handler can use it\n return undefined;\n }\n\n if (request.pathParts.length < 2) {\n // If there is not service to route to then return a failure\n return createResponseError(400, \"request did not specify a service to route to\", request);\n }\n\n const factory = factories.get(request.pathParts[1]);\n if (!factory) {\n // If we can't find a registry entry then return\n return create404Response(request);\n }\n\n const service = await factory.getService(runtime);\n const router = service.IFluidRouter;\n const subRequest = request.createSubRequest(2);\n if (router) {\n return router.request(subRequest);\n }\n\n if (!request.isLeaf(2)) {\n // If there is not terminating route but a sub-route was requested then we will fail.\n return createResponseError(400, \"request sub-url for service that doesn't support routing\", request);\n }\n\n // Otherwise we will just return the service\n return {\n status: 200,\n mimeType: \"fluid/object\",\n value: service,\n };\n };\n };\n"]}
1
+ {"version":3,"file":"containerServices.js","sourceRoot":"","sources":["../../src/container-services/containerServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAEH,iBAAiB,EACjB,mBAAmB,GACtB,MAAM,+BAA+B,CAAC;AAEvC,iCAAiC;AACjC,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;AAKhD;;GAEG;AACH,MAAM,OAAgB,oBAAoB;IAGtC,YAA+B,OAA0B;QAA1B,YAAO,GAAP,OAAO,CAAmB;IACzD,CAAC;IAHD,IAAW,YAAY,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC;IAKnC,KAAK,CAAC,OAAO,CAAC,OAAiB;QAClC,OAAO;YACH,MAAM,EAAE,GAAG;YACX,QAAQ,EAAE,cAAc;YACxB,KAAK,EAAE,IAAI;SACd,CAAC;IACN,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,gCAAgC;IAGlC,YACqB,SAA+D;QAA/D,cAAS,GAAT,SAAS,CAAsD;IAChF,CAAC;IAEE,KAAK,CAAC,UAAU,CAAC,OAA0B;QAC9C,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC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C,CAAC,CAAC,EAAE;YACpB,qFAAqF;YACrF,OAAO,mBAAmB,CAAC,GAAG,EAAE,0DAA0D,EAAE,OAAO,CAAC,CAAC;SACxG;QAED,4CAA4C;QAC5C,OAAO;YACH,MAAM,EAAE,GAAG;YACX,QAAQ,EAAE,cAAc;YACxB,KAAK,EAAE,OAAO;SACjB,CAAC;IACN,CAAC,CAAC;AACN,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResponse, IFluidRouter, IRequest, FluidObject } from \"@fluidframework/core-interfaces\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { RuntimeRequestHandler } from \"@fluidframework/request-handler\";\nimport {\n RequestParser,\n create404Response,\n createResponseError,\n} from \"@fluidframework/runtime-utils\";\n\n// TODO: should this just be \"s\"?\nexport const serviceRoutePathRoot = \"_services\";\n\nexport type ContainerServiceRegistryEntries = Iterable<[string, (runtime: IContainerRuntime) =>\n Promise<FluidObject>]>;\n\n/**\n * This class is a simple starter class for building a Container Service. It simply provides routing\n */\nexport abstract class BaseContainerService implements IFluidRouter {\n public get IFluidRouter() { return this; }\n\n constructor(protected readonly runtime: IContainerRuntime) {\n }\n\n public async request(request: IRequest): Promise<IResponse> {\n return {\n status: 200,\n mimeType: \"fluid/object\",\n value: this,\n };\n }\n}\n\n/**\n * ContainerService Factory that will only create one instance of the service for the Container.\n */\nclass SingletonContainerServiceFactory {\n private service: Promise<FluidObject> | undefined;\n\n public constructor(\n private readonly serviceFn: (runtime: IContainerRuntime) => Promise<FluidObject>,\n ) { }\n\n public async getService(runtime: IContainerRuntime): Promise<FluidObject<IFluidRouter>> {\n if (!this.service) {\n this.service = this.serviceFn(runtime);\n }\n return this.service;\n }\n}\n\n/**\n * Given a collection of IContainerServices will produce a RequestHandler for them all\n * @param serviceRegistry - Collection of Container Services\n */\nexport const generateContainerServicesRequestHandler =\n (serviceRegistry: ContainerServiceRegistryEntries): RuntimeRequestHandler => {\n const factories: Map<string, SingletonContainerServiceFactory> = new Map();\n new Map(serviceRegistry).forEach((fn, id) => {\n factories.set(id, new SingletonContainerServiceFactory(fn));\n });\n\n return async (request: RequestParser, runtime: IContainerRuntime) => {\n if (request.pathParts[0] !== serviceRoutePathRoot) {\n // If the request is not for a service we return undefined so the next handler can use it\n return undefined;\n }\n\n if (request.pathParts.length < 2) {\n // If there is not service to route to then return a failure\n return createResponseError(400, \"request did not specify a service to route to\", request);\n }\n\n const factory = factories.get(request.pathParts[1]);\n if (!factory) {\n // If we can't find a registry entry then return\n return create404Response(request);\n }\n\n const service = await factory.getService(runtime);\n const router = service.IFluidRouter;\n const subRequest = request.createSubRequest(2);\n if (router) {\n return router.request(subRequest);\n }\n\n if (!request.isLeaf(2)) {\n // If there is not terminating route but a sub-route was requested then we will fail.\n return createResponseError(400, \"request sub-url for service that doesn't support routing\", request);\n }\n\n // Otherwise we will just return the service\n return {\n status: 200,\n mimeType: \"fluid/object\",\n value: service,\n };\n };\n };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"dataObjectFactory.js","sourceRoot":"","sources":["../../src/data-object-factories/dataObjectFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,SAAS,GACZ,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;;;GAOG;AACH,MAAM,OAAO,iBACT,SAAQ,qBAA8B;IAEtC,YACI,IAAY,EACZ,IAA8C,EAC9C,gBAA4C,EAAE,EAC9C,iBAAoF,EACpF,eAAoD,EACpD,iBAA+C,qBAAqB;QAEpE,MAAM,aAAa,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC;QAEzC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,gBAAgB,CAAC,IAAI,CAAC,EAAE;YAC1E,sCAAsC;YACtC,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,CAAC;SACpD;QAED,0GAA0G;QAC1G,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI,CAAC,EAAE;YACpE,gCAAgC;YAChC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,CAAC;SAC9C;QAED,KAAK,CACD,IAAI,EACJ,IAAI,EACJ,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,cAAc,CACjB,CAAC;IACN,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n DirectoryFactory,\n MapFactory,\n SharedDirectory,\n SharedMap,\n} from \"@fluidframework/map\";\nimport {\n NamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\nimport { IChannelFactory } from \"@fluidframework/datastore-definitions\";\nimport { FluidObjectSymbolProvider } from \"@fluidframework/synthesize\";\nimport { FluidDataStoreRuntime } from \"@fluidframework/datastore\";\n\nimport { DataObject, DataObjectTypes, DataObjectType, IDataObjectProps } from \"../data-objects\";\nimport { PureDataObjectFactory } from \"./pureDataObjectFactory\";\n\n/**\n * DataObjectFactory is the IFluidDataStoreFactory for use with DataObjects.\n * It facilitates DataObject's features (such as its shared directory) by\n * ensuring relevant shared objects etc are available to the factory.\n *\n * @typeParam TObj - DataObject (concrete type)\n * @typeParam I - The input types for the DataObject\n */\nexport class DataObjectFactory<TObj extends DataObject<I>, I extends DataObjectTypes = DataObjectTypes>\n extends PureDataObjectFactory<TObj, I>\n{\n constructor(\n type: string,\n ctor: new (props: IDataObjectProps<I>) => TObj,\n sharedObjects: readonly IChannelFactory[] = [],\n optionalProviders: FluidObjectSymbolProvider<DataObjectType<I, \"OptionalProviders\">>,\n registryEntries?: NamedFluidDataStoreRegistryEntries,\n runtimeFactory: typeof FluidDataStoreRuntime = FluidDataStoreRuntime,\n ) {\n const mergedObjects = [...sharedObjects];\n\n if (!sharedObjects.find((factory) => factory.type === DirectoryFactory.Type)) {\n // User did not register for directory\n mergedObjects.push(SharedDirectory.getFactory());\n }\n\n // TODO: Remove SharedMap factory when compatibility with SharedMap DataObject is no longer needed in 0.10\n if (!sharedObjects.find((factory) => factory.type === MapFactory.Type)) {\n // User did not register for map\n mergedObjects.push(SharedMap.getFactory());\n }\n\n super(\n type,\n ctor,\n mergedObjects,\n optionalProviders,\n registryEntries,\n runtimeFactory,\n );\n }\n}\n"]}
1
+ {"version":3,"file":"dataObjectFactory.js","sourceRoot":"","sources":["../../src/data-object-factories/dataObjectFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,SAAS,GACZ,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;;;GAOG;AACH,MAAM,OAAO,iBACT,SAAQ,qBAA8B;IAEtC,YACI,IAAY,EACZ,IAA8C,EAC9C,gBAA4C,EAAE,EAC9C,iBAAoE,EACpE,eAAoD,EACpD,iBAA+C,qBAAqB;QAEpE,MAAM,aAAa,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC;QAEzC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,gBAAgB,CAAC,IAAI,CAAC,EAAE;YAC1E,sCAAsC;YACtC,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,CAAC;SACpD;QAED,0GAA0G;QAC1G,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI,CAAC,EAAE;YACpE,gCAAgC;YAChC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,CAAC;SAC9C;QAED,KAAK,CACD,IAAI,EACJ,IAAI,EACJ,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,cAAc,CACjB,CAAC;IACN,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n DirectoryFactory,\n MapFactory,\n SharedDirectory,\n SharedMap,\n} from \"@fluidframework/map\";\nimport {\n NamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\nimport { IChannelFactory } from \"@fluidframework/datastore-definitions\";\nimport { FluidObjectSymbolProvider } from \"@fluidframework/synthesize\";\nimport { FluidDataStoreRuntime } from \"@fluidframework/datastore\";\n\nimport { DataObject, DataObjectTypes, IDataObjectProps } from \"../data-objects\";\nimport { PureDataObjectFactory } from \"./pureDataObjectFactory\";\n\n/**\n * DataObjectFactory is the IFluidDataStoreFactory for use with DataObjects.\n * It facilitates DataObject's features (such as its shared directory) by\n * ensuring relevant shared objects etc are available to the factory.\n *\n * @typeParam TObj - DataObject (concrete type)\n * @typeParam I - The input types for the DataObject\n */\nexport class DataObjectFactory<TObj extends DataObject<I>, I extends DataObjectTypes = DataObjectTypes>\n extends PureDataObjectFactory<TObj, I>\n{\n constructor(\n type: string,\n ctor: new (props: IDataObjectProps<I>) => TObj,\n sharedObjects: readonly IChannelFactory[] = [],\n optionalProviders: FluidObjectSymbolProvider<I[\"OptionalProviders\"]>,\n registryEntries?: NamedFluidDataStoreRegistryEntries,\n runtimeFactory: typeof FluidDataStoreRuntime = FluidDataStoreRuntime,\n ) {\n const mergedObjects = [...sharedObjects];\n\n if (!sharedObjects.find((factory) => factory.type === DirectoryFactory.Type)) {\n // User did not register for directory\n mergedObjects.push(SharedDirectory.getFactory());\n }\n\n // TODO: Remove SharedMap factory when compatibility with SharedMap DataObject is no longer needed in 0.10\n if (!sharedObjects.find((factory) => factory.type === MapFactory.Type)) {\n // User did not register for map\n mergedObjects.push(SharedMap.getFactory());\n }\n\n super(\n type,\n ctor,\n mergedObjects,\n optionalProviders,\n registryEntries,\n runtimeFactory,\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"pureDataObjectFactory.js","sourceRoot":"","sources":["../../src/data-object-factories/pureDataObjectFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACH,qBAAqB,EAErB,mBAAmB,GACrB,MAAM,2BAA2B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAa3E,OAAO,EAEH,mBAAmB,GAEtB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAEH,cAAc,GAGjB,MAAM,iBAAiB,CAAC;AAUzB;;;EAGE;AACF,KAAK,UAAU,gBAAgB,CAC3B,IAA8C,EAC9C,OAA+B,EAC/B,oBAA2C,EAC3C,iBAAoF,EACpF,eAA6C,EAC7C,QAAiB,EACjB,SAA6C;IAE7C,OAAO;IACP,IAAI,YAAY,GAAG,eAAe,CAAC;IAEnC,mBAAmB;IACnB,YAAY,GAAG,mBAAmB,CAC9B,KAAK,EAAE,OAAiB,EAAE,UAAiC,EAAE,EAAE,CAC3D,CAAC,MAAM,cAAc,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EACjE,YAAY,CAAC,CAAC;IAEtB,0CAA0C;IAC1C,6EAA6E;IAC7E,MAAM,OAAO,GAAG,IAAI,YAAY,CAC5B,OAAO,EACP,oBAAoB,EACpB,QAAQ,CACX,CAAC;IAEF,4BAA4B;IAC5B,+EAA+E;IAC/E,mFAAmF;IACnF,iFAAiF;IACjF,uGAAuG;IACvG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G;IACI,KAAK,CAAC,kBAAkB,CAC3B,eAAuB,EACvB,OAA0B,EAC1B,YAAgD;QAEhD,MAAM,OAAO,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC,CAAC;QAClF,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAC1D,CAAC;IAES,KAAK,CAAC,yBAAyB,CACrC,gBAAuC,EACvC,WAA+B,EAC/B,YAAgD;QAEhD,MAAM,OAAO,GAAG,gBAAgB,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC;QACtE,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAC1D,CAAC;IAES,KAAK,CAAC,kBAAkB,CAC9B,OAAuC,EACvC,YAAgD;QAEhD,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,gBAAgB,CAChD,IAAI,CAAC,IAAI,EACT,OAAO,EACP,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,iBAAiB,EACtB,IAAI,CAAC,YAAY,EACjB,KAAK,EAAE,WAAW;QAClB,YAAY,CAAC,CAAC;QAElB,MAAM,OAAO,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE3C,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest, IFluidRouter, FluidObject } from \"@fluidframework/core-interfaces\";\nimport {\n FluidDataStoreRuntime,\n ISharedObjectRegistry,\n mixinRequestHandler,\n } from \"@fluidframework/datastore\";\nimport { FluidDataStoreRegistry } from \"@fluidframework/container-runtime\";\nimport {\n IFluidDataStoreContext,\n IContainerRuntimeBase,\n IFluidDataStoreFactory,\n IFluidDataStoreRegistry,\n IProvideFluidDataStoreRegistry,\n NamedFluidDataStoreRegistryEntries,\n NamedFluidDataStoreRegistryEntry,\n IFluidDataStoreContextDetached,\n} from \"@fluidframework/runtime-definitions\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { IChannelFactory } from \"@fluidframework/datastore-definitions\";\nimport {\n FluidObjectSymbolProvider,\n DependencyContainer,\n IFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize\";\n\nimport {\n IDataObjectProps,\n PureDataObject,\n DataObjectType,\n DataObjectTypes,\n} from \"../data-objects\";\n/*\n * Useful interface in places where it's useful to do type erasure for PureDataObject generic\n */\nexport interface IRootDataObjectFactory extends IFluidDataStoreFactory {\n createRootInstance(\n rootDataStoreId: string,\n runtime: IContainerRuntime): Promise<IFluidRouter>;\n}\n\n/**\n * Proxy over PureDataObject\n * Does delayed creation & initialization of PureDataObject\n*/\nasync function createDataObject<TObj extends PureDataObject,I extends DataObjectTypes = DataObjectTypes>(\n ctor: new (props: IDataObjectProps<I>) => TObj,\n context: IFluidDataStoreContext,\n sharedObjectRegistry: ISharedObjectRegistry,\n optionalProviders: FluidObjectSymbolProvider<DataObjectType<I, \"OptionalProviders\">>,\n runtimeClassArg: typeof FluidDataStoreRuntime,\n existing: boolean,\n initProps?: DataObjectType<I, \"InitialState\">)\n{\n // base\n let runtimeClass = runtimeClassArg;\n\n // request mixin in\n runtimeClass = mixinRequestHandler(\n async (request: IRequest, runtimeArg: FluidDataStoreRuntime) =>\n (await PureDataObject.getDataObject(runtimeArg)).request(request),\n runtimeClass);\n\n // Create a new runtime for our data store\n // The runtime is what Fluid uses to create DDS' and route to your data store\n const runtime = new runtimeClass(\n context,\n sharedObjectRegistry,\n existing,\n );\n\n // Create object right away.\n // This allows object to register various callbacks with runtime before runtime\n // becomes globally available. But it's not full initialization - constructor can't\n // access DDSs or other services of runtime as objects are not fully initialized.\n // In order to use object, we need to go through full initialization by calling finishInitialization().\n const scope = context.scope as FluidObject<IFluidDependencySynthesizer>;\n const dependencyContainer = new DependencyContainer(scope.IFluidDependencySynthesizer);\n const providers = dependencyContainer.synthesize<DataObjectType<I, \"OptionalProviders\">>(optionalProviders, {});\n const instance = new ctor({ runtime, context, providers, initProps });\n\n // if it's a newly created object, we need to wait for it to finish initialization\n // as that results in creation of DDSs, before it gets attached, providing atomic\n // guarantee of creation.\n // WARNING: we can't do the same (yet) for already existing PureDataObject!\n // This will result in deadlock, as it tries to resolve internal handles, but any\n // handle resolution goes through root (container runtime), which can't route it back\n // to this data store, as it's still not initialized and not known to container runtime yet.\n // In the future, we should address it by using relative paths for handles and be able to resolve\n // local DDSs while data store is not fully initialized.\n if (!existing) {\n await instance.finishInitialization(existing);\n }\n\n return { instance, runtime };\n}\n\n/**\n * PureDataObjectFactory is a barebones IFluidDataStoreFactory for use with PureDataObject.\n * Consumers should typically use DataObjectFactory instead unless creating\n * another base data store factory.\n *\n * @typeParam TObj - DataObject (concrete type)\n * @typeParam I - The input types for the DataObject\n */\nexport class PureDataObjectFactory<TObj extends PureDataObject<I>, I extends DataObjectTypes = DataObjectTypes>\n implements IFluidDataStoreFactory, Partial<IProvideFluidDataStoreRegistry>, IRootDataObjectFactory\n{\n private readonly sharedObjectRegistry: ISharedObjectRegistry;\n private readonly registry: IFluidDataStoreRegistry | undefined;\n\n constructor(\n public readonly type: string,\n private readonly ctor: new (props: IDataObjectProps<I>) => TObj,\n sharedObjects: readonly IChannelFactory[],\n private readonly optionalProviders: FluidObjectSymbolProvider<DataObjectType<I, \"OptionalProviders\">>,\n registryEntries?: NamedFluidDataStoreRegistryEntries,\n private readonly runtimeClass: typeof FluidDataStoreRuntime = FluidDataStoreRuntime,\n ) {\n if (this.type === \"\") {\n throw new Error(\"undefined type member\");\n }\n if (registryEntries !== undefined) {\n this.registry = new FluidDataStoreRegistry(registryEntries);\n }\n this.sharedObjectRegistry = new Map(sharedObjects.map((ext) => [ext.type, ext]));\n }\n\n public get IFluidDataStoreFactory() { return this; }\n\n public get IFluidDataStoreRegistry() {\n return this.registry;\n }\n\n /**\n * Convenience helper to get the data store's/factory's data store registry entry.\n * The return type hides the factory's generics, easing grouping of registry\n * entries that differ only in this way into the same array.\n * @returns The NamedFluidDataStoreRegistryEntry\n */\n public get registryEntry(): NamedFluidDataStoreRegistryEntry {\n return [this.type, Promise.resolve(this)];\n }\n\n /**\n * This is where we do data store setup.\n *\n * @param context - data store context used to load a data store runtime\n */\n public async instantiateDataStore(context: IFluidDataStoreContext, existing: boolean) {\n const { runtime } = await createDataObject(\n this.ctor,\n context,\n this.sharedObjectRegistry,\n this.optionalProviders,\n this.runtimeClass,\n existing);\n\n return runtime;\n }\n\n /**\n * Creates a new instance of the object. Uses parent context's registry to build package path to this factory.\n * In other words, registry of context passed in has to contain this factory, with the name that matches\n * this factory's type.\n * It is intended to be used by data store objects that create sub-objects.\n * @param context - The context being used to create the runtime\n * (the created object will have its own new context created as well)\n * @param initialState - The initial state to provide to the created data store.\n * @returns an object created by this factory. Data store and objects created are not attached to container.\n * They get attached only when a handle to one of them is attached to already attached objects.\n */\n public async createChildInstance(\n parentContext: IFluidDataStoreContext,\n initialState?: DataObjectType<I, \"InitialState\">,\n ): Promise<TObj> {\n return this.createNonRootInstanceCore(\n parentContext.containerRuntime,\n [...parentContext.packagePath, this.type],\n initialState);\n }\n\n /**\n * Creates a new instance of the object. Uses peer context's registry and its package path to identify this factory.\n * In other words, registry of context passed in has to have this factory.\n * Intended to be used by data store objects that need to create peers (similar) instances of existing objects.\n * @param context - The component context being used to create the object\n * (the created object will have its own new context created as well)\n * @param initialState - The initial state to provide to the created component.\n * @returns an object created by this factory. Data store and objects created are not attached to container.\n * They get attached only when a handle to one of them is attached to already attached objects.\n */\n public async createPeerInstance(\n peerContext: IFluidDataStoreContext,\n initialState?: DataObjectType<I, \"InitialState\">,\n ): Promise<TObj> {\n return this.createNonRootInstanceCore(\n peerContext.containerRuntime,\n peerContext.packagePath,\n initialState);\n }\n\n /**\n * Creates a new instance of the object. Uses container's registry to find this factory.\n * It's expected that only container owners would use this functionality, as only such developers\n * have knowledge of entries in container registry.\n * The name in this registry for such record should match type of this factory.\n * @param runtime - container runtime. It's registry is used to create an object.\n * @param initialState - The initial state to provide to the created component.\n * @returns an object created by this factory. Data store and objects created are not attached to container.\n * They get attached only when a handle to one of them is attached to already attached objects.\n */\n public async createInstance(\n runtime: IContainerRuntimeBase,\n initialState?: DataObjectType<I, \"InitialState\">,\n ): Promise<TObj> {\n return this.createNonRootInstanceCore(\n runtime,\n [this.type],\n initialState);\n }\n\n /**\n * Creates a new root instance of the object. Uses container's registry to find this factory.\n * It's expected that only container owners would use this functionality, as only such developers\n * have knowledge of entries in container registry.\n * The name in this registry for such record should match type of this factory.\n * @param runtime - container runtime. It's registry is used to create an object.\n * @param initialState - The initial state to provide to the created component.\n * @returns an object created by this factory. Data store and objects created are not attached to container.\n * They get attached only when a handle to one of them is attached to already attached objects.\n */\n public async createRootInstance(\n rootDataStoreId: string,\n runtime: IContainerRuntime,\n initialState?: DataObjectType<I, \"InitialState\">,\n ): Promise<TObj> {\n const context = runtime.createDetachedRootDataStore([this.type], rootDataStoreId);\n return this.createInstanceCore(context, initialState);\n }\n\n protected async createNonRootInstanceCore(\n containerRuntime: IContainerRuntimeBase,\n packagePath: Readonly<string[]>,\n initialState?: DataObjectType<I, \"InitialState\">,\n ): Promise<TObj> {\n const context = containerRuntime.createDetachedDataStore(packagePath);\n return this.createInstanceCore(context, initialState);\n }\n\n protected async createInstanceCore(\n context: IFluidDataStoreContextDetached,\n initialState?: DataObjectType<I, \"InitialState\">,\n ): Promise<TObj> {\n const { instance, runtime } = await createDataObject(\n this.ctor,\n context,\n this.sharedObjectRegistry,\n this.optionalProviders,\n this.runtimeClass,\n false, // existing\n initialState);\n\n await context.attachRuntime(this, runtime);\n\n return instance;\n }\n}\n"]}
1
+ {"version":3,"file":"pureDataObjectFactory.js","sourceRoot":"","sources":["../../src/data-object-factories/pureDataObjectFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACH,qBAAqB,EAErB,mBAAmB,GAC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AAY,CAAC,CAAC;IAC1D,CAAC;IAES,KAAK,CAAC,kBAAkB,CAC9B,OAAuC,EACvC,YAAgC;QAEhC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,gBAAgB,CAChD,IAAI,CAAC,IAAI,EACT,OAAO,EACP,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,iBAAiB,EACtB,IAAI,CAAC,YAAY,EACjB,KAAK,EAAE,WAAW;QAClB,YAAY,CAAC,CAAC;QAElB,MAAM,OAAO,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE3C,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest, IFluidRouter, FluidObject } from \"@fluidframework/core-interfaces\";\nimport {\n FluidDataStoreRuntime,\n ISharedObjectRegistry,\n mixinRequestHandler,\n } from \"@fluidframework/datastore\";\nimport { FluidDataStoreRegistry } from \"@fluidframework/container-runtime\";\nimport {\n IFluidDataStoreContext,\n IContainerRuntimeBase,\n IFluidDataStoreFactory,\n IFluidDataStoreRegistry,\n IProvideFluidDataStoreRegistry,\n NamedFluidDataStoreRegistryEntries,\n NamedFluidDataStoreRegistryEntry,\n IFluidDataStoreContextDetached,\n} from \"@fluidframework/runtime-definitions\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { IChannelFactory } from \"@fluidframework/datastore-definitions\";\nimport {\n FluidObjectSymbolProvider,\n DependencyContainer,\n IFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize\";\n\nimport {\n IDataObjectProps,\n PureDataObject,\n DataObjectTypes,\n} from \"../data-objects\";\n/*\n * Useful interface in places where it's useful to do type erasure for PureDataObject generic\n */\nexport interface IRootDataObjectFactory extends IFluidDataStoreFactory {\n createRootInstance(\n rootDataStoreId: string,\n runtime: IContainerRuntime): Promise<IFluidRouter>;\n}\n\n/**\n * Proxy over PureDataObject\n * Does delayed creation & initialization of PureDataObject\n*/\nasync function createDataObject<TObj extends PureDataObject,I extends DataObjectTypes = DataObjectTypes>(\n ctor: new (props: IDataObjectProps<I>) => TObj,\n context: IFluidDataStoreContext,\n sharedObjectRegistry: ISharedObjectRegistry,\n optionalProviders: FluidObjectSymbolProvider<I[\"OptionalProviders\"]>,\n runtimeClassArg: typeof FluidDataStoreRuntime,\n existing: boolean,\n initProps?: I[\"InitialState\"])\n{\n // base\n let runtimeClass = runtimeClassArg;\n\n // request mixin in\n runtimeClass = mixinRequestHandler(\n async (request: IRequest, runtimeArg: FluidDataStoreRuntime) =>\n (await PureDataObject.getDataObject(runtimeArg)).request(request),\n runtimeClass);\n\n // Create a new runtime for our data store\n // The runtime is what Fluid uses to create DDS' and route to your data store\n const runtime = new runtimeClass(\n context,\n sharedObjectRegistry,\n existing,\n );\n\n // Create object right away.\n // This allows object to register various callbacks with runtime before runtime\n // becomes globally available. But it's not full initialization - constructor can't\n // access DDSs or other services of runtime as objects are not fully initialized.\n // In order to use object, we need to go through full initialization by calling finishInitialization().\n const scope = context.scope as FluidObject<IFluidDependencySynthesizer>;\n const dependencyContainer = new DependencyContainer(scope.IFluidDependencySynthesizer);\n const providers = dependencyContainer.synthesize<I[\"OptionalProviders\"]>(optionalProviders, {});\n const instance = new ctor({ runtime, context, providers, initProps });\n\n // if it's a newly created object, we need to wait for it to finish initialization\n // as that results in creation of DDSs, before it gets attached, providing atomic\n // guarantee of creation.\n // WARNING: we can't do the same (yet) for already existing PureDataObject!\n // This will result in deadlock, as it tries to resolve internal handles, but any\n // handle resolution goes through root (container runtime), which can't route it back\n // to this data store, as it's still not initialized and not known to container runtime yet.\n // In the future, we should address it by using relative paths for handles and be able to resolve\n // local DDSs while data store is not fully initialized.\n if (!existing) {\n await instance.finishInitialization(existing);\n }\n\n return { instance, runtime };\n}\n\n/**\n * PureDataObjectFactory is a barebones IFluidDataStoreFactory for use with PureDataObject.\n * Consumers should typically use DataObjectFactory instead unless creating\n * another base data store factory.\n *\n * @typeParam TObj - DataObject (concrete type)\n * @typeParam I - The input types for the DataObject\n */\nexport class PureDataObjectFactory<TObj extends PureDataObject<I>, I extends DataObjectTypes = DataObjectTypes>\n implements IFluidDataStoreFactory, Partial<IProvideFluidDataStoreRegistry>, IRootDataObjectFactory\n{\n private readonly sharedObjectRegistry: ISharedObjectRegistry;\n private readonly registry: IFluidDataStoreRegistry | undefined;\n\n constructor(\n public readonly type: string,\n private readonly ctor: new (props: IDataObjectProps<I>) => TObj,\n sharedObjects: readonly IChannelFactory[],\n private readonly optionalProviders: FluidObjectSymbolProvider<I[\"OptionalProviders\"]>,\n registryEntries?: NamedFluidDataStoreRegistryEntries,\n private readonly runtimeClass: typeof FluidDataStoreRuntime = FluidDataStoreRuntime,\n ) {\n if (this.type === \"\") {\n throw new Error(\"undefined type member\");\n }\n if (registryEntries !== undefined) {\n this.registry = new FluidDataStoreRegistry(registryEntries);\n }\n this.sharedObjectRegistry = new Map(sharedObjects.map((ext) => [ext.type, ext]));\n }\n\n public get IFluidDataStoreFactory() { return this; }\n\n public get IFluidDataStoreRegistry() {\n return this.registry;\n }\n\n /**\n * Convenience helper to get the data store's/factory's data store registry entry.\n * The return type hides the factory's generics, easing grouping of registry\n * entries that differ only in this way into the same array.\n * @returns The NamedFluidDataStoreRegistryEntry\n */\n public get registryEntry(): NamedFluidDataStoreRegistryEntry {\n return [this.type, Promise.resolve(this)];\n }\n\n /**\n * This is where we do data store setup.\n *\n * @param context - data store context used to load a data store runtime\n */\n public async instantiateDataStore(context: IFluidDataStoreContext, existing: boolean) {\n const { runtime } = await createDataObject(\n this.ctor,\n context,\n this.sharedObjectRegistry,\n this.optionalProviders,\n this.runtimeClass,\n existing);\n\n return runtime;\n }\n\n /**\n * Creates a new instance of the object. Uses parent context's registry to build package path to this factory.\n * In other words, registry of context passed in has to contain this factory, with the name that matches\n * this factory's type.\n * It is intended to be used by data store objects that create sub-objects.\n * @param context - The context being used to create the runtime\n * (the created object will have its own new context created as well)\n * @param initialState - The initial state to provide to the created data store.\n * @returns an object created by this factory. Data store and objects created are not attached to container.\n * They get attached only when a handle to one of them is attached to already attached objects.\n */\n public async createChildInstance(\n parentContext: IFluidDataStoreContext,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n return this.createNonRootInstanceCore(\n parentContext.containerRuntime,\n [...parentContext.packagePath, this.type],\n initialState);\n }\n\n /**\n * Creates a new instance of the object. Uses peer context's registry and its package path to identify this factory.\n * In other words, registry of context passed in has to have this factory.\n * Intended to be used by data store objects that need to create peers (similar) instances of existing objects.\n * @param context - The component context being used to create the object\n * (the created object will have its own new context created as well)\n * @param initialState - The initial state to provide to the created component.\n * @returns an object created by this factory. Data store and objects created are not attached to container.\n * They get attached only when a handle to one of them is attached to already attached objects.\n */\n public async createPeerInstance(\n peerContext: IFluidDataStoreContext,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n return this.createNonRootInstanceCore(\n peerContext.containerRuntime,\n peerContext.packagePath,\n initialState);\n }\n\n /**\n * Creates a new instance of the object. Uses container's registry to find this factory.\n * It's expected that only container owners would use this functionality, as only such developers\n * have knowledge of entries in container registry.\n * The name in this registry for such record should match type of this factory.\n * @param runtime - container runtime. It's registry is used to create an object.\n * @param initialState - The initial state to provide to the created component.\n * @returns an object created by this factory. Data store and objects created are not attached to container.\n * They get attached only when a handle to one of them is attached to already attached objects.\n */\n public async createInstance(\n runtime: IContainerRuntimeBase,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n return this.createNonRootInstanceCore(\n runtime,\n [this.type],\n initialState);\n }\n\n /**\n * Creates a new root instance of the object. Uses container's registry to find this factory.\n * It's expected that only container owners would use this functionality, as only such developers\n * have knowledge of entries in container registry.\n * The name in this registry for such record should match type of this factory.\n * @param runtime - container runtime. It's registry is used to create an object.\n * @param initialState - The initial state to provide to the created component.\n * @returns an object created by this factory. Data store and objects created are not attached to container.\n * They get attached only when a handle to one of them is attached to already attached objects.\n */\n public async createRootInstance(\n rootDataStoreId: string,\n runtime: IContainerRuntime,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n const context = runtime.createDetachedRootDataStore([this.type], rootDataStoreId);\n return this.createInstanceCore(context, initialState);\n }\n\n protected async createNonRootInstanceCore(\n containerRuntime: IContainerRuntimeBase,\n packagePath: Readonly<string[]>,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n const context = containerRuntime.createDetachedDataStore(packagePath);\n return this.createInstanceCore(context, initialState);\n }\n\n protected async createInstanceCore(\n context: IFluidDataStoreContextDetached,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n const { instance, runtime } = await createDataObject(\n this.ctor,\n context,\n this.sharedObjectRegistry,\n this.optionalProviders,\n this.runtimeClass,\n false, // existing\n initialState);\n\n await context.attachRuntime(this, runtime);\n\n return instance;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/data-objects/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { DataObject } from \"./dataObject\";\nexport { PureDataObject } from \"./pureDataObject\";\nexport { DataObjectTypes, DataObjectType, IDataObjectProps } from \"./types\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/data-objects/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { DataObject } from \"./dataObject\";\nexport { PureDataObject } from \"./pureDataObject\";\nexport { DataObjectTypes, IDataObjectProps } from \"./types\";\n"]}
@@ -2,8 +2,8 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { FluidObjectHandle } from "@fluidframework/datastore";
6
5
  import { assert, EventForwarder } from "@fluidframework/common-utils";
6
+ import { FluidObjectHandle } from "@fluidframework/datastore";
7
7
  import { handleFromLegacyUri } from "@fluidframework/request-handler";
8
8
  import { serviceRoutePathRoot } from "../container-services";
9
9
  import { defaultFluidObjectRequestHandler } from "../request-handlers";
@@ -96,7 +96,7 @@ export class PureDataObject extends EventForwarder {
96
96
  await this.hasInitialized();
97
97
  }
98
98
  /**
99
- * Retrieve Fluid object using the handle get or the older requestFluidObject_UNSAFE call to fetch by ID
99
+ * Retrieve Fluid object using the handle get
100
100
  *
101
101
  * @param key - key that object (handle/id) is stored with in the directory
102
102
  * @param directory - directory containing the object
@@ -104,29 +104,13 @@ export class PureDataObject extends EventForwarder {
104
104
  * define custom types/getters for object retrieval
105
105
  */
106
106
  async getFluidObjectFromDirectory(key, directory, getObjectFromDirectory) {
107
- const handleOrId = getObjectFromDirectory ? getObjectFromDirectory(key, directory) : directory.get(key);
108
- if (typeof handleOrId === "string") {
109
- // For backwards compatibility with older stored IDs
110
- // We update the storage with the handle so that this code path is less and less trafficked
111
- const fluidObject = await this.requestFluidObject_UNSAFE(handleOrId);
112
- if (fluidObject.IFluidLoadable && fluidObject.handle) {
113
- directory.set(key, fluidObject.handle);
114
- }
115
- return fluidObject;
116
- }
117
- else {
118
- const handle = handleOrId === null || handleOrId === void 0 ? void 0 : handleOrId.IFluidHandle;
119
- return await (handle ? handle.get() : this.requestFluidObject_UNSAFE(key));
107
+ const handleMaybe = getObjectFromDirectory ? getObjectFromDirectory(key, directory) : directory.get(key);
108
+ const handle = handleMaybe === null || handleMaybe === void 0 ? void 0 : handleMaybe.IFluidHandle;
109
+ if (handle) {
110
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
111
+ return handle.get();
120
112
  }
121
113
  }
122
- /**
123
- * @deprecated
124
- * Gets the data store of a given id. Will follow the pattern of the container for waiting.
125
- * @param id - data store id
126
- */
127
- async requestFluidObject_UNSAFE(id) {
128
- return handleFromLegacyUri(`/${id}`, this.context.containerRuntime).get();
129
- }
130
114
  /**
131
115
  * Gets the service at a given id.
132
116
  * @param id - service id