@itwin/ecschema-rpcinterface-tests 3.7.9 → 3.7.12

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.
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=SchemaRpcInterface.test.d.ts.map
@@ -1,32 +1,32 @@
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
- const chai_1 = require("chai");
8
- const ecschema_rpcinterface_common_1 = require("@itwin/ecschema-rpcinterface-common");
9
- const TestContext_1 = require("./setup/TestContext");
10
- const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
11
- describe("Schema RPC Interface", () => {
12
- let iModel;
13
- let testContext;
14
- before(async () => {
15
- testContext = await TestContext_1.TestContext.instance();
16
- iModel = await testContext.iModelWithChangesets.getConnection();
17
- });
18
- it("should get schema keys", async () => {
19
- const schemaKeys = [];
20
- const props = await ecschema_rpcinterface_common_1.ECSchemaRpcInterface.getClient().getSchemaKeys(iModel.getRpcProps());
21
- props.forEach((prop) => schemaKeys.push(ecschema_metadata_1.SchemaKey.fromJSON(prop)));
22
- (0, chai_1.expect)(schemaKeys).to.not.be.undefined;
23
- });
24
- it("should get schema JSON", async () => {
25
- const schemaKeys = [];
26
- const props = await ecschema_rpcinterface_common_1.ECSchemaRpcInterface.getClient().getSchemaKeys(iModel.getRpcProps());
27
- props.forEach((prop) => schemaKeys.push(ecschema_metadata_1.SchemaKey.fromJSON(prop)));
28
- const schemaJSON = await ecschema_rpcinterface_common_1.ECSchemaRpcInterface.getClient().getSchemaJSON(iModel.getRpcProps(), schemaKeys[0].name);
29
- (0, chai_1.expect)(schemaJSON).to.not.be.undefined;
30
- });
31
- });
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
+ const chai_1 = require("chai");
8
+ const ecschema_rpcinterface_common_1 = require("@itwin/ecschema-rpcinterface-common");
9
+ const TestContext_1 = require("./setup/TestContext");
10
+ const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
11
+ describe("Schema RPC Interface", () => {
12
+ let iModel;
13
+ let testContext;
14
+ before(async () => {
15
+ testContext = await TestContext_1.TestContext.instance();
16
+ iModel = await testContext.iModelWithChangesets.getConnection();
17
+ });
18
+ it("should get schema keys", async () => {
19
+ const schemaKeys = [];
20
+ const props = await ecschema_rpcinterface_common_1.ECSchemaRpcInterface.getClient().getSchemaKeys(iModel.getRpcProps());
21
+ props.forEach((prop) => schemaKeys.push(ecschema_metadata_1.SchemaKey.fromJSON(prop)));
22
+ (0, chai_1.expect)(schemaKeys).to.not.be.undefined;
23
+ });
24
+ it("should get schema JSON", async () => {
25
+ const schemaKeys = [];
26
+ const props = await ecschema_rpcinterface_common_1.ECSchemaRpcInterface.getClient().getSchemaKeys(iModel.getRpcProps());
27
+ props.forEach((prop) => schemaKeys.push(ecschema_metadata_1.SchemaKey.fromJSON(prop)));
28
+ const schemaJSON = await ecschema_rpcinterface_common_1.ECSchemaRpcInterface.getClient().getSchemaJSON(iModel.getRpcProps(), schemaKeys[0].name);
29
+ (0, chai_1.expect)(schemaJSON).to.not.be.undefined;
30
+ });
31
+ });
32
32
  //# sourceMappingURL=SchemaRpcInterface.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaRpcInterface.test.js","sourceRoot":"","sources":["../../src/frontend/SchemaRpcInterface.test.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;AAE/F,+BAA8B;AAG9B,sFAA2E;AAC3E,qDAAkD;AAClD,gEAAkF;AAElF,QAAQ,CAAC,sBAAsB,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EAAC,UAAU,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { expect } from \"chai\";\r\n\r\nimport { IModelConnection } from \"@itwin/core-frontend\";\r\nimport { ECSchemaRpcInterface } from \"@itwin/ecschema-rpcinterface-common\";\r\nimport { TestContext } from \"./setup/TestContext\";\r\nimport { SchemaKey, SchemaKeyProps, SchemaProps } from \"@itwin/ecschema-metadata\";\r\n\r\ndescribe(\"Schema RPC Interface\", () => {\r\n\r\n let iModel: IModelConnection;\r\n let testContext: TestContext;\r\n\r\n before(async () => {\r\n testContext = await TestContext.instance();\r\n iModel = await testContext.iModelWithChangesets!.getConnection();\r\n });\r\n\r\n it(\"should get schema keys\", async () => {\r\n const schemaKeys: SchemaKey[] = [];\r\n const props: SchemaKeyProps[] = await ECSchemaRpcInterface.getClient().getSchemaKeys(iModel.getRpcProps());\r\n props.forEach((prop: SchemaKeyProps) => schemaKeys.push(SchemaKey.fromJSON(prop)));\r\n expect(schemaKeys).to.not.be.undefined;\r\n });\r\n\r\n it(\"should get schema JSON\", async () => {\r\n const schemaKeys: SchemaKey[] = [];\r\n const props: SchemaKeyProps[] = await ECSchemaRpcInterface.getClient().getSchemaKeys(iModel.getRpcProps());\r\n props.forEach((prop: SchemaKeyProps) => schemaKeys.push(SchemaKey.fromJSON(prop)));\r\n const schemaJSON: SchemaProps = await ECSchemaRpcInterface.getClient().getSchemaJSON(iModel.getRpcProps(), schemaKeys[0].name);\r\n expect(schemaJSON).to.not.be.undefined;\r\n });\r\n});\r\n"]}
1
+ {"version":3,"file":"SchemaRpcInterface.test.js","sourceRoot":"","sources":["../../src/frontend/SchemaRpcInterface.test.ts"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EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAC/H,IAAA,aAAM,EAAC,UAAU,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { expect } from \"chai\";\n\nimport { IModelConnection } from \"@itwin/core-frontend\";\nimport { ECSchemaRpcInterface } from \"@itwin/ecschema-rpcinterface-common\";\nimport { TestContext } from \"./setup/TestContext\";\nimport { SchemaKey, SchemaKeyProps, SchemaProps } from \"@itwin/ecschema-metadata\";\n\ndescribe(\"Schema RPC Interface\", () => {\n\n let iModel: IModelConnection;\n let testContext: TestContext;\n\n before(async () => {\n testContext = await TestContext.instance();\n iModel = await testContext.iModelWithChangesets!.getConnection();\n });\n\n it(\"should get schema keys\", async () => {\n const schemaKeys: SchemaKey[] = [];\n const props: SchemaKeyProps[] = await ECSchemaRpcInterface.getClient().getSchemaKeys(iModel.getRpcProps());\n props.forEach((prop: SchemaKeyProps) => schemaKeys.push(SchemaKey.fromJSON(prop)));\n expect(schemaKeys).to.not.be.undefined;\n });\n\n it(\"should get schema JSON\", async () => {\n const schemaKeys: SchemaKey[] = [];\n const props: SchemaKeyProps[] = await ECSchemaRpcInterface.getClient().getSchemaKeys(iModel.getRpcProps());\n props.forEach((prop: SchemaKeyProps) => schemaKeys.push(SchemaKey.fromJSON(prop)));\n const schemaJSON: SchemaProps = await ECSchemaRpcInterface.getClient().getSchemaJSON(iModel.getRpcProps(), schemaKeys[0].name);\n expect(schemaJSON).to.not.be.undefined;\n });\n});\n"]}
@@ -1,14 +1,14 @@
1
- import { CheckpointConnection } from "@itwin/core-frontend";
2
- import { IModelData } from "../../common/Settings";
3
- import { AccessToken } from "@itwin/core-bentley";
4
- export declare class IModelSession {
5
- iTwinId: string;
6
- iModelId: string;
7
- changesetId?: string;
8
- private _iModel?;
9
- constructor(iModelId: string, iTwinId: string, changesetId?: string);
10
- static create(accessToken: AccessToken, iModelData: IModelData): Promise<IModelSession>;
11
- getConnection(): Promise<CheckpointConnection>;
12
- open(): Promise<CheckpointConnection>;
13
- }
1
+ import { CheckpointConnection } from "@itwin/core-frontend";
2
+ import { IModelData } from "../../common/Settings";
3
+ import { AccessToken } from "@itwin/core-bentley";
4
+ export declare class IModelSession {
5
+ iTwinId: string;
6
+ iModelId: string;
7
+ changesetId?: string;
8
+ private _iModel?;
9
+ constructor(iModelId: string, iTwinId: string, changesetId?: string);
10
+ static create(accessToken: AccessToken, iModelData: IModelData): Promise<IModelSession>;
11
+ getConnection(): Promise<CheckpointConnection>;
12
+ open(): Promise<CheckpointConnection>;
13
+ }
14
14
  //# sourceMappingURL=IModelSession.d.ts.map
@@ -1,79 +1,79 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IModelSession = void 0;
4
- /*---------------------------------------------------------------------------------------------
5
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
- * See LICENSE.md in the project root for license terms and full copyright notice.
7
- *--------------------------------------------------------------------------------------------*/
8
- const chai_1 = require("chai");
9
- const core_frontend_1 = require("@itwin/core-frontend");
10
- const imodels_client_management_1 = require("@itwin/imodels-client-management");
11
- const projects_client_1 = require("@itwin/projects-client");
12
- const imodels_access_frontend_1 = require("@itwin/imodels-access-frontend");
13
- class IModelSession {
14
- constructor(iModelId, iTwinId, changesetId) {
15
- this.iTwinId = iTwinId;
16
- this.iModelId = iModelId;
17
- this.changesetId = changesetId;
18
- }
19
- static async create(accessToken, iModelData) {
20
- var _a;
21
- let iTwinId;
22
- let imodelId;
23
- // Turn the iTwin name into an id
24
- if (iModelData.useITwinName && iModelData.iTwinName) {
25
- const client = new projects_client_1.ProjectsAccessClient();
26
- const iTwinList = await client.getAll(accessToken, {
27
- search: {
28
- searchString: iModelData.iTwinName,
29
- propertyName: projects_client_1.ProjectsSearchableProperty.Name,
30
- exactMatch: true,
31
- },
32
- });
33
- if (iTwinList.length === 0)
34
- throw new Error(`ITwin ${iModelData.iTwinName} was not found for the user.`);
35
- else if (iTwinList.length > 1)
36
- throw new Error(`Multiple iTwins named ${iModelData.iTwinName} were found for the user.`);
37
- iTwinId = iTwinList[0].id;
38
- }
39
- else
40
- iTwinId = iModelData.iTwinId;
41
- if (iModelData.useName) {
42
- const imodelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${(_a = process.env.IMJS_URL_PREFIX) !== null && _a !== void 0 ? _a : ""}api.bentley.com/imodels` } });
43
- const iModels = imodelClient.iModels.getRepresentationList({
44
- authorization: imodels_access_frontend_1.AccessTokenAdapter.toAuthorizationCallback(accessToken),
45
- urlParams: {
46
- iTwinId,
47
- name: iModelData.name,
48
- },
49
- });
50
- for await (const iModel of iModels) {
51
- imodelId = iModel.id;
52
- break;
53
- }
54
- if (!imodelId)
55
- throw new Error(`The iModel ${iModelData.name} does not exist in iTwin ${iTwinId}.`);
56
- }
57
- else
58
- imodelId = iModelData.id;
59
- console.log(`Using iModel { name:${iModelData.name}, id:${imodelId}, iTwinId:${iTwinId}, changesetId:${iModelData.changesetId} }`); // eslint-disable-line no-console
60
- return new IModelSession(imodelId, iTwinId, iModelData.changesetId);
61
- }
62
- async getConnection() {
63
- return undefined === this._iModel ? this.open() : this._iModel;
64
- }
65
- async open() {
66
- try {
67
- // eslint-disable-next-line no-console
68
- console.log(`Environment: ${process.env.IMJS_URL_PREFIX}`);
69
- this._iModel = await core_frontend_1.CheckpointConnection.openRemote(this.iTwinId, this.iModelId);
70
- (0, chai_1.expect)(this._iModel).to.exist;
71
- }
72
- catch (e) {
73
- throw new Error(`Failed to open test iModel. Error: ${e.message}`);
74
- }
75
- return this._iModel;
76
- }
77
- }
78
- exports.IModelSession = IModelSession;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IModelSession = void 0;
4
+ /*---------------------------------------------------------------------------------------------
5
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
+ * See LICENSE.md in the project root for license terms and full copyright notice.
7
+ *--------------------------------------------------------------------------------------------*/
8
+ const chai_1 = require("chai");
9
+ const core_frontend_1 = require("@itwin/core-frontend");
10
+ const imodels_client_management_1 = require("@itwin/imodels-client-management");
11
+ const projects_client_1 = require("@itwin/projects-client");
12
+ const imodels_access_frontend_1 = require("@itwin/imodels-access-frontend");
13
+ class IModelSession {
14
+ constructor(iModelId, iTwinId, changesetId) {
15
+ this.iTwinId = iTwinId;
16
+ this.iModelId = iModelId;
17
+ this.changesetId = changesetId;
18
+ }
19
+ static async create(accessToken, iModelData) {
20
+ var _a;
21
+ let iTwinId;
22
+ let imodelId;
23
+ // Turn the iTwin name into an id
24
+ if (iModelData.useITwinName && iModelData.iTwinName) {
25
+ const client = new projects_client_1.ProjectsAccessClient();
26
+ const iTwinList = await client.getAll(accessToken, {
27
+ search: {
28
+ searchString: iModelData.iTwinName,
29
+ propertyName: projects_client_1.ProjectsSearchableProperty.Name,
30
+ exactMatch: true,
31
+ },
32
+ });
33
+ if (iTwinList.length === 0)
34
+ throw new Error(`ITwin ${iModelData.iTwinName} was not found for the user.`);
35
+ else if (iTwinList.length > 1)
36
+ throw new Error(`Multiple iTwins named ${iModelData.iTwinName} were found for the user.`);
37
+ iTwinId = iTwinList[0].id;
38
+ }
39
+ else
40
+ iTwinId = iModelData.iTwinId;
41
+ if (iModelData.useName) {
42
+ const imodelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${(_a = process.env.IMJS_URL_PREFIX) !== null && _a !== void 0 ? _a : ""}api.bentley.com/imodels` } });
43
+ const iModels = imodelClient.iModels.getRepresentationList({
44
+ authorization: imodels_access_frontend_1.AccessTokenAdapter.toAuthorizationCallback(accessToken),
45
+ urlParams: {
46
+ iTwinId,
47
+ name: iModelData.name,
48
+ },
49
+ });
50
+ for await (const iModel of iModels) {
51
+ imodelId = iModel.id;
52
+ break;
53
+ }
54
+ if (!imodelId)
55
+ throw new Error(`The iModel ${iModelData.name} does not exist in iTwin ${iTwinId}.`);
56
+ }
57
+ else
58
+ imodelId = iModelData.id;
59
+ console.log(`Using iModel { name:${iModelData.name}, id:${imodelId}, iTwinId:${iTwinId}, changesetId:${iModelData.changesetId} }`); // eslint-disable-line no-console
60
+ return new IModelSession(imodelId, iTwinId, iModelData.changesetId);
61
+ }
62
+ async getConnection() {
63
+ return undefined === this._iModel ? this.open() : this._iModel;
64
+ }
65
+ async open() {
66
+ try {
67
+ // eslint-disable-next-line no-console
68
+ console.log(`Environment: ${process.env.IMJS_URL_PREFIX}`);
69
+ this._iModel = await core_frontend_1.CheckpointConnection.openRemote(this.iTwinId, this.iModelId);
70
+ (0, chai_1.expect)(this._iModel).to.exist;
71
+ }
72
+ catch (e) {
73
+ throw new Error(`Failed to open test iModel. Error: ${e.message}`);
74
+ }
75
+ return this._iModel;
76
+ }
77
+ }
78
+ exports.IModelSession = IModelSession;
79
79
  //# sourceMappingURL=IModelSession.js.map
@@ -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,4DAA4G;AAG5G,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,CA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CAAC;gBACrB,MAAM;aACP;YACD,IAAI,CAAC,QAAQ;gBACX,MAAM,IAAI,KAAK,CAAC,cAAc,UAAU,CAAC,IAAI,4BAA4B,OAAO,GAAG,CAAC,CAAC;SACxF;;YACC,QAAQ,GAAG,UAAU,CAAC,EAAG,CAAC;QAE5B,OAAO,CAAC,GAAG,CAAC,uBAAuB,UAAU,CAAC,IAAI,QAAQ,QAAQ,aAAa,OAAO,iBAAiB,UAAU,CAAC,WAAW,IAAI,CAAC,CAAC,CAAC,iCAAiC;QAErK,OAAO,IAAI,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACtE,CAAC;IAEM,KAAK,CAAC,aAAa;QACxB,OAAO,SAAS,KAAK,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACjE,CAAC;IAEM,KAAK,CAAC,IAAI;QACf,IAAI;YACF,sCAAsC;YACtC,OAAO,CAAC,GAAG,CAAC,gBAAgB,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC;YAC3D,IAAI,CAAC,OAAO,GAAG,MAAM,oCAAoB,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YAClF,IAAA,aAAM,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;SAC/B;QAAC,OAAO,CAAM,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACpE;QAED,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AA7ED,sCA6EC","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 { Project as ITwin, ProjectsAccessClient, ProjectsSearchableProperty } from \"@itwin/projects-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 ProjectsAccessClient();\r\n const iTwinList: ITwin[] = await client.getAll(accessToken, {\r\n search: {\r\n searchString: iModelData.iTwinName,\r\n propertyName: ProjectsSearchableProperty.Name,\r\n exactMatch: true,\r\n },\r\n });\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;\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
+ {"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,4DAA4G;AAG5G,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;YACnD,MAAM,MAAM,GAAG,IAAI,sCAAoB,EAAE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QAAQ,GAAG,UAAU,CAAC,EAAG,CAAC;QAE5B,OAAO,CAAC,GAAG,CAAC,uBAAuB,UAAU,CAAC,IAAI,QAAQ,QAAQ,aAAa,OAAO,iBAAiB,UAAU,CAAC,WAAW,IAAI,CAAC,CAAC,CAAC,iCAAiC;QAErK,OAAO,IAAI,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACtE,CAAC;IAEM,KAAK,CAAC,aAAa;QACxB,OAAO,SAAS,KAAK,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACjE,CAAC;IAEM,KAAK,CAAC,IAAI;QACf,IAAI;YACF,sCAAsC;YACtC,OAAO,CAAC,GAAG,CAAC,gBAAgB,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC;YAC3D,IAAI,CAAC,OAAO,GAAG,MAAM,oCAAoB,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YAClF,IAAA,aAAM,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;SAC/B;QAAC,OAAO,CAAM,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACpE;QAED,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AA7ED,sCA6EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { expect } from \"chai\";\nimport { CheckpointConnection } from \"@itwin/core-frontend\";\nimport { IModelsClient } from \"@itwin/imodels-client-management\";\nimport { Project as ITwin, ProjectsAccessClient, ProjectsSearchableProperty } from \"@itwin/projects-client\";\nimport { IModelData } from \"../../common/Settings\";\nimport { AccessToken } from \"@itwin/core-bentley\";\nimport { AccessTokenAdapter } from \"@itwin/imodels-access-frontend\";\n\nexport class IModelSession {\n\n public iTwinId: string;\n public iModelId: string;\n public changesetId?: string;\n\n private _iModel?: CheckpointConnection;\n\n public constructor(iModelId: string, iTwinId: string, changesetId?: string) {\n this.iTwinId = iTwinId;\n this.iModelId = iModelId;\n this.changesetId = changesetId;\n }\n\n public static async create(accessToken: AccessToken, iModelData: IModelData): Promise<IModelSession> {\n let iTwinId;\n let imodelId;\n\n // Turn the iTwin name into an id\n if (iModelData.useITwinName && iModelData.iTwinName) {\n const client = new ProjectsAccessClient();\n const iTwinList: ITwin[] = await client.getAll(accessToken, {\n search: {\n searchString: iModelData.iTwinName,\n propertyName: ProjectsSearchableProperty.Name,\n exactMatch: true,\n },\n });\n\n if (iTwinList.length === 0)\n throw new Error(`ITwin ${iModelData.iTwinName} was not found for the user.`);\n else if (iTwinList.length > 1)\n throw new Error(`Multiple iTwins named ${iModelData.iTwinName} were found for the user.`);\n\n iTwinId = iTwinList[0].id;\n } else\n iTwinId = iModelData.iTwinId!;\n\n if (iModelData.useName) {\n const imodelClient = new IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? \"\"}api.bentley.com/imodels`}});\n const iModels = imodelClient.iModels.getRepresentationList({\n authorization: AccessTokenAdapter.toAuthorizationCallback(accessToken),\n urlParams: {\n iTwinId,\n name: iModelData.name,\n },\n });\n for await (const iModel of iModels) {\n imodelId = iModel.id;\n break;\n }\n if (!imodelId)\n throw new Error(`The iModel ${iModelData.name} does not exist in iTwin ${iTwinId}.`);\n } else\n imodelId = iModelData.id!;\n\n console.log(`Using iModel { name:${iModelData.name}, id:${imodelId}, iTwinId:${iTwinId}, changesetId:${iModelData.changesetId} }`); // eslint-disable-line no-console\n\n return new IModelSession(imodelId, iTwinId, iModelData.changesetId);\n }\n\n public async getConnection(): Promise<CheckpointConnection> {\n return undefined === this._iModel ? this.open() : this._iModel;\n }\n\n public async open(): Promise<CheckpointConnection> {\n try {\n // eslint-disable-next-line no-console\n console.log(`Environment: ${process.env.IMJS_URL_PREFIX}`);\n this._iModel = await CheckpointConnection.openRemote(this.iTwinId, this.iModelId);\n expect(this._iModel).to.exist;\n } catch (e: any) {\n throw new Error(`Failed to open test iModel. Error: ${e.message}`);\n }\n\n return this._iModel;\n }\n}\n"]}
@@ -1,16 +1,16 @@
1
- import { AccessToken } from "@itwin/core-bentley";
2
- import { Settings } from "../../common/Settings";
3
- import { IModelSession } from "./IModelSession";
4
- export declare class TestContext {
5
- adminUserAccessToken: AccessToken;
6
- iModelWithChangesets?: IModelSession;
7
- iTwinId?: string;
8
- settings: Settings;
9
- private constructor();
10
- private static _instance?;
11
- static instance(): Promise<TestContext>;
12
- /** Initialize configuration for the rpc interfaces used by the application. */
13
- private initializeRpcInterfaces;
14
- private initialize;
15
- }
1
+ import { AccessToken } from "@itwin/core-bentley";
2
+ import { Settings } from "../../common/Settings";
3
+ import { IModelSession } from "./IModelSession";
4
+ export declare class TestContext {
5
+ adminUserAccessToken: AccessToken;
6
+ iModelWithChangesets?: IModelSession;
7
+ iTwinId?: string;
8
+ settings: Settings;
9
+ private constructor();
10
+ private static _instance?;
11
+ static instance(): Promise<TestContext>;
12
+ /** Initialize configuration for the rpc interfaces used by the application. */
13
+ private initializeRpcInterfaces;
14
+ private initialize;
15
+ }
16
16
  //# sourceMappingURL=TestContext.d.ts.map
@@ -1,69 +1,69 @@
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.TestContext = void 0;
8
- const chai_1 = require("chai");
9
- const core_bentley_1 = require("@itwin/core-bentley");
10
- const core_frontend_1 = require("@itwin/core-frontend");
11
- const frontend_1 = require("@itwin/oidc-signin-tool/lib/cjs/frontend");
12
- const Settings_1 = require("../../common/Settings");
13
- const SideChannels_1 = require("../../common/SideChannels");
14
- const IModelSession_1 = require("./IModelSession");
15
- const core_common_1 = require("@itwin/core-common");
16
- const imodels_access_frontend_1 = require("@itwin/imodels-access-frontend");
17
- const imodels_client_management_1 = require("@itwin/imodels-client-management");
18
- class TestContext {
19
- constructor(env) {
20
- this.settings = new Settings_1.Settings(env);
21
- }
22
- static async instance() {
23
- if (this._instance === undefined) {
24
- this._instance = new TestContext(await (0, SideChannels_1.getProcessEnvFromBackend)());
25
- await this._instance.initialize();
26
- }
27
- return this._instance;
28
- }
29
- /** Initialize configuration for the rpc interfaces used by the application. */
30
- initializeRpcInterfaces(info) {
31
- // Url without trailing slash
32
- const uriPrefix = this.settings.Backend.location.replace(/\/$/, "");
33
- core_common_1.BentleyCloudRpcManager.initializeClient({ info, uriPrefix }, (0, Settings_1.getRpcInterfaces)());
34
- }
35
- async initialize() {
36
- var _a;
37
- (0, chai_1.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`);
38
- // Print out the configuration
39
- console.log(this.settings.toString()); // eslint-disable-line
40
- // Configure iTwin.js frontend logging to go to the console
41
- core_bentley_1.Logger.initializeToConsole();
42
- core_bentley_1.Logger.setLevelDefault(this.settings.logLevel === undefined ? core_bentley_1.LogLevel.Warning : this.settings.logLevel);
43
- if (undefined !== this.settings.oidcClientId) {
44
- this.adminUserAccessToken = await (0, frontend_1.getAccessTokenFromBackend)({
45
- email: this.settings.users[0].email,
46
- password: this.settings.users[0].password,
47
- }, {
48
- clientId: this.settings.oidcClientId,
49
- redirectUri: this.settings.oidcRedirect,
50
- scope: this.settings.oidcScopes,
51
- authority: this.settings.oidcAuthority,
52
- });
53
- }
54
- const iModelData = this.settings.iModel;
55
- this.iModelWithChangesets = await IModelSession_1.IModelSession.create(this.adminUserAccessToken, iModelData);
56
- this.iTwinId = this.iModelWithChangesets.iTwinId;
57
- this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
58
- const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${(_a = process.env.IMJS_URL_PREFIX) !== null && _a !== void 0 ? _a : ""}api.bentley.com/imodels` } });
59
- await core_frontend_1.NoRenderApp.startup({
60
- applicationId: this.settings.gprid,
61
- authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
62
- hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
63
- });
64
- console.log("TestSetup: Done"); // eslint-disable-line
65
- }
66
- }
67
- exports.TestContext = TestContext;
68
- TestContext._instance = undefined;
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.TestContext = void 0;
8
+ const chai_1 = require("chai");
9
+ const core_bentley_1 = require("@itwin/core-bentley");
10
+ const core_frontend_1 = require("@itwin/core-frontend");
11
+ const frontend_1 = require("@itwin/oidc-signin-tool/lib/cjs/frontend");
12
+ const Settings_1 = require("../../common/Settings");
13
+ const SideChannels_1 = require("../../common/SideChannels");
14
+ const IModelSession_1 = require("./IModelSession");
15
+ const core_common_1 = require("@itwin/core-common");
16
+ const imodels_access_frontend_1 = require("@itwin/imodels-access-frontend");
17
+ const imodels_client_management_1 = require("@itwin/imodels-client-management");
18
+ class TestContext {
19
+ constructor(env) {
20
+ this.settings = new Settings_1.Settings(env);
21
+ }
22
+ static async instance() {
23
+ if (this._instance === undefined) {
24
+ this._instance = new TestContext(await (0, SideChannels_1.getProcessEnvFromBackend)());
25
+ await this._instance.initialize();
26
+ }
27
+ return this._instance;
28
+ }
29
+ /** Initialize configuration for the rpc interfaces used by the application. */
30
+ initializeRpcInterfaces(info) {
31
+ // Url without trailing slash
32
+ const uriPrefix = this.settings.Backend.location.replace(/\/$/, "");
33
+ core_common_1.BentleyCloudRpcManager.initializeClient({ info, uriPrefix }, (0, Settings_1.getRpcInterfaces)());
34
+ }
35
+ async initialize() {
36
+ var _a;
37
+ (0, chai_1.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`);
38
+ // Print out the configuration
39
+ console.log(this.settings.toString()); // eslint-disable-line
40
+ // Configure iTwin.js frontend logging to go to the console
41
+ core_bentley_1.Logger.initializeToConsole();
42
+ core_bentley_1.Logger.setLevelDefault(this.settings.logLevel === undefined ? core_bentley_1.LogLevel.Warning : this.settings.logLevel);
43
+ if (undefined !== this.settings.oidcClientId) {
44
+ this.adminUserAccessToken = await (0, frontend_1.getAccessTokenFromBackend)({
45
+ email: this.settings.users[0].email,
46
+ password: this.settings.users[0].password,
47
+ }, {
48
+ clientId: this.settings.oidcClientId,
49
+ redirectUri: this.settings.oidcRedirect,
50
+ scope: this.settings.oidcScopes,
51
+ authority: this.settings.oidcAuthority,
52
+ });
53
+ }
54
+ const iModelData = this.settings.iModel;
55
+ this.iModelWithChangesets = await IModelSession_1.IModelSession.create(this.adminUserAccessToken, iModelData);
56
+ this.iTwinId = this.iModelWithChangesets.iTwinId;
57
+ this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
58
+ const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${(_a = process.env.IMJS_URL_PREFIX) !== null && _a !== void 0 ? _a : ""}api.bentley.com/imodels` } });
59
+ await core_frontend_1.NoRenderApp.startup({
60
+ applicationId: this.settings.gprid,
61
+ authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
62
+ hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
63
+ });
64
+ console.log("TestSetup: Done"); // eslint-disable-line
65
+ }
66
+ }
67
+ exports.TestContext = TestContext;
68
+ TestContext._instance = undefined;
69
69
  //# sourceMappingURL=TestCont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AC,CAAC;QAE5G,MAAM,YAAY,GAAG,IAAI,yCAAa,CAAC,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,WAAW,MAAA,OAAO,CAAC,GAAG,CAAC,eAAe,mCAAI,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"]}
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;AACrE,mDAAgD;AAChD,oDAAyE;AACzE,4EAAuE;AACvE,gFAAiE;AAEjE,MAAa,WAAW;IAQtB,YAAoB,GAAsB;QACxC,IAAI,CAAC,QAAQ,GAAG,IAAI,mBAAQ,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;IAGM,MAAM,CAAC,KAAK,CAAC,QAAQ;QAC1B,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE;YAChC,IAAI,CAAC,SAAS,GAAG,IAAI,WAAW,CAAC,MAAM,IAAA,uCAAwB,GAAE,CAAC,CAAC;YACnE,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;SACnC;QACD,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,+EAA+E;IACvE,uBAAuB,CAAC,IAAiB;QAC/C,6BAA6B;QAC7B,MAAM,SAAS,GAAW,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC5E,oCAAsB,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,IAAA,2BAAgB,GAAE,CAAC,CAAC;IACnF,CAAC;IAEO,KAAK,CAAC,UAAU;;QACtB,IAAA,aAAM,EAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MA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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,MAAA,OAAO,CAAC,GAAG,CAAC,eAAe,mCAAI,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":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { expect } from \"chai\";\nimport { AccessToken, Logger, LogLevel } from \"@itwin/core-bentley\";\nimport { NoRenderApp } from \"@itwin/core-frontend\";\nimport {\n getAccessTokenFromBackend, TestBrowserAuthorizationClientConfiguration, TestFrontendAuthorizationClient, TestUserCredentials,\n} from \"@itwin/oidc-signin-tool/lib/cjs/frontend\";\nimport { getRpcInterfaces, Settings } from \"../../common/Settings\";\nimport { getProcessEnvFromBackend } from \"../../common/SideChannels\";\nimport { IModelSession } from \"./IModelSession\";\nimport { BentleyCloudRpcManager, OpenAPIInfo } from \"@itwin/core-common\";\nimport { FrontendIModelsAccess } from \"@itwin/imodels-access-frontend\";\nimport { IModelsClient } from \"@itwin/imodels-client-management\";\n\nexport class TestContext {\n public adminUserAccessToken!: AccessToken;\n\n public iModelWithChangesets?: IModelSession;\n public iTwinId?: string;\n\n public settings: Settings;\n\n private constructor(env: NodeJS.ProcessEnv) {\n this.settings = new Settings(env);\n }\n private static _instance?: TestContext = undefined;\n\n public static async instance(): Promise<TestContext> {\n if (this._instance === undefined) {\n this._instance = new TestContext(await getProcessEnvFromBackend());\n await this._instance.initialize();\n }\n return this._instance;\n }\n\n /** Initialize configuration for the rpc interfaces used by the application. */\n private initializeRpcInterfaces(info: OpenAPIInfo) { // eslint-disable-line deprecation/deprecation\n // Url without trailing slash\n const uriPrefix: string = this.settings.Backend.location.replace(/\\/$/, \"\");\n BentleyCloudRpcManager.initializeClient({ info, uriPrefix }, getRpcInterfaces());\n }\n\n private async initialize() {\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`);\n\n // Print out the configuration\n console.log(this.settings.toString()); // eslint-disable-line\n\n // Configure iTwin.js frontend logging to go to the console\n Logger.initializeToConsole();\n Logger.setLevelDefault(this.settings.logLevel === undefined ? LogLevel.Warning : this.settings.logLevel);\n\n if (undefined !== this.settings.oidcClientId) {\n this.adminUserAccessToken = await getAccessTokenFromBackend({\n email: this.settings.users[0].email,\n password: this.settings.users[0].password,\n } as TestUserCredentials, {\n clientId: this.settings.oidcClientId,\n redirectUri: this.settings.oidcRedirect,\n scope: this.settings.oidcScopes,\n authority: this.settings.oidcAuthority,\n } as TestBrowserAuthorizationClientConfiguration);\n }\n\n const iModelData = this.settings.iModel;\n\n this.iModelWithChangesets = await IModelSession.create(this.adminUserAccessToken, iModelData);\n this.iTwinId = this.iModelWithChangesets.iTwinId;\n\n this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });\n\n const iModelClient = new IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? \"\"}api.bentley.com/imodels` } });\n\n await NoRenderApp.startup({\n applicationId: this.settings.gprid,\n authorizationClient: new TestFrontendAuthorizationClient(this.adminUserAccessToken),\n hubAccess: new FrontendIModelsAccess(iModelClient),\n });\n\n console.log(\"TestSetup: Done\"); // eslint-disable-line\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/ecschema-rpcinterface-tests",
3
- "version": "3.7.9",
3
+ "version": "3.7.12",
4
4
  "description": "Integration tests for the Schema RPC Interface",
5
5
  "author": {
6
6
  "name": "Bentley Systems, Inc.",
@@ -11,23 +11,23 @@
11
11
  "url": "https://github.com/iTwin/itwinjs-core/tree/master/full-stack-tests/ecschema-rpc-interface"
12
12
  },
13
13
  "dependencies": {
14
- "@itwin/build-tools": "3.7.9",
15
- "@itwin/certa": "3.7.9",
16
- "@itwin/core-bentley": "3.7.9",
17
- "@itwin/core-common": "3.7.9",
18
- "@itwin/core-frontend": "3.7.9",
19
- "@itwin/core-geometry": "3.7.9",
20
- "@itwin/core-quantity": "3.7.9",
21
- "@itwin/ecschema-metadata": "3.7.9",
22
- "@itwin/ecschema-rpcinterface-common": "3.7.9",
23
- "@itwin/ecschema-rpcinterface-impl": "3.7.9",
14
+ "@itwin/build-tools": "3.7.12",
15
+ "@itwin/certa": "3.7.12",
16
+ "@itwin/core-bentley": "3.7.12",
17
+ "@itwin/core-common": "3.7.12",
18
+ "@itwin/core-frontend": "3.7.12",
19
+ "@itwin/core-geometry": "3.7.12",
20
+ "@itwin/core-quantity": "3.7.12",
21
+ "@itwin/ecschema-metadata": "3.7.12",
22
+ "@itwin/ecschema-rpcinterface-common": "3.7.12",
23
+ "@itwin/ecschema-rpcinterface-impl": "3.7.12",
24
24
  "@itwin/imodels-access-backend": "^3.0.0",
25
25
  "@itwin/imodels-access-frontend": "^3.0.0",
26
26
  "@itwin/imodels-client-authoring": "^3.0.0",
27
27
  "@itwin/imodels-client-management": "^3.0.0",
28
28
  "@itwin/oidc-signin-tool": "~3.6.0",
29
- "@itwin/presentation-common": "3.7.9",
30
- "@itwin/presentation-frontend": "3.7.9",
29
+ "@itwin/presentation-common": "3.7.12",
30
+ "@itwin/presentation-frontend": "3.7.12",
31
31
  "chai": "^4.1.2",
32
32
  "chai-as-promised": "^7",
33
33
  "dotenv": "^10.0.0",
@@ -37,9 +37,9 @@
37
37
  "puppeteer": "15.5.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@itwin/core-backend": "3.7.9",
41
- "@itwin/eslint-plugin": "3.7.9",
42
- "@itwin/express-server": "3.7.9",
40
+ "@itwin/core-backend": "3.7.12",
41
+ "@itwin/eslint-plugin": "3.7.12",
42
+ "@itwin/express-server": "3.7.12",
43
43
  "@itwin/projects-client": "^0.6.0",
44
44
  "@types/chai": "4.3.1",
45
45
  "@types/chai-as-promised": "^7",