From 99777c058fdc2e6564b67a73a49d87ece2c4a10a Mon Sep 17 00:00:00 2001 From: nayan458 Date: Thu, 7 May 2026 16:01:47 +0530 Subject: [PATCH 1/2] added ci pipelines --- .github/workflows/a11y.yml | 35 ++++++ .github/workflows/develop-deploy.yml | 46 ++++++++ .github/workflows/pr-validation.yml | 38 +++++++ .github/workflows/release.yml | 47 ++++++++ eslint.config.js | 13 ++- package.json | 1 + pnpm-lock.yaml | 104 ++++++++++++++++++ src/components/Navbar/EventManager.tsx | 14 +-- .../Uploader0.2/InscriptionUploader0.3.tsx | 4 +- .../Uploader0.2/InscriptionUploader0.31.tsx | 4 +- .../uploader0.3/InscriptionUploader0.5.tsx | 4 +- .../Uploader0.3/utils/Camera/parseEXIFData.ts | 2 +- src/utils/cookieUtils.ts | 2 +- src/utils/exifUtils.ts | 2 +- src/views/InscriptionDetailPage.tsx/Model.tsx | 2 +- 15 files changed, 300 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/a11y.yml create mode 100644 .github/workflows/develop-deploy.yml create mode 100644 .github/workflows/pr-validation.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/a11y.yml b/.github/workflows/a11y.yml new file mode 100644 index 0000000..4e796ea --- /dev/null +++ b/.github/workflows/a11y.yml @@ -0,0 +1,35 @@ +name: Accessibility Checks + +on: + pull_request: + branches: + - develop + - main + +jobs: + accessibility: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: latest + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + + - name: Install Dependencies + run: pnpm install --frozen-lockfile + + - name: Run JSX Accessibility Lint + # run: pnpm eslint . --ext .js,.jsx,.ts,.tsx + + - name: Build App + run: pnpm vite build \ No newline at end of file diff --git a/.github/workflows/develop-deploy.yml b/.github/workflows/develop-deploy.yml new file mode 100644 index 0000000..6a8e1e3 --- /dev/null +++ b/.github/workflows/develop-deploy.yml @@ -0,0 +1,46 @@ +name: Frontend Develop Deployment + +on: + push: + branches: + - develop + +jobs: + build-and-push-dev: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: latest + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + + - name: Install Dependencies + run: pnpm install --frozen-lockfile + + - name: Build App + run: pnpm vite build + + - name: Login To Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build And Push Docker Image + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: | + ${{ secrets.DOCKER_USERNAME }}/stoneinscription-frontend:dev-latest + ${{ secrets.DOCKER_USERNAME }}/stoneinscription-frontend:sha-${{ github.sha }} \ No newline at end of file diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml new file mode 100644 index 0000000..0df90be --- /dev/null +++ b/.github/workflows/pr-validation.yml @@ -0,0 +1,38 @@ +name: Frontend PR Validation + +on: + pull_request: + branches: + - develop + - main + +jobs: + validate: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: latest + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + + - name: Install Dependencies + run: pnpm install --frozen-lockfile + + - name: Lint + run: pnpm lint + + - name: Type Check + run: pnpm tsc --noEmit + + - name: Build + run: pnpm vite build \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..17445fa --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +name: Frontend Release Pipeline + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: latest + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + + - name: Install Dependencies + run: pnpm install --frozen-lockfile + + - name: Build Production App + run: pnpm vite build + + - name: Login To Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build And Push Release Images + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: | + ${{ secrets.DOCKER_USERNAME }}/stoneinscription-frontend:latest + ${{ secrets.DOCKER_USERNAME }}/stoneinscription-frontend:${{ github.ref_name }} + ${{ secrets.DOCKER_USERNAME }}/stoneinscription-frontend:sha-${{ github.sha }} \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js index e821a89..34df882 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -2,22 +2,33 @@ import js from '@eslint/js'; import globals from 'globals'; import reactHooks from 'eslint-plugin-react-hooks'; import reactRefresh from 'eslint-plugin-react-refresh'; +import jsxA11y from 'eslint-plugin-jsx-a11y'; import tseslint from 'typescript-eslint'; import { globalIgnores } from 'eslint/config'; export default tseslint.config([ globalIgnores(['dist']), + { files: ['**/*.{ts,tsx}'], + extends: [ js.configs.recommended, tseslint.configs.recommended, reactHooks.configs['recommended-latest'], reactRefresh.configs.vite, + jsxA11y.flatConfigs.recommended, ], + languageOptions: { ecmaVersion: 2020, globals: globals.browser, }, + + rules: { + 'jsx-a11y/alt-text': 'error', + 'jsx-a11y/anchor-is-valid': 'warn', + 'jsx-a11y/no-autofocus': 'warn', + }, }, -]); +]); \ No newline at end of file diff --git a/package.json b/package.json index 1639888..d5e2a96 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "@types/react-dom": "^19.1.6", "@vitejs/plugin-react-swc": "^3.11.0", "eslint": "^9.30.1", + "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^5.2.0", "eslint-plugin-react-refresh": "^0.4.20", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da62b2e..cb0cfbd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -123,6 +123,9 @@ importers: eslint: specifier: ^9.30.1 version: 9.39.2(jiti@2.6.1) + eslint-plugin-jsx-a11y: + specifier: ^6.10.2 + version: 6.10.2(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-react: specifier: ^7.37.5 version: 7.37.5(eslint@9.39.2(jiti@2.6.1)) @@ -642,66 +645,79 @@ packages: resolution: {integrity: sha512-Rn3n+FUk2J5VWx+ywrG/HGPTD9jXNbicRtTM11e/uorplArnXZYsVifnPPqNNP5BsO3roI4n8332ukpY/zN7rQ==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.55.1': resolution: {integrity: sha512-grPNWydeKtc1aEdrJDWk4opD7nFtQbMmV7769hiAaYyUKCT1faPRm2av8CX1YJsZ4TLAZcg9gTR1KvEzoLjXkg==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.55.1': resolution: {integrity: sha512-a59mwd1k6x8tXKcUxSyISiquLwB5pX+fJW9TkWU46lCqD/GRDe9uDN31jrMmVP3feI3mhAdvcCClhV8V5MhJFQ==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.55.1': resolution: {integrity: sha512-puS1MEgWX5GsHSoiAsF0TYrpomdvkaXm0CofIMG5uVkP6IBV+ZO9xhC5YEN49nsgYo1DuuMquF9+7EDBVYu4uA==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-loong64-gnu@4.55.1': resolution: {integrity: sha512-r3Wv40in+lTsULSb6nnoudVbARdOwb2u5fpeoOAZjFLznp6tDU8kd+GTHmJoqZ9lt6/Sys33KdIHUaQihFcu7g==} cpu: [loong64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-loong64-musl@4.55.1': resolution: {integrity: sha512-MR8c0+UxAlB22Fq4R+aQSPBayvYa3+9DrwG/i1TKQXFYEaoW3B5b/rkSRIypcZDdWjWnpcvxbNaAJDcSbJU3Lw==} cpu: [loong64] os: [linux] + libc: [musl] '@rollup/rollup-linux-ppc64-gnu@4.55.1': resolution: {integrity: sha512-3KhoECe1BRlSYpMTeVrD4sh2Pw2xgt4jzNSZIIPLFEsnQn9gAnZagW9+VqDqAHgm1Xc77LzJOo2LdigS5qZ+gw==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-ppc64-musl@4.55.1': resolution: {integrity: sha512-ziR1OuZx0vdYZZ30vueNZTg73alF59DicYrPViG0NEgDVN8/Jl87zkAPu4u6VjZST2llgEUjaiNl9JM6HH1Vdw==} cpu: [ppc64] os: [linux] + libc: [musl] '@rollup/rollup-linux-riscv64-gnu@4.55.1': resolution: {integrity: sha512-uW0Y12ih2XJRERZ4jAfKamTyIHVMPQnTZcQjme2HMVDAHY4amf5u414OqNYC+x+LzRdRcnIG1YodLrrtA8xsxw==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.55.1': resolution: {integrity: sha512-u9yZ0jUkOED1BFrqu3BwMQoixvGHGZ+JhJNkNKY/hyoEgOwlqKb62qu+7UjbPSHYjiVy8kKJHvXKv5coH4wDeg==} cpu: [riscv64] os: [linux] + libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.55.1': resolution: {integrity: sha512-/0PenBCmqM4ZUd0190j7J0UsQ/1nsi735iPRakO8iPciE7BQ495Y6msPzaOmvx0/pn+eJVVlZrNrSh4WSYLxNg==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.55.1': resolution: {integrity: sha512-a8G4wiQxQG2BAvo+gU6XrReRRqj+pLS2NGXKm8io19goR+K8lw269eTrPkSdDTALwMmJp4th2Uh0D8J9bEV1vg==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.55.1': resolution: {integrity: sha512-bD+zjpFrMpP/hqkfEcnjXWHMw5BIghGisOKPj+2NaNDuVT+8Ds4mPf3XcPHuat1tz89WRL+1wbcxKY3WSbiT7w==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-openbsd-x64@4.55.1': resolution: {integrity: sha512-eLXw0dOiqE4QmvikfQ6yjgkg/xDM+MdU9YJuP4ySTibXU0oAvnEWXt7UDJmD4UkYialMfOGFPJnIHSe/kdzPxg==} @@ -756,24 +772,28 @@ packages: engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [glibc] '@swc/core-linux-arm64-musl@1.15.8': resolution: {integrity: sha512-koiCqL09EwOP1S2RShCI7NbsQuG6r2brTqUYE7pV7kZm9O17wZ0LSz22m6gVibpwEnw8jI3IE1yYsQTVpluALw==} engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [musl] '@swc/core-linux-x64-gnu@1.15.8': resolution: {integrity: sha512-4p6lOMU3bC+Vd5ARtKJ/FxpIC5G8v3XLoPEZ5s7mLR8h7411HWC/LmTXDHcrSXRC55zvAVia1eldy6zDLz8iFQ==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [glibc] '@swc/core-linux-x64-musl@1.15.8': resolution: {integrity: sha512-z3XBnbrZAL+6xDGAhJoN4lOueIxC/8rGrJ9tg+fEaeqLEuAtHSW2QHDHxDwkxZMjuF/pZ6MUTjHjbp8wLbuRLA==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [musl] '@swc/core-win32-arm64-msvc@1.15.8': resolution: {integrity: sha512-djQPJ9Rh9vP8GTS/Df3hcc6XP6xnG5c8qsngWId/BLA9oX6C7UzCPAn74BG/wGb9a6j4w3RINuoaieJB3t+7iQ==} @@ -849,24 +869,28 @@ packages: engines: {node: '>= 10'} cpu: [arm64] os: [linux] + libc: [glibc] '@tailwindcss/oxide-linux-arm64-musl@4.1.18': resolution: {integrity: sha512-1px92582HkPQlaaCkdRcio71p8bc8i/ap5807tPRDK/uw953cauQBT8c5tVGkOwrHMfc2Yh6UuxaH4vtTjGvHg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + libc: [musl] '@tailwindcss/oxide-linux-x64-gnu@4.1.18': resolution: {integrity: sha512-v3gyT0ivkfBLoZGF9LyHmts0Isc8jHZyVcbzio6Wpzifg/+5ZJpDiRiUhDLkcr7f/r38SWNe7ucxmGW3j3Kb/g==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + libc: [glibc] '@tailwindcss/oxide-linux-x64-musl@4.1.18': resolution: {integrity: sha512-bhJ2y2OQNlcRwwgOAGMY0xTFStt4/wyU6pvI6LSuZpRgKQwxTec0/3Scu91O8ir7qCR3AuepQKLU/kX99FouqQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + libc: [musl] '@tailwindcss/oxide-wasm32-wasi@4.1.18': resolution: {integrity: sha512-LffYTvPjODiP6PT16oNeUQJzNVyJl1cjIebq/rWWBF+3eDst5JGEFSc5cWxyRCJ0Mxl+KyIkqRxk1XPEs9x8TA==} @@ -1051,6 +1075,10 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + aria-query@5.3.2: + resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} + engines: {node: '>= 0.4'} + array-buffer-byte-length@1.0.2: resolution: {integrity: sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==} engines: {node: '>= 0.4'} @@ -1079,6 +1107,9 @@ packages: resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==} engines: {node: '>= 0.4'} + ast-types-flow@0.0.8: + resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} + async-function@1.0.0: resolution: {integrity: sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==} engines: {node: '>= 0.4'} @@ -1090,9 +1121,17 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} + axe-core@4.11.4: + resolution: {integrity: sha512-KunSNx+TVpkAw/6ULfhnx+HWRecjqZGTOyquAoWHYLRSdK1tB5Ihce1ZW+UY3fj33bYAFWPu7W/GRSmmrCGuxA==} + engines: {node: '>=4'} + axios@1.13.2: resolution: {integrity: sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==} + axobject-query@4.1.0: + resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} + engines: {node: '>= 0.4'} + babel-plugin-macros@3.1.0: resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} engines: {node: '>=10', npm: '>=6'} @@ -1220,6 +1259,9 @@ packages: csstype@3.2.3: resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + damerau-levenshtein@1.0.8: + resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} + data-view-buffer@1.0.2: resolution: {integrity: sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==} engines: {node: '>= 0.4'} @@ -1340,6 +1382,12 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} + eslint-plugin-jsx-a11y@6.10.2: + resolution: {integrity: sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==} + engines: {node: '>=4.0'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 + eslint-plugin-react-hooks@5.2.0: resolution: {integrity: sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==} engines: {node: '>=10'} @@ -1790,6 +1838,13 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + language-subtag-registry@0.3.23: + resolution: {integrity: sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==} + + language-tags@1.0.9: + resolution: {integrity: sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==} + engines: {node: '>=0.10'} + levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -1829,24 +1884,28 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] lightningcss-linux-arm64-musl@1.30.2: resolution: {integrity: sha512-5Vh9dGeblpTxWHpOx8iauV02popZDsCYMPIgiuw97OJ5uaDsL86cnqSFs5LZkG3ghHoX5isLgWzMs+eD1YzrnA==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [musl] lightningcss-linux-x64-gnu@1.30.2: resolution: {integrity: sha512-Cfd46gdmj1vQ+lR6VRTTadNHu6ALuw2pKR9lYq4FnhvgBc4zWY1EtZcAc6EffShbb1MFrIPfLDXD6Xprbnni4w==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [glibc] lightningcss-linux-x64-musl@1.30.2: resolution: {integrity: sha512-XJaLUUFXb6/QG2lGIW6aIk6jKdtjtcffUT0NKvIqhSBY3hh9Ch+1LCeH80dR9q9LBjG3ewbDjnumefsLsP6aiA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [musl] lightningcss-win32-arm64-msvc@1.30.2: resolution: {integrity: sha512-FZn+vaj7zLv//D/192WFFVA0RgHawIcHqLX9xuWiQt7P0PtdFEVaxgF9rjM/IRYHQXNnk61/H/gb2Ei+kUQ4xQ==} @@ -2331,6 +2390,10 @@ packages: resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} engines: {node: '>=12'} + string.prototype.includes@2.0.1: + resolution: {integrity: sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==} + engines: {node: '>= 0.4'} + string.prototype.matchall@4.0.12: resolution: {integrity: sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==} engines: {node: '>= 0.4'} @@ -3354,6 +3417,8 @@ snapshots: argparse@2.0.1: {} + aria-query@5.3.2: {} + array-buffer-byte-length@1.0.2: dependencies: call-bound: 1.0.4 @@ -3411,6 +3476,8 @@ snapshots: get-intrinsic: 1.3.0 is-array-buffer: 3.0.5 + ast-types-flow@0.0.8: {} + async-function@1.0.0: {} asynckit@0.4.0: {} @@ -3419,6 +3486,8 @@ snapshots: dependencies: possible-typed-array-names: 1.1.0 + axe-core@4.11.4: {} + axios@1.13.2: dependencies: follow-redirects: 1.15.11 @@ -3427,6 +3496,8 @@ snapshots: transitivePeerDependencies: - debug + axobject-query@4.1.0: {} + babel-plugin-macros@3.1.0: dependencies: '@babel/runtime': 7.28.4 @@ -3563,6 +3634,8 @@ snapshots: csstype@3.2.3: {} + damerau-levenshtein@1.0.8: {} + data-view-buffer@1.0.2: dependencies: call-bound: 1.0.4 @@ -3771,6 +3844,25 @@ snapshots: escape-string-regexp@4.0.0: {} + eslint-plugin-jsx-a11y@6.10.2(eslint@9.39.2(jiti@2.6.1)): + dependencies: + aria-query: 5.3.2 + array-includes: 3.1.9 + array.prototype.flatmap: 1.3.3 + ast-types-flow: 0.0.8 + axe-core: 4.11.4 + axobject-query: 4.1.0 + damerau-levenshtein: 1.0.8 + emoji-regex: 9.2.2 + eslint: 9.39.2(jiti@2.6.1) + hasown: 2.0.2 + jsx-ast-utils: 3.3.5 + language-tags: 1.0.9 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + safe-regex-test: 1.1.0 + string.prototype.includes: 2.0.1 + eslint-plugin-react-hooks@5.2.0(eslint@9.39.2(jiti@2.6.1)): dependencies: eslint: 9.39.2(jiti@2.6.1) @@ -4231,6 +4323,12 @@ snapshots: dependencies: json-buffer: 3.0.1 + language-subtag-registry@0.3.23: {} + + language-tags@1.0.9: + dependencies: + language-subtag-registry: 0.3.23 + levn@0.4.1: dependencies: prelude-ls: 1.2.1 @@ -4793,6 +4891,12 @@ snapshots: emoji-regex: 9.2.2 strip-ansi: 7.1.2 + string.prototype.includes@2.0.1: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.24.1 + string.prototype.matchall@4.0.12: dependencies: call-bind: 1.0.8 diff --git a/src/components/Navbar/EventManager.tsx b/src/components/Navbar/EventManager.tsx index 894559c..c437196 100644 --- a/src/components/Navbar/EventManager.tsx +++ b/src/components/Navbar/EventManager.tsx @@ -58,8 +58,8 @@ export const storeJWTToken = (token: string, refreshToken: string) => { export const getJWTToken = (): string | null => { const cookies = document.cookie.split(';'); - for (let c of cookies) { - let cookie = c.trim(); + for (const c of cookies) { + const cookie = c.trim(); if (cookie.startsWith('token=')) return cookie.substring(6); } return null; @@ -67,8 +67,8 @@ export const getJWTToken = (): string | null => { export const getRefreshToken = (): string | null => { const cookies = document.cookie.split(';'); - for (let c of cookies) { - let cookie = c.trim(); + for (const c of cookies) { + const cookie = c.trim(); if (cookie.startsWith('refresh=')) return cookie.substring(8); } return null; @@ -147,7 +147,7 @@ export const validateSession = async (): Promise => { } lastValidationTime = now; - let token = getJWTToken(); + const token = getJWTToken(); console.log('Validating session...'); @@ -173,7 +173,7 @@ export const validateSession = async (): Promise => { const idealTime = (sessionEndTime.getTime() - sessionStartTime.getTime()) / (1000 * 60); - let timeDifferenceMinute = Math.floor(timeDifference / (1000 * 60)); + const timeDifferenceMinute = Math.floor(timeDifference / (1000 * 60)); const sessionTimeDifferenceMinute = Math.floor( sessionTimeDifference / (1000 * 60) ); @@ -241,7 +241,7 @@ export const resetSessionTimeout = ( 'scroll', 'touchstart', ]; - let token = getJWTToken(); + const token = getJWTToken(); if (!token) { if (timeoutId) clearTimeout(timeoutId); diff --git a/src/components/Uploader0.2/InscriptionUploader0.3.tsx b/src/components/Uploader0.2/InscriptionUploader0.3.tsx index a9cb8fd..f26817b 100644 --- a/src/components/Uploader0.2/InscriptionUploader0.3.tsx +++ b/src/components/Uploader0.2/InscriptionUploader0.3.tsx @@ -126,7 +126,7 @@ const parseEXIFForGPS = (dataView: DataView): GeoInfo | null => { if (exifHeader !== "Exif") return null; - let offset = 6; + const offset = 6; const byteOrder = dataView.getUint16(offset); const isLittleEndian = byteOrder === 0x4949; @@ -336,7 +336,7 @@ const EnhancedInscriptionUploader: React.FC = () => { setError(null); const newPhotos: string[] = []; - let errorMessages: string[] = []; + const errorMessages: string[] = []; for (const [idx, file] of Array.from(files).entries()) { try { diff --git a/src/components/Uploader0.2/InscriptionUploader0.31.tsx b/src/components/Uploader0.2/InscriptionUploader0.31.tsx index feeff95..6e19d38 100644 --- a/src/components/Uploader0.2/InscriptionUploader0.31.tsx +++ b/src/components/Uploader0.2/InscriptionUploader0.31.tsx @@ -130,7 +130,7 @@ const parseEXIFForGPS = (dataView: DataView): GeoInfo | null => { if (exifHeader !== "Exif") return null; - let offset = 6; + const offset = 6; const byteOrder = dataView.getUint16(offset); const isLittleEndian = byteOrder === 0x4949; @@ -343,7 +343,7 @@ const EnhancedInscriptionUploader: React.FC = () => { setError(null); const newPhotos: string[] = []; - let errorMessages: string[] = []; + const errorMessages: string[] = []; for (const [idx, file] of Array.from(files).entries()) { try { diff --git a/src/components/Uploader0.3/uploader0.3/InscriptionUploader0.5.tsx b/src/components/Uploader0.3/uploader0.3/InscriptionUploader0.5.tsx index 593ed98..d03eab2 100644 --- a/src/components/Uploader0.3/uploader0.3/InscriptionUploader0.5.tsx +++ b/src/components/Uploader0.3/uploader0.3/InscriptionUploader0.5.tsx @@ -430,8 +430,8 @@ const EnhancedInscriptionUploaderV5: React.FC = () => { setGroupSuggestionLoading((previous) => ({ ...previous, [groupId]: true })); try { - let latitude = lat || geoInfo?.latitude; - let longitude = lon || geoInfo?.longitude; + const latitude = lat || geoInfo?.latitude; + const longitude = lon || geoInfo?.longitude; let normalizedLatitude = normalizeCoordinate(latitude); let normalizedLongitude = normalizeCoordinate(longitude); diff --git a/src/components/Uploader0.3/utils/Camera/parseEXIFData.ts b/src/components/Uploader0.3/utils/Camera/parseEXIFData.ts index acb2496..bf54f08 100644 --- a/src/components/Uploader0.3/utils/Camera/parseEXIFData.ts +++ b/src/components/Uploader0.3/utils/Camera/parseEXIFData.ts @@ -12,7 +12,7 @@ const parseEXIFForGPS = (dataView: DataView): GeoInfo | null => { if (exifHeader !== "Exif") return null; - let offset = 6; + const offset = 6; const byteOrder = dataView.getUint16(offset); const isLittleEndian = byteOrder === 0x4949; diff --git a/src/utils/cookieUtils.ts b/src/utils/cookieUtils.ts index df39076..371d282 100644 --- a/src/utils/cookieUtils.ts +++ b/src/utils/cookieUtils.ts @@ -1,4 +1,4 @@ -function getCookie(name: String) { +function getCookie(name: string) { const value = `; ${document.cookie}`; const parts = value.split(`; ${name}=`); if (parts.length === 2) return parts.pop().split(";").shift(); diff --git a/src/utils/exifUtils.ts b/src/utils/exifUtils.ts index 60b5e4d..8eb01be 100644 --- a/src/utils/exifUtils.ts +++ b/src/utils/exifUtils.ts @@ -38,7 +38,7 @@ const parseEXIFForGPS = (dataView: DataView): GeoInfo | null => { if (exifHeader !== "Exif") return null; - let offset = 6; + const offset = 6; const byteOrder = dataView.getUint16(offset); const isLittleEndian = byteOrder === 0x4949; diff --git a/src/views/InscriptionDetailPage.tsx/Model.tsx b/src/views/InscriptionDetailPage.tsx/Model.tsx index b09d12e..4ff0cdb 100644 --- a/src/views/InscriptionDetailPage.tsx/Model.tsx +++ b/src/views/InscriptionDetailPage.tsx/Model.tsx @@ -12,7 +12,7 @@ interface ModelProps { const Model: React.FC = ({ postId, display, onClose }) => { const [inputValue, setInputValue] = useState(""); - const handleInputChange = (e: String) => { + const handleInputChange = (e: string) => { setInputValue(e as string); }; From ce3fddb18b06aa3d3647d2e195eeb40605bf4e42 Mon Sep 17 00:00:00 2001 From: nayan458 Date: Thu, 7 May 2026 16:02:27 +0530 Subject: [PATCH 2/2] deleted unwanted ci --- .github/workflows/ci.yml | 48 ---------------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 65434d0..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: CI — Build & Push to Docker Hub - -on: - push: - branches: - - copy - -jobs: - build-and-push: - name: Build & Push - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: latest - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: pnpm - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - # - name: Build - # run: pnpm build:production - - - name: Build - run: pnpm vite build - - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build and push Docker image - uses: docker/build-push-action@v6 - with: - context: . - push: true - tags: ${{ secrets.DOCKER_USERNAME }}/stoneinscription:frontend-latest \ No newline at end of file