Skip to content

Commit

Permalink
refactor(web): drop axios (#7490)
Browse files Browse the repository at this point in the history
* refactor: downloadApi

* refactor: assetApi

* chore: drop axios

* chore: tidy up

* chore: fix exports

* fix: show notification when download starts
  • Loading branch information
jrasm91 committed Feb 29, 2024
1 parent bb3d81b commit 09a7291
Show file tree
Hide file tree
Showing 37 changed files with 217 additions and 20,671 deletions.
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ mobile/openapi/.openapi-generator/FILES linguist-generated=true
mobile/lib/**/*.g.dart -diff -merge
mobile/lib/**/*.g.dart linguist-generated=true

open-api/typescript-sdk/axios-client/**/* -diff -merge
open-api/typescript-sdk/axios-client/**/* linguist-generated=true
open-api/typescript-sdk/fetch-client.ts -diff -merge
open-api/typescript-sdk/fetch-client.ts linguist-generated=true

Expand Down
8 changes: 0 additions & 8 deletions cli/package-lock.json

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

8 changes: 0 additions & 8 deletions e2e/package-lock.json

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

7 changes: 3 additions & 4 deletions e2e/src/web/specs/shared-link.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import {
AlbumResponseDto,
AssetResponseDto,
AssetFileUploadResponseDto,
LoginResponseDto,
SharedLinkResponseDto,
SharedLinkType,
createAlbum,
createSharedLink,
} from '@immich/sdk';
import { test } from '@playwright/test';
import { apiUtils, asBearerAuth, dbUtils } from 'src/utils';

test.describe('Shared Links', () => {
let admin: LoginResponseDto;
let asset: AssetResponseDto;
let asset: AssetFileUploadResponseDto;
let album: AlbumResponseDto;
let sharedLink: SharedLinkResponseDto;
let sharedLinkPassword: SharedLinkResponseDto;
Expand Down Expand Up @@ -53,7 +52,7 @@ test.describe('Shared Links', () => {
await page.waitForSelector('#asset-group-by-date svg');
await page.getByRole('checkbox').click();
await page.getByRole('button', { name: 'Download' }).click();
await page.getByText('DOWNLOADING').waitFor();
await page.getByText('DOWNLOADING', { exact: true }).waitFor();
});

test('enter password for a shared link', async ({ page }) => {
Expand Down
4 changes: 1 addition & 3 deletions open-api/bin/generate-open-api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ function dart {
}

function typescript {
rm -rf ./typescript-sdk/client
npx --yes @openapitools/openapi-generator-cli generate -g typescript-axios -i ./immich-openapi-specs.json -o ./typescript-sdk/axios-client --additional-properties=useSingleRequestParameter=true,supportsES6=true
npx --yes oazapfts --optimistic --argumentStyle=object --useEnumType immich-openapi-specs.json typescript-sdk/fetch-client.ts
npx --yes oazapfts --optimistic --argumentStyle=object --useEnumType immich-openapi-specs.json typescript-sdk/src/fetch-client.ts
npm --prefix typescript-sdk ci && npm --prefix typescript-sdk run build
}

Expand Down
4 changes: 0 additions & 4 deletions open-api/typescript-sdk/axios-client/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion open-api/typescript-sdk/axios-client/.npmignore

This file was deleted.

23 changes: 0 additions & 23 deletions open-api/typescript-sdk/axios-client/.openapi-generator-ignore

This file was deleted.

8 changes: 0 additions & 8 deletions open-api/typescript-sdk/axios-client/.openapi-generator/FILES

This file was deleted.

This file was deleted.

0 comments on commit 09a7291

Please sign in to comment.