eletrotupi / tcc/ commit / cc08a06

api: add nodemon and body-parser

Pedro Lucas Porcellis porcellis@eletrotupi.com · 6 months ago cc08a06c3d6c1e47c40eb66a2af596e218d3b857 Browse files
Parents 1d10886
Changed files
2
Additions
+198
Deletions
-8
api/package-lock.json modified+195 -7
api/package-lock.json
1 1
{
2 2
  "name": "orbit-api",
3 3
  "version": "0.0.0",
4 4
  "lockfileVersion": 3,
5 5
  "requires": true,
14 14
        "@prisma/client": "^7.5.0",
15 15
        "@types/cors": "^2.8.19",
16 16
        "@types/jsonwebtoken": "^9.0.10",
17 17
        "bcryptjs": "^3.0.3",
18 18
        "better-sqlite3": "^12.5.0",
19 +
        "body-parser": "^2.2.2",
19 20
        "cors": "^2.8.6",
20 21
        "date-fns": "^4.1.0",
21 22
        "express": "^5.2.1",
22 23
        "jsonwebtoken": "^9.0.3",
23 24
        "morgan": "^1.10.1",
30 31
        "@types/morgan": "^1.9.10",
31 32
        "@types/node": "^25.5.2",
32 33
        "ava": "^6.4.1",
33 34
        "cross-var": "^1.1.0",
34 35
        "dotenv-cli": "^11.0.0",
36 +
        "nodemon": "^3.1.14",
35 37
        "prisma": "^7.5.0",
36 38
        "supertest": "^7.1.4",
37 39
        "ts-node": "^10.9.2",
38 40
        "tsc-alias": "^1.8.16",
39 41
        "tsconfig-paths": "^4.2.0",
2691 2693
      "integrity": "sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==",
2692 2694
      "dev": true,
2693 2695
      "license": "MIT"
2694 2696
    },
2695 2697
    "node_modules/body-parser": {
2696 -
      "version": "2.2.1",
2697 -
      "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.1.tgz",
2698 -
      "integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==",
2698 +
      "version": "2.2.2",
2699 +
      "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz",
2700 +
      "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==",
2699 2701
      "license": "MIT",
2700 2702
      "dependencies": {
2701 2703
        "bytes": "^3.1.2",
2702 2704
        "content-type": "^1.0.5",
2703 2705
        "debug": "^4.4.3",
2704 2706
        "http-errors": "^2.0.0",
2705 2707
        "iconv-lite": "^0.7.0",
2706 2708
        "on-finished": "^2.4.1",
2707 -
        "qs": "^6.14.0",
2709 +
        "qs": "^6.14.1",
2708 2710
        "raw-body": "^3.0.1",
2709 2711
        "type-is": "^2.0.1"
2710 2712
      },
2711 2713
      "engines": {
2712 2714
        "node": ">=18"
4513 4515
      "license": "MIT",
4514 4516
      "engines": {
4515 4517
        "node": ">=0.10.0"
4516 4518
      }
4517 4519
    },
4520 +
    "node_modules/has-flag": {
4521 +
      "version": "3.0.0",
4522 +
      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
4523 +
      "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
4524 +
      "dev": true,
4525 +
      "license": "MIT",
4526 +
      "engines": {
4527 +
        "node": ">=4"
4528 +
      }
4529 +
    },
4518 4530
    "node_modules/has-symbols": {
4519 4531
      "version": "1.1.0",
4520 4532
      "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
4521 4533
      "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
4522 4534
      "license": "MIT",
5550 5562
        "node-gyp-build": "bin.js",
5551 5563
        "node-gyp-build-optional": "optional.js",
5552 5564
        "node-gyp-build-test": "build-test.js"
5553 5565
      }
5554 5566
    },
5567 +
    "node_modules/nodemon": {
5568 +
      "version": "3.1.14",
5569 +
      "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.14.tgz",
5570 +
      "integrity": "sha512-jakjZi93UtB3jHMWsXL68FXSAosbLfY0In5gtKq3niLSkrWznrVBzXFNOEMJUfc9+Ke7SHWoAZsiMkNP3vq6Jw==",
5571 +
      "dev": true,
5572 +
      "license": "MIT",
5573 +
      "dependencies": {
5574 +
        "chokidar": "^3.5.2",
5575 +
        "debug": "^4",
5576 +
        "ignore-by-default": "^1.0.1",
5577 +
        "minimatch": "^10.2.1",
5578 +
        "pstree.remy": "^1.1.8",
5579 +
        "semver": "^7.5.3",
5580 +
        "simple-update-notifier": "^2.0.0",
5581 +
        "supports-color": "^5.5.0",
5582 +
        "touch": "^3.1.0",
5583 +
        "undefsafe": "^2.0.5"
5584 +
      },
5585 +
      "bin": {
5586 +
        "nodemon": "bin/nodemon.js"
5587 +
      },
5588 +
      "engines": {
5589 +
        "node": ">=10"
5590 +
      },
5591 +
      "funding": {
5592 +
        "type": "opencollective",
5593 +
        "url": "https://opencollective.com/nodemon"
5594 +
      }
5595 +
    },
5596 +
    "node_modules/nodemon/node_modules/balanced-match": {
5597 +
      "version": "4.0.4",
5598 +
      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
5599 +
      "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
5600 +
      "dev": true,
5601 +
      "license": "MIT",
5602 +
      "engines": {
5603 +
        "node": "18 || 20 || >=22"
5604 +
      }
5605 +
    },
5606 +
    "node_modules/nodemon/node_modules/brace-expansion": {
5607 +
      "version": "5.0.5",
5608 +
      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz",
5609 +
      "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==",
5610 +
      "dev": true,
5611 +
      "license": "MIT",
5612 +
      "dependencies": {
5613 +
        "balanced-match": "^4.0.2"
5614 +
      },
5615 +
      "engines": {
5616 +
        "node": "18 || 20 || >=22"
5617 +
      }
5618 +
    },
5619 +
    "node_modules/nodemon/node_modules/chokidar": {
5620 +
      "version": "3.6.0",
5621 +
      "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
5622 +
      "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
5623 +
      "dev": true,
5624 +
      "license": "MIT",
5625 +
      "dependencies": {
5626 +
        "anymatch": "~3.1.2",
5627 +
        "braces": "~3.0.2",
5628 +
        "glob-parent": "~5.1.2",
5629 +
        "is-binary-path": "~2.1.0",
5630 +
        "is-glob": "~4.0.1",
5631 +
        "normalize-path": "~3.0.0",
5632 +
        "readdirp": "~3.6.0"
5633 +
      },
5634 +
      "engines": {
5635 +
        "node": ">= 8.10.0"
5636 +
      },
5637 +
      "funding": {
5638 +
        "url": "https://paulmillr.com/funding/"
5639 +
      },
5640 +
      "optionalDependencies": {
5641 +
        "fsevents": "~2.3.2"
5642 +
      }
5643 +
    },
5644 +
    "node_modules/nodemon/node_modules/ignore-by-default": {
5645 +
      "version": "1.0.1",
5646 +
      "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
5647 +
      "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
5648 +
      "dev": true,
5649 +
      "license": "ISC"
5650 +
    },
5651 +
    "node_modules/nodemon/node_modules/minimatch": {
5652 +
      "version": "10.2.5",
5653 +
      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
5654 +
      "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
5655 +
      "dev": true,
5656 +
      "license": "BlueOak-1.0.0",
5657 +
      "dependencies": {
5658 +
        "brace-expansion": "^5.0.5"
5659 +
      },
5660 +
      "engines": {
5661 +
        "node": "18 || 20 || >=22"
5662 +
      },
5663 +
      "funding": {
5664 +
        "url": "https://github.com/sponsors/isaacs"
5665 +
      }
5666 +
    },
5667 +
    "node_modules/nodemon/node_modules/picomatch": {
5668 +
      "version": "2.3.2",
5669 +
      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
5670 +
      "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
5671 +
      "dev": true,
5672 +
      "license": "MIT",
5673 +
      "engines": {
5674 +
        "node": ">=8.6"
5675 +
      },
5676 +
      "funding": {
5677 +
        "url": "https://github.com/sponsors/jonschlinkert"
5678 +
      }
5679 +
    },
5680 +
    "node_modules/nodemon/node_modules/readdirp": {
5681 +
      "version": "3.6.0",
5682 +
      "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
5683 +
      "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
5684 +
      "dev": true,
5685 +
      "license": "MIT",
5686 +
      "dependencies": {
5687 +
        "picomatch": "^2.2.1"
5688 +
      },
5689 +
      "engines": {
5690 +
        "node": ">=8.10.0"
5691 +
      }
5692 +
    },
5693 +
    "node_modules/nodemon/node_modules/supports-color": {
5694 +
      "version": "5.5.0",
5695 +
      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
5696 +
      "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
5697 +
      "dev": true,
5698 +
      "license": "MIT",
5699 +
      "dependencies": {
5700 +
        "has-flag": "^3.0.0"
5701 +
      },
5702 +
      "engines": {
5703 +
        "node": ">=4"
5704 +
      }
5705 +
    },
5555 5706
    "node_modules/nofilter": {
5556 5707
      "version": "3.1.0",
5557 5708
      "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz",
5558 5709
      "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==",
5559 5710
      "dev": true,
6182 6333
      "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
6183 6334
      "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==",
6184 6335
      "dev": true,
6185 6336
      "license": "ISC"
6186 6337
    },
6338 +
    "node_modules/pstree.remy": {
6339 +
      "version": "1.1.8",
6340 +
      "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
6341 +
      "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
6342 +
      "dev": true,
6343 +
      "license": "MIT"
6344 +
    },
6187 6345
    "node_modules/pump": {
6188 6346
      "version": "3.0.3",
6189 6347
      "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz",
6190 6348
      "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==",
6191 6349
      "license": "MIT",
6210 6368
        }
6211 6369
      ],
6212 6370
      "license": "MIT"
6213 6371
    },
6214 6372
    "node_modules/qs": {
6215 -
      "version": "6.14.0",
6216 -
      "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz",
6217 -
      "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",
6373 +
      "version": "6.15.1",
6374 +
      "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.1.tgz",
6375 +
      "integrity": "sha512-6YHEFRL9mfgcAvql/XhwTvf5jKcOiiupt2FiJxHkiX1z4j7WL8J/jRHYLluORvc1XxB5rV20KoeK00gVJamspg==",
6218 6376
      "license": "BSD-3-Clause",
6219 6377
      "dependencies": {
6220 6378
        "side-channel": "^1.1.0"
6221 6379
      },
6222 6380
      "engines": {
6823 6981
        "decompress-response": "^6.0.0",
6824 6982
        "once": "^1.3.1",
6825 6983
        "simple-concat": "^1.0.0"
6826 6984
      }
6827 6985
    },
6986 +
    "node_modules/simple-update-notifier": {
6987 +
      "version": "2.0.0",
6988 +
      "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
6989 +
      "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
6990 +
      "dev": true,
6991 +
      "license": "MIT",
6992 +
      "dependencies": {
6993 +
        "semver": "^7.5.3"
6994 +
      },
6995 +
      "engines": {
6996 +
        "node": ">=10"
6997 +
      }
6998 +
    },
6828 6999
    "node_modules/slash": {
6829 7000
      "version": "5.1.0",
6830 7001
      "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz",
6831 7002
      "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==",
6832 7003
      "dev": true,
7271 7442
      "license": "MIT",
7272 7443
      "engines": {
7273 7444
        "node": ">=0.6"
7274 7445
      }
7275 7446
    },
7447 +
    "node_modules/touch": {
7448 +
      "version": "3.1.1",
7449 +
      "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz",
7450 +
      "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==",
7451 +
      "dev": true,
7452 +
      "license": "ISC",
7453 +
      "bin": {
7454 +
        "nodetouch": "bin/nodetouch.js"
7455 +
      }
7456 +
    },
7276 7457
    "node_modules/tr46": {
7277 7458
      "version": "0.0.3",
7278 7459
      "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
7279 7460
      "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
7280 7461
      "dev": true,
7533 7714
        "tsserver": "bin/tsserver"
7534 7715
      },
7535 7716
      "engines": {
7536 7717
        "node": ">=14.17"
7537 7718
      }
7719 +
    },
7720 +
    "node_modules/undefsafe": {
7721 +
      "version": "2.0.5",
7722 +
      "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
7723 +
      "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
7724 +
      "dev": true,
7725 +
      "license": "MIT"
7538 7726
    },
7539 7727
    "node_modules/undici-types": {
7540 7728
      "version": "7.18.2",
7541 7729
      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
7542 7730
      "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
7945 8133
        "graphmatch": "^1.1.0"
7946 8134
      }
7947 8135
    }
7948 8136
  }
7949 8137
}
api/package.json modified+3 -1
api/package.json
1 1
{
2 2
  "name": "orbit-api",
3 3
  "version": "0.0.0",
4 4
  "description": "",
5 5
  "license": "ISC",
8 8
  "directories": {
9 9
    "test": "tests"
10 10
  },
11 11
  "scripts": {
12 12
    "build": "tsc && tsc-alias",
13 -
    "start": "ts-node -r tsconfig-paths/register src/index.ts",
13 +
    "start": "nodemon src/index.ts",
14 14
    "test": "npm run test:setup && dotenv -e .env.test -o -- npx ava",
15 15
    "test:setup": "npm run test:setup:generate && npm run test:setup:migrate",
16 16
    "test:setup:generate": "dotenv -e .env.test -o -- npx prisma generate",
17 17
    "test:setup:migrate": "dotenv -e .env.test -o -- npx prisma db push",
18 18
    "test:watch": "npm run test:setup && NODE_ENV=test npx ava --watch",
24 24
    "@prisma/client": "^7.5.0",
25 25
    "@types/cors": "^2.8.19",
26 26
    "@types/jsonwebtoken": "^9.0.10",
27 27
    "bcryptjs": "^3.0.3",
28 28
    "better-sqlite3": "^12.5.0",
29 +
    "body-parser": "^2.2.2",
29 30
    "cors": "^2.8.6",
30 31
    "date-fns": "^4.1.0",
31 32
    "express": "^5.2.1",
32 33
    "jsonwebtoken": "^9.0.3",
33 34
    "morgan": "^1.10.1",
40 41
    "@types/morgan": "^1.9.10",
41 42
    "@types/node": "^25.5.2",
42 43
    "ava": "^6.4.1",
43 44
    "cross-var": "^1.1.0",
44 45
    "dotenv-cli": "^11.0.0",
46 +
    "nodemon": "^3.1.14",
45 47
    "prisma": "^7.5.0",
46 48
    "supertest": "^7.1.4",
47 49
    "ts-node": "^10.9.2",
48 50
    "tsc-alias": "^1.8.16",
49 51
    "tsconfig-paths": "^4.2.0",
50 52
    "tsx": "^4.21.0",
51 53
    "typescript": "^6.0.2"
52 54
  }
53 55
}