@itwin/imodel-transformer 2.0.0-dev.5 → 2.0.0-dev.51
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/README.md +13 -27
- package/lib/cjs/Algo.js.map +1 -1
- package/lib/cjs/BigMap.d.ts.map +1 -1
- package/lib/cjs/BigMap.js.map +1 -1
- package/lib/cjs/BranchProvenanceInitializer.d.ts.map +1 -1
- package/lib/cjs/BranchProvenanceInitializer.js +34 -36
- package/lib/cjs/BranchProvenanceInitializer.js.map +1 -1
- package/lib/cjs/ChangesetScanner.d.ts +60 -0
- package/lib/cjs/ChangesetScanner.d.ts.map +1 -0
- package/lib/cjs/ChangesetScanner.js +101 -0
- package/lib/cjs/ChangesetScanner.js.map +1 -0
- package/lib/cjs/ECReferenceTypesCache.d.ts +0 -3
- package/lib/cjs/ECReferenceTypesCache.d.ts.map +1 -1
- package/lib/cjs/ECReferenceTypesCache.js +61 -103
- package/lib/cjs/ECReferenceTypesCache.js.map +1 -1
- package/lib/cjs/ECSqlReaderAsyncIterableIteratorAdapter.d.ts.map +1 -1
- package/lib/cjs/ECSqlReaderAsyncIterableIteratorAdapter.js.map +1 -1
- package/lib/cjs/ElementAspectCleanup.d.ts +16 -0
- package/lib/cjs/ElementAspectCleanup.d.ts.map +1 -0
- package/lib/cjs/ElementAspectCleanup.js +82 -0
- package/lib/cjs/ElementAspectCleanup.js.map +1 -0
- package/lib/cjs/ElementAspectExportCoordinator.d.ts +44 -0
- package/lib/cjs/ElementAspectExportCoordinator.d.ts.map +1 -0
- package/lib/cjs/ElementAspectExportCoordinator.js +148 -0
- package/lib/cjs/ElementAspectExportCoordinator.js.map +1 -0
- package/lib/cjs/ElementAspectExportProcessor.d.ts +43 -0
- package/lib/cjs/ElementAspectExportProcessor.d.ts.map +1 -0
- package/lib/cjs/ElementAspectExportProcessor.js +167 -0
- package/lib/cjs/ElementAspectExportProcessor.js.map +1 -0
- package/lib/cjs/ElementBulkDelete.d.ts +11 -0
- package/lib/cjs/ElementBulkDelete.d.ts.map +1 -0
- package/lib/cjs/ElementBulkDelete.js +55 -0
- package/lib/cjs/ElementBulkDelete.js.map +1 -0
- package/lib/cjs/EntityExistenceCache.d.ts +43 -0
- package/lib/cjs/EntityExistenceCache.d.ts.map +1 -0
- package/lib/cjs/EntityExistenceCache.js +91 -0
- package/lib/cjs/EntityExistenceCache.js.map +1 -0
- package/lib/cjs/EntityMap.d.ts.map +1 -1
- package/lib/cjs/EntityMap.js.map +1 -1
- package/lib/cjs/EntityUnifier.d.ts +8 -8
- package/lib/cjs/EntityUnifier.d.ts.map +1 -1
- package/lib/cjs/EntityUnifier.js +55 -32
- package/lib/cjs/EntityUnifier.js.map +1 -1
- package/lib/cjs/IModelCloneContext.d.ts +11 -5
- package/lib/cjs/IModelCloneContext.d.ts.map +1 -1
- package/lib/cjs/IModelCloneContext.js +94 -58
- package/lib/cjs/IModelCloneContext.js.map +1 -1
- package/lib/cjs/IModelExporter.d.ts +109 -35
- package/lib/cjs/IModelExporter.d.ts.map +1 -1
- package/lib/cjs/IModelExporter.js +698 -224
- package/lib/cjs/IModelExporter.js.map +1 -1
- package/lib/cjs/IModelImporter.d.ts +73 -32
- package/lib/cjs/IModelImporter.d.ts.map +1 -1
- package/lib/cjs/IModelImporter.js +278 -144
- package/lib/cjs/IModelImporter.js.map +1 -1
- package/lib/cjs/IModelTransformContext.d.ts +54 -0
- package/lib/cjs/IModelTransformContext.d.ts.map +1 -0
- package/lib/cjs/IModelTransformContext.js +3 -0
- package/lib/cjs/IModelTransformContext.js.map +1 -0
- package/lib/cjs/IModelTransformer.d.ts +126 -206
- package/lib/cjs/IModelTransformer.d.ts.map +1 -1
- package/lib/cjs/IModelTransformer.js +652 -1198
- package/lib/cjs/IModelTransformer.js.map +1 -1
- package/lib/cjs/IModelTransformerError.d.ts +84 -0
- package/lib/cjs/IModelTransformerError.d.ts.map +1 -0
- package/lib/cjs/IModelTransformerError.js +93 -0
- package/lib/cjs/IModelTransformerError.js.map +1 -0
- package/lib/cjs/ProvenanceManager.d.ts +182 -0
- package/lib/cjs/ProvenanceManager.d.ts.map +1 -0
- package/lib/cjs/ProvenanceManager.js +743 -0
- package/lib/cjs/ProvenanceManager.js.map +1 -0
- package/lib/cjs/SyncTypeResolver.d.ts +34 -0
- package/lib/cjs/SyncTypeResolver.d.ts.map +1 -0
- package/lib/cjs/SyncTypeResolver.js +98 -0
- package/lib/cjs/SyncTypeResolver.js.map +1 -0
- package/lib/cjs/TransformerLoggerCategory.d.ts +1 -1
- package/lib/cjs/TransformerLoggerCategory.js +1 -1
- package/lib/cjs/TransformerLoggerCategory.js.map +1 -1
- package/lib/cjs/TransformerPackageMetadata.d.ts +8 -0
- package/lib/cjs/TransformerPackageMetadata.d.ts.map +1 -0
- package/lib/cjs/TransformerPackageMetadata.js +47 -0
- package/lib/cjs/TransformerPackageMetadata.js.map +1 -0
- package/lib/cjs/imodel-transformer.d.ts +19 -0
- package/lib/cjs/imodel-transformer.d.ts.map +1 -1
- package/lib/cjs/imodel-transformer.js +53 -34
- package/lib/cjs/imodel-transformer.js.map +1 -1
- package/lib/cjs/schema-processing/DynamicSchemaUnionStrategy.d.ts +29 -0
- package/lib/cjs/schema-processing/DynamicSchemaUnionStrategy.d.ts.map +1 -0
- package/lib/cjs/schema-processing/DynamicSchemaUnionStrategy.js +212 -0
- package/lib/cjs/schema-processing/DynamicSchemaUnionStrategy.js.map +1 -0
- package/lib/cjs/schema-processing/SchemaProcessingCoordinator.d.ts +25 -0
- package/lib/cjs/schema-processing/SchemaProcessingCoordinator.d.ts.map +1 -0
- package/lib/cjs/schema-processing/SchemaProcessingCoordinator.js +196 -0
- package/lib/cjs/schema-processing/SchemaProcessingCoordinator.js.map +1 -0
- package/lib/cjs/schema-processing/SchemaProcessingStrategy.d.ts +59 -0
- package/lib/cjs/schema-processing/SchemaProcessingStrategy.d.ts.map +1 -0
- package/lib/cjs/schema-processing/SchemaProcessingStrategy.js +28 -0
- package/lib/cjs/schema-processing/SchemaProcessingStrategy.js.map +1 -0
- package/lib/cjs/schema-processing.d.ts +7 -0
- package/lib/cjs/schema-processing.d.ts.map +1 -0
- package/lib/cjs/schema-processing.js +27 -0
- package/lib/cjs/schema-processing.js.map +1 -0
- package/package.json +65 -43
- package/lib/cjs/DetachedExportElementAspectsStrategy.d.ts +0 -16
- package/lib/cjs/DetachedExportElementAspectsStrategy.d.ts.map +0 -1
- package/lib/cjs/DetachedExportElementAspectsStrategy.js +0 -106
- package/lib/cjs/DetachedExportElementAspectsStrategy.js.map +0 -1
- package/lib/cjs/ElementCascadingDeleter.d.ts +0 -22
- package/lib/cjs/ElementCascadingDeleter.d.ts.map +0 -1
- package/lib/cjs/ElementCascadingDeleter.js +0 -57
- package/lib/cjs/ElementCascadingDeleter.js.map +0 -1
- package/lib/cjs/ExportElementAspectsStrategy.d.ts +0 -35
- package/lib/cjs/ExportElementAspectsStrategy.d.ts.map +0 -1
- package/lib/cjs/ExportElementAspectsStrategy.js +0 -52
- package/lib/cjs/ExportElementAspectsStrategy.js.map +0 -1
- package/lib/cjs/ExportElementAspectsWithElementsStrategy.d.ts +0 -12
- package/lib/cjs/ExportElementAspectsWithElementsStrategy.d.ts.map +0 -1
- package/lib/cjs/ExportElementAspectsWithElementsStrategy.js +0 -47
- package/lib/cjs/ExportElementAspectsWithElementsStrategy.js.map +0 -1
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.ExportElementAspectsWithElementsStrategy = void 0;
|
|
8
|
-
const core_backend_1 = require("@itwin/core-backend");
|
|
9
|
-
const ExportElementAspectsStrategy_1 = require("./ExportElementAspectsStrategy");
|
|
10
|
-
/**
|
|
11
|
-
* ElementAspect export strategy for [[IModelExporter]].
|
|
12
|
-
* This strategy exports ElementAspects together with their Elements.
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
|
-
class ExportElementAspectsWithElementsStrategy extends ExportElementAspectsStrategy_1.ExportElementAspectsStrategy {
|
|
16
|
-
async exportElementAspectsForElement(elementId) {
|
|
17
|
-
const _uniqueAspects = await Promise.all(this.sourceDb.elements
|
|
18
|
-
._queryAspects(elementId, core_backend_1.ElementUniqueAspect.classFullName, this.excludedElementAspectClassFullNames)
|
|
19
|
-
.filter((a) => this.shouldExportElementAspect(a))
|
|
20
|
-
.map(async (uniqueAspect) => {
|
|
21
|
-
const isInsertChange = this.aspectChanges?.insertIds.has(uniqueAspect.id) ?? false;
|
|
22
|
-
const isUpdateChange = this.aspectChanges?.updateIds.has(uniqueAspect.id) ?? false;
|
|
23
|
-
const doExport = this.aspectChanges === undefined ||
|
|
24
|
-
isInsertChange ||
|
|
25
|
-
isUpdateChange;
|
|
26
|
-
if (doExport) {
|
|
27
|
-
const isKnownUpdate = this.aspectChanges
|
|
28
|
-
? isUpdateChange
|
|
29
|
-
: undefined;
|
|
30
|
-
this.handler.onExportElementUniqueAspect(uniqueAspect, isKnownUpdate);
|
|
31
|
-
await this.handler.trackProgress();
|
|
32
|
-
}
|
|
33
|
-
}));
|
|
34
|
-
const multiAspects = this.sourceDb.elements
|
|
35
|
-
._queryAspects(elementId, core_backend_1.ElementMultiAspect.classFullName, this.excludedElementAspectClassFullNames)
|
|
36
|
-
.filter((a) => this.shouldExportElementAspect(a));
|
|
37
|
-
if (multiAspects.length > 0) {
|
|
38
|
-
this.handler.onExportElementMultiAspects(multiAspects);
|
|
39
|
-
return this.handler.trackProgress();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
async exportAllElementAspects() {
|
|
43
|
-
// All aspects are exported with their owning elements and don't need to be exported separately.
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.ExportElementAspectsWithElementsStrategy = ExportElementAspectsWithElementsStrategy;
|
|
47
|
-
//# sourceMappingURL=ExportElementAspectsWithElementsStrategy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExportElementAspectsWithElementsStrategy.js","sourceRoot":"","sources":["../../src/ExportElementAspectsWithElementsStrategy.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,sDAA8E;AAE9E,iFAA8E;AAE9E;;;;GAIG;AACH,MAAa,wCAAyC,SAAQ,2DAA4B;IACxE,KAAK,CAAC,8BAA8B,CAClD,SAAqB;QAErB,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC,GAAG,CACtC,IAAI,CAAC,QAAQ,CAAC,QAAQ;aACnB,aAAa,CACZ,SAAS,EACT,kCAAmB,CAAC,aAAa,EACjC,IAAI,CAAC,mCAAmC,CACzC;aACA,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC;aAChD,GAAG,CAAC,KAAK,EAAE,YAAiC,EAAE,EAAE;YAC/C,MAAM,cAAc,GAClB,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC;YAC9D,MAAM,cAAc,GAClB,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC;YAC9D,MAAM,QAAQ,GACZ,IAAI,CAAC,aAAa,KAAK,SAAS;gBAChC,cAAc;gBACd,cAAc,CAAC;YACjB,IAAI,QAAQ,EAAE,CAAC;gBACb,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa;oBACtC,CAAC,CAAC,cAAc;oBAChB,CAAC,CAAC,SAAS,CAAC;gBACd,IAAI,CAAC,OAAO,CAAC,2BAA2B,CACtC,YAAY,EACZ,aAAa,CACd,CAAC;gBACF,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;YACrC,CAAC;QACH,CAAC,CAAC,CACL,CAAC;QAEF,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ;aACxC,aAAa,CACZ,SAAS,EACT,iCAAkB,CAAC,aAAa,EAChC,IAAI,CAAC,mCAAmC,CACzC;aACA,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC;QAEpD,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC5B,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC,YAAY,CAAC,CAAC;YACvD,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;QACtC,CAAC;IACH,CAAC;IAEe,KAAK,CAAC,uBAAuB;QAC3C,gGAAgG;IAClG,CAAC;CACF;AAnDD,4FAmDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { ElementMultiAspect, ElementUniqueAspect } from \"@itwin/core-backend\";\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { ExportElementAspectsStrategy } from \"./ExportElementAspectsStrategy\";\n\n/**\n * ElementAspect export strategy for [[IModelExporter]].\n * This strategy exports ElementAspects together with their Elements.\n * @internal\n */\nexport class ExportElementAspectsWithElementsStrategy extends ExportElementAspectsStrategy {\n public override async exportElementAspectsForElement(\n elementId: Id64String\n ): Promise<void> {\n const _uniqueAspects = await Promise.all(\n this.sourceDb.elements\n ._queryAspects(\n elementId,\n ElementUniqueAspect.classFullName,\n this.excludedElementAspectClassFullNames\n )\n .filter((a) => this.shouldExportElementAspect(a))\n .map(async (uniqueAspect: ElementUniqueAspect) => {\n const isInsertChange =\n this.aspectChanges?.insertIds.has(uniqueAspect.id) ?? false;\n const isUpdateChange =\n this.aspectChanges?.updateIds.has(uniqueAspect.id) ?? false;\n const doExport =\n this.aspectChanges === undefined ||\n isInsertChange ||\n isUpdateChange;\n if (doExport) {\n const isKnownUpdate = this.aspectChanges\n ? isUpdateChange\n : undefined;\n this.handler.onExportElementUniqueAspect(\n uniqueAspect,\n isKnownUpdate\n );\n await this.handler.trackProgress();\n }\n })\n );\n\n const multiAspects = this.sourceDb.elements\n ._queryAspects(\n elementId,\n ElementMultiAspect.classFullName,\n this.excludedElementAspectClassFullNames\n )\n .filter((a) => this.shouldExportElementAspect(a));\n\n if (multiAspects.length > 0) {\n this.handler.onExportElementMultiAspects(multiAspects);\n return this.handler.trackProgress();\n }\n }\n\n public override async exportAllElementAspects(): Promise<void> {\n // All aspects are exported with their owning elements and don't need to be exported separately.\n }\n}\n"]}
|