@itwin/core-backend 3.1.0-dev.8 → 3.1.2
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 +167 -67
- package/lib/cjs/ClassRegistry.d.ts.map +1 -1
- package/lib/cjs/ClassRegistry.js +58 -5
- package/lib/cjs/ClassRegistry.js.map +1 -1
- package/lib/cjs/CloudStorageBackend.d.ts +2 -0
- package/lib/cjs/CloudStorageBackend.d.ts.map +1 -1
- package/lib/cjs/CloudStorageBackend.js +9 -4
- package/lib/cjs/CloudStorageBackend.js.map +1 -1
- package/lib/cjs/Entity.d.ts +12 -0
- package/lib/cjs/Entity.d.ts.map +1 -1
- package/lib/cjs/Entity.js +12 -0
- package/lib/cjs/Entity.js.map +1 -1
- package/lib/cjs/IModelCloneContext.d.ts.map +1 -1
- package/lib/cjs/IModelCloneContext.js +4 -2
- package/lib/cjs/IModelCloneContext.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +15 -6
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +24 -6
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelSchemaLoader.d.ts +3 -3
- package/lib/cjs/IModelSchemaLoader.d.ts.map +1 -1
- package/lib/cjs/IModelSchemaLoader.js +33 -6
- package/lib/cjs/IModelSchemaLoader.js.map +1 -1
- package/lib/cjs/LocalhostIpcHost.d.ts +2 -0
- package/lib/cjs/LocalhostIpcHost.d.ts.map +1 -1
- package/lib/cjs/LocalhostIpcHost.js +14 -7
- package/lib/cjs/LocalhostIpcHost.js.map +1 -1
- package/lib/cjs/PromiseMemoizer.d.ts.map +1 -1
- package/lib/cjs/PromiseMemoizer.js +3 -0
- package/lib/cjs/PromiseMemoizer.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +4 -2
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +6 -4
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +1 -3
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/package.json +19 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,106 @@
|
|
|
1
1
|
# Change Log - @itwin/core-backend
|
|
2
2
|
|
|
3
|
-
This log was last generated on Wed,
|
|
3
|
+
This log was last generated on Wed, 06 Apr 2022 22:27:56 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 3.1.2
|
|
6
|
+
Wed, 06 Apr 2022 22:27:56 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 3.1.1
|
|
11
|
+
Thu, 31 Mar 2022 15:55:48 GMT
|
|
12
|
+
|
|
13
|
+
_Version update only_
|
|
14
|
+
|
|
15
|
+
## 3.1.0
|
|
16
|
+
Tue, 29 Mar 2022 20:53:47 GMT
|
|
17
|
+
|
|
18
|
+
### Updates
|
|
19
|
+
|
|
20
|
+
- Deprecate IModelReadRpcInterface.getViewThumbnail
|
|
21
|
+
- generated element classes now have a default implementation of collectPredecessors returning all set navigation properties
|
|
22
|
+
- Correct return status for processGeometryStream and createBRepGeometry.
|
|
23
|
+
- Remove IModelDb.elementGeometryUpdate.
|
|
24
|
+
- You may specify an element's geometry in terms of an ElementGeometryDataEntry array
|
|
25
|
+
- Web IPC fix (when reloading frontend).
|
|
26
|
+
|
|
27
|
+
## 3.0.3
|
|
28
|
+
Fri, 25 Mar 2022 15:10:01 GMT
|
|
29
|
+
|
|
30
|
+
_Version update only_
|
|
31
|
+
|
|
32
|
+
## 3.0.2
|
|
33
|
+
Thu, 10 Mar 2022 21:18:13 GMT
|
|
34
|
+
|
|
35
|
+
_Version update only_
|
|
36
|
+
|
|
37
|
+
## 3.0.1
|
|
38
|
+
Thu, 24 Feb 2022 15:26:55 GMT
|
|
39
|
+
|
|
40
|
+
_Version update only_
|
|
41
|
+
|
|
42
|
+
## 3.0.0
|
|
43
|
+
Mon, 24 Jan 2022 14:00:52 GMT
|
|
44
|
+
|
|
45
|
+
### Updates
|
|
46
|
+
|
|
47
|
+
- add briefcaseAlias argument to acquireNewBriefcaseId
|
|
48
|
+
- make one method to acquire both shared and exclusive locks
|
|
49
|
+
- Add GeometryClass to ExportGraphics
|
|
50
|
+
- Update SQLiteDb to public release tag
|
|
51
|
+
- initial support for cloud-based WorkspaceContainers
|
|
52
|
+
- added IModelDb.workspace
|
|
53
|
+
- improve concurrent query changes
|
|
54
|
+
- Skip full schema load that cause OOM error on node backend
|
|
55
|
+
- Do not reopen connection on schema change
|
|
56
|
+
- Remove usage-logging-client
|
|
57
|
+
- Upgrade target to ES2019
|
|
58
|
+
- Entity no longer implements EntityProps.
|
|
59
|
+
- suppress error logging during test that expect errors
|
|
60
|
+
- add test and improved concurrent query support
|
|
61
|
+
- fix flaky test
|
|
62
|
+
- Update BackendHubAccess api to use ChangesetIndexAndId
|
|
63
|
+
- Add new GeoServices class and first method to interpret WKT or complete GCS JSON."
|
|
64
|
+
- getAccessToken always returns a token
|
|
65
|
+
- Fix an exception when attempting to pull changes into a briefcase that already has all the changes.
|
|
66
|
+
- LocalhostIpcHost, display-test-app support for R/W web (via orchestrator)
|
|
67
|
+
- Added ability to convert iModel coordinates to or from any Geographic CRS
|
|
68
|
+
- rename contextId -> iTwinId
|
|
69
|
+
- Tests for solid kernel severe error exceptions.
|
|
70
|
+
- throw rather than returning status from IModelDb.saveFileProperty and IModelDb.deleteFileProperty
|
|
71
|
+
- use db.locks to release all locks
|
|
72
|
+
- rename to @itwin/core-backend
|
|
73
|
+
- export blobdaemon, blobdaemoncommandargs from imodeljs-native
|
|
74
|
+
- Log the error that we catch when v2 checkpoint fails to open
|
|
75
|
+
- use BentleyError.getErrorProps(e) instead of just logging e
|
|
76
|
+
- Introduce no-non-null-assertion lint rule.
|
|
77
|
+
- remove ClientRequestContext and its subclasses
|
|
78
|
+
- Removed config.app usage
|
|
79
|
+
- Remove deprecated APIs for 3.0.
|
|
80
|
+
- allow apps to set safety interval for reattaching deamon
|
|
81
|
+
- removed several previously-deprecated apis
|
|
82
|
+
- remove IModelWriteRpcInterface
|
|
83
|
+
- remove ClientRequestContext.current
|
|
84
|
+
- Renamed all occurrences of the term revision0 to version0.
|
|
85
|
+
- rework locks
|
|
86
|
+
- Removed NativeAppAuthorizationBackend
|
|
87
|
+
- Removed two unit tests for reproj and added one
|
|
88
|
+
- added RpcTrace
|
|
89
|
+
- Bumped dotenv and removed deprecated @types/dotenv
|
|
90
|
+
- Replaced ContextRegistry with generalized ITwinAccess interface
|
|
91
|
+
- Switching to consume new Projects-Client
|
|
92
|
+
- Renamed an iModel's parent container to iTwin
|
|
93
|
+
- Removed references to the deleted config-loader package
|
|
94
|
+
- split imodel-transformer out of imodel-backend package
|
|
95
|
+
- remove use of "any" types in SqliteStatement
|
|
96
|
+
- IModelDb.getTextureImage is async.
|
|
97
|
+
- Support for TypeDoc v0.22.7. Fix various broken docs links.
|
|
98
|
+
- only export necessary schemas during imodel transformation
|
|
99
|
+
- Improved log message when v2 checkpoint downloaded is not for the changeset requested
|
|
100
|
+
- caching options for changed elements processing
|
|
101
|
+
- Adding WebEditServer (test scenarios only for now)
|
|
102
|
+
- add persistent iModel-based settings
|
|
103
|
+
- initial implementation of Workspace and Settings
|
|
4
104
|
|
|
5
105
|
## 2.19.28
|
|
6
106
|
Wed, 12 Jan 2022 14:52:38 GMT
|
|
@@ -166,7 +266,7 @@ Mon, 26 Jul 2021 12:21:25 GMT
|
|
|
166
266
|
|
|
167
267
|
- Reactivated test that stopped working when a previous PR for ecef dependency to geographicCRS was reverted
|
|
168
268
|
- store changesetIndex on IModelDb
|
|
169
|
-
- Better error checks when creating SpatialViewDefinition-s.
|
|
269
|
+
- Better error checks when creating SpatialViewDefinition-s.
|
|
170
270
|
- remove internal barrel-import usage
|
|
171
271
|
- throw exception when attempting to download a briefcase on top of an existing file
|
|
172
272
|
- Add case for InterpolationCurve3d
|
|
@@ -201,11 +301,11 @@ Fri, 09 Jul 2021 18:11:24 GMT
|
|
|
201
301
|
### Updates
|
|
202
302
|
|
|
203
303
|
- TemplateModelCloner now assigns a new FederationGuid for cloned element instances.
|
|
204
|
-
- Accomodated the inability to reverse Changesets when creating change summaries.
|
|
304
|
+
- Accomodated the inability to reverse Changesets when creating change summaries.
|
|
205
305
|
- fix lint issue
|
|
206
306
|
- begin api transition to changeset index rather than changeset Id
|
|
207
307
|
- Use ecef location calculated for projected iModels
|
|
208
|
-
- Push refreshes access token if necessary.
|
|
308
|
+
- Push refreshes access token if necessary.
|
|
209
309
|
- Do not reuse briefcase ids in ReadWrite workflows when using the RPC interfaces (if the briefcase was not found in the local file system)
|
|
210
310
|
- Add missing SectionDrawing properties.
|
|
211
311
|
|
|
@@ -226,7 +326,7 @@ Fri, 02 Jul 2021 15:38:31 GMT
|
|
|
226
326
|
|
|
227
327
|
### Updates
|
|
228
328
|
|
|
229
|
-
- Update to @bentley/imodeljs-native@2.17.10
|
|
329
|
+
- Update to @bentley/imodeljs-native@2.17.10
|
|
230
330
|
|
|
231
331
|
## 2.17.0
|
|
232
332
|
Mon, 28 Jun 2021 16:20:11 GMT
|
|
@@ -492,8 +592,8 @@ Thu, 28 Jan 2021 13:39:27 GMT
|
|
|
492
592
|
|
|
493
593
|
- Changed storageType from azure to azure?sas=1 for getCommandArgs function
|
|
494
594
|
- Fix brep DataProps to/from flatbuffer to account for base64 string header.
|
|
495
|
-
- Element geometry creation by brep operations.
|
|
496
|
-
- Reinstated behavior when re-opening files read-write.
|
|
595
|
+
- Element geometry creation by brep operations.
|
|
596
|
+
- Reinstated behavior when re-opening files read-write.
|
|
497
597
|
- enhance BriefcaseManager and BriefcaseDb for edit commands
|
|
498
598
|
- Improve ElementGeometry documentation.
|
|
499
599
|
- Add a check to verify, and fix, the DbGuid in the iModel if it is different than the Guid in iModelHub.
|
|
@@ -683,8 +783,8 @@ Fri, 02 Oct 2020 18:03:32 GMT
|
|
|
683
783
|
### Updates
|
|
684
784
|
|
|
685
785
|
- Update to @bentley/imodeljs-native@2.7.4
|
|
686
|
-
- Fixes to front end methods to pull, merge and push.
|
|
687
|
-
- Setup IModelHost.startup() to use proxy servers if configured/available - this is valuable for debugging agents, backends and electron applications.
|
|
786
|
+
- Fixes to front end methods to pull, merge and push.
|
|
787
|
+
- Setup IModelHost.startup() to use proxy servers if configured/available - this is valuable for debugging agents, backends and electron applications.
|
|
688
788
|
- On iOS download in background
|
|
689
789
|
- Fix ios hang issue
|
|
690
790
|
- Modify queryModelRanges to handle non geometric model errors
|
|
@@ -775,7 +875,7 @@ Thu, 20 Aug 2020 20:57:09 GMT
|
|
|
775
875
|
### Updates
|
|
776
876
|
|
|
777
877
|
- Update to imodeljs-native 2.5.0
|
|
778
|
-
- VSTS#419723: Accomodated "bad" checkpoints that may have serialized transactions preventing their use in ReadWrite cases.
|
|
878
|
+
- VSTS#419723: Accomodated "bad" checkpoints that may have serialized transactions preventing their use in ReadWrite cases.
|
|
779
879
|
- Fix for a recursive exception while closing a briefcase
|
|
780
880
|
- Added mobile oidc client
|
|
781
881
|
- Remove special code handling for mobile.
|
|
@@ -839,7 +939,7 @@ Fri, 10 Jul 2020 17:23:14 GMT
|
|
|
839
939
|
- Changes to support imodel-bridge
|
|
840
940
|
- fix spelling mistakes in Device class
|
|
841
941
|
- Fix typo in comments
|
|
842
|
-
- Setup BriefcaseDb.open() to allow profile and domain schema validation and upgrades.
|
|
942
|
+
- Setup BriefcaseDb.open() to allow profile and domain schema validation and upgrades.
|
|
843
943
|
- disallow protected operations for missing schemas marked with SchemaHasBehavior custom attribute
|
|
844
944
|
|
|
845
945
|
## 2.2.1
|
|
@@ -880,25 +980,25 @@ Thu, 28 May 2020 22:48:59 GMT
|
|
|
880
980
|
- Update to imodeljs-native 2.1.0
|
|
881
981
|
- Support for finding an ExternalSourceAspect given scope, id, and kind/hash.
|
|
882
982
|
- ApplyChangeset perf tests updated
|
|
883
|
-
- Fixed token expiry check for desktop authorization.
|
|
983
|
+
- Fixed token expiry check for desktop authorization.
|
|
884
984
|
- Download ChangeSets in chunks
|
|
885
985
|
- (1) In xy region booleans, support curved edges; (2) ExportGraphicsMeshVisitor class
|
|
886
986
|
- Add ability to convert ExportGraphicsMesh to Polyface
|
|
887
987
|
- Fixed validation of Guids (ContextId, IModelId) cached within a briefcase.
|
|
888
988
|
- Moved iModelBridgeFwk to a separate package
|
|
889
|
-
- Simplified logging for monitoring briefcase operations.
|
|
989
|
+
- Simplified logging for monitoring briefcase operations.
|
|
890
990
|
- Fix transforms for creating and querying part instance geometry in world coordinate.
|
|
891
991
|
- Fix and improvement to performance tests
|
|
892
992
|
- Added support for schema XML import to iModelJs backend via the IModelDb.importSchemaStrings method.
|
|
893
993
|
- channel rules
|
|
894
|
-
- Fixed logging usage when opening connections.
|
|
994
|
+
- Fixed logging usage when opening connections.
|
|
895
995
|
|
|
896
996
|
## 2.0.0
|
|
897
997
|
Wed, 06 May 2020 13:17:49 GMT
|
|
898
998
|
|
|
899
999
|
### Updates
|
|
900
1000
|
|
|
901
|
-
- Fixed setup of UserInfo from browser clients, and more cleanups to AccessToken API.
|
|
1001
|
+
- Fixed setup of UserInfo from browser clients, and more cleanups to AccessToken API.
|
|
902
1002
|
- Added RivisionUtility class for debug/testing
|
|
903
1003
|
- node addon 2.0.18
|
|
904
1004
|
- addon 2.0.25
|
|
@@ -911,23 +1011,23 @@ Wed, 06 May 2020 13:17:49 GMT
|
|
|
911
1011
|
- Performance tests for Applying Changesets
|
|
912
1012
|
- `IModelHost.startup` is now async.
|
|
913
1013
|
- `IModelHost.shutdown` is now async.
|
|
914
|
-
- Refined checks for briefcase id, and fixed failing integration tests.
|
|
1014
|
+
- Refined checks for briefcase id, and fixed failing integration tests.
|
|
915
1015
|
- Product Backlog Item 276268: Deleting the briefcase cache if the cache version is incorrect should not attempt to delete the root directory.
|
|
916
1016
|
- Setup initialization of briefcase cache for offline workflows. (VSTS#286489)
|
|
917
|
-
- Monitor progress of downloading briefcases, ability to cancel download of briefcases.
|
|
1017
|
+
- Monitor progress of downloading briefcases, ability to cancel download of briefcases.
|
|
918
1018
|
- Move briefcase-specific events into BriefcaseIModelDb subclass
|
|
919
1019
|
- Fixed param when calling logger so that it is a function as the logger expects
|
|
920
|
-
- Setup a common cache locaton for iModel.js, with briefcases taking up a sub-folder.
|
|
1020
|
+
- Setup a common cache locaton for iModel.js, with briefcases taking up a sub-folder.
|
|
921
1021
|
- Changed ChangeSets download API
|
|
922
1022
|
- Added unlink for file handler
|
|
923
1023
|
- Update UlasClient tests to send more detailed feature log data
|
|
924
1024
|
- react to renaming of imodeljs-clients-backend to backend-itwin-client
|
|
925
1025
|
- apply changeset performance tests with local datasets
|
|
926
|
-
- BriefcaseManager.delete should work in offline scenarios.
|
|
1026
|
+
- BriefcaseManager.delete should work in offline scenarios.
|
|
927
1027
|
- Remove deprecated members of SectionLocation and downgrade to alpha pending refactor.
|
|
928
1028
|
- Support for progress/cancel from ios
|
|
929
1029
|
- Remove deprecated ExportGraphics types etc for 2.0
|
|
930
|
-
- Updated docs.
|
|
1030
|
+
- Updated docs.
|
|
931
1031
|
- IModelDb.findByKey replaces IModelDb.find
|
|
932
1032
|
- Include model extents with ViewStateProps for drawing views.
|
|
933
1033
|
- Remove deprecated APIs; see NextVersion.md for details.
|
|
@@ -948,29 +1048,29 @@ Wed, 06 May 2020 13:17:49 GMT
|
|
|
948
1048
|
- Introduce the BriefcaseIModelDb class, make IModelDb abstract.
|
|
949
1049
|
- Cleaned up unused async-s in BriefcaseManager
|
|
950
1050
|
- Avoided casting of BriefcaseProps to IModelRpcProps.
|
|
951
|
-
- Added NativeApp.deleteBriefcase, avoided authorization exceptions when offline.
|
|
1051
|
+
- Added NativeApp.deleteBriefcase, avoided authorization exceptions when offline.
|
|
952
1052
|
- Move briefcase property from IModelDb --> BriefcaseIModelDb
|
|
953
1053
|
- BriefcaseId is now an enum instead of a class
|
|
954
1054
|
- Rename BriefcaseId --> ReservedBriefcaseId, introduce BriefcaseId type
|
|
955
|
-
- VSTS#297017: Update cached briefcase information if changes were applied.
|
|
956
|
-
- Refactored NativeApp API and RPC interfaces. This continues to be WIP.
|
|
957
|
-
- Removed the call to simultaneously download and open the briefcase at the backend. This should be done in two separate steps henceforth. The download must be done with BriefcaseManager, and the open is now a synchronous call in BriefcaseDb.
|
|
958
|
-
- Added DownloadBriefcaseOptions and OpenBriefcaseOptions as parameters to the download/open calls for a briefcase.
|
|
1055
|
+
- VSTS#297017: Update cached briefcase information if changes were applied.
|
|
1056
|
+
- Refactored NativeApp API and RPC interfaces. This continues to be WIP.
|
|
1057
|
+
- Removed the call to simultaneously download and open the briefcase at the backend. This should be done in two separate steps henceforth. The download must be done with BriefcaseManager, and the open is now a synchronous call in BriefcaseDb.
|
|
1058
|
+
- Added DownloadBriefcaseOptions and OpenBriefcaseOptions as parameters to the download/open calls for a briefcase.
|
|
959
1059
|
- Removed BriefcaseDb.create
|
|
960
|
-
- Setup ability to use NativeApp.openBriefcase() in offline scenarios.
|
|
1060
|
+
- Setup ability to use NativeApp.openBriefcase() in offline scenarios.
|
|
961
1061
|
- fixed flaky test
|
|
962
|
-
- VSTS#217447, 162382: Cleanups to implementation of downloading/opening/discovering briefcases in native applications (WIP).
|
|
1062
|
+
- VSTS#217447, 162382: Cleanups to implementation of downloading/opening/discovering briefcases in native applications (WIP).
|
|
963
1063
|
- do not throw exception in NativeAppBackend.startup()
|
|
964
|
-
- VSTS#296110: Setup a way to close briefcases when the native application is offline.
|
|
1064
|
+
- VSTS#296110: Setup a way to close briefcases when the native application is offline.
|
|
965
1065
|
- Move concurrencyControl from IModelDb to BriefcaseIModelDb
|
|
966
1066
|
- Renamed OIDC constructs for consistency; Removed SAML support.
|
|
967
1067
|
- Add support for password-protecting snapshot iModels
|
|
968
1068
|
- Fixed typo for ElementAspect perf tests
|
|
969
|
-
- VSTS#217447, VSTS#162382: Reinstated option to open briefcases with SyncMode = PullOnly.
|
|
1069
|
+
- VSTS#217447, VSTS#162382: Reinstated option to open briefcases with SyncMode = PullOnly.
|
|
970
1070
|
- Add purge dir method to iModelJsFs
|
|
971
1071
|
- react to creation of new clients packages from imodeljs-clients
|
|
972
1072
|
- ; substitute current date for feature usage without any set start/end dates
|
|
973
|
-
- Removed deprecated utilities.
|
|
1073
|
+
- Removed deprecated utilities.
|
|
974
1074
|
- enforce opening Snapshots readonly through StandaloneDb
|
|
975
1075
|
- Remove the deprecated Entity.clone method
|
|
976
1076
|
- Adjusted calls to some node addon changes (ECUtils removed)
|
|
@@ -982,13 +1082,13 @@ Wed, 06 May 2020 13:17:49 GMT
|
|
|
982
1082
|
- Add FileNameResolver class
|
|
983
1083
|
- Move snapshot methods out of IModelDb and into new SnapshotIModelDb class.
|
|
984
1084
|
- Add TemplateModelCloner to place instances of a template model
|
|
985
|
-
- Renamed TestOidcClient and related constructs for consistency.
|
|
1085
|
+
- Renamed TestOidcClient and related constructs for consistency.
|
|
986
1086
|
- Add IModelDb.tryPrepareStatement
|
|
987
|
-
- Fixed usage logging.
|
|
1087
|
+
- Fixed usage logging.
|
|
988
1088
|
- fix failing ulas tests due to invalid featureId
|
|
989
1089
|
- update ULAS test logging & feedback
|
|
990
1090
|
- Update UlasUtilities to support exception-throwing native functions
|
|
991
|
-
- Use standalone briefcases for PullOnly cases.
|
|
1091
|
+
- Use standalone briefcases for PullOnly cases.
|
|
992
1092
|
|
|
993
1093
|
## 1.14.1
|
|
994
1094
|
Wed, 22 Apr 2020 19:04:00 GMT
|
|
@@ -1003,7 +1103,7 @@ Tue, 31 Mar 2020 15:44:19 GMT
|
|
|
1003
1103
|
### Updates
|
|
1004
1104
|
|
|
1005
1105
|
- Update to addon 1.14.1
|
|
1006
|
-
- Fixed downloading of files using https/streaming to resolve when the filestream is closed instead of when the input stream is exhausted.
|
|
1106
|
+
- Fixed downloading of files using https/streaming to resolve when the filestream is closed instead of when the input stream is exhausted.
|
|
1007
1107
|
- Add handling for invalid predecessor ids to IModelTransformer
|
|
1008
1108
|
- Accomodate updated imodeljs-native ULAS functions
|
|
1009
1109
|
|
|
@@ -1018,7 +1118,7 @@ Wed, 12 Feb 2020 17:45:50 GMT
|
|
|
1018
1118
|
### Updates
|
|
1019
1119
|
|
|
1020
1120
|
- Fix IGeometry roundtripping issue through ECSql. Fix insert/update binary properties for Element Aspect.
|
|
1021
|
-
- Separated out routines to download and open briefcases.
|
|
1121
|
+
- Separated out routines to download and open briefcases.
|
|
1022
1122
|
- bulk mode
|
|
1023
1123
|
- Consolidated sign-in for integration tests
|
|
1024
1124
|
- bulkmode
|
|
@@ -1029,7 +1129,7 @@ Wed, 12 Feb 2020 17:45:50 GMT
|
|
|
1029
1129
|
- Add ViewDefinition.getAuxiliaryCoordinateSystemId and ViewDefinition.setAuxiliaryCoordinateSystemId methods
|
|
1030
1130
|
- Add SpatialLocationModel.insert
|
|
1031
1131
|
- Add optional isPlantProjection parameter to PhysicalModel.insert
|
|
1032
|
-
- VSTS#256133: Fixed issue with reopening connections if the backend crashes. Fixes to integration tests.
|
|
1132
|
+
- VSTS#256133: Fixed issue with reopening connections if the backend crashes. Fixes to integration tests.
|
|
1033
1133
|
- Better documentation of OidcDesktopClient
|
|
1034
1134
|
- Fixed changeset perf test by using another iModel on Hub
|
|
1035
1135
|
- Add ViewDetails to ViewDefinition.
|
|
@@ -1062,7 +1162,7 @@ Tue, 07 Jan 2020 19:44:01 GMT
|
|
|
1062
1162
|
- Allow events to be sent from backend to frontend
|
|
1063
1163
|
- Add tryGetInstance / tryGetInstanceProps methods to the Relationship class which return undefined rather than throwing an exception when a relationship is not found.
|
|
1064
1164
|
- Fix webpack for ios test that were failing due to new dependencies
|
|
1065
|
-
- VSTS#225894 - Allowed agents to bypass usage logging calls. These cause usage logging errors.
|
|
1165
|
+
- VSTS#225894 - Allowed agents to bypass usage logging calls. These cause usage logging errors.
|
|
1066
1166
|
- Add tryGetElement / tryGetElementProps which return undefined rather than throwing an exception when an element is not found.
|
|
1067
1167
|
- Add tryGetModel, tryGetModelProps, tryGetSubModel which return undefined instead of throwing exceptions when the model is not found.
|
|
1068
1168
|
|
|
@@ -1074,7 +1174,7 @@ Tue, 10 Dec 2019 18:08:56 GMT
|
|
|
1074
1174
|
- Updated to addon 9.1.3
|
|
1075
1175
|
- Added AliCloud tile cache service
|
|
1076
1176
|
- Added framework to run imodeljs-backend test on ios using appcenter
|
|
1077
|
-
- Setup OidcDesktopClient for Electron use cases.
|
|
1177
|
+
- Setup OidcDesktopClient for Electron use cases.
|
|
1078
1178
|
- fix warnings from static analysis
|
|
1079
1179
|
- Enabling testing code for updating LR aspects after fix in native side.
|
|
1080
1180
|
- Addressing typo in a couple of members, making them match the schema properly.
|
|
@@ -1130,9 +1230,9 @@ Mon, 30 Sep 2019 22:28:48 GMT
|
|
|
1130
1230
|
### Updates
|
|
1131
1231
|
|
|
1132
1232
|
- added support for blank IModelConnections
|
|
1133
|
-
- Setup a way to supply authorization through the backend for frontend requests.
|
|
1134
|
-
- Error log when downloading change sets should include iModelId for context.
|
|
1135
|
-
- Fixed the iModelHub client to properly dispose a file handle after upload to the iModelHub.
|
|
1233
|
+
- Setup a way to supply authorization through the backend for frontend requests.
|
|
1234
|
+
- Error log when downloading change sets should include iModelId for context.
|
|
1235
|
+
- Fixed the iModelHub client to properly dispose a file handle after upload to the iModelHub.
|
|
1136
1236
|
- Add IModelDb.Elements.hasSubModel
|
|
1137
1237
|
- Make ExternalSourceAspect.checksum optional
|
|
1138
1238
|
- Clear statement cache after schema import
|
|
@@ -1147,14 +1247,14 @@ Tue, 10 Sep 2019 12:09:49 GMT
|
|
|
1147
1247
|
|
|
1148
1248
|
### Updates
|
|
1149
1249
|
|
|
1150
|
-
- Setup a way to supply authorization through the backend for frontend requests.
|
|
1151
|
-
- Allow attaching change cache file before change summary extraction.
|
|
1152
|
-
- Added change summary test, and improved doc a little.
|
|
1250
|
+
- Setup a way to supply authorization through the backend for frontend requests.
|
|
1251
|
+
- Allow attaching change cache file before change summary extraction.
|
|
1252
|
+
- Added change summary test, and improved doc a little.
|
|
1153
1253
|
- Add minimum brep size option to IModelDb.exportGraphics
|
|
1154
1254
|
- FunctionalSchema.importSchema is now deprecated.
|
|
1155
1255
|
- Add support for GeometricModel.geometryGuid for detecting whether tiles for a model can be reused across versions
|
|
1156
1256
|
- Added performance logging for tile upload
|
|
1157
|
-
- IModelConnection.close() for read-only connections should not close the Db at the backend; Opening an iModel with SyncModel.PullAndPush() multiple times (without disposing it) must reuse the briefcase.
|
|
1257
|
+
- IModelConnection.close() for read-only connections should not close the Db at the backend; Opening an iModel with SyncModel.PullAndPush() multiple times (without disposing it) must reuse the briefcase.
|
|
1158
1258
|
- Add method to create view with camera
|
|
1159
1259
|
- Fixed misleading logging output in tile upload
|
|
1160
1260
|
|
|
@@ -1164,14 +1264,14 @@ Tue, 13 Aug 2019 20:25:53 GMT
|
|
|
1164
1264
|
### Updates
|
|
1165
1265
|
|
|
1166
1266
|
- Allow custom tile cache services.
|
|
1167
|
-
- Always acquire a briefcase when creating a new backend instance for PullAndPush workflows.
|
|
1168
|
-
- Added Change Summary integration test, and fixed documentation.
|
|
1267
|
+
- Always acquire a briefcase when creating a new backend instance for PullAndPush workflows.
|
|
1268
|
+
- Added Change Summary integration test, and fixed documentation.
|
|
1169
1269
|
- Trial code for tile upload errors
|
|
1170
1270
|
- Fixed changeset performance tests
|
|
1171
1271
|
- Tile upload logging.
|
|
1172
1272
|
- Mark ExportGraphics API as public
|
|
1173
1273
|
- Support for gzip compression of tiles
|
|
1174
|
-
- Fixed issue with opening iModels with names that are invalid on Unix or Windows.
|
|
1274
|
+
- Fixed issue with opening iModels with names that are invalid on Unix or Windows.
|
|
1175
1275
|
- Add IModelDb.isSnapshot
|
|
1176
1276
|
- Tile upload error catching.
|
|
1177
1277
|
- Azure tile upload logging
|
|
@@ -1183,7 +1283,7 @@ Wed, 24 Jul 2019 11:47:26 GMT
|
|
|
1183
1283
|
### Updates
|
|
1184
1284
|
|
|
1185
1285
|
- Added option to restrict tile cache URLs by client IP address.
|
|
1186
|
-
- Apply change sets at the backend in a non-blocking worker thread.
|
|
1286
|
+
- Apply change sets at the backend in a non-blocking worker thread.
|
|
1187
1287
|
- Add ElementAspect handler methods
|
|
1188
1288
|
- When deleting a parent element, make sure there are onDelete/onDeleted callbacks for child elements
|
|
1189
1289
|
- Add support for linework to IModelDb.exportGraphics
|
|
@@ -1201,19 +1301,19 @@ Mon, 01 Jul 2019 19:04:29 GMT
|
|
|
1201
1301
|
|
|
1202
1302
|
### Updates
|
|
1203
1303
|
|
|
1204
|
-
- Open fixes when briefcase requires merges.
|
|
1304
|
+
- Open fixes when briefcase requires merges.
|
|
1205
1305
|
- Catch tile upload errors.
|
|
1206
|
-
- Setting up briefcase is always from an older checkpoint.
|
|
1306
|
+
- Setting up briefcase is always from an older checkpoint.
|
|
1207
1307
|
- Add materialId, subCategory to ExportGraphicsInfo
|
|
1208
|
-
- Fix crash in getViewThumbnail for odd number of bytes
|
|
1308
|
+
- Fix crash in getViewThumbnail for odd number of bytes
|
|
1209
1309
|
- Adding relationship class for GraphicalElement3dRepresentsElement.
|
|
1210
1310
|
- Initial implementation of the LinearReferencing typescript domain
|
|
1211
1311
|
- Adding domain classes for all relatinships in the LinearReferencing schema.
|
|
1212
1312
|
- Exporting relationships module.
|
|
1213
|
-
- Fixes to opening iModel-s ReadWrite from mutiple IModelConnection-s.
|
|
1214
|
-
- Fixed issues with deleting briefcases if there were errors with preparing briefcases.
|
|
1313
|
+
- Fixes to opening iModel-s ReadWrite from mutiple IModelConnection-s.
|
|
1314
|
+
- Fixed issues with deleting briefcases if there were errors with preparing briefcases.
|
|
1215
1315
|
- Add a new method `forceLoadSchemas` to `IModelJsNative.ECPresentationManager`.
|
|
1216
|
-
- Introduced AsyncMutex - a utility to run async blocks of code in sequence.
|
|
1316
|
+
- Introduced AsyncMutex - a utility to run async blocks of code in sequence.
|
|
1217
1317
|
- Properly document ModelSelector.models and CategorySelector.categories as Id64String arrays
|
|
1218
1318
|
- Made `insertElement` not return Id64.invalid, throws error instead
|
|
1219
1319
|
- Update to TypeScript 3.5
|
|
@@ -1224,7 +1324,7 @@ Mon, 03 Jun 2019 18:09:39 GMT
|
|
|
1224
1324
|
|
|
1225
1325
|
### Updates
|
|
1226
1326
|
|
|
1227
|
-
- Migrated agent applications to the newer client
|
|
1327
|
+
- Migrated agent applications to the newer client
|
|
1228
1328
|
- RPC system now accepts only basic values (primitives, "interface" objects, and binary).
|
|
1229
1329
|
- Switched from iModelHub Project API to Context API
|
|
1230
1330
|
- Fix bug in IModelDb.createSnapshotFromSeed
|
|
@@ -1272,12 +1372,12 @@ Mon, 13 May 2019 15:52:05 GMT
|
|
|
1272
1372
|
- Cleanup old imodelbank references
|
|
1273
1373
|
- Add InformationRecordModel.insert, GroupModel.insert
|
|
1274
1374
|
- Introduce LoggerCategory enum to advertise logger categories used by this package.
|
|
1275
|
-
- Limited maximum cache size of the backend PromiseMemoizer.
|
|
1375
|
+
- Limited maximum cache size of the backend PromiseMemoizer.
|
|
1276
1376
|
- Missing dependency on node-report
|
|
1277
|
-
- Fixed memoization problem that caused an endless stream of 404 NotFound errors.
|
|
1377
|
+
- Fixed memoization problem that caused an endless stream of 404 NotFound errors.
|
|
1278
1378
|
- Reinstated old version of OidcAgentClient
|
|
1279
|
-
- Unauthorized open requests should cause a more obvious error.
|
|
1280
|
-
- Improved performance logging, especially of IModelDb open operations; ChangeSets are merged one-by-one to prevent hogging the event loop.
|
|
1379
|
+
- Unauthorized open requests should cause a more obvious error.
|
|
1380
|
+
- Improved performance logging, especially of IModelDb open operations; ChangeSets are merged one-by-one to prevent hogging the event loop.
|
|
1281
1381
|
- Memoization fix when opening iModels in shared, read-only mode .
|
|
1282
1382
|
- Fixed setup of application version.
|
|
1283
1383
|
- Updated Element CRUD perf tests
|
|
@@ -1287,7 +1387,7 @@ Mon, 13 May 2019 15:52:05 GMT
|
|
|
1287
1387
|
- Remove ElementPropertyFormatter, IModelDb.getElementPropertiesForDisplay (use presentation rules instead)
|
|
1288
1388
|
- Remove StandaloneIModelRpcImpl
|
|
1289
1389
|
- Fix for Render Gradient.Symb test
|
|
1290
|
-
- Setup a generic context for tracking client requests, and made various related enhancements to logging, usage tracking and authorization.
|
|
1390
|
+
- Setup a generic context for tracking client requests, and made various related enhancements to logging, usage tracking and authorization.
|
|
1291
1391
|
- Add IModelDb.createSnapshot/openSnapshot/closeSnapshot, deprecate IModelDb.createStandalone/openStandalone/closeStandalone
|
|
1292
1392
|
- Moved IModelJsExpressServer class into a new package (@itwin/express-server).
|
|
1293
1393
|
- Simplified tile caching IModelHost config and removed dev flags. Allow
|
|
@@ -1314,7 +1414,7 @@ Wed, 06 Mar 2019 15:41:22 GMT
|
|
|
1314
1414
|
- Changes package.json to include api-extractor and adds api-extractor.json
|
|
1315
1415
|
- Use new buildIModelJsBuild script
|
|
1316
1416
|
- AxisAlignedBox and ElementAlignedBox are now typed to Range3d rather than classes
|
|
1317
|
-
- Moved AzureFileHandler, IOSAzureFileHandler, UrlFileHandler and the iModelHub tests to the imodeljs-clients-backend package. This removes the dependency of imodeljs-clients on the "fs" module, and turns it into a browser only package.
|
|
1417
|
+
- Moved AzureFileHandler, IOSAzureFileHandler, UrlFileHandler and the iModelHub tests to the imodeljs-clients-backend package. This removes the dependency of imodeljs-clients on the "fs" module, and turns it into a browser only package.
|
|
1318
1418
|
- Clone methods are no longer generic
|
|
1319
1419
|
- Remove unneeded typedoc plugin dependency
|
|
1320
1420
|
- Added spatial <-> cartographic methods that check/use the geographic coordinate system before using ecef location.
|
|
@@ -1359,8 +1459,8 @@ Mon, 14 Jan 2019 23:09:10 GMT
|
|
|
1359
1459
|
|
|
1360
1460
|
### Updates
|
|
1361
1461
|
|
|
1362
|
-
- More logging of HTTP requests, and enabled use of fiddler for backend diagnostics.
|
|
1363
|
-
- Removed IModelDb's cache of accessToken. For long running operations like AutoPush, the user must explicitly supply an IAccessTokenManager to keep the token current.
|
|
1462
|
+
- More logging of HTTP requests, and enabled use of fiddler for backend diagnostics.
|
|
1463
|
+
- Removed IModelDb's cache of accessToken. For long running operations like AutoPush, the user must explicitly supply an IAccessTokenManager to keep the token current.
|
|
1364
1464
|
- Renamed RequestProxy->RequestHost. Allowed applications to configure proxy server with HTTPS_PROXY env.
|
|
1365
1465
|
- Add backend TextureAPI and accompanying test
|
|
1366
1466
|
|
|
@@ -1465,7 +1565,7 @@ Mon, 03 Dec 2018 18:52:58 GMT
|
|
|
1465
1565
|
|
|
1466
1566
|
### Updates
|
|
1467
1567
|
|
|
1468
|
-
- More information logged from BriefcaseManager.\nFixed deletion/cleanup of invalid briefcases.\nAdded OIDC support for simpleviewtest application.
|
|
1568
|
+
- More information logged from BriefcaseManager.\nFixed deletion/cleanup of invalid briefcases.\nAdded OIDC support for simpleviewtest application.
|
|
1469
1569
|
- Add ElementRefersToElements.insert
|
|
1470
1570
|
- Fixed front end integration tests.
|
|
1471
1571
|
- Document the intended purpose of IModelJsExpressServer within a deployment environment.
|
|
@@ -1534,11 +1634,11 @@ Thu, 08 Nov 2018 17:59:20 GMT
|
|
|
1534
1634
|
|
|
1535
1635
|
- Fix JSON representation of DisplayStyle.
|
|
1536
1636
|
- Add IModelImporter as a base class for utility methods needed by all importers
|
|
1537
|
-
- Removed assertion when deleting a memoized open call.
|
|
1637
|
+
- Removed assertion when deleting a memoized open call.
|
|
1538
1638
|
- Add more methods to IModelImporter
|
|
1539
1639
|
- Fix snapping test
|
|
1540
1640
|
- OIDC related enhancments (WIP).
|
|
1541
|
-
- Re-enabled several backend integration tests.
|
|
1641
|
+
- Re-enabled several backend integration tests.
|
|
1542
1642
|
- Refactor analysis-importer to use IModelImporter
|
|
1543
1643
|
- Updated to TypeScript 3.1
|
|
1544
1644
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClassRegistry.d.ts","sourceRoot":"","sources":["../../src/ClassRegistry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,cAAc,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"ClassRegistry.d.ts","sourceRoot":"","sources":["../../src/ClassRegistry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,cAAc,EAAE,WAAW,EAAkB,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAW,MAAM,UAAU,CAAC;AAI3C;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAoC;IACrE,gBAAgB;WACF,eAAe,CAAC,GAAG,EAAE,GAAG;IACtC,gBAAgB;WACF,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW;IACvE,gBAAgB;WACF,QAAQ,CAAC,WAAW,EAAE,OAAO,MAAM,EAAE,MAAM,EAAE,OAAO,MAAM;IAYxE,yEAAyE;IACzE,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAqBlC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAyFrC;;;OAGG;WACW,cAAc,CAAC,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,MAAM;IAQlE;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAa5B;;;;OAIG;WACW,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,MAAM,GAAG,SAAS;IAInF;;;;OAIG;WACW,QAAQ,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,OAAO,MAAM;IAM9E;;;;;OAKG;WACW,eAAe,CAAC,aAAa,EAAE,MAAM;IACnD;;;;OAIG;WACW,qBAAqB,CAAC,MAAM,EAAE,OAAO,MAAM;CAM1D;AAED;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,SAAS,CAAkE;IAEnF,wCAAwC;IACjC,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAE9D,gCAAgC;IACzB,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,IAAI;CAClE"}
|
package/lib/cjs/ClassRegistry.js
CHANGED
|
@@ -11,7 +11,9 @@ exports.MetaDataRegistry = exports.ClassRegistry = void 0;
|
|
|
11
11
|
const core_bentley_1 = require("@itwin/core-bentley");
|
|
12
12
|
const core_common_1 = require("@itwin/core-common");
|
|
13
13
|
const Entity_1 = require("./Entity");
|
|
14
|
+
const Element_1 = require("./Element");
|
|
14
15
|
const Schema_1 = require("./Schema");
|
|
16
|
+
const isGeneratedClassTag = Symbol("isGeneratedClassTag");
|
|
15
17
|
/** The mapping between a BIS class name (in the form "schema:class") and its JavaScript constructor function
|
|
16
18
|
* @public
|
|
17
19
|
*/
|
|
@@ -54,6 +56,7 @@ class ClassRegistry {
|
|
|
54
56
|
* @param entityMetaData The Entity metadata that defines the class
|
|
55
57
|
*/
|
|
56
58
|
static generateClassForEntity(entityMetaData, iModel) {
|
|
59
|
+
var _a, _b;
|
|
57
60
|
const name = entityMetaData.ecclass.split(":");
|
|
58
61
|
const domainName = name[0];
|
|
59
62
|
const className = name[1];
|
|
@@ -63,15 +66,65 @@ class ClassRegistry {
|
|
|
63
66
|
let schema = Schema_1.Schemas.getRegisteredSchema(domainName);
|
|
64
67
|
if (undefined === schema)
|
|
65
68
|
schema = this.generateProxySchema(domainName, iModel); // no schema found, create it too
|
|
66
|
-
// this method relies on the caller having previously created/registered all superclasses
|
|
67
69
|
const superclass = this._classMap.get(entityMetaData.baseClasses[0].toLowerCase());
|
|
68
70
|
if (undefined === superclass)
|
|
69
71
|
throw new core_common_1.IModelError(core_bentley_1.IModelStatus.NotFound, `cannot find superclass for class ${name}`);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
// user defined class hierarchies may skip a class in the hierarchy, and therefore their JS base class cannot
|
|
73
|
+
// be used to tell if there are any generated classes in the hierarchy
|
|
74
|
+
let generatedClassHasNonGeneratedNonCoreAncestor = false;
|
|
75
|
+
let currentSuperclass = superclass;
|
|
76
|
+
const MAX_ITERS = 1000;
|
|
77
|
+
for (let i = 0; i < MAX_ITERS; ++i) {
|
|
78
|
+
if (currentSuperclass.schema.schemaName === "BisCore")
|
|
79
|
+
break;
|
|
80
|
+
if (!currentSuperclass.isGeneratedClass) {
|
|
81
|
+
generatedClassHasNonGeneratedNonCoreAncestor = true;
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
const superclassMetaData = iModel.classMetaDataRegistry.find(currentSuperclass.classFullName);
|
|
85
|
+
if (superclassMetaData === undefined)
|
|
86
|
+
throw new core_common_1.IModelError(core_bentley_1.IModelStatus.BadSchema, `could not find the metadata for class '${currentSuperclass.name}', class metadata should be loaded by now`);
|
|
87
|
+
const maybeNextSuperclass = this.getClass(superclassMetaData.baseClasses[0], iModel);
|
|
88
|
+
if (maybeNextSuperclass === undefined)
|
|
89
|
+
throw new core_common_1.IModelError(core_bentley_1.IModelStatus.BadSchema, `could not find the base class of '${currentSuperclass.name}', all generated classes must have a base class`);
|
|
90
|
+
currentSuperclass = maybeNextSuperclass;
|
|
91
|
+
}
|
|
92
|
+
const generatedClass = (_b = class extends superclass {
|
|
93
|
+
static get className() { return className; }
|
|
94
|
+
static get isGeneratedClass() { return this.hasOwnProperty(isGeneratedClassTag); }
|
|
95
|
+
},
|
|
96
|
+
_a = isGeneratedClassTag,
|
|
97
|
+
_b[_a] = true,
|
|
98
|
+
_b);
|
|
99
|
+
// the above creates an anonymous class. For help debugging, set the "constructor.name" property to be the same as the bisClassName.
|
|
74
100
|
Object.defineProperty(generatedClass, "name", { get: () => className }); // this is the (only) way to change that readonly property.
|
|
101
|
+
const navigationProps = Object.entries(entityMetaData.properties)
|
|
102
|
+
.filter(([_propName, prop]) => prop.isNavigation)
|
|
103
|
+
.map(([propName, _prop]) => propName);
|
|
104
|
+
const isElement = (t) => t.is(Element_1.Element); // Entity.is check but with type information to avoid casts later
|
|
105
|
+
// a class only gets an automatic `collectPredecessorIds` implementation if:
|
|
106
|
+
// - it derives from `BisCore:Element`
|
|
107
|
+
// - it is not in the `BisCore` schema
|
|
108
|
+
// - there are no ancestors with manually registered JS implementations, (excluding BisCore base classes)
|
|
109
|
+
if (!generatedClassHasNonGeneratedNonCoreAncestor && isElement(superclass)) {
|
|
110
|
+
Object.defineProperty(generatedClass.prototype, "collectPredecessorIds", {
|
|
111
|
+
// first prototype of `this` is its class
|
|
112
|
+
value(predecessorIds) {
|
|
113
|
+
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
114
|
+
const superImpl = superclass.prototype["collectPredecessorIds"];
|
|
115
|
+
superImpl.call(this, predecessorIds);
|
|
116
|
+
for (const navProp of navigationProps) {
|
|
117
|
+
const relatedElem = this[navProp]; // cast to any since subclass can have any extensions
|
|
118
|
+
if (!relatedElem || !core_bentley_1.Id64.isValid(relatedElem.id))
|
|
119
|
+
continue;
|
|
120
|
+
predecessorIds.add(relatedElem.id);
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
// defaults for methods on a prototype (required for sinon to stub out methods on tests)
|
|
124
|
+
writable: true,
|
|
125
|
+
configurable: true,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
75
128
|
// if the schema is a proxy for a domain with behavior, throw exceptions for all protected operations
|
|
76
129
|
if (schema.missingRequiredBehavior) {
|
|
77
130
|
const throwError = () => { throw new core_common_1.IModelError(core_bentley_1.IModelStatus.WrongHandler, `Schema [${domainName}] not registered, but is marked with SchemaHasBehavior`); };
|