Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin axios to 1.2.2 #202

Merged
merged 5 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion clients/imodels-client-management/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"extends": "./node_modules/@itwin/imodels-client-common-config/.eslintrc.json"
},
"dependencies": {
"axios": "^1.0.0"
"axios": "1.2.2"
},
"devDependencies": {
"@itwin/imodels-client-common-config": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class ThumbnailOperations<TOptions extends OperationOptions> extends Oper
url,
contentType: params.thumbnailProperties.imageType,
body: params.thumbnailProperties.image,
headers: params.headers
headers: { ...params.headers }
});
}
}
20 changes: 10 additions & 10 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@azure/abort-controller": "^1.1.0",
"@itwin/imodels-access-common": "workspace:*",
"@itwin/imodels-client-authoring": "workspace:*",
"axios": "^1.0.0"
"axios": "1.2.2"
},
"devDependencies": {
"@itwin/core-backend": "^4.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
CheckpointArg, CheckpointProps,
V2CheckpointAccessProps
} from "@itwin/core-backend";
import { Logger } from "@itwin/core-bentley";
import { Constants } from "@itwin/imodels-access-common/lib/Constants";
import { handleAPIErrors } from "@itwin/imodels-access-common/lib/ErrorHandlingFunctions";
import axios, { AxiosResponse } from "axios";
Expand Down Expand Up @@ -79,7 +80,12 @@ export async function getV1CheckpointSize(downloadUrl: string): Promise<number>
const contentRangeHeaderName = "content-range";

const response: AxiosResponse = await axios.get(downloadUrl, { headers: { Range: emptyRangeHeaderValue } });
const rangeHeaderValue: string = response.headers[contentRangeHeaderName];
const rangeHeaderValue: string | undefined = response.headers[contentRangeHeaderName];
if (!rangeHeaderValue) {
Logger.logError("BackendIModelsAccess", "Cannot determine total V1 checkpoint size");
return 0;
}

const rangeTotalBytesString: string = rangeHeaderValue.split("/")[1];
const rangeTotalBytes: number = parseInt(rangeTotalBytesString, 10);

Expand Down
2 changes: 1 addition & 1 deletion tests/imodels-clients-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@itwin/imodels-client-test-utils": "workspace:*",
"@itwin/object-storage-azure": "^2.0.0",
"@itwin/object-storage-core": "^2.0.0",
"axios": "^1.0.0",
"axios": "1.2.2",
"chai": "~4.3.4",
"chai-as-promised": "~7.1.1",
"dotenv": "~10.0.0",
Expand Down
2 changes: 1 addition & 1 deletion utils/imodels-client-test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@itwin/imodels-client-authoring": "workspace:*",
"@itwin/imodels-client-management": "workspace:*",
"@itwin/object-storage-core": "^2.0.0",
"axios": "^1.0.0",
"axios": "1.2.2",
"chai": "~4.3.4",
"dotenv": "~10.0.0",
"inversify": "~6.0.1",
Expand Down