mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-30 18:22:37 -04:00 
			
		
		
		
	chore: use pnpm for builds (#19752)
* Migrate from npm to pnpm across entire project • Update all GitHub workflow files to use pnpm instead of npm • Replace npm commands with pnpm equivalents in devcontainer scripts • Remove package-lock.json files and update to use pnpm-lock.yaml • Consolidate node version references to use server/.nvmrc * Refine pnpm migration based on review feedback • Replace SKIP_SHARP_FILTERING with SHARP_IGNORE_GLOBAL_LIBVIPS environment variable • Improve Sharp package filtering to include specific Linux architectures for Docker builds • Optimize Dockerfile dependency caching with improved layer structure • Clean up workspace configuration and remove redundant settings * Address additional review feedback for pnpm migration • Fix node-version-file paths in GitHub workflow configurations • Refactor .pnpmfile.cjs to use switch statement for better code organization • Correct cache type typo in fix-format workflow • Simplify Vite configuration by merging configs inline • Update package description for consistency * Use 'server/.nvmrc' for fix-format.yml GHA * Delete npm locks * Remove Docker volume isolation for node_modules directories • Remove volume mounts for node_modules and related directories • Allow shared access between host and container filesystem • Update init container to handle file ownership with conditional existence check * Remove unused Docker volumes and volume mounts • Remove node_modules volume mounts from devcontainer configuration • Remove unused named volumes for pnpm-store, node_modules, and cache directories • Clean up Docker Compose configuration after removing volume isolation * Fix typescript-sdk package issues • Remove unknown "build" dependency that was incorrectly added to package.json • Update pnpm-lock.yaml to reflect dependency removal * Add pnpm setup to mobile workflow for translation formatting • Add pnpm action setup step to mobile unit tests workflow • Required for translation file formatting and sorting operations --------- Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
		
							parent
							
								
									acb1e513a7
								
							
						
					
					
						commit
						845b0f2073
					
				| @ -49,10 +49,11 @@ fix_permissions() { | ||||
| 
 | ||||
|     log "Fixing permissions for ${IMMICH_WORKSPACE}" | ||||
| 
 | ||||
|     run_cmd sudo find "${IMMICH_WORKSPACE}/server/upload" -not -path "${IMMICH_WORKSPACE}/server/upload/postgres/*" -not -path "${IMMICH_WORKSPACE}/server/upload/postgres" -exec chown node {} + | ||||
| 
 | ||||
|     # Change ownership for directories that exist | ||||
|     for dir in "${IMMICH_WORKSPACE}/.vscode" \ | ||||
|         "${IMMICH_WORKSPACE}/server/upload" \ | ||||
|         "${IMMICH_WORKSPACE}/.pnpm-store" \ | ||||
|         "${IMMICH_WORKSPACE}/.github/node_modules" \ | ||||
|         "${IMMICH_WORKSPACE}/cli/node_modules" \ | ||||
|         "${IMMICH_WORKSPACE}/e2e/node_modules" \ | ||||
|         "${IMMICH_WORKSPACE}/open-api/typescript-sdk/node_modules" \ | ||||
|  | ||||
| @ -8,21 +8,13 @@ services: | ||||
|       - IMMICH_SERVER_URL=http://127.0.0.1:2283/ | ||||
|     volumes: !override | ||||
|       - ..:/workspaces/immich | ||||
|       - cli_node_modules:/workspaces/immich/cli/node_modules | ||||
|       - e2e_node_modules:/workspaces/immich/e2e/node_modules | ||||
|       - open_api_node_modules:/workspaces/immich/open-api/typescript-sdk/node_modules | ||||
|       - server_node_modules:/workspaces/immich/server/node_modules | ||||
|       - web_node_modules:/workspaces/immich/web/node_modules | ||||
|       - ${UPLOAD_LOCATION:-upload1-devcontainer-volume}${UPLOAD_LOCATION:+/photos}:/data | ||||
|       - ${UPLOAD_LOCATION:-upload2-devcontainer-volume}${UPLOAD_LOCATION:+/photos/upload}:/data/upload | ||||
|       - /etc/localtime:/etc/localtime:ro | ||||
| 
 | ||||
|   immich-web: | ||||
|     env_file: !reset [] | ||||
| 
 | ||||
|   immich-machine-learning: | ||||
|     env_file: !reset [] | ||||
| 
 | ||||
|   database: | ||||
|     env_file: !reset [] | ||||
|     environment: !override | ||||
| @ -33,17 +25,10 @@ services: | ||||
|       POSTGRES_HOST_AUTH_METHOD: md5 | ||||
|     volumes: | ||||
|       - ${UPLOAD_LOCATION:-postgres-devcontainer-volume}${UPLOAD_LOCATION:+/postgres}:/var/lib/postgresql/data | ||||
| 
 | ||||
|   redis: | ||||
|     env_file: !reset [] | ||||
| 
 | ||||
| volumes: | ||||
|   # Node modules for each service to avoid conflicts and ensure consistent dependencies | ||||
|   cli_node_modules: | ||||
|   e2e_node_modules: | ||||
|   open_api_node_modules: | ||||
|   server_node_modules: | ||||
|   web_node_modules: | ||||
|   upload1-devcontainer-volume: | ||||
|   upload2-devcontainer-volume: | ||||
|   postgres-devcontainer-volume: | ||||
|  | ||||
| @ -3,15 +3,20 @@ | ||||
| # shellcheck disable=SC1091 | ||||
| source /immich-devcontainer/container-common.sh | ||||
| 
 | ||||
| log "Preparing Immich Nest API Server" | ||||
| log "" | ||||
| export CI=1 | ||||
| run_cmd pnpm --filter immich install | ||||
| 
 | ||||
| log "Starting Nest API Server" | ||||
| log "" | ||||
| cd "${IMMICH_WORKSPACE}/server" || ( | ||||
|     log "Immich workspace not found" | ||||
|     log "Immich workspace not found"jj | ||||
|     exit 1 | ||||
| ) | ||||
| 
 | ||||
| while true; do | ||||
|     run_cmd node ./node_modules/.bin/nest start --debug "0.0.0.0:9230" --watch | ||||
|     run_cmd pnpm --filter immich exec nest start --debug "0.0.0.0:9230" --watch | ||||
|     log "Nest API Server crashed with exit code $?.  Respawning in 3s ..." | ||||
|     sleep 3 | ||||
| done | ||||
|  | ||||
| @ -3,6 +3,13 @@ | ||||
| # shellcheck disable=SC1091 | ||||
| source /immich-devcontainer/container-common.sh | ||||
| 
 | ||||
| export CI=1 | ||||
| log "Preparing Immich Web Frontend" | ||||
| log "" | ||||
| run_cmd pnpm --filter @immich/sdk install | ||||
| run_cmd pnpm --filter @immich/sdk build | ||||
| run_cmd pnpm --filter immich-web install | ||||
| 
 | ||||
| log "Starting Immich Web Frontend" | ||||
| log "" | ||||
| cd "${IMMICH_WORKSPACE}/web" || ( | ||||
| @ -16,7 +23,7 @@ until curl --output /dev/null --silent --head --fail "http://127.0.0.1:${IMMICH_ | ||||
| done | ||||
| 
 | ||||
| while true; do | ||||
|     run_cmd node ./node_modules/.bin/vite dev --host 0.0.0.0 --port "${DEV_PORT}" | ||||
|     run_cmd pnpm --filter immich-web exec vite dev --host 0.0.0.0 --port "${DEV_PORT}" | ||||
|     log "Web crashed with exit code $?.  Respawning in 3s ..." | ||||
|     sleep 3 | ||||
| done | ||||
|  | ||||
| @ -6,9 +6,6 @@ source /immich-devcontainer/container-common.sh | ||||
| log "Setting up Immich dev container..." | ||||
| fix_permissions | ||||
| 
 | ||||
| log "Installing npm dependencies (node_modules)..." | ||||
| install_dependencies | ||||
| 
 | ||||
| log "Setup complete, please wait while backend and frontend services automatically start" | ||||
| log | ||||
| log "If necessary, the services may be manually started using" | ||||
|  | ||||
							
								
								
									
										28
									
								
								.github/package-lock.json
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								.github/package-lock.json
									
									
									
										generated
									
									
										vendored
									
									
								
							| @ -1,28 +0,0 @@ | ||||
| { | ||||
|   "name": ".github", | ||||
|   "lockfileVersion": 3, | ||||
|   "requires": true, | ||||
|   "packages": { | ||||
|     "": { | ||||
|       "devDependencies": { | ||||
|         "prettier": "^3.5.3" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/prettier": { | ||||
|       "version": "3.6.2", | ||||
|       "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", | ||||
|       "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", | ||||
|       "dev": true, | ||||
|       "license": "MIT", | ||||
|       "bin": { | ||||
|         "prettier": "bin/prettier.cjs" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">=14" | ||||
|       }, | ||||
|       "funding": { | ||||
|         "url": "https://github.com/prettier/prettier?sponsor=1" | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
							
								
								
									
										25
									
								
								.github/workflows/cli.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										25
									
								
								.github/workflows/cli.yml
									
									
									
									
										vendored
									
									
								
							| @ -33,21 +33,24 @@ jobs: | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       # Setup .npmrc file to publish to npm | ||||
|       - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
| 
 | ||||
|       - name: Setup Node | ||||
|         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './cli/.nvmrc' | ||||
|           registry-url: 'https://registry.npmjs.org' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
| 
 | ||||
|       - name: Prepare SDK | ||||
|         run: npm ci --prefix ../open-api/typescript-sdk/ | ||||
|       - name: Build SDK | ||||
|         run: npm run build --prefix ../open-api/typescript-sdk/ | ||||
|       - run: npm ci | ||||
|       - run: npm run build | ||||
|       - run: npm publish | ||||
|       - name: Setup typescript-sdk | ||||
|         run: pnpm install && pnpm run build | ||||
|         working-directory: ./open-api/typescript-sdk | ||||
| 
 | ||||
|       - run: pnpm install --frozen-lockfile | ||||
|       - run: pnpm build | ||||
|       - run: pnpm publish | ||||
|         if: ${{ github.event_name == 'release' }} | ||||
|         env: | ||||
|           NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||||
|  | ||||
							
								
								
									
										15
									
								
								.github/workflows/docs-build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								.github/workflows/docs-build.yml
									
									
									
									
										vendored
									
									
								
							| @ -55,21 +55,24 @@ jobs: | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
| 
 | ||||
|       - name: Setup Node | ||||
|         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './docs/.nvmrc' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
| 
 | ||||
|       - name: Run npm install | ||||
|         run: npm ci | ||||
|       - name: Run install | ||||
|         run: pnpm install | ||||
| 
 | ||||
|       - name: Check formatting | ||||
|         run: npm run format | ||||
|         run: pnpm format | ||||
| 
 | ||||
|       - name: Run build | ||||
|         run: npm run build | ||||
|         run: pnpm build | ||||
| 
 | ||||
|       - name: Upload build output | ||||
|         uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||||
|  | ||||
							
								
								
									
										4
									
								
								.github/workflows/fix-format.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/fix-format.yml
									
									
									
									
										vendored
									
									
								
							| @ -32,8 +32,8 @@ jobs: | ||||
|         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './server/.nvmrc' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
| 
 | ||||
|       - name: Fix formatting | ||||
|         run: make install-all && make format-all | ||||
|  | ||||
							
								
								
									
										13
									
								
								.github/workflows/sdk.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								.github/workflows/sdk.yml
									
									
									
									
										vendored
									
									
								
							| @ -20,18 +20,21 @@ jobs: | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
| 
 | ||||
|       # Setup .npmrc file to publish to npm | ||||
|       - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './open-api/typescript-sdk/.nvmrc' | ||||
|           registry-url: 'https://registry.npmjs.org' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
|       - name: Install deps | ||||
|         run: npm ci | ||||
|         run: pnpm install --frozen-lockfile | ||||
|       - name: Build | ||||
|         run: npm run build | ||||
|         run: pnpm build | ||||
|       - name: Publish | ||||
|         run: npm publish | ||||
|         run: pnpm publish | ||||
|         env: | ||||
|           NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||||
|  | ||||
							
								
								
									
										459
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										459
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							| @ -4,13 +4,10 @@ on: | ||||
|   pull_request: | ||||
|   push: | ||||
|     branches: [main] | ||||
| 
 | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.ref }} | ||||
|   cancel-in-progress: true | ||||
| 
 | ||||
| permissions: {} | ||||
| 
 | ||||
| jobs: | ||||
|   pre-job: | ||||
|     runs-on: ubuntu-latest | ||||
| @ -32,7 +29,6 @@ jobs: | ||||
|         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - id: found_paths | ||||
|         uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | ||||
|         with: | ||||
| @ -58,11 +54,9 @@ jobs: | ||||
|               - '.github/workflows/test.yml' | ||||
|             .github: | ||||
|               - '.github/**' | ||||
| 
 | ||||
|       - name: Check if we should force jobs to run | ||||
|         id: should_force | ||||
|         run: echo "should_force=${{ steps.found_paths.outputs.workflow == 'true' || github.event_name == 'workflow_dispatch' }}" >> "$GITHUB_OUTPUT" | ||||
| 
 | ||||
|   server-unit-tests: | ||||
|     name: Test & Lint Server | ||||
|     needs: pre-job | ||||
| @ -73,39 +67,33 @@ jobs: | ||||
|     defaults: | ||||
|       run: | ||||
|         working-directory: ./server | ||||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout code | ||||
|         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
|       - name: Setup Node | ||||
|         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './server/.nvmrc' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
| 
 | ||||
|       - name: Run npm install | ||||
|         run: npm ci | ||||
| 
 | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
|       - name: Run package manager install | ||||
|         run: pnpm install | ||||
|       - name: Run linter | ||||
|         run: npm run lint | ||||
|         run: pnpm lint | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Run formatter | ||||
|         run: npm run format | ||||
|         run: pnpm format | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Run tsc | ||||
|         run: npm run check | ||||
|         run: pnpm check | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Run small tests & coverage | ||||
|         run: npm test | ||||
|         run: pnpm test | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|   cli-unit-tests: | ||||
|     name: Unit Test CLI | ||||
|     needs: pre-job | ||||
| @ -116,43 +104,36 @@ jobs: | ||||
|     defaults: | ||||
|       run: | ||||
|         working-directory: ./cli | ||||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout code | ||||
|         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
|       - name: Setup Node | ||||
|         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './cli/.nvmrc' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
| 
 | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
|       - name: Setup typescript-sdk | ||||
|         run: npm ci && npm run build | ||||
|         run: pnpm install && pnpm run build | ||||
|         working-directory: ./open-api/typescript-sdk | ||||
| 
 | ||||
|       - name: Install deps | ||||
|         run: npm ci | ||||
| 
 | ||||
|         run: pnpm install | ||||
|       - name: Run linter | ||||
|         run: npm run lint | ||||
|         run: pnpm lint | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Run formatter | ||||
|         run: npm run format | ||||
|         run: pnpm format | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Run tsc | ||||
|         run: npm run check | ||||
|         run: pnpm check | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Run unit tests & coverage | ||||
|         run: npm run test | ||||
|         run: pnpm test | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|   cli-unit-tests-win: | ||||
|     name: Unit Test CLI (Windows) | ||||
|     needs: pre-job | ||||
| @ -163,36 +144,31 @@ jobs: | ||||
|     defaults: | ||||
|       run: | ||||
|         working-directory: ./cli | ||||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout code | ||||
|         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
|       - name: Setup Node | ||||
|         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './cli/.nvmrc' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
| 
 | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
|       - name: Setup typescript-sdk | ||||
|         run: npm ci && npm run build | ||||
|         run: pnpm install --frozen-lockfile && pnpm build | ||||
|         working-directory: ./open-api/typescript-sdk | ||||
| 
 | ||||
|       - name: Install deps | ||||
|         run: npm ci | ||||
| 
 | ||||
|         run: pnpm install --frozen-lockfile | ||||
|       # Skip linter & formatter in Windows test. | ||||
|       - name: Run tsc | ||||
|         run: npm run check | ||||
|         run: pnpm check | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Run unit tests & coverage | ||||
|         run: npm run test | ||||
|         run: pnpm test | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|   web-lint: | ||||
|     name: Lint Web | ||||
|     needs: pre-job | ||||
| @ -203,39 +179,33 @@ jobs: | ||||
|     defaults: | ||||
|       run: | ||||
|         working-directory: ./web | ||||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout code | ||||
|         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
|       - name: Setup Node | ||||
|         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './web/.nvmrc' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
| 
 | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
|       - name: Run setup typescript-sdk | ||||
|         run: npm ci && npm run build | ||||
|         run: pnpm install --frozen-lockfile && pnpm build | ||||
|         working-directory: ./open-api/typescript-sdk | ||||
| 
 | ||||
|       - name: Run npm install | ||||
|         run: npm ci | ||||
| 
 | ||||
|       - name: Run pnpm install | ||||
|         run: pnpm rebuild && pnpm install --frozen-lockfile | ||||
|       - name: Run linter | ||||
|         run: npm run lint:p | ||||
|         run: pnpm lint:p | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Run formatter | ||||
|         run: npm run format | ||||
|         run: pnpm format | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Run svelte checks | ||||
|         run: npm run check:svelte | ||||
|         run: pnpm check:svelte | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|   web-unit-tests: | ||||
|     name: Test Web | ||||
|     needs: pre-job | ||||
| @ -246,35 +216,30 @@ jobs: | ||||
|     defaults: | ||||
|       run: | ||||
|         working-directory: ./web | ||||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout code | ||||
|         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
|       - name: Setup Node | ||||
|         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './web/.nvmrc' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
| 
 | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
|       - name: Run setup typescript-sdk | ||||
|         run: npm ci && npm run build | ||||
|         run: pnpm install --frozen-lockfile && pnpm build | ||||
|         working-directory: ./open-api/typescript-sdk | ||||
| 
 | ||||
|       - name: Run npm install | ||||
|         run: npm ci | ||||
| 
 | ||||
|         run: pnpm install --frozen-lockfile | ||||
|       - name: Run tsc | ||||
|         run: npm run check:typescript | ||||
|         run: pnpm check:typescript | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Run unit tests & coverage | ||||
|         run: npm run test | ||||
|         run: pnpm test | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|   i18n-tests: | ||||
|     name: Test i18n | ||||
|     needs: pre-job | ||||
| @ -287,27 +252,24 @@ jobs: | ||||
|         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
|       - name: Setup Node | ||||
|         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './web/.nvmrc' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
| 
 | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
|       - name: Install dependencies | ||||
|         run: npm --prefix=web ci | ||||
| 
 | ||||
|         run: pnpm --filter=immich-web install --frozen-lockfile | ||||
|       - name: Format | ||||
|         run: npm --prefix=web run format:i18n | ||||
| 
 | ||||
|         run: pnpm --filter=immich-web format:i18n | ||||
|       - name: Find file changes | ||||
|         uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20.0.4 | ||||
|         id: verify-changed-files | ||||
|         with: | ||||
|           files: | | ||||
|             i18n/** | ||||
| 
 | ||||
|       - name: Verify files have not changed | ||||
|         if: steps.verify-changed-files.outputs.files_changed == 'true' | ||||
|         env: | ||||
| @ -316,7 +278,6 @@ jobs: | ||||
|           echo "ERROR: i18n files not up to date!" | ||||
|           echo "Changed files: ${CHANGED_FILES}" | ||||
|           exit 1 | ||||
| 
 | ||||
|   e2e-tests-lint: | ||||
|     name: End-to-End Lint | ||||
|     needs: pre-job | ||||
| @ -327,41 +288,35 @@ jobs: | ||||
|     defaults: | ||||
|       run: | ||||
|         working-directory: ./e2e | ||||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout code | ||||
|         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
|       - name: Setup Node | ||||
|         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './e2e/.nvmrc' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
| 
 | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
|       - name: Run setup typescript-sdk | ||||
|         run: npm ci && npm run build | ||||
|         run: pnpm install --frozen-lockfile && pnpm build | ||||
|         working-directory: ./open-api/typescript-sdk | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Install dependencies | ||||
|         run: npm ci | ||||
|         run: pnpm install --frozen-lockfile | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Run linter | ||||
|         run: npm run lint | ||||
|         run: pnpm lint | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Run formatter | ||||
|         run: npm run format | ||||
|         run: pnpm format | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Run tsc | ||||
|         run: npm run check | ||||
|         run: pnpm check | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|   server-medium-tests: | ||||
|     name: Medium Tests (Server) | ||||
|     needs: pre-job | ||||
| @ -372,27 +327,24 @@ jobs: | ||||
|     defaults: | ||||
|       run: | ||||
|         working-directory: ./server | ||||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout code | ||||
|         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
|       - name: Setup Node | ||||
|         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './server/.nvmrc' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
| 
 | ||||
|       - name: Run npm install | ||||
|         run: npm ci | ||||
| 
 | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
|       - name: Run pnpm install | ||||
|         run: SHARP_IGNORE_GLOBAL_LIBVIPS=true pnpm install --frozen-lockfile | ||||
|       - name: Run medium tests | ||||
|         run: npm run test:medium | ||||
|         run: pnpm test:medium | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|   e2e-tests-server-cli: | ||||
|     name: End-to-End Tests (Server & CLI) | ||||
|     needs: pre-job | ||||
| @ -406,43 +358,41 @@ jobs: | ||||
|     strategy: | ||||
|       matrix: | ||||
|         runner: [ubuntu-latest, ubuntu-24.04-arm] | ||||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout code | ||||
|         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
|           submodules: 'recursive' | ||||
| 
 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
|       - name: Setup Node | ||||
|         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './e2e/.nvmrc' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
| 
 | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
|       - name: Run setup typescript-sdk | ||||
|         run: npm ci && npm run build | ||||
|         run: pnpm install --frozen-lockfile && pnpm build | ||||
|         working-directory: ./open-api/typescript-sdk | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Run setup web | ||||
|         run: pnpm install --frozen-lockfile && pnpm exec svelte-kit sync | ||||
|         working-directory: ./web | ||||
|         if: ${{ !cancelled() }} | ||||
|       - name: Run setup cli | ||||
|         run: npm ci && npm run build | ||||
|         run: pnpm install --frozen-lockfile && pnpm build | ||||
|         working-directory: ./cli | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Install dependencies | ||||
|         run: npm ci | ||||
|         run: pnpm install --frozen-lockfile | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Docker build | ||||
|         run: docker compose build | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Run e2e tests (api & cli) | ||||
|         run: npm run test | ||||
|         run: pnpm test | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|   e2e-tests-web: | ||||
|     name: End-to-End Tests (Web) | ||||
|     needs: pre-job | ||||
| @ -456,42 +406,36 @@ jobs: | ||||
|     strategy: | ||||
|       matrix: | ||||
|         runner: [ubuntu-latest, ubuntu-24.04-arm] | ||||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout code | ||||
|         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
|           submodules: 'recursive' | ||||
| 
 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
|       - name: Setup Node | ||||
|         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './e2e/.nvmrc' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
| 
 | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
|       - name: Run setup typescript-sdk | ||||
|         run: npm ci && npm run build | ||||
|         run: pnpm install --frozen-lockfile && pnpm build | ||||
|         working-directory: ./open-api/typescript-sdk | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Install dependencies | ||||
|         run: npm ci | ||||
|         run: pnpm install --frozen-lockfile | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Install Playwright Browsers | ||||
|         run: npx playwright install chromium --only-shell | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Docker build | ||||
|         run: docker compose build | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|       - name: Run e2e tests (web) | ||||
|         run: npx playwright test | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|   success-check-e2e: | ||||
|     name: End-to-End Tests Success | ||||
|     needs: [e2e-tests-server-cli, e2e-tests-web] | ||||
| @ -502,7 +446,6 @@ jobs: | ||||
|       - uses: immich-app/devtools/actions/success-check@68f10eb389bb02a3cf9d1156111964c549eb421b # 0.0.4 | ||||
|         with: | ||||
|           needs: ${{ toJSON(needs) }} | ||||
| 
 | ||||
|   mobile-unit-tests: | ||||
|     name: Unit Test Mobile | ||||
|     needs: pre-job | ||||
| @ -514,21 +457,19 @@ jobs: | ||||
|       - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Setup Flutter SDK | ||||
|         uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e # v2.21.0 | ||||
|         with: | ||||
|           channel: 'stable' | ||||
|           flutter-version-file: ./mobile/pubspec.yaml | ||||
| 
 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
|       - name: Generate translation file | ||||
|         run: make translation | ||||
|         working-directory: ./mobile | ||||
| 
 | ||||
|       - name: Run tests | ||||
|         working-directory: ./mobile | ||||
|         run: flutter test -j 1 | ||||
| 
 | ||||
|   ml-unit-tests: | ||||
|     name: Unit Test ML | ||||
|     needs: pre-job | ||||
| @ -543,7 +484,6 @@ jobs: | ||||
|       - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Install uv | ||||
|         uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 | ||||
|       - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | ||||
| @ -566,7 +506,6 @@ jobs: | ||||
|       - name: Run tests and coverage | ||||
|         run: | | ||||
|           uv run pytest --cov=immich_ml --cov-report term-missing | ||||
| 
 | ||||
|   github-files-formatting: | ||||
|     name: .github Files Formatting | ||||
|     needs: pre-job | ||||
| @ -577,27 +516,24 @@ jobs: | ||||
|     defaults: | ||||
|       run: | ||||
|         working-directory: ./.github | ||||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout code | ||||
|         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
|       - name: Setup Node | ||||
|         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './.github/.nvmrc' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
| 
 | ||||
|       - name: Run npm install | ||||
|         run: npm ci | ||||
| 
 | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
|       - name: Run pnpm install | ||||
|         run: pnpm install --frozen-lockfile | ||||
|       - name: Run formatter | ||||
|         run: npm run format | ||||
|         run: pnpm format | ||||
|         if: ${{ !cancelled() }} | ||||
| 
 | ||||
|   shellcheck: | ||||
|     name: ShellCheck | ||||
|     runs-on: ubuntu-latest | ||||
| @ -607,15 +543,11 @@ jobs: | ||||
|       - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Run ShellCheck | ||||
|         uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0 | ||||
|         with: | ||||
|           ignore_paths: >- | ||||
|             **/open-api/** | ||||
|             **/openapi** | ||||
|             **/node_modules/** | ||||
| 
 | ||||
|             **/open-api/** **/openapi** **/node_modules/** | ||||
|   generated-api-up-to-date: | ||||
|     name: OpenAPI Clients | ||||
|     runs-on: ubuntu-latest | ||||
| @ -626,23 +558,20 @@ jobs: | ||||
|         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
|       - name: Setup Node | ||||
|         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './server/.nvmrc' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
| 
 | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
|       - name: Install server dependencies | ||||
|         run: npm --prefix=server ci | ||||
| 
 | ||||
|         run: SHARP_IGNORE_GLOBAL_LIBVIPS=true pnpm --filter immich install --frozen-lockfile | ||||
|       - name: Build the app | ||||
|         run: npm --prefix=server run build | ||||
| 
 | ||||
|         run: pnpm --filter immich build | ||||
|       - name: Run API generation | ||||
|         run: make open-api | ||||
| 
 | ||||
|       - name: Find file changes | ||||
|         uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20.0.4 | ||||
|         id: verify-changed-files | ||||
| @ -651,7 +580,6 @@ jobs: | ||||
|             mobile/openapi | ||||
|             open-api/typescript-sdk | ||||
|             open-api/immich-openapi-specs.json | ||||
| 
 | ||||
|       - name: Verify files have not changed | ||||
|         if: steps.verify-changed-files.outputs.files_changed == 'true' | ||||
|         env: | ||||
| @ -660,7 +588,6 @@ jobs: | ||||
|           echo "ERROR: Generated files not up to date!" | ||||
|           echo "Changed files: ${CHANGED_FILES}" | ||||
|           exit 1 | ||||
| 
 | ||||
|   sql-schema-up-to-date: | ||||
|     name: SQL Schema Checks | ||||
|     runs-on: ubuntu-latest | ||||
| @ -674,45 +601,36 @@ jobs: | ||||
|           POSTGRES_USER: postgres | ||||
|           POSTGRES_DB: immich | ||||
|         options: >- | ||||
|           --health-cmd pg_isready | ||||
|           --health-interval 10s | ||||
|           --health-timeout 5s | ||||
|           --health-retries 5 | ||||
|           --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||||
|         ports: | ||||
|           - 5432:5432 | ||||
|     defaults: | ||||
|       run: | ||||
|         working-directory: ./server | ||||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout code | ||||
|         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Setup pnpm | ||||
|         uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||
|       - name: Setup Node | ||||
|         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||||
|         with: | ||||
|           node-version-file: './server/.nvmrc' | ||||
|           cache: 'npm' | ||||
|           cache-dependency-path: '**/package-lock.json' | ||||
| 
 | ||||
|           cache: 'pnpm' | ||||
|           cache-dependency-path: '**/pnpm-lock.yaml' | ||||
|       - name: Install server dependencies | ||||
|         run: npm ci | ||||
| 
 | ||||
|         run: SHARP_IGNORE_GLOBAL_LIBVIPS=true pnpm install --frozen-lockfile | ||||
|       - name: Build the app | ||||
|         run: npm run build | ||||
| 
 | ||||
|         run: pnpm build | ||||
|       - name: Run existing migrations | ||||
|         run: npm run migrations:run | ||||
| 
 | ||||
|         run: pnpm migrations:run | ||||
|       - name: Test npm run schema:reset command works | ||||
|         run: npm run schema:reset | ||||
| 
 | ||||
|         run: pnpm schema:reset | ||||
|       - name: Generate new migrations | ||||
|         continue-on-error: true | ||||
|         run: npm run migrations:generate src/TestMigration | ||||
| 
 | ||||
|         run: pnpm migrations:generate src/TestMigration | ||||
|       - name: Find file changes | ||||
|         uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20.0.4 | ||||
|         id: verify-changed-files | ||||
| @ -728,19 +646,16 @@ jobs: | ||||
|           echo "Changed files: ${CHANGED_FILES}" | ||||
|           cat ./src/*-TestMigration.ts | ||||
|           exit 1 | ||||
| 
 | ||||
|       - name: Run SQL generation | ||||
|         run: npm run sync:sql | ||||
|         run: pnpm sync:sql | ||||
|         env: | ||||
|           DB_URL: postgres://postgres:postgres@localhost:5432/immich | ||||
| 
 | ||||
|       - name: Find file changes | ||||
|         uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20.0.4 | ||||
|         id: verify-changed-sql-files | ||||
|         with: | ||||
|           files: | | ||||
|             server/src/queries | ||||
| 
 | ||||
|       - name: Verify SQL files have not changed | ||||
|         if: steps.verify-changed-sql-files.outputs.files_changed == 'true' | ||||
|         env: | ||||
| @ -751,77 +666,77 @@ jobs: | ||||
|           git diff | ||||
|           exit 1 | ||||
| 
 | ||||
|   # mobile-integration-tests: | ||||
|   #   name: Run mobile end-to-end integration tests | ||||
|   #   runs-on: macos-latest | ||||
|   #   steps: | ||||
|   #     - uses: actions/checkout@v4 | ||||
|   #     - uses: actions/setup-java@v3 | ||||
|   #       with: | ||||
|   #         distribution: 'zulu' | ||||
|   #         java-version: '12.x' | ||||
|   #         cache: 'gradle' | ||||
|   #     - name: Cache android SDK | ||||
|   #       uses: actions/cache@v3 | ||||
|   #       id: android-sdk | ||||
|   #       with: | ||||
|   #         key: android-sdk | ||||
|   #         path: | | ||||
|   #           /usr/local/lib/android/ | ||||
|   #           ~/.android | ||||
|   #     - name: Cache Gradle | ||||
|   #       uses: actions/cache@v3 | ||||
|   #       with: | ||||
|   #         path: | | ||||
|   #           ./mobile/build/ | ||||
|   #           ./mobile/android/.gradle/ | ||||
|   #         key: ${{ runner.os }}-flutter-${{ hashFiles('**/*.gradle*', 'pubspec.lock') }} | ||||
|   #     - name: Setup Android SDK | ||||
|   #       if: steps.android-sdk.outputs.cache-hit != 'true' | ||||
|   #       uses: android-actions/setup-android@v2 | ||||
|   #     - name: AVD cache | ||||
|   #       uses: actions/cache@v3 | ||||
|   #       id: avd-cache | ||||
|   #       with: | ||||
|   #         path: | | ||||
|   #           ~/.android/avd/* | ||||
|   #           ~/.android/adb* | ||||
|   #         key: avd-29 | ||||
|   #     - name: create AVD and generate snapshot for caching | ||||
|   #       if: steps.avd-cache.outputs.cache-hit != 'true' | ||||
|   #       uses: reactivecircus/android-emulator-runner@v2.27.0 | ||||
|   #       with: | ||||
|   #         working-directory: ./mobile | ||||
|   #         cores: 2 | ||||
|   #         api-level: 29 | ||||
|   #         arch: x86_64 | ||||
|   #         profile: pixel | ||||
|   #         target: default | ||||
|   #         force-avd-creation: false | ||||
|   #         emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||||
|   #         disable-animations: false | ||||
|   #         script: echo "Generated AVD snapshot for caching." | ||||
|   #     - name: Setup Flutter SDK | ||||
|   #       uses: subosito/flutter-action@v2 | ||||
|   #       with: | ||||
|   #         channel: 'stable' | ||||
|   #         flutter-version: '3.7.3' | ||||
|   #         cache: true | ||||
|   #     - name: Run integration tests | ||||
|   #       uses: Wandalen/wretry.action@master | ||||
|   #       with: | ||||
|   #         action: reactivecircus/android-emulator-runner@v2.27.0 | ||||
|   #         with: | | ||||
|   #           working-directory: ./mobile | ||||
|   #           cores: 2 | ||||
|   #           api-level: 29 | ||||
|   #           arch: x86_64 | ||||
|   #           profile: pixel | ||||
|   #           target: default | ||||
|   #           force-avd-creation: false | ||||
|   #           emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||||
|   #           disable-animations: true | ||||
|   #           script: | | ||||
|   #             flutter pub get | ||||
|   #             flutter test integration_test | ||||
|   #         attempt_limit: 3 | ||||
| # mobile-integration-tests: | ||||
| #   name: Run mobile end-to-end integration tests | ||||
| #   runs-on: macos-latest | ||||
| #   steps: | ||||
| #     - uses: actions/checkout@v4 | ||||
| #     - uses: actions/setup-java@v3 | ||||
| #       with: | ||||
| #         distribution: 'zulu' | ||||
| #         java-version: '12.x' | ||||
| #         cache: 'gradle' | ||||
| #     - name: Cache android SDK | ||||
| #       uses: actions/cache@v3 | ||||
| #       id: android-sdk | ||||
| #       with: | ||||
| #         key: android-sdk | ||||
| #         path: | | ||||
| #           /usr/local/lib/android/ | ||||
| #           ~/.android | ||||
| #     - name: Cache Gradle | ||||
| #       uses: actions/cache@v3 | ||||
| #       with: | ||||
| #         path: | | ||||
| #           ./mobile/build/ | ||||
| #           ./mobile/android/.gradle/ | ||||
| #         key: ${{ runner.os }}-flutter-${{ hashFiles('**/*.gradle*', 'pubspec.lock') }} | ||||
| #     - name: Setup Android SDK | ||||
| #       if: steps.android-sdk.outputs.cache-hit != 'true' | ||||
| #       uses: android-actions/setup-android@v2 | ||||
| #     - name: AVD cache | ||||
| #       uses: actions/cache@v3 | ||||
| #       id: avd-cache | ||||
| #       with: | ||||
| #         path: | | ||||
| #           ~/.android/avd/* | ||||
| #           ~/.android/adb* | ||||
| #         key: avd-29 | ||||
| #     - name: create AVD and generate snapshot for caching | ||||
| #       if: steps.avd-cache.outputs.cache-hit != 'true' | ||||
| #       uses: reactivecircus/android-emulator-runner@v2.27.0 | ||||
| #       with: | ||||
| #         working-directory: ./mobile | ||||
| #         cores: 2 | ||||
| #         api-level: 29 | ||||
| #         arch: x86_64 | ||||
| #         profile: pixel | ||||
| #         target: default | ||||
| #         force-avd-creation: false | ||||
| #         emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||||
| #         disable-animations: false | ||||
| #         script: echo "Generated AVD snapshot for caching." | ||||
| #     - name: Setup Flutter SDK | ||||
| #       uses: subosito/flutter-action@v2 | ||||
| #       with: | ||||
| #         channel: 'stable' | ||||
| #         flutter-version: '3.7.3' | ||||
| #         cache: true | ||||
| #     - name: Run integration tests | ||||
| #       uses: Wandalen/wretry.action@master | ||||
| #       with: | ||||
| #         action: reactivecircus/android-emulator-runner@v2.27.0 | ||||
| #         with: | | ||||
| #           working-directory: ./mobile | ||||
| #           cores: 2 | ||||
| #           api-level: 29 | ||||
| #           arch: x86_64 | ||||
| #           profile: pixel | ||||
| #           target: default | ||||
| #           force-avd-creation: false | ||||
| #           emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||||
| #           disable-animations: true | ||||
| #           script: | | ||||
| #             flutter pub get | ||||
| #             flutter test integration_test | ||||
| #         attempt_limit: 3 | ||||
|  | ||||
							
								
								
									
										39
									
								
								.pnpmfile.cjs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								.pnpmfile.cjs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,39 @@ | ||||
| module.exports = { | ||||
|   hooks: { | ||||
|     readPackage: (pkg) => { | ||||
|       if (!pkg.name) { | ||||
|         return pkg; | ||||
|       } | ||||
|       switch (pkg.name) { | ||||
|         case "exiftool-vendored": | ||||
|           if (pkg.optionalDependencies["exiftool-vendored.pl"]) { | ||||
|             // make exiftool-vendored.pl a regular dependency
 | ||||
|             pkg.dependencies["exiftool-vendored.pl"] = | ||||
|               pkg.optionalDependencies["exiftool-vendored.pl"]; | ||||
|             delete pkg.optionalDependencies["exiftool-vendored.pl"]; | ||||
|           } | ||||
|           break; | ||||
|         case "sharp": | ||||
|           const optionalDeps = Object.keys(pkg.optionalDependencies).filter( | ||||
|             (dep) => dep.startsWith("@img") | ||||
|           ); | ||||
|           for (const dep of optionalDeps) { | ||||
|             // remove all optionalDepdencies from sharp (they will be compiled from source), except:
 | ||||
|             //   include the precompiled musl version of sharp, for web/Dockerfile
 | ||||
|             //   include precompiled linux-x64 version of sharp, for server/Dockerfile, stage: web-prod
 | ||||
|             //   include precompiled linux-arm64 version of sharp, for server/Dockerfile, stage: web-prod
 | ||||
|             if ( | ||||
|               dep.includes("musl") || | ||||
|               dep.includes("linux-x64") || | ||||
|               dep.includes("linux-arm64") | ||||
|             ) { | ||||
|               continue; | ||||
|             } | ||||
|             delete pkg.optionalDependencies[dep]; | ||||
|           } | ||||
|           break; | ||||
|       } | ||||
|       return pkg; | ||||
|     }, | ||||
|   }, | ||||
| }; | ||||
							
								
								
									
										3
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							| @ -56,7 +56,8 @@ | ||||
|   "explorer.fileNesting.enabled": true, | ||||
|   "explorer.fileNesting.patterns": { | ||||
|     "*.dart": "${capture}.g.dart,${capture}.gr.dart,${capture}.drift.dart", | ||||
|     "*.ts": "${capture}.spec.ts,${capture}.mock.ts" | ||||
|     "*.ts": "${capture}.spec.ts,${capture}.mock.ts", | ||||
|     "package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb, bun.lock, pnpm-workspace.yaml, .pnpmfile.cjs" | ||||
|   }, | ||||
|   "svelte.enable-ts-plugin": true, | ||||
|   "typescript.preferences.importModuleSpecifier": "non-relative" | ||||
|  | ||||
							
								
								
									
										74
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										74
									
								
								Makefile
									
									
									
									
									
								
							| @ -8,7 +8,7 @@ dev-update: | ||||
| 	@trap 'make dev-down' EXIT; COMPOSE_BAKE=true docker compose -f ./docker/docker-compose.dev.yml up --build -V --remove-orphans | ||||
| 
 | ||||
| dev-scale: | ||||
| 	@trap 'make dev-down' EXIT; COMPOSE_BAKE=true docker compose -f ./docker/docker-compose.dev.yml up --build -V  --scale immich-server=3 --remove-orphans | ||||
| 	@trap 'make dev-down' EXIT; COMPOSE_BAKE=true docker compose -f ./docker/docker-compose.dev.yml up --build -V --scale immich-server=3 --remove-orphans | ||||
| 
 | ||||
| dev-docs: | ||||
| 	npm --prefix docs run start | ||||
| @ -43,7 +43,7 @@ open-api-typescript: | ||||
| 	cd ./open-api && bash ./bin/generate-open-api.sh typescript | ||||
| 
 | ||||
| sql: | ||||
| 	npm --prefix server run sync:sql | ||||
| 	pnpm --filter immich run sync:sql | ||||
| 
 | ||||
| attach-server: | ||||
| 	docker exec -it docker_immich-server_1 sh | ||||
| @ -53,31 +53,40 @@ renovate: | ||||
| 
 | ||||
| MODULES = e2e server web cli sdk docs .github | ||||
| 
 | ||||
| # directory to package name mapping function
 | ||||
| #   cli     = @immich/cli
 | ||||
| #   docs    = documentation
 | ||||
| #   e2e     = immich-e2e
 | ||||
| #   open-api/typescript-sdk = @immich/sdk
 | ||||
| #   server  = immich
 | ||||
| #   web     = immich-web
 | ||||
| map-package = $(subst sdk,@immich/sdk,$(subst cli,@immich/cli,$(subst docs,documentation,$(subst e2e,immich-e2e,$(subst server,immich,$(subst web,immich-web,$1)))))) | ||||
| 
 | ||||
| audit-%: | ||||
| 	npm --prefix $(subst sdk,open-api/typescript-sdk,$*) audit fix | ||||
| 	pnpm --filter $(call map-package,$*) audit fix | ||||
| install-%: | ||||
| 	npm --prefix $(subst sdk,open-api/typescript-sdk,$*) i | ||||
| ci-%: | ||||
| 	npm --prefix $(subst sdk,open-api/typescript-sdk,$*) ci | ||||
| 	pnpm --filter $(call map-package,$*) install $(if $(FROZEN),--frozen-lockfile) $(if $(OFFLINE),--offline) | ||||
| build-cli: build-sdk | ||||
| build-web: build-sdk | ||||
| build-%: install-% | ||||
| 	npm --prefix $(subst sdk,open-api/typescript-sdk,$*) run build | ||||
| 	pnpm --filter $(call map-package,$*) run build | ||||
| format-%: | ||||
| 	npm --prefix $* run format:fix | ||||
| 	pnpm --filter $(call map-package,$*) run format:fix | ||||
| lint-%: | ||||
| 	npm --prefix $* run lint:fix | ||||
| 	pnpm --filter $(call map-package,$*) run lint:fix | ||||
| lint-web: | ||||
| 	pnpm --filter $(call map-package,$*) run lint:p | ||||
| check-%: | ||||
| 	npm --prefix $* run check | ||||
| 	pnpm --filter $(call map-package,$*) run check | ||||
| check-web: | ||||
| 	npm --prefix web run check:typescript | ||||
| 	npm --prefix web run check:svelte | ||||
| 	pnpm --filter immich-web run check:typescript | ||||
| 	pnpm --filter immich-web run check:svelte | ||||
| test-%: | ||||
| 	npm --prefix $* run test | ||||
| 	pnpm --filter $(call map-package,$*) run test | ||||
| test-e2e: | ||||
| 	docker compose -f ./e2e/docker-compose.yml build | ||||
| 	npm --prefix e2e run test | ||||
| 	npm --prefix e2e run test:web | ||||
| 	pnpm --filter immich-e2e run test | ||||
| 	pnpm --filter immich-e2e run test:web | ||||
| test-medium: | ||||
| 	docker run \
 | ||||
|     --rm \
 | ||||
| @ -87,25 +96,36 @@ test-medium: | ||||
|     -v ./server/tsconfig.json:/usr/src/app/tsconfig.json \
 | ||||
|     -e NODE_ENV=development \
 | ||||
|     immich-server:latest \
 | ||||
|     -c "npm ci && npm run test:medium -- --run" | ||||
|     -c "pnpm test:medium -- --run" | ||||
| test-medium-dev: | ||||
| 	docker exec -it immich_server /bin/sh -c "npm run test:medium" | ||||
| 	docker exec -it immich_server /bin/sh -c "pnpm run test:medium" | ||||
| 
 | ||||
| build-all: $(foreach M,$(filter-out e2e .github,$(MODULES)),build-$M) ; | ||||
| install-all: $(foreach M,$(MODULES),install-$M) ; | ||||
| ci-all: $(foreach M,$(filter-out .github,$(MODULES)),ci-$M) ; | ||||
| check-all: $(foreach M,$(filter-out sdk cli docs .github,$(MODULES)),check-$M) ; | ||||
| lint-all: $(foreach M,$(filter-out sdk docs .github,$(MODULES)),lint-$M) ; | ||||
| format-all: $(foreach M,$(filter-out sdk,$(MODULES)),format-$M) ; | ||||
| audit-all:  $(foreach M,$(MODULES),audit-$M) ; | ||||
| hygiene-all: lint-all format-all check-all sql audit-all; | ||||
| test-all: $(foreach M,$(filter-out sdk docs .github,$(MODULES)),test-$M) ; | ||||
| install-all: | ||||
| 	pnpm -r --filter '!documentation' install | ||||
| 
 | ||||
| build-all: $(foreach M,$(filter-out e2e docs .github,$(MODULES)),build-$M) ; | ||||
| 
 | ||||
| check-all: | ||||
| 	pnpm -r --filter '!documentation' run "/^(check|check\:svelte|check\:typescript)$/" | ||||
| lint-all: | ||||
| 	pnpm -r --filter '!documentation' run lint:fix | ||||
| format-all: | ||||
| 	pnpm -r --filter '!documentation' run format:fix | ||||
| audit-all: | ||||
| 	pnpm -r --filter '!documentation' audit fix | ||||
| hygiene-all: audit-all | ||||
| 	pnpm -r --filter '!documentation' run "/(format:fix|check|check:svelte|check:typescript|sql)/" | ||||
| 
 | ||||
| test-all: | ||||
| 	pnpm -r --filter '!documentation' run "/^test/" | ||||
| 
 | ||||
| clean: | ||||
| 	find . -name "node_modules" -type d -prune -exec rm -rf {} + | ||||
| 	find . -name "dist" -type d -prune -exec rm -rf '{}' + | ||||
| 	find . -name "build" -type d -prune -exec rm -rf '{}' + | ||||
| 	find . -name "svelte-kit" -type d -prune -exec rm -rf '{}' + | ||||
| 	find . -name ".svelte-kit" -type d -prune -exec rm -rf '{}' + | ||||
| 	find . -name "coverage" -type d -prune -exec rm -rf '{}' + | ||||
| 	find . -name ".pnpm-store" -type d -prune -exec rm -rf '{}' + | ||||
| 	command -v docker >/dev/null 2>&1 && docker compose -f ./docker/docker-compose.dev.yml rm -v -f || true | ||||
| 	command -v docker >/dev/null 2>&1 && docker compose -f ./e2e/docker-compose.yml rm -v -f || true | ||||
| 
 | ||||
|  | ||||
| @ -1,19 +1,14 @@ | ||||
| FROM node:22.16.0-alpine3.20@sha256:2289fb1fba0f4633b08ec47b94a89c7e20b829fc5679f9b7b298eaa2f1ed8b7e AS core | ||||
| 
 | ||||
| WORKDIR /usr/src/open-api/typescript-sdk | ||||
| COPY open-api/typescript-sdk/package*.json open-api/typescript-sdk/tsconfig*.json ./ | ||||
| RUN npm ci | ||||
| COPY open-api/typescript-sdk/ ./ | ||||
| RUN npm run build | ||||
| 
 | ||||
| WORKDIR /usr/src/app | ||||
| 
 | ||||
| COPY cli/package.json cli/package-lock.json ./ | ||||
| RUN npm ci | ||||
| 
 | ||||
| COPY cli . | ||||
| RUN npm run build | ||||
| COPY package* pnpm* .pnpmfile.cjs ./ | ||||
| COPY ./cli ./cli/ | ||||
| COPY ./open-api/typescript-sdk ./open-api/typescript-sdk/ | ||||
| RUN corepack enable pnpm && \ | ||||
|   pnpm install --filter @immich/sdk --filter @immich/cli --frozen-lockfile && \ | ||||
|   pnpm --filter @immich/sdk build && \ | ||||
|   pnpm --filter @immich/cli build | ||||
| 
 | ||||
| WORKDIR /import | ||||
| 
 | ||||
| ENTRYPOINT ["node", "/usr/src/app/dist"] | ||||
| ENTRYPOINT ["node", "/usr/src/app/cli/dist"] | ||||
|  | ||||
							
								
								
									
										4600
									
								
								cli/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4600
									
								
								cli/package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -21,17 +21,16 @@ services: | ||||
|     # extends: | ||||
|     #   file: hwaccel.transcoding.yml | ||||
|     #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding | ||||
|     user: "${UID:-1000}:${GID:-1000}" | ||||
|     build: | ||||
|       context: ../ | ||||
|       dockerfile: server/Dockerfile | ||||
|       target: dev | ||||
|     restart: unless-stopped | ||||
|     volumes: | ||||
|       - ../server:/usr/src/app/server | ||||
|       - ../open-api:/usr/src/app/open-api | ||||
|       - ..:/usr/src/app | ||||
|       - ${UPLOAD_LOCATION}/photos:/data | ||||
|       - ${UPLOAD_LOCATION}/photos/upload:/data/upload | ||||
|       - /usr/src/app/server/node_modules | ||||
|       - /etc/localtime:/etc/localtime:ro | ||||
|     env_file: | ||||
|       - .env | ||||
| @ -58,8 +57,12 @@ services: | ||||
|       - 9231:9231 | ||||
|       - 2283:2283 | ||||
|     depends_on: | ||||
|       - redis | ||||
|       - database | ||||
|       redis: | ||||
|         condition: service_started | ||||
|       database: | ||||
|         condition: service_started | ||||
|       init: | ||||
|         condition: service_completed_successfully | ||||
|     healthcheck: | ||||
|       disable: false | ||||
| 
 | ||||
| @ -68,6 +71,7 @@ services: | ||||
|     image: immich-web-dev:latest | ||||
|     # Needed for rootless docker setup, see https://github.com/moby/moby/issues/45919 | ||||
|     # user: 0:0 | ||||
|     user: "${UID:-1000}:${GID:-1000}" | ||||
|     build: | ||||
|       context: ../ | ||||
|       dockerfile: web/Dockerfile | ||||
| @ -78,18 +82,17 @@ services: | ||||
|       - 3000:3000 | ||||
|       - 24678:24678 | ||||
|     volumes: | ||||
|       - ../web:/usr/src/app/web | ||||
|       - ../i18n:/usr/src/app/i18n | ||||
|       - ../open-api/:/usr/src/app/open-api/ | ||||
|       # - ../../ui:/usr/ui | ||||
|       - /usr/src/app/web/node_modules | ||||
|       - ..:/usr/src/app | ||||
|     ulimits: | ||||
|       nofile: | ||||
|         soft: 1048576 | ||||
|         hard: 1048576 | ||||
|     restart: unless-stopped | ||||
|     depends_on: | ||||
|       - immich-server | ||||
|       immich-server: | ||||
|         condition: service_started | ||||
|       init: | ||||
|         condition: service_completed_successfully | ||||
| 
 | ||||
|   immich-machine-learning: | ||||
|     container_name: immich_machine_learning | ||||
| @ -157,6 +160,14 @@ services: | ||||
|   #   volumes: | ||||
|   #     - grafana-data:/var/lib/grafana | ||||
| 
 | ||||
|   init: | ||||
|     container_name: init | ||||
|     image: busybox | ||||
|     env_file: | ||||
|       - .env | ||||
|     user: 0:0 | ||||
|     command: sh -c 'for path in /usr/src/app/.pnpm-store /usr/src/app/server/node_modules /usr/src/app/.github/node_modules /usr/src/app/cli/node_modules /usr/src/app/docs/node_modules /usr/src/app/e2e/node_modules /usr/src/app/open-api/typescript-sdk/node_modules /usr/src/app/web/.svelte-kit /usr/src/app/web/coverage /usr/src/app/node_modules /usr/src/app/web/node_modules; do [ -e "$$path" ] && chown -R ${UID:-1000}:${GID:-1000} "$$path" || true; done' | ||||
| 
 | ||||
| volumes: | ||||
|   model-cache: | ||||
|   prometheus-data: | ||||
|  | ||||
							
								
								
									
										20545
									
								
								docs/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										20545
									
								
								docs/package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										1
									
								
								e2e/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								e2e/.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -3,3 +3,4 @@ node_modules/ | ||||
| /playwright-report/ | ||||
| /blob-report/ | ||||
| /playwright/.cache/ | ||||
| /dist | ||||
|  | ||||
							
								
								
									
										7419
									
								
								e2e/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										7419
									
								
								e2e/package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -79,7 +79,7 @@ export const tempDir = tmpdir(); | ||||
| export const asBearerAuth = (accessToken: string) => ({ Authorization: `Bearer ${accessToken}` }); | ||||
| export const asKeyAuth = (key: string) => ({ 'x-api-key': key }); | ||||
| export const immichCli = (args: string[]) => | ||||
|   executeCommand('node', ['node_modules/.bin/immich', '-d', `/${tempDir}/immich/`, ...args]).promise; | ||||
|   executeCommand('pnpm', ['exec', 'immich', '-d', `/${tempDir}/immich/`, ...args], { cwd: '../cli' }).promise; | ||||
| export const immichAdmin = (args: string[]) => | ||||
|   executeCommand('docker', ['exec', '-i', 'immich-e2e-server', '/bin/bash', '-c', `immich-admin ${args.join(' ')}`]); | ||||
| export const specialCharStrings = ["'", '"', ',', '{', '}', '*']; | ||||
|  | ||||
| @ -15,7 +15,7 @@ function dart { | ||||
|   patch --no-backup-if-mismatch -u api.mustache <api.mustache.patch | ||||
| 
 | ||||
|   cd ../../ | ||||
|   npx --yes @openapitools/openapi-generator-cli generate -g dart -i ./immich-openapi-specs.json -o ../mobile/openapi -t ./templates/mobile | ||||
|   pnpx @openapitools/openapi-generator-cli generate -g dart -i ./immich-openapi-specs.json -o ../mobile/openapi -t ./templates/mobile | ||||
| 
 | ||||
|   # Post generate patches | ||||
|   patch --no-backup-if-mismatch -u ../mobile/openapi/lib/api_client.dart <./patch/api_client.dart.patch | ||||
| @ -27,12 +27,17 @@ function dart { | ||||
| } | ||||
| 
 | ||||
| function typescript { | ||||
|   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 | ||||
|   pnpx oazapfts --optimistic --argumentStyle=object --useEnumType immich-openapi-specs.json typescript-sdk/src/fetch-client.ts | ||||
|   pnpm --filter @immich/sdk install --frozen-lockfile | ||||
|   pnpm --filter @immich/sdk build | ||||
| } | ||||
| 
 | ||||
| # requires server to be built | ||||
| npm run sync:open-api --prefix=../server | ||||
| ( | ||||
|   cd .. | ||||
|   SHARP_IGNORE_GLOBAL_LIBVIPS=true pnpm --filter immich build | ||||
|   pnpm --filter immich sync:open-api | ||||
| ) | ||||
| 
 | ||||
| if [[ $1 == 'dart' ]]; then | ||||
|   dart | ||||
|  | ||||
							
								
								
									
										57
									
								
								open-api/typescript-sdk/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										57
									
								
								open-api/typescript-sdk/package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -1,57 +0,0 @@ | ||||
| { | ||||
|   "name": "@immich/sdk", | ||||
|   "version": "1.138.1", | ||||
|   "lockfileVersion": 3, | ||||
|   "requires": true, | ||||
|   "packages": { | ||||
|     "": { | ||||
|       "name": "@immich/sdk", | ||||
|       "version": "1.138.1", | ||||
|       "license": "GNU Affero General Public License version 3", | ||||
|       "dependencies": { | ||||
|         "@oazapfts/runtime": "^1.0.2" | ||||
|       }, | ||||
|       "devDependencies": { | ||||
|         "@types/node": "^22.17.1", | ||||
|         "typescript": "^5.3.3" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/@oazapfts/runtime": { | ||||
|       "version": "1.0.4", | ||||
|       "resolved": "https://registry.npmjs.org/@oazapfts/runtime/-/runtime-1.0.4.tgz", | ||||
|       "integrity": "sha512-7t6C2shug/6tZhQgkCa532oTYBLEnbASV/i1SG1rH2GB4h3aQQujYciYSPT92hvN4IwTe8S2hPkN/6iiOyTlCg==", | ||||
|       "license": "MIT" | ||||
|     }, | ||||
|     "node_modules/@types/node": { | ||||
|       "version": "22.17.2", | ||||
|       "resolved": "https://registry.npmjs.org/@types/node/-/node-22.17.2.tgz", | ||||
|       "integrity": "sha512-gL6z5N9Jm9mhY+U2KXZpteb+09zyffliRkZyZOHODGATyC5B1Jt/7TzuuiLkFsSUMLbS1OLmlj/E+/3KF4Q/4w==", | ||||
|       "dev": true, | ||||
|       "license": "MIT", | ||||
|       "dependencies": { | ||||
|         "undici-types": "~6.21.0" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/typescript": { | ||||
|       "version": "5.8.3", | ||||
|       "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", | ||||
|       "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", | ||||
|       "dev": true, | ||||
|       "license": "Apache-2.0", | ||||
|       "bin": { | ||||
|         "tsc": "bin/tsc", | ||||
|         "tsserver": "bin/tsserver" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">=14.17" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/undici-types": { | ||||
|       "version": "6.21.0", | ||||
|       "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", | ||||
|       "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", | ||||
|       "dev": true, | ||||
|       "license": "MIT" | ||||
|     } | ||||
|   } | ||||
| } | ||||
							
								
								
									
										10
									
								
								package.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								package.json
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | ||||
| { | ||||
|   "name": "immich-monorepo", | ||||
|   "version": "0.0.1", | ||||
|   "description": "Monorepo for Immich", | ||||
|   "private": true, | ||||
|   "packageManager": "pnpm@10.14.0+sha512.ad27a79641b49c3e481a16a805baa71817a04bbe06a38d17e60e2eaee83f6a146c6a688125f5792e48dd5ba30e7da52a5cda4c3992b9ccf333f9ce223af84748", | ||||
|   "engines": { | ||||
|     "pnpm": ">=10.0.0" | ||||
|   } | ||||
| } | ||||
							
								
								
									
										25351
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										25351
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										58
									
								
								pnpm-workspace.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								pnpm-workspace.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,58 @@ | ||||
| packages: | ||||
|   - cli | ||||
|   - docs | ||||
|   - e2e | ||||
|   - open-api/typescript-sdk | ||||
|   - server | ||||
|   - web | ||||
|   - .github | ||||
| ignoredBuiltDependencies: | ||||
|   - '@nestjs/core' | ||||
|   - '@scarf/scarf' | ||||
|   - '@swc/core' | ||||
|   - bcrypt | ||||
|   - canvas | ||||
|   - core-js | ||||
|   - core-js-pure | ||||
|   - cpu-features | ||||
|   - es5-ext | ||||
|   - esbuild | ||||
|   - msgpackr-extract | ||||
|   - postman-code-generators | ||||
|   - protobufjs | ||||
|   - ssh2 | ||||
|   - utimes | ||||
| onlyBuiltDependencies: | ||||
|   - sharp | ||||
|   - '@tailwindcss/oxide' | ||||
| overrides: | ||||
|   canvas: 2.11.2 | ||||
|   sharp: ^0.34.2 | ||||
| packageExtensions: | ||||
|   nestjs-kysely: | ||||
|     dependencies: | ||||
|       tslib: '*' | ||||
|   nestjs-otel: | ||||
|     dependencies: | ||||
|       tslib: '*' | ||||
|   '@photo-sphere-viewer/equirectangular-video-adapter': | ||||
|     dependencies: | ||||
|       three: '*' | ||||
|   '@photo-sphere-viewer/video-plugin': | ||||
|     dependencies: | ||||
|       three: '*' | ||||
|   sharp: | ||||
|     dependencies: | ||||
|       node-addon-api: '*' | ||||
|       node-gyp: '*' | ||||
|   '@immich/ui': | ||||
|     dependencies: | ||||
|       tailwindcss: '>=4.1' | ||||
|   tailwind-variants: | ||||
|     dependencies: | ||||
|       tailwindcss: '>=4.1' | ||||
| dedupePeerDependents: false | ||||
| preferWorkspacePackages: true | ||||
| injectWorkspacePackages: true | ||||
| shamefullyHoist: false | ||||
| verifyDepsBeforeRun: install | ||||
							
								
								
									
										5
									
								
								server/.npmignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								server/.npmignore
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | ||||
| src | ||||
| tsconfig* | ||||
| eslint* | ||||
| pnpm* | ||||
| coverage | ||||
| @ -1,14 +1,23 @@ | ||||
| # dev build | ||||
| FROM ghcr.io/immich-app/base-server-dev:202507291116@sha256:e38543bdd77a02ed156cd9175ed11e9c16dccf48c418d46ecda48ce684de456a AS dev | ||||
| 
 | ||||
| ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 \ | ||||
|   CI=1 \ | ||||
|   COREPACK_HOME=/tmp | ||||
| 
 | ||||
| RUN npm install --global corepack@latest && \ | ||||
|   corepack enable pnpm && \ | ||||
|   echo "store-dir=/buildcache/pnpm-store" >> /usr/local/etc/npmrc && \ | ||||
|   echo "devdir=/buildcache/node-gyp" >> /usr/local/etc/npmrc | ||||
| 
 | ||||
| COPY ./package* ./pnpm* .pnpmfile.cjs /tmp/create-dep-cache/ | ||||
| COPY ./web/package* ./web/pnpm* /tmp/create-dep-cache/web/ | ||||
| COPY ./server/package* ./server/pnpm* /tmp/create-dep-cache/server/ | ||||
| COPY ./open-api/typescript-sdk/package* ./open-api/typescript-sdk/pnpm* /tmp/create-dep-cache/open-api/typescript-sdk/ | ||||
| WORKDIR /tmp/create-dep-cache | ||||
| RUN pnpm fetch && rm -rf /tmp/create-dep-cache && chmod -R o+rw /buildcache | ||||
| WORKDIR /usr/src/app | ||||
| COPY ./server/package* ./server/ | ||||
| WORKDIR /usr/src/app/server | ||||
| RUN npm ci && \ | ||||
|   # exiftool-vendored.pl, sharp-linux-x64 and sharp-linux-arm64 are the only ones we need | ||||
|   # they're marked as optional dependencies, so we need to copy them manually after pruning | ||||
|   rm -rf node_modules/@img/sharp-libvips* && \ | ||||
|   rm -rf node_modules/@img/sharp-linuxmusl-x64 | ||||
| 
 | ||||
| ENV PATH="${PATH}:/usr/src/app/server/bin" \ | ||||
|   IMMICH_ENV=development \ | ||||
|   NVIDIA_DRIVER_CAPABILITIES=all \ | ||||
| @ -17,23 +26,19 @@ ENTRYPOINT ["tini", "--", "/bin/bash", "-c"] | ||||
| 
 | ||||
| FROM dev AS dev-container-server | ||||
| 
 | ||||
| RUN rm -rf /usr/src/app | ||||
| RUN apt-get update --allow-releaseinfo-change && \ | ||||
|   apt-get install sudo inetutils-ping openjdk-11-jre-headless \ | ||||
|   vim nano \ | ||||
|   -y --no-install-recommends --fix-missing | ||||
| 
 | ||||
| RUN usermod -aG sudo node | ||||
| RUN echo "node ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | ||||
| RUN mkdir -p /workspaces/immich | ||||
| RUN chown node -R /workspaces | ||||
| COPY --chown=node:node --chmod=777 ../.devcontainer/server/*.sh /immich-devcontainer/ | ||||
| RUN usermod -aG sudo node && \ | ||||
|   echo "node ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ | ||||
|   mkdir -p /workspaces/immich | ||||
| 
 | ||||
| USER node | ||||
| COPY --chown=node:node .. /tmp/create-dep-cache/ | ||||
| WORKDIR /tmp/create-dep-cache | ||||
| RUN make ci-all && rm -rf /tmp/create-dep-cache | ||||
| RUN chown node:node -R /workspaces | ||||
| COPY --chown=node:node --chmod=755 ../.devcontainer/server/*.sh /immich-devcontainer/ | ||||
| 
 | ||||
| WORKDIR /workspaces/immich | ||||
| 
 | ||||
| FROM dev-container-server AS dev-container-mobile | ||||
| USER root | ||||
| @ -62,38 +67,55 @@ RUN mkdir -p ${FLUTTER_HOME} \ | ||||
|   && rm flutter.tar.xz \ | ||||
|   && chown -R node ${FLUTTER_HOME} | ||||
| 
 | ||||
| USER node | ||||
| RUN sudo apt-get update \ | ||||
|   && wget -qO- https://dcm.dev/pgp-key.public | sudo gpg --dearmor -o /usr/share/keyrings/dcm.gpg \ | ||||
|   && echo 'deb [signed-by=/usr/share/keyrings/dcm.gpg arch=amd64] https://dcm.dev/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list \ | ||||
|   && sudo apt-get update \ | ||||
|   && sudo apt-get install dcm -y | ||||
| 
 | ||||
| RUN apt-get update \ | ||||
|   && wget -qO- https://dcm.dev/pgp-key.public | gpg --dearmor -o /usr/share/keyrings/dcm.gpg \ | ||||
|   && echo 'deb [signed-by=/usr/share/keyrings/dcm.gpg arch=amd64] https://dcm.dev/debian stable main' | tee /etc/apt/sources.list.d/dart_stable.list \ | ||||
|   && apt-get update \ | ||||
|   && apt-get install dcm -y | ||||
| 
 | ||||
| RUN dart --disable-analytics | ||||
| 
 | ||||
| FROM dev AS prod | ||||
| # production-builder-base image | ||||
| FROM ghcr.io/immich-app/base-server-dev:202507291116@sha256:e38543bdd77a02ed156cd9175ed11e9c16dccf48c418d46ecda48ce684de456a AS prod-builder-base | ||||
| ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 \ | ||||
|   CI=1 \ | ||||
|   COREPACK_HOME=/tmp | ||||
| 
 | ||||
| COPY server . | ||||
| RUN npm run build | ||||
| RUN npm prune --omit=dev --omit=optional | ||||
| COPY --from=dev /usr/src/app/server/node_modules/@img ./node_modules/@img | ||||
| COPY --from=dev /usr/src/app/server/node_modules/exiftool-vendored.pl ./node_modules/exiftool-vendored.pl | ||||
| RUN npm install --global corepack@latest && \ | ||||
|   corepack enable pnpm | ||||
| 
 | ||||
| # web build | ||||
| FROM node:22.16.0-alpine3.20@sha256:2289fb1fba0f4633b08ec47b94a89c7e20b829fc5679f9b7b298eaa2f1ed8b7e AS web | ||||
| # server production build | ||||
| FROM prod-builder-base AS server-prod | ||||
| 
 | ||||
| WORKDIR /usr/src/app | ||||
| COPY ./package* ./pnpm* .pnpmfile.cjs ./ | ||||
| COPY ./server ./server/ | ||||
| # SHARP_IGNORE_GLOBAL_LIBVIPS because 'deploy' will always build sharp bindings from source | ||||
| RUN SHARP_IGNORE_GLOBAL_LIBVIPS=true pnpm --filter immich --frozen-lockfile build && \ | ||||
|   pnpm --filter immich --frozen-lockfile --prod --no-optional deploy /output/server-pruned | ||||
| 
 | ||||
| # web production build | ||||
| FROM prod-builder-base AS web-prod | ||||
| 
 | ||||
| WORKDIR /usr/src/app | ||||
| COPY ./package* ./pnpm* .pnpmfile.cjs ./ | ||||
| COPY ./web ./web/ | ||||
| COPY ./i18n ./i18n/ | ||||
| COPY ./open-api/typescript-sdk ./open-api/typescript-sdk/ | ||||
| COPY ./open-api ./open-api/ | ||||
| RUN SHARP_IGNORE_GLOBAL_LIBVIPS=true pnpm --filter @immich/sdk --filter immich-web --frozen-lockfile --force install && \ | ||||
|   pnpm --filter @immich/sdk --filter immich-web build | ||||
| 
 | ||||
| WORKDIR /usr/src/app/open-api/typescript-sdk | ||||
| RUN npm ci && npm run build | ||||
| FROM prod-builder-base AS cli-prod | ||||
| 
 | ||||
| WORKDIR /usr/src/app/web | ||||
| RUN npm ci && npm run build | ||||
| COPY ./package* ./pnpm* .pnpmfile.cjs ./ | ||||
| COPY ./cli ./cli/ | ||||
| COPY ./open-api ./open-api/ | ||||
| RUN pnpm --filter @immich/sdk --filter @immich/cli --frozen-lockfile install && \ | ||||
|   pnpm --filter @immich/sdk --filter @immich/cli build && \ | ||||
|   pnpm --filter @immich/cli --prod --no-optional deploy /output/cli-pruned | ||||
| 
 | ||||
| # prod build | ||||
| # prod base image | ||||
| FROM ghcr.io/immich-app/base-server-prod:202507291116@sha256:6e80f884c6e4f05cefe4b4fc4cc06a15bdb6ec9bd7b6e9eadf996a13b69494b6 | ||||
| 
 | ||||
| WORKDIR /usr/src/app | ||||
| @ -101,16 +123,13 @@ ENV NODE_ENV=production \ | ||||
|   NVIDIA_DRIVER_CAPABILITIES=all \ | ||||
|   NVIDIA_VISIBLE_DEVICES=all | ||||
| 
 | ||||
| COPY --from=prod /usr/src/app/server/node_modules ./server/node_modules | ||||
| COPY --from=prod /usr/src/app/server/dist ./server/dist | ||||
| COPY --from=prod /usr/src/app/server/bin ./server/bin | ||||
| COPY --from=web /usr/src/app/web/build /build/www | ||||
| COPY ./server/resources ./server/resources | ||||
| COPY ./server/package.json server/package-lock.json ./ | ||||
| COPY --from=server-prod /output/server-pruned ./server | ||||
| COPY --from=web-prod /usr/src/app/web/build /build/www | ||||
| COPY --from=cli-prod /output/cli-pruned ./cli | ||||
| RUN ln -s ./cli/bin/immich server/bin/immich | ||||
| COPY LICENSE /licenses/LICENSE.txt | ||||
| COPY LICENSE /LICENSE | ||||
| 
 | ||||
| RUN npm install -g @immich/cli && npm cache clean --force | ||||
| ENV PATH="${PATH}:/usr/src/app/server/bin" | ||||
| 
 | ||||
| ARG BUILD_ID | ||||
|  | ||||
| @ -5,5 +5,5 @@ if [ "$IMMICH_ENV" != "development" ]; then | ||||
|   exit 1 | ||||
| fi | ||||
| 
 | ||||
| cd /usr/src/app/server || exit 1 | ||||
| npm exec nest -- start --debug "0.0.0.0:9230" --watch -- "$@" | ||||
| cd /usr/src/app || exit | ||||
| pnpm --filter immich exec nest start --debug "0.0.0.0:9230" --watch -- "$@" | ||||
|  | ||||
							
								
								
									
										18830
									
								
								server/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										18830
									
								
								server/package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -1,5 +1,6 @@ | ||||
| import { Duration } from 'luxon'; | ||||
| import { readFileSync } from 'node:fs'; | ||||
| import { dirname, join } from 'node:path'; | ||||
| import { SemVer } from 'semver'; | ||||
| import { DatabaseExtension, ExifOrientation, VectorIndex } from 'src/enum'; | ||||
| 
 | ||||
| @ -41,7 +42,10 @@ export const SALT_ROUNDS = 10; | ||||
| 
 | ||||
| export const IWorker = 'IWorker'; | ||||
| 
 | ||||
| const { version } = JSON.parse(readFileSync('./package.json', 'utf8')); | ||||
| // eslint-disable-next-line unicorn/prefer-module
 | ||||
| const basePath = dirname(__filename); | ||||
| const packageFile = join(basePath, '..', 'package.json'); | ||||
| const { version } = JSON.parse(readFileSync(packageFile, 'utf8')); | ||||
| export const serverVersion = new SemVer(version); | ||||
| 
 | ||||
| export const AUDIT_LOG_MAX_DURATION = Duration.fromObject({ days: 100 }); | ||||
|  | ||||
| @ -1,17 +1,17 @@ | ||||
| FROM node:22.16.0-alpine3.20@sha256:2289fb1fba0f4633b08ec47b94a89c7e20b829fc5679f9b7b298eaa2f1ed8b7e | ||||
| 
 | ||||
| RUN apk add --no-cache tini bash | ||||
| ENV CHOKIDAR_USEPOLLING=true \ | ||||
|   PATH="${PATH}:/usr/src/app/web/bin" \ | ||||
|   COREPACK_HOME=/tmp | ||||
| 
 | ||||
| USER node | ||||
| WORKDIR /usr/src/app | ||||
| 
 | ||||
| COPY --chown=node:node ./web/package* ./web/ | ||||
| RUN npm install --global corepack@latest && \ | ||||
|   corepack enable && corepack install -g pnpm && \ | ||||
|   apk add --no-cache tini make bash && \ | ||||
|   mkdir -p /buildcache/pnpm-store && \ | ||||
|   pnpm config set store-dir /buildcache/pnpm-store | ||||
| 
 | ||||
| WORKDIR /usr/src/app/web | ||||
| RUN npm ci | ||||
| 
 | ||||
| ENV CHOKIDAR_USEPOLLING=true \ | ||||
|   PATH="${PATH}:/usr/src/app/web/bin" | ||||
| EXPOSE 24678 | ||||
| EXPOSE 3000 | ||||
| ENTRYPOINT ["tini", "--", "/bin/bash", "-c"] | ||||
|  | ||||
| @ -1,14 +1,11 @@ | ||||
| #!/usr/bin/env sh | ||||
| 
 | ||||
| TYPESCRIPT_SDK=/usr/src/app/open-api/typescript-sdk | ||||
| 
 | ||||
| npm --prefix "$TYPESCRIPT_SDK" install | ||||
| npm --prefix "$TYPESCRIPT_SDK" run build | ||||
| 
 | ||||
| cd /usr/src/app/web || exit 1 | ||||
| echo "Build dependencies for Immich Web" | ||||
| cd /usr/src/app || exit | ||||
| 
 | ||||
| COUNT=0 | ||||
| UPSTREAM="${IMMICH_SERVER_URL:-http://immich-server:2283/}" | ||||
| UPSTREAM="${UPSTREAM%/}" | ||||
| until wget --spider --quiet "${UPSTREAM}/api/server/config" > /dev/null 2>&1; do | ||||
|     if [ $((COUNT % 10)) -eq 0 ]; then | ||||
|       echo "Waiting for $UPSTREAM to start..." | ||||
| @ -16,7 +13,6 @@ until wget --spider --quiet "${UPSTREAM}/api/server/config" > /dev/null 2>&1; do | ||||
|     COUNT=$((COUNT + 1)) | ||||
|     sleep 1 | ||||
| done | ||||
| 
 | ||||
| echo "Connected to $UPSTREAM" | ||||
| 
 | ||||
| npx vite dev --host 0.0.0.0 --port 3000 | ||||
| echo "Connected to $UPSTREAM, starting Immich Web..." | ||||
| pnpm --filter @immich/sdk build | ||||
| pnpm --filter immich-web exec vite dev --host 0.0.0.0 --port 3000 | ||||
|  | ||||
							
								
								
									
										10514
									
								
								web/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										10514
									
								
								web/package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -19,7 +19,7 @@ | ||||
|     "lint:fix": "npm run lint -- --fix", | ||||
|     "format": "prettier --check .", | ||||
|     "format:fix": "prettier --write . && npm run format:i18n", | ||||
|     "format:i18n": "npx --yes sort-json ../i18n/*.json", | ||||
|     "format:i18n": "pnpx sort-json ../i18n/*.json", | ||||
|     "test": "vitest --run", | ||||
|     "test:cov": "vitest --coverage", | ||||
|     "test:watch": "vitest dev", | ||||
| @ -50,13 +50,13 @@ | ||||
|     "justified-layout": "^4.1.0", | ||||
|     "lodash-es": "^4.17.21", | ||||
|     "luxon": "^3.4.4", | ||||
|     "maplibre-gl": "^5.3.0", | ||||
|     "maplibre-gl": "^5.6.2", | ||||
|     "pmtiles": "^4.3.0", | ||||
|     "qrcode": "^1.5.4", | ||||
|     "socket.io-client": "~4.8.0", | ||||
|     "svelte-gestures": "^5.1.3", | ||||
|     "svelte-i18n": "^4.0.1", | ||||
|     "svelte-maplibre": "^1.0.0", | ||||
|     "svelte-maplibre": "^1.2.0", | ||||
|     "svelte-persisted-store": "^0.12.0", | ||||
|     "tabbable": "^6.2.0", | ||||
|     "thumbhash": "^0.1.1" | ||||
|  | ||||
| @ -69,8 +69,11 @@ function isIgnoredFileType(pathname: string): boolean { | ||||
| } | ||||
| 
 | ||||
| function isIgnoredPath(pathname: string): boolean { | ||||
|   return /^\/(src|api)(\/.*)?$/.test(pathname) || /^\/(node_modules|@vite|@id)(\/.*)?$/.test(pathname); | ||||
|   return ( | ||||
|     /^\/(src|api)(\/.*)?$/.test(pathname) || /node_modules/.test(pathname) || /^\/@(vite|id)(\/.*)?$/.test(pathname) | ||||
|   ); | ||||
| } | ||||
| 
 | ||||
| function isAssetRequest(pathname: string): boolean { | ||||
|   return /^\/api\/assets\/[a-f0-9-]+\/(original|thumbnail)/.test(pathname); | ||||
| } | ||||
|  | ||||
| @ -4,7 +4,7 @@ import tailwindcss from '@tailwindcss/vite'; | ||||
| import { svelteTesting } from '@testing-library/svelte/vite'; | ||||
| import path from 'node:path'; | ||||
| import { visualizer } from 'rollup-plugin-visualizer'; | ||||
| import { defineConfig } from 'vite'; | ||||
| import { defineConfig, type UserConfig } from 'vite'; | ||||
| 
 | ||||
| const upstream = { | ||||
|   target: process.env.IMMICH_SERVER_URL || 'http://immich-server:2283/', | ||||
| @ -59,4 +59,4 @@ export default defineConfig({ | ||||
|       hooks: 'list', | ||||
|     }, | ||||
|   }, | ||||
| }); | ||||
| } as UserConfig); | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user