@itwin/core-backend 3.4.0-dev.30 → 3.4.0-dev.32

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.
@@ -42,7 +42,6 @@ export * from "./domains/GenericElements";
42
42
  export { CloudSqlite, IModelJsNative, NativeLoggerCategory } from "@bentley/imodeljs-native";
43
43
  export * from "./IModelCloneContext";
44
44
  export * from "./IModelHost";
45
- export * from "./IModelSchemaLoader";
46
45
  export * from "./IpcHost";
47
46
  export * from "./NativeAppStorage";
48
47
  export * from "./NativeHost";
@@ -1 +1 @@
1
- {"version":3,"file":"core-backend.d.ts","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC7F,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAE3B;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
1
+ {"version":3,"file":"core-backend.d.ts","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":"A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,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAE3B;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
@@ -62,7 +62,6 @@ Object.defineProperty(exports, "IModelJsNative", { enumerable: true, get: functi
62
62
  Object.defineProperty(exports, "NativeLoggerCategory", { enumerable: true, get: function () { return imodeljs_native_1.NativeLoggerCategory; } });
63
63
  __exportStar(require("./IModelCloneContext"), exports);
64
64
  __exportStar(require("./IModelHost"), exports);
65
- __exportStar(require("./IModelSchemaLoader"), exports);
66
65
  __exportStar(require("./IpcHost"), exports);
67
66
  __exportStar(require("./NativeAppStorage"), exports);
68
67
  __exportStar(require("./NativeHost"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,6CAA2B;AAC3B,yDAAuC;AACvC,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,8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H;;;GAGG","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\nexport * from \"./BriefcaseManager\";\r\nexport * from \"./Category\";\r\nexport * from \"./ChangeSummaryManager\";\r\nexport * from \"./CheckpointManager\";\r\nexport * from \"./ClassRegistry\";\r\nexport * from \"./CodeService\";\r\nexport * from \"./CodeSpecs\";\r\nexport * from \"./DisplayStyle\";\r\nexport * from \"./ECDb\";\r\nexport * from \"./ECSchemaXmlContext\";\r\nexport * from \"./ECSqlStatement\";\r\nexport * from \"./Element\";\r\nexport * from \"./ElementAspect\";\r\nexport * from \"./ElementTreeWalker\";\r\nexport * from \"./Entity\";\r\nexport * from \"./ExportGraphics\";\r\nexport * from \"./ExternalSource\";\r\nexport * from \"./GeoCoordConfig\";\r\nexport * from \"./LocalHub\";\r\nexport * from \"./HubMock\";\r\nexport * from \"./IModelJsFs\";\r\nexport * from \"./BackendHubAccess\";\r\nexport * from \"./Relationship\";\r\nexport * from \"./Texture\";\r\nexport * from \"./TxnManager\";\r\nexport * from \"./LineStyle\";\r\nexport * from \"./BackendLoggerCategory\";\r\nexport * from \"./Material\";\r\nexport * from \"./Model\";\r\nexport * from \"./NavigationRelationship\";\r\nexport * from \"./RpcBackend\";\r\nexport * from \"./Schema\";\r\nexport * from \"./SqliteStatement\";\r\nexport * from \"./SQLiteDb\";\r\nexport * from \"./ViewDefinition\";\r\nexport * from \"./BisCoreSchema\";\r\nexport * from \"./ChangedElementsDb\";\r\nexport * from \"./domains/FunctionalSchema\";\r\nexport * from \"./domains/FunctionalElements\";\r\nexport * from \"./domains/GenericSchema\";\r\nexport * from \"./domains/GenericElements\";\r\nexport { CloudSqlite, IModelJsNative, NativeLoggerCategory } from \"@bentley/imodeljs-native\";\r\nexport * from \"./IModelCloneContext\";\r\nexport * from \"./IModelHost\";\r\nexport * from \"./IModelSchemaLoader\";\r\nexport * from \"./IpcHost\";\r\nexport * from \"./NativeAppStorage\";\r\nexport * from \"./NativeHost\";\r\nexport * from \"./PropertyStore\";\r\nexport * from \"./CloudStorageBackend\";\r\nexport * from \"./AliCloudStorageService\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./LocalhostIpcHost\";\r\nexport * from \"./ElementGraphics\";\r\nexport * from \"./workspace/Settings\";\r\nexport * from \"./workspace/SettingsSchemas\";\r\nexport * from \"./workspace/Workspace\";\r\nexport * from \"./IModelDb\"; // must be last\r\n\r\n/** @docs-package-description\r\n * The core-backend package always runs on the computer with a local Briefcase.\r\n *\r\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\r\n */\r\n/**\r\n * @docs-group-description IModelHost\r\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\r\n * See [the learning article]($docs/learning/backend/IModelHost.md).\r\n */\r\n/**\r\n * @docs-group-description iModels\r\n * Classes for working with [iModels]($docs/learning/iModels.md).\r\n * See [the learning article]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Schema\r\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\r\n */\r\n/**\r\n * @docs-group-description Models\r\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Elements\r\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Codes\r\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ViewDefinitions\r\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\r\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\r\n */\r\n/**\r\n * @docs-group-description Relationships\r\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\r\n */\r\n/**\r\n * @docs-group-description ElementAspects\r\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Categories\r\n * Classes for [Categories]($docs/bis/guide/fundamentals/categories.md).\r\n */\r\n/**\r\n * @docs-group-description Symbology\r\n * Classes for defining the appearance of element geometry\r\n */\r\n/**\r\n * @docs-group-description ECDb\r\n * Classes for working with ECDb.\r\n */\r\n/**\r\n * @docs-group-description SQLiteDb\r\n * Classes for working with SQLiteDb.\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Mobile/Desktop Application.\r\n */\r\n/**\r\n * @docs-group-description ECSQL\r\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\r\n */\r\n/**\r\n * @docs-group-description SQLite\r\n * Classes for working directly with SQLite\r\n */\r\n/**\r\n * @docs-group-description Portability\r\n * Classes to help write [portable apps]($docs/learning/Portability.md) and libraries that will run on any platform, including web apps, node services, Electron desktops apps, and mobile apps.\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description CloudStorageBackend\r\n * Classes for working with cloud storage.\r\n */\r\n/**\r\n * @docs-group-description AliCloudStorageService\r\n * Classes for working with cloud storage using AliCloud.\r\n */\r\n/**\r\n * @docs-group-description Authentication\r\n * Classes for working with Authentication.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * APIs for working with tile graphics.\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description Workspace\r\n * APIs for loading and using Settings and Workspace resources\r\n */\r\n/**\r\n * @docs-group-description ViewStateHydrator\r\n * Class responsible for loading ViewStates.\r\n */\r\n"]}
1
+ {"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,6CAA2B;AAC3B,yDAAuC;AACvC,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B;AAC5B,iDAA+B;AAC/B,yCAAuB;AACvB,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,kDAAgC;AAChC,sDAAoC;AACpC,2CAAyB;AACzB,mDAAiC;AACjC,mDAAiC;AACjC,mDAAiC;AACjC,6CAA2B;AAC3B,4CAA0B;AAC1B,+CAA6B;AAC7B,qDAAmC;AACnC,iDAA+B;AAC/B,4CAA0B;AAC1B,+CAA6B;AAC7B,8CAA4B;AAC5B,0DAAwC;AACxC,6CAA2B;AAC3B,0CAAwB;AACxB,2DAAyC;AACzC,+CAA6B;AAC7B,2CAAyB;AACzB,oDAAkC;AAClC,6CAA2B;AAC3B,mDAAiC;AACjC,kDAAgC;AAChC,sDAAoC;AACpC,6DAA2C;AAC3C,+DAA6C;AAC7C,0DAAwC;AACxC,4DAA0C;AAC1C,4DAA6F;AAApF,8GAAA,WAAW,OAAA;AAAE,iHAAA,cAAc,OAAA;AAAE,uHAAA,oBAAoB,OAAA;AAC1D,uDAAqC;AACrC,+CAA6B;AAC7B,4CAA0B;AAC1B,qDAAmC;AACnC,+CAA6B;AAC7B,kDAAgC;AAChC,wDAAsC;AACtC,2DAAyC;AACzC,6CAA2B;AAC3B,qDAAmC;AACnC,oDAAkC;AAClC,uDAAqC;AACrC,8DAA4C;AAC5C,wDAAsC;AACtC,6CAA2B,CAAC,eAAe;AAE3C;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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\nexport * from \"./BriefcaseManager\";\r\nexport * from \"./Category\";\r\nexport * from \"./ChangeSummaryManager\";\r\nexport * from \"./CheckpointManager\";\r\nexport * from \"./ClassRegistry\";\r\nexport * from \"./CodeService\";\r\nexport * from \"./CodeSpecs\";\r\nexport * from \"./DisplayStyle\";\r\nexport * from \"./ECDb\";\r\nexport * from \"./ECSchemaXmlContext\";\r\nexport * from \"./ECSqlStatement\";\r\nexport * from \"./Element\";\r\nexport * from \"./ElementAspect\";\r\nexport * from \"./ElementTreeWalker\";\r\nexport * from \"./Entity\";\r\nexport * from \"./ExportGraphics\";\r\nexport * from \"./ExternalSource\";\r\nexport * from \"./GeoCoordConfig\";\r\nexport * from \"./LocalHub\";\r\nexport * from \"./HubMock\";\r\nexport * from \"./IModelJsFs\";\r\nexport * from \"./BackendHubAccess\";\r\nexport * from \"./Relationship\";\r\nexport * from \"./Texture\";\r\nexport * from \"./TxnManager\";\r\nexport * from \"./LineStyle\";\r\nexport * from \"./BackendLoggerCategory\";\r\nexport * from \"./Material\";\r\nexport * from \"./Model\";\r\nexport * from \"./NavigationRelationship\";\r\nexport * from \"./RpcBackend\";\r\nexport * from \"./Schema\";\r\nexport * from \"./SqliteStatement\";\r\nexport * from \"./SQLiteDb\";\r\nexport * from \"./ViewDefinition\";\r\nexport * from \"./BisCoreSchema\";\r\nexport * from \"./ChangedElementsDb\";\r\nexport * from \"./domains/FunctionalSchema\";\r\nexport * from \"./domains/FunctionalElements\";\r\nexport * from \"./domains/GenericSchema\";\r\nexport * from \"./domains/GenericElements\";\r\nexport { CloudSqlite, IModelJsNative, NativeLoggerCategory } from \"@bentley/imodeljs-native\";\r\nexport * from \"./IModelCloneContext\";\r\nexport * from \"./IModelHost\";\r\nexport * from \"./IpcHost\";\r\nexport * from \"./NativeAppStorage\";\r\nexport * from \"./NativeHost\";\r\nexport * from \"./PropertyStore\";\r\nexport * from \"./CloudStorageBackend\";\r\nexport * from \"./AliCloudStorageService\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./LocalhostIpcHost\";\r\nexport * from \"./ElementGraphics\";\r\nexport * from \"./workspace/Settings\";\r\nexport * from \"./workspace/SettingsSchemas\";\r\nexport * from \"./workspace/Workspace\";\r\nexport * from \"./IModelDb\"; // must be last\r\n\r\n/** @docs-package-description\r\n * The core-backend package always runs on the computer with a local Briefcase.\r\n *\r\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\r\n */\r\n/**\r\n * @docs-group-description IModelHost\r\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\r\n * See [the learning article]($docs/learning/backend/IModelHost.md).\r\n */\r\n/**\r\n * @docs-group-description iModels\r\n * Classes for working with [iModels]($docs/learning/iModels.md).\r\n * See [the learning article]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Schema\r\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\r\n */\r\n/**\r\n * @docs-group-description Models\r\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Elements\r\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Codes\r\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ViewDefinitions\r\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\r\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\r\n */\r\n/**\r\n * @docs-group-description Relationships\r\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\r\n */\r\n/**\r\n * @docs-group-description ElementAspects\r\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Categories\r\n * Classes for [Categories]($docs/bis/guide/fundamentals/categories.md).\r\n */\r\n/**\r\n * @docs-group-description Symbology\r\n * Classes for defining the appearance of element geometry\r\n */\r\n/**\r\n * @docs-group-description ECDb\r\n * Classes for working with ECDb.\r\n */\r\n/**\r\n * @docs-group-description SQLiteDb\r\n * Classes for working with SQLiteDb.\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Mobile/Desktop Application.\r\n */\r\n/**\r\n * @docs-group-description ECSQL\r\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\r\n */\r\n/**\r\n * @docs-group-description SQLite\r\n * Classes for working directly with SQLite\r\n */\r\n/**\r\n * @docs-group-description Portability\r\n * Classes to help write [portable apps]($docs/learning/Portability.md) and libraries that will run on any platform, including web apps, node services, Electron desktops apps, and mobile apps.\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description CloudStorageBackend\r\n * Classes for working with cloud storage.\r\n */\r\n/**\r\n * @docs-group-description AliCloudStorageService\r\n * Classes for working with cloud storage using AliCloud.\r\n */\r\n/**\r\n * @docs-group-description Authentication\r\n * Classes for working with Authentication.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * APIs for working with tile graphics.\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description Workspace\r\n * APIs for loading and using Settings and Workspace resources\r\n */\r\n/**\r\n * @docs-group-description ViewStateHydrator\r\n * Class responsible for loading ViewStates.\r\n */\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/core-backend",
3
- "version": "3.4.0-dev.30",
3
+ "version": "3.4.0-dev.32",
4
4
  "description": "iTwin.js backend components",
5
5
  "main": "lib/cjs/core-backend.js",
6
6
  "typings": "lib/cjs/core-backend",
@@ -24,16 +24,12 @@
24
24
  "url": "http://www.bentley.com"
25
25
  },
26
26
  "peerDependencies": {
27
- "@itwin/core-bentley": "^3.4.0-dev.30",
28
- "@itwin/core-common": "^3.4.0-dev.30",
29
- "@itwin/core-geometry": "^3.4.0-dev.30",
30
- "@itwin/ecschema-metadata": "^3.4.0-dev.30",
27
+ "@itwin/core-bentley": "^3.4.0-dev.32",
28
+ "@itwin/core-common": "^3.4.0-dev.32",
29
+ "@itwin/core-geometry": "^3.4.0-dev.32",
31
30
  "@opentelemetry/api": "^1.0.4"
32
31
  },
33
32
  "peerDependenciesMeta": {
34
- "@itwin/ecschema-metadata": {
35
- "optional": true
36
- },
37
33
  "@opentelemetry/api": {
38
34
  "optional": true
39
35
  }
@@ -43,13 +39,12 @@
43
39
  "NOTE: All tools used by scripts in this package must be listed as devDependencies"
44
40
  ],
45
41
  "devDependencies": {
46
- "@itwin/build-tools": "3.4.0-dev.30",
47
- "@itwin/core-bentley": "3.4.0-dev.30",
48
- "@itwin/core-common": "3.4.0-dev.30",
49
- "@itwin/core-geometry": "3.4.0-dev.30",
50
- "@itwin/core-webpack-tools": "3.4.0-dev.30",
51
- "@itwin/ecschema-metadata": "3.4.0-dev.30",
52
- "@itwin/eslint-plugin": "3.4.0-dev.30",
42
+ "@itwin/build-tools": "3.4.0-dev.32",
43
+ "@itwin/core-bentley": "3.4.0-dev.32",
44
+ "@itwin/core-common": "3.4.0-dev.32",
45
+ "@itwin/core-geometry": "3.4.0-dev.32",
46
+ "@itwin/core-webpack-tools": "3.4.0-dev.32",
47
+ "@itwin/eslint-plugin": "3.4.0-dev.32",
53
48
  "@opentelemetry/api": "^1.0.4",
54
49
  "@types/chai": "4.3.1",
55
50
  "@types/chai-as-promised": "^7",
@@ -80,7 +75,7 @@
80
75
  "dependencies": {
81
76
  "@azure/storage-blob": "^12.7.0",
82
77
  "@bentley/imodeljs-native": "3.4.9",
83
- "@itwin/core-telemetry": "3.4.0-dev.30",
78
+ "@itwin/core-telemetry": "3.4.0-dev.32",
84
79
  "form-data": "^2.3.2",
85
80
  "fs-extra": "^8.1.0",
86
81
  "json5": "^2.2.0",
@@ -1,26 +0,0 @@
1
- import { IModelDb } from "./IModelDb";
2
- import type { Schema as SchemaType } from "@itwin/ecschema-metadata";
3
- /**
4
- * A utility class for retrieving EC Schema objects from an iModel. Loaded schemas are held in memory within
5
- * a schema context managed by IModelSchemaLoader. The IModelSchemaLoader object should be held in memory if
6
- * multiple calls to [[getSchema]] or [[tryGetSchema]] is a possibility, thereby avoiding unnecessary schema
7
- * retrievals from an iModel.
8
- * @alpha
9
- */
10
- export declare class IModelSchemaLoader {
11
- private _iModel;
12
- private _context;
13
- /** @internal */
14
- constructor(_iModel: IModelDb);
15
- /** Get a schema by name
16
- * @param schemaName a string with the name of the schema to load.
17
- * @throws [IModelError]($common) if the schema is not found or cannot be loaded.
18
- */
19
- getSchema<T extends SchemaType>(schemaName: string): T;
20
- /** Attempts to get a schema by name
21
- * @param schemaName a string with the name of the schema to load.
22
- * @throws [IModelError]($common) if the schema exists, but cannot be loaded.
23
- */
24
- tryGetSchema<T extends SchemaType>(schemaName: string): T | undefined;
25
- }
26
- //# sourceMappingURL=IModelSchemaLoader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IModelSchemaLoader.d.ts","sourceRoot":"","sources":["../../src/IModelSchemaLoader.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAwC,MAAM,IAAI,UAAU,EAAE,MAAM,0BAA0B,CAAC;AA6B3G;;;;;;GAMG;AACH,qBAAa,kBAAkB;IAIV,OAAO,CAAC,OAAO;IAHlC,OAAO,CAAC,QAAQ,CAAuB;IAEvC,gBAAgB;gBACW,OAAO,EAAE,QAAQ;IAU5C;;;OAGG;IACI,SAAS,CAAC,CAAC,SAAS,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;IAQ7D;;;OAGG;IACI,YAAY,CAAC,CAAC,SAAS,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;CAM7E"}
@@ -1,114 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.IModelSchemaLoader = void 0;
8
- const core_bentley_1 = require("@itwin/core-bentley");
9
- const core_common_1 = require("@itwin/core-common");
10
- /* eslint-disable @typescript-eslint/naming-convention */
11
- /* eslint-disable @typescript-eslint/no-var-requires */
12
- let Schema;
13
- let SchemaContext;
14
- let SchemaKey;
15
- let SchemaMatchType;
16
- let ECVersion;
17
- /** The ecschema-metadata package is now an optional dependency. If the package
18
- * has not been installed, the exception is caught below. All the types will be
19
- * undefined, and an exception is throw in the IModelSchemaLoader constructor.
20
- */
21
- function loadMetadata() {
22
- try {
23
- const metadata = require("@itwin/ecschema-metadata");
24
- Schema = metadata.Schema;
25
- SchemaContext = metadata.SchemaContext;
26
- SchemaKey = metadata.SchemaKey;
27
- SchemaMatchType = metadata.SchemaMatchType;
28
- ECVersion = metadata.ECVersion;
29
- return true;
30
- }
31
- catch {
32
- return false;
33
- }
34
- }
35
- /**
36
- * A utility class for retrieving EC Schema objects from an iModel. Loaded schemas are held in memory within
37
- * a schema context managed by IModelSchemaLoader. The IModelSchemaLoader object should be held in memory if
38
- * multiple calls to [[getSchema]] or [[tryGetSchema]] is a possibility, thereby avoiding unnecessary schema
39
- * retrievals from an iModel.
40
- * @alpha
41
- */
42
- class IModelSchemaLoader {
43
- /** @internal */
44
- constructor(_iModel) {
45
- this._iModel = _iModel;
46
- // If the ecschema-metadata package was not installed inform the caller.
47
- if (!loadMetadata())
48
- throw new core_common_1.IModelError(core_bentley_1.IModelStatus.NotFound, "IModelSchemaLoader requires that @bentley/ecschema-metadata be installed.");
49
- this._context = new SchemaContext();
50
- const locater = new IModelSchemaLocater(this._iModel);
51
- this._context.addLocater(locater);
52
- }
53
- /** Get a schema by name
54
- * @param schemaName a string with the name of the schema to load.
55
- * @throws [IModelError]($common) if the schema is not found or cannot be loaded.
56
- */
57
- getSchema(schemaName) {
58
- const schema = this.tryGetSchema(schemaName);
59
- if (!schema)
60
- throw new core_common_1.IModelError(core_bentley_1.IModelStatus.NotFound, `reading schema=${schemaName}`);
61
- return schema;
62
- }
63
- /** Attempts to get a schema by name
64
- * @param schemaName a string with the name of the schema to load.
65
- * @throws [IModelError]($common) if the schema exists, but cannot be loaded.
66
- */
67
- tryGetSchema(schemaName) {
68
- // SchemaKey version is not used when locating schema in an iModel, so the version is arbitrary.
69
- const key = new SchemaKey(schemaName, new ECVersion(1, 0, 0));
70
- const schema = this._context.getSchemaSync(key, SchemaMatchType.Latest);
71
- return schema;
72
- }
73
- }
74
- exports.IModelSchemaLoader = IModelSchemaLoader;
75
- /**
76
- * A private ISchemaLocater implementation for locating and retrieving EC Schema objects from an iModel
77
- * @alpha
78
- */
79
- class IModelSchemaLocater {
80
- /** @internal */
81
- constructor(_iModel) {
82
- this._iModel = _iModel;
83
- }
84
- /** Get a schema by [SchemaKey]
85
- * @param schemaKey The [SchemaKey] that identifies the schema.
86
- * @param matchType The [SchemaMatchType] to used for comparing schema versions.
87
- * @param context The [SchemaContext] used to facilitate schema location.
88
- * @throws [IModelError]($common) if the schema exists, but cannot be loaded.
89
- */
90
- async getSchema(schemaKey, matchType, context) {
91
- return this.getSchemaSync(schemaKey, matchType, context);
92
- }
93
- /** Get a schema by [SchemaKey] synchronously.
94
- * @param schemaKey The [SchemaKey] that identifies the schema.
95
- * * @param matchType The [SchemaMatchType] to used for comparing schema versions.
96
- * @param context The [SchemaContext] used to facilitate schema location.
97
- * @throws [IModelError]($common) if the schema exists, but cannot be loaded.
98
- */
99
- getSchemaSync(schemaKey, _matchType, context) {
100
- const schemaProps = this._iModel.nativeDb.getSchemaProps(schemaKey.name);
101
- return Schema.fromJsonSync(schemaProps, context !== null && context !== void 0 ? context : new SchemaContext());
102
- }
103
- /** Get a schema by [SchemaKey] asynchronously.
104
- * @param schemaKey The [SchemaKey] that identifies the schema.
105
- * * @param matchType The [SchemaMatchType] to used for comparing schema versions.
106
- * @param context The [SchemaContext] used to facilitate schema location.
107
- * @throws [Error] if the schema is not found or if the schema exists, but cannot be loaded.
108
- */
109
- async getSchemaAsync(schemaKey, _matchType, context) {
110
- const schemaProps = await this._iModel.nativeDb.getSchemaPropsAsync(schemaKey.name);
111
- return Schema.fromJsonSync(schemaProps, context !== null && context !== void 0 ? context : new SchemaContext());
112
- }
113
- }
114
- //# sourceMappingURL=IModelSchemaLoader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IModelSchemaLoader.js","sourceRoot":"","sources":["../../src/IModelSchemaLoader.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,sDAAmD;AACnD,oDAAiD;AAIjD,yDAAyD;AACzD,wDAAwD;AAExD,IAAI,MAAW,CAAC;AAChB,IAAI,aAAk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AAM,GAAG,GAAG,IAAI,SAAS,CAAC,UAAU,EAAE,IAAI,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC9D,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;QACxE,OAAO,MAAW,CAAC;IACrB,CAAC;CACF;AApCD,gDAoCC;AAED;;;GAGG;AACH,MAAM,mBAAmB;IACvB,gBAAgB;IAChB,YAA2B,OAAiB;QAAjB,YAAO,GAAP,OAAO,CAAU;IAAI,CAAC;IAEjD;;;;;OAKG;IACI,KAAK,CAAC,SAAS,CAAuB,SAA2B,EAAE,SAAiC,EAAE,OAA0C;QACrJ,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAM,CAAC;IAChE,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAAuB,SAA2B,EAAE,UAAkC,EAAE,OAA0C;QACpJ,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACzE,OAAO,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,IAAI,aAAa,EAAE,CAAM,CAAC;IAC/E,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,cAAc,CAAuB,SAA2B,EAAE,UAAkC,EAAE,OAA0C;QAC3J,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACpF,OAAO,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,IAAI,aAAa,EAAE,CAAM,CAAC;IAC/E,CAAC;CACF","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 { IModelStatus } from \"@itwin/core-bentley\";\r\nimport { IModelError } from \"@itwin/core-common\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport type { ISchemaLocater as ISchemaLocaterType, Schema as SchemaType } from \"@itwin/ecschema-metadata\";\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n/* eslint-disable @typescript-eslint/no-var-requires */\r\n\r\nlet Schema: any;\r\nlet SchemaContext: any;\r\nlet SchemaKey: any;\r\nlet SchemaMatchType: any;\r\nlet ECVersion: any;\r\n\r\n/** The ecschema-metadata package is now an optional dependency. If the package\r\n * has not been installed, the exception is caught below. All the types will be\r\n * undefined, and an exception is throw in the IModelSchemaLoader constructor.\r\n */\r\nfunction loadMetadata(): boolean {\r\n try {\r\n const metadata = require(\"@itwin/ecschema-metadata\");\r\n Schema = metadata.Schema;\r\n SchemaContext = metadata.SchemaContext;\r\n SchemaKey = metadata.SchemaKey;\r\n SchemaMatchType = metadata.SchemaMatchType;\r\n ECVersion = metadata.ECVersion;\r\n return true;\r\n } catch {\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * A utility class for retrieving EC Schema objects from an iModel. Loaded schemas are held in memory within\r\n * a schema context managed by IModelSchemaLoader. The IModelSchemaLoader object should be held in memory if\r\n * multiple calls to [[getSchema]] or [[tryGetSchema]] is a possibility, thereby avoiding unnecessary schema\r\n * retrievals from an iModel.\r\n * @alpha\r\n */\r\nexport class IModelSchemaLoader {\r\n private _context: typeof SchemaContext;\r\n\r\n /** @internal */\r\n public constructor(private _iModel: IModelDb) {\r\n // If the ecschema-metadata package was not installed inform the caller.\r\n if (!loadMetadata())\r\n throw new IModelError(IModelStatus.NotFound, \"IModelSchemaLoader requires that @bentley/ecschema-metadata be installed.\");\r\n\r\n this._context = new SchemaContext();\r\n const locater = new IModelSchemaLocater(this._iModel);\r\n this._context.addLocater(locater);\r\n }\r\n\r\n /** Get a schema by name\r\n * @param schemaName a string with the name of the schema to load.\r\n * @throws [IModelError]($common) if the schema is not found or cannot be loaded.\r\n */\r\n public getSchema<T extends SchemaType>(schemaName: string): T {\r\n const schema = this.tryGetSchema(schemaName);\r\n if (!schema)\r\n throw new IModelError(IModelStatus.NotFound, `reading schema=${schemaName}`);\r\n\r\n return schema as T;\r\n }\r\n\r\n /** Attempts to get a schema by name\r\n * @param schemaName a string with the name of the schema to load.\r\n * @throws [IModelError]($common) if the schema exists, but cannot be loaded.\r\n */\r\n public tryGetSchema<T extends SchemaType>(schemaName: string): T | undefined {\r\n // SchemaKey version is not used when locating schema in an iModel, so the version is arbitrary.\r\n const key = new SchemaKey(schemaName, new ECVersion(1, 0, 0));\r\n const schema = this._context.getSchemaSync(key, SchemaMatchType.Latest);\r\n return schema as T;\r\n }\r\n}\r\n\r\n/**\r\n * A private ISchemaLocater implementation for locating and retrieving EC Schema objects from an iModel\r\n * @alpha\r\n */\r\nclass IModelSchemaLocater implements ISchemaLocaterType {\r\n /** @internal */\r\n public constructor(private _iModel: IModelDb) { }\r\n\r\n /** Get a schema by [SchemaKey]\r\n * @param schemaKey The [SchemaKey] that identifies the schema.\r\n * @param matchType The [SchemaMatchType] to used for comparing schema versions.\r\n * @param context The [SchemaContext] used to facilitate schema location.\r\n * @throws [IModelError]($common) if the schema exists, but cannot be loaded.\r\n */\r\n public async getSchema<T extends SchemaType>(schemaKey: typeof SchemaKey, matchType: typeof SchemaMatchType, context?: typeof SchemaContext | undefined): Promise<T | undefined> {\r\n return this.getSchemaSync(schemaKey, matchType, context) as T;\r\n }\r\n\r\n /** Get a schema by [SchemaKey] synchronously.\r\n * @param schemaKey The [SchemaKey] that identifies the schema.\r\n * * @param matchType The [SchemaMatchType] to used for comparing schema versions.\r\n * @param context The [SchemaContext] used to facilitate schema location.\r\n * @throws [IModelError]($common) if the schema exists, but cannot be loaded.\r\n */\r\n public getSchemaSync<T extends SchemaType>(schemaKey: typeof SchemaKey, _matchType: typeof SchemaMatchType, context?: typeof SchemaContext | undefined): T | undefined {\r\n const schemaProps = this._iModel.nativeDb.getSchemaProps(schemaKey.name);\r\n return Schema.fromJsonSync(schemaProps, context ?? new SchemaContext()) as T;\r\n }\r\n\r\n /** Get a schema by [SchemaKey] asynchronously.\r\n * @param schemaKey The [SchemaKey] that identifies the schema.\r\n * * @param matchType The [SchemaMatchType] to used for comparing schema versions.\r\n * @param context The [SchemaContext] used to facilitate schema location.\r\n * @throws [Error] if the schema is not found or if the schema exists, but cannot be loaded.\r\n */\r\n public async getSchemaAsync<T extends SchemaType>(schemaKey: typeof SchemaKey, _matchType: typeof SchemaMatchType, context?: typeof SchemaContext | undefined): Promise<T | undefined> {\r\n const schemaProps = await this._iModel.nativeDb.getSchemaPropsAsync(schemaKey.name);\r\n return Schema.fromJsonSync(schemaProps, context ?? new SchemaContext()) as T;\r\n }\r\n}\r\n"]}