@itwin/core-backend 5.1.0-dev.60 → 5.1.0-dev.62
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/lib/cjs/ECSqlStatement.d.ts.map +1 -1
- package/lib/cjs/ECSqlStatement.js +1 -0
- package/lib/cjs/ECSqlStatement.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +5 -2
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +11 -2
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/LocalHub.d.ts.map +1 -1
- package/lib/cjs/LocalHub.js +6 -4
- package/lib/cjs/LocalHub.js.map +1 -1
- package/lib/cjs/annotations/FrameGeometry.d.ts +1 -2
- package/lib/cjs/annotations/FrameGeometry.d.ts.map +1 -1
- package/lib/cjs/annotations/FrameGeometry.js +3 -4
- package/lib/cjs/annotations/FrameGeometry.js.map +1 -1
- package/lib/cjs/annotations/LeaderGeometry.d.ts +3 -3
- package/lib/cjs/annotations/LeaderGeometry.d.ts.map +1 -1
- package/lib/cjs/annotations/LeaderGeometry.js +17 -8
- package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.d.ts +148 -10
- package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.js +296 -28
- package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/cjs/annotations/TextAnnotationGeometry.d.ts +3 -1
- package/lib/cjs/annotations/TextAnnotationGeometry.d.ts.map +1 -1
- package/lib/cjs/annotations/TextAnnotationGeometry.js +13 -14
- package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextBlockLayout.d.ts +47 -14
- package/lib/cjs/annotations/TextBlockLayout.d.ts.map +1 -1
- package/lib/cjs/annotations/TextBlockLayout.js +109 -38
- package/lib/cjs/annotations/TextBlockLayout.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/cjs/workspace/Workspace.d.ts +0 -1
- package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
- package/lib/cjs/workspace/Workspace.js.map +1 -1
- package/lib/esm/ECSqlStatement.d.ts.map +1 -1
- package/lib/esm/ECSqlStatement.js +1 -0
- package/lib/esm/ECSqlStatement.js.map +1 -1
- package/lib/esm/IModelDb.d.ts +5 -2
- package/lib/esm/IModelDb.d.ts.map +1 -1
- package/lib/esm/IModelDb.js +11 -2
- package/lib/esm/IModelDb.js.map +1 -1
- package/lib/esm/LocalHub.d.ts.map +1 -1
- package/lib/esm/LocalHub.js +6 -4
- package/lib/esm/LocalHub.js.map +1 -1
- package/lib/esm/annotations/FrameGeometry.d.ts +1 -2
- package/lib/esm/annotations/FrameGeometry.d.ts.map +1 -1
- package/lib/esm/annotations/FrameGeometry.js +3 -4
- package/lib/esm/annotations/FrameGeometry.js.map +1 -1
- package/lib/esm/annotations/LeaderGeometry.d.ts +3 -3
- package/lib/esm/annotations/LeaderGeometry.d.ts.map +1 -1
- package/lib/esm/annotations/LeaderGeometry.js +17 -8
- package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
- package/lib/esm/annotations/TextAnnotationElement.d.ts +148 -10
- package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -1
- package/lib/esm/annotations/TextAnnotationElement.js +297 -30
- package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/esm/annotations/TextAnnotationGeometry.d.ts +3 -1
- package/lib/esm/annotations/TextAnnotationGeometry.d.ts.map +1 -1
- package/lib/esm/annotations/TextAnnotationGeometry.js +13 -14
- package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -1
- package/lib/esm/annotations/TextBlockLayout.d.ts +47 -14
- package/lib/esm/annotations/TextBlockLayout.d.ts.map +1 -1
- package/lib/esm/annotations/TextBlockLayout.js +107 -37
- package/lib/esm/annotations/TextBlockLayout.js.map +1 -1
- package/lib/esm/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
- package/lib/esm/rpc-impl/IModelReadRpcImpl.js +1 -1
- package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/esm/test/AnnotationTestUtils.d.ts.map +1 -1
- package/lib/esm/test/AnnotationTestUtils.js +8 -2
- package/lib/esm/test/AnnotationTestUtils.js.map +1 -1
- package/lib/esm/test/annotations/FrameGeometry.test.js +12 -4
- package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -1
- package/lib/esm/test/annotations/LeaderGeometry.test.js +21 -16
- package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
- package/lib/esm/test/annotations/TextAnnotation.test.js +180 -121
- package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
- package/lib/esm/test/annotations/TextBlock.test.js +249 -142
- package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangesetReader.test.js +96 -0
- package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
- package/lib/esm/workspace/Workspace.d.ts +0 -1
- package/lib/esm/workspace/Workspace.d.ts.map +1 -1
- package/lib/esm/workspace/Workspace.js.map +1 -1
- package/package.json +17 -16
|
@@ -1202,5 +1202,101 @@ describe("Changeset Reader API", async () => {
|
|
|
1202
1202
|
// Cleanup
|
|
1203
1203
|
await Promise.all([secondBriefCase.close(), firstBriefCase.close()]);
|
|
1204
1204
|
});
|
|
1205
|
+
it("Track changeset health stats", async () => {
|
|
1206
|
+
const adminToken = "super manager token";
|
|
1207
|
+
const iModelName = "test";
|
|
1208
|
+
const rwIModelId = await HubMock.createNewIModel({ iTwinId, iModelName, description: "TestSubject", accessToken: adminToken });
|
|
1209
|
+
assert.isNotEmpty(rwIModelId);
|
|
1210
|
+
// Open two briefcases for the same iModel
|
|
1211
|
+
const [firstBriefcase, secondBriefcase] = await Promise.all([
|
|
1212
|
+
HubWrappers.downloadAndOpenBriefcase({ iTwinId, iModelId: rwIModelId, accessToken: adminToken }),
|
|
1213
|
+
HubWrappers.downloadAndOpenBriefcase({ iTwinId, iModelId: rwIModelId, accessToken: adminToken })
|
|
1214
|
+
]);
|
|
1215
|
+
[firstBriefcase, secondBriefcase].forEach(briefcase => briefcase.channels.addAllowedChannel(ChannelControl.sharedChannelName));
|
|
1216
|
+
await firstBriefcase.importSchemaStrings([`<?xml version="1.0" encoding="UTF-8"?>
|
|
1217
|
+
<ECSchema schemaName="TestSchema" alias="ts" version="1.0.0" xmlns="http://www.bentley.com/schemas/Bentley.ECXML.3.2">
|
|
1218
|
+
<ECSchemaReference name="BisCore" version="1.0.0" alias="bis"/>
|
|
1219
|
+
<ECSchemaReference name="CoreCustomAttributes" version="1.0.0" alias="CoreCA" />
|
|
1220
|
+
|
|
1221
|
+
<ECCustomAttributes>
|
|
1222
|
+
<DynamicSchema xmlns = 'CoreCustomAttributes.1.0.0' />
|
|
1223
|
+
</ECCustomAttributes>
|
|
1224
|
+
|
|
1225
|
+
<ECEntityClass typeName="TestClass">
|
|
1226
|
+
<BaseClass>bis:PhysicalElement</BaseClass>
|
|
1227
|
+
</ECEntityClass>
|
|
1228
|
+
</ECSchema>`]);
|
|
1229
|
+
firstBriefcase.saveChanges("import initial schema");
|
|
1230
|
+
// Enable changeset tracking for both briefcases
|
|
1231
|
+
await Promise.all([firstBriefcase.enableChangesetStatTracking(), secondBriefcase.enableChangesetStatTracking()]);
|
|
1232
|
+
await firstBriefcase.pushChanges({ description: "push initial schema changeset", accessToken: adminToken });
|
|
1233
|
+
await secondBriefcase.pullChanges({ accessToken: adminToken });
|
|
1234
|
+
// Schema upgrade
|
|
1235
|
+
await secondBriefcase.importSchemaStrings([`<?xml version="1.0" encoding="UTF-8"?>
|
|
1236
|
+
<ECSchema schemaName="TestSchema" alias="ts" version="2.0.0" xmlns="http://www.bentley.com/schemas/Bentley.ECXML.3.2">
|
|
1237
|
+
<ECSchemaReference name="BisCore" version="1.0.0" alias="bis"/>
|
|
1238
|
+
<ECSchemaReference name="CoreCustomAttributes" version="1.0.0" alias="CoreCA" />
|
|
1239
|
+
|
|
1240
|
+
<ECCustomAttributes>
|
|
1241
|
+
<DynamicSchema xmlns = 'CoreCustomAttributes.1.0.0' />
|
|
1242
|
+
</ECCustomAttributes>
|
|
1243
|
+
|
|
1244
|
+
<ECEntityClass typeName="TestClass">
|
|
1245
|
+
<BaseClass>bis:PhysicalElement</BaseClass>
|
|
1246
|
+
<ECProperty propertyName="TestProperty" typeName="string"/>
|
|
1247
|
+
</ECEntityClass>
|
|
1248
|
+
|
|
1249
|
+
<ECEnumeration typeName="TestEnum" backingTypeName="int" isStrict="true">
|
|
1250
|
+
<ECEnumerator name="Enumerator1" value="1" displayLabel="TestEnumerator1"/>
|
|
1251
|
+
<ECEnumerator name="Enumerator2" value="2" displayLabel="TestEnumerator2"/>
|
|
1252
|
+
</ECEnumeration>
|
|
1253
|
+
</ECSchema>`]);
|
|
1254
|
+
secondBriefcase.saveChanges("imported schema");
|
|
1255
|
+
await secondBriefcase.pushChanges({ description: "Added a property to TestClass and an enum", accessToken: adminToken });
|
|
1256
|
+
await firstBriefcase.pullChanges({ accessToken: adminToken });
|
|
1257
|
+
// Major schema change
|
|
1258
|
+
await firstBriefcase.importSchemaStrings([`<?xml version="1.0" encoding="UTF-8"?>
|
|
1259
|
+
<ECSchema schemaName="TestSchema" alias="ts" version="2.0.0" xmlns="http://www.bentley.com/schemas/Bentley.ECXML.3.2">
|
|
1260
|
+
<ECSchemaReference name="CoreCustomAttributes" version="1.0.0" alias="CoreCA" />
|
|
1261
|
+
|
|
1262
|
+
<ECCustomAttributes>
|
|
1263
|
+
<DynamicSchema xmlns = 'CoreCustomAttributes.1.0.0' />
|
|
1264
|
+
</ECCustomAttributes>
|
|
1265
|
+
|
|
1266
|
+
<ECEnumeration typeName="TestEnum" backingTypeName="int" isStrict="true">
|
|
1267
|
+
<ECEnumerator name="Enumerator1" value="1" displayLabel="TestEnumerator1"/>
|
|
1268
|
+
<ECEnumerator name="Enumerator2" value="2" displayLabel="TestEnumerator2"/>
|
|
1269
|
+
</ECEnumeration>
|
|
1270
|
+
</ECSchema>`]);
|
|
1271
|
+
firstBriefcase.saveChanges("imported schema");
|
|
1272
|
+
await firstBriefcase.pushChanges({ description: "Deleted TestClass", accessToken: adminToken });
|
|
1273
|
+
await secondBriefcase.pullChanges({ accessToken: adminToken });
|
|
1274
|
+
const firstBriefcaseChangesets = await firstBriefcase.getAllChangesetHealthData();
|
|
1275
|
+
const secondBriefcaseChangesets = await secondBriefcase.getAllChangesetHealthData();
|
|
1276
|
+
assert.equal(firstBriefcaseChangesets.length, 1);
|
|
1277
|
+
const firstBriefcaseChangeset = firstBriefcaseChangesets[0];
|
|
1278
|
+
expect(firstBriefcaseChangeset.uncompressedSizeBytes).to.be.greaterThan(300);
|
|
1279
|
+
expect(firstBriefcaseChangeset.insertedRows).to.be.eql(4);
|
|
1280
|
+
expect(firstBriefcaseChangeset.updatedRows).to.be.eql(1);
|
|
1281
|
+
expect(firstBriefcaseChangeset.deletedRows).to.be.eql(0);
|
|
1282
|
+
expect(firstBriefcaseChangeset.totalFullTableScans).to.be.eql(0);
|
|
1283
|
+
expect(firstBriefcaseChangeset.perStatementStats.length).to.be.eql(5);
|
|
1284
|
+
assert.equal(secondBriefcaseChangesets.length, 2);
|
|
1285
|
+
const [secondBriefcaseChangeset1, secondBriefcaseChangeset2] = secondBriefcaseChangesets;
|
|
1286
|
+
expect(secondBriefcaseChangeset1.uncompressedSizeBytes).to.be.greaterThan(40000);
|
|
1287
|
+
expect(secondBriefcaseChangeset1.insertedRows).to.be.eql(52);
|
|
1288
|
+
expect(secondBriefcaseChangeset1.updatedRows).to.be.eql(921);
|
|
1289
|
+
expect(secondBriefcaseChangeset1.deletedRows).to.be.eql(0);
|
|
1290
|
+
expect(secondBriefcaseChangeset1.totalFullTableScans).to.be.eql(0);
|
|
1291
|
+
expect(secondBriefcaseChangeset1.perStatementStats.length).to.be.eql(11);
|
|
1292
|
+
expect(secondBriefcaseChangeset2.uncompressedSizeBytes).to.be.greaterThan(40000);
|
|
1293
|
+
expect(secondBriefcaseChangeset2.insertedRows).to.be.eql(0);
|
|
1294
|
+
expect(secondBriefcaseChangeset2.updatedRows).to.be.eql(921);
|
|
1295
|
+
expect(secondBriefcaseChangeset2.deletedRows).to.be.eql(52);
|
|
1296
|
+
expect(secondBriefcaseChangeset2.totalFullTableScans).to.be.eql(0);
|
|
1297
|
+
expect(secondBriefcaseChangeset2.perStatementStats.length).to.be.eql(11);
|
|
1298
|
+
// Cleanup
|
|
1299
|
+
await Promise.all([secondBriefcase.close(), firstBriefcase.close()]);
|
|
1300
|
+
});
|
|
1205
1301
|
});
|
|
1206
1302
|
//# sourceMappingURL=ChangesetReader.test.js.map
|