Skip to content
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
2 changes: 1 addition & 1 deletion app/client/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node", "css"],
moduleDirectories: ["node_modules", "src", "test"],
transformIgnorePatterns: [
"<rootDir>/node_modules/(?!codemirror|konva|design-system|design-system-old|react-dnd|dnd-core|@babel|(@blueprintjs)|@github|lodash-es|@draft-js-plugins|react-documents|linkedom|assert-never)",
"<rootDir>/node_modules/(?!codemirror|konva|design-system|design-system-old|react-dnd|dnd-core|@babel|(@blueprintjs)|@github|lodash-es|@draft-js-plugins|react-documents|linkedom|assert-never|axios)",
],
moduleNameMapper: {
"\\.(css|less)$": "<rootDir>/test/__mocks__/styleMock.js",
Expand Down
2 changes: 1 addition & 1 deletion app/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"algoliasearch": "^4.2.0",
"assert-never": "^1.2.1",
"astring": "^1.7.5",
"axios": "^0.27.2",
"axios": "^1.6.0",
"classnames": "^2.3.1",
"clsx": "^1.2.1",
"codemirror": "^5.65.13",
Expand Down
2 changes: 1 addition & 1 deletion app/client/packages/rts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@babel/runtime": "^7.21.0",
"@shared/ast": "workspace:^",
"astravel": "^0.6.1",
"axios": "^1.2.0",
"axios": "^1.6.0",
"escodegen": "^2.0.0",
"express": "^4.18.2",
"express-validator": "^6.14.2",
Expand Down
1 change: 0 additions & 1 deletion app/client/src/ce/api/ApiUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ describe("axios api interceptors", () => {
const response: AxiosResponse = {
data: "Test data",
headers: {
// @ts-expect-error: content-length should be string
"content-length": 123,
"content-type": "application/json",
},
Expand Down
6 changes: 3 additions & 3 deletions app/client/src/ce/api/ApplicationApi.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Api from "api/Api";
import type { ApiResponse } from "api/ApiResponses";
import type { AxiosPromise } from "axios";
import type { AxiosProgressEvent, AxiosPromise } from "axios";
import type { AppColorCode } from "constants/DefaultTheme";
import type { IconNames } from "design-system";
import type { AppLayoutConfig } from "reducers/entityReducers/pageListReducer";
Expand Down Expand Up @@ -179,7 +179,7 @@ export interface FetchUnconfiguredDatasourceListResponse extends ApiResponse {
export interface ImportApplicationRequest {
workspaceId: string;
applicationFile?: File;
progress?: (progressEvent: ProgressEvent) => void;
progress?: (progressEvent: AxiosProgressEvent) => void;
onSuccessCallback?: () => void;
appId?: string;
}
Expand Down Expand Up @@ -250,7 +250,7 @@ export interface exportApplicationRequest {
export interface ImportPartialApplicationRequest {
workspaceId: string;
applicationFile: File;
progress?: (progressEvent: ProgressEvent) => void;
progress?: (progressEvent: AxiosProgressEvent) => void;
onSuccessCallback?: () => void;
applicationId: string;
pageId: string;
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/ce/api/WorkspaceApi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AxiosPromise } from "axios";
import type { AxiosProgressEvent, AxiosPromise } from "axios";
import Api from "api/Api";
import type { ApiResponse } from "api/ApiResponses";
import type {
Expand Down Expand Up @@ -59,7 +59,7 @@ export interface SaveWorkspaceRequest {
export interface SaveWorkspaceLogo {
id: string;
logo: File;
progress: (progressEvent: ProgressEvent) => void;
progress: (progressEvent: AxiosProgressEvent) => void;
}

export interface CreateWorkspaceRequest {
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/constants/WidgetValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ export const DEDICATED_WORKER_GLOBAL_SCOPE_IDENTIFIERS = {
PermissionStatus: "PermissionStatus",
Permissions: "Permissions",
postMessage: "postMessage",
ProgressEvent: "ProgressEvent",
AxiosProgressEvent: "AxiosProgressEvent",
Promise: "Promise",
PromiseRejectionEvent: "PromiseRejectionEvent",
Proxy: "Proxy",
Expand Down
17 changes: 10 additions & 7 deletions app/client/src/pages/workspace/General.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { FilePickerV2, FileType, Text, TextType } from "design-system-old";
import { Classes } from "@blueprintjs/core";
import { getIsFetchingApplications } from "@appsmith/selectors/applicationSelectors";
import { useMediaQuery } from "react-responsive";
import type { AxiosProgressEvent } from "axios";

// This wrapper ensures that the scroll behaviour is consistent with the other tabs
const ScrollWrapper = styled.div`
Expand Down Expand Up @@ -147,14 +148,16 @@ export function GeneralSettings() {
setProgress: SetProgress,
onUpload: UploadCallback,
) => {
const progress = (progressEvent: ProgressEvent) => {
const uploadPercentage = Math.round(
(progressEvent.loaded / progressEvent.total) * 100,
);
if (uploadPercentage === 100) {
onUpload(currentWorkspace.logoUrl || "");
const progress = (progressEvent: AxiosProgressEvent) => {
if (progressEvent.total) {
const uploadPercentage = Math.round(
(progressEvent.loaded / progressEvent.total) * 100,
);
if (uploadPercentage === 100) {
onUpload(currentWorkspace.logoUrl || "");
}
setProgress(uploadPercentage);
}
setProgress(uploadPercentage);
};

dispatch(
Expand Down
24 changes: 7 additions & 17 deletions app/client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12224,7 +12224,7 @@ __metadata:
"@types/express": ^4.17.14
"@types/jest": ^29.2.3
astravel: ^0.6.1
axios: ^1.2.0
axios: ^1.6.0
esbuild: ^0.19.4
escodegen: ^2.0.0
express: ^4.18.2
Expand Down Expand Up @@ -12353,7 +12353,7 @@ __metadata:
algoliasearch: ^4.2.0
assert-never: ^1.2.1
astring: ^1.7.5
axios: ^0.27.2
axios: ^1.6.0
babel-plugin-lodash: ^3.3.4
babel-plugin-module-resolver: ^4.1.0
chalk: ^4.1.1
Expand Down Expand Up @@ -13025,24 +13025,14 @@ __metadata:
languageName: node
linkType: hard

"axios@npm:^0.27.2":
version: 0.27.2
resolution: "axios@npm:0.27.2"
dependencies:
follow-redirects: ^1.14.9
form-data: ^4.0.0
checksum: 38cb7540465fe8c4102850c4368053c21683af85c5fdf0ea619f9628abbcb59415d1e22ebc8a6390d2bbc9b58a9806c874f139767389c862ec9b772235f06854
languageName: node
linkType: hard

"axios@npm:^1.2.0":
version: 1.3.4
resolution: "axios@npm:1.3.4"
"axios@npm:^1.6.0":
version: 1.6.1
resolution: "axios@npm:1.6.1"
dependencies:
follow-redirects: ^1.15.0
form-data: ^4.0.0
proxy-from-env: ^1.1.0
checksum: 7440edefcf8498bc3cdf39de00443e8101f249972c83b739c6e880d9d669fea9486372dbe8739e88b3bf8bb1ad15f6106693f206f078f4516fe8fd47b1c3093c
checksum: 573f03f59b7487d54551b16f5e155d1d130ad4864ed32d1da93d522b78a57123b34e3bde37f822a65ee297e79f1db840f9ad6514addff50d3cbf5caeed39e8dc
languageName: node
linkType: hard

Expand Down Expand Up @@ -18937,7 +18927,7 @@ __metadata:
languageName: node
linkType: hard

"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.14.9, follow-redirects@npm:^1.15.0":
"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.15.0":
version: 1.15.2
resolution: "follow-redirects@npm:1.15.2"
peerDependenciesMeta:
Expand Down