rohitverma007 / amplication

🔥🔥🔥 Open-source backend development platform. Build production-ready services without wasting time on repetitive coding.
https://amplication.com
Other
0 stars 0 forks source link

Sweep: In packages/amplication-server/src/core/entity/reservedNames.ts, Add "field" to the RESERVED_NAMES array in the server. #3

Open rohitverma007 opened 11 months ago

rohitverma007 commented 11 months ago

In packages/amplication-server/src/core/entity/reservedNames.ts, Add "field" to the RESERVED_NAMES array in the server.

Checklist - [X] ``packages/amplication-server/src/core/entity/reservedNames.ts`` ✅ Commit 15b505c - [X] `packages/amplication-server/src/core/entity/reservedNames.ts` ❌ Sandbox failed so I made additional changes - [X] `packages/amplication-server/src/core/entity/reservedNames.ts` ❌ Sandbox failed so I made additional changes ![Flowchart](http://24.199.78.105:8082/public/1433b39168a9abc374e26976c2b6e6ffebad4a2c3ecc01f3f09e436618681b33_3_flowchart.svg)
sweep-ai[bot] commented 11 months ago
Sweeping

50%
⚡ Sweep Basic Tier: I'm creating this ticket using GPT-4. You have 5 GPT-4 tickets left for the month and 3 for the day. For more GPT-4 tickets, visit our payment portal.

![Docker Version Updated](https://img.shields.io/badge/Docker%20Version%20Updated-4%20minutes%20ago-blue)
Install Sweep Configs: Pull Request

Actions (click)


Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/rohitverma007/amplication/blob/f8ad0cf21173892235b17824e6ee585f35f9766e/packages/amplication-server/src/core/entity/reservedNames.ts#L1-L67 https://github.com/rohitverma007/amplication/blob/f8ad0cf21173892235b17824e6ee585f35f9766e/packages/amplication-server/src/core/prismaSchemaParser/helpers.spec.ts#L1-L37 https://github.com/rohitverma007/amplication/blob/f8ad0cf21173892235b17824e6ee585f35f9766e/packages/amplication-server/src/core/resource/ReservedEntityNameError.ts#L1-L6 https://github.com/rohitverma007/amplication/blob/f8ad0cf21173892235b17824e6ee585f35f9766e/packages/amplication-server/src/core/resource/ReservedNameError.ts#L1-L6 https://github.com/rohitverma007/amplication/blob/f8ad0cf21173892235b17824e6ee585f35f9766e/packages/amplication-server/src/core/entity/constants.ts#L81-L180

Step 2: ⌨️ Coding


Sandbox logs for e630b9f
npm i 1/2 ✓
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'react-command-palette@0.21.1',
npm WARN EBADENGINE   required: { node: '>=16 <=17' },
npm WARN EBADENGINE   current: { node: 'v18.17.0', npm: '9.6.7' }
npm WARN EBADENGINE }
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated superagent@3.8.3: Please upgrade to v7.0.2+ of superagent.  We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing.  See the releases tab for more information at .
npm WARN deprecated subscriptions-transport-ws@0.11.0: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws    For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
npm WARN deprecated nest-morgan@2.0.0: Deprecated and unmaintained. Check out nestjs-pino as alternative.
npm WARN deprecated json-schema-ref-parser@9.0.9: Please switch to @apidevtools/json-schema-ref-parser
npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.
npm WARN deprecated apollo-server-types@3.8.0: The `apollo-server-types` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated apollo-server-plugin-base@3.7.2: The `apollo-server-plugin-base` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated apollo-server-errors@3.3.1: The `apollo-server-errors` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated apollo-datasource@3.3.2: The `apollo-datasource` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated apollo-server-express@3.12.1: The `apollo-server-express` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated @types/winston@2.4.4: This is a stub types definition. winston provides its own type definitions, so you do not need this installed.
npm WARN deprecated apollo-server-env@4.2.1: The `apollo-server-env` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/utils.fetcher` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated @types/query-string@6.3.0: This is a stub types definition. query-string provides its own type definitions, so you do not need this installed.
npm WARN deprecated apollo-reporting-protobuf@3.4.0: The `apollo-reporting-protobuf` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/usage-reporting-protobuf` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated @types/cron@2.4.0: This is a stub types definition. cron provides its own type definitions, so you do not need this installed.
npm WARN deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
npm WARN deprecated @babel/plugin-proposal-object-rest-spread@7.20.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated apollo-server-core@3.12.1: The `apollo-server-core` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated @mattiasbuelens/web-streams-polyfill@0.2.1: moved to web-streams-polyfill@2.0.0
> prepare
> husky install
husky - Git hooks installed
added 4223 packages, and audited 4224 packages in 2m
477 packages are looking for funding
  run `npm fund` for details
9 vulnerabilities (2 moderate, 6 high, 1 critical)
To address issues that do not require attention, run:
  npm audit fix
To address all issues (including breaking changes), run:
  npm audit fix --force
Run `npm audit` for details.
trunk init 2/2 ✓
⡿ Downloading Trunk 1.17.1...
⡿ Downloading Trunk 1.17.1...
⢿ Downloading Trunk 1.17.1...
⣻ Downloading Trunk 1.17.1...
⣽ Downloading Trunk 1.17.1...
⣾ Downloading Trunk 1.17.1...
⣷ Downloading Trunk 1.17.1...
✔ Downloading Trunk 1.17.1... done
⡿ Verifying Trunk sha256...
✔ Verifying Trunk sha256... done
⡿ Unpacking Trunk...
✔ Unpacking Trunk... done

✔ 18 linters were enabled (.trunk/trunk.yaml)
  actionlint 1.6.26 (14 github-workflow files)
  checkov 2.5.9 (18 docker, 192 json, 26 yaml files)
  dotenv-linter 3.3.0 (18 dotenv files)
  eslint 8.52.0 (6 javascript, 2426 typescript files)
  git-diff-check (3248 files)
  hadolint 2.12.0 (18 docker files) (created .hadolint.yaml)
  markdownlint 0.37.0 (68 markdown files) (created .markdownlint.yaml)
  osv-scanner 1.4.2 (3 lockfile files)
  oxipng 9.0.0 (14 png files)
  prettier 3.0.3 (10 css, 6 graphql, 5 html, 6 javascript, 189 json, 68 markdown, 2 prettier_supported_configs, 199 sass, 2426 typescript, 26 yaml files)
  shellcheck 0.9.0 (5 shell files) (created .shellcheckrc)
  shfmt 3.6.0 (5 shell files)
  svgo 3.0.2 (88 svg files) (created svgo.config.js)
  taplo 0.8.1 (5 toml files)
  terrascan 1.18.3 (18 docker files)
  trivy 0.46.0 (18 docker, 26 yaml files)
  trufflehog 3.60.3 (3251 files)
  yamllint 1.32.0 (26 yaml files) (created .yamllint.yaml)
Next Steps
 1. Read documentation
    Our documentation can be found at https://docs.trunk.io
 2. Get help and give feedback
    Join the Trunk community at https://slack.trunk.io


Sandbox logs for 15b505c
npm i 1/2 ✓
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'react-command-palette@0.21.1',
npm WARN EBADENGINE   required: { node: '>=16 <=17' },
npm WARN EBADENGINE   current: { node: 'v18.17.0', npm: '9.6.7' }
npm WARN EBADENGINE }
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated nest-morgan@2.0.0: Deprecated and unmaintained. Check out nestjs-pino as alternative.
npm WARN deprecated superagent@3.8.3: Please upgrade to v7.0.2+ of superagent.  We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing.  See the releases tab for more information at .
npm WARN deprecated subscriptions-transport-ws@0.11.0: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws    For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
npm WARN deprecated json-schema-ref-parser@9.0.9: Please switch to @apidevtools/json-schema-ref-parser
npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.
npm WARN deprecated apollo-server-plugin-base@3.7.2: The `apollo-server-plugin-base` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated apollo-server-types@3.8.0: The `apollo-server-types` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated apollo-datasource@3.3.2: The `apollo-datasource` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated apollo-server-errors@3.3.1: The `apollo-server-errors` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated apollo-server-express@3.12.1: The `apollo-server-express` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated @types/winston@2.4.4: This is a stub types definition. winston provides its own type definitions, so you do not need this installed.
npm WARN deprecated @types/query-string@6.3.0: This is a stub types definition. query-string provides its own type definitions, so you do not need this installed.
npm WARN deprecated apollo-server-env@4.2.1: The `apollo-server-env` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/utils.fetcher` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated apollo-reporting-protobuf@3.4.0: The `apollo-reporting-protobuf` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/usage-reporting-protobuf` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated @types/cron@2.4.0: This is a stub types definition. cron provides its own type definitions, so you do not need this installed.
npm WARN deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
npm WARN deprecated @babel/plugin-proposal-object-rest-spread@7.20.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated apollo-server-core@3.12.1: The `apollo-server-core` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated @mattiasbuelens/web-streams-polyfill@0.2.1: moved to web-streams-polyfill@2.0.0
> prepare
> husky install
husky - Git hooks installed
added 4223 packages, and audited 4224 packages in 2m
477 packages are looking for funding
  run `npm fund` for details
9 vulnerabilities (2 moderate, 6 high, 1 critical)
To address issues that do not require attention, run:
  npm audit fix
To address all issues (including breaking changes), run:
  npm audit fix --force
Run `npm audit` for details.
trunk init 2/2 ✓
⡿ Downloading Trunk 1.17.1...
⡿ Downloading Trunk 1.17.1...
⢿ Downloading Trunk 1.17.1...
⣻ Downloading Trunk 1.17.1...
⣽ Downloading Trunk 1.17.1...
⣾ Downloading Trunk 1.17.1...
⣷ Downloading Trunk 1.17.1...
✔ Downloading Trunk 1.17.1... done
⡿ Verifying Trunk sha256...
✔ Verifying Trunk sha256... done
⡿ Unpacking Trunk...
✔ Unpacking Trunk... done

✔ 18 linters were enabled (.trunk/trunk.yaml)
  actionlint 1.6.26 (14 github-workflow files)
  checkov 2.5.9 (18 docker, 192 json, 26 yaml files)
  dotenv-linter 3.3.0 (18 dotenv files)
  eslint 8.52.0 (6 javascript, 2426 typescript files)
  git-diff-check (3248 files)
  hadolint 2.12.0 (18 docker files) (created .hadolint.yaml)
  markdownlint 0.37.0 (68 markdown files) (created .markdownlint.yaml)
  osv-scanner 1.4.2 (3 lockfile files)
  oxipng 9.0.0 (14 png files)
  prettier 3.0.3 (10 css, 6 graphql, 5 html, 6 javascript, 189 json, 68 markdown, 2 prettier_supported_configs, 199 sass, 2426 typescript, 26 yaml files)
  shellcheck 0.9.0 (5 shell files) (created .shellcheckrc)
  shfmt 3.6.0 (5 shell files)
  svgo 3.0.2 (88 svg files) (created svgo.config.js)
  taplo 0.8.1 (5 toml files)
  terrascan 1.18.3 (18 docker files)
  trivy 0.46.0 (18 docker, 26 yaml files)
  trufflehog 3.60.3 (3251 files)
  yamllint 1.32.0 (26 yaml files) (created .yamllint.yaml)
Next Steps
 1. Read documentation
    Our documentation can be found at https://docs.trunk.io
 2. Get help and give feedback
    Join the Trunk community at https://slack.trunk.io


Step 3: 🔁 Code Review

Working on it...


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord