Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(register): disable submit on invalid form #286

Merged
merged 7 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/sub-build-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ jobs:
NEXT_PUBLIC_GTM_ID=${{ vars.NEXT_PUBLIC_GTM_ID }}
NEXT_PUBLIC_ORY_SDK_URL=${{ vars.NEXT_PUBLIC_ORY_SDK_URL }}
NEXT_PUBLIC_SENTRY_DSN=${{ vars.NEXT_PUBLIC_SENTRY_DSN }}
NEXT_PUBLIC_SENTRY_ENV=${{ inputs.environment }}
SENTRY_ORG=${{ vars.SENTRY_ORG }}
SENTRY_PROJECT=${{ vars.SENTRY_PROJECT }}
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/sub-cloudrun-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ jobs:
LIVENESS_SIMILARITY_THRESHOLD=${{ vars.LIVENESS_SIMILARITY_THRESHOLD }},
SENTRY_ORG=${{ vars.SENTRY_ORG }},
SENTRY_PROJECT=${{ vars.SENTRY_PROJECT }},
SENTRY_ENV=${{ inputs.environment }},
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }},
BACKOFFICE_API_URL=${{ vars.BACKOFFICE_API_URL }},
BACKOFFICE_API_KEY=${{ secrets.BACKOFFICE_API_KEY }},
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@
ARG NEXT_PUBLIC_SENTRY_DSN
ENV NEXT_PUBLIC_SENTRY_DSN=${NEXT_PUBLIC_SENTRY_DSN}

ARG NEXT_PUBLIC_SENTRY_ENV
ENV NEXT_PUBLIC_SENTRY_ENV=${NEXT_PUBLIC_SENTRY_ENV}

ARG NEXT_PUBLIC_LIVENESS_TIMEOUT_SECONDS
ENV NEXT_PUBLIC_LIVENESS_TIMEOUT_SECONDS=${NEXT_PUBLIC_LIVENESS_TIMEOUT_SECONDS}

ARG SENTRY_AUTH_TOKEN

Check warning on line 37 in Dockerfile

View workflow job for this annotation

GitHub Actions / build / Build images

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "SENTRY_AUTH_TOKEN") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
ENV SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}

Check warning on line 38 in Dockerfile

View workflow job for this annotation

GitHub Actions / build / Build images

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "SENTRY_AUTH_TOKEN") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

ARG SENTRY_ORG
ENV SENTRY_ORG=${SENTRY_ORG}
Expand All @@ -40,8 +43,6 @@
ARG SENTRY_PROJECT
ENV SENTRY_PROJECT=${SENTRY_PROJECT}

ENV SENTRY_ENV=${SENTRY_ENV}

# Install corepack and set pnpm as default package manager
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
Expand Down
2 changes: 1 addition & 1 deletion env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace NodeJS {
NEXT_PUBLIC_SENTRY_DSN?: string;
SENTRY_ORG?: string;
SENTRY_PROJECT?: string;
SENTRY_ENV?: 'development' | 'production';
NEXT_PUBLIC_SENTRY_ENV?: 'development' | 'production';
BACKOFFICE_API_URL?: string;
BACKOFFICE_API_KEY?: string;
}
Expand Down
2 changes: 1 addition & 1 deletion instrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function register() {
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
tracesSampleRate: 1,
debug: false,
environment: process.env.SENTRY_ENV,
environment: process.env.NEXT_PUBLIC_SENTRY_ENV,
enabled: process.env.NODE_ENV === 'production',
release: `${name}@${version}`,
});
Expand Down
3 changes: 0 additions & 3 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ export default withSentryConfig(nextConfig, {
// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
tunnelRoute: '/api/monitoring',

// Hides source maps from generated client bundles
hideSourceMaps: true,

sourcemaps: {
disable: process.env.APP_ENV !== 'production',
},
Expand Down
47 changes: 25 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cuenta-unica-registry",
"description": "Portal de registro de Cuenta Única",
"version": "v1.5.5",
"version": "v1.5.6",
"private": false,
"author": "OGTIC",
"license": "MIT",
Expand Down Expand Up @@ -32,64 +32,67 @@
"ignoreCves": [
"CVE-2024-34351"
]
}
},
"onlyBuiltDependencies": [
"@sentry/cli"
]
},
"dependencies": {
"@aws-amplify/adapter-nextjs": "^1.4.3",
"@aws-amplify/adapter-nextjs": "^1.5.0",
"@aws-amplify/ui-react": "^6.9.1",
"@aws-amplify/ui-react-liveness": "^3.3.1",
"@aws-sdk/client-rekognition": "^3.744.0",
"@aws-sdk/client-rekognition": "^3.750.0",
"@emotion/cache": "^11.14.0",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@formatjs/intl-localematcher": "^0.6.0",
"@hookform/resolvers": "^4.0.0",
"@mui/icons-material": "^6.4.3",
"@mui/material": "^6.4.3",
"@next/third-parties": "^15.1.6",
"@ory/client": "^1.16.6",
"@hookform/resolvers": "^4.1.0",
"@mui/icons-material": "^6.4.4",
"@mui/material": "^6.4.4",
"@next/third-parties": "^15.1.7",
"@ory/client": "^1.16.7",
"@ory/integrations": "^1.3.1",
"@sentry/nextjs": "^8.54.0",
"@sentry/nextjs": "^9.1.0",
"@tensorflow/tfjs-backend-webgl": "^4.22.0",
"@tensorflow/tfjs-converter": "^4.22.0",
"@tensorflow/tfjs-core": "4.22.0",
"aws-amplify": "^6.12.3",
"aws-amplify": "^6.13.0",
"check-password-strength": "^3.0.0",
"hibp": "^14.1.3",
"negotiator": "^1.0.0",
"next": "^15.1.6",
"next": "^15.1.7",
"next-recaptcha-v3": "^1.5.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-gtm-module": "^2.0.11",
"react-hook-form": "7.54.2",
"react-imask": "^7.6.1",
"typescript": "^5.7.3",
"zod": "^3.24.1"
"zod": "^3.24.2"
},
"devDependencies": {
"@commitlint/cli": "^19.7.1",
"@commitlint/config-conventional": "^19.7.1",
"@testing-library/react": "^16.2.0",
"@types/negotiator": "^0.6.3",
"@types/node": "^22.13.1",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"@types/node": "^22.13.4",
"@types/react": "^19.0.10",
"@types/react-dom": "^19.0.4",
"@types/react-google-recaptcha": "^2.1.9",
"@typescript-eslint/eslint-plugin": "^8.24.0",
"@typescript-eslint/parser": "^8.24.0",
"@typescript-eslint/eslint-plugin": "^8.24.1",
"@typescript-eslint/parser": "^8.24.1",
"@vitejs/plugin-react": "^4.3.4",
"aws-crt": "^1.25.3",
"eslint": "^9.20.0",
"eslint-config-next": "^15.1.6",
"eslint": "^9.20.1",
"eslint-config-next": "^15.1.7",
"eslint-config-prettier": "^10.0.1",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-import-resolver-typescript": "^3.8.1",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-prettier": "^5.2.3",
"husky": "^9.1.7",
"jsdom": "^26.0.0",
"lint-staged": "^15.4.3",
"prettier": "^3.5.0",
"prettier": "^3.5.1",
"vitest": "^3.0.5"
},
"peerDependencies": {
Expand Down
Loading
Loading