@itwin/core-backend 5.1.0-dev.9 → 5.1.0
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/CHANGELOG.md +155 -1
- package/lib/cjs/BackendHubAccess.d.ts +1 -1
- package/lib/cjs/BackendHubAccess.js +1 -1
- package/lib/cjs/BackendHubAccess.js.map +1 -1
- package/lib/cjs/BackendLoggerCategory.js.map +1 -1
- package/lib/cjs/BisCoreSchema.d.ts.map +1 -1
- package/lib/cjs/BisCoreSchema.js +4 -2
- package/lib/cjs/BisCoreSchema.js.map +1 -1
- package/lib/cjs/BlobContainerService.js.map +1 -1
- package/lib/cjs/BriefcaseManager.d.ts +10 -2
- package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
- package/lib/cjs/BriefcaseManager.js +16 -0
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/CatalogDb.js.map +1 -1
- package/lib/cjs/Category.d.ts +4 -4
- package/lib/cjs/Category.js +4 -4
- package/lib/cjs/Category.js.map +1 -1
- package/lib/cjs/ChangeSummaryManager.js +2 -2
- package/lib/cjs/ChangeSummaryManager.js.map +1 -1
- package/lib/cjs/ChangedElementsDb.js.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.d.ts +67 -8
- package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.js +490 -275
- package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
- package/lib/cjs/ChannelControl.js.map +1 -1
- package/lib/cjs/CheckpointManager.js.map +1 -1
- package/lib/cjs/ClassRegistry.d.ts +9 -1
- package/lib/cjs/ClassRegistry.d.ts.map +1 -1
- package/lib/cjs/ClassRegistry.js +14 -6
- package/lib/cjs/ClassRegistry.js.map +1 -1
- package/lib/cjs/CloudSqlite.js +1 -1
- package/lib/cjs/CloudSqlite.js.map +1 -1
- package/lib/cjs/CodeService.js.map +1 -1
- package/lib/cjs/CodeSpecs.d.ts +1 -1
- package/lib/cjs/CodeSpecs.js +1 -1
- package/lib/cjs/CodeSpecs.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
- package/lib/cjs/DevTools.js.map +1 -1
- package/lib/cjs/DisplayStyle.d.ts +4 -4
- package/lib/cjs/DisplayStyle.js +3 -3
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/ECDb.d.ts +4 -4
- package/lib/cjs/ECDb.d.ts.map +1 -1
- package/lib/cjs/ECDb.js +4 -4
- package/lib/cjs/ECDb.js.map +1 -1
- package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
- package/lib/cjs/ECSqlStatement.d.ts +15 -6
- package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
- package/lib/cjs/ECSqlStatement.js +19 -4
- package/lib/cjs/ECSqlStatement.js.map +1 -1
- package/lib/cjs/Element.d.ts +54 -51
- package/lib/cjs/Element.d.ts.map +1 -1
- package/lib/cjs/Element.js +67 -52
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/ElementAspect.d.ts +8 -8
- package/lib/cjs/ElementAspect.d.ts.map +1 -1
- package/lib/cjs/ElementAspect.js +8 -8
- package/lib/cjs/ElementAspect.js.map +1 -1
- package/lib/cjs/ElementGraphics.js.map +1 -1
- package/lib/cjs/ElementTreeWalker.js.map +1 -1
- package/lib/cjs/Entity.d.ts +10 -7
- package/lib/cjs/Entity.d.ts.map +1 -1
- package/lib/cjs/Entity.js +35 -13
- package/lib/cjs/Entity.js.map +1 -1
- package/lib/cjs/EntityReferences.js.map +1 -1
- package/lib/cjs/ExportGraphics.d.ts +54 -8
- package/lib/cjs/ExportGraphics.d.ts.map +1 -1
- package/lib/cjs/ExportGraphics.js +158 -59
- package/lib/cjs/ExportGraphics.js.map +1 -1
- package/lib/cjs/ExternalSource.js.map +1 -1
- package/lib/cjs/FontFile.js.map +1 -1
- package/lib/cjs/GeoCoordConfig.js.map +1 -1
- package/lib/cjs/GeographicCRSServices.d.ts +6 -2
- package/lib/cjs/GeographicCRSServices.d.ts.map +1 -1
- package/lib/cjs/GeographicCRSServices.js +1 -1
- package/lib/cjs/GeographicCRSServices.js.map +1 -1
- package/lib/cjs/GeometrySummary.js +47 -47
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +37 -26
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +132 -55
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelDbFonts.js.map +1 -1
- package/lib/cjs/IModelElementCloneContext.d.ts +1 -1
- package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
- package/lib/cjs/IModelElementCloneContext.js +1 -1
- package/lib/cjs/IModelElementCloneContext.js.map +1 -1
- package/lib/cjs/IModelHost.d.ts +2 -3
- package/lib/cjs/IModelHost.d.ts.map +1 -1
- package/lib/cjs/IModelHost.js +2 -3
- package/lib/cjs/IModelHost.js.map +1 -1
- package/lib/cjs/IModelIncrementalSchemaLocater.d.ts +36 -0
- package/lib/cjs/IModelIncrementalSchemaLocater.d.ts.map +1 -0
- package/lib/cjs/IModelIncrementalSchemaLocater.js +69 -0
- package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -0
- package/lib/cjs/IModelJsFs.js.map +1 -1
- package/lib/cjs/ImageSourceConversion.js.map +1 -1
- package/lib/cjs/IpcHost.js.map +1 -1
- package/lib/cjs/LineStyle.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/LocalhostIpcHost.js.map +1 -1
- package/lib/cjs/LockControl.js.map +1 -1
- package/lib/cjs/Material.d.ts +4 -3
- package/lib/cjs/Material.d.ts.map +1 -1
- package/lib/cjs/Material.js +5 -5
- package/lib/cjs/Material.js.map +1 -1
- package/lib/cjs/Model.d.ts +22 -22
- package/lib/cjs/Model.js +22 -22
- package/lib/cjs/Model.js.map +1 -1
- package/lib/cjs/NativeAppStorage.js.map +1 -1
- package/lib/cjs/NativeHost.js.map +1 -1
- package/lib/cjs/NavigationRelationship.js.map +1 -1
- package/lib/cjs/PromiseMemoizer.js.map +1 -1
- package/lib/cjs/PropertyStore.js.map +1 -1
- package/lib/cjs/Relationship.d.ts +3 -0
- package/lib/cjs/Relationship.d.ts.map +1 -1
- package/lib/cjs/Relationship.js +15 -0
- package/lib/cjs/Relationship.js.map +1 -1
- package/lib/cjs/RpcBackend.js.map +1 -1
- package/lib/cjs/SQLiteDb.d.ts +1 -1
- package/lib/cjs/SQLiteDb.js +1 -1
- package/lib/cjs/SQLiteDb.js.map +1 -1
- package/lib/cjs/Schema.d.ts +25 -0
- package/lib/cjs/Schema.d.ts.map +1 -1
- package/lib/cjs/Schema.js +25 -0
- package/lib/cjs/Schema.js.map +1 -1
- package/lib/cjs/SchemaSync.js.map +1 -1
- package/lib/cjs/SchemaUtils.js.map +1 -1
- package/lib/cjs/SheetIndex.js.map +1 -1
- package/lib/cjs/SqliteChangesetReader.js.map +1 -1
- package/lib/cjs/SqliteStatement.d.ts +1 -1
- package/lib/cjs/SqliteStatement.d.ts.map +1 -1
- package/lib/cjs/SqliteStatement.js +1 -1
- package/lib/cjs/SqliteStatement.js.map +1 -1
- package/lib/cjs/Texture.d.ts +1 -1
- package/lib/cjs/Texture.js +1 -1
- package/lib/cjs/Texture.js.map +1 -1
- package/lib/cjs/TileStorage.js.map +1 -1
- package/lib/cjs/TxnManager.d.ts +4 -4
- package/lib/cjs/TxnManager.js +1 -1
- package/lib/cjs/TxnManager.js.map +1 -1
- package/lib/cjs/ViewDefinition.d.ts +40 -14
- package/lib/cjs/ViewDefinition.d.ts.map +1 -1
- package/lib/cjs/ViewDefinition.js +42 -14
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/ViewStateHydrator.js.map +1 -1
- package/lib/cjs/ViewStore.js.map +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +61 -0
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -0
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +110 -0
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -0
- package/lib/cjs/annotations/FrameGeometry.d.ts +51 -0
- package/lib/cjs/annotations/FrameGeometry.d.ts.map +1 -0
- package/lib/cjs/annotations/FrameGeometry.js +249 -0
- package/lib/cjs/annotations/FrameGeometry.js.map +1 -0
- package/lib/cjs/annotations/LeaderGeometry.d.ts +53 -0
- package/lib/cjs/annotations/LeaderGeometry.d.ts.map +1 -0
- package/lib/cjs/annotations/LeaderGeometry.js +184 -0
- package/lib/cjs/annotations/LeaderGeometry.js.map +1 -0
- package/lib/cjs/annotations/TextAnnotationElement.d.ts +204 -0
- package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -0
- package/lib/cjs/annotations/TextAnnotationElement.js +411 -0
- package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -0
- package/lib/cjs/annotations/TextAnnotationGeometry.d.ts +33 -0
- package/lib/cjs/annotations/TextAnnotationGeometry.d.ts.map +1 -0
- package/lib/cjs/annotations/TextAnnotationGeometry.js +137 -0
- package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -0
- package/lib/cjs/annotations/TextBlockGeometry.d.ts +16 -0
- package/lib/cjs/annotations/TextBlockGeometry.d.ts.map +1 -0
- package/lib/cjs/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +28 -70
- package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -0
- package/lib/cjs/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +69 -22
- package/lib/cjs/annotations/TextBlockLayout.d.ts.map +1 -0
- package/lib/cjs/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +174 -49
- package/lib/cjs/annotations/TextBlockLayout.js.map +1 -0
- package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
- package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
- package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
- package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
- package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
- package/lib/cjs/core-backend.d.ts +7 -3
- package/lib/cjs/core-backend.d.ts.map +1 -1
- package/lib/cjs/core-backend.js +27 -6
- package/lib/cjs/core-backend.js.map +1 -1
- package/lib/cjs/domains/FunctionalElements.js.map +1 -1
- package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
- package/lib/cjs/domains/GenericElements.js.map +1 -1
- package/lib/cjs/domains/GenericSchema.js.map +1 -1
- package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
- package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
- package/lib/cjs/internal/ElementLRUCache.d.ts +23 -0
- package/lib/cjs/internal/ElementLRUCache.d.ts.map +1 -1
- package/lib/cjs/internal/ElementLRUCache.js +167 -3
- package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
- package/lib/cjs/internal/FontFileImpl.js.map +1 -1
- package/lib/cjs/internal/HubMock.js.map +1 -1
- package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -1
- package/lib/cjs/internal/NativePlatform.js.map +1 -1
- package/lib/cjs/internal/NoLocks.js.map +1 -1
- package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
- package/lib/cjs/internal/Symbols.d.ts +1 -0
- package/lib/cjs/internal/Symbols.d.ts.map +1 -1
- package/lib/cjs/internal/Symbols.js +2 -1
- package/lib/cjs/internal/Symbols.js.map +1 -1
- package/lib/cjs/internal/annotations/fields.d.ts +22 -0
- package/lib/cjs/internal/annotations/fields.d.ts.map +1 -0
- package/lib/cjs/internal/annotations/fields.js +237 -0
- package/lib/cjs/internal/annotations/fields.js.map +1 -0
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
- package/lib/cjs/rpc/multipart.js.map +1 -1
- package/lib/cjs/rpc/tracing.js.map +1 -1
- package/lib/cjs/rpc/web/logging.js.map +1 -1
- package/lib/cjs/rpc/web/request.js.map +1 -1
- package/lib/cjs/rpc/web/response.js.map +1 -1
- package/lib/cjs/rpc-impl/DevToolsRpcImpl.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/rpc-impl/IModelTileRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
- package/lib/cjs/workspace/Settings.js.map +1 -1
- package/lib/cjs/workspace/SettingsSchemas.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/cjs/workspace/WorkspaceEditor.js.map +1 -1
- package/lib/esm/BackendHubAccess.d.ts +1 -1
- package/lib/esm/BackendHubAccess.js +1 -1
- package/lib/esm/BackendHubAccess.js.map +1 -1
- package/lib/esm/BackendLoggerCategory.js.map +1 -1
- package/lib/esm/BisCoreSchema.d.ts.map +1 -1
- package/lib/esm/BisCoreSchema.js +4 -2
- package/lib/esm/BisCoreSchema.js.map +1 -1
- package/lib/esm/BlobContainerService.js.map +1 -1
- package/lib/esm/BriefcaseManager.d.ts +10 -2
- package/lib/esm/BriefcaseManager.d.ts.map +1 -1
- package/lib/esm/BriefcaseManager.js +17 -1
- package/lib/esm/BriefcaseManager.js.map +1 -1
- package/lib/esm/CatalogDb.js.map +1 -1
- package/lib/esm/Category.d.ts +4 -4
- package/lib/esm/Category.js +4 -4
- package/lib/esm/Category.js.map +1 -1
- package/lib/esm/ChangeSummaryManager.js +2 -2
- package/lib/esm/ChangeSummaryManager.js.map +1 -1
- package/lib/esm/ChangedElementsDb.js.map +1 -1
- package/lib/esm/ChangesetECAdaptor.d.ts +67 -8
- package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -1
- package/lib/esm/ChangesetECAdaptor.js +490 -275
- package/lib/esm/ChangesetECAdaptor.js.map +1 -1
- package/lib/esm/ChannelControl.js.map +1 -1
- package/lib/esm/CheckpointManager.js.map +1 -1
- package/lib/esm/ClassRegistry.d.ts +9 -1
- package/lib/esm/ClassRegistry.d.ts.map +1 -1
- package/lib/esm/ClassRegistry.js +14 -6
- package/lib/esm/ClassRegistry.js.map +1 -1
- package/lib/esm/CloudSqlite.js +1 -1
- package/lib/esm/CloudSqlite.js.map +1 -1
- package/lib/esm/CodeService.js.map +1 -1
- package/lib/esm/CodeSpecs.d.ts +1 -1
- package/lib/esm/CodeSpecs.js +1 -1
- package/lib/esm/CodeSpecs.js.map +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/CustomViewState3dCreator.js.map +1 -1
- package/lib/esm/DevTools.js.map +1 -1
- package/lib/esm/DisplayStyle.d.ts +4 -4
- package/lib/esm/DisplayStyle.js +3 -3
- package/lib/esm/DisplayStyle.js.map +1 -1
- package/lib/esm/ECDb.d.ts +4 -4
- package/lib/esm/ECDb.d.ts.map +1 -1
- package/lib/esm/ECDb.js +4 -4
- package/lib/esm/ECDb.js.map +1 -1
- package/lib/esm/ECSchemaXmlContext.js.map +1 -1
- package/lib/esm/ECSqlStatement.d.ts +15 -6
- package/lib/esm/ECSqlStatement.d.ts.map +1 -1
- package/lib/esm/ECSqlStatement.js +19 -4
- package/lib/esm/ECSqlStatement.js.map +1 -1
- package/lib/esm/Element.d.ts +54 -51
- package/lib/esm/Element.d.ts.map +1 -1
- package/lib/esm/Element.js +67 -52
- package/lib/esm/Element.js.map +1 -1
- package/lib/esm/ElementAspect.d.ts +8 -8
- package/lib/esm/ElementAspect.d.ts.map +1 -1
- package/lib/esm/ElementAspect.js +8 -8
- package/lib/esm/ElementAspect.js.map +1 -1
- package/lib/esm/ElementGraphics.js.map +1 -1
- package/lib/esm/ElementTreeWalker.js.map +1 -1
- package/lib/esm/Entity.d.ts +10 -7
- package/lib/esm/Entity.d.ts.map +1 -1
- package/lib/esm/Entity.js +36 -14
- package/lib/esm/Entity.js.map +1 -1
- package/lib/esm/EntityReferences.js.map +1 -1
- package/lib/esm/ExportGraphics.d.ts +54 -8
- package/lib/esm/ExportGraphics.d.ts.map +1 -1
- package/lib/esm/ExportGraphics.js +156 -58
- package/lib/esm/ExportGraphics.js.map +1 -1
- package/lib/esm/ExternalSource.js.map +1 -1
- package/lib/esm/FontFile.js.map +1 -1
- package/lib/esm/GeoCoordConfig.js.map +1 -1
- package/lib/esm/GeographicCRSServices.d.ts +6 -2
- package/lib/esm/GeographicCRSServices.d.ts.map +1 -1
- package/lib/esm/GeographicCRSServices.js +1 -1
- package/lib/esm/GeographicCRSServices.js.map +1 -1
- package/lib/esm/GeometrySummary.js +47 -47
- package/lib/esm/GeometrySummary.js.map +1 -1
- package/lib/esm/IModelDb.d.ts +37 -26
- package/lib/esm/IModelDb.d.ts.map +1 -1
- package/lib/esm/IModelDb.js +136 -59
- package/lib/esm/IModelDb.js.map +1 -1
- package/lib/esm/IModelDbFonts.js.map +1 -1
- package/lib/esm/IModelElementCloneContext.d.ts +1 -1
- package/lib/esm/IModelElementCloneContext.d.ts.map +1 -1
- package/lib/esm/IModelElementCloneContext.js +1 -1
- package/lib/esm/IModelElementCloneContext.js.map +1 -1
- package/lib/esm/IModelHost.d.ts +2 -3
- package/lib/esm/IModelHost.d.ts.map +1 -1
- package/lib/esm/IModelHost.js +2 -3
- package/lib/esm/IModelHost.js.map +1 -1
- package/lib/esm/IModelIncrementalSchemaLocater.d.ts +36 -0
- package/lib/esm/IModelIncrementalSchemaLocater.d.ts.map +1 -0
- package/lib/esm/IModelIncrementalSchemaLocater.js +65 -0
- package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -0
- package/lib/esm/IModelJsFs.js.map +1 -1
- package/lib/esm/ImageSourceConversion.js.map +1 -1
- package/lib/esm/IpcHost.js.map +1 -1
- package/lib/esm/LineStyle.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/LocalhostIpcHost.js.map +1 -1
- package/lib/esm/LockControl.js.map +1 -1
- package/lib/esm/Material.d.ts +4 -3
- package/lib/esm/Material.d.ts.map +1 -1
- package/lib/esm/Material.js +5 -5
- package/lib/esm/Material.js.map +1 -1
- package/lib/esm/Model.d.ts +22 -22
- package/lib/esm/Model.js +22 -22
- package/lib/esm/Model.js.map +1 -1
- package/lib/esm/NativeAppStorage.js.map +1 -1
- package/lib/esm/NativeHost.js.map +1 -1
- package/lib/esm/NavigationRelationship.js.map +1 -1
- package/lib/esm/PromiseMemoizer.js.map +1 -1
- package/lib/esm/PropertyStore.js.map +1 -1
- package/lib/esm/Relationship.d.ts +3 -0
- package/lib/esm/Relationship.d.ts.map +1 -1
- package/lib/esm/Relationship.js +15 -0
- package/lib/esm/Relationship.js.map +1 -1
- package/lib/esm/RpcBackend.js.map +1 -1
- package/lib/esm/SQLiteDb.d.ts +1 -1
- package/lib/esm/SQLiteDb.js +1 -1
- package/lib/esm/SQLiteDb.js.map +1 -1
- package/lib/esm/Schema.d.ts +25 -0
- package/lib/esm/Schema.d.ts.map +1 -1
- package/lib/esm/Schema.js +25 -0
- package/lib/esm/Schema.js.map +1 -1
- package/lib/esm/SchemaSync.js.map +1 -1
- package/lib/esm/SchemaUtils.js.map +1 -1
- package/lib/esm/SheetIndex.js.map +1 -1
- package/lib/esm/SqliteChangesetReader.js.map +1 -1
- package/lib/esm/SqliteStatement.d.ts +1 -1
- package/lib/esm/SqliteStatement.d.ts.map +1 -1
- package/lib/esm/SqliteStatement.js +1 -1
- package/lib/esm/SqliteStatement.js.map +1 -1
- package/lib/esm/Texture.d.ts +1 -1
- package/lib/esm/Texture.js +1 -1
- package/lib/esm/Texture.js.map +1 -1
- package/lib/esm/TileStorage.js.map +1 -1
- package/lib/esm/TxnManager.d.ts +4 -4
- package/lib/esm/TxnManager.js +1 -1
- package/lib/esm/TxnManager.js.map +1 -1
- package/lib/esm/ViewDefinition.d.ts +40 -14
- package/lib/esm/ViewDefinition.d.ts.map +1 -1
- package/lib/esm/ViewDefinition.js +42 -14
- package/lib/esm/ViewDefinition.js.map +1 -1
- package/lib/esm/ViewStateHydrator.js.map +1 -1
- package/lib/esm/ViewStore.js.map +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +61 -0
- package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -0
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js +105 -0
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -0
- package/lib/esm/annotations/FrameGeometry.d.ts +51 -0
- package/lib/esm/annotations/FrameGeometry.d.ts.map +1 -0
- package/lib/esm/annotations/FrameGeometry.js +244 -0
- package/lib/esm/annotations/FrameGeometry.js.map +1 -0
- package/lib/esm/annotations/LeaderGeometry.d.ts +53 -0
- package/lib/esm/annotations/LeaderGeometry.d.ts.map +1 -0
- package/lib/esm/annotations/LeaderGeometry.js +179 -0
- package/lib/esm/annotations/LeaderGeometry.js.map +1 -0
- package/lib/esm/annotations/TextAnnotationElement.d.ts +204 -0
- package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -0
- package/lib/esm/annotations/TextAnnotationElement.js +405 -0
- package/lib/esm/annotations/TextAnnotationElement.js.map +1 -0
- package/lib/esm/annotations/TextAnnotationGeometry.d.ts +33 -0
- package/lib/esm/annotations/TextAnnotationGeometry.d.ts.map +1 -0
- package/lib/esm/annotations/TextAnnotationGeometry.js +134 -0
- package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -0
- package/lib/esm/annotations/TextBlockGeometry.d.ts +16 -0
- package/lib/esm/annotations/TextBlockGeometry.d.ts.map +1 -0
- package/lib/esm/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +28 -70
- package/lib/esm/annotations/TextBlockGeometry.js.map +1 -0
- package/lib/esm/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +69 -22
- package/lib/esm/annotations/TextBlockLayout.d.ts.map +1 -0
- package/lib/esm/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +172 -48
- package/lib/esm/annotations/TextBlockLayout.js.map +1 -0
- package/lib/esm/core-backend.d.ts +7 -3
- package/lib/esm/core-backend.d.ts.map +1 -1
- package/lib/esm/core-backend.js +27 -3
- package/lib/esm/core-backend.js.map +1 -1
- package/lib/esm/domains/FunctionalElements.js.map +1 -1
- package/lib/esm/domains/FunctionalSchema.js.map +1 -1
- package/lib/esm/domains/GenericElements.js.map +1 -1
- package/lib/esm/domains/GenericSchema.js.map +1 -1
- package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -1
- package/lib/esm/internal/ChannelAdmin.js.map +1 -1
- package/lib/esm/internal/ElementLRUCache.d.ts +23 -0
- package/lib/esm/internal/ElementLRUCache.d.ts.map +1 -1
- package/lib/esm/internal/ElementLRUCache.js +165 -2
- package/lib/esm/internal/ElementLRUCache.js.map +1 -1
- package/lib/esm/internal/FontFileImpl.js.map +1 -1
- package/lib/esm/internal/HubMock.js.map +1 -1
- package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -1
- package/lib/esm/internal/NativePlatform.js.map +1 -1
- package/lib/esm/internal/NoLocks.js.map +1 -1
- package/lib/esm/internal/ServerBasedLocks.js.map +1 -1
- package/lib/esm/internal/Symbols.d.ts +1 -0
- package/lib/esm/internal/Symbols.d.ts.map +1 -1
- package/lib/esm/internal/Symbols.js +1 -0
- package/lib/esm/internal/Symbols.js.map +1 -1
- package/lib/esm/internal/annotations/fields.d.ts +22 -0
- package/lib/esm/internal/annotations/fields.d.ts.map +1 -0
- package/lib/esm/internal/annotations/fields.js +231 -0
- package/lib/esm/internal/annotations/fields.js.map +1 -0
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
- package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -1
- package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
- package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
- package/lib/esm/rpc/multipart.js.map +1 -1
- package/lib/esm/rpc/tracing.js.map +1 -1
- package/lib/esm/rpc/web/logging.js.map +1 -1
- package/lib/esm/rpc/web/request.js.map +1 -1
- package/lib/esm/rpc/web/response.js.map +1 -1
- package/lib/esm/rpc-impl/DevToolsRpcImpl.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/rpc-impl/IModelTileRpcImpl.js.map +1 -1
- package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
- package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
- package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
- package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
- package/lib/esm/test/AdvancedEqual.js.map +1 -1
- package/lib/esm/test/AnnotationTestUtils.d.ts +15 -0
- package/lib/esm/test/AnnotationTestUtils.d.ts.map +1 -0
- package/lib/esm/test/AnnotationTestUtils.js +41 -0
- package/lib/esm/test/AnnotationTestUtils.js.map +1 -0
- package/lib/esm/test/AttachDb.test.js +11 -11
- package/lib/esm/test/AttachDb.test.js.map +1 -1
- package/lib/esm/test/ElementLRUCache.test.js +224 -1
- package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
- package/lib/esm/test/GeometryTestUtil.js.map +1 -1
- package/lib/esm/test/IModelHost.test.js.map +1 -1
- package/lib/esm/test/IModelTestUtils.d.ts.map +1 -1
- package/lib/esm/test/IModelTestUtils.js +1 -0
- package/lib/esm/test/IModelTestUtils.js.map +1 -1
- package/lib/esm/test/ImageSourceConversion.test.js.map +1 -1
- package/lib/esm/test/IpcHost.test.js.map +1 -1
- package/lib/esm/test/KnownTestLocations.js.map +1 -1
- package/lib/esm/test/PrintElementTree.js.map +1 -1
- package/lib/esm/test/PropertyDb.test.js.map +1 -1
- package/lib/esm/test/RevisionUtility.js.map +1 -1
- package/lib/esm/test/SchemaUtils.test.js +25 -25
- package/lib/esm/test/SchemaUtils.test.js.map +1 -1
- package/lib/esm/test/SequentialLogMatcher.js.map +1 -1
- package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
- package/lib/esm/test/TestUtils.d.ts +1 -1
- package/lib/esm/test/TestUtils.d.ts.map +1 -1
- package/lib/esm/test/TestUtils.js +1 -1
- package/lib/esm/test/TestUtils.js.map +1 -1
- package/lib/esm/test/annotations/Fields.test.d.ts +2 -0
- package/lib/esm/test/annotations/Fields.test.d.ts.map +1 -0
- package/lib/esm/test/annotations/Fields.test.js +576 -0
- package/lib/esm/test/annotations/Fields.test.js.map +1 -0
- package/lib/esm/test/annotations/FrameGeometry.test.d.ts +2 -0
- package/lib/esm/test/annotations/FrameGeometry.test.d.ts.map +1 -0
- package/lib/esm/test/annotations/FrameGeometry.test.js +86 -0
- package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -0
- package/lib/esm/test/annotations/LeaderGeometry.test.d.ts +2 -0
- package/lib/esm/test/annotations/LeaderGeometry.test.d.ts.map +1 -0
- package/lib/esm/test/annotations/LeaderGeometry.test.js +256 -0
- package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -0
- package/lib/esm/test/annotations/TextAnnotation.test.js +269 -1047
- package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
- package/lib/esm/test/annotations/TextBlock.test.d.ts +2 -0
- package/lib/esm/test/annotations/TextBlock.test.d.ts.map +1 -0
- package/lib/esm/test/annotations/TextBlock.test.js +1199 -0
- package/lib/esm/test/annotations/TextBlock.test.js.map +1 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.d.ts +60 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.d.ts.map +1 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js +69 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts +1442 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts.map +1 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js +817 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -0
- package/lib/esm/test/categories/Category.test.js.map +1 -1
- package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
- package/lib/esm/test/ecdb/CTE.test.js +88 -88
- package/lib/esm/test/ecdb/CTE.test.js.map +1 -1
- package/lib/esm/test/ecdb/ConcurrentQuery.test.d.ts +2 -0
- package/lib/esm/test/ecdb/ConcurrentQuery.test.d.ts.map +1 -0
- package/lib/esm/test/ecdb/ConcurrentQuery.test.js +164 -0
- package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -0
- package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +35 -45
- package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECDb.test.js +86 -65
- package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -1
- package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlAst.test.js +65 -65
- package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlQuery.test.js +0 -55
- package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlReader.test.js +16 -16
- package/lib/esm/test/ecdb/ECSqlReader.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlStatement.test.js +484 -292
- package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
- package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
- package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +21 -21
- package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
- package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
- package/lib/esm/test/element/ElementAspect.test.js +22 -22
- package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
- package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
- package/lib/esm/test/element/ElementRoundTrip.test.js +139 -139
- package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
- package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
- package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
- package/lib/esm/test/element/NullStructArray.test.js +13 -13
- package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
- package/lib/esm/test/element/UrlLink.test.js.map +1 -1
- package/lib/esm/test/font/FontFile.test.js.map +1 -1
- package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
- package/lib/esm/test/hubaccess/ApplyChangeset.test.d.ts +2 -0
- package/lib/esm/test/hubaccess/ApplyChangeset.test.d.ts.map +1 -0
- package/lib/esm/test/hubaccess/ApplyChangeset.test.js +86 -0
- package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -0
- package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
- package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -1
- package/lib/esm/test/imageData.js.map +1 -1
- package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
- package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -1
- package/lib/esm/test/imodel/IModel.test.js +313 -5
- package/lib/esm/test/imodel/IModel.test.js.map +1 -1
- package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
- package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.d.ts +2 -0
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js +343 -0
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.d.ts +2 -0
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js +207 -0
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts +11 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js +36 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts +17 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js +116 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts +9 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js +20 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js.map +1 -0
- package/lib/esm/test/index.js.map +1 -1
- package/lib/esm/test/misc/DevTools.test.js.map +1 -1
- package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -1
- package/lib/esm/test/misc/GeoServices.test.js +36 -10
- package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
- package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -1
- package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -1
- package/lib/esm/test/rpc/response.test.js.map +1 -1
- package/lib/esm/test/schema/ClassRegistry.test.js +175 -73
- package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
- package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
- package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
- package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
- package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangesetReader.test.js +575 -164
- package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
- package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -1
- package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
- package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
- package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
- package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
- package/lib/esm/test/standalone/ExportGraphics.test.js +67 -15
- package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
- package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
- package/lib/esm/test/standalone/GeometryStream.test.js +49 -1
- package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
- package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
- package/lib/esm/test/standalone/IModelLimits.test.d.ts +2 -0
- package/lib/esm/test/standalone/IModelLimits.test.d.ts.map +1 -0
- package/lib/esm/test/standalone/IModelLimits.test.js +103 -0
- package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -0
- package/lib/esm/test/standalone/IModelWrite.test.js +27 -27
- package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
- package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
- package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
- package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -1
- package/lib/esm/test/standalone/RenderMaterialElement.test.js +24 -1
- package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
- package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
- package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -1
- package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -1
- package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
- package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
- package/lib/esm/test/standalone/Setting.test.js.map +1 -1
- package/lib/esm/test/standalone/Settings.test.js.map +1 -1
- package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
- package/lib/esm/test/standalone/SnapshotDb.test.js +19 -1
- package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
- package/lib/esm/test/standalone/Texture.test.js.map +1 -1
- package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
- package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
- package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
- package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
- package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -1
- package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
- package/lib/esm/workspace/Settings.js.map +1 -1
- package/lib/esm/workspace/SettingsSchemas.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/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
- package/package.json +22 -16
- package/lib/cjs/TextAnnotationElement.d.ts +0 -54
- package/lib/cjs/TextAnnotationElement.d.ts.map +0 -1
- package/lib/cjs/TextAnnotationElement.js +0 -94
- package/lib/cjs/TextAnnotationElement.js.map +0 -1
- package/lib/cjs/TextAnnotationGeometry.d.ts +0 -32
- package/lib/cjs/TextAnnotationGeometry.d.ts.map +0 -1
- package/lib/cjs/TextAnnotationGeometry.js.map +0 -1
- package/lib/cjs/TextAnnotationLayout.d.ts.map +0 -1
- package/lib/cjs/TextAnnotationLayout.js.map +0 -1
- package/lib/esm/TextAnnotationElement.d.ts +0 -54
- package/lib/esm/TextAnnotationElement.d.ts.map +0 -1
- package/lib/esm/TextAnnotationElement.js +0 -89
- package/lib/esm/TextAnnotationElement.js.map +0 -1
- package/lib/esm/TextAnnotationGeometry.d.ts +0 -32
- package/lib/esm/TextAnnotationGeometry.d.ts.map +0 -1
- package/lib/esm/TextAnnotationGeometry.js.map +0 -1
- package/lib/esm/TextAnnotationLayout.d.ts.map +0 -1
- package/lib/esm/TextAnnotationLayout.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectExtents.test.js","sourceRoot":"","sources":["../../../../src/test/imodel/ProjectExtents.test.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC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MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QACjE,MAAM,CAAC,MAAM,CAAC,mBAAoB,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QAC/E,MAAM,CAAC,MAAM,CAAC,mBAAoB,CAAC,GAAG,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QACzF,MAAM,CAAC,MAAM,CAAC,mBAAoB,CAAC,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACjG,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","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 { expect } from \"chai\";\nimport { Id64 } from \"@itwin/core-bentley\";\nimport { GeometricElement3dProps, Placement3d } from \"@itwin/core-common\";\nimport { GeometricElement3d, SnapshotDb } from \"../../core-backend\";\nimport { IModelTestUtils } from \"../index\";\n\ndescribe(\"computeProjectExtents\", () => {\n let imodel: SnapshotDb;\n\n before(() => {\n imodel = IModelTestUtils.createSnapshotFromSeed(IModelTestUtils.prepareOutputFile(\"IModel\", \"test.bim\"), IModelTestUtils.resolveAssetFile(\"test.bim\"));\n });\n\n after(() => {\n imodel.close();\n });\n\n it(\"should return requested information\", () => {\n const projectExtents = imodel.projectExtents;\n const args = [undefined, false, true];\n for (const reportExtentsWithOutliers of args) {\n for (const reportOutliers of args) {\n const result = imodel.computeProjectExtents({ reportExtentsWithOutliers, reportOutliers });\n expect(result.extents.isAlmostEqual(projectExtents)).to.be.true;\n\n expect(undefined !== result.extentsWithOutliers).to.equal(true === reportExtentsWithOutliers);\n if (undefined !== result.extentsWithOutliers)\n expect(result.extentsWithOutliers.isAlmostEqual(projectExtents)).to.be.true;\n\n expect(undefined !== result.outliers).to.equal(true === reportOutliers);\n if (undefined !== result.outliers)\n expect(result.outliers.length).to.equal(0);\n }\n }\n });\n\n it(\"should report outliers\", () => {\n const elemProps = imodel.elements.getElementProps<GeometricElement3dProps>({ id: \"0x39\", wantGeometry: true });\n elemProps.id = Id64.invalid;\n const placement = Placement3d.fromJSON(elemProps.placement);\n const originalOrigin = placement.origin.clone();\n const mult = 1000000;\n placement.origin.x *= mult;\n placement.origin.y *= mult;\n placement.origin.z *= mult;\n elemProps.placement = placement;\n elemProps.geom![2].sphere!.radius = 0.000001;\n const newId = imodel.elements.insertElement(elemProps);\n expect(Id64.isValid(newId)).to.be.true;\n imodel.saveChanges();\n\n const newElem = imodel.elements.getElement<GeometricElement3d>(newId);\n expect(newElem).instanceof(GeometricElement3d);\n expect(newElem.placement.origin.x).to.equal(originalOrigin.x * mult);\n expect(newElem.placement.origin.y).to.equal(originalOrigin.y * mult);\n expect(newElem.placement.origin.z).to.equal(originalOrigin.z * mult);\n\n const outlierRange = placement.calculateRange();\n const originalExtents = imodel.projectExtents;\n const extentsWithOutlier = originalExtents.clone();\n extentsWithOutlier.extendRange(outlierRange);\n\n const result = imodel.computeProjectExtents({ reportExtentsWithOutliers: true, reportOutliers: true });\n expect(result.outliers!.length).to.equal(1);\n expect(result.outliers![0]).to.equal(newId);\n expect(result.extents.isAlmostEqual(originalExtents)).to.be.true;\n expect(result.extentsWithOutliers!.isAlmostEqual(originalExtents)).to.be.false;\n expect(result.extentsWithOutliers!.low.isAlmostEqual(extentsWithOutlier.low)).to.be.true;\n expect(result.extentsWithOutliers!.high.isAlmostEqual(extentsWithOutlier.high, 20)).to.be.true;\n });\n});\n"]}
|
|
1
|
+
{"version":3,"file":"ProjectExtents.test.js","sourceRoot":"","sources":["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C5C,MAAM,CAAC,MAAM,CAAC,QAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC5C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QACjE,MAAM,CAAC,MAAM,CAAC,mBAAoB,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QAC/E,MAAM,CAAC,MAAM,CAAC,mBAAoB,CAAC,GAAG,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QACzF,MAAM,CAAC,MAAM,CAAC,mBAAoB,CAAC,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACjG,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { expect } from \"chai\";\r\nimport { Id64 } from \"@itwin/core-bentley\";\r\nimport { GeometricElement3dProps, Placement3d } from \"@itwin/core-common\";\r\nimport { GeometricElement3d, SnapshotDb } from \"../../core-backend\";\r\nimport { IModelTestUtils } from \"../index\";\r\n\r\ndescribe(\"computeProjectExtents\", () => {\r\n let imodel: SnapshotDb;\r\n\r\n before(() => {\r\n imodel = IModelTestUtils.createSnapshotFromSeed(IModelTestUtils.prepareOutputFile(\"IModel\", \"test.bim\"), IModelTestUtils.resolveAssetFile(\"test.bim\"));\r\n });\r\n\r\n after(() => {\r\n imodel.close();\r\n });\r\n\r\n it(\"should return requested information\", () => {\r\n const projectExtents = imodel.projectExtents;\r\n const args = [undefined, false, true];\r\n for (const reportExtentsWithOutliers of args) {\r\n for (const reportOutliers of args) {\r\n const result = imodel.computeProjectExtents({ reportExtentsWithOutliers, reportOutliers });\r\n expect(result.extents.isAlmostEqual(projectExtents)).to.be.true;\r\n\r\n expect(undefined !== result.extentsWithOutliers).to.equal(true === reportExtentsWithOutliers);\r\n if (undefined !== result.extentsWithOutliers)\r\n expect(result.extentsWithOutliers.isAlmostEqual(projectExtents)).to.be.true;\r\n\r\n expect(undefined !== result.outliers).to.equal(true === reportOutliers);\r\n if (undefined !== result.outliers)\r\n expect(result.outliers.length).to.equal(0);\r\n }\r\n }\r\n });\r\n\r\n it(\"should report outliers\", () => {\r\n const elemProps = imodel.elements.getElementProps<GeometricElement3dProps>({ id: \"0x39\", wantGeometry: true });\r\n elemProps.id = Id64.invalid;\r\n const placement = Placement3d.fromJSON(elemProps.placement);\r\n const originalOrigin = placement.origin.clone();\r\n const mult = 1000000;\r\n placement.origin.x *= mult;\r\n placement.origin.y *= mult;\r\n placement.origin.z *= mult;\r\n elemProps.placement = placement;\r\n elemProps.geom![2].sphere!.radius = 0.000001;\r\n const newId = imodel.elements.insertElement(elemProps);\r\n expect(Id64.isValid(newId)).to.be.true;\r\n imodel.saveChanges();\r\n\r\n const newElem = imodel.elements.getElement<GeometricElement3d>(newId);\r\n expect(newElem).instanceof(GeometricElement3d);\r\n expect(newElem.placement.origin.x).to.equal(originalOrigin.x * mult);\r\n expect(newElem.placement.origin.y).to.equal(originalOrigin.y * mult);\r\n expect(newElem.placement.origin.z).to.equal(originalOrigin.z * mult);\r\n\r\n const outlierRange = placement.calculateRange();\r\n const originalExtents = imodel.projectExtents;\r\n const extentsWithOutlier = originalExtents.clone();\r\n extentsWithOutlier.extendRange(outlierRange);\r\n\r\n const result = imodel.computeProjectExtents({ reportExtentsWithOutliers: true, reportOutliers: true });\r\n expect(result.outliers!.length).to.equal(1);\r\n expect(result.outliers![0]).to.equal(newId);\r\n expect(result.extents.isAlmostEqual(originalExtents)).to.be.true;\r\n expect(result.extentsWithOutliers!.isAlmostEqual(originalExtents)).to.be.false;\r\n expect(result.extentsWithOutliers!.low.isAlmostEqual(extentsWithOutlier.low)).to.be.true;\r\n expect(result.extentsWithOutliers!.high.isAlmostEqual(extentsWithOutlier.high, 20)).to.be.true;\r\n });\r\n});\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaXmlImport.test.js","sourceRoot":"","sources":["../../../../src/test/imodel/SchemaXmlImport.test.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,IAAI,MAAkB,CAAC;IAEvB,MAAM,CAAC,GAAG,EAAE;QACV,qBAAqB;QACrB,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,CAAC,mBAAmB,EAAE,CAAC;YAC7B,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACzC,CAAC;QACD,MAAM,YAAY,GAAG,eAAe,CAAC,iBAAiB,CAAC,iBAAiB,EAAE,qBAAqB,CAAC,CAAC;QACjG,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,YAAY,EAAE,EAAE,WAAW,EAAE,EAAE,IAAI,EA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,cAAc,CAAC,MAAM,EAAE,CAAC,oHAAoH,QAAQ,KAAK,CAAC,EAAE,IAAI,CAAC,EAAE,UAAU,QAAQ,gCAAgC,CAAC,CAAC;YACpO,MAAM,CAAC,MAAM,cAAc,CAAC,MAAM,EAAE,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,EAAE,UAAU,QAAQ,8BAA8B,CAAC,CAAC;QAChH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","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*--------------------------------------------------------------------------------------------*/\nimport { assert } from \"chai\";\nimport * as fs from \"fs\";\nimport * as path from \"path\";\nimport { PhysicalElement, SnapshotDb } from \"../../core-backend\";\nimport { IModelTestUtils } from \"../IModelTestUtils\";\nimport { Logger, LogLevel } from \"@itwin/core-bentley\";\nimport { KnownTestLocations } from \"../KnownTestLocations\";\nimport { EntityClass } from \"@itwin/ecschema-metadata\";\n\ndescribe(\"Schema XML Import Tests\", () => {\n let imodel: SnapshotDb;\n\n before(() => {\n // initialize logging\n if (false) {\n Logger.initializeToConsole();\n Logger.setLevelDefault(LogLevel.Error);\n }\n const testFileName = IModelTestUtils.prepareOutputFile(\"SchemaXMLImport\", \"SchemaXMLImport.bim\");\n imodel = SnapshotDb.createEmpty(testFileName, { rootSubject: { name: \"SchemaXMLImportTest\" } }); // IModelTestUtils.createSnapshotFromSeed(testFileName, seedFileName);\n assert.exists(imodel);\n });\n\n after(() => {\n if (imodel)\n imodel.close();\n });\n\n it(\"should import schema XML\", async () => {\n const schemaFilePath = path.join(KnownTestLocations.assetsDir, \"Test3.ecschema.xml\");\n const schemaString = fs.readFileSync(schemaFilePath, \"utf8\");\n\n await imodel.importSchemaStrings([schemaString]); // will throw an exception if import fails\n\n const testDomainClass = await imodel.schemaContext.getSchemaItem(\"Test3.Test3Element\", EntityClass);\n assert.isDefined(testDomainClass);\n\n assert.isDefined(testDomainClass?.baseClass);\n\n assert.equal(testDomainClass?.baseClass?.fullName, PhysicalElement.classFullName.replace(\":\", \".\"));\n });\n\n it(\"Schema import for newer ECXml Versions\", async () => {\n const helperFunction = async (imodelDb: SnapshotDb, xmlSchema: string[], importSchema: boolean) => {\n try {\n // ECObjects is expected to throw for schemas that fail to import\n if (importSchema)\n await imodelDb.importSchemaStrings(xmlSchema);\n else\n imodelDb.getSchemaProps(xmlSchema[0]);\n } catch {\n return false;\n }\n return true;\n };\n\n // Incrementing major ECXml version is not supported\n for (const testCase of [`4.1`, `5.10`]) {\n assert(!(await helperFunction(imodel, [`<ECSchema schemaName=\"TestSchema\" alias=\"ts\" version=\"1.0.0\" xmlns=\"http://www.bentley.com/schemas/Bentley.ECXML.${testCase}\"/>`], true)), `Schema ${testCase} import should not have succeeded.`);\n assert(!(await helperFunction(imodel, [`TestSchema`], false)), `Schema ${testCase} test should not have succeeded.`);\n }\n\n // Importing a set of schemas should all fail if any one of them fails\n {\n const schemaXmls = [`<ECSchema schemaName=\"TestSchema1\" alias=\"ts1\" version=\"1.0.0\" xmlns=\"http://www.bentley.com/schemas/Bentley.ECXML.3.2\"/>`,\n `<ECSchema schemaName=\"TestSchema2\" alias=\"ts2\" version=\"1.0.0\" xmlns=\"http://www.bentley.com/schemas/Bentley.ECXML.3.8\"/>`,\n `<ECSchema schemaName=\"TestSchema3\" alias=\"ts3\" version=\"1.0.0\" xmlns=\"http://www.bentley.com/schemas/Bentley.ECXML.4.5\"/>`];\n\n assert(!(await helperFunction(imodel, schemaXmls, true)), `Schema import should not have succeeded.`);\n assert(!(await helperFunction(imodel, [`TestSchema1`], false)), `Schema TestSchema1 import should not have succeeded.`);\n assert(!(await helperFunction(imodel, [`TestSchema2`], false)), `Schema TestSchema2 import should not have succeeded.`);\n assert(!(await helperFunction(imodel, [`TestSchema3`], false)), `Schema TestSchema3 import should not have succeeded.`);\n }\n\n // Schema should be imported successfully\n for (const testCase of [`3.2`, `3.5`]) {\n assert(await helperFunction(imodel, [`<ECSchema schemaName=\"TestSchema\" alias=\"ts\" version=\"1.0.0\" xmlns=\"http://www.bentley.com/schemas/Bentley.ECXML.${testCase}\"/>`], true), `Schema ${testCase} import should have succeeded.`);\n assert(await helperFunction(imodel, [`TestSchema`], false), `Schema ${testCase} test should have succeeded.`);\n }\n });\n});\n"]}
|
|
1
|
+
{"version":3,"file":"SchemaXmlImport.test.js","sourceRoot":"","sources":["../../../../src/test/imodel/SchemaXmlImport.test.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,IAAI,MAAkB,CAAC;IAEvB,MAAM,CAAC,GAAG,EAAE;QACV,qBAAqB;QACrB,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,CAAC,mBAAmB,EAAE,CAAC;YAC7B,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACzC,CAAC;QACD,MAAM,YAAY,GAAG,eAAe,CAAC,iBAAiB,CAAC,iBAAiB,EAAE,qBAAqB,CAAC,CAAC;QACjG,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,YAAY,EAAE,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE,EAAE,CAAC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C,oHAAoH,QAAQ,KAAK,CAAC,EAAE,IAAI,CAAC,EAAE,UAAU,QAAQ,gCAAgC,CAAC,CAAC;YACpO,MAAM,CAAC,MAAM,cAAc,CAAC,MAAM,EAAE,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,EAAE,UAAU,QAAQ,8BAA8B,CAAC,CAAC;QAChH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { assert } from \"chai\";\r\nimport * as fs from \"fs\";\r\nimport * as path from \"path\";\r\nimport { PhysicalElement, SnapshotDb } from \"../../core-backend\";\r\nimport { IModelTestUtils } from \"../IModelTestUtils\";\r\nimport { Logger, LogLevel } from \"@itwin/core-bentley\";\r\nimport { KnownTestLocations } from \"../KnownTestLocations\";\r\nimport { EntityClass } from \"@itwin/ecschema-metadata\";\r\n\r\ndescribe(\"Schema XML Import Tests\", () => {\r\n let imodel: SnapshotDb;\r\n\r\n before(() => {\r\n // initialize logging\r\n if (false) {\r\n Logger.initializeToConsole();\r\n Logger.setLevelDefault(LogLevel.Error);\r\n }\r\n const testFileName = IModelTestUtils.prepareOutputFile(\"SchemaXMLImport\", \"SchemaXMLImport.bim\");\r\n imodel = SnapshotDb.createEmpty(testFileName, { rootSubject: { name: \"SchemaXMLImportTest\" } }); // IModelTestUtils.createSnapshotFromSeed(testFileName, seedFileName);\r\n assert.exists(imodel);\r\n });\r\n\r\n after(() => {\r\n if (imodel)\r\n imodel.close();\r\n });\r\n\r\n it(\"should import schema XML\", async () => {\r\n const schemaFilePath = path.join(KnownTestLocations.assetsDir, \"Test3.ecschema.xml\");\r\n const schemaString = fs.readFileSync(schemaFilePath, \"utf8\");\r\n\r\n await imodel.importSchemaStrings([schemaString]); // will throw an exception if import fails\r\n\r\n const testDomainClass = await imodel.schemaContext.getSchemaItem(\"Test3.Test3Element\", EntityClass);\r\n assert.isDefined(testDomainClass);\r\n\r\n assert.isDefined(testDomainClass?.baseClass);\r\n\r\n assert.equal(testDomainClass?.baseClass?.fullName, PhysicalElement.classFullName.replace(\":\", \".\"));\r\n });\r\n\r\n it(\"Schema import for newer ECXml Versions\", async () => {\r\n const helperFunction = async (imodelDb: SnapshotDb, xmlSchema: string[], importSchema: boolean) => {\r\n try {\r\n // ECObjects is expected to throw for schemas that fail to import\r\n if (importSchema)\r\n await imodelDb.importSchemaStrings(xmlSchema);\r\n else\r\n imodelDb.getSchemaProps(xmlSchema[0]);\r\n } catch {\r\n return false;\r\n }\r\n return true;\r\n };\r\n\r\n // Incrementing major ECXml version is not supported\r\n for (const testCase of [`4.1`, `5.10`]) {\r\n assert(!(await helperFunction(imodel, [`<ECSchema schemaName=\"TestSchema\" alias=\"ts\" version=\"1.0.0\" xmlns=\"http://www.bentley.com/schemas/Bentley.ECXML.${testCase}\"/>`], true)), `Schema ${testCase} import should not have succeeded.`);\r\n assert(!(await helperFunction(imodel, [`TestSchema`], false)), `Schema ${testCase} test should not have succeeded.`);\r\n }\r\n\r\n // Importing a set of schemas should all fail if any one of them fails\r\n {\r\n const schemaXmls = [`<ECSchema schemaName=\"TestSchema1\" alias=\"ts1\" version=\"1.0.0\" xmlns=\"http://www.bentley.com/schemas/Bentley.ECXML.3.2\"/>`,\r\n `<ECSchema schemaName=\"TestSchema2\" alias=\"ts2\" version=\"1.0.0\" xmlns=\"http://www.bentley.com/schemas/Bentley.ECXML.3.8\"/>`,\r\n `<ECSchema schemaName=\"TestSchema3\" alias=\"ts3\" version=\"1.0.0\" xmlns=\"http://www.bentley.com/schemas/Bentley.ECXML.4.5\"/>`];\r\n\r\n assert(!(await helperFunction(imodel, schemaXmls, true)), `Schema import should not have succeeded.`);\r\n assert(!(await helperFunction(imodel, [`TestSchema1`], false)), `Schema TestSchema1 import should not have succeeded.`);\r\n assert(!(await helperFunction(imodel, [`TestSchema2`], false)), `Schema TestSchema2 import should not have succeeded.`);\r\n assert(!(await helperFunction(imodel, [`TestSchema3`], false)), `Schema TestSchema3 import should not have succeeded.`);\r\n }\r\n\r\n // Schema should be imported successfully\r\n for (const testCase of [`3.2`, `3.5`]) {\r\n assert(await helperFunction(imodel, [`<ECSchema schemaName=\"TestSchema\" alias=\"ts\" version=\"1.0.0\" xmlns=\"http://www.bentley.com/schemas/Bentley.ECXML.${testCase}\"/>`], true), `Schema ${testCase} import should have succeeded.`);\r\n assert(await helperFunction(imodel, [`TestSchema`], false), `Schema ${testCase} test should have succeeded.`);\r\n }\r\n });\r\n});\r\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ECSqlQueries.test.d.ts","sourceRoot":"","sources":["../../../../src/test/incrementalSchemaLocater/ECSqlQueries.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { Schema, SchemaItemType, SchemaKey } from "@itwin/ecschema-metadata";
|
|
2
|
+
import { IncrementalTestHelper } from "./utils/IncrementalTestHelper";
|
|
3
|
+
import { expect, use } from "chai";
|
|
4
|
+
import * as deepEqualInAnyOrder from "deep-equal-in-any-order";
|
|
5
|
+
import { TestSqlSchemaLocater } from "./utils/TestSqlSchemaLocater";
|
|
6
|
+
use(deepEqualInAnyOrder);
|
|
7
|
+
function findItem(name, rowData) {
|
|
8
|
+
const item = rowData.find((i) => i.name === name);
|
|
9
|
+
if (!item)
|
|
10
|
+
throw new Error(`Could not find schema item '${name}'`);
|
|
11
|
+
return item;
|
|
12
|
+
}
|
|
13
|
+
function findProperty(name, rowData) {
|
|
14
|
+
return rowData.find((i) => i.name === name);
|
|
15
|
+
}
|
|
16
|
+
function isECClass(item) {
|
|
17
|
+
return item.schemaItemType === SchemaItemType.EntityClass || item.schemaItemType === SchemaItemType.Mixin || item.schemaItemType === SchemaItemType.RelationshipClass ||
|
|
18
|
+
item.schemaItemType === SchemaItemType.StructClass || item.schemaItemType === SchemaItemType.CustomAttributeClass;
|
|
19
|
+
}
|
|
20
|
+
function isRelationshipClass(item) {
|
|
21
|
+
return "source" in item && "target" in item;
|
|
22
|
+
}
|
|
23
|
+
describe("ECSql query tests", function () {
|
|
24
|
+
let schemaLoader;
|
|
25
|
+
function validateItem(name, itemPropObjects, schema) {
|
|
26
|
+
const actualJson = findItem(name, itemPropObjects);
|
|
27
|
+
const expectedItem = schema.getItemSync(name);
|
|
28
|
+
const expectedJson = expectedItem.toJSON();
|
|
29
|
+
// The following code exists because some data coming from the database will not match the
|
|
30
|
+
// data from the context due to default values. This is OK as long as the conditions are
|
|
31
|
+
// correct. For instance, schemaItem name will not exist in serialized JSON, but does exist
|
|
32
|
+
// coming from the DB. RelationshipConstraint's AbstractConstraint is set when only one
|
|
33
|
+
// constraint class exists coming from the database, but a serialized Relationship will not
|
|
34
|
+
// contain the abstract constraint. The one constraint is 'assumed' to be the abstract constraint.
|
|
35
|
+
expect(actualJson.name).to.equal(expectedItem?.name);
|
|
36
|
+
delete actualJson.name;
|
|
37
|
+
if (isECClass(actualJson)) {
|
|
38
|
+
if (expectedJson.schemaItemType === "Mixin") {
|
|
39
|
+
expect(actualJson.modifier).to.be.oneOf([undefined, 'Abstract']);
|
|
40
|
+
delete actualJson.modifier;
|
|
41
|
+
}
|
|
42
|
+
else if (expectedJson.modifier === undefined) {
|
|
43
|
+
expect(actualJson.modifier).to.be.oneOf([undefined, 'None']);
|
|
44
|
+
delete actualJson.modifier;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (isRelationshipClass(actualJson)) {
|
|
48
|
+
// abstract can be set via database, but not via context for 1 constraint class
|
|
49
|
+
// so verify constraint and conditions are correct and delete property
|
|
50
|
+
const expectedRelationship = expectedJson;
|
|
51
|
+
if (actualJson.source.abstractConstraint !== expectedRelationship.source.abstractConstraint) {
|
|
52
|
+
expect(actualJson.source.abstractConstraint).to.equal(expectedRelationship.source.constraintClasses[0]);
|
|
53
|
+
expect(actualJson.source.constraintClasses.length).to.equal(1);
|
|
54
|
+
delete actualJson.source.abstractConstraint;
|
|
55
|
+
}
|
|
56
|
+
if (actualJson.target.abstractConstraint !== expectedRelationship.target.abstractConstraint) {
|
|
57
|
+
expect(actualJson.target.abstractConstraint).to.equal(expectedRelationship.target.constraintClasses[0]);
|
|
58
|
+
expect(actualJson.target.constraintClasses.length).to.equal(1);
|
|
59
|
+
delete actualJson.target.abstractConstraint;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (actualJson.schemaItemType === SchemaItemType.Format) {
|
|
63
|
+
if (undefined !== actualJson.includeZero && undefined === expectedJson.includeZero) {
|
|
64
|
+
expect(actualJson.includeZero).to.equal(true);
|
|
65
|
+
delete actualJson.includeZero;
|
|
66
|
+
}
|
|
67
|
+
if (actualJson.composite && undefined !== actualJson.composite.includeZero && undefined === expectedJson.composite.includeZero) {
|
|
68
|
+
expect(actualJson.composite.includeZero).to.equal(true);
|
|
69
|
+
delete actualJson.composite.includeZero;
|
|
70
|
+
}
|
|
71
|
+
if (actualJson.composite && undefined !== actualJson.composite.spacer && undefined === expectedJson.composite.spacer) {
|
|
72
|
+
expect(actualJson.composite.spacer).to.equal(" ");
|
|
73
|
+
delete actualJson.composite.spacer;
|
|
74
|
+
}
|
|
75
|
+
if (undefined !== actualJson.decimalSeparator && undefined === expectedJson.decimalSeparator) {
|
|
76
|
+
expect(actualJson.decimalSeparator).to.equal(".");
|
|
77
|
+
delete actualJson.decimalSeparator;
|
|
78
|
+
}
|
|
79
|
+
if (undefined !== actualJson.roundFactor && undefined === expectedJson.roundFactor) {
|
|
80
|
+
expect(actualJson.roundFactor).to.equal(0);
|
|
81
|
+
delete actualJson.roundFactor;
|
|
82
|
+
}
|
|
83
|
+
if (undefined !== actualJson.showSignOption && undefined === expectedJson.showSignOption) {
|
|
84
|
+
expect(actualJson.showSignOption).to.equal("OnlyNegative");
|
|
85
|
+
delete actualJson.showSignOption;
|
|
86
|
+
}
|
|
87
|
+
if (undefined !== actualJson.thousandSeparator && undefined === expectedJson.thousandSeparator) {
|
|
88
|
+
expect(actualJson.thousandSeparator).to.equal(",");
|
|
89
|
+
delete actualJson.thousandSeparator;
|
|
90
|
+
}
|
|
91
|
+
if (undefined !== actualJson.uomSeparator && undefined === expectedJson.uomSeparator) {
|
|
92
|
+
expect(actualJson.uomSeparator).to.equal(" ");
|
|
93
|
+
delete actualJson.uomSeparator;
|
|
94
|
+
}
|
|
95
|
+
if (undefined !== actualJson.spacer && undefined === expectedJson.spacer) {
|
|
96
|
+
expect(actualJson.spacer).to.equal(" ");
|
|
97
|
+
delete actualJson.spacer;
|
|
98
|
+
}
|
|
99
|
+
if (undefined !== actualJson.formatTraits) {
|
|
100
|
+
actualJson.formatTraits = actualJson.formatTraits.map((trait) => {
|
|
101
|
+
return trait.charAt(0).toUpperCase() + trait.slice(1);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
expect(actualJson).to.deep.equalInAnyOrder(expectedJson);
|
|
106
|
+
}
|
|
107
|
+
this.beforeEach(async () => {
|
|
108
|
+
await IncrementalTestHelper.setup();
|
|
109
|
+
schemaLoader = new TestSqlSchemaLocater(IncrementalTestHelper.iModel);
|
|
110
|
+
});
|
|
111
|
+
afterEach(async () => {
|
|
112
|
+
await IncrementalTestHelper.close();
|
|
113
|
+
});
|
|
114
|
+
it("Schema query, props parsed successfully", async function () {
|
|
115
|
+
const testKey = new SchemaKey("SchemaTest", 1, 0, 0);
|
|
116
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
117
|
+
const expectedSchema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
118
|
+
if (!expectedSchema)
|
|
119
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
120
|
+
const actualSchemaProps = await schemaLoader.getSchemaJson(testKey, IncrementalTestHelper.context);
|
|
121
|
+
const actualSchema = await Schema.fromJson(actualSchemaProps, IncrementalTestHelper.context);
|
|
122
|
+
expect(actualSchema.toJSON()).to.deep.equal(expectedSchema?.toJSON());
|
|
123
|
+
});
|
|
124
|
+
it("Property query, props parsed successfully", async function () {
|
|
125
|
+
const testKey = new SchemaKey("PropertyTest", 1, 0, 0);
|
|
126
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
127
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
128
|
+
if (!schema)
|
|
129
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
130
|
+
const classPropsObjects = await schemaLoader.getEntities(testKey.name, IncrementalTestHelper.context);
|
|
131
|
+
const entityOneProps = findItem("EntityOne", classPropsObjects);
|
|
132
|
+
const entityTwoProps = findItem("EntityTwo", classPropsObjects);
|
|
133
|
+
const expectedEntityOne = await schema.getEntityClass("EntityOne");
|
|
134
|
+
const expectedEntityTwo = await schema.getEntityClass("EntityTwo");
|
|
135
|
+
const validateProperty = (propertyName, actualItem = entityOneProps, expectedItem = expectedEntityOne) => {
|
|
136
|
+
const actualProperty = findProperty(propertyName, actualItem.properties);
|
|
137
|
+
const expectedProperty = expectedItem?.getPropertySync(propertyName);
|
|
138
|
+
// if maxOccurs is the maximum int value in the context Schema,
|
|
139
|
+
// the property from the DB will not have a value
|
|
140
|
+
if (expectedProperty.maxOccurs === 2147483647) {
|
|
141
|
+
expect(actualProperty.maxOccurs).to.be.undefined;
|
|
142
|
+
// set so comparison will pass
|
|
143
|
+
actualProperty.maxOccurs = 2147483647;
|
|
144
|
+
}
|
|
145
|
+
expect(actualProperty).to.deep.equal(expectedProperty?.toJSON());
|
|
146
|
+
};
|
|
147
|
+
// All but one testable property is in EntityOne
|
|
148
|
+
for (const property of await expectedEntityOne.getProperties(true)) {
|
|
149
|
+
validateProperty(property.name);
|
|
150
|
+
}
|
|
151
|
+
// Backward direction Navigation property is in EntityTwo
|
|
152
|
+
validateProperty("EntityTwoParent", entityTwoProps, expectedEntityTwo);
|
|
153
|
+
});
|
|
154
|
+
it("Entity query, props parsed successfully", async function () {
|
|
155
|
+
const testKey = new SchemaKey("EntityTest", 1, 0, 0);
|
|
156
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
157
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
158
|
+
if (!schema)
|
|
159
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
160
|
+
const classPropsObjects = await schemaLoader.getEntities(testKey.name, IncrementalTestHelper.context);
|
|
161
|
+
expect(classPropsObjects.length).to.be.greaterThan(0);
|
|
162
|
+
validateItem("EntityModifierNone", classPropsObjects, schema);
|
|
163
|
+
validateItem("EntityModifierAbstract", classPropsObjects, schema);
|
|
164
|
+
validateItem("EntityModifierSealed", classPropsObjects, schema);
|
|
165
|
+
});
|
|
166
|
+
it("Struct query, props parsed successfully", async function () {
|
|
167
|
+
const testKey = new SchemaKey("StructTest", 1, 0, 0);
|
|
168
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
169
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
170
|
+
if (!schema)
|
|
171
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
172
|
+
const classPropsObjects = await schemaLoader.getStructs(testKey.name, IncrementalTestHelper.context);
|
|
173
|
+
expect(classPropsObjects.length).to.be.greaterThan(0);
|
|
174
|
+
validateItem("StructModifierNone", classPropsObjects, schema);
|
|
175
|
+
validateItem("StructModifierAbstract", classPropsObjects, schema);
|
|
176
|
+
validateItem("StructModifierSealed", classPropsObjects, schema);
|
|
177
|
+
});
|
|
178
|
+
it("Mixin query, props parsed successfully", async function () {
|
|
179
|
+
const testKey = new SchemaKey("MixinTest", 1, 0, 0);
|
|
180
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
181
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
182
|
+
if (!schema)
|
|
183
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
184
|
+
const classPropsObjects = await schemaLoader.getMixins(testKey.name, IncrementalTestHelper.context);
|
|
185
|
+
expect(classPropsObjects.length).to.be.greaterThan(0);
|
|
186
|
+
validateItem("IBaseMixin", classPropsObjects, schema);
|
|
187
|
+
validateItem("ITestMixin", classPropsObjects, schema);
|
|
188
|
+
});
|
|
189
|
+
it("Relationship query, props parsed successfully", async function () {
|
|
190
|
+
const testKey = new SchemaKey("RelationshipTest", 1, 0, 0);
|
|
191
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
192
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
193
|
+
if (!schema)
|
|
194
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
195
|
+
const classPropsObjects = await schemaLoader.getRelationships(testKey.name, IncrementalTestHelper.context);
|
|
196
|
+
expect(classPropsObjects.length).to.be.greaterThan(0);
|
|
197
|
+
validateItem("OwnerOwnsVehicles", classPropsObjects, schema);
|
|
198
|
+
validateItem("OwnerOwnsCars", classPropsObjects, schema);
|
|
199
|
+
validateItem("OwnerOwnsAmericanCars", classPropsObjects, schema);
|
|
200
|
+
validateItem("PhysicalModelBreaksDownCarElement", classPropsObjects, schema);
|
|
201
|
+
});
|
|
202
|
+
it("CustomAttributeClass query, props parsed successfully", async function () {
|
|
203
|
+
const testKey = new SchemaKey("CustomAttributeClassTest", 1, 0, 0);
|
|
204
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
205
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
206
|
+
if (!schema)
|
|
207
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
208
|
+
const classPropsObjects = await schemaLoader.getCustomAttributeClasses(testKey.name, IncrementalTestHelper.context);
|
|
209
|
+
expect(classPropsObjects.length).to.be.greaterThan(0);
|
|
210
|
+
validateItem("CustomAttributeModifierNone", classPropsObjects, schema);
|
|
211
|
+
validateItem("CustomAttributeModifierSealed", classPropsObjects, schema);
|
|
212
|
+
validateItem("CustomAttributeModifierAbstract", classPropsObjects, schema);
|
|
213
|
+
});
|
|
214
|
+
it("KindOfQuantity query, props parsed successfully", async function () {
|
|
215
|
+
const testKey = new SchemaKey("KindOfQuantityTest", 1, 0, 0);
|
|
216
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
217
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
218
|
+
if (!schema)
|
|
219
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
220
|
+
const itemPropsObjects = await schemaLoader.getKindOfQuantities(testKey.name, IncrementalTestHelper.context);
|
|
221
|
+
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
222
|
+
validateItem("ACCELERATION", itemPropsObjects, schema);
|
|
223
|
+
validateItem("ANGLE", itemPropsObjects, schema);
|
|
224
|
+
});
|
|
225
|
+
it("PropertyCategory query, props parsed successfully", async function () {
|
|
226
|
+
const testKey = new SchemaKey("PropertyCategoryTest", 1, 0, 0);
|
|
227
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
228
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
229
|
+
if (!schema)
|
|
230
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
231
|
+
const itemPropsObjects = await schemaLoader.getPropertyCategories(testKey.name, IncrementalTestHelper.context);
|
|
232
|
+
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
233
|
+
validateItem("PropertyCategory1", itemPropsObjects, schema);
|
|
234
|
+
validateItem("PropertyCategory2", itemPropsObjects, schema);
|
|
235
|
+
});
|
|
236
|
+
it("Enumeration query, props parsed successfully", async function () {
|
|
237
|
+
const testKey = new SchemaKey("EnumerationTest", 1, 0, 0);
|
|
238
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
239
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
240
|
+
if (!schema)
|
|
241
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
242
|
+
const itemPropsObjects = await schemaLoader.getEnumerations(testKey.name, IncrementalTestHelper.context);
|
|
243
|
+
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
244
|
+
validateItem("IntEnumeration", itemPropsObjects, schema);
|
|
245
|
+
validateItem("StringEnumeration", itemPropsObjects, schema);
|
|
246
|
+
});
|
|
247
|
+
it("Unit query, props parsed successfully", async function () {
|
|
248
|
+
const testKey = new SchemaKey("UnitTest", 1, 0, 0);
|
|
249
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
250
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
251
|
+
if (!schema)
|
|
252
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
253
|
+
const itemPropsObjects = await schemaLoader.getUnits(testKey.name, IncrementalTestHelper.context);
|
|
254
|
+
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
255
|
+
validateItem("LITRE", itemPropsObjects, schema);
|
|
256
|
+
validateItem("GALLON", itemPropsObjects, schema);
|
|
257
|
+
validateItem("ACRE", itemPropsObjects, schema);
|
|
258
|
+
validateItem("FAHRENHEIT", itemPropsObjects, schema);
|
|
259
|
+
});
|
|
260
|
+
it("InvertedUnit query, props parsed successfully", async function () {
|
|
261
|
+
const testKey = new SchemaKey("InvertedUnitTest", 1, 0, 0);
|
|
262
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
263
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
264
|
+
if (!schema)
|
|
265
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
266
|
+
const itemPropsObjects = await schemaLoader.getInvertedUnits(testKey.name, IncrementalTestHelper.context);
|
|
267
|
+
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
268
|
+
validateItem("FT_HORIZONTAL_PER_FT_VERTICAL", itemPropsObjects, schema);
|
|
269
|
+
});
|
|
270
|
+
it("UnitSystem query, props parsed successfully", async function () {
|
|
271
|
+
// There's a UnitSystem in there.
|
|
272
|
+
const testKey = new SchemaKey("InvertedUnitTest", 1, 0, 0);
|
|
273
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
274
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
275
|
+
if (!schema)
|
|
276
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
277
|
+
const itemPropsObjects = await schemaLoader.getUnitSystems(testKey.name, IncrementalTestHelper.context);
|
|
278
|
+
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
279
|
+
validateItem("USCUSTOM", itemPropsObjects, schema);
|
|
280
|
+
});
|
|
281
|
+
it("Constant query, props parsed successfully", async function () {
|
|
282
|
+
// There's a UnitSystem in there.
|
|
283
|
+
const testKey = new SchemaKey("ConstantTest", 1, 0, 0);
|
|
284
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
285
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
286
|
+
if (!schema)
|
|
287
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
288
|
+
const itemPropsObjects = await schemaLoader.getConstants(testKey.name, IncrementalTestHelper.context);
|
|
289
|
+
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
290
|
+
validateItem("KILO", itemPropsObjects, schema);
|
|
291
|
+
validateItem("HALF_PI", itemPropsObjects, schema);
|
|
292
|
+
});
|
|
293
|
+
it("Phenomenon query, props parsed successfully", async function () {
|
|
294
|
+
// There's a Phenomenon in there.
|
|
295
|
+
const testKey = new SchemaKey("ConstantTest", 1, 0, 0);
|
|
296
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
297
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
298
|
+
if (!schema)
|
|
299
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
300
|
+
const itemPropsObjects = await schemaLoader.getPhenomenon(testKey.name, IncrementalTestHelper.context);
|
|
301
|
+
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
302
|
+
validateItem("NUMBER", itemPropsObjects, schema);
|
|
303
|
+
validateItem("LENGTH_RATIO", itemPropsObjects, schema);
|
|
304
|
+
});
|
|
305
|
+
it("Format Schema parses successfully", async function () {
|
|
306
|
+
// Using installed Formats schema
|
|
307
|
+
const testKey = new SchemaKey("Formats", 1, 0, 0);
|
|
308
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
309
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
310
|
+
if (!schema)
|
|
311
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
312
|
+
const itemPropsObjects = await schemaLoader.getFormats(testKey.name, IncrementalTestHelper.context);
|
|
313
|
+
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
314
|
+
for (const props of itemPropsObjects) {
|
|
315
|
+
validateItem(props.name, itemPropsObjects, schema);
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
it("Comprehensive Format parses successfully", async function () {
|
|
319
|
+
const testKey = new SchemaKey("FormatTest", 1, 0, 0);
|
|
320
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
321
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
322
|
+
if (!schema)
|
|
323
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
324
|
+
const itemPropsObjects = await schemaLoader.getFormats(testKey.name, IncrementalTestHelper.context);
|
|
325
|
+
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
326
|
+
for (const props of itemPropsObjects) {
|
|
327
|
+
validateItem(props.name, itemPropsObjects, schema);
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
it("CustomAttribute instances parse successfully", async function () {
|
|
331
|
+
const testKey = new SchemaKey("CustomAttributeInstanceTest", 1, 0, 0);
|
|
332
|
+
await IncrementalTestHelper.importSchema(testKey);
|
|
333
|
+
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
334
|
+
if (!schema)
|
|
335
|
+
throw new Error(`Could not find schema ${testKey.name}`);
|
|
336
|
+
const itemPropsObjects = await schemaLoader.getStructs(testKey.name, IncrementalTestHelper.context);
|
|
337
|
+
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
338
|
+
for (const props of itemPropsObjects) {
|
|
339
|
+
validateItem(props.name, itemPropsObjects, schema);
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
//# sourceMappingURL=ECSqlQueries.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ECSqlQueries.test.js","sourceRoot":"","sources":["../../../../src/test/incrementalSchemaLocater/ECSqlQueries.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4E,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACvJ,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,mBAAmB,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAEzB,SAAS,QAAQ,CAA+B,IAAY,EAAE,OAAY;IACxE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAqB,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IACtE,IAAI,CAAC,IAAI;QACP,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,GAAG,CAAC,CAAC;IAC1D,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,YAAY,CAA6B,IAAY,EAAE,OAAY;IAC1E,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAmB,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAChE,CAAC;AAED,SAAS,SAAS,CAAC,IAAwB;IACzC,OAAO,IAAI,CAAC,cAAc,KAAK,cAAc,CAAC,WAAW,IAAI,IAAI,CAAC,cAAc,KAAK,cAAc,CAAC,KAAK,IAAI,IAAI,CAAC,cAAc,KAAK,cAAc,CAAC,iBAAiB;QACjK,IAAI,CAAC,cAAc,KAAK,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MAAM;YACT,MAAM,IAAI,KAAK,CAAC,yBAAyB,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QAE3D,MAAM,gBAAgB,GAAG,MAAM,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;QACpG,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAErD,KAAK,MAAM,KAAK,IAAI,gBAAgB,EAAE,CAAC;YACrC,YAAY,CAAC,KAAK,CAAC,IAAK,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;QACtD,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { AnyPropertyProps, AnySchemaItemProps, ClassProps, RelationshipClassProps, Schema, SchemaItemType, SchemaKey } from \"@itwin/ecschema-metadata\";\r\nimport { IncrementalTestHelper } from \"./utils/IncrementalTestHelper\";\r\nimport { expect, use } from \"chai\";\r\nimport * as deepEqualInAnyOrder from \"deep-equal-in-any-order\";\r\nimport { TestSqlSchemaLocater } from \"./utils/TestSqlSchemaLocater\";\r\n\r\nuse(deepEqualInAnyOrder);\r\n\r\nfunction findItem<T extends AnySchemaItemProps>(name: string, rowData: T[]) {\r\n const item = rowData.find((i: AnySchemaItemProps) => i.name === name);\r\n if (!item)\r\n throw new Error(`Could not find schema item '${name}'`);\r\n return item;\r\n}\r\n\r\nfunction findProperty<T extends AnyPropertyProps>(name: string, rowData: T[]) {\r\n return rowData.find((i: AnyPropertyProps) => i.name === name);\r\n}\r\n\r\nfunction isECClass(item: AnySchemaItemProps): item is ClassProps {\r\n return item.schemaItemType === SchemaItemType.EntityClass || item.schemaItemType === SchemaItemType.Mixin || item.schemaItemType === SchemaItemType.RelationshipClass ||\r\n item.schemaItemType === SchemaItemType.StructClass || item.schemaItemType === SchemaItemType.CustomAttributeClass;\r\n}\r\n\r\nfunction isRelationshipClass(item: AnySchemaItemProps): item is RelationshipClassProps {\r\n return \"source\" in item && \"target\" in item;\r\n}\r\n\r\ndescribe(\"ECSql query tests\", function () {\r\n let schemaLoader: TestSqlSchemaLocater;\r\n\r\n function validateItem(name: string, itemPropObjects: AnySchemaItemProps[], schema: Schema) {\r\n const actualJson = findItem(name, itemPropObjects);\r\n const expectedItem = schema.getItemSync(name);\r\n const expectedJson = expectedItem!.toJSON();\r\n\r\n // The following code exists because some data coming from the database will not match the\r\n // data from the context due to default values. This is OK as long as the conditions are\r\n // correct. For instance, schemaItem name will not exist in serialized JSON, but does exist\r\n // coming from the DB. RelationshipConstraint's AbstractConstraint is set when only one\r\n // constraint class exists coming from the database, but a serialized Relationship will not\r\n // contain the abstract constraint. The one constraint is 'assumed' to be the abstract constraint.\r\n\r\n expect(actualJson.name).to.equal(expectedItem?.name);\r\n delete (actualJson as any).name;\r\n\r\n if (isECClass(actualJson)) {\r\n if (expectedJson.schemaItemType === \"Mixin\") {\r\n expect(actualJson.modifier).to.be.oneOf([undefined, 'Abstract']);\r\n delete (actualJson as any).modifier;\r\n } else if ((expectedJson as ClassProps).modifier === undefined) {\r\n expect(actualJson.modifier).to.be.oneOf([undefined, 'None']);\r\n delete (actualJson as any).modifier;\r\n }\r\n }\r\n if (isRelationshipClass(actualJson)) {\r\n // abstract can be set via database, but not via context for 1 constraint class\r\n // so verify constraint and conditions are correct and delete property\r\n const expectedRelationship = expectedJson as any as RelationshipClassProps;\r\n if (actualJson.source.abstractConstraint !== expectedRelationship.source.abstractConstraint) {\r\n expect(actualJson.source.abstractConstraint).to.equal(expectedRelationship.source.constraintClasses[0]);\r\n expect(actualJson.source.constraintClasses.length).to.equal(1);\r\n delete (actualJson.source as any).abstractConstraint;\r\n }\r\n if (actualJson.target.abstractConstraint !== expectedRelationship.target.abstractConstraint) {\r\n expect(actualJson.target.abstractConstraint).to.equal(expectedRelationship.target.constraintClasses[0]);\r\n expect(actualJson.target.constraintClasses.length).to.equal(1);\r\n delete (actualJson.target as any).abstractConstraint;\r\n }\r\n }\r\n\r\n if (actualJson.schemaItemType === SchemaItemType.Format) {\r\n if (undefined !== (actualJson as any).includeZero && undefined === (expectedJson as any).includeZero) {\r\n expect((actualJson as any).includeZero).to.equal(true);\r\n delete (actualJson as any).includeZero;\r\n }\r\n if ((actualJson as any).composite && undefined !== (actualJson as any).composite.includeZero && undefined === (expectedJson as any).composite.includeZero) {\r\n expect((actualJson as any).composite.includeZero).to.equal(true);\r\n delete (actualJson as any).composite.includeZero;\r\n }\r\n if ((actualJson as any).composite && undefined !== (actualJson as any).composite.spacer && undefined === (expectedJson as any).composite.spacer) {\r\n expect((actualJson as any).composite.spacer).to.equal(\" \");\r\n delete (actualJson as any).composite.spacer;\r\n }\r\n if (undefined !== (actualJson as any).decimalSeparator && undefined === (expectedJson as any).decimalSeparator) {\r\n expect((actualJson as any).decimalSeparator).to.equal(\".\");\r\n delete (actualJson as any).decimalSeparator;\r\n }\r\n if (undefined !== (actualJson as any).roundFactor && undefined === (expectedJson as any).roundFactor) {\r\n expect((actualJson as any).roundFactor).to.equal(0);\r\n delete (actualJson as any).roundFactor;\r\n }\r\n if (undefined !== (actualJson as any).showSignOption && undefined === (expectedJson as any).showSignOption) {\r\n expect((actualJson as any).showSignOption).to.equal(\"OnlyNegative\");\r\n delete (actualJson as any).showSignOption;\r\n }\r\n if (undefined !== (actualJson as any).thousandSeparator && undefined === (expectedJson as any).thousandSeparator) {\r\n expect((actualJson as any).thousandSeparator).to.equal(\",\");\r\n delete (actualJson as any).thousandSeparator;\r\n }\r\n if (undefined !== (actualJson as any).uomSeparator && undefined === (expectedJson as any).uomSeparator) {\r\n expect((actualJson as any).uomSeparator).to.equal(\" \");\r\n delete (actualJson as any).uomSeparator;\r\n }\r\n if (undefined !== (actualJson as any).spacer && undefined === (expectedJson as any).spacer) {\r\n expect((actualJson as any).spacer).to.equal(\" \");\r\n delete (actualJson as any).spacer;\r\n }\r\n if (undefined !== (actualJson as any).formatTraits) {\r\n (actualJson as any).formatTraits = (actualJson as any).formatTraits.map((trait: string) => {\r\n return trait.charAt(0).toUpperCase() + trait.slice(1);\r\n });\r\n }\r\n }\r\n\r\n expect(actualJson).to.deep.equalInAnyOrder(expectedJson);\r\n }\r\n\r\n this.beforeEach(async () => {\r\n await IncrementalTestHelper.setup();\r\n schemaLoader = new TestSqlSchemaLocater(IncrementalTestHelper.iModel);\r\n });\r\n\r\n afterEach(async () => {\r\n await IncrementalTestHelper.close();\r\n });\r\n\r\n it(\"Schema query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"SchemaTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const expectedSchema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!expectedSchema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const actualSchemaProps = await schemaLoader.getSchemaJson(testKey, IncrementalTestHelper.context);\r\n const actualSchema = await Schema.fromJson(actualSchemaProps!, IncrementalTestHelper.context);\r\n\r\n expect(actualSchema.toJSON()).to.deep.equal(expectedSchema?.toJSON());\r\n });\r\n\r\n it(\"Property query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"PropertyTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const classPropsObjects = await schemaLoader.getEntities(testKey.name, IncrementalTestHelper.context);\r\n const entityOneProps = findItem(\"EntityOne\", classPropsObjects);\r\n const entityTwoProps = findItem(\"EntityTwo\", classPropsObjects);\r\n const expectedEntityOne = await schema.getEntityClass(\"EntityOne\");\r\n const expectedEntityTwo = await schema.getEntityClass(\"EntityTwo\");\r\n\r\n const validateProperty = (propertyName: string, actualItem = entityOneProps, expectedItem = expectedEntityOne) => {\r\n const actualProperty = findProperty(propertyName, actualItem.properties!);\r\n const expectedProperty = expectedItem?.getPropertySync(propertyName);\r\n // if maxOccurs is the maximum int value in the context Schema,\r\n // the property from the DB will not have a value\r\n if ((expectedProperty as any).maxOccurs === 2147483647) {\r\n expect((actualProperty as any).maxOccurs).to.be.undefined;\r\n // set so comparison will pass\r\n (actualProperty as any).maxOccurs = 2147483647;\r\n }\r\n\r\n expect(actualProperty).to.deep.equal(expectedProperty?.toJSON());\r\n };\r\n\r\n // All but one testable property is in EntityOne\r\n for (const property of await expectedEntityOne!.getProperties(true)) {\r\n validateProperty(property.name);\r\n }\r\n // Backward direction Navigation property is in EntityTwo\r\n validateProperty(\"EntityTwoParent\", entityTwoProps, expectedEntityTwo);\r\n\r\n });\r\n\r\n it(\"Entity query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"EntityTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const classPropsObjects = await schemaLoader.getEntities(testKey.name, IncrementalTestHelper.context);\r\n expect(classPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"EntityModifierNone\", classPropsObjects, schema);\r\n validateItem(\"EntityModifierAbstract\", classPropsObjects, schema);\r\n validateItem(\"EntityModifierSealed\", classPropsObjects, schema);\r\n });\r\n\r\n it(\"Struct query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"StructTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const classPropsObjects = await schemaLoader.getStructs(testKey.name, IncrementalTestHelper.context);\r\n expect(classPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"StructModifierNone\", classPropsObjects, schema);\r\n validateItem(\"StructModifierAbstract\", classPropsObjects, schema);\r\n validateItem(\"StructModifierSealed\", classPropsObjects, schema);\r\n });\r\n\r\n it(\"Mixin query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"MixinTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const classPropsObjects = await schemaLoader.getMixins(testKey.name, IncrementalTestHelper.context);\r\n expect(classPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"IBaseMixin\", classPropsObjects, schema);\r\n validateItem(\"ITestMixin\", classPropsObjects, schema);\r\n });\r\n\r\n it(\"Relationship query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"RelationshipTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const classPropsObjects = await schemaLoader.getRelationships(testKey.name, IncrementalTestHelper.context);\r\n expect(classPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"OwnerOwnsVehicles\", classPropsObjects, schema);\r\n validateItem(\"OwnerOwnsCars\", classPropsObjects, schema);\r\n validateItem(\"OwnerOwnsAmericanCars\", classPropsObjects, schema);\r\n validateItem(\"PhysicalModelBreaksDownCarElement\", classPropsObjects, schema);\r\n });\r\n\r\n it(\"CustomAttributeClass query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"CustomAttributeClassTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const classPropsObjects = await schemaLoader.getCustomAttributeClasses(testKey.name, IncrementalTestHelper.context);\r\n expect(classPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"CustomAttributeModifierNone\", classPropsObjects, schema);\r\n validateItem(\"CustomAttributeModifierSealed\", classPropsObjects, schema);\r\n validateItem(\"CustomAttributeModifierAbstract\", classPropsObjects, schema);\r\n });\r\n\r\n it(\"KindOfQuantity query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"KindOfQuantityTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLoader.getKindOfQuantities(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"ACCELERATION\", itemPropsObjects, schema);\r\n validateItem(\"ANGLE\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"PropertyCategory query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"PropertyCategoryTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLoader.getPropertyCategories(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"PropertyCategory1\", itemPropsObjects, schema);\r\n validateItem(\"PropertyCategory2\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"Enumeration query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"EnumerationTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLoader.getEnumerations(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"IntEnumeration\", itemPropsObjects, schema);\r\n validateItem(\"StringEnumeration\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"Unit query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"UnitTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLoader.getUnits(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"LITRE\", itemPropsObjects, schema);\r\n validateItem(\"GALLON\", itemPropsObjects, schema);\r\n validateItem(\"ACRE\", itemPropsObjects, schema);\r\n validateItem(\"FAHRENHEIT\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"InvertedUnit query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"InvertedUnitTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLoader.getInvertedUnits(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"FT_HORIZONTAL_PER_FT_VERTICAL\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"UnitSystem query, props parsed successfully\", async function () {\r\n // There's a UnitSystem in there.\r\n const testKey = new SchemaKey(\"InvertedUnitTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLoader.getUnitSystems(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"USCUSTOM\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"Constant query, props parsed successfully\", async function () {\r\n // There's a UnitSystem in there.\r\n const testKey = new SchemaKey(\"ConstantTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLoader.getConstants(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"KILO\", itemPropsObjects, schema);\r\n validateItem(\"HALF_PI\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"Phenomenon query, props parsed successfully\", async function () {\r\n // There's a Phenomenon in there.\r\n const testKey = new SchemaKey(\"ConstantTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLoader.getPhenomenon(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"NUMBER\", itemPropsObjects, schema);\r\n validateItem(\"LENGTH_RATIO\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"Format Schema parses successfully\", async function () {\r\n // Using installed Formats schema\r\n const testKey = new SchemaKey(\"Formats\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLoader.getFormats(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n for (const props of itemPropsObjects) {\r\n validateItem(props.name!, itemPropsObjects, schema);\r\n }\r\n });\r\n\r\n it(\"Comprehensive Format parses successfully\", async function () {\r\n const testKey = new SchemaKey(\"FormatTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLoader.getFormats(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n for (const props of itemPropsObjects) {\r\n validateItem(props.name!, itemPropsObjects, schema);\r\n }\r\n });\r\n\r\n it(\"CustomAttribute instances parse successfully\", async function () {\r\n const testKey = new SchemaKey(\"CustomAttributeInstanceTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLoader.getStructs(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n for (const props of itemPropsObjects) {\r\n validateItem(props.name!, itemPropsObjects, schema);\r\n }\r\n });\r\n});"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IncrementalLoading.test.d.ts","sourceRoot":"","sources":["../../../../src/test/incrementalSchemaLocater/IncrementalLoading.test.ts"],"names":[],"mappings":""}
|