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

Revert "feat: Bump Axios to 0.28.0 (#988)" #992

Merged
merged 2 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 27 additions & 44 deletions package-lock.json

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

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@types/react-transition-group": "^4.4.2",
"@web3-storage/parse-link-header": "^3.1.0",
"ajv": "^8.10.0",
"axios": "^0.28.0",
"axios": "^0.21.1",
"axios-retry": "^3.1.9",
"azure-iot-dtdl-parser": "^0.0.1-beta.0",
"constantinople": "^4.0.1",
Expand Down Expand Up @@ -176,8 +176,7 @@
"overrides": {
"[email protected]": "1.2.6",
"follow-redirects": "1.15.6",
"es5-ext": "0.10.63",
"axios": "^0.28.0"
"es5-ext": "0.10.63"
},
"author": "",
"license": "ISC"
Expand Down
11 changes: 4 additions & 7 deletions src/Adapters/ADTAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,7 @@ export default class ADTAdapter implements IADTAdapter {
return null;
}
});
return new ADTModelsData(
(axiosResult?.data as unknown) as IADTModel[]
);
return new ADTModelsData(axiosResult?.data);
});
}

Expand Down Expand Up @@ -817,7 +815,7 @@ export default class ADTAdapter implements IADTAdapter {
const recursivelyAddToExpandedModels = async (modelId: string) => {
try {
// Add root model
const rootModel = (await fetchFullModel(modelId)).data.data
const rootModel = (await fetchFullModel(modelId)).data
.model;
expandedModels.push(rootModel);

Expand Down Expand Up @@ -869,8 +867,7 @@ export default class ADTAdapter implements IADTAdapter {

const parallelFetchModel = async (modelId: string) => {
try {
const model = (await fetchFullModel(modelId)).data.data
.model;
const model = (await fetchFullModel(modelId)).data.model;
expandedModels.push(model);
} catch (err) {
adapterMethodSandbox.pushError({
Expand Down Expand Up @@ -951,7 +948,7 @@ export default class ADTAdapter implements IADTAdapter {
}
});

return new ADTRelationshipData(axiosResponse.data.data);
return new ADTRelationshipData(axiosResponse.data);
});
}

Expand Down
7 changes: 2 additions & 5 deletions src/Adapters/ADXAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,8 @@ export default class ADXAdapter implements IADXAdapter {
const adxDataHistoryResults = await getDataHistoryFromADX();
const resultTimeSeriesData: Array<ADXTimeSeries> = []; // considering there is going to be multiple series to fetch data for

if (
adxDataHistoryResults.data &&
adxDataHistoryResults.data.data
) {
const primaryResultTables: Array<ADXTable> = adxDataHistoryResults.data.data.filter(
if (adxDataHistoryResults.data) {
const primaryResultTables: Array<ADXTable> = adxDataHistoryResults.data.filter(
(frame) => frame.TableKind === 'PrimaryResult'
);
logDebugConsole(
Expand Down
8 changes: 3 additions & 5 deletions src/Adapters/BlobAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,8 @@ export default class BlobAdapter implements IBlobAdapter {
),
headers: this.generateBlobHeaders(headers)
});
if (scenesBlob.data && scenesBlob.data.data) {
config = validate3DConfigWithSchema(
scenesBlob.data.data
);
if (scenesBlob.data) {
config = validate3DConfigWithSchema(scenesBlob.data);
} else {
throw new Error('Data not found');
}
Expand Down Expand Up @@ -278,7 +276,7 @@ export default class BlobAdapter implements IBlobAdapter {
});
const filesXML = filesData.data;
const parser = new XMLParser();
let files: Array<IStorageBlob> = parser.parse(filesXML.data)
let files: Array<IStorageBlob> = parser.parse(filesXML)
?.EnumerationResults?.Blobs?.Blob;
if (fileTypes) {
files = files.filter((f) =>
Expand Down
Loading