Skip to content

Commit 35ab75a

Browse files
authored
Update dependencies (#204)
* Update dependencies * Fix local connection * Fix editor tests * lint * Fix build and e2e tests * lint * cspell * Changelog * test * test fix * Update pnpm and node in pipeline * TODO * TODO * Private fields
1 parent 8cf7bcc commit 35ab75a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3535
-2076
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@ jobs:
1919

2020
- name: Install pnpm
2121
uses: pnpm/action-setup@v3
22-
with:
23-
version: 9
2422

25-
- name: Use Node.js 20
23+
- name: Use Node.js 22
2624
uses: actions/setup-node@v4
2725
with:
28-
node-version: 20
26+
node-version: 22
2927
cache: "pnpm"
3028

3129
- name: Install dependencies

app/backend/package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@
1717
},
1818
"dependencies": {
1919
"@app/common": "workspace:*",
20-
"@itwin/core-backend": "^4.10.2",
21-
"@itwin/core-bentley": "^4.10.2",
22-
"@itwin/core-common": "^4.10.2",
23-
"@itwin/core-geometry": "^4.10.2",
24-
"@itwin/core-quantity": "^4.10.2",
25-
"@itwin/ecschema-metadata": "^4.10.2",
26-
"@itwin/ecschema-rpcinterface-common": "^4.10.2",
27-
"@itwin/ecschema-rpcinterface-impl": "^4.10.2",
28-
"@itwin/eslint-plugin": "^5.0.0-dev.2",
29-
"@itwin/express-server": "^4.10.2",
30-
"@itwin/imodels-access-backend": "^5.2.3",
31-
"@itwin/presentation-backend": "^4.10.2",
32-
"@itwin/presentation-common": "^4.10.2",
33-
"@types/node": "^20.17.6",
34-
"dotenv": "^16.4.5",
35-
"eslint": "^9.14.0",
36-
"tsx": "^4.19.3",
37-
"typescript": "^5.7.2"
20+
"@itwin/core-backend": "catalog:itwinjs-core",
21+
"@itwin/core-bentley": "catalog:itwinjs-core",
22+
"@itwin/core-common": "catalog:itwinjs-core",
23+
"@itwin/core-geometry": "catalog:itwinjs-core",
24+
"@itwin/core-quantity": "catalog:itwinjs-core",
25+
"@itwin/ecschema-metadata": "catalog:itwinjs-core",
26+
"@itwin/ecschema-rpcinterface-common": "catalog:itwinjs-core",
27+
"@itwin/ecschema-rpcinterface-impl": "catalog:itwinjs-core",
28+
"@itwin/eslint-plugin": "catalog:build-tools",
29+
"@itwin/express-server": "catalog:itwinjs-core",
30+
"@itwin/imodels-access-backend": "catalog:",
31+
"@itwin/presentation-backend": "catalog:itwinjs-core",
32+
"@itwin/presentation-common": "catalog:itwinjs-core",
33+
"@types/node": "catalog:build-tools",
34+
"dotenv": "catalog:build-tools",
35+
"eslint": "catalog:build-tools",
36+
"tsx": "catalog:build-tools",
37+
"typescript": "catalog:build-tools"
3838
}
3939
}

app/backend/src/PresentationRulesEditorRpcImpl.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import * as fs from "fs";
88
import * as os from "os";
99
import * as path from "path";
1010
import { IModelMetadata, PresentationRulesEditorRpcInterface } from "@app/common";
11-
import { RpcManager } from "@itwin/core-common";
11+
import { SnapshotDb } from "@itwin/core-backend";
12+
import { IModelConnectionProps, RpcManager } from "@itwin/core-common";
1213
import { SnapshotFileNameResolver } from "./SnapshotFileNameResolver.js";
1314

1415
/** The backend implementation of PresentationRulesEditorRpcInterface. */
@@ -71,4 +72,14 @@ export class PresentationRulesEditorRpcImpl extends PresentationRulesEditorRpcIn
7172

7273
execFileSync(command, args, { shell: true });
7374
}
75+
76+
public override async getConnectionProps(imodelPath: string): Promise<IModelConnectionProps> {
77+
const db = SnapshotDb.openFile(imodelPath);
78+
// eslint-disable-next-line @itwin/no-internal
79+
return db.getConnectionProps();
80+
}
81+
82+
public override async closeConnection(imodelPath: string): Promise<void> {
83+
SnapshotDb.findByFilename(imodelPath)?.close();
84+
}
7485
}

app/backend/src/main.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ void (async () => {
2626
Logger.setLevel(PresentationBackendLoggerCategory.Package, LogLevel.Info);
2727

2828
const config = new IModelHostConfiguration();
29-
// eslint-disable-next-line @itwin/no-internal
3029
config.hubAccess = new BackendIModelsAccess();
3130
await IModelHost.startup(config);
3231

app/common/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
"build": "tsc"
2020
},
2121
"dependencies": {
22-
"@itwin/core-bentley": "^4.10.2",
23-
"@itwin/core-common": "^4.10.2",
24-
"@itwin/core-geometry": "^4.10.2",
25-
"@itwin/core-quantity": "^4.10.2",
26-
"@itwin/ecschema-metadata": "^4.10.2",
27-
"@itwin/ecschema-rpcinterface-common": "^4.10.2",
28-
"@itwin/eslint-plugin": "^5.0.0-dev.2",
29-
"@itwin/presentation-common": "^4.10.2",
30-
"eslint": "9.14.0",
31-
"typescript": "^5.7.2"
22+
"@itwin/core-bentley": "catalog:itwinjs-core",
23+
"@itwin/core-common": "catalog:itwinjs-core",
24+
"@itwin/core-geometry": "catalog:itwinjs-core",
25+
"@itwin/core-quantity": "catalog:itwinjs-core",
26+
"@itwin/ecschema-metadata": "catalog:itwinjs-core",
27+
"@itwin/ecschema-rpcinterface-common": "catalog:itwinjs-core",
28+
"@itwin/eslint-plugin": "catalog:build-tools",
29+
"@itwin/presentation-common": "catalog:itwinjs-core",
30+
"eslint": "catalog:build-tools",
31+
"typescript": "catalog:build-tools"
3232
}
3333
}

app/common/src/PresentationRulesEditorRpcInterface.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* See LICENSE.md in the project root for license terms and full copyright notice.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { RpcInterface, RpcManager, RpcOperation, RpcRequestTokenSupplier_T } from "@itwin/core-common";
6+
import { IModelConnectionProps, RpcInterface, RpcManager, RpcOperation, RpcRequestTokenSupplier_T } from "@itwin/core-common";
77

88
const localDeploymentOnly: RpcRequestTokenSupplier_T = () => ({ iModelId: "none", key: "" });
99

@@ -32,6 +32,16 @@ export abstract class PresentationRulesEditorRpcInterface extends RpcInterface {
3232
public async openIModelsDirectory(): Promise<void> {
3333
return this.forward(arguments);
3434
}
35+
36+
@RpcOperation.setRoutingProps(localDeploymentOnly)
37+
public async getConnectionProps(_imodelName: string): Promise<IModelConnectionProps> {
38+
return this.forward(arguments);
39+
}
40+
41+
@RpcOperation.setRoutingProps(localDeploymentOnly)
42+
public async closeConnection(_imodelName: string): Promise<void> {
43+
return this.forward(arguments);
44+
}
3545
}
3646

3747
export interface IModelMetadata {

app/common/src/Rpcs.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* See LICENSE.md in the project root for license terms and full copyright notice.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { IModelReadRpcInterface, IModelTileRpcInterface, SnapshotIModelRpcInterface } from "@itwin/core-common";
6+
import { IModelReadRpcInterface, IModelTileRpcInterface } from "@itwin/core-common";
77
import { ECSchemaRpcInterface } from "@itwin/ecschema-rpcinterface-common";
88
import { PresentationRpcInterface } from "@itwin/presentation-common";
99
import { PresentationRulesEditorRpcInterface } from "./PresentationRulesEditorRpcInterface.js";
@@ -12,7 +12,6 @@ export const rpcInterfaces = [
1212
ECSchemaRpcInterface,
1313
IModelTileRpcInterface,
1414
IModelReadRpcInterface,
15-
SnapshotIModelRpcInterface,
1615
PresentationRpcInterface,
1716
PresentationRulesEditorRpcInterface,
1817
];

app/e2e-tests/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
"prepare": "playwright install chromium"
2121
},
2222
"dependencies": {
23-
"@itwin/eslint-plugin": "^5.0.0-dev.2",
24-
"@playwright/test": "^1.49.0",
25-
"@types/node": "^20.17.6",
26-
"cross-env": "^7.0.3",
27-
"eslint": "9.14.0",
28-
"playwright": "^1.49.0",
29-
"typescript": "^5.7.2"
23+
"@itwin/eslint-plugin": "catalog:build-tools",
24+
"@playwright/test": "^1.55.1",
25+
"@types/node": "catalog:build-tools",
26+
"cross-env": "catalog:build-tools",
27+
"eslint": "catalog:build-tools",
28+
"playwright": "^1.55.1",
29+
"typescript": "catalog:build-tools"
3030
}
3131
}

app/e2e-tests/src/demo-imodel.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
import { test } from "@playwright/test";
77
import { getWidget, openDemoIModel } from "./utils.js";
88

9-
// TODO: enable this test when demo imodels work in all environments.
10-
test.describe.skip("demo iModel #web", () => {
9+
test.describe("demo iModel #web", () => {
1110
test("opens", async ({ page }) => {
1211
await openDemoIModel(page);
1312
const treeWidget = getWidget(page, "Tree");

app/e2e-tests/src/share.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ test.describe("opening shared link #local #web", () => {
4444
? `${getServiceUrl()}/open-imodel?iTwinId=b27dc251-0e53-4a36-9a38-182fc309be07&iModelId=f30566da-8fdf-4cba-b09a-fd39f5397ae6`
4545
: `${getServiceUrl()}/open-imodel?snapshot=Baytown.bim`;
4646

47-
// TODO: enable this test when demo imodels work in all environments.
48-
test.skip("populates editor with ruleset and loads widget data when link is valid", async ({ page }) => {
47+
test("populates editor with ruleset and loads widget data when link is valid", async ({ page }) => {
4948
await page.goto(
5049
/* cspell: disable-next-line */
5150
`${baseAddress}#editor/N4IgTgrgNgpgzjALiAXCYAdAdgAhxkASwBMCV8RF5EB9SWBRAgGmzwPvjJwG028cmXAPbhoMACoBPAA4xuBAEoB7ZYgByy4lxCthIgnDkBjQgDNCxgIaJCyrHG599Iwf1cDDJ6XIUgAwhBwiMoAtpraLO4eFIiy8qix1FEuHgRQVgBGMFB+VME0WFoJ0SIAvqU4ALrRFcI1WGUgZUA`,

0 commit comments

Comments
 (0)