@itwin/ecschema-rpcinterface-tests 4.6.0-dev.22 → 4.6.0-dev.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/backend/BackendInit.js.map +1 -1
- package/lib/common/Settings.js.map +1 -1
- package/lib/dist/bundled-tests.js +487 -661
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js +5 -5
- package/lib/frontend/setup/IModelSession.js.map +1 -1
- package/lib/frontend/setup/TestContext.js +1 -1
- package/lib/frontend/setup/TestContext.js.map +1 -1
- package/package.json +17 -17
|
@@ -142,7 +142,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142
142
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
143
143
|
/* harmony export */ "default": () => (/* binding */ DracoBuilder)
|
|
144
144
|
/* harmony export */ });
|
|
145
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.
|
|
145
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
146
146
|
|
|
147
147
|
const GLTF_TO_DRACO_ATTRIBUTE_NAME_MAP = {
|
|
148
148
|
POSITION: 'POSITION',
|
|
@@ -610,7 +610,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
610
610
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
611
611
|
/* harmony export */ "default": () => (/* binding */ DracoParser)
|
|
612
612
|
/* harmony export */ });
|
|
613
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.
|
|
613
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
614
614
|
/* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/category/mesh/mesh-utils.js");
|
|
615
615
|
/* harmony import */ var _utils_get_draco_schema__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/get-draco-schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/utils/get-draco-schema.js");
|
|
616
616
|
|
|
@@ -1377,7 +1377,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1377
1377
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1378
1378
|
/* harmony export */ "default": () => (/* binding */ Field)
|
|
1379
1379
|
/* harmony export */ });
|
|
1380
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.
|
|
1380
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
1381
1381
|
|
|
1382
1382
|
class Field {
|
|
1383
1383
|
constructor(name, type, nullable = false, metadata = new Map()) {
|
|
@@ -1426,7 +1426,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1426
1426
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1427
1427
|
/* harmony export */ "default": () => (/* binding */ Schema)
|
|
1428
1428
|
/* harmony export */ });
|
|
1429
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.
|
|
1429
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
1430
1430
|
/* harmony import */ var _utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/utils/assert.js");
|
|
1431
1431
|
|
|
1432
1432
|
|
|
@@ -1567,7 +1567,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1567
1567
|
/* harmony export */ "Uint8": () => (/* binding */ Uint8),
|
|
1568
1568
|
/* harmony export */ "Utf8": () => (/* binding */ Utf8)
|
|
1569
1569
|
/* harmony export */ });
|
|
1570
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.
|
|
1570
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
1571
1571
|
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enum */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/enum.js");
|
|
1572
1572
|
|
|
1573
1573
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelSession.js","sourceRoot":"","sources":["../../../src/frontend/setup/IModelSession.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,+BAA8B;AAC9B,wDAA4D;AAC5D,gFAAiE;AACjE,wDAAmG;AAGnG,4EAAoE;AAEpE,MAAa,aAAa;IAQxB,YAAmB,QAAgB,EAAE,OAAe,EAAE,WAAoB;QACxE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,WAAwB,EAAE,UAAsB;QACzE,IAAI,OAAO,CAAC;QACZ,IAAI,QAAQ,CAAC;QAEb,iCAAiC;QACjC,IAAI,UAAU,CAAC,YAAY,IAAI,UAAU,CAAC,SAAS,EAAE;
|
|
1
|
+
{"version":3,"file":"IModelSession.js","sourceRoot":"","sources":["../../../src/frontend/setup/IModelSession.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,+BAA8B;AAC9B,wDAA4D;AAC5D,gFAAiE;AACjE,wDAAmG;AAGnG,4EAAoE;AAEpE,MAAa,aAAa;IAQxB,YAAmB,QAAgB,EAAE,OAAe,EAAE,WAAoB;QACxE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,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M,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;QACrE,CAAC;QAED,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AA5ED,sCA4EC","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 { expect } from \"chai\";\r\nimport { CheckpointConnection } from \"@itwin/core-frontend\";\r\nimport { IModelsClient } from \"@itwin/imodels-client-management\";\r\nimport { ITwin, ITwinsAccessClient, ITwinsAPIResponse, ITwinSubClass } from \"@itwin/itwins-client\";\r\nimport { IModelData } from \"../../common/Settings\";\r\nimport { AccessToken } from \"@itwin/core-bentley\";\r\nimport { AccessTokenAdapter } from \"@itwin/imodels-access-frontend\";\r\n\r\nexport class IModelSession {\r\n\r\n public iTwinId: string;\r\n public iModelId: string;\r\n public changesetId?: string;\r\n\r\n private _iModel?: CheckpointConnection;\r\n\r\n public constructor(iModelId: string, iTwinId: string, changesetId?: string) {\r\n this.iTwinId = iTwinId;\r\n this.iModelId = iModelId;\r\n this.changesetId = changesetId;\r\n }\r\n\r\n public static async create(accessToken: AccessToken, iModelData: IModelData): Promise<IModelSession> {\r\n let iTwinId;\r\n let imodelId;\r\n\r\n // Turn the iTwin name into an id\r\n if (iModelData.useITwinName && iModelData.iTwinName) {\r\n const client = new ITwinsAccessClient();\r\n const iTwinListResponse: ITwinsAPIResponse<ITwin[]> = await client.queryAsync(accessToken, ITwinSubClass.Project , {\r\n displayName: iModelData.iTwinName,\r\n });\r\n const iTwinList = iTwinListResponse.data;\r\n if (!iTwinList) {\r\n throw new Error(`ITwin ${iModelData.iTwinName} returned with no data when queried.`);\r\n }\r\n if (iTwinList.length === 0)\r\n throw new Error(`ITwin ${iModelData.iTwinName} was not found for the user.`);\r\n else if (iTwinList.length > 1)\r\n throw new Error(`Multiple iTwins named ${iModelData.iTwinName} were found for the user.`);\r\n\r\n iTwinId = iTwinList[0].id ?? iModelData.iTwinId!;\r\n } else\r\n iTwinId = iModelData.iTwinId!;\r\n\r\n if (iModelData.useName) {\r\n const imodelClient = new IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? \"\"}api.bentley.com/imodels`}});\r\n const iModels = imodelClient.iModels.getRepresentationList({\r\n authorization: AccessTokenAdapter.toAuthorizationCallback(accessToken),\r\n urlParams: {\r\n iTwinId,\r\n name: iModelData.name,\r\n },\r\n });\r\n for await (const iModel of iModels) {\r\n imodelId = iModel.id;\r\n break;\r\n }\r\n if (!imodelId)\r\n throw new Error(`The iModel ${iModelData.name} does not exist in iTwin ${iTwinId}.`);\r\n } else\r\n imodelId = iModelData.id!;\r\n\r\n console.log(`Using iModel { name:${iModelData.name}, id:${imodelId}, iTwinId:${iTwinId}, changesetId:${iModelData.changesetId} }`); // eslint-disable-line no-console\r\n\r\n return new IModelSession(imodelId, iTwinId, iModelData.changesetId);\r\n }\r\n\r\n public async getConnection(): Promise<CheckpointConnection> {\r\n return undefined === this._iModel ? this.open() : this._iModel;\r\n }\r\n\r\n public async open(): Promise<CheckpointConnection> {\r\n try {\r\n // eslint-disable-next-line no-console\r\n console.log(`Environment: ${process.env.IMJS_URL_PREFIX}`);\r\n this._iModel = await CheckpointConnection.openRemote(this.iTwinId, this.iModelId);\r\n expect(this._iModel).to.exist;\r\n } catch (e: any) {\r\n throw new Error(`Failed to open test iModel. Error: ${e.message}`);\r\n }\r\n\r\n return this._iModel;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestContext.js","sourceRoot":"","sources":["../../../src/frontend/setup/TestContext.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,+BAA8B;AAC9B,sDAAoE;AACpE,wDAAmD;AACnD,uEAEkD;AAClD,oDAAmE;AACnE,4DAAqE;AACr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,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC;QAC9F,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC;QAEjD,IAAI,CAAC,uBAAuB,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QAE5G,MAAM,YAAY,GAAG,IAAI,yCAAa,CAAC,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,WAAW,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE,yBAAyB,EAAE,EAAE,CAAC,CAAC;QAEpI,MAAM,2BAAW,CAAC,OAAO,CAAC;YACxB,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK;YAClC,mBAAmB,EAAE,IAAI,0CAA+B,CAAC,IAAI,CAAC,oBAAoB,CAAC;YACnF,SAAS,EAAE,IAAI,+CAAqB,CAAC,YAAY,CAAC;SACnD,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAE,sBAAsB;IACzD,CAAC;;AAlEH,kCAmEC;AAxDgB,qBAAS,GAAiB,SAAS,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 { AccessToken, Logger, LogLevel } from \"@itwin/core-bentley\";\r\nimport { NoRenderApp } from \"@itwin/core-frontend\";\r\nimport {\r\n getAccessTokenFromBackend, TestBrowserAuthorizationClientConfiguration, TestFrontendAuthorizationClient, TestUserCredentials,\r\n} from \"@itwin/oidc-signin-tool/lib/cjs/frontend\";\r\nimport { getRpcInterfaces, Settings } from \"../../common/Settings\";\r\nimport { getProcessEnvFromBackend } from \"../../common/SideChannels\";\r\nimport { IModelSession } from \"./IModelSession\";\r\nimport { BentleyCloudRpcManager, OpenAPIInfo } from \"@itwin/core-common\";\r\nimport { FrontendIModelsAccess } from \"@itwin/imodels-access-frontend\";\r\nimport { IModelsClient } from \"@itwin/imodels-client-management\";\r\n\r\nexport class TestContext {\r\n public adminUserAccessToken!: AccessToken;\r\n\r\n public iModelWithChangesets?: IModelSession;\r\n public iTwinId?: string;\r\n\r\n public settings: Settings;\r\n\r\n private constructor(env: NodeJS.ProcessEnv) {\r\n this.settings = new Settings(env);\r\n }\r\n private static _instance?: TestContext = undefined;\r\n\r\n public static async instance(): Promise<TestContext> {\r\n if (this._instance === undefined) {\r\n this._instance = new TestContext(await getProcessEnvFromBackend());\r\n await this._instance.initialize();\r\n }\r\n return this._instance;\r\n }\r\n\r\n /** Initialize configuration for the rpc interfaces used by the application. */\r\n private initializeRpcInterfaces(info: OpenAPIInfo) { // eslint-disable-line deprecation/deprecation\r\n // Url without trailing slash\r\n const uriPrefix: string = this.settings.Backend.location.replace(/\\/$/, \"\");\r\n BentleyCloudRpcManager.initializeClient({ info, uriPrefix }, getRpcInterfaces());\r\n }\r\n\r\n private async initialize() {\r\n expect(this.settings.users.length).to.be.gte(1, `Unexpected number of users found in settings - got ${this.settings.users.length}, expected at least 2`);\r\n\r\n // Print out the configuration\r\n console.log(this.settings.toString()); // eslint-disable-line\r\n\r\n // Configure iTwin.js frontend logging to go to the console\r\n Logger.initializeToConsole();\r\n Logger.setLevelDefault(this.settings.logLevel === undefined ? LogLevel.Warning : this.settings.logLevel);\r\n\r\n if (undefined !== this.settings.oidcClientId) {\r\n this.adminUserAccessToken = await getAccessTokenFromBackend({\r\n email: this.settings.users[0].email,\r\n password: this.settings.users[0].password,\r\n } as TestUserCredentials, {\r\n clientId: this.settings.oidcClientId,\r\n redirectUri: this.settings.oidcRedirect,\r\n scope: this.settings.oidcScopes,\r\n authority: this.settings.oidcAuthority,\r\n } as TestBrowserAuthorizationClientConfiguration);\r\n }\r\n\r\n const iModelData = this.settings.iModel;\r\n\r\n this.iModelWithChangesets = await IModelSession.create(this.adminUserAccessToken, iModelData);\r\n this.iTwinId = this.iModelWithChangesets.iTwinId;\r\n\r\n this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });\r\n\r\n const iModelClient = new IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? \"\"}api.bentley.com/imodels` } });\r\n\r\n await NoRenderApp.startup({\r\n applicationId: this.settings.gprid,\r\n authorizationClient: new TestFrontendAuthorizationClient(this.adminUserAccessToken),\r\n hubAccess: new FrontendIModelsAccess(iModelClient),\r\n });\r\n\r\n console.log(\"TestSetup: Done\"); // eslint-disable-line\r\n }\r\n}\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/ecschema-rpcinterface-tests",
|
|
3
|
-
"version": "4.6.0-dev.
|
|
3
|
+
"version": "4.6.0-dev.24",
|
|
4
4
|
"description": "Integration tests for the Schema RPC Interface",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Bentley Systems, Inc.",
|
|
@@ -23,21 +23,21 @@
|
|
|
23
23
|
"dotenv-expand": "^5.1.0",
|
|
24
24
|
"mocha": "^10.2.0",
|
|
25
25
|
"openid-client": "^4.7.4",
|
|
26
|
-
"@itwin/
|
|
27
|
-
"@itwin/certa": "4.6.0-dev.
|
|
28
|
-
"@itwin/
|
|
29
|
-
"@itwin/core-common": "4.6.0-dev.
|
|
30
|
-
"@itwin/
|
|
31
|
-
"@itwin/core-frontend": "4.6.0-dev.
|
|
32
|
-
"@itwin/ecschema-
|
|
33
|
-
"@itwin/core-quantity": "4.6.0-dev.
|
|
34
|
-
"@itwin/
|
|
35
|
-
"@itwin/
|
|
36
|
-
"@itwin/
|
|
37
|
-
"@itwin/
|
|
26
|
+
"@itwin/build-tools": "4.6.0-dev.24",
|
|
27
|
+
"@itwin/certa": "4.6.0-dev.24",
|
|
28
|
+
"@itwin/core-bentley": "4.6.0-dev.24",
|
|
29
|
+
"@itwin/core-common": "4.6.0-dev.24",
|
|
30
|
+
"@itwin/core-geometry": "4.6.0-dev.24",
|
|
31
|
+
"@itwin/core-frontend": "4.6.0-dev.24",
|
|
32
|
+
"@itwin/ecschema-metadata": "4.6.0-dev.24",
|
|
33
|
+
"@itwin/core-quantity": "4.6.0-dev.24",
|
|
34
|
+
"@itwin/ecschema-rpcinterface-common": "4.6.0-dev.24",
|
|
35
|
+
"@itwin/ecschema-rpcinterface-impl": "4.6.0-dev.24",
|
|
36
|
+
"@itwin/presentation-frontend": "4.6.0-dev.24",
|
|
37
|
+
"@itwin/presentation-common": "4.6.0-dev.24"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@itwin/eslint-plugin": "4.0.0-dev.
|
|
40
|
+
"@itwin/eslint-plugin": "4.0.0-dev.52",
|
|
41
41
|
"@itwin/itwins-client": "^1.2.0",
|
|
42
42
|
"@types/chai": "4.3.1",
|
|
43
43
|
"@types/chai-as-promised": "^7",
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
"rimraf": "^3.0.2",
|
|
55
55
|
"source-map-loader": "^4.0.0",
|
|
56
56
|
"stream-browserify": "^3.0.0",
|
|
57
|
-
"typescript": "~5.
|
|
57
|
+
"typescript": "~5.3.3",
|
|
58
58
|
"webpack": "^5.76.0",
|
|
59
59
|
"webpack-cli": "^5.0.1",
|
|
60
|
-
"@itwin/
|
|
61
|
-
"@itwin/
|
|
60
|
+
"@itwin/core-backend": "4.6.0-dev.24",
|
|
61
|
+
"@itwin/express-server": "4.6.0-dev.24",
|
|
62
62
|
"internal-tools": "3.0.0-dev.69"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|