From d40453a74194d12cd8c44f42dd1b1a15d989cb1f Mon Sep 17 00:00:00 2001 From: izzyconner <32255130+izzyconner@users.noreply.github.com> Date: Sun, 4 Feb 2024 13:08:33 -0500 Subject: [PATCH 01/15] Getting initial setup for libs and schema files --- .vscode/extensions.json | 3 +- apps/frontend/package-lock.json | 4611 ++++++----------- jest.config.ts | 5 + jest.preset.js | 3 + libs/shared/schemas/.eslintrc.json | 25 + libs/shared/schemas/README.md | 11 + libs/shared/schemas/jest.config.ts | 11 + libs/shared/schemas/package.json | 10 + libs/shared/schemas/project.json | 30 + libs/shared/schemas/src/index.ts | 5 + libs/shared/schemas/src/lib/CellTypes.ts | 28 + libs/shared/schemas/src/lib/RowSchema.ts | 51 + libs/shared/schemas/src/lib/Timesheet.ts | 104 + .../schemas/src/lib/TimesheetSchema.tsx | 32 + .../shared/schemas/src/lib/UpdateTimesheet.ts | 74 + libs/shared/schemas/src/lib/UserSchema.tsx | 11 + libs/shared/schemas/tsconfig.json | 22 + libs/shared/schemas/tsconfig.lib.json | 10 + libs/shared/schemas/tsconfig.spec.json | 14 + nx.json | 42 +- package-lock.json | 2058 +++++++- package.json | 14 +- tsconfig.base.json | 4 +- 23 files changed, 4195 insertions(+), 2983 deletions(-) create mode 100644 jest.config.ts create mode 100644 jest.preset.js create mode 100644 libs/shared/schemas/.eslintrc.json create mode 100644 libs/shared/schemas/README.md create mode 100644 libs/shared/schemas/jest.config.ts create mode 100644 libs/shared/schemas/package.json create mode 100644 libs/shared/schemas/project.json create mode 100644 libs/shared/schemas/src/index.ts create mode 100644 libs/shared/schemas/src/lib/CellTypes.ts create mode 100644 libs/shared/schemas/src/lib/RowSchema.ts create mode 100644 libs/shared/schemas/src/lib/Timesheet.ts create mode 100644 libs/shared/schemas/src/lib/TimesheetSchema.tsx create mode 100644 libs/shared/schemas/src/lib/UpdateTimesheet.ts create mode 100644 libs/shared/schemas/src/lib/UserSchema.tsx create mode 100644 libs/shared/schemas/tsconfig.json create mode 100644 libs/shared/schemas/tsconfig.lib.json create mode 100644 libs/shared/schemas/tsconfig.spec.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json index a90dde4..c647399 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,6 +3,7 @@ "nrwl.angular-console", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint", - "ms-playwright.playwright" + "ms-playwright.playwright", + "firsttris.vscode-jest-runner" ] } diff --git a/apps/frontend/package-lock.json b/apps/frontend/package-lock.json index ba2c54b..266e0e3 100644 --- a/apps/frontend/package-lock.json +++ b/apps/frontend/package-lock.json @@ -6152,15 +6152,81 @@ "license": "0BSD" }, "node_modules/@babel/code-frame": { - "version": "7.21.4", - "license": "MIT", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/compat-data": { "version": "7.21.7", "license": "MIT", @@ -6254,10 +6320,11 @@ } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.18.6", - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", + "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -6291,18 +6358,19 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.21.8", - "license": "MIT", + "version": "7.23.10", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.10.tgz", + "integrity": "sha512-2XpP2XhkXzgxecPNEEK8Vz8Asj9aRxt08oKOqtiZoqV2UGZ5T+EkyP9sXQ9nwMxBIG34a7jmasVqoMop7VdPUw==", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.21.5", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-member-expression-to-functions": "^7.21.5", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-replace-supers": "^7.21.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/helper-split-export-declaration": "^7.18.6", - "semver": "^6.3.0" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-member-expression-to-functions": "^7.23.0", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.20", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -6361,18 +6429,20 @@ "license": "MIT" }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.21.5", - "license": "MIT", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.21.0", - "license": "MIT", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dependencies": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -6389,10 +6459,11 @@ } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.21.5", - "license": "MIT", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", + "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", "dependencies": { - "@babel/types": "^7.21.5" + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -6426,18 +6497,20 @@ } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.18.6", - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", + "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.21.5", - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", "engines": { "node": ">=6.9.0" } @@ -6459,18 +6532,19 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.21.5", - "license": "MIT", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz", + "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==", "dependencies": { - "@babel/helper-environment-visitor": "^7.21.5", - "@babel/helper-member-expression-to-functions": "^7.21.5", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.5", - "@babel/types": "^7.21.5" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-member-expression-to-functions": "^7.22.15", + "@babel/helper-optimise-call-expression": "^7.22.5" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-simple-access": { @@ -6484,42 +6558,47 @@ } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.20.0", - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", + "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", "dependencies": { - "@babel/types": "^7.20.0" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "license": "MIT", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.21.5", - "license": "MIT", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "license": "MIT", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.21.0", - "license": "MIT", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "engines": { "node": ">=6.9.0" } @@ -6550,11 +6629,12 @@ } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "license": "MIT", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -6563,7 +6643,8 @@ }, "node_modules/@babel/highlight/node_modules/ansi-styles": { "version": "3.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dependencies": { "color-convert": "^1.9.0" }, @@ -6573,7 +6654,8 @@ }, "node_modules/@babel/highlight/node_modules/chalk": { "version": "2.4.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -6585,32 +6667,37 @@ }, "node_modules/@babel/highlight/node_modules/color-convert": { "version": "1.9.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dependencies": { "color-name": "1.1.3" } }, "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "node_modules/@babel/highlight/node_modules/escape-string-regexp": { "version": "1.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "engines": { "node": ">=0.8.0" } }, "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "engines": { "node": ">=4" } }, "node_modules/@babel/highlight/node_modules/supports-color": { "version": "5.5.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dependencies": { "has-flag": "^3.0.0" }, @@ -6619,8 +6706,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.21.8", - "license": "MIT", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz", + "integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==", "bin": { "parser": "bin/babel-parser.js" }, @@ -6734,12 +6822,13 @@ } }, "node_modules/@babel/plugin-proposal-export-default-from": { - "version": "7.18.10", - "license": "MIT", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.23.3.tgz", + "integrity": "sha512-Q23MpLZfSGZL1kU7fWqV262q65svLSCIP5kZ/JCW/rKTCm/FrLjpvEd2kfUYMVeHh4QhV/xzyoRAHWrAZJrE3Q==", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-export-default-from": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-export-default-from": "^7.23.3" }, "engines": { "node": ">=6.9.0" @@ -6977,11 +7066,12 @@ } }, "node_modules/@babel/plugin-syntax-export-default-from": { - "version": "7.18.6", - "license": "MIT", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.23.3.tgz", + "integrity": "sha512-KeENO5ck1IeZ/l2lFZNy+mpobV3D2Zy5C1YFnWm+YuY5mQiAWc4yAp13dqgguwsBsFVLh4LPCEqCa5qW13N+hw==", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -7001,10 +7091,11 @@ } }, "node_modules/@babel/plugin-syntax-flow": { - "version": "7.21.4", - "license": "MIT", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.23.3.tgz", + "integrity": "sha512-YZiAIpkJAwQXBJLIQbRFayR5c+gJ35Vcz3bg954k7cd73zqjvhacJuL9RbrzPz8qPmZdgqP6EUKwy0PCNhaaPA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -7302,11 +7393,12 @@ } }, "node_modules/@babel/plugin-transform-flow-strip-types": { - "version": "7.21.0", - "license": "MIT", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.23.3.tgz", + "integrity": "sha512-26/pQTf9nQSNVJCrLB1IkHUKyPxR+lMrH2QDPG89+Znu9rAMbtrybdbWeE9bb7gzjmE5iXHEY+e0HUwM6Co93Q==", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-flow": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-flow": "^7.23.3" }, "engines": { "node": ">=6.9.0" @@ -7482,6 +7574,40 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-private-methods": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.23.3.tgz", + "integrity": "sha512-UzqRcRtWsDMTLrRWFvUBDwmw06tCQH9Rl1uAjfh6ijMSmGYQ+fpdB+cnqRC8EMh5tuuxSv0/TejGL+7vyj+50g==", + "peer": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.22.15", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-property-in-object": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.4.tgz", + "integrity": "sha512-9G3K1YqTq3F4Vt88Djx1UZ79PDyj+yKRnUy7cZGSMe+a7jkwD259uKKuUzQlPkGam7R+8RJwh5z4xO27fA1o2A==", + "peer": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.22.15", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-transform-property-literals": { "version": "7.18.6", "license": "MIT", @@ -7554,11 +7680,12 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-self": { - "version": "7.21.0", - "license": "MIT", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.23.3.tgz", + "integrity": "sha512-qXRvbeKDSfwnlJnanVRp0SfuWE5DQhwQr5xtLBzp56Wabyo+4CMosF6Kfp+eOD/4FYpql64XVJ2W0pVLlJZxOQ==", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -7568,11 +7695,12 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-source": { - "version": "7.19.6", - "license": "MIT", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.23.3.tgz", + "integrity": "sha512-91RS0MDnAWDNvGC6Wio5XYkyWI39FMFO+JK9+4AlgaTH+yWwVTsw7/sn6LK0lH7c5F+TFkpv/3LfCJ1Ydwof/g==", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.19.0" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -7839,13 +7967,14 @@ } }, "node_modules/@babel/preset-flow": { - "version": "7.21.4", - "license": "MIT", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.23.3.tgz", + "integrity": "sha512-7yn6hl8RIv+KNk6iIrGZ+D06VhVY35wLVf23Cz/mMu1zOr7u4MMP4j0nZ9tLf8+4ZFpnib8cFYgB/oYg9hfswA==", "peer": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-validator-option": "^7.21.0", - "@babel/plugin-transform-flow-strip-types": "^7.21.0" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-validator-option": "^7.22.15", + "@babel/plugin-transform-flow-strip-types": "^7.23.3" }, "engines": { "node": ">=6.9.0" @@ -7905,14 +8034,15 @@ } }, "node_modules/@babel/register": { - "version": "7.21.0", - "license": "MIT", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.23.7.tgz", + "integrity": "sha512-EjJeB6+kvpk+Y5DAkEAmbOBEFkh9OASx0huoEkqYTFxAZHzOAX2Oh5uwAUuL2rUddqfM0SA+KPXV2TbzoZ2kvQ==", "peer": true, "dependencies": { "clone-deep": "^4.0.1", "find-cache-dir": "^2.0.0", "make-dir": "^2.1.0", - "pirates": "^4.0.5", + "pirates": "^4.0.6", "source-map-support": "^0.5.16" }, "engines": { @@ -7937,12 +8067,13 @@ } }, "node_modules/@babel/template": { - "version": "7.20.7", - "license": "MIT", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.23.9.tgz", + "integrity": "sha512-+xrD2BWLpvHKNmX2QbpdpsBaWnRxahMwJjO+KZk2JOElj5nSmKezyS1B4u+QbHMTX69t4ukm6hh9lsYQ7GHCKA==", "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.23.9", + "@babel/types": "^7.23.9" }, "engines": { "node": ">=6.9.0" @@ -7987,11 +8118,12 @@ "license": "MIT" }, "node_modules/@babel/types": { - "version": "7.21.5", - "license": "MIT", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.9.tgz", + "integrity": "sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==", "dependencies": { - "@babel/helper-string-parser": "^7.21.5", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -9708,12 +9840,14 @@ }, "node_modules/@hapi/hoek": { "version": "9.3.0", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", "peer": true }, "node_modules/@hapi/topo": { "version": "5.1.0", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", + "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", "peer": true, "dependencies": { "@hapi/hoek": "^9.0.0" @@ -9770,6 +9904,15 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" }, + "node_modules/@isaacs/ttlcache": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@isaacs/ttlcache/-/ttlcache-1.4.1.tgz", + "integrity": "sha512-RQgQ4uQ+pLbqXfOmieB91ejmLwvSgv9nLx6sT6sD83s7umBypgg+OIBOBbEUiJXrfpnp9j0mRhYYdzp9uqq3lA==", + "peer": true, + "engines": { + "node": ">=12" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -10134,25 +10277,27 @@ } }, "node_modules/@jest/create-cache-key-function": { - "version": "29.5.0", - "license": "MIT", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-29.7.0.tgz", + "integrity": "sha512-4QqS3LY5PBmTRHj9sAg1HLoPzqAI0uOX6wI/TRqHIcOxlFidy6YEmCQJk6FSZjNLGCeubDMfmkWL+qaLKhSGQA==", "peer": true, "dependencies": { - "@jest/types": "^29.5.0" + "@jest/types": "^29.6.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/environment": { - "version": "29.5.0", - "license": "MIT", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "peer": true, "dependencies": { - "@jest/fake-timers": "^29.5.0", - "@jest/types": "^29.5.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.5.0" + "jest-mock": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -10169,16 +10314,17 @@ } }, "node_modules/@jest/fake-timers": { - "version": "29.5.0", - "license": "MIT", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "peer": true, "dependencies": { - "@jest/types": "^29.5.0", + "@jest/types": "^29.6.3", "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^29.5.0", - "jest-mock": "^29.5.0", - "jest-util": "^29.5.0" + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -10462,10 +10608,11 @@ } }, "node_modules/@jest/schemas": { - "version": "29.4.3", - "license": "MIT", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dependencies": { - "@sinclair/typebox": "^0.25.16" + "@sinclair/typebox": "^0.27.8" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -10627,10 +10774,11 @@ } }, "node_modules/@jest/types": { - "version": "29.5.0", - "license": "MIT", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dependencies": { - "@jest/schemas": "^29.4.3", + "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", @@ -11344,62 +11492,66 @@ } }, "node_modules/@react-native-community/cli": { - "version": "10.2.2", - "license": "MIT", - "peer": true, - "dependencies": { - "@react-native-community/cli-clean": "^10.1.1", - "@react-native-community/cli-config": "^10.1.1", - "@react-native-community/cli-debugger-ui": "^10.0.0", - "@react-native-community/cli-doctor": "^10.2.2", - "@react-native-community/cli-hermes": "^10.2.0", - "@react-native-community/cli-plugin-metro": "^10.2.2", - "@react-native-community/cli-server-api": "^10.1.1", - "@react-native-community/cli-tools": "^10.1.1", - "@react-native-community/cli-types": "^10.0.0", + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-12.3.2.tgz", + "integrity": "sha512-WgoUWwLDcf/G1Su2COUUVs3RzAwnV/vUTdISSpAUGgSc57mPabaAoUctKTnfYEhCnE3j02k3VtaVPwCAFRO3TQ==", + "peer": true, + "dependencies": { + "@react-native-community/cli-clean": "12.3.2", + "@react-native-community/cli-config": "12.3.2", + "@react-native-community/cli-debugger-ui": "12.3.2", + "@react-native-community/cli-doctor": "12.3.2", + "@react-native-community/cli-hermes": "12.3.2", + "@react-native-community/cli-plugin-metro": "12.3.2", + "@react-native-community/cli-server-api": "12.3.2", + "@react-native-community/cli-tools": "12.3.2", + "@react-native-community/cli-types": "12.3.2", "chalk": "^4.1.2", "commander": "^9.4.1", - "execa": "^1.0.0", + "deepmerge": "^4.3.0", + "execa": "^5.0.0", "find-up": "^4.1.0", "fs-extra": "^8.1.0", "graceful-fs": "^4.1.3", - "prompts": "^2.4.0", - "semver": "^6.3.0" + "prompts": "^2.4.2", + "semver": "^7.5.2" }, "bin": { "react-native": "build/bin.js" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/@react-native-community/cli-clean": { - "version": "10.1.1", - "license": "MIT", + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-clean/-/cli-clean-12.3.2.tgz", + "integrity": "sha512-90k2hCX0ddSFPT7EN7h5SZj0XZPXP0+y/++v262hssoey3nhurwF57NGWN0XAR0o9BSW7+mBfeInfabzDraO6A==", "peer": true, "dependencies": { - "@react-native-community/cli-tools": "^10.1.1", + "@react-native-community/cli-tools": "12.3.2", "chalk": "^4.1.2", - "execa": "^1.0.0", - "prompts": "^2.4.0" + "execa": "^5.0.0" } }, "node_modules/@react-native-community/cli-config": { - "version": "10.1.1", - "license": "MIT", + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-config/-/cli-config-12.3.2.tgz", + "integrity": "sha512-UUCzDjQgvAVL/57rL7eOuFUhd+d+6qfM7V8uOegQFeFEmSmvUUDLYoXpBa5vAK9JgQtSqMBJ1Shmwao+/oElxQ==", "peer": true, "dependencies": { - "@react-native-community/cli-tools": "^10.1.1", + "@react-native-community/cli-tools": "12.3.2", "chalk": "^4.1.2", "cosmiconfig": "^5.1.0", - "deepmerge": "^3.2.0", + "deepmerge": "^4.3.0", "glob": "^7.1.3", "joi": "^17.2.1" } }, "node_modules/@react-native-community/cli-config/node_modules/cosmiconfig": { "version": "5.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", "peer": true, "dependencies": { "import-fresh": "^2.0.0", @@ -11412,8 +11564,9 @@ } }, "node_modules/@react-native-community/cli-config/node_modules/deepmerge": { - "version": "3.3.0", - "license": "MIT", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "peer": true, "engines": { "node": ">=0.10.0" @@ -11421,7 +11574,8 @@ }, "node_modules/@react-native-community/cli-config/node_modules/import-fresh": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==", "peer": true, "dependencies": { "caller-path": "^2.0.0", @@ -11433,7 +11587,8 @@ }, "node_modules/@react-native-community/cli-config/node_modules/parse-json": { "version": "4.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", "peer": true, "dependencies": { "error-ex": "^1.3.1", @@ -11445,108 +11600,178 @@ }, "node_modules/@react-native-community/cli-config/node_modules/resolve-from": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", "peer": true, "engines": { "node": ">=4" } }, "node_modules/@react-native-community/cli-debugger-ui": { - "version": "10.0.0", - "license": "MIT", + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.3.2.tgz", + "integrity": "sha512-nSWQUL+51J682DlfcC1bjkUbQbGvHCC25jpqTwHIjmmVjYCX1uHuhPSqQKgPNdvtfOkrkACxczd7kVMmetxY2Q==", "peer": true, "dependencies": { "serve-static": "^1.13.1" } }, "node_modules/@react-native-community/cli-doctor": { - "version": "10.2.2", - "license": "MIT", + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-doctor/-/cli-doctor-12.3.2.tgz", + "integrity": "sha512-GrAabdY4qtBX49knHFvEAdLtCjkmndjTeqhYO6BhsbAeKOtspcLT/0WRgdLIaKODRa61ADNB3K5Zm4dU0QrZOg==", "peer": true, "dependencies": { - "@react-native-community/cli-config": "^10.1.1", - "@react-native-community/cli-platform-ios": "^10.2.1", - "@react-native-community/cli-tools": "^10.1.1", + "@react-native-community/cli-config": "12.3.2", + "@react-native-community/cli-platform-android": "12.3.2", + "@react-native-community/cli-platform-ios": "12.3.2", + "@react-native-community/cli-tools": "12.3.2", "chalk": "^4.1.2", "command-exists": "^1.2.8", - "envinfo": "^7.7.2", - "execa": "^1.0.0", + "deepmerge": "^4.3.0", + "envinfo": "^7.10.0", + "execa": "^5.0.0", "hermes-profile-transformer": "^0.0.6", "ip": "^1.1.5", "node-stream-zip": "^1.9.1", "ora": "^5.4.1", - "prompts": "^2.4.0", - "semver": "^6.3.0", + "semver": "^7.5.2", "strip-ansi": "^5.2.0", - "sudo-prompt": "^9.0.0", - "wcwidth": "^1.0.1" + "wcwidth": "^1.0.1", + "yaml": "^2.2.1" } }, - "node_modules/@react-native-community/cli-hermes": { - "version": "10.2.0", - "license": "MIT", + "node_modules/@react-native-community/cli-doctor/node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "peer": true, - "dependencies": { - "@react-native-community/cli-platform-android": "^10.2.0", - "@react-native-community/cli-tools": "^10.1.1", - "chalk": "^4.1.2", - "hermes-profile-transformer": "^0.0.6", - "ip": "^1.1.5" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/@react-native-community/cli-platform-android": { - "version": "10.2.0", - "license": "MIT", + "node_modules/@react-native-community/cli-doctor/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "peer": true, "dependencies": { - "@react-native-community/cli-tools": "^10.1.1", - "chalk": "^4.1.2", - "execa": "^1.0.0", - "glob": "^7.1.3", - "logkitty": "^0.7.1" + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, - "node_modules/@react-native-community/cli-platform-ios": { - "version": "10.2.1", - "license": "MIT", + "node_modules/@react-native-community/cli-doctor/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "peer": true, "dependencies": { - "@react-native-community/cli-tools": "^10.1.1", - "chalk": "^4.1.2", - "execa": "^1.0.0", - "fast-xml-parser": "^4.0.12", - "glob": "^7.1.3", - "ora": "^5.4.1" - } - }, - "node_modules/@react-native-community/cli-plugin-metro": { - "version": "10.2.2", - "license": "MIT", + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@react-native-community/cli-doctor/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "peer": true + }, + "node_modules/@react-native-community/cli-doctor/node_modules/yaml": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", + "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", + "peer": true, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@react-native-community/cli-hermes": { + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-hermes/-/cli-hermes-12.3.2.tgz", + "integrity": "sha512-SL6F9O8ghp4ESBFH2YAPLtIN39jdnvGBKnK4FGKpDCjtB3DnUmDsGFlH46S+GGt5M6VzfG2eeKEOKf3pZ6jUzA==", "peer": true, "dependencies": { - "@react-native-community/cli-server-api": "^10.1.1", - "@react-native-community/cli-tools": "^10.1.1", + "@react-native-community/cli-platform-android": "12.3.2", + "@react-native-community/cli-tools": "12.3.2", "chalk": "^4.1.2", - "execa": "^1.0.0", - "metro": "0.73.9", - "metro-config": "0.73.9", - "metro-core": "0.73.9", - "metro-react-native-babel-transformer": "0.73.9", - "metro-resolver": "0.73.9", - "metro-runtime": "0.73.9", - "readline": "^1.3.0" + "hermes-profile-transformer": "^0.0.6", + "ip": "^1.1.5" } }, + "node_modules/@react-native-community/cli-platform-android": { + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-platform-android/-/cli-platform-android-12.3.2.tgz", + "integrity": "sha512-MZ5nO8yi/N+Fj2i9BJcJ9C/ez+9/Ir7lQt49DWRo9YDmzye66mYLr/P2l/qxsixllbbDi7BXrlLpxaEhMrDopg==", + "peer": true, + "dependencies": { + "@react-native-community/cli-tools": "12.3.2", + "chalk": "^4.1.2", + "execa": "^5.0.0", + "fast-xml-parser": "^4.2.4", + "glob": "^7.1.3", + "logkitty": "^0.7.1" + } + }, + "node_modules/@react-native-community/cli-platform-android/node_modules/fast-xml-parser": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.3.4.tgz", + "integrity": "sha512-utnwm92SyozgA3hhH2I8qldf2lBqm6qHOICawRNRFu1qMe3+oqr+GcXjGqTmXTMGE5T4eC03kr/rlh5C1IRdZA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], + "peer": true, + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "node_modules/@react-native-community/cli-platform-ios": { + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.3.2.tgz", + "integrity": "sha512-OcWEAbkev1IL6SUiQnM6DQdsvfsKZhRZtoBNSj9MfdmwotVZSOEZJ+IjZ1FR9ChvMWayO9ns/o8LgoQxr1ZXeg==", + "peer": true, + "dependencies": { + "@react-native-community/cli-tools": "12.3.2", + "chalk": "^4.1.2", + "execa": "^5.0.0", + "fast-xml-parser": "^4.0.12", + "glob": "^7.1.3", + "ora": "^5.4.1" + } + }, + "node_modules/@react-native-community/cli-plugin-metro": { + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.3.2.tgz", + "integrity": "sha512-FpFBwu+d2E7KRhYPTkKvQsWb2/JKsJv+t1tcqgQkn+oByhp+qGyXBobFB8/R3yYvRRDCSDhS+atWTJzk9TjM8g==", + "peer": true + }, "node_modules/@react-native-community/cli-server-api": { - "version": "10.1.1", - "license": "MIT", + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-server-api/-/cli-server-api-12.3.2.tgz", + "integrity": "sha512-iwa7EO9XFA/OjI5pPLLpI/6mFVqv8L73kNck3CNOJIUCCveGXBKK0VMyOkXaf/BYnihgQrXh+x5cxbDbggr7+Q==", "peer": true, "dependencies": { - "@react-native-community/cli-debugger-ui": "^10.0.0", - "@react-native-community/cli-tools": "^10.1.1", + "@react-native-community/cli-debugger-ui": "12.3.2", + "@react-native-community/cli-tools": "12.3.2", "compression": "^1.7.1", "connect": "^3.6.5", - "errorhandler": "^1.5.0", + "errorhandler": "^1.5.1", "nocache": "^3.0.1", "pretty-format": "^26.6.2", "serve-static": "^1.13.1", @@ -11555,7 +11780,8 @@ }, "node_modules/@react-native-community/cli-server-api/node_modules/@jest/types": { "version": "26.6.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", + "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", "peer": true, "dependencies": { "@types/istanbul-lib-coverage": "^2.0.0", @@ -11569,8 +11795,9 @@ } }, "node_modules/@react-native-community/cli-server-api/node_modules/@types/yargs": { - "version": "15.0.15", - "license": "MIT", + "version": "15.0.19", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.19.tgz", + "integrity": "sha512-2XUaGVmyQjgyAZldf0D0c14vvo/yv0MhQBSTJcejMMaitsn3nxCB6TmH4G0ZQf+uxROOa9mpanoSm8h6SG/1ZA==", "peer": true, "dependencies": { "@types/yargs-parser": "*" @@ -11578,7 +11805,8 @@ }, "node_modules/@react-native-community/cli-server-api/node_modules/pretty-format": { "version": "26.6.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", + "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", "peer": true, "dependencies": { "@jest/types": "^26.6.2", @@ -11592,12 +11820,14 @@ }, "node_modules/@react-native-community/cli-server-api/node_modules/react-is": { "version": "17.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "peer": true }, "node_modules/@react-native-community/cli-server-api/node_modules/ws": { "version": "7.5.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", "peer": true, "engines": { "node": ">=8.3.0" @@ -11616,8 +11846,9 @@ } }, "node_modules/@react-native-community/cli-tools": { - "version": "10.1.1", - "license": "MIT", + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-tools/-/cli-tools-12.3.2.tgz", + "integrity": "sha512-nDH7vuEicHI2TI0jac/DjT3fr977iWXRdgVAqPZFFczlbs7A8GQvEdGnZ1G8dqRUmg+kptw0e4hwczAOG89JzQ==", "peer": true, "dependencies": { "appdirsjs": "^1.2.4", @@ -11627,13 +11858,15 @@ "node-fetch": "^2.6.0", "open": "^6.2.0", "ora": "^5.4.1", - "semver": "^6.3.0", - "shell-quote": "^1.7.3" + "semver": "^7.5.2", + "shell-quote": "^1.7.3", + "sudo-prompt": "^9.0.0" } }, "node_modules/@react-native-community/cli-tools/node_modules/find-up": { "version": "5.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "peer": true, "dependencies": { "locate-path": "^6.0.0", @@ -11648,7 +11881,8 @@ }, "node_modules/@react-native-community/cli-tools/node_modules/locate-path": { "version": "6.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "peer": true, "dependencies": { "p-locate": "^5.0.0" @@ -11660,9 +11894,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@react-native-community/cli-tools/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "peer": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@react-native-community/cli-tools/node_modules/p-limit": { "version": "3.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "peer": true, "dependencies": { "yocto-queue": "^0.1.0" @@ -11676,7 +11923,8 @@ }, "node_modules/@react-native-community/cli-tools/node_modules/p-locate": { "version": "5.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "peer": true, "dependencies": { "p-limit": "^3.0.2" @@ -11688,29 +11936,302 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@react-native-community/cli-tools/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "peer": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@react-native-community/cli-tools/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "peer": true + }, "node_modules/@react-native-community/cli-types": { - "version": "10.0.0", - "license": "MIT", + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-types/-/cli-types-12.3.2.tgz", + "integrity": "sha512-9D0UEFqLW8JmS16mjHJxUJWX8E+zJddrHILSH8AJHZ0NNHv4u2DXKdb0wFLMobFxGNxPT+VSOjc60fGvXzWHog==", "peer": true, "dependencies": { "joi": "^17.2.1" } }, - "node_modules/@react-native/assets": { - "version": "1.0.0", - "license": "MIT", - "peer": true + "node_modules/@react-native-community/cli/node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "peer": true, + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/@react-native/normalize-color": { - "version": "2.1.0", - "license": "MIT", + "node_modules/@react-native-community/cli/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "peer": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@react-native-community/cli/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "peer": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@react-native-community/cli/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "peer": true }, - "node_modules/@react-native/polyfills": { - "version": "2.0.0", - "license": "MIT", + "node_modules/@react-native/assets-registry": { + "version": "0.73.1", + "resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.73.1.tgz", + "integrity": "sha512-2FgAbU7uKM5SbbW9QptPPZx8N9Ke2L7bsHb+EhAanZjFZunA9PaYtyjUQ1s7HD+zDVqOQIvjkpXSv7Kejd2tqg==", + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@react-native/babel-plugin-codegen": { + "version": "0.73.3", + "resolved": "https://registry.npmjs.org/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.73.3.tgz", + "integrity": "sha512-+zQrDDbz6lB48LyzFHxNCgXDCBHH+oTRdXAjikRcBUdeG9St9ABbYFLtb799zSxLOrCqFVyXqhJR2vlgLLEbcg==", + "peer": true, + "dependencies": { + "@react-native/codegen": "0.73.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@react-native/babel-preset": { + "version": "0.73.20", + "resolved": "https://registry.npmjs.org/@react-native/babel-preset/-/babel-preset-0.73.20.tgz", + "integrity": "sha512-fU9NqkusbfFq71l4BWQfqqD/lLcLC0MZ++UYgieA3j8lIEppJTLVauv2RwtD2yltBkjebgYEC5Rwvt1l0MUBXw==", + "peer": true, + "dependencies": { + "@babel/core": "^7.20.0", + "@babel/plugin-proposal-async-generator-functions": "^7.0.0", + "@babel/plugin-proposal-class-properties": "^7.18.0", + "@babel/plugin-proposal-export-default-from": "^7.0.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.0", + "@babel/plugin-proposal-numeric-separator": "^7.0.0", + "@babel/plugin-proposal-object-rest-spread": "^7.20.0", + "@babel/plugin-proposal-optional-catch-binding": "^7.0.0", + "@babel/plugin-proposal-optional-chaining": "^7.20.0", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-export-default-from": "^7.0.0", + "@babel/plugin-syntax-flow": "^7.18.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.0.0", + "@babel/plugin-syntax-optional-chaining": "^7.0.0", + "@babel/plugin-transform-arrow-functions": "^7.0.0", + "@babel/plugin-transform-async-to-generator": "^7.20.0", + "@babel/plugin-transform-block-scoping": "^7.0.0", + "@babel/plugin-transform-classes": "^7.0.0", + "@babel/plugin-transform-computed-properties": "^7.0.0", + "@babel/plugin-transform-destructuring": "^7.20.0", + "@babel/plugin-transform-flow-strip-types": "^7.20.0", + "@babel/plugin-transform-function-name": "^7.0.0", + "@babel/plugin-transform-literals": "^7.0.0", + "@babel/plugin-transform-modules-commonjs": "^7.0.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.0.0", + "@babel/plugin-transform-parameters": "^7.0.0", + "@babel/plugin-transform-private-methods": "^7.22.5", + "@babel/plugin-transform-private-property-in-object": "^7.22.11", + "@babel/plugin-transform-react-display-name": "^7.0.0", + "@babel/plugin-transform-react-jsx": "^7.0.0", + "@babel/plugin-transform-react-jsx-self": "^7.0.0", + "@babel/plugin-transform-react-jsx-source": "^7.0.0", + "@babel/plugin-transform-runtime": "^7.0.0", + "@babel/plugin-transform-shorthand-properties": "^7.0.0", + "@babel/plugin-transform-spread": "^7.0.0", + "@babel/plugin-transform-sticky-regex": "^7.0.0", + "@babel/plugin-transform-typescript": "^7.5.0", + "@babel/plugin-transform-unicode-regex": "^7.0.0", + "@babel/template": "^7.0.0", + "@react-native/babel-plugin-codegen": "0.73.3", + "babel-plugin-transform-flow-enums": "^0.0.2", + "react-refresh": "^0.14.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@babel/core": "*" + } + }, + "node_modules/@react-native/codegen": { + "version": "0.73.2", + "resolved": "https://registry.npmjs.org/@react-native/codegen/-/codegen-0.73.2.tgz", + "integrity": "sha512-lfy8S7umhE3QLQG5ViC4wg5N1Z+E6RnaeIw8w1voroQsXXGPB72IBozh8dAHR3+ceTxIU0KX3A8OpJI8e1+HpQ==", + "peer": true, + "dependencies": { + "@babel/parser": "^7.20.0", + "flow-parser": "^0.206.0", + "glob": "^7.1.1", + "invariant": "^2.2.4", + "jscodeshift": "^0.14.0", + "mkdirp": "^0.5.1", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@babel/preset-env": "^7.1.6" + } + }, + "node_modules/@react-native/community-cli-plugin": { + "version": "0.73.14", + "resolved": "https://registry.npmjs.org/@react-native/community-cli-plugin/-/community-cli-plugin-0.73.14.tgz", + "integrity": "sha512-KzIwsTvAJrXPtwhGOSm+OcJH1B8TpY8cS4xxzu/e2qv3a2n4VLePHTPAfco1tmvekV8OHWvvD9JSIX7i2fB1gg==", + "peer": true, + "dependencies": { + "@react-native-community/cli-server-api": "12.3.2", + "@react-native-community/cli-tools": "12.3.2", + "@react-native/dev-middleware": "0.73.7", + "@react-native/metro-babel-transformer": "0.73.14", + "chalk": "^4.0.0", + "execa": "^5.1.1", + "metro": "^0.80.3", + "metro-config": "^0.80.3", + "metro-core": "^0.80.3", + "node-fetch": "^2.2.0", + "readline": "^1.3.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@react-native/debugger-frontend": { + "version": "0.73.3", + "resolved": "https://registry.npmjs.org/@react-native/debugger-frontend/-/debugger-frontend-0.73.3.tgz", + "integrity": "sha512-RgEKnWuoo54dh7gQhV7kvzKhXZEhpF9LlMdZolyhGxHsBqZ2gXdibfDlfcARFFifPIiaZ3lXuOVVa4ei+uPgTw==", + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@react-native/dev-middleware": { + "version": "0.73.7", + "resolved": "https://registry.npmjs.org/@react-native/dev-middleware/-/dev-middleware-0.73.7.tgz", + "integrity": "sha512-BZXpn+qKp/dNdr4+TkZxXDttfx8YobDh8MFHsMk9usouLm22pKgFIPkGBV0X8Do4LBkFNPGtrnsKkWk/yuUXKg==", + "peer": true, + "dependencies": { + "@isaacs/ttlcache": "^1.4.1", + "@react-native/debugger-frontend": "0.73.3", + "chrome-launcher": "^0.15.2", + "chromium-edge-launcher": "^1.0.0", + "connect": "^3.6.5", + "debug": "^2.2.0", + "node-fetch": "^2.2.0", + "open": "^7.0.3", + "serve-static": "^1.13.1", + "temp-dir": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@react-native/dev-middleware/node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "peer": true, + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@react-native/gradle-plugin": { + "version": "0.73.4", + "resolved": "https://registry.npmjs.org/@react-native/gradle-plugin/-/gradle-plugin-0.73.4.tgz", + "integrity": "sha512-PMDnbsZa+tD55Ug+W8CfqXiGoGneSSyrBZCMb5JfiB3AFST3Uj5e6lw8SgI/B6SKZF7lG0BhZ6YHZsRZ5MlXmg==", + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@react-native/js-polyfills": { + "version": "0.73.1", + "resolved": "https://registry.npmjs.org/@react-native/js-polyfills/-/js-polyfills-0.73.1.tgz", + "integrity": "sha512-ewMwGcumrilnF87H4jjrnvGZEaPFCAC4ebraEK+CurDDmwST/bIicI4hrOAv+0Z0F7DEK4O4H7r8q9vH7IbN4g==", + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@react-native/metro-babel-transformer": { + "version": "0.73.14", + "resolved": "https://registry.npmjs.org/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.73.14.tgz", + "integrity": "sha512-5wLeYw/lormpSqYfI9H/geZ/EtPmi+x5qLkEit15Q/70hkzYo/M+aWztUtbOITfgTEOP8d6ybROzoGsqgyZLcw==", + "peer": true, + "dependencies": { + "@babel/core": "^7.20.0", + "@react-native/babel-preset": "0.73.20", + "hermes-parser": "0.15.0", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@babel/core": "*" + } + }, + "node_modules/@react-native/normalize-colors": { + "version": "0.73.2", + "resolved": "https://registry.npmjs.org/@react-native/normalize-colors/-/normalize-colors-0.73.2.tgz", + "integrity": "sha512-bRBcb2T+I88aG74LMVHaKms2p/T8aQd8+BZ7LuuzXlRfog1bMWWn/C5i0HVuvW4RPtXQYgIlGiXVDy9Ir1So/w==", "peer": true }, + "node_modules/@react-native/virtualized-lists": { + "version": "0.73.4", + "resolved": "https://registry.npmjs.org/@react-native/virtualized-lists/-/virtualized-lists-0.73.4.tgz", + "integrity": "sha512-HpmLg1FrEiDtrtAbXiwCgXFYyloK/dOIPIuWW3fsqukwJEWAiTzm1nXGJ7xPU5XTHiWZ4sKup5Ebaj8z7iyWog==", + "peer": true, + "dependencies": { + "invariant": "^2.2.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "react-native": "*" + } + }, "node_modules/@remix-run/router": { "version": "1.6.1", "license": "MIT", @@ -11827,8 +12348,9 @@ "integrity": "sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==" }, "node_modules/@sideway/address": { - "version": "4.1.4", - "license": "BSD-3-Clause", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", + "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", "peer": true, "dependencies": { "@hapi/hoek": "^9.0.0" @@ -11836,32 +12358,37 @@ }, "node_modules/@sideway/formula": { "version": "3.0.1", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", + "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", "peer": true }, "node_modules/@sideway/pinpoint": { "version": "2.0.0", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", "peer": true }, "node_modules/@sinclair/typebox": { - "version": "0.25.24", - "license": "MIT" + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==" }, "node_modules/@sinonjs/commons": { - "version": "2.0.0", - "license": "BSD-3-Clause", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "peer": true, "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { - "version": "10.0.2", - "license": "BSD-3-Clause", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "peer": true, "dependencies": { - "@sinonjs/commons": "^2.0.0" + "@sinonjs/commons": "^3.0.0" } }, "node_modules/@surma/rollup-plugin-off-main-thread": { @@ -12101,14 +12628,15 @@ } }, "node_modules/@testing-library/dom": { - "version": "9.2.0", - "license": "MIT", + "version": "9.3.4", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.4.tgz", + "integrity": "sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==", "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", "@types/aria-query": "^5.0.1", - "aria-query": "^5.0.0", + "aria-query": "5.1.3", "chalk": "^4.1.0", "dom-accessibility-api": "^0.5.9", "lz-string": "^1.5.0", @@ -13379,7 +13907,8 @@ }, "node_modules/abort-controller": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", "peer": true, "dependencies": { "event-target-shim": "^5.0.0" @@ -13388,11 +13917,6 @@ "node": ">=6.5" } }, - "node_modules/absolute-path": { - "version": "0.0.0", - "license": "MIT", - "peer": true - }, "node_modules/accepts": { "version": "1.3.8", "license": "MIT", @@ -13595,7 +14119,8 @@ }, "node_modules/anser": { "version": "1.4.10", - "license": "MIT", + "resolved": "https://registry.npmjs.org/anser/-/anser-1.4.10.tgz", + "integrity": "sha512-hCv9AqTQ8ycjpSd3upOJd7vFwW1JaoYQ7tpham03GJ1ca8/65rqn0RpaWpItOAd6ylW9wAw6luXYPJIyPFVOww==", "peer": true }, "node_modules/ansi-escapes": { @@ -13614,7 +14139,8 @@ }, "node_modules/ansi-fragments": { "version": "0.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ansi-fragments/-/ansi-fragments-0.2.1.tgz", + "integrity": "sha512-DykbNHxuXQwUDRv5ibc2b0x7uw7wmwOGLBUd5RmaQ5z8Lhx19vwvKV+FAsM5rEA6dEcHxX+/Ad5s9eF2k2bB+w==", "peer": true, "dependencies": { "colorette": "^1.0.7", @@ -13671,7 +14197,8 @@ }, "node_modules/appdirsjs": { "version": "1.2.7", - "license": "MIT", + "resolved": "https://registry.npmjs.org/appdirsjs/-/appdirsjs-1.2.7.tgz", + "integrity": "sha512-Quji6+8kLBC3NnBeo14nPDq0+2jUs5s3/xEye+udFHumHhRk4M7aAMXp/PBJqkKYGuuyR9M/6Dq7d2AViiGmhw==", "peer": true }, "node_modules/arg": { @@ -13703,30 +14230,6 @@ "deep-equal": "^2.0.5" } }, - "node_modules/arr-diff": { - "version": "4.0.0", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-flatten": { - "version": "1.1.0", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-union": { - "version": "3.1.0", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/array-buffer-byte-length": { "version": "1.0.0", "license": "MIT", @@ -13769,14 +14272,6 @@ "node": ">=8" } }, - "node_modules/array-unique": { - "version": "0.3.2", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/array.prototype.flat": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", @@ -13845,17 +14340,10 @@ "version": "2.0.6", "license": "MIT" }, - "node_modules/assign-symbols": { - "version": "1.0.0", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ast-types": { - "version": "0.14.2", - "license": "MIT", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.15.2.tgz", + "integrity": "sha512-c27loCv9QkZinsa5ProX751khO9DJl/AcB5c2KNtA6NRvHKS0PgLfcftz72KVq504vB0Gku5s2kUZzDBvQWvHg==", "peer": true, "dependencies": { "tslib": "^2.0.1" @@ -13871,7 +14359,8 @@ }, "node_modules/astral-regex": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "peer": true, "engines": { "node": ">=4" @@ -13883,7 +14372,8 @@ }, "node_modules/async-limiter": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", "peer": true }, "node_modules/asynckit": { @@ -13899,17 +14389,6 @@ "node": ">= 4.0.0" } }, - "node_modules/atob": { - "version": "2.1.2", - "license": "(MIT OR Apache-2.0)", - "peer": true, - "bin": { - "atob": "bin/atob.js" - }, - "engines": { - "node": ">= 4.5.0" - } - }, "node_modules/autoprefixer": { "version": "10.4.14", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", @@ -13996,7 +14475,8 @@ }, "node_modules/babel-core": { "version": "7.0.0-bridge.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-7.0.0-bridge.0.tgz", + "integrity": "sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==", "peer": true, "peerDependencies": { "@babel/core": "^7.0.0-0" @@ -14188,10 +14668,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/babel-plugin-syntax-trailing-function-commas": { - "version": "7.0.0-beta.0", - "license": "MIT", - "peer": true + "node_modules/babel-plugin-transform-flow-enums": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-enums/-/babel-plugin-transform-flow-enums-0.0.2.tgz", + "integrity": "sha512-g4aaCrDDOsWjbm0PUUeVnkcVd6AKJsVc/MbnPhEotEpkeJQP6b8nzewohQi7+QS8UyPehOhGWn0nOwjvWpmMvQ==", + "peer": true, + "dependencies": { + "@babel/plugin-syntax-flow": "^7.12.1" + } }, "node_modules/babel-plugin-transform-react-remove-prop-types": { "version": "0.4.24", @@ -14220,43 +14704,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/babel-preset-fbjs": { - "version": "3.4.0", - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-proposal-object-rest-spread": "^7.0.0", - "@babel/plugin-syntax-class-properties": "^7.0.0", - "@babel/plugin-syntax-flow": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.0.0", - "@babel/plugin-syntax-object-rest-spread": "^7.0.0", - "@babel/plugin-transform-arrow-functions": "^7.0.0", - "@babel/plugin-transform-block-scoped-functions": "^7.0.0", - "@babel/plugin-transform-block-scoping": "^7.0.0", - "@babel/plugin-transform-classes": "^7.0.0", - "@babel/plugin-transform-computed-properties": "^7.0.0", - "@babel/plugin-transform-destructuring": "^7.0.0", - "@babel/plugin-transform-flow-strip-types": "^7.0.0", - "@babel/plugin-transform-for-of": "^7.0.0", - "@babel/plugin-transform-function-name": "^7.0.0", - "@babel/plugin-transform-literals": "^7.0.0", - "@babel/plugin-transform-member-expression-literals": "^7.0.0", - "@babel/plugin-transform-modules-commonjs": "^7.0.0", - "@babel/plugin-transform-object-super": "^7.0.0", - "@babel/plugin-transform-parameters": "^7.0.0", - "@babel/plugin-transform-property-literals": "^7.0.0", - "@babel/plugin-transform-react-display-name": "^7.0.0", - "@babel/plugin-transform-react-jsx": "^7.0.0", - "@babel/plugin-transform-shorthand-properties": "^7.0.0", - "@babel/plugin-transform-spread": "^7.0.0", - "@babel/plugin-transform-template-literals": "^7.0.0", - "babel-plugin-syntax-trailing-function-commas": "^7.0.0-beta.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, "node_modules/babel-preset-jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz", @@ -14299,38 +14746,10 @@ "version": "1.0.2", "license": "MIT" }, - "node_modules/base": { - "version": "0.11.2", - "license": "MIT", - "peer": true, - "dependencies": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/base-64": { "version": "1.0.0", "license": "MIT" }, - "node_modules/base/node_modules/define-property": { - "version": "1.0.0", - "license": "MIT", - "peer": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/base64-js": { "version": "1.5.1", "funding": [ @@ -14386,7 +14805,8 @@ }, "node_modules/bl": { "version": "4.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "peer": true, "dependencies": { "buffer": "^5.5.0", @@ -14396,6 +14816,8 @@ }, "node_modules/bl/node_modules/buffer": { "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "funding": [ { "type": "github", @@ -14410,7 +14832,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "peer": true, "dependencies": { "base64-js": "^1.3.1", @@ -14612,25 +15033,6 @@ "node": ">= 0.8" } }, - "node_modules/cache-base": { - "version": "1.0.1", - "license": "MIT", - "peer": true, - "dependencies": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/call-bind": { "version": "1.0.2", "license": "MIT", @@ -14644,7 +15046,8 @@ }, "node_modules/caller-callsite": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ==", "peer": true, "dependencies": { "callsites": "^2.0.0" @@ -14655,7 +15058,8 @@ }, "node_modules/caller-callsite/node_modules/callsites": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ==", "peer": true, "engines": { "node": ">=4" @@ -14663,7 +15067,8 @@ }, "node_modules/caller-path": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A==", "peer": true, "dependencies": { "caller-callsite": "^2.0.0" @@ -14876,122 +15281,76 @@ "node": ">= 6" } }, - "node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "engines": { - "node": ">=6.0" - } - }, - "node_modules/ci-info": { - "version": "3.8.0", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==" - }, - "node_modules/class-utils": { - "version": "0.3.6", - "license": "MIT", - "peer": true, - "dependencies": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/define-property": { - "version": "0.2.5", - "license": "MIT", - "peer": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "license": "MIT", - "peer": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", + "node_modules/chrome-launcher": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.15.2.tgz", + "integrity": "sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ==", "peer": true, "dependencies": { - "is-buffer": "^1.1.5" + "@types/node": "*", + "escape-string-regexp": "^4.0.0", + "is-wsl": "^2.2.0", + "lighthouse-logger": "^1.0.0" + }, + "bin": { + "print-chrome-path": "bin/print-chrome-path.js" }, "engines": { - "node": ">=0.10.0" + "node": ">=12.13.0" } }, - "node_modules/class-utils/node_modules/is-data-descriptor": { - "version": "0.1.4", - "license": "MIT", - "peer": true, - "dependencies": { - "kind-of": "^3.0.2" - }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", "engines": { - "node": ">=0.10.0" + "node": ">=6.0" } }, - "node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", + "node_modules/chromium-edge-launcher": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/chromium-edge-launcher/-/chromium-edge-launcher-1.0.0.tgz", + "integrity": "sha512-pgtgjNKZ7i5U++1g1PWv75umkHvhVTDOQIZ+sjeUX9483S7Y6MUvO0lrd7ShGlQlFHMN4SwKTCq/X8hWrbv2KA==", "peer": true, "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" + "@types/node": "*", + "escape-string-regexp": "^4.0.0", + "is-wsl": "^2.2.0", + "lighthouse-logger": "^1.0.0", + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" } }, - "node_modules/class-utils/node_modules/is-descriptor": { - "version": "0.1.6", - "license": "MIT", + "node_modules/chromium-edge-launcher/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "peer": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "bin": { + "mkdirp": "bin/cmd.js" }, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, - "node_modules/class-utils/node_modules/kind-of": { - "version": "5.1.0", + "node_modules/ci-info": { + "version": "3.8.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], "license": "MIT", - "peer": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, + "node_modules/cjs-module-lexer": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", + "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==" + }, "node_modules/classnames": { "version": "2.3.1", "license": "MIT" @@ -15017,7 +15376,8 @@ }, "node_modules/cli-cursor": { "version": "3.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "peer": true, "dependencies": { "restore-cursor": "^3.1.0" @@ -15027,8 +15387,9 @@ } }, "node_modules/cli-spinners": { - "version": "2.9.0", - "license": "MIT", + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", "peer": true, "engines": { "node": ">=6" @@ -15058,7 +15419,8 @@ }, "node_modules/clone": { "version": "1.0.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", "peer": true, "engines": { "node": ">=0.8" @@ -15066,7 +15428,8 @@ }, "node_modules/clone-deep": { "version": "4.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", "peer": true, "dependencies": { "is-plain-object": "^2.0.4", @@ -15175,18 +15538,6 @@ "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==" }, - "node_modules/collection-visit": { - "version": "1.0.0", - "license": "MIT", - "peer": true, - "dependencies": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/color-convert": { "version": "2.0.1", "license": "MIT", @@ -15213,7 +15564,8 @@ }, "node_modules/colorette": { "version": "1.4.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", "peer": true }, "node_modules/combined-stream": { @@ -15229,12 +15581,14 @@ }, "node_modules/command-exists": { "version": "1.2.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", "peer": true }, "node_modules/commander": { "version": "9.5.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", "peer": true, "engines": { "node": "^12.20.0 || >=14" @@ -15257,11 +15611,6 @@ "version": "1.0.1", "license": "MIT" }, - "node_modules/component-emitter": { - "version": "1.3.0", - "license": "MIT", - "peer": true - }, "node_modules/compressible": { "version": "2.0.18", "license": "MIT", @@ -15304,7 +15653,8 @@ }, "node_modules/connect": { "version": "3.7.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", "peer": true, "dependencies": { "debug": "2.6.9", @@ -15387,14 +15737,6 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, - "node_modules/copy-descriptor": { - "version": "0.1.1", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/copy-to-clipboard": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz", @@ -15454,26 +15796,30 @@ } }, "node_modules/cross-spawn": { - "version": "6.0.5", - "license": "MIT", - "peer": true, + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": ">=4.8" + "node": ">= 8" } }, - "node_modules/cross-spawn/node_modules/semver": { - "version": "5.7.1", - "license": "ISC", - "peer": true, + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, "bin": { - "semver": "bin/semver" + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, "node_modules/crypto-random-string": { @@ -15970,8 +16316,9 @@ } }, "node_modules/dayjs": { - "version": "1.11.7", - "license": "MIT", + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", + "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==", "peer": true }, "node_modules/debounce": { @@ -15997,14 +16344,6 @@ "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" }, - "node_modules/decode-uri-component": { - "version": "0.2.2", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10" - } - }, "node_modules/dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -16060,107 +16399,10 @@ "node": ">= 10" } }, - "node_modules/default-gateway/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/default-gateway/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/default-gateway/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-gateway/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/default-gateway/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/default-gateway/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/default-gateway/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "engines": { - "node": ">=8" - } - }, - "node_modules/default-gateway/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/defaults": { "version": "1.0.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", "peer": true, "dependencies": { "clone": "^1.0.2" @@ -16191,18 +16433,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/define-property": { - "version": "2.0.2", - "license": "MIT", - "peer": true, - "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -16213,7 +16443,8 @@ }, "node_modules/denodeify": { "version": "1.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz", + "integrity": "sha512-KNTihKNmQENUZeKu5fzfpzRqR5S2VMp4gl9RFHiWzj9DfvYQPMJ6XHKNaQxaGCXwPk6y9yme3aUoaiAe+KX+vg==", "peer": true }, "node_modules/depd": { @@ -16224,13 +16455,17 @@ } }, "node_modules/deprecated-react-native-prop-types": { - "version": "3.0.1", - "license": "MIT", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-5.0.0.tgz", + "integrity": "sha512-cIK8KYiiGVOFsKdPMmm1L3tA/Gl+JopXL6F5+C7x39MyPsQYnP57Im/D6bNUzcborD7fcMwiwZqcBdBXXZucYQ==", "peer": true, "dependencies": { - "@react-native/normalize-color": "*", - "invariant": "*", - "prop-types": "*" + "@react-native/normalize-colors": "^0.73.0", + "invariant": "^2.2.4", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=18" } }, "node_modules/dequal": { @@ -16524,14 +16759,6 @@ "node": ">= 0.8" } }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "license": "MIT", - "peer": true, - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/enhanced-resolve": { "version": "5.14.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.0.tgz", @@ -16552,8 +16779,9 @@ } }, "node_modules/envinfo": { - "version": "7.8.1", - "license": "MIT", + "version": "7.11.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.11.1.tgz", + "integrity": "sha512-8PiZgZNIB4q/Lw4AhOvAfB/ityHAd2bli3lESSWmWSzSsl5dKpy5N1d1Rfkd2teq/g9xN90lc6o98DOjMeYHpg==", "peer": true, "bin": { "envinfo": "dist/cli.js" @@ -16578,7 +16806,8 @@ }, "node_modules/errorhandler": { "version": "1.5.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.5.1.tgz", + "integrity": "sha512-rcOwbfvP1WTViVoUjcfZicVzjhjTuhSMntHh6mW3IrEiyE6mJyXvsToJUJGlGlw/2xU9P5whlWNGlIDVeCiT4A==", "peer": true, "dependencies": { "accepts": "~1.3.7", @@ -17265,19 +17494,6 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, - "node_modules/eslint/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/eslint/node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -17375,37 +17591,10 @@ "p-limit": "^3.0.2" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint/node_modules/strip-ansi": { @@ -17430,20 +17619,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/espree": { "version": "9.5.2", "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", @@ -17522,7 +17697,8 @@ }, "node_modules/event-target-shim": { "version": "5.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", "peer": true, "engines": { "node": ">=6" @@ -17541,31 +17717,25 @@ } }, "node_modules/execa": { - "version": "1.0.0", - "license": "MIT", - "peer": true, + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dependencies": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" }, "engines": { - "node": ">=6" - } - }, - "node_modules/execa/node_modules/get-stream": { - "version": "4.1.0", - "license": "MIT", - "peer": true, - "dependencies": { - "pump": "^3.0.0" + "node": ">=10" }, - "engines": { - "node": ">=6" + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, "node_modules/exit": { @@ -17576,118 +17746,6 @@ "node": ">= 0.8.0" } }, - "node_modules/expand-brackets": { - "version": "2.1.4", - "license": "MIT", - "peer": true, - "dependencies": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/define-property": { - "version": "0.2.5", - "license": "MIT", - "peer": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/extend-shallow": { - "version": "2.0.1", - "license": "MIT", - "peer": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "license": "MIT", - "peer": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "peer": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-data-descriptor": { - "version": "0.1.4", - "license": "MIT", - "peer": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "peer": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-descriptor": { - "version": "0.1.6", - "license": "MIT", - "peer": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-extendable": { - "version": "0.1.1", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/kind-of": { - "version": "5.1.0", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/expect": { "version": "29.5.0", "license": "MIT", @@ -17811,66 +17869,6 @@ "node": ">= 0.8" } }, - "node_modules/extend-shallow": { - "version": "3.0.2", - "license": "MIT", - "peer": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob": { - "version": "2.0.4", - "license": "MIT", - "peer": true, - "dependencies": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/define-property": { - "version": "1.0.0", - "license": "MIT", - "peer": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/extend-shallow": { - "version": "2.0.1", - "license": "MIT", - "peer": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/is-extendable": { - "version": "0.1.1", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/fast-base64-decode": { "version": "1.0.0", "license": "MIT" @@ -18054,7 +18052,8 @@ }, "node_modules/finalhandler": { "version": "1.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", "peer": true, "dependencies": { "debug": "2.6.9", @@ -18071,7 +18070,8 @@ }, "node_modules/find-cache-dir": { "version": "2.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", "peer": true, "dependencies": { "commondir": "^1.0.1", @@ -18115,9 +18115,16 @@ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==" }, + "node_modules/flow-enums-runtime": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/flow-enums-runtime/-/flow-enums-runtime-0.0.6.tgz", + "integrity": "sha512-3PYnM29RFXwvAN6Pc/scUfkI7RwhQ/xqyLUyPNlXUp9S40zI8nup9tUSrTLSVnWGBN38FNiGWbwZOB6uR4OGdw==", + "peer": true + }, "node_modules/flow-parser": { - "version": "0.185.2", - "license": "MIT", + "version": "0.206.0", + "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.206.0.tgz", + "integrity": "sha512-HVzoK3r6Vsg+lKvlIZzaWNBVai+FXTX1wdYhz/wVlH13tb/gOdLXmlTqy6odmTBhT5UoWUbq0k8263Qhr9d88w==", "peer": true, "engines": { "node": ">=0.4.0" @@ -18159,14 +18166,6 @@ "is-callable": "^1.1.3" } }, - "node_modules/for-in": { - "version": "1.0.2", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/fork-ts-checker-webpack-plugin": { "version": "6.5.3", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.3.tgz", @@ -18382,17 +18381,6 @@ "url": "https://www.patreon.com/infusion" } }, - "node_modules/fragment-cache": { - "version": "0.2.1", - "license": "MIT", - "peer": true, - "dependencies": { - "map-cache": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/framer-motion": { "version": "10.12.10", "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-10.12.10.tgz", @@ -18453,7 +18441,8 @@ }, "node_modules/fs-extra": { "version": "8.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "peer": true, "dependencies": { "graceful-fs": "^4.2.0", @@ -18623,14 +18612,6 @@ "url": "https://github.com/wojtekmaj/get-user-locale?sponsor=1" } }, - "node_modules/get-value": { - "version": "2.0.6", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/gl-matrix": { "version": "3.4.3", "license": "MIT" @@ -18842,75 +18823,17 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-value": { - "version": "1.0.0", - "license": "MIT", - "peer": true, - "dependencies": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values": { - "version": "1.0.0", - "license": "MIT", - "peer": true, - "dependencies": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/is-number": { - "version": "3.0.0", - "license": "MIT", - "peer": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "peer": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/kind-of": { - "version": "4.0.0", + "node_modules/has-tostringtag": { + "version": "1.0.0", "license": "MIT", - "peer": true, "dependencies": { - "is-buffer": "^1.1.5" + "has-symbols": "^1.0.2" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/hat": { @@ -18934,21 +18857,24 @@ } }, "node_modules/hermes-estree": { - "version": "0.8.0", - "license": "MIT", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.15.0.tgz", + "integrity": "sha512-lLYvAd+6BnOqWdnNbP/Q8xfl8LOGw4wVjfrNd9Gt8eoFzhNBRVD95n4l2ksfMVOoxuVyegs85g83KS9QOsxbVQ==", "peer": true }, "node_modules/hermes-parser": { - "version": "0.8.0", - "license": "MIT", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.15.0.tgz", + "integrity": "sha512-Q1uks5rjZlE9RjMMjSUCkGrEIPI5pKJILeCtK1VmTj7U4pf3wVPoo+cxfu+s4cBAPy2JzikIIdCZgBoR6x7U1Q==", "peer": true, "dependencies": { - "hermes-estree": "0.8.0" + "hermes-estree": "0.15.0" } }, "node_modules/hermes-profile-transformer": { "version": "0.0.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/hermes-profile-transformer/-/hermes-profile-transformer-0.0.6.tgz", + "integrity": "sha512-cnN7bQUm65UWOy6cbGcCcZ3rpwW8Q/j4OP5aWRhEry4Z2t2aR1cjrbp0BS+KiBN0smvP1caBgAuxutvyvJILzQ==", "peer": true, "dependencies": { "source-map": "^0.7.3" @@ -19315,14 +19241,18 @@ } }, "node_modules/image-size": { - "version": "0.6.3", - "license": "MIT", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.1.1.tgz", + "integrity": "sha512-541xKlUw6jr/6gGuk92F+mYM5zaFAc5ahphvkqvNe2bQ6gVBkd6bfrmVJ2t4KDAfikAYZyIqTnktX3i6/aQDrQ==", "peer": true, + "dependencies": { + "queue": "6.0.2" + }, "bin": { "image-size": "bin/image-size.js" }, "engines": { - "node": ">=4.0" + "node": ">=16.x" } }, "node_modules/immer": { @@ -19437,7 +19367,8 @@ }, "node_modules/ip": { "version": "1.1.8", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", + "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==", "peer": true }, "node_modules/ipaddr.js": { @@ -19448,17 +19379,6 @@ "node": ">= 10" } }, - "node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "license": "MIT", - "peer": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-arguments": { "version": "1.1.1", "license": "MIT", @@ -19524,11 +19444,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-buffer": { - "version": "1.1.6", - "license": "MIT", - "peer": true - }, "node_modules/is-callable": { "version": "1.2.7", "license": "MIT", @@ -19549,17 +19464,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-data-descriptor": { - "version": "1.0.0", - "license": "MIT", - "peer": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-date-object": { "version": "1.0.5", "license": "MIT", @@ -19573,22 +19477,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-descriptor": { - "version": "1.0.2", - "license": "MIT", - "peer": true, - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-directory": { "version": "0.3.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw==", "peer": true, "engines": { "node": ">=0.10.0" @@ -19608,17 +19500,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-extendable": { - "version": "1.0.1", - "license": "MIT", - "peer": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -19629,7 +19510,8 @@ }, "node_modules/is-fullwidth-code-point": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", "peer": true, "engines": { "node": ">=4" @@ -19656,7 +19538,8 @@ }, "node_modules/is-interactive": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", "peer": true, "engines": { "node": ">=8" @@ -19734,7 +19617,8 @@ }, "node_modules/is-plain-object": { "version": "2.0.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "peer": true, "dependencies": { "isobject": "^3.0.1" @@ -19796,11 +19680,14 @@ } }, "node_modules/is-stream": { - "version": "1.1.0", - "license": "MIT", - "peer": true, + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-string": { @@ -19853,7 +19740,8 @@ }, "node_modules/is-unicode-supported": { "version": "0.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "peer": true, "engines": { "node": ">=10" @@ -19891,20 +19779,15 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-wsl": { - "version": "1.1.0", - "license": "MIT", - "peer": true, + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/isarray": { @@ -19917,7 +19800,8 @@ }, "node_modules/isobject": { "version": "3.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "peer": true, "engines": { "node": ">=0.10.0" @@ -20112,109 +19996,11 @@ "@types/yargs-parser": "*" } }, - "node_modules/jest-changed-files/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/jest-changed-files/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/jest-changed-files/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-changed-files/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-changed-files/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-changed-files/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-changed-files/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-changed-files/node_modules/throat": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.2.tgz", "integrity": "sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ==" }, - "node_modules/jest-changed-files/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/jest-circus": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz", @@ -20981,24 +20767,26 @@ } }, "node_modules/jest-environment-node": { - "version": "29.5.0", - "license": "MIT", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "peer": true, "dependencies": { - "@jest/environment": "^29.5.0", - "@jest/fake-timers": "^29.5.0", - "@jest/types": "^29.5.0", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.5.0", - "jest-util": "^29.5.0" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-get-type": { - "version": "29.4.3", - "license": "MIT", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -21333,16 +21121,17 @@ "license": "MIT" }, "node_modules/jest-message-util": { - "version": "29.5.0", - "license": "MIT", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.5.0", + "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.5.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -21352,7 +21141,8 @@ }, "node_modules/jest-message-util/node_modules/ansi-styles": { "version": "5.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "engines": { "node": ">=10" }, @@ -21361,10 +21151,11 @@ } }, "node_modules/jest-message-util/node_modules/pretty-format": { - "version": "29.5.0", - "license": "MIT", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dependencies": { - "@jest/schemas": "^29.4.3", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -21374,16 +21165,18 @@ }, "node_modules/jest-message-util/node_modules/react-is": { "version": "18.2.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" }, "node_modules/jest-mock": { - "version": "29.5.0", - "license": "MIT", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "peer": true, "dependencies": { - "@jest/types": "^29.5.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-util": "^29.5.0" + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -21792,69 +21585,23 @@ "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/jest-runtime/node_modules/@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/jest-runtime/node_modules/@types/yargs": { - "version": "16.0.5", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.5.tgz", - "integrity": "sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-runtime/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/jest-runtime/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "type-detect": "4.0.8" } }, - "node_modules/jest-runtime/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node_modules/jest-runtime/node_modules/@sinonjs/fake-timers": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", + "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", + "dependencies": { + "@sinonjs/commons": "^1.7.0" + } + }, + "node_modules/jest-runtime/node_modules/@types/yargs": { + "version": "16.0.5", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.5.tgz", + "integrity": "sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==", + "dependencies": { + "@types/yargs-parser": "*" } }, "node_modules/jest-runtime/node_modules/jest-message-util": { @@ -21904,58 +21651,6 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-runtime/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runtime/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runtime/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runtime/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runtime/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/jest-serializer": { "version": "27.5.1", "license": "MIT", @@ -22146,10 +21841,11 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/jest-util": { - "version": "29.5.0", - "license": "MIT", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dependencies": { - "@jest/types": "^29.5.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -22161,47 +21857,38 @@ } }, "node_modules/jest-validate": { - "version": "26.6.2", - "license": "MIT", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "peer": true, "dependencies": { - "@jest/types": "^26.6.2", - "camelcase": "^6.0.0", + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^26.3.0", + "jest-get-type": "^29.6.3", "leven": "^3.1.0", - "pretty-format": "^26.6.2" + "pretty-format": "^29.7.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate/node_modules/@jest/types": { - "version": "26.6.2", - "license": "MIT", + "node_modules/jest-validate/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "peer": true, - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - }, "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/jest-validate/node_modules/@types/yargs": { - "version": "15.0.15", - "license": "MIT", - "peer": true, - "dependencies": { - "@types/yargs-parser": "*" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/jest-validate/node_modules/camelcase": { "version": "6.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "peer": true, "engines": { "node": ">=10" @@ -22210,31 +21897,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-validate/node_modules/jest-get-type": { - "version": "26.3.0", - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 10.14.2" - } - }, "node_modules/jest-validate/node_modules/pretty-format": { - "version": "26.6.2", - "license": "MIT", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "peer": true, "dependencies": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": ">= 10" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-validate/node_modules/react-is": { - "version": "17.0.2", - "license": "MIT", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "peer": true }, "node_modules/jest-watch-typeahead": { @@ -22609,13 +22289,14 @@ } }, "node_modules/joi": { - "version": "17.9.2", - "license": "BSD-3-Clause", + "version": "17.12.1", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.12.1.tgz", + "integrity": "sha512-vtxmq+Lsc5SlfqotnfVjlViWfOL9nt/avKNbKYizwf6gsCfq9NYY/ceYRMFD8XDdrjJ9abJyScWmhmIiy+XRtQ==", "peer": true, "dependencies": { - "@hapi/hoek": "^9.0.0", - "@hapi/topo": "^5.0.0", - "@sideway/address": "^4.1.3", + "@hapi/hoek": "^9.3.0", + "@hapi/topo": "^5.1.0", + "@sideway/address": "^4.1.5", "@sideway/formula": "^3.0.1", "@sideway/pinpoint": "^2.0.0" } @@ -22629,203 +22310,68 @@ "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsc-android": { - "version": "250231.0.0", - "license": "BSD-2-Clause", - "peer": true - }, - "node_modules/jscodeshift": { - "version": "0.13.1", - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/core": "^7.13.16", - "@babel/parser": "^7.13.16", - "@babel/plugin-proposal-class-properties": "^7.13.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.13.8", - "@babel/plugin-proposal-optional-chaining": "^7.13.12", - "@babel/plugin-transform-modules-commonjs": "^7.13.8", - "@babel/preset-flow": "^7.13.13", - "@babel/preset-typescript": "^7.13.0", - "@babel/register": "^7.13.16", - "babel-core": "^7.0.0-bridge.0", - "chalk": "^4.1.2", - "flow-parser": "0.*", - "graceful-fs": "^4.2.4", - "micromatch": "^3.1.10", - "neo-async": "^2.5.0", - "node-dir": "^0.1.17", - "recast": "^0.20.4", - "temp": "^0.8.4", - "write-file-atomic": "^2.3.0" - }, - "bin": { - "jscodeshift": "bin/jscodeshift.js" - }, - "peerDependencies": { - "@babel/preset-env": "^7.1.6" - } - }, - "node_modules/jscodeshift/node_modules/braces": { - "version": "2.3.2", - "license": "MIT", - "peer": true, - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jscodeshift/node_modules/braces/node_modules/extend-shallow": { - "version": "2.0.1", - "license": "MIT", - "peer": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jscodeshift/node_modules/fill-range": { - "version": "4.0.0", - "license": "MIT", - "peer": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jscodeshift/node_modules/fill-range/node_modules/extend-shallow": { - "version": "2.0.1", - "license": "MIT", - "peer": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jscodeshift/node_modules/is-extendable": { - "version": "0.1.1", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jscodeshift/node_modules/is-number": { - "version": "3.0.0", - "license": "MIT", - "peer": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jscodeshift/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "peer": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jscodeshift/node_modules/micromatch": { - "version": "3.1.10", - "license": "MIT", - "peer": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jscodeshift/node_modules/rimraf": { - "version": "2.6.3", - "license": "ISC", - "peer": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" } }, - "node_modules/jscodeshift/node_modules/temp": { - "version": "0.8.4", + "node_modules/js-tokens": { + "version": "4.0.0", + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "3.14.1", "license": "MIT", - "peer": true, "dependencies": { - "rimraf": "~2.6.2" + "argparse": "^1.0.7", + "esprima": "^4.0.0" }, - "engines": { - "node": ">=6.0.0" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jscodeshift/node_modules/to-regex-range": { - "version": "2.1.1", - "license": "MIT", + "node_modules/jsc-android": { + "version": "250231.0.0", + "resolved": "https://registry.npmjs.org/jsc-android/-/jsc-android-250231.0.0.tgz", + "integrity": "sha512-rS46PvsjYmdmuz1OAWXY/1kCYG7pnf1TBqeTiOJr1iDz7s5DLxxC9n/ZMknLDxzYzNVfI7R95MH10emSSG1Wuw==", + "peer": true + }, + "node_modules/jsc-safe-url": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/jsc-safe-url/-/jsc-safe-url-0.2.4.tgz", + "integrity": "sha512-0wM3YBWtYePOjfyXQH5MWQ8H7sdk5EXSwZvmSLKk2RboVQ2Bu239jycHDz5J/8Blf3K0Qnoy2b6xD+z10MFB+Q==", + "peer": true + }, + "node_modules/jscodeshift": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/jscodeshift/-/jscodeshift-0.14.0.tgz", + "integrity": "sha512-7eCC1knD7bLUPuSCwXsMZUH51O8jIcoVyKtI6P0XM0IVzlGjckPy3FIwQlorzbN0Sg79oK+RlohN32Mqf/lrYA==", "peer": true, "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "@babel/core": "^7.13.16", + "@babel/parser": "^7.13.16", + "@babel/plugin-proposal-class-properties": "^7.13.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.13.8", + "@babel/plugin-proposal-optional-chaining": "^7.13.12", + "@babel/plugin-transform-modules-commonjs": "^7.13.8", + "@babel/preset-flow": "^7.13.13", + "@babel/preset-typescript": "^7.13.0", + "@babel/register": "^7.13.16", + "babel-core": "^7.0.0-bridge.0", + "chalk": "^4.1.2", + "flow-parser": "0.*", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.4", + "neo-async": "^2.5.0", + "node-dir": "^0.1.17", + "recast": "^0.21.0", + "temp": "^0.8.4", + "write-file-atomic": "^2.3.0" }, - "engines": { - "node": ">=0.10.0" + "bin": { + "jscodeshift": "bin/jscodeshift.js" + }, + "peerDependencies": { + "@babel/preset-env": "^7.1.6" } }, "node_modules/jsdom": { @@ -22929,7 +22475,8 @@ }, "node_modules/json-parse-better-errors": { "version": "1.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "peer": true }, "node_modules/json-parse-even-better-errors": { @@ -22967,7 +22514,8 @@ }, "node_modules/jsonfile": { "version": "4.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "peer": true, "optionalDependencies": { "graceful-fs": "^4.1.6" @@ -23060,6 +22608,16 @@ "node": ">= 0.8.0" } }, + "node_modules/lighthouse-logger": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz", + "integrity": "sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g==", + "peer": true, + "dependencies": { + "debug": "^2.6.9", + "marky": "^1.2.2" + } + }, "node_modules/lilconfig": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", @@ -23142,7 +22700,8 @@ }, "node_modules/lodash.throttle": { "version": "4.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", + "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==", "peer": true }, "node_modules/lodash.uniq": { @@ -23152,7 +22711,8 @@ }, "node_modules/log-symbols": { "version": "4.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "peer": true, "dependencies": { "chalk": "^4.1.0", @@ -23167,7 +22727,8 @@ }, "node_modules/logkitty": { "version": "0.7.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/logkitty/-/logkitty-0.7.1.tgz", + "integrity": "sha512-/3ER20CTTbahrCrpYfPn7Xavv9diBROZpoXGVZDWMw4b/X4uuUwAC0ki85tgsdMRONURyIJbcOvS94QsUBYPbQ==", "peer": true, "dependencies": { "ansi-fragments": "^0.2.1", @@ -23219,7 +22780,8 @@ }, "node_modules/make-dir": { "version": "2.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "peer": true, "dependencies": { "pify": "^4.0.1", @@ -23230,8 +22792,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "5.7.1", - "license": "ISC", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "peer": true, "bin": { "semver": "bin/semver" @@ -23251,14 +22814,6 @@ "tmpl": "1.0.5" } }, - "node_modules/map-cache": { - "version": "0.2.2", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/map-obj": { "version": "4.3.0", "license": "MIT", @@ -23269,17 +22824,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/map-visit": { - "version": "1.0.0", - "license": "MIT", - "peer": true, - "dependencies": { - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/mapbox-gl": { "version": "1.13.1", "license": "SEE LICENSE IN LICENSE.txt", @@ -23399,6 +22943,12 @@ "version": "0.0.1", "license": "BSD-2-Clause" }, + "node_modules/marky": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/marky/-/marky-1.2.5.tgz", + "integrity": "sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q==", + "peer": true + }, "node_modules/mdn-data": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", @@ -23425,7 +22975,8 @@ }, "node_modules/memoize-one": { "version": "5.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz", + "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==", "peer": true }, "node_modules/merge-descriptors": { @@ -23454,8 +23005,9 @@ } }, "node_modules/metro": { - "version": "0.73.9", - "license": "MIT", + "version": "0.80.5", + "resolved": "https://registry.npmjs.org/metro/-/metro-0.80.5.tgz", + "integrity": "sha512-OE/CGbOgbi8BlTN1QqJgKOBaC27dS0JBQw473JcivrpgVnqIsluROA7AavEaTVUrB9wPUZvoNVDROn5uiM2jfw==", "peer": true, "dependencies": { "@babel/code-frame": "^7.0.0", @@ -23465,9 +23017,7 @@ "@babel/template": "^7.0.0", "@babel/traverse": "^7.20.0", "@babel/types": "^7.20.0", - "absolute-path": "^0.0.0", "accepts": "^1.3.7", - "async": "^3.2.2", "chalk": "^4.0.0", "ci-info": "^2.0.0", "connect": "^3.6.5", @@ -23475,28 +23025,24 @@ "denodeify": "^1.2.1", "error-stack-parser": "^2.0.6", "graceful-fs": "^4.2.4", - "hermes-parser": "0.8.0", - "image-size": "^0.6.0", + "hermes-parser": "0.18.2", + "image-size": "^1.0.2", "invariant": "^2.2.4", - "jest-worker": "^27.2.0", + "jest-worker": "^29.6.3", + "jsc-safe-url": "^0.2.2", "lodash.throttle": "^4.1.1", - "metro-babel-transformer": "0.73.9", - "metro-cache": "0.73.9", - "metro-cache-key": "0.73.9", - "metro-config": "0.73.9", - "metro-core": "0.73.9", - "metro-file-map": "0.73.9", - "metro-hermes-compiler": "0.73.9", - "metro-inspector-proxy": "0.73.9", - "metro-minify-terser": "0.73.9", - "metro-minify-uglify": "0.73.9", - "metro-react-native-babel-preset": "0.73.9", - "metro-resolver": "0.73.9", - "metro-runtime": "0.73.9", - "metro-source-map": "0.73.9", - "metro-symbolicate": "0.73.9", - "metro-transform-plugins": "0.73.9", - "metro-transform-worker": "0.73.9", + "metro-babel-transformer": "0.80.5", + "metro-cache": "0.80.5", + "metro-cache-key": "0.80.5", + "metro-config": "0.80.5", + "metro-core": "0.80.5", + "metro-file-map": "0.80.5", + "metro-resolver": "0.80.5", + "metro-runtime": "0.80.5", + "metro-source-map": "0.80.5", + "metro-symbolicate": "0.80.5", + "metro-transform-plugins": "0.80.5", + "metro-transform-worker": "0.80.5", "mime-types": "^2.1.27", "node-fetch": "^2.2.0", "nullthrows": "^1.1.1", @@ -23504,56 +23050,90 @@ "serialize-error": "^2.1.0", "source-map": "^0.5.6", "strip-ansi": "^6.0.0", - "temp": "0.8.3", "throat": "^5.0.0", "ws": "^7.5.1", - "yargs": "^17.5.1" + "yargs": "^17.6.2" }, "bin": { "metro": "src/cli.js" + }, + "engines": { + "node": ">=18" } }, "node_modules/metro-babel-transformer": { - "version": "0.73.9", - "license": "MIT", + "version": "0.80.5", + "resolved": "https://registry.npmjs.org/metro-babel-transformer/-/metro-babel-transformer-0.80.5.tgz", + "integrity": "sha512-sxH6hcWCorhTbk4kaShCWsadzu99WBL4Nvq4m/sDTbp32//iGuxtAnUK+ZV+6IEygr2u9Z0/4XoZ8Sbcl71MpA==", "peer": true, "dependencies": { "@babel/core": "^7.20.0", - "hermes-parser": "0.8.0", - "metro-source-map": "0.73.9", + "hermes-parser": "0.18.2", "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/metro-babel-transformer/node_modules/hermes-estree": { + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.18.2.tgz", + "integrity": "sha512-KoLsoWXJ5o81nit1wSyEZnWUGy9cBna9iYMZBR7skKh7okYAYKqQ9/OczwpMHn/cH0hKDyblulGsJ7FknlfVxQ==", + "peer": true + }, + "node_modules/metro-babel-transformer/node_modules/hermes-parser": { + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.18.2.tgz", + "integrity": "sha512-1eQfvib+VPpgBZ2zYKQhpuOjw1tH+Emuib6QmjkJWJMhyjM8xnXMvA+76o9LhF0zOAJDZgPfQhg43cyXEyl5Ew==", + "peer": true, + "dependencies": { + "hermes-estree": "0.18.2" } }, "node_modules/metro-cache": { - "version": "0.73.9", - "license": "MIT", + "version": "0.80.5", + "resolved": "https://registry.npmjs.org/metro-cache/-/metro-cache-0.80.5.tgz", + "integrity": "sha512-2u+dQ4PZwmC7eZo9uMBNhQQMig9f+w4QWBZwXCdVy/RYOHM0eObgGdMEOwODo73uxie82T9lWzxr3aZOZ+Nqtw==", "peer": true, "dependencies": { - "metro-core": "0.73.9", + "metro-core": "0.80.5", "rimraf": "^3.0.2" + }, + "engines": { + "node": ">=18" } }, "node_modules/metro-cache-key": { - "version": "0.73.9", - "license": "MIT", - "peer": true + "version": "0.80.5", + "resolved": "https://registry.npmjs.org/metro-cache-key/-/metro-cache-key-0.80.5.tgz", + "integrity": "sha512-fr3QLZUarsB3tRbVcmr34kCBsTHk0Sh9JXGvBY/w3b2lbre+Lq5gtgLyFElHPecGF7o4z1eK9r3ubxtScHWcbA==", + "peer": true, + "engines": { + "node": ">=18" + } }, "node_modules/metro-config": { - "version": "0.73.9", - "license": "MIT", + "version": "0.80.5", + "resolved": "https://registry.npmjs.org/metro-config/-/metro-config-0.80.5.tgz", + "integrity": "sha512-elqo/lwvF+VjZ1OPyvmW/9hSiGlmcqu+rQvDKw5F5WMX48ZC+ySTD1WcaD7e97pkgAlJHVYqZ98FCjRAYOAFRQ==", "peer": true, "dependencies": { + "connect": "^3.6.5", "cosmiconfig": "^5.0.5", - "jest-validate": "^26.5.2", - "metro": "0.73.9", - "metro-cache": "0.73.9", - "metro-core": "0.73.9", - "metro-runtime": "0.73.9" + "jest-validate": "^29.6.3", + "metro": "0.80.5", + "metro-cache": "0.80.5", + "metro-core": "0.80.5", + "metro-runtime": "0.80.5" + }, + "engines": { + "node": ">=18" } }, "node_modules/metro-config/node_modules/cosmiconfig": { "version": "5.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", "peer": true, "dependencies": { "import-fresh": "^2.0.0", @@ -23567,7 +23147,8 @@ }, "node_modules/metro-config/node_modules/import-fresh": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==", "peer": true, "dependencies": { "caller-path": "^2.0.0", @@ -23579,7 +23160,8 @@ }, "node_modules/metro-config/node_modules/parse-json": { "version": "4.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", "peer": true, "dependencies": { "error-ex": "^1.3.1", @@ -23589,317 +23171,142 @@ "node": ">=4" } }, - "node_modules/metro-config/node_modules/resolve-from": { - "version": "3.0.0", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/metro-core": { - "version": "0.73.9", - "license": "MIT", - "peer": true, - "dependencies": { - "lodash.throttle": "^4.1.1", - "metro-resolver": "0.73.9" - } - }, - "node_modules/metro-file-map": { - "version": "0.73.9", - "license": "MIT", - "peer": true, - "dependencies": { - "abort-controller": "^3.0.0", - "anymatch": "^3.0.3", - "debug": "^2.2.0", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.4", - "invariant": "^2.2.4", - "jest-regex-util": "^27.0.6", - "jest-serializer": "^27.0.6", - "jest-util": "^27.2.0", - "jest-worker": "^27.2.0", - "micromatch": "^4.0.4", - "nullthrows": "^1.1.1", - "walker": "^1.0.7" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/metro-file-map/node_modules/@jest/types": { - "version": "27.5.1", - "license": "MIT", - "peer": true, - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/metro-file-map/node_modules/@types/yargs": { - "version": "16.0.5", - "license": "MIT", - "peer": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/metro-file-map/node_modules/jest-util": { - "version": "27.5.1", - "license": "MIT", - "peer": true, - "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/metro-hermes-compiler": { - "version": "0.73.9", - "license": "MIT", - "peer": true - }, - "node_modules/metro-inspector-proxy": { - "version": "0.73.9", - "license": "MIT", - "peer": true, - "dependencies": { - "connect": "^3.6.5", - "debug": "^2.2.0", - "ws": "^7.5.1", - "yargs": "^17.5.1" - }, - "bin": { - "metro-inspector-proxy": "src/cli.js" - } - }, - "node_modules/metro-inspector-proxy/node_modules/cliui": { - "version": "8.0.1", - "license": "ISC", - "peer": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/metro-inspector-proxy/node_modules/strip-ansi": { - "version": "6.0.1", - "license": "MIT", - "peer": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/metro-inspector-proxy/node_modules/wrap-ansi": { - "version": "7.0.0", - "license": "MIT", - "peer": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/metro-inspector-proxy/node_modules/ws": { - "version": "7.5.9", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/metro-inspector-proxy/node_modules/y18n": { - "version": "5.0.8", - "license": "ISC", - "peer": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/metro-inspector-proxy/node_modules/yargs": { - "version": "17.7.2", - "license": "MIT", + "node_modules/metro-config/node_modules/resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", "peer": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, "engines": { - "node": ">=12" + "node": ">=4" } }, - "node_modules/metro-inspector-proxy/node_modules/yargs-parser": { - "version": "21.1.1", - "license": "ISC", + "node_modules/metro-core": { + "version": "0.80.5", + "resolved": "https://registry.npmjs.org/metro-core/-/metro-core-0.80.5.tgz", + "integrity": "sha512-vkLuaBhnZxTVpaZO8ZJVEHzjaqSXpOdpAiztSZ+NDaYM6jEFgle3/XIbLW91jTSf2+T8Pj5yB1G7KuOX+BcVwg==", "peer": true, + "dependencies": { + "lodash.throttle": "^4.1.1", + "metro-resolver": "0.80.5" + }, "engines": { - "node": ">=12" + "node": ">=18" } }, - "node_modules/metro-minify-terser": { - "version": "0.73.9", - "license": "MIT", + "node_modules/metro-file-map": { + "version": "0.80.5", + "resolved": "https://registry.npmjs.org/metro-file-map/-/metro-file-map-0.80.5.tgz", + "integrity": "sha512-bKCvJ05drjq6QhQxnDUt3I8x7bTcHo3IIKVobEr14BK++nmxFGn/BmFLRzVBlghM6an3gqwpNEYxS5qNc+VKcg==", "peer": true, "dependencies": { - "terser": "^5.15.0" + "anymatch": "^3.0.3", + "debug": "^2.2.0", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.4", + "invariant": "^2.2.4", + "jest-worker": "^29.6.3", + "micromatch": "^4.0.4", + "node-abort-controller": "^3.1.1", + "nullthrows": "^1.1.1", + "walker": "^1.0.7" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" } }, - "node_modules/metro-minify-uglify": { - "version": "0.73.9", - "license": "MIT", + "node_modules/metro-file-map/node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "peer": true, "dependencies": { - "uglify-es": "^3.1.9" + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/metro-react-native-babel-preset": { - "version": "0.73.9", - "license": "MIT", + "node_modules/metro-file-map/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "peer": true, "dependencies": { - "@babel/core": "^7.20.0", - "@babel/plugin-proposal-async-generator-functions": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-proposal-export-default-from": "^7.0.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", - "@babel/plugin-proposal-object-rest-spread": "^7.0.0", - "@babel/plugin-proposal-optional-catch-binding": "^7.0.0", - "@babel/plugin-proposal-optional-chaining": "^7.0.0", - "@babel/plugin-syntax-dynamic-import": "^7.0.0", - "@babel/plugin-syntax-export-default-from": "^7.0.0", - "@babel/plugin-syntax-flow": "^7.18.0", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.0.0", - "@babel/plugin-syntax-optional-chaining": "^7.0.0", - "@babel/plugin-transform-arrow-functions": "^7.0.0", - "@babel/plugin-transform-async-to-generator": "^7.0.0", - "@babel/plugin-transform-block-scoping": "^7.0.0", - "@babel/plugin-transform-classes": "^7.0.0", - "@babel/plugin-transform-computed-properties": "^7.0.0", - "@babel/plugin-transform-destructuring": "^7.0.0", - "@babel/plugin-transform-flow-strip-types": "^7.0.0", - "@babel/plugin-transform-function-name": "^7.0.0", - "@babel/plugin-transform-literals": "^7.0.0", - "@babel/plugin-transform-modules-commonjs": "^7.0.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.0.0", - "@babel/plugin-transform-parameters": "^7.0.0", - "@babel/plugin-transform-react-display-name": "^7.0.0", - "@babel/plugin-transform-react-jsx": "^7.0.0", - "@babel/plugin-transform-react-jsx-self": "^7.0.0", - "@babel/plugin-transform-react-jsx-source": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.0.0", - "@babel/plugin-transform-shorthand-properties": "^7.0.0", - "@babel/plugin-transform-spread": "^7.0.0", - "@babel/plugin-transform-sticky-regex": "^7.0.0", - "@babel/plugin-transform-template-literals": "^7.0.0", - "@babel/plugin-transform-typescript": "^7.5.0", - "@babel/plugin-transform-unicode-regex": "^7.0.0", - "@babel/template": "^7.0.0", - "react-refresh": "^0.4.0" + "has-flag": "^4.0.0" }, - "peerDependencies": { - "@babel/core": "*" + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/metro-react-native-babel-transformer": { - "version": "0.73.9", - "license": "MIT", + "node_modules/metro-minify-terser": { + "version": "0.80.5", + "resolved": "https://registry.npmjs.org/metro-minify-terser/-/metro-minify-terser-0.80.5.tgz", + "integrity": "sha512-S7oZLLcab6YXUT6jYFX/ZDMN7Fq6xBGGAG8liMFU1UljX6cTcEC2u+UIafYgCLrdVexp/+ClxrIetVPZ5LtL/g==", "peer": true, "dependencies": { - "@babel/core": "^7.20.0", - "babel-preset-fbjs": "^3.4.0", - "hermes-parser": "0.8.0", - "metro-babel-transformer": "0.73.9", - "metro-react-native-babel-preset": "0.73.9", - "metro-source-map": "0.73.9", - "nullthrows": "^1.1.1" + "terser": "^5.15.0" }, - "peerDependencies": { - "@babel/core": "*" + "engines": { + "node": ">=18" } }, "node_modules/metro-resolver": { - "version": "0.73.9", - "license": "MIT", + "version": "0.80.5", + "resolved": "https://registry.npmjs.org/metro-resolver/-/metro-resolver-0.80.5.tgz", + "integrity": "sha512-haJ/Hveio3zv/Fr4eXVdKzjUeHHDogYok7OpRqPSXGhTXisNXB+sLN7CpcUrCddFRUDLnVaqQOYwhYsFndgUwA==", "peer": true, - "dependencies": { - "absolute-path": "^0.0.0" + "engines": { + "node": ">=18" } }, "node_modules/metro-runtime": { - "version": "0.73.9", - "license": "MIT", + "version": "0.80.5", + "resolved": "https://registry.npmjs.org/metro-runtime/-/metro-runtime-0.80.5.tgz", + "integrity": "sha512-L0syTWJUdWzfUmKgkScr6fSBVTh6QDr8eKEkRtn40OBd8LPagrJGySBboWSgbyn9eIb4ayW3Y347HxgXBSAjmg==", "peer": true, "dependencies": { - "@babel/runtime": "^7.0.0", - "react-refresh": "^0.4.0" + "@babel/runtime": "^7.0.0" + }, + "engines": { + "node": ">=18" } }, "node_modules/metro-source-map": { - "version": "0.73.9", - "license": "MIT", + "version": "0.80.5", + "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.80.5.tgz", + "integrity": "sha512-DwSF4l03mKPNqCtyQ6K23I43qzU1BViAXnuH81eYWdHglP+sDlPpY+/7rUahXEo6qXEHXfAJgVoo1sirbXbmsQ==", "peer": true, "dependencies": { "@babel/traverse": "^7.20.0", "@babel/types": "^7.20.0", "invariant": "^2.2.4", - "metro-symbolicate": "0.73.9", + "metro-symbolicate": "0.80.5", "nullthrows": "^1.1.1", - "ob1": "0.73.9", + "ob1": "0.80.5", "source-map": "^0.5.6", "vlq": "^1.0.0" + }, + "engines": { + "node": ">=18" } }, "node_modules/metro-symbolicate": { - "version": "0.73.9", - "license": "MIT", + "version": "0.80.5", + "resolved": "https://registry.npmjs.org/metro-symbolicate/-/metro-symbolicate-0.80.5.tgz", + "integrity": "sha512-IsM4mTYvmo9JvIqwEkCZ5+YeDVPST78Q17ZgljfLdHLSpIivOHp9oVoiwQ/YGbLx0xRHRIS/tKiXueWBnj3UWA==", "peer": true, "dependencies": { "invariant": "^2.2.4", - "metro-source-map": "0.73.9", + "metro-source-map": "0.80.5", "nullthrows": "^1.1.1", "source-map": "^0.5.6", "through2": "^2.0.1", @@ -23909,12 +23316,13 @@ "metro-symbolicate": "src/index.js" }, "engines": { - "node": ">=8.3" + "node": ">=18" } }, "node_modules/metro-transform-plugins": { - "version": "0.73.9", - "license": "MIT", + "version": "0.80.5", + "resolved": "https://registry.npmjs.org/metro-transform-plugins/-/metro-transform-plugins-0.80.5.tgz", + "integrity": "sha512-7IdlTqK/k5+qE3RvIU5QdCJUPk4tHWEqgVuYZu8exeW+s6qOJ66hGIJjXY/P7ccucqF+D4nsbAAW5unkoUdS6g==", "peer": true, "dependencies": { "@babel/core": "^7.20.0", @@ -23922,36 +23330,44 @@ "@babel/template": "^7.0.0", "@babel/traverse": "^7.20.0", "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">=18" } }, "node_modules/metro-transform-worker": { - "version": "0.73.9", - "license": "MIT", + "version": "0.80.5", + "resolved": "https://registry.npmjs.org/metro-transform-worker/-/metro-transform-worker-0.80.5.tgz", + "integrity": "sha512-Q1oM7hfP+RBgAtzRFBDjPhArELUJF8iRCZ8OidqCpYzQJVGuJZ7InSnIf3hn1JyqiUQwv2f1LXBO78i2rAjzyA==", "peer": true, "dependencies": { "@babel/core": "^7.20.0", "@babel/generator": "^7.20.0", "@babel/parser": "^7.20.0", "@babel/types": "^7.20.0", - "babel-preset-fbjs": "^3.4.0", - "metro": "0.73.9", - "metro-babel-transformer": "0.73.9", - "metro-cache": "0.73.9", - "metro-cache-key": "0.73.9", - "metro-hermes-compiler": "0.73.9", - "metro-source-map": "0.73.9", - "metro-transform-plugins": "0.73.9", + "metro": "0.80.5", + "metro-babel-transformer": "0.80.5", + "metro-cache": "0.80.5", + "metro-cache-key": "0.80.5", + "metro-minify-terser": "0.80.5", + "metro-source-map": "0.80.5", + "metro-transform-plugins": "0.80.5", "nullthrows": "^1.1.1" + }, + "engines": { + "node": ">=18" } }, "node_modules/metro/node_modules/ci-info": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "peer": true }, "node_modules/metro/node_modules/cliui": { "version": "8.0.1", - "license": "ISC", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "peer": true, "dependencies": { "string-width": "^4.2.0", @@ -23962,9 +23378,40 @@ "node": ">=12" } }, + "node_modules/metro/node_modules/hermes-estree": { + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.18.2.tgz", + "integrity": "sha512-KoLsoWXJ5o81nit1wSyEZnWUGy9cBna9iYMZBR7skKh7okYAYKqQ9/OczwpMHn/cH0hKDyblulGsJ7FknlfVxQ==", + "peer": true + }, + "node_modules/metro/node_modules/hermes-parser": { + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.18.2.tgz", + "integrity": "sha512-1eQfvib+VPpgBZ2zYKQhpuOjw1tH+Emuib6QmjkJWJMhyjM8xnXMvA+76o9LhF0zOAJDZgPfQhg43cyXEyl5Ew==", + "peer": true, + "dependencies": { + "hermes-estree": "0.18.2" + } + }, + "node_modules/metro/node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "peer": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/metro/node_modules/strip-ansi": { "version": "6.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "peer": true, "dependencies": { "ansi-regex": "^5.0.1" @@ -23973,9 +23420,25 @@ "node": ">=8" } }, + "node_modules/metro/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/metro/node_modules/wrap-ansi": { "version": "7.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "peer": true, "dependencies": { "ansi-styles": "^4.0.0", @@ -23991,7 +23454,8 @@ }, "node_modules/metro/node_modules/ws": { "version": "7.5.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", "peer": true, "engines": { "node": ">=8.3.0" @@ -24011,7 +23475,8 @@ }, "node_modules/metro/node_modules/y18n": { "version": "5.0.8", - "license": "ISC", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "peer": true, "engines": { "node": ">=10" @@ -24019,7 +23484,8 @@ }, "node_modules/metro/node_modules/yargs": { "version": "17.7.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "peer": true, "dependencies": { "cliui": "^8.0.1", @@ -24036,7 +23502,8 @@ }, "node_modules/metro/node_modules/yargs-parser": { "version": "21.1.1", - "license": "ISC", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "peer": true, "engines": { "node": ">=12" @@ -24055,7 +23522,8 @@ }, "node_modules/mime": { "version": "2.6.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", "peer": true, "bin": { "mime": "cli.js" @@ -24184,18 +23652,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mixin-deep": { - "version": "1.3.2", - "license": "MIT", - "peer": true, - "dependencies": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/mkdirp": { "version": "0.5.6", "license": "MIT", @@ -24270,27 +23726,6 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/nanomatch": { - "version": "1.2.13", - "license": "MIT", - "peer": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -24312,11 +23747,6 @@ "version": "2.6.2", "license": "MIT" }, - "node_modules/nice-try": { - "version": "1.0.5", - "license": "MIT", - "peer": true - }, "node_modules/no-case": { "version": "3.0.4", "license": "MIT", @@ -24327,15 +23757,23 @@ }, "node_modules/nocache": { "version": "3.0.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/nocache/-/nocache-3.0.4.tgz", + "integrity": "sha512-WDD0bdg9mbq6F4mRxEYcPWwfA1vxd0mrvKOyxI7Xj/atfRHVeutzuWByG//jfm4uPzp0y4Kj051EORCBSQMycw==", "peer": true, "engines": { "node": ">=12.0.0" } }, + "node_modules/node-abort-controller": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", + "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==", + "peer": true + }, "node_modules/node-dir": { "version": "0.1.17", - "license": "MIT", + "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.17.tgz", + "integrity": "sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg==", "peer": true, "dependencies": { "minimatch": "^3.0.2" @@ -24380,7 +23818,8 @@ }, "node_modules/node-stream-zip": { "version": "1.15.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/node-stream-zip/-/node-stream-zip-1.15.0.tgz", + "integrity": "sha512-LN4fydt9TqhZhThkZIVQnF9cwjU3qmUH9h78Mx/K7d3VvfRqqwthLwJEUOEL0QPZ0XQmNN7be5Ggit5+4dq3Bw==", "peer": true, "engines": { "node": ">=0.12.0" @@ -24417,14 +23856,14 @@ } }, "node_modules/npm-run-path": { - "version": "2.0.2", - "license": "MIT", - "peer": true, + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dependencies": { - "path-key": "^2.0.0" + "path-key": "^3.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/nth-check": { @@ -24439,101 +23878,28 @@ } }, "node_modules/nullthrows": { - "version": "1.1.1", - "license": "MIT", - "peer": true - }, - "node_modules/nwsapi": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.4.tgz", - "integrity": "sha512-NHj4rzRo0tQdijE9ZqAx6kYDcoRwYwSYzCA8MY3JzfxlrvEU0jhnhJT9BhqhJs7I/dKcrDm6TyulaRqZPIhN5g==" - }, - "node_modules/ob1": { - "version": "0.73.9", - "license": "MIT", - "peer": true - }, - "node_modules/object-assign": { - "version": "4.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy": { - "version": "0.1.0", - "license": "MIT", - "peer": true, - "dependencies": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/define-property": { - "version": "0.2.5", - "license": "MIT", - "peer": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "license": "MIT", - "peer": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-data-descriptor": { - "version": "0.1.4", - "license": "MIT", - "peer": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor": { - "version": "0.1.6", - "license": "MIT", - "peer": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz", + "integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==", + "peer": true }, - "node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "license": "MIT", + "node_modules/nwsapi": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.4.tgz", + "integrity": "sha512-NHj4rzRo0tQdijE9ZqAx6kYDcoRwYwSYzCA8MY3JzfxlrvEU0jhnhJT9BhqhJs7I/dKcrDm6TyulaRqZPIhN5g==" + }, + "node_modules/ob1": { + "version": "0.80.5", + "resolved": "https://registry.npmjs.org/ob1/-/ob1-0.80.5.tgz", + "integrity": "sha512-zYDMnnNrFi/1Tqh0vo3PE4p97Tpl9/4MP2k2ECvkbLOZzQuAYZJLTUYVLZb7hJhbhjT+JJxAwBGS8iu5hCSd1w==", "peer": true, "engines": { - "node": ">=0.10.0" + "node": ">=18" } }, - "node_modules/object-copy/node_modules/kind-of": { - "version": "3.2.2", + "node_modules/object-assign": { + "version": "4.1.1", "license": "MIT", - "peer": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, "engines": { "node": ">=0.10.0" } @@ -24574,17 +23940,6 @@ "node": ">= 0.4" } }, - "node_modules/object-visit": { - "version": "1.0.1", - "license": "MIT", - "peer": true, - "dependencies": { - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object.assign": { "version": "4.1.4", "license": "MIT", @@ -24660,17 +24015,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.pick": { - "version": "1.3.0", - "license": "MIT", - "peer": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object.values": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", @@ -24694,7 +24038,8 @@ }, "node_modules/on-finished": { "version": "2.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", "peer": true, "dependencies": { "ee-first": "1.1.1" @@ -24732,7 +24077,8 @@ }, "node_modules/open": { "version": "6.4.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/open/-/open-6.4.0.tgz", + "integrity": "sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==", "peer": true, "dependencies": { "is-wsl": "^1.1.0" @@ -24741,6 +24087,15 @@ "node": ">=8" } }, + "node_modules/open/node_modules/is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==", + "peer": true, + "engines": { + "node": ">=4" + } + }, "node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -24759,7 +24114,8 @@ }, "node_modules/ora": { "version": "5.4.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", "peer": true, "dependencies": { "bl": "^4.1.0", @@ -24781,7 +24137,8 @@ }, "node_modules/ora/node_modules/strip-ansi": { "version": "6.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "peer": true, "dependencies": { "ansi-regex": "^5.0.1" @@ -24790,22 +24147,6 @@ "node": ">=8" } }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/p-finally": { - "version": "1.0.0", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=4" - } - }, "node_modules/p-limit": { "version": "2.3.0", "license": "MIT", @@ -24908,14 +24249,6 @@ "tslib": "^2.0.3" } }, - "node_modules/pascalcase": { - "version": "0.1.1", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-case": { "version": "3.0.4", "license": "MIT", @@ -24939,11 +24272,11 @@ } }, "node_modules/path-key": { - "version": "2.0.1", - "license": "MIT", - "peer": true, + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/path-parse": { @@ -24994,22 +24327,25 @@ }, "node_modules/pify": { "version": "4.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "peer": true, "engines": { "node": ">=6" } }, "node_modules/pirates": { - "version": "4.0.5", - "license": "MIT", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "engines": { "node": ">= 6" } }, "node_modules/pkg-dir": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", "peer": true, "dependencies": { "find-up": "^3.0.0" @@ -25020,7 +24356,8 @@ }, "node_modules/pkg-dir/node_modules/find-up": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "peer": true, "dependencies": { "locate-path": "^3.0.0" @@ -25031,7 +24368,8 @@ }, "node_modules/pkg-dir/node_modules/locate-path": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "peer": true, "dependencies": { "p-locate": "^3.0.0", @@ -25043,7 +24381,8 @@ }, "node_modules/pkg-dir/node_modules/p-locate": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "peer": true, "dependencies": { "p-limit": "^2.0.0" @@ -25054,7 +24393,8 @@ }, "node_modules/pkg-dir/node_modules/path-exists": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", "peer": true, "engines": { "node": ">=4" @@ -25120,14 +24460,6 @@ "node": ">=10.13.0" } }, - "node_modules/posix-character-classes": { - "version": "0.1.1", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/postcss": { "version": "8.4.23", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz", @@ -26445,15 +25777,6 @@ "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" }, - "node_modules/pump": { - "version": "3.0.0", - "license": "MIT", - "peer": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "node_modules/punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", @@ -26512,6 +25835,15 @@ "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" }, + "node_modules/queue": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", + "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==", + "peer": true, + "dependencies": { + "inherits": "~2.0.3" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -26875,19 +26207,6 @@ "node": ">=14" } }, - "node_modules/react-dev-utils/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/react-dev-utils/node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -26912,17 +26231,6 @@ "url": "https://opencollective.com/immer" } }, - "node_modules/react-dev-utils/node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/react-dev-utils/node_modules/loader-utils": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz", @@ -26989,33 +26297,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/react-dev-utils/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/react-dev-utils/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/react-dev-utils/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "engines": { - "node": ">=8" - } - }, "node_modules/react-dev-utils/node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -27027,23 +26308,10 @@ "node": ">=8" } }, - "node_modules/react-dev-utils/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/react-devtools-core": { - "version": "4.27.7", - "license": "MIT", + "version": "4.28.5", + "resolved": "https://registry.npmjs.org/react-devtools-core/-/react-devtools-core-4.28.5.tgz", + "integrity": "sha512-cq/o30z9W2Wb4rzBefjv5fBalHU0rJGZCHAkf/RHSBWSSYwh8PlQTqqOJmgIIbBtpj27T6FIPXeomIjZtCNVqA==", "peer": true, "dependencies": { "shell-quote": "^1.6.1", @@ -27052,7 +26320,8 @@ }, "node_modules/react-devtools-core/node_modules/ws": { "version": "7.5.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", "peer": true, "engines": { "node": ">=8.3.0" @@ -27177,66 +26446,60 @@ } }, "node_modules/react-native": { - "version": "0.71.8", - "license": "MIT", - "peer": true, - "dependencies": { - "@jest/create-cache-key-function": "^29.2.1", - "@react-native-community/cli": "10.2.2", - "@react-native-community/cli-platform-android": "10.2.0", - "@react-native-community/cli-platform-ios": "10.2.1", - "@react-native/assets": "1.0.0", - "@react-native/normalize-color": "2.1.0", - "@react-native/polyfills": "2.0.0", + "version": "0.73.3", + "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.73.3.tgz", + "integrity": "sha512-RSQDtT2DNUcmB4IgmW9NhRb5wqvXFl6DI2NEJmt0ps2OrVHpoA8Tkq+lkFOA/fvPscJKtFKEHFBDSR5UHR3PUw==", + "peer": true, + "dependencies": { + "@jest/create-cache-key-function": "^29.6.3", + "@react-native-community/cli": "12.3.2", + "@react-native-community/cli-platform-android": "12.3.2", + "@react-native-community/cli-platform-ios": "12.3.2", + "@react-native/assets-registry": "0.73.1", + "@react-native/codegen": "0.73.2", + "@react-native/community-cli-plugin": "0.73.14", + "@react-native/gradle-plugin": "0.73.4", + "@react-native/js-polyfills": "0.73.1", + "@react-native/normalize-colors": "0.73.2", + "@react-native/virtualized-lists": "0.73.4", "abort-controller": "^3.0.0", "anser": "^1.4.9", - "base64-js": "^1.1.2", - "deprecated-react-native-prop-types": "^3.0.1", + "ansi-regex": "^5.0.0", + "base64-js": "^1.5.1", + "chalk": "^4.0.0", + "deprecated-react-native-prop-types": "^5.0.0", "event-target-shim": "^5.0.1", + "flow-enums-runtime": "^0.0.6", "invariant": "^2.2.4", - "jest-environment-node": "^29.2.1", + "jest-environment-node": "^29.6.3", "jsc-android": "^250231.0.0", "memoize-one": "^5.0.0", - "metro-react-native-babel-transformer": "0.73.9", - "metro-runtime": "0.73.9", - "metro-source-map": "0.73.9", + "metro-runtime": "^0.80.3", + "metro-source-map": "^0.80.3", "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", "pretty-format": "^26.5.2", "promise": "^8.3.0", - "react-devtools-core": "^4.26.1", - "react-native-codegen": "^0.71.5", - "react-native-gradle-plugin": "^0.71.18", - "react-refresh": "^0.4.0", + "react-devtools-core": "^4.27.7", + "react-refresh": "^0.14.0", "react-shallow-renderer": "^16.15.0", "regenerator-runtime": "^0.13.2", - "scheduler": "^0.23.0", - "stacktrace-parser": "^0.1.3", - "use-sync-external-store": "^1.0.0", + "scheduler": "0.24.0-canary-efb381bbf-20230505", + "stacktrace-parser": "^0.1.10", "whatwg-fetch": "^3.0.0", - "ws": "^6.2.2" + "ws": "^6.2.2", + "yargs": "^17.6.2" }, "bin": { "react-native": "cli.js" }, "engines": { - "node": ">=14" + "node": ">=18" }, "peerDependencies": { "react": "18.2.0" } }, - "node_modules/react-native-codegen": { - "version": "0.71.5", - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/parser": "^7.14.0", - "flow-parser": "^0.185.0", - "jscodeshift": "^0.13.1", - "nullthrows": "^1.1.1" - } - }, "node_modules/react-native-get-random-values": { "version": "1.8.0", "license": "MIT", @@ -27247,14 +26510,10 @@ "react-native": ">=0.56" } }, - "node_modules/react-native-gradle-plugin": { - "version": "0.71.18", - "license": "MIT", - "peer": true - }, "node_modules/react-native/node_modules/@jest/types": { "version": "26.6.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", + "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", "peer": true, "dependencies": { "@types/istanbul-lib-coverage": "^2.0.0", @@ -27263,36 +26522,127 @@ "@types/yargs": "^15.0.0", "chalk": "^4.0.0" }, - "engines": { - "node": ">= 10.14.2" + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/react-native/node_modules/@types/yargs": { + "version": "15.0.19", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.19.tgz", + "integrity": "sha512-2XUaGVmyQjgyAZldf0D0c14vvo/yv0MhQBSTJcejMMaitsn3nxCB6TmH4G0ZQf+uxROOa9mpanoSm8h6SG/1ZA==", + "peer": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/react-native/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "peer": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/react-native/node_modules/pretty-format": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", + "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", + "peer": true, + "dependencies": { + "@jest/types": "^26.6.2", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/react-native/node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "peer": true + }, + "node_modules/react-native/node_modules/scheduler": { + "version": "0.24.0-canary-efb381bbf-20230505", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.24.0-canary-efb381bbf-20230505.tgz", + "integrity": "sha512-ABvovCDe/k9IluqSh4/ISoq8tIJnW8euVAWYt5j/bg6dRnqwQwiGO1F/V4AyK96NGF/FB04FhOUDuWj8IKfABA==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/react-native/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/react-native/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "peer": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/react-native/node_modules/@types/yargs": { - "version": "15.0.15", - "license": "MIT", + "node_modules/react-native/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "peer": true, - "dependencies": { - "@types/yargs-parser": "*" + "engines": { + "node": ">=10" } }, - "node_modules/react-native/node_modules/pretty-format": { - "version": "26.6.2", - "license": "MIT", + "node_modules/react-native/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "peer": true, "dependencies": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">= 10" + "node": ">=12" } }, - "node_modules/react-native/node_modules/react-is": { - "version": "17.0.2", - "license": "MIT", - "peer": true + "node_modules/react-native/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "peer": true, + "engines": { + "node": ">=12" + } }, "node_modules/react-onclickoutside": { "version": "6.13.0", @@ -27320,8 +26670,9 @@ } }, "node_modules/react-refresh": { - "version": "0.4.3", - "license": "MIT", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz", + "integrity": "sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==", "peer": true, "engines": { "node": ">=0.10.0" @@ -27723,7 +27074,8 @@ }, "node_modules/react-shallow-renderer": { "version": "16.15.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz", + "integrity": "sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==", "peer": true, "dependencies": { "object-assign": "^4.1.1", @@ -27852,15 +27204,17 @@ }, "node_modules/readline": { "version": "1.3.0", - "license": "BSD", + "resolved": "https://registry.npmjs.org/readline/-/readline-1.3.0.tgz", + "integrity": "sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg==", "peer": true }, "node_modules/recast": { - "version": "0.20.5", - "license": "MIT", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.21.5.tgz", + "integrity": "sha512-hjMmLaUXAm1hIuTqOdeYObMslq/q+Xff6QE3Y2P+uoHAg2nmVlLBps2hzh1UJDdMtDTMXOFewK6ky51JQIeECg==", "peer": true, "dependencies": { - "ast-types": "0.14.2", + "ast-types": "0.15.2", "esprima": "~4.0.0", "source-map": "~0.6.1", "tslib": "^2.0.1" @@ -27871,7 +27225,8 @@ }, "node_modules/recast/node_modules/source-map": { "version": "0.6.1", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "peer": true, "engines": { "node": ">=0.10.0" @@ -27924,18 +27279,6 @@ "@babel/runtime": "^7.8.4" } }, - "node_modules/regex-not": { - "version": "1.0.2", - "license": "MIT", - "peer": true, - "dependencies": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/regex-parser": { "version": "2.2.11", "resolved": "https://registry.npmjs.org/regex-parser/-/regex-parser-2.2.11.tgz", @@ -28018,22 +27361,6 @@ "node": ">=8" } }, - "node_modules/repeat-element": { - "version": "1.1.4", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/repeat-string": { - "version": "1.6.1", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10" - } - }, "node_modules/require-directory": { "version": "2.1.1", "license": "MIT", @@ -28099,11 +27426,6 @@ "protocol-buffers-schema": "^3.3.1" } }, - "node_modules/resolve-url": { - "version": "0.2.1", - "license": "MIT", - "peer": true - }, "node_modules/resolve-url-loader": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-4.0.0.tgz", @@ -28170,7 +27492,8 @@ }, "node_modules/restore-cursor": { "version": "3.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "peer": true, "dependencies": { "onetime": "^5.1.0", @@ -28180,14 +27503,6 @@ "node": ">=8" } }, - "node_modules/ret": { - "version": "0.1.15", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.12" - } - }, "node_modules/retry": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", @@ -28315,14 +27630,6 @@ "version": "5.1.2", "license": "MIT" }, - "node_modules/safe-regex": { - "version": "1.1.0", - "license": "MIT", - "peer": true, - "dependencies": { - "ret": "~0.1.10" - } - }, "node_modules/safe-regex-test": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", @@ -28440,8 +27747,9 @@ } }, "node_modules/semver": { - "version": "6.3.0", - "license": "ISC", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -28512,7 +27820,8 @@ }, "node_modules/serialize-error": { "version": "2.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz", + "integrity": "sha512-ghgmKt5o4Tly5yEG/UJp8qTd0AN7Xalw4XBtDEKP655B699qMEtra1WlXeE6WIvdEG481JvRxULKsInq/iNysw==", "peer": true, "engines": { "node": ">=0.10.0" @@ -28592,46 +27901,14 @@ "version": "2.0.0", "license": "ISC" }, - "node_modules/set-value": { - "version": "2.0.1", - "license": "MIT", - "peer": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/set-value/node_modules/extend-shallow": { - "version": "2.0.1", - "license": "MIT", - "peer": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/set-value/node_modules/is-extendable": { - "version": "0.1.1", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/setprototypeof": { "version": "1.2.0", "license": "ISC" }, "node_modules/shallow-clone": { "version": "3.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", "peer": true, "dependencies": { "kind-of": "^6.0.2" @@ -28645,22 +27922,22 @@ "license": "MIT" }, "node_modules/shebang-command": { - "version": "1.2.0", - "license": "MIT", - "peer": true, + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dependencies": { - "shebang-regex": "^1.0.0" + "shebang-regex": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/shebang-regex": { - "version": "1.0.0", - "license": "MIT", - "peer": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/shell-quote": { @@ -28699,7 +27976,8 @@ }, "node_modules/slice-ansi": { "version": "2.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", "peer": true, "dependencies": { "ansi-styles": "^3.2.0", @@ -28712,7 +27990,8 @@ }, "node_modules/slice-ansi/node_modules/ansi-styles": { "version": "3.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "peer": true, "dependencies": { "color-convert": "^1.9.0" @@ -28723,7 +28002,8 @@ }, "node_modules/slice-ansi/node_modules/color-convert": { "version": "1.9.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "peer": true, "dependencies": { "color-name": "1.1.3" @@ -28731,7 +28011,8 @@ }, "node_modules/slice-ansi/node_modules/color-name": { "version": "1.1.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "peer": true }, "node_modules/snake-case": { @@ -28742,165 +28023,6 @@ "tslib": "^2.0.3" } }, - "node_modules/snapdragon": { - "version": "0.8.2", - "license": "MIT", - "peer": true, - "dependencies": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node": { - "version": "2.1.1", - "license": "MIT", - "peer": true, - "dependencies": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/define-property": { - "version": "1.0.0", - "license": "MIT", - "peer": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util": { - "version": "3.0.1", - "license": "MIT", - "peer": true, - "dependencies": { - "kind-of": "^3.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "peer": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/define-property": { - "version": "0.2.5", - "license": "MIT", - "peer": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/extend-shallow": { - "version": "2.0.1", - "license": "MIT", - "peer": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "license": "MIT", - "peer": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "peer": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor": { - "version": "0.1.4", - "license": "MIT", - "peer": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "peer": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-descriptor": { - "version": "0.1.6", - "license": "MIT", - "peer": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-extendable": { - "version": "0.1.1", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/kind-of": { - "version": "5.1.0", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/sockjs": { "version": "0.3.24", "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", @@ -28959,18 +28081,6 @@ "webpack": "^5.0.0" } }, - "node_modules/source-map-resolve": { - "version": "0.5.3", - "license": "MIT", - "peer": true, - "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, "node_modules/source-map-support": { "version": "0.5.21", "license": "MIT", @@ -28986,11 +28096,6 @@ "node": ">=0.10.0" } }, - "node_modules/source-map-url": { - "version": "0.4.1", - "license": "MIT", - "peer": true - }, "node_modules/sourcemap-codec": { "version": "1.4.8", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", @@ -29067,17 +28172,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "node_modules/split-string": { - "version": "3.1.0", - "license": "MIT", - "peer": true, - "dependencies": { - "extend-shallow": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/sprintf-js": { "version": "1.0.3", "license": "BSD-3-Clause" @@ -29111,7 +28205,8 @@ }, "node_modules/stacktrace-parser": { "version": "0.1.10", - "license": "MIT", + "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", + "integrity": "sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==", "peer": true, "dependencies": { "type-fest": "^0.7.1" @@ -29122,100 +28217,13 @@ }, "node_modules/stacktrace-parser/node_modules/type-fest": { "version": "0.7.1", - "license": "(MIT OR CC0-1.0)", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", + "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", "peer": true, "engines": { "node": ">=8" } }, - "node_modules/static-extend": { - "version": "0.1.2", - "license": "MIT", - "peer": true, - "dependencies": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/define-property": { - "version": "0.2.5", - "license": "MIT", - "peer": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "license": "MIT", - "peer": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "peer": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-data-descriptor": { - "version": "0.1.4", - "license": "MIT", - "peer": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "peer": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-descriptor": { - "version": "0.1.6", - "license": "MIT", - "peer": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/kind-of": { - "version": "5.1.0", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/statuses": { "version": "1.5.0", "license": "MIT", @@ -29396,7 +28404,8 @@ }, "node_modules/strip-ansi": { "version": "5.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "peer": true, "dependencies": { "ansi-regex": "^4.1.0" @@ -29407,7 +28416,8 @@ }, "node_modules/strip-ansi/node_modules/ansi-regex": { "version": "4.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "peer": true, "engines": { "node": ">=6" @@ -29429,14 +28439,6 @@ "node": ">=10" } }, - "node_modules/strip-eof": { - "version": "1.0.0", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -29616,7 +28618,8 @@ }, "node_modules/sudo-prompt": { "version": "9.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/sudo-prompt/-/sudo-prompt-9.2.1.tgz", + "integrity": "sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw==", "peer": true }, "node_modules/suggestions-list": { @@ -29902,15 +28905,15 @@ } }, "node_modules/temp": { - "version": "0.8.3", - "engines": [ - "node >=0.8.0" - ], - "license": "MIT", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.4.tgz", + "integrity": "sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg==", "peer": true, "dependencies": { - "os-tmpdir": "^1.0.0", - "rimraf": "~2.2.6" + "rimraf": "~2.6.2" + }, + "engines": { + "node": ">=6.0.0" } }, "node_modules/temp-dir": { @@ -29922,9 +28925,13 @@ } }, "node_modules/temp/node_modules/rimraf": { - "version": "2.2.8", - "license": "MIT", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "peer": true, + "dependencies": { + "glob": "^7.1.3" + }, "bin": { "rimraf": "bin.js" } @@ -29946,17 +28953,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/tempy/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/tempy/node_modules/type-fest": { "version": "0.16.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.16.0.tgz", @@ -30092,12 +29088,14 @@ }, "node_modules/throat": { "version": "5.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz", + "integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==", "peer": true }, "node_modules/through2": { "version": "2.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "peer": true, "dependencies": { "readable-stream": "~2.3.6", @@ -30106,12 +29104,14 @@ }, "node_modules/through2/node_modules/isarray": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", "peer": true }, "node_modules/through2/node_modules/readable-stream": { "version": "2.3.8", - "license": "MIT", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "peer": true, "dependencies": { "core-util-is": "~1.0.0", @@ -30125,7 +29125,8 @@ }, "node_modules/through2/node_modules/string_decoder": { "version": "1.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "peer": true, "dependencies": { "safe-buffer": "~5.1.0" @@ -30167,42 +29168,6 @@ "node": ">=4" } }, - "node_modules/to-object-path": { - "version": "0.3.0", - "license": "MIT", - "peer": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-object-path/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "peer": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex": { - "version": "3.0.2", - "license": "MIT", - "peer": true, - "dependencies": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "license": "MIT", @@ -30394,34 +29359,6 @@ "node": ">=12.20" } }, - "node_modules/uglify-es": { - "version": "3.3.9", - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "commander": "~2.13.0", - "source-map": "~0.6.1" - }, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/uglify-es/node_modules/commander": { - "version": "2.13.0", - "license": "MIT", - "peer": true - }, - "node_modules/uglify-es/node_modules/source-map": { - "version": "0.6.1", - "license": "BSD-3-Clause", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ulid": { "version": "2.3.0", "license": "MIT", @@ -30492,28 +29429,6 @@ "node": ">=4" } }, - "node_modules/union-value": { - "version": "1.0.1", - "license": "MIT", - "peer": true, - "dependencies": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/union-value/node_modules/is-extendable": { - "version": "0.1.1", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/unique-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", @@ -30535,7 +29450,8 @@ }, "node_modules/universalify": { "version": "0.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "peer": true, "engines": { "node": ">= 4.0.0" @@ -30553,55 +29469,6 @@ "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", "integrity": "sha512-vRCqFv6UhXpWxZPyGDh/F3ZpNv8/qo7w6iufLpQg9aKnQ71qM4B5KiI7Mia9COcjEhrO9LueHpMYjYzsWH3OIg==" }, - "node_modules/unset-value": { - "version": "1.0.0", - "license": "MIT", - "peer": true, - "dependencies": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value": { - "version": "0.3.1", - "license": "MIT", - "peer": true, - "dependencies": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { - "version": "2.1.0", - "license": "MIT", - "peer": true, - "dependencies": { - "isarray": "1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-values": { - "version": "0.1.4", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/isarray": { - "version": "1.0.0", - "license": "MIT", - "peer": true - }, "node_modules/upath": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", @@ -30668,11 +29535,6 @@ "punycode": "^2.1.0" } }, - "node_modules/urix": { - "version": "0.1.0", - "license": "MIT", - "peer": true - }, "node_modules/url": { "version": "0.11.0", "license": "MIT", @@ -30694,14 +29556,6 @@ "version": "1.3.2", "license": "MIT" }, - "node_modules/use": { - "version": "3.1.1", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/use-callback-ref": { "version": "1.3.0", "license": "MIT", @@ -30827,7 +29681,8 @@ }, "node_modules/vlq": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-1.0.1.tgz", + "integrity": "sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w==", "peer": true }, "node_modules/vt-pbf": { @@ -30895,7 +29750,8 @@ }, "node_modules/wcwidth": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", "peer": true, "dependencies": { "defaults": "^1.0.3" @@ -31124,17 +29980,6 @@ "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==" }, - "node_modules/webpack-dev-server/node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/webpack-dev-server/node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -31757,7 +30602,8 @@ }, "node_modules/write-file-atomic": { "version": "2.4.3", - "license": "ISC", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", "peer": true, "dependencies": { "graceful-fs": "^4.1.11", @@ -31767,7 +30613,8 @@ }, "node_modules/ws": { "version": "6.2.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", + "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", "peer": true, "dependencies": { "async-limiter": "~1.0.0" diff --git a/jest.config.ts b/jest.config.ts new file mode 100644 index 0000000..d0dbd1b --- /dev/null +++ b/jest.config.ts @@ -0,0 +1,5 @@ +import { getJestProjects } from '@nx/jest'; + +export default { + projects: getJestProjects(), +}; diff --git a/jest.preset.js b/jest.preset.js new file mode 100644 index 0000000..f078ddc --- /dev/null +++ b/jest.preset.js @@ -0,0 +1,3 @@ +const nxPreset = require('@nx/jest/preset').default; + +module.exports = { ...nxPreset }; diff --git a/libs/shared/schemas/.eslintrc.json b/libs/shared/schemas/.eslintrc.json new file mode 100644 index 0000000..3230caf --- /dev/null +++ b/libs/shared/schemas/.eslintrc.json @@ -0,0 +1,25 @@ +{ + "extends": ["../../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.json"], + "parser": "jsonc-eslint-parser", + "rules": { + "@nx/dependency-checks": "error" + } + } + ] +} diff --git a/libs/shared/schemas/README.md b/libs/shared/schemas/README.md new file mode 100644 index 0000000..f09007a --- /dev/null +++ b/libs/shared/schemas/README.md @@ -0,0 +1,11 @@ +# schemas + +This library was generated with [Nx](https://nx.dev). + +## Building + +Run `nx build schemas` to build the library. + +## Running unit tests + +Run `nx test schemas` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/shared/schemas/jest.config.ts b/libs/shared/schemas/jest.config.ts new file mode 100644 index 0000000..1964194 --- /dev/null +++ b/libs/shared/schemas/jest.config.ts @@ -0,0 +1,11 @@ +/* eslint-disable */ +export default { + displayName: 'schemas', + preset: '../../../jest.preset.js', + testEnvironment: 'node', + transform: { + '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], + }, + moduleFileExtensions: ['ts', 'js', 'html'], + coverageDirectory: '../../../coverage/libs/shared/schemas', +}; diff --git a/libs/shared/schemas/package.json b/libs/shared/schemas/package.json new file mode 100644 index 0000000..b6535bd --- /dev/null +++ b/libs/shared/schemas/package.json @@ -0,0 +1,10 @@ +{ + "name": "@org/schemas", + "version": "0.0.1", + "dependencies": { + "tslib": "^2.3.0" + }, + "type": "commonjs", + "main": "./src/index.js", + "typings": "./src/index.d.ts" +} diff --git a/libs/shared/schemas/project.json b/libs/shared/schemas/project.json new file mode 100644 index 0000000..1b9016d --- /dev/null +++ b/libs/shared/schemas/project.json @@ -0,0 +1,30 @@ +{ + "name": "schemas", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "libs/shared/schemas/src", + "projectType": "library", + "targets": { + "build": { + "executor": "@nx/js:tsc", + "outputs": ["{options.outputPath}"], + "options": { + "outputPath": "dist/libs/shared/schemas", + "main": "libs/shared/schemas/src/index.ts", + "tsConfig": "libs/shared/schemas/tsconfig.lib.json", + "assets": ["libs/shared/schemas/*.md"] + } + }, + "lint": { + "executor": "@nx/eslint:lint", + "outputs": ["{options.outputFile}"] + }, + "test": { + "executor": "@nx/jest:jest", + "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "options": { + "jestConfig": "libs/shared/schemas/jest.config.ts" + } + } + }, + "tags": [] +} diff --git a/libs/shared/schemas/src/index.ts b/libs/shared/schemas/src/index.ts new file mode 100644 index 0000000..a6c54c6 --- /dev/null +++ b/libs/shared/schemas/src/index.ts @@ -0,0 +1,5 @@ +export * from './lib/RowSchema'; +export * from './lib/CellTypes'; +export * from './lib/Timesheet'; + + diff --git a/libs/shared/schemas/src/lib/CellTypes.ts b/libs/shared/schemas/src/lib/CellTypes.ts new file mode 100644 index 0000000..a244f55 --- /dev/null +++ b/libs/shared/schemas/src/lib/CellTypes.ts @@ -0,0 +1,28 @@ +////////////////////////////////////////////////////////////////////////// +// DELETE THIS WHEN MERGED WITH MONOREPO TO DIRECTLY PULL FROM FRONTEND // +////////////////////////////////////////////////////////////////////////// + + +export enum CellType { + Regular = "Time Worked", + PTO = "PTO" +}; + +export enum CellStatus { + Active="Active", + Deleted="Deleted" +} + +export enum CommentType { + Comment = "Comment", + Report = "Report", +}; + +export const enum Review_Stages { + UNSUBMITTED = "Not-Submitted", + EMPLOYEE_SUBMITTED = "Employee Submitted", + ADMIN_REVIEW = "Review (Breaktime)", + APPROVED = "Approved" +}; + +export const TABLE_COLUMNS = ['Type', 'Date','Clock-in','Clock-Out','Hours','Comment']; \ No newline at end of file diff --git a/libs/shared/schemas/src/lib/RowSchema.ts b/libs/shared/schemas/src/lib/RowSchema.ts new file mode 100644 index 0000000..20c722e --- /dev/null +++ b/libs/shared/schemas/src/lib/RowSchema.ts @@ -0,0 +1,51 @@ +////////////////////////////////////////////////////////////////////////// +// DELETE THIS WHEN MERGED WITH MONOREPO TO DIRECTLY PULL FROM FRONTEND // +////////////////////////////////////////////////////////////////////////// + +import { z } from "zod"; +import {CellType, CommentType, CellStatus} from './CellTypes'; + + +const optionalNumber = z.union([z.undefined(), z.number()]) +const optionalString = z.union([z.undefined(), z.string()]); + + + +export const TimeRowEntry = z.union([z.undefined(), z.object({ + Start: optionalNumber, End: optionalNumber, AuthorID: optionalString +})]); +export type TimeRowEntry = z.infer + +export const CommentSchema = z.object({ + UUID: z.string(), + AuthorID:z.string(), + Type: z.enum([CommentType.Comment, CommentType.Report]), + Timestamp: z.number(), + Content: z.string(), + State: z.enum([CellStatus.Active, CellStatus.Deleted]), +}); + +export type CommentSchema = z.infer + +export const RowType = z.enum([CellType.Regular, CellType.PTO]); +export type RowType = z.infer + +export const RowSchema = z.object({ + UUID: z.string(), + Type: RowType, + Date: z.number(), + Associate: TimeRowEntry, + Supervisor: TimeRowEntry, + Admin: TimeRowEntry, + Comment: z.union([z.undefined(), z.array(CommentSchema)]) +}); +export type RowSchema = z.infer + + +export const ScheduledRowSchema = z.object({ + UUID: z.string(), + Date: z.number(), + Entry: TimeRowEntry +}); + +export type ScheduledRowSchema = z.infer diff --git a/libs/shared/schemas/src/lib/Timesheet.ts b/libs/shared/schemas/src/lib/Timesheet.ts new file mode 100644 index 0000000..949513e --- /dev/null +++ b/libs/shared/schemas/src/lib/Timesheet.ts @@ -0,0 +1,104 @@ +import { z } from "zod"; + +/* +------------------------------------------------------------------------------------------------------------------- +------------------------------------------------------------------------------------------------------------------- +---------------------------------DELETE WHEN MONOREPO CREATED------------------------------------------------------ + SEE BACKEND DIRECTORY FOR ALL DOCUMENTATION / COMMENTS +------------------------------------------------------------------------------------------------------------------- +------------------------------------------------------------------------------------------------------------------- +*/ + +/** + * Represents the database schema for a note. This can be one of the following types: + * -- Comment: a general comment made for an entry or whole timesheet. + * -- Report: a specific report to reflect an incident that happens and requires admin attention, e.g. no-show or late attendance + */ +export const NoteSchema = z.object({ + Type: z.enum(["Comment", "Report"]), + EntryID: z.string(), + AuthorUUID: z.string(), + DateTime: z.number(), + Content: z.string(), + State: z.enum(["Active", "Deleted"]), +}) + +/** + * Represents the database schema for a schedule shift entry, made by a supervisor or admin + */ +export const ScheduleEntrySchema = z.object({ + EntryID: z.string(), + Date: z.number(), + StartDateTime: z.number().optional(), + EndDateTime: z.number().optional(), + AuthorUUID: z.string() +}) + +/** + * Represents the database schema for a clockin/clockout pair in epoch + */ +export const TimeEntrySchema = z.object({ + StartDateTime: z.number().optional(), + EndDateTime: z.number().optional(), + AuthorUUID: z.string(), +}) + + +export enum CellType { + REGULAR = "Time Worked", + PTO = "PTO" +} + +/** + * Represents the database schema for a single shift or entry in the weekly timesheet. + */ +export const TimesheetEntrySchema = z.object({ + Type: z.enum([CellType.REGULAR, CellType.PTO]), + EntryID: z.string(), + Date: z.number(), + AssociateTimes: TimeEntrySchema.optional(), + SupervisorTimes: TimeEntrySchema.optional(), + AdminTimes: TimeEntrySchema.optional(), + Note: z.array(NoteSchema).optional(), +}) + + +// The status is either undefined, for not being at that stage yet, or +// contains the date and author of approving this submission +export const StatusEntryType = z.union( + [z.object({ + Date: z.number(), + AuthorID: z.string() + }), + z.undefined()]); + +// Status type contains the four stages of the pipeline we have defined +export const TimesheetStatus = z.object({ + HoursSubmitted: StatusEntryType, + HoursReviewed: StatusEntryType, + ScheduleSubmitted: StatusEntryType, + Finalized: StatusEntryType +}); + + + +/** + * Represents the database schema for a weekly timesheet + */ +export const TimeSheetSchema = z.object({ + TimesheetID: z.number(), + UserID: z.string(), + StartDate: z.number(), + Status: TimesheetStatus, + CompanyID: z.string(), + HoursData: z.array(TimesheetEntrySchema).default([]), + ScheduleData: z.array(ScheduleEntrySchema).default([]), + WeekNotes: z.array(NoteSchema).default([]), +}) + +export type TimesheetStatus = z.infer +export type TimeEntrySchema = z.infer +export type ScheduleEntrySchema = z.infer +export type NoteSchema = z.infer +export type TimesheetEntrySchema = z.infer +export type TimeSheetSchema = z.infer diff --git a/libs/shared/schemas/src/lib/TimesheetSchema.tsx b/libs/shared/schemas/src/lib/TimesheetSchema.tsx new file mode 100644 index 0000000..bbd835e --- /dev/null +++ b/libs/shared/schemas/src/lib/TimesheetSchema.tsx @@ -0,0 +1,32 @@ +import { z } from "zod"; +import { RowSchema, ScheduledRowSchema, CommentSchema } from './RowSchema'; + +// The status is either undefined, for not being at that stage yet, or +// contains the date and author of approving this submission +export const StatusEntryType = z.union( + [z.object({ + Date: z.number(), + AuthorID: z.string() + }), + z.undefined()]); + +// Status type contains the four stages of the pipeline we have defined +export const StatusType = z.object({ + HoursSubmitted: StatusEntryType, + HoursReviewed: StatusEntryType, + ScheduleSubmitted: StatusEntryType, + Finalized: StatusEntryType +}); + +export const TimeSheetSchema = z.object({ + TimesheetID: z.number(), + UserID: z.string(), + StartDate: z.number(), + Status: StatusType, + CompanyID: z.string(), + TableData: z.array(RowSchema), + ScheduleTableData: z.union([z.undefined(), z.array(ScheduledRowSchema)]), + WeekNotes: z.union([z.undefined(), z.array(CommentSchema)]), +}); + +export type TimeSheetSchema = z.infer; diff --git a/libs/shared/schemas/src/lib/UpdateTimesheet.ts b/libs/shared/schemas/src/lib/UpdateTimesheet.ts new file mode 100644 index 0000000..70e5e12 --- /dev/null +++ b/libs/shared/schemas/src/lib/UpdateTimesheet.ts @@ -0,0 +1,74 @@ +import { z } from "zod"; +import { RowSchema, CommentSchema, ScheduledRowSchema } from "./RowSchema" +import * as dbtypes from './Timesheet' + +/* +------------------------------------------------------------------------------------------------------------------- +------------------------------------------------------------------------------------------------------------------- +---------------------------------DELETE WHEN MONOREPO CREATED------------------------------------------------------ + SEE BACKEND DIRECTORY FOR ALL DOCUMENTATION / COMMENTS +------------------------------------------------------------------------------------------------------------------- +------------------------------------------------------------------------------------------------------------------- + +*/ + +// Currently supported timesheet operations +export const enum TimesheetOperations { + INSERT = "INSERT", + UPDATE = "UPDATE", + DELETE = "DELETE", + STATUS_CHANGE = "STATUS_CHANGE", + CREATE_TIMESHEET = "CREATE_TIMESHEET" +} + + + +export const enum TimesheetListItems { + TABLEDATA = "TABLEDATA", + SCHEDULEDATA = "SCHEDULEDATA", + WEEKNOTES = "WEEKNOTES" +} + +const availableListTypes = z.enum([TimesheetListItems.TABLEDATA, TimesheetListItems.SCHEDULEDATA, TimesheetListItems.WEEKNOTES]) + +export const DeleteRequest = z.object({ + Type: availableListTypes, + Id: z.string() +}) +export type DeleteRequest = z.infer + +export const InsertRequest = z.object({ + Type: availableListTypes, + Item: z.union([RowSchema, CommentSchema, ScheduledRowSchema, dbtypes.TimesheetEntrySchema]), +}) +export type InsertRequest = z.infer +/* + Schema for updating an item from the three possible list of items in the timesheet + Type: The field of the timesheet we are updating from the three supported + Id: the id of the entry we are updating - correlates to that row / entry in the list of items + Attribute: The specific attribute of the object we are updating + Data: The payload we are updating this attribute to be - can be a wide range of things currently +*/ +export const UpdateRequest = z.object({ + Type: availableListTypes, + Id: z.string(), + Attribute: z.string(), + Data: z.any() +}) +export type UpdateRequest = z.infer + + +// The main request body that is used to determine what we should be updating in a request +export const TimesheetUpdateRequest = z.object({ + TimesheetID: z.number(), + Operation: z.enum([ + TimesheetOperations.INSERT, + TimesheetOperations.UPDATE, + TimesheetOperations.DELETE, + TimesheetOperations.STATUS_CHANGE, + TimesheetOperations.CREATE_TIMESHEET + ]), + Payload: z.any(), +}) +export type TimesheetUpdateRequest = z.infer + diff --git a/libs/shared/schemas/src/lib/UserSchema.tsx b/libs/shared/schemas/src/lib/UserSchema.tsx new file mode 100644 index 0000000..a51af17 --- /dev/null +++ b/libs/shared/schemas/src/lib/UserSchema.tsx @@ -0,0 +1,11 @@ +import { z } from "zod"; + +export const UserSchema = z.object({ + UserID: z.string(), + FirstName: z.string(), + LastName: z.string(), + Type: z.enum(["Associate", "Supervisor", "Admin"]), + Picture: z.string().optional(), +}); + +export type UserSchema = z.infer; diff --git a/libs/shared/schemas/tsconfig.json b/libs/shared/schemas/tsconfig.json new file mode 100644 index 0000000..8122543 --- /dev/null +++ b/libs/shared/schemas/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "module": "commonjs", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/libs/shared/schemas/tsconfig.lib.json b/libs/shared/schemas/tsconfig.lib.json new file mode 100644 index 0000000..4befa7f --- /dev/null +++ b/libs/shared/schemas/tsconfig.lib.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "declaration": true, + "types": ["node"] + }, + "include": ["src/**/*.ts"], + "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] +} diff --git a/libs/shared/schemas/tsconfig.spec.json b/libs/shared/schemas/tsconfig.spec.json new file mode 100644 index 0000000..69a251f --- /dev/null +++ b/libs/shared/schemas/tsconfig.spec.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/nx.json b/nx.json index cb17253..906ea42 100644 --- a/nx.json +++ b/nx.json @@ -3,13 +3,8 @@ "targetDefaults": { "build": { "cache": true, - "dependsOn": [ - "^build" - ], - "inputs": [ - "production", - "^production" - ] + "dependsOn": ["^build"], + "inputs": ["production", "^production"] }, "lint": { "cache": true, @@ -22,30 +17,37 @@ }, "@nx/vite:test": { "cache": true, - "inputs": [ - "default", - "^production" - ] + "inputs": ["default", "^production"] }, "e2e": { "cache": true, - "inputs": [ - "default", - "^production" - ] + "inputs": ["default", "^production"] + }, + "@nx/jest:jest": { + "cache": true, + "inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"], + "options": { + "passWithNoTests": true + }, + "configurations": { + "ci": { + "ci": true, + "codeCoverage": true + } + } } }, "namedInputs": { - "default": [ - "{projectRoot}/**/*", - "sharedGlobals" - ], + "default": ["{projectRoot}/**/*", "sharedGlobals"], "production": [ "default", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", "!{projectRoot}/tsconfig.spec.json", "!{projectRoot}/.eslintrc.json", - "!{projectRoot}/eslint.config.js" + "!{projectRoot}/eslint.config.js", + "!{projectRoot}/jest.config.[jt]s", + "!{projectRoot}/src/test-setup.[jt]s", + "!{projectRoot}/test-setup.[jt]s" ], "sharedGlobals": [] }, diff --git a/package-lock.json b/package-lock.json index 272405e..d40eee6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,13 +12,15 @@ "dependencies": { "@swc/helpers": "~0.5.2", "react": "18.2.0", - "react-dom": "18.2.0" + "react-dom": "18.2.0", + "tslib": "^2.3.0" }, "devDependencies": { "@nx/cypress": "17.2.8", "@nx/devkit": "17.2.8", "@nx/eslint": "17.2.8", "@nx/eslint-plugin": "17.2.8", + "@nx/jest": "17.2.8", "@nx/js": "17.2.8", "@nx/playwright": "17.2.8", "@nx/react": "17.2.8", @@ -29,7 +31,8 @@ "@swc/cli": "~0.1.62", "@swc/core": "~1.3.85", "@testing-library/react": "14.0.0", - "@types/node": "18.14.2", + "@types/jest": "^29.4.0", + "@types/node": "18.16.9", "@types/react": "18.2.33", "@types/react-dom": "18.2.14", "@typescript-eslint/eslint-plugin": "^6.9.1", @@ -44,13 +47,18 @@ "eslint-plugin-playwright": "^0.15.3", "eslint-plugin-react": "7.32.2", "eslint-plugin-react-hooks": "4.6.0", + "jest": "^29.4.1", + "jest-environment-node": "^29.4.1", "jsdom": "~22.1.0", "npm-run-all": "^4.1.5", "nx": "17.2.8", "prettier": "^2.6.2", + "ts-jest": "^29.1.0", + "ts-node": "10.9.1", "typescript": "~5.2.2", "vite": "^5.0.0", - "vitest": "~0.34.6" + "vitest": "~0.34.6", + "zod": "^3.21.4" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -736,6 +744,18 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-class-properties": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", @@ -2668,6 +2688,114 @@ "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -2677,6 +2805,215 @@ "node": ">=8" } }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/reporters/node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/@jest/schemas": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", @@ -2689,6 +3026,93 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -2829,6 +3253,15 @@ "@nx/eslint-plugin": "17.2.8" } }, + "node_modules/@nrwl/jest": { + "version": "17.2.8", + "resolved": "https://registry.npmjs.org/@nrwl/jest/-/jest-17.2.8.tgz", + "integrity": "sha512-suyAm+5dj03ZevZW0fEZJSn+au1k6+OGPo4LKQ9Y4u/QJW52d2k0nOzrKu79CwkdKP5PFhjnvPP4Oo93RbNNnA==", + "dev": true, + "dependencies": { + "@nx/jest": "17.2.8" + } + }, "node_modules/@nrwl/js": { "version": "17.2.8", "resolved": "https://registry.npmjs.org/@nrwl/js/-/js-17.2.8.tgz", @@ -2981,9 +3414,30 @@ } } }, - "node_modules/@nx/js": { + "node_modules/@nx/jest": { "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/js/-/js-17.2.8.tgz", + "resolved": "https://registry.npmjs.org/@nx/jest/-/jest-17.2.8.tgz", + "integrity": "sha512-FnwwURXmG+uv5ELHjHd9uVbUioCPjefAOtENcasLJMs2WYeu3zePsru5B8GO9BBM5g2eTmw10Y5f0riAikZjcw==", + "dev": true, + "dependencies": { + "@jest/reporters": "^29.4.1", + "@jest/test-result": "^29.4.1", + "@nrwl/jest": "17.2.8", + "@nx/devkit": "17.2.8", + "@nx/js": "17.2.8", + "@phenomnomnominal/tsquery": "~5.0.1", + "chalk": "^4.1.0", + "identity-obj-proxy": "3.0.0", + "jest-config": "^29.4.1", + "jest-resolve": "^29.4.1", + "jest-util": "^29.4.1", + "resolve.exports": "1.1.0", + "tslib": "^2.3.0" + } + }, + "node_modules/@nx/js": { + "version": "17.2.8", + "resolved": "https://registry.npmjs.org/@nx/js/-/js-17.2.8.tgz", "integrity": "sha512-M91tw9tfSnkoC8pZaC9wNxrgaFU4MeQcgdT08ievaroo77kH4RheySsU1uNc0J58Jk4X4315wu/X7Bf/35m0Mw==", "dev": true, "dependencies": { @@ -3027,6 +3481,33 @@ } } }, + "node_modules/@nx/js/node_modules/babel-plugin-macros": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz", + "integrity": "sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.7.2", + "cosmiconfig": "^6.0.0", + "resolve": "^1.12.0" + } + }, + "node_modules/@nx/js/node_modules/cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "dev": true, + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@nx/linter": { "version": "17.2.8", "resolved": "https://registry.npmjs.org/@nx/linter/-/linter-17.2.8.tgz", @@ -3503,6 +3984,24 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, "node_modules/@svgr/babel-plugin-add-jsx-attribute": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz", @@ -4307,6 +4806,15 @@ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/http-cache-semantics": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", @@ -4319,6 +4827,34 @@ "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", + "dev": true, + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -4341,9 +4877,9 @@ } }, "node_modules/@types/node": { - "version": "18.14.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.2.tgz", - "integrity": "sha512-1uEQxww3DaghA0RxqHx0O0ppVlo43pJhepY51OxuQIKHpjbnYLA7vcdwioNPzIqmC2u3I/dmylcqjlh0e7AyUA==", + "version": "18.16.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.9.tgz", + "integrity": "sha512-IeB32oIV4oGArLrd7znD2rkHQ6EDCM+2Sr76dJnrHwv9OHBTTM6nuDLK9bmikXzPa0ZlWMWtRGo/Uw4mrzQedA==", "dev": true }, "node_modules/@types/parse-json": { @@ -4399,6 +4935,27 @@ "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", "dev": true }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true + }, + "node_modules/@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "6.19.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.19.0.tgz", @@ -5246,6 +5803,33 @@ "node": ">=6" } }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -5270,6 +5854,19 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/arch": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", @@ -5490,6 +6087,27 @@ "dequal": "^2.0.3" } }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, "node_modules/babel-plugin-const-enum": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/babel-plugin-const-enum/-/babel-plugin-const-enum-1.2.0.tgz", @@ -5504,31 +6122,95 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/babel-plugin-macros": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz", - "integrity": "sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", + "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { - "@babel/runtime": "^7.7.2", - "cosmiconfig": "^6.0.0", - "resolve": "^1.12.0" + "@babel/runtime": "^7.12.5", + "cosmiconfig": "^7.0.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">=10", + "npm": ">=6" } }, "node_modules/babel-plugin-macros/node_modules/cosmiconfig": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", - "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", + "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "@types/parse-json": "^4.0.0", - "import-fresh": "^3.1.0", + "import-fresh": "^3.2.1", "parse-json": "^5.0.0", "path-type": "^4.0.0", - "yaml": "^1.7.2" + "yaml": "^1.10.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/babel-plugin-polyfill-corejs2": { @@ -5588,6 +6270,45 @@ "@babel/helper-plugin-utils": "^7.0.0" } }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -5799,6 +6520,27 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "dependencies": { + "node-int64": "^0.4.0" + } + }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -5978,6 +6720,15 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/check-error": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", @@ -6000,6 +6751,27 @@ "node": ">=6.0" } }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", + "dev": true + }, "node_modules/cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -6059,6 +6831,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -6215,6 +7003,27 @@ } } }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -6397,13 +7206,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "node_modules/dedent": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", + "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", "dev": true, - "dependencies": { - "type-detect": "^4.0.0" + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" }, "engines": { "node": ">=6" @@ -6535,6 +7358,15 @@ "node": ">=6" } }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/detect-port": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.5.1.tgz", @@ -6723,6 +7555,18 @@ "integrity": "sha512-osHqhtjojpCsACVnuD11xO5g9xaCyw7Qqn/C2KParkMv42i8jrJJgx3g7mkHfpxwhy9MnOJr8+pKOdZ7qzgizg==", "dev": true }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -7618,6 +8462,31 @@ "node": ">=4" } }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/ext-list": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", @@ -7686,6 +8555,15 @@ "reusify": "^1.0.4" } }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "dependencies": { + "bser": "2.1.1" + } + }, "node_modules/fflate": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.1.tgz", @@ -8048,6 +8926,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", @@ -8218,6 +9105,12 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, + "node_modules/harmony-reflect": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/harmony-reflect/-/harmony-reflect-1.6.2.tgz", + "integrity": "sha512-HIp/n38R9kQjDEziXyDTuW3vvoxxyxjxFzXLrBr18uB47GnSt+G9D29fqrpM5ZkspMcPICud3XsBJQ4Y2URg8g==", + "dev": true + }, "node_modules/has": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", @@ -8464,6 +9357,18 @@ "node": ">=0.10.0" } }, + "node_modules/identity-obj-proxy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz", + "integrity": "sha512-00n6YnVHKrinT9t0d9+5yZC6UBNJANpYEQvL2LlX6Ab9lnmxzIRcEmTPuyGScvl1+jKuCICX1Z0Ab1pPKKdikA==", + "dev": true, + "dependencies": { + "harmony-reflect": "^1.4.6" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -8509,6 +9414,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -8684,6 +9608,15 @@ "node": ">=8" } }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -8944,6 +9877,55 @@ "node": ">=8" } }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz", + "integrity": "sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/istanbul-lib-report": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", @@ -8958,83 +9940,707 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jake": { + "version": "10.8.7", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", + "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", + "dev": true, + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jake/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-changed-files/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/jest-changed-files/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-changed-files/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-haste-map/node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve/node_modules/resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/jest-runner/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", "dev": true, "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" }, "engines": { - "node": ">=10" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/istanbul-reports": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", - "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "node_modules/jest-runtime/node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, "engines": { "node": ">=8" } }, - "node_modules/jake": { - "version": "10.8.7", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", - "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", - "dev": true, - "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.4", - "minimatch": "^3.1.2" - }, - "bin": { - "jake": "bin/cli.js" + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "engines": { - "node": ">=10" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jake/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" }, "engines": { - "node": "*" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-diff": { + "node_modules/jest-validate": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", "jest-get-type": "^29.6.3", + "leven": "^3.1.0", "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -9243,6 +10849,15 @@ "json-buffer": "3.0.1" } }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/language-subtag-registry": { "version": "0.3.22", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", @@ -9258,6 +10873,15 @@ "language-subtag-registry": "~0.3.2" } }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -9380,6 +11004,12 @@ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", "dev": true }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -9491,6 +11121,15 @@ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "dependencies": { + "tmpl": "1.0.5" + } + }, "node_modules/mdn-data": { "version": "2.0.30", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", @@ -9692,6 +11331,12 @@ "tslib": "^2.0.3" } }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, "node_modules/node-machine-id": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/node-machine-id/-/node-machine-id-1.1.12.tgz", @@ -9731,6 +11376,15 @@ "semver": "bin/semver" } }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/normalize-url": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", @@ -10284,6 +11938,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -10450,6 +12113,70 @@ "node": ">= 6" } }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/pkg-types": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", @@ -10610,6 +12337,19 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -10664,6 +12404,22 @@ "node": ">=6" } }, + "node_modules/pure-rand": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.4.tgz", + "integrity": "sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, "node_modules/qs": { "version": "6.11.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", @@ -10956,6 +12712,27 @@ "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", "dev": true }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -10965,6 +12742,15 @@ "node": ">=4" } }, + "node_modules/resolve.exports": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", + "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/responselike": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", @@ -11337,6 +13123,12 @@ "node": ">= 10" } }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -11446,6 +13238,27 @@ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -11499,6 +13312,19 @@ } ] }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -11925,6 +13751,12 @@ "node": ">=8.17.0" } }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -12044,6 +13876,49 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-jest": { + "version": "29.1.2", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz", + "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==", + "dev": true, + "dependencies": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "^7.5.3", + "yargs-parser": "^21.0.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, "node_modules/ts-node": { "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", @@ -12597,6 +14472,15 @@ "node": ">=14" } }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "dependencies": { + "makeerror": "1.0.12" + } + }, "node_modules/watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", @@ -12630,20 +14514,20 @@ } }, "node_modules/webpack": { - "version": "5.89.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz", - "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", + "version": "5.90.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.90.1.tgz", + "integrity": "sha512-SstPdlAC5IvgFnhiRok8hqJo/+ArAbNv7rhU4fnWGHNVfN59HSQFaxZDSAL3IFG2YmqxuRs+IU33milSxbPlog==", "dev": true, "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", + "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.11.5", "@webassemblyjs/wasm-edit": "^1.11.5", "@webassemblyjs/wasm-parser": "^1.11.5", "acorn": "^8.7.1", "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", "enhanced-resolve": "^5.15.0", "es-module-lexer": "^1.2.1", @@ -12657,7 +14541,7 @@ "neo-async": "^2.6.2", "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", + "terser-webpack-plugin": "^5.3.10", "watchpack": "^2.4.0", "webpack-sources": "^3.2.3" }, @@ -12849,6 +14733,19 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/ws": { "version": "8.16.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", @@ -12956,6 +14853,15 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zod": { + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", + "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } } } diff --git a/package.json b/package.json index 46c5a42..b9beb5f 100644 --- a/package.json +++ b/package.json @@ -14,13 +14,15 @@ "dependencies": { "@swc/helpers": "~0.5.2", "react": "18.2.0", - "react-dom": "18.2.0" + "react-dom": "18.2.0", + "tslib": "^2.3.0" }, "devDependencies": { "@nx/cypress": "17.2.8", "@nx/devkit": "17.2.8", "@nx/eslint": "17.2.8", "@nx/eslint-plugin": "17.2.8", + "@nx/jest": "17.2.8", "@nx/js": "17.2.8", "@nx/playwright": "17.2.8", "@nx/react": "17.2.8", @@ -31,7 +33,8 @@ "@swc/cli": "~0.1.62", "@swc/core": "~1.3.85", "@testing-library/react": "14.0.0", - "@types/node": "18.14.2", + "@types/jest": "^29.4.0", + "@types/node": "18.16.9", "@types/react": "18.2.33", "@types/react-dom": "18.2.14", "@typescript-eslint/eslint-plugin": "^6.9.1", @@ -46,12 +49,17 @@ "eslint-plugin-playwright": "^0.15.3", "eslint-plugin-react": "7.32.2", "eslint-plugin-react-hooks": "4.6.0", + "jest": "^29.4.1", + "jest-environment-node": "^29.4.1", "jsdom": "~22.1.0", "npm-run-all": "^4.1.5", "nx": "17.2.8", "prettier": "^2.6.2", + "ts-jest": "^29.1.0", + "ts-node": "10.9.1", "typescript": "~5.2.2", "vite": "^5.0.0", - "vitest": "~0.34.6" + "vitest": "~0.34.6", + "zod": "^3.21.4" } } diff --git a/tsconfig.base.json b/tsconfig.base.json index b73cce6..c37c7d7 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -14,7 +14,9 @@ "skipLibCheck": true, "skipDefaultLibCheck": true, "baseUrl": ".", - "paths": {} + "paths": { + "@org/schemas": ["libs/shared/schemas/src/index.ts"] + } }, "exclude": ["node_modules", "tmp"] } From 22f9dc232d779eef13f8d7a3c02e7dc13d6fdab4 Mon Sep 17 00:00:00 2001 From: izzyconner <32255130+izzyconner@users.noreply.github.com> Date: Sun, 4 Feb 2024 13:38:10 -0500 Subject: [PATCH 02/15] Cleaned up duplicate timesheet schema data in shared lib --- libs/shared/schemas/src/index.ts | 3 +- libs/shared/schemas/src/lib/CellTypes.ts | 2 +- libs/shared/schemas/src/lib/RowSchema.ts | 51 ------------------- libs/shared/schemas/src/lib/Timesheet.ts | 6 +-- .../schemas/src/lib/TimesheetSchema.tsx | 32 ------------ .../shared/schemas/src/lib/UpdateTimesheet.ts | 18 +++---- .../src/lib/{UserSchema.tsx => UserSchema.ts} | 0 7 files changed, 10 insertions(+), 102 deletions(-) delete mode 100644 libs/shared/schemas/src/lib/RowSchema.ts delete mode 100644 libs/shared/schemas/src/lib/TimesheetSchema.tsx rename libs/shared/schemas/src/lib/{UserSchema.tsx => UserSchema.ts} (100%) diff --git a/libs/shared/schemas/src/index.ts b/libs/shared/schemas/src/index.ts index a6c54c6..22588bc 100644 --- a/libs/shared/schemas/src/index.ts +++ b/libs/shared/schemas/src/index.ts @@ -1,5 +1,6 @@ -export * from './lib/RowSchema'; export * from './lib/CellTypes'; export * from './lib/Timesheet'; +export * from './lib/UpdateTimesheet'; +export * from './lib/UserSchema'; diff --git a/libs/shared/schemas/src/lib/CellTypes.ts b/libs/shared/schemas/src/lib/CellTypes.ts index a244f55..42611ab 100644 --- a/libs/shared/schemas/src/lib/CellTypes.ts +++ b/libs/shared/schemas/src/lib/CellTypes.ts @@ -4,7 +4,7 @@ export enum CellType { - Regular = "Time Worked", + REGULAR = "Time Worked", PTO = "PTO" }; diff --git a/libs/shared/schemas/src/lib/RowSchema.ts b/libs/shared/schemas/src/lib/RowSchema.ts deleted file mode 100644 index 20c722e..0000000 --- a/libs/shared/schemas/src/lib/RowSchema.ts +++ /dev/null @@ -1,51 +0,0 @@ -////////////////////////////////////////////////////////////////////////// -// DELETE THIS WHEN MERGED WITH MONOREPO TO DIRECTLY PULL FROM FRONTEND // -////////////////////////////////////////////////////////////////////////// - -import { z } from "zod"; -import {CellType, CommentType, CellStatus} from './CellTypes'; - - -const optionalNumber = z.union([z.undefined(), z.number()]) -const optionalString = z.union([z.undefined(), z.string()]); - - - -export const TimeRowEntry = z.union([z.undefined(), z.object({ - Start: optionalNumber, End: optionalNumber, AuthorID: optionalString -})]); -export type TimeRowEntry = z.infer - -export const CommentSchema = z.object({ - UUID: z.string(), - AuthorID:z.string(), - Type: z.enum([CommentType.Comment, CommentType.Report]), - Timestamp: z.number(), - Content: z.string(), - State: z.enum([CellStatus.Active, CellStatus.Deleted]), -}); - -export type CommentSchema = z.infer - -export const RowType = z.enum([CellType.Regular, CellType.PTO]); -export type RowType = z.infer - -export const RowSchema = z.object({ - UUID: z.string(), - Type: RowType, - Date: z.number(), - Associate: TimeRowEntry, - Supervisor: TimeRowEntry, - Admin: TimeRowEntry, - Comment: z.union([z.undefined(), z.array(CommentSchema)]) -}); -export type RowSchema = z.infer - - -export const ScheduledRowSchema = z.object({ - UUID: z.string(), - Date: z.number(), - Entry: TimeRowEntry -}); - -export type ScheduledRowSchema = z.infer diff --git a/libs/shared/schemas/src/lib/Timesheet.ts b/libs/shared/schemas/src/lib/Timesheet.ts index 949513e..8fcd08a 100644 --- a/libs/shared/schemas/src/lib/Timesheet.ts +++ b/libs/shared/schemas/src/lib/Timesheet.ts @@ -1,4 +1,5 @@ import { z } from "zod"; +import { CellType } from "./CellTypes"; /* ------------------------------------------------------------------------------------------------------------------- @@ -44,11 +45,6 @@ export const TimeEntrySchema = z.object({ }) -export enum CellType { - REGULAR = "Time Worked", - PTO = "PTO" -} - /** * Represents the database schema for a single shift or entry in the weekly timesheet. */ diff --git a/libs/shared/schemas/src/lib/TimesheetSchema.tsx b/libs/shared/schemas/src/lib/TimesheetSchema.tsx deleted file mode 100644 index bbd835e..0000000 --- a/libs/shared/schemas/src/lib/TimesheetSchema.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { z } from "zod"; -import { RowSchema, ScheduledRowSchema, CommentSchema } from './RowSchema'; - -// The status is either undefined, for not being at that stage yet, or -// contains the date and author of approving this submission -export const StatusEntryType = z.union( - [z.object({ - Date: z.number(), - AuthorID: z.string() - }), - z.undefined()]); - -// Status type contains the four stages of the pipeline we have defined -export const StatusType = z.object({ - HoursSubmitted: StatusEntryType, - HoursReviewed: StatusEntryType, - ScheduleSubmitted: StatusEntryType, - Finalized: StatusEntryType -}); - -export const TimeSheetSchema = z.object({ - TimesheetID: z.number(), - UserID: z.string(), - StartDate: z.number(), - Status: StatusType, - CompanyID: z.string(), - TableData: z.array(RowSchema), - ScheduleTableData: z.union([z.undefined(), z.array(ScheduledRowSchema)]), - WeekNotes: z.union([z.undefined(), z.array(CommentSchema)]), -}); - -export type TimeSheetSchema = z.infer; diff --git a/libs/shared/schemas/src/lib/UpdateTimesheet.ts b/libs/shared/schemas/src/lib/UpdateTimesheet.ts index 70e5e12..9dfda42 100644 --- a/libs/shared/schemas/src/lib/UpdateTimesheet.ts +++ b/libs/shared/schemas/src/lib/UpdateTimesheet.ts @@ -1,16 +1,10 @@ import { z } from "zod"; -import { RowSchema, CommentSchema, ScheduledRowSchema } from "./RowSchema" -import * as dbtypes from './Timesheet' +import { NoteSchema, TimesheetEntrySchema, ScheduleEntrySchema } from "./Timesheet"; -/* -------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------- ----------------------------------DELETE WHEN MONOREPO CREATED------------------------------------------------------ - SEE BACKEND DIRECTORY FOR ALL DOCUMENTATION / COMMENTS -------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------- - -*/ +/** + * Schemas for all 'UpdateTimesheet' requests. This includes inserting new data, updating current data, deleting data, + * creating a new week's timesheet, and changing the status of a current timesheet. + */ // Currently supported timesheet operations export const enum TimesheetOperations { @@ -39,7 +33,7 @@ export type DeleteRequest = z.infer export const InsertRequest = z.object({ Type: availableListTypes, - Item: z.union([RowSchema, CommentSchema, ScheduledRowSchema, dbtypes.TimesheetEntrySchema]), + Item: z.union([TimesheetEntrySchema, NoteSchema, ScheduleEntrySchema]), }) export type InsertRequest = z.infer /* diff --git a/libs/shared/schemas/src/lib/UserSchema.tsx b/libs/shared/schemas/src/lib/UserSchema.ts similarity index 100% rename from libs/shared/schemas/src/lib/UserSchema.tsx rename to libs/shared/schemas/src/lib/UserSchema.ts From c84cf6a744db52eb551a620cd8b93e18f606bf47 Mon Sep 17 00:00:00 2001 From: izzyconner <32255130+izzyconner@users.noreply.github.com> Date: Sun, 4 Feb 2024 13:58:41 -0500 Subject: [PATCH 03/15] Starting to transition over schemas to shared schemas --- .vscode/settings.json | 2 + apps/backend/src/db/frontend/CellTypes.ts | 28 ---------- apps/backend/src/db/frontend/RowSchema.ts | 51 ------------------- .../src/db/frontend/TimesheetSchema.ts | 36 ------------- .../src/db/timesheets/EntryOperations.ts | 27 +++++----- apps/backend/tsconfig.json | 3 ++ libs/shared/schemas/src/lib/CellTypes.ts | 5 -- .../shared/schemas/src/lib/UpdateTimesheet.ts | 2 - 8 files changed, 17 insertions(+), 137 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 apps/backend/src/db/frontend/CellTypes.ts delete mode 100644 apps/backend/src/db/frontend/RowSchema.ts delete mode 100644 apps/backend/src/db/frontend/TimesheetSchema.ts diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7a73a41 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/apps/backend/src/db/frontend/CellTypes.ts b/apps/backend/src/db/frontend/CellTypes.ts deleted file mode 100644 index a244f55..0000000 --- a/apps/backend/src/db/frontend/CellTypes.ts +++ /dev/null @@ -1,28 +0,0 @@ -////////////////////////////////////////////////////////////////////////// -// DELETE THIS WHEN MERGED WITH MONOREPO TO DIRECTLY PULL FROM FRONTEND // -////////////////////////////////////////////////////////////////////////// - - -export enum CellType { - Regular = "Time Worked", - PTO = "PTO" -}; - -export enum CellStatus { - Active="Active", - Deleted="Deleted" -} - -export enum CommentType { - Comment = "Comment", - Report = "Report", -}; - -export const enum Review_Stages { - UNSUBMITTED = "Not-Submitted", - EMPLOYEE_SUBMITTED = "Employee Submitted", - ADMIN_REVIEW = "Review (Breaktime)", - APPROVED = "Approved" -}; - -export const TABLE_COLUMNS = ['Type', 'Date','Clock-in','Clock-Out','Hours','Comment']; \ No newline at end of file diff --git a/apps/backend/src/db/frontend/RowSchema.ts b/apps/backend/src/db/frontend/RowSchema.ts deleted file mode 100644 index 8c3c508..0000000 --- a/apps/backend/src/db/frontend/RowSchema.ts +++ /dev/null @@ -1,51 +0,0 @@ -////////////////////////////////////////////////////////////////////////// -// DELETE THIS WHEN MERGED WITH MONOREPO TO DIRECTLY PULL FROM FRONTEND // -////////////////////////////////////////////////////////////////////////// - -import { z } from "zod"; -import {CellType, CommentType, Review_Stages, CellStatus} from './CellTypes'; - - -const optionalNumber = z.union([z.undefined(), z.number()]) -const optionalString = z.union([z.undefined(), z.string()]); - - - -export const TimeRowEntry = z.union([z.undefined(), z.object({ - Start: optionalNumber, End: optionalNumber, AuthorID: optionalString -})]); -export type TimeRowEntry = z.infer - -export const CommentSchema = z.object({ - UUID: z.string(), - AuthorID:z.string(), - Type: z.enum([CommentType.Comment, CommentType.Report]), - Timestamp: z.number(), - Content: z.string(), - State: z.enum([CellStatus.Active, CellStatus.Deleted]), -}); - -export type CommentSchema = z.infer - -export const RowType = z.enum([CellType.Regular, CellType.PTO]); -export type RowType = z.infer - -export const RowSchema = z.object({ - UUID: z.string(), - Type: RowType, - Date: z.number(), - Associate: TimeRowEntry, - Supervisor: TimeRowEntry, - Admin: TimeRowEntry, - Comment: z.union([z.undefined(), z.array(CommentSchema)]) -}); -export type RowSchema = z.infer - - -export const ScheduledRowSchema = z.object({ - UUID: z.string(), - Date: z.number(), - Entry: TimeRowEntry -}); - -export type ScheduledRowSchema = z.infer diff --git a/apps/backend/src/db/frontend/TimesheetSchema.ts b/apps/backend/src/db/frontend/TimesheetSchema.ts deleted file mode 100644 index 9e9b127..0000000 --- a/apps/backend/src/db/frontend/TimesheetSchema.ts +++ /dev/null @@ -1,36 +0,0 @@ -////////////////////////////////////////////////////////////////////////// -// DELETE THIS WHEN MERGED WITH MONOREPO TO DIRECTLY PULL FROM FRONTEND // -////////////////////////////////////////////////////////////////////////// - -import { z } from "zod"; -import {RowSchema, ScheduledRowSchema, CommentSchema} from './RowSchema'; - -// The status is either undefined, for not being at that stage yet, or -// contains the date and author of approving this submission -export const StatusEntryType = z.union( - [z.object({ - Date: z.number(), - AuthorID: z.string() - }), - z.undefined()]); - -// Status type contains the three stages of the pipeline we have defined -export const StatusType = z.object({ - HoursSubmitted: StatusEntryType, - HoursReviewed: StatusEntryType, - Finalized: StatusEntryType -}); -export type StatusType = z.infer - -export const FrontendTimeSheetSchema = z.object({ - TimesheetID: z.number(), - UserID: z.string(), - StartDate: z.number(), - Status: StatusType, - CompanyID: z.string(), - TableData: z.array(RowSchema), - ScheduleTableData: z.union([z.undefined(), z.array(ScheduledRowSchema)]), - WeekNotes: z.union([z.undefined(), z.array(CommentSchema)]), -}); - -export type FrontendTimeSheetSchema = z.infer diff --git a/apps/backend/src/db/timesheets/EntryOperations.ts b/apps/backend/src/db/timesheets/EntryOperations.ts index f96c903..617cc37 100644 --- a/apps/backend/src/db/timesheets/EntryOperations.ts +++ b/apps/backend/src/db/timesheets/EntryOperations.ts @@ -1,8 +1,5 @@ -import * as frontendRowTypes from '../frontend/RowSchema' import * as dbTimesheetTypes from '../schemas/Timesheet' -import * as requestSchemas from '../schemas/UpdateTimesheet' -import {FrontendTimeSheetSchema} from '../frontend/TimesheetSchema' -import * as frontendTypes from '../frontend/CellTypes' +import * as sharedSchemas from '@org/schemas'; /* Code for converting from the frontend to our backend equivalents. Useful for actually processing this to be stored in our database / align with what our @@ -37,19 +34,19 @@ export class frontendEntryConversions { /* Delegate that converts the item we are inserting to its database equivalent so that it can actually exist on the table */ - public static insertConversion(body: requestSchemas.InsertRequest) : requestSchemas.InsertRequest { + public static insertConversion(body: sharedSchemas.InsertRequest) : sharedSchemas.InsertRequest { switch (body.Type) { - case requestSchemas.TimesheetListItems.TABLEDATA: + case sharedSchemas.TimesheetListItems.TABLEDATA: return { ...body, - Item: this.toDBRow(frontendRowTypes.RowSchema.parse(body.Item)) + Item: this.toDBRow(sharedSchemas.TimesheetEntrySchema.parse(body.Item)) } - case requestSchemas.TimesheetListItems.SCHEDULEDATA: + case sharedSchemas.TimesheetListItems.SCHEDULEDATA: throw new Error("Not yet implemented") - case requestSchemas.TimesheetListItems.WEEKNOTES: + case sharedSchemas.TimesheetListItems.WEEKNOTES: throw new Error("Not yet implemented") default: @@ -60,9 +57,9 @@ export class frontendEntryConversions { /* Delegate that converts the item we are updating to its database equivalent so that it can actually exist on the table */ - public static updateConversion(body: requestSchemas.UpdateRequest) : requestSchemas.UpdateRequest { + public static updateConversion(body: sharedSchemas.UpdateRequest) : sharedSchemas.UpdateRequest { switch (body.Type) { - case requestSchemas.TimesheetListItems.TABLEDATA: + case sharedSchemas.TimesheetListItems.TABLEDATA: const convertedKey = this.hoursDataMappings[body.Attribute].finalKey; const convertedValue = this.hoursDataMappings[body.Attribute].conversionFn(body.Data) @@ -71,9 +68,9 @@ export class frontendEntryConversions { Attribute: convertedKey, Data: convertedValue } - case requestSchemas.TimesheetListItems.SCHEDULEDATA: + case sharedSchemas.TimesheetListItems.SCHEDULEDATA: throw new Error("Not yet implemented") - case requestSchemas.TimesheetListItems.WEEKNOTES: + case sharedSchemas.TimesheetListItems.WEEKNOTES: throw new Error("Not yet implemented") default: throw new Error("Invalid conversion type provided"); @@ -108,9 +105,9 @@ export class frontendEntryConversions { } // Converts a frontend cell type to our database equivalent. - private static toDBType(entryType: frontendRowTypes.RowType): dbTimesheetTypes.CellType { + private static toDBType(entryType: sharedSchemas..RowType): dbTimesheetTypes.CellType { switch (entryType) { - case frontendTypes.CellType.Regular: + case sharedSchemas.CellType.REGULAR: return dbTimesheetTypes.CellType.REGULAR; case frontendTypes.CellType.PTO: return dbTimesheetTypes.CellType.PTO; diff --git a/apps/backend/tsconfig.json b/apps/backend/tsconfig.json index adb614c..59174fe 100644 --- a/apps/backend/tsconfig.json +++ b/apps/backend/tsconfig.json @@ -10,6 +10,9 @@ "sourceMap": true, "outDir": "./dist", "baseUrl": "./", + "paths": { + "@org/schemas": ["../../libs/shared/schemas/src/index.ts"] + }, "incremental": true, "skipLibCheck": true, "strictNullChecks": false, diff --git a/libs/shared/schemas/src/lib/CellTypes.ts b/libs/shared/schemas/src/lib/CellTypes.ts index 42611ab..fbf91cb 100644 --- a/libs/shared/schemas/src/lib/CellTypes.ts +++ b/libs/shared/schemas/src/lib/CellTypes.ts @@ -1,8 +1,3 @@ -////////////////////////////////////////////////////////////////////////// -// DELETE THIS WHEN MERGED WITH MONOREPO TO DIRECTLY PULL FROM FRONTEND // -////////////////////////////////////////////////////////////////////////// - - export enum CellType { REGULAR = "Time Worked", PTO = "PTO" diff --git a/libs/shared/schemas/src/lib/UpdateTimesheet.ts b/libs/shared/schemas/src/lib/UpdateTimesheet.ts index 9dfda42..325b167 100644 --- a/libs/shared/schemas/src/lib/UpdateTimesheet.ts +++ b/libs/shared/schemas/src/lib/UpdateTimesheet.ts @@ -15,8 +15,6 @@ export const enum TimesheetOperations { CREATE_TIMESHEET = "CREATE_TIMESHEET" } - - export const enum TimesheetListItems { TABLEDATA = "TABLEDATA", SCHEDULEDATA = "SCHEDULEDATA", From 76c43d7e4bc32affe963ec87cdab6af64b2866bf Mon Sep 17 00:00:00 2001 From: izzyconner <32255130+izzyconner@users.noreply.github.com> Date: Sun, 3 Mar 2024 16:45:15 -0500 Subject: [PATCH 04/15] Adding frontend schemas to libs --- apps/backend/src/aws/auth.controller.ts | 10 +- .../src/aws/cognito/cognito.wrapper.ts | 1 - apps/backend/src/db/Timesheet.ts | 80 ------------- .../{Timesheet.ts => DynamoTimesheet.ts} | 40 ++----- .../backend/src/db/schemas/UpdateTimesheet.ts | 108 ------------------ .../src/db/timesheets/EntryOperations.ts | 29 ++--- apps/backend/src/db/timesheets/Formatter.ts | 28 ++--- .../src/db/timesheets/FrontendConversions.ts | 44 +++---- .../src/db/timesheets/ItemsOperations.ts | 34 +++--- ...imesheet.ts => OperationRequestHandler.ts} | 7 +- apps/backend/src/dynamodb.ts | 6 +- apps/backend/test/UploadTimesheet.ts | 8 +- .../src/components/TimeCardPage/types.tsx | 30 ----- libs/shared/schemas/src/index.ts | 8 +- libs/shared/schemas/src/lib/CellTypes.ts | 8 +- .../{Timesheet.ts => Timesheet-backenddb.ts} | 2 - libs/shared/schemas/src/lib/TimesheetRow.ts | 50 ++++++++ .../shared/schemas/src/lib/UpdateTimesheet.ts | 65 ++++++++--- libs/shared/timesheet-schemas/.eslintrc.json | 25 ++++ libs/shared/timesheet-schemas/README.md | 11 ++ libs/shared/timesheet-schemas/jest.config.ts | 11 ++ libs/shared/timesheet-schemas/package.json | 10 ++ libs/shared/timesheet-schemas/project.json | 30 +++++ libs/shared/timesheet-schemas/src/index.ts | 1 + .../src/lib/timesheet-schemas.spec.ts | 7 ++ .../src/lib/timesheet-schemas.ts | 3 + libs/shared/timesheet-schemas/tsconfig.json | 22 ++++ .../timesheet-schemas/tsconfig.lib.json | 10 ++ .../timesheet-schemas/tsconfig.spec.json | 14 +++ tsconfig.base.json | 3 +- 30 files changed, 347 insertions(+), 358 deletions(-) delete mode 100644 apps/backend/src/db/Timesheet.ts rename apps/backend/src/db/schemas/{Timesheet.ts => DynamoTimesheet.ts} (63%) delete mode 100644 apps/backend/src/db/schemas/UpdateTimesheet.ts rename apps/backend/src/db/timesheets/{UploadTimesheet.ts => OperationRequestHandler.ts} (96%) rename libs/shared/schemas/src/lib/{Timesheet.ts => Timesheet-backenddb.ts} (99%) create mode 100644 libs/shared/schemas/src/lib/TimesheetRow.ts create mode 100644 libs/shared/timesheet-schemas/.eslintrc.json create mode 100644 libs/shared/timesheet-schemas/README.md create mode 100644 libs/shared/timesheet-schemas/jest.config.ts create mode 100644 libs/shared/timesheet-schemas/package.json create mode 100644 libs/shared/timesheet-schemas/project.json create mode 100644 libs/shared/timesheet-schemas/src/index.ts create mode 100644 libs/shared/timesheet-schemas/src/lib/timesheet-schemas.spec.ts create mode 100644 libs/shared/timesheet-schemas/src/lib/timesheet-schemas.ts create mode 100644 libs/shared/timesheet-schemas/tsconfig.json create mode 100644 libs/shared/timesheet-schemas/tsconfig.lib.json create mode 100644 libs/shared/timesheet-schemas/tsconfig.spec.json diff --git a/apps/backend/src/aws/auth.controller.ts b/apps/backend/src/aws/auth.controller.ts index 52831fb..b729e39 100644 --- a/apps/backend/src/aws/auth.controller.ts +++ b/apps/backend/src/aws/auth.controller.ts @@ -9,10 +9,10 @@ import { import { AuthService } from "./auth.service"; import { WriteEntryToTable, UserTimesheets } from "../dynamodb"; import TokenClient from './cognito/cognito.keyparser' -import { TimeSheetSchema } from 'src/db/schemas/Timesheet'; -import * as frontendTimesheetSchemas from 'src/db/schemas/Timesheet' +import { DynamoTimesheetSchema } from 'src/db/schemas/DynamoTimesheet'; +import * as frontendTimesheetSchemas from 'src/db/schemas/DynamoTimesheet' import { RolesGuard } from 'src/utils/guards/roles.guard'; -import { UploadTimesheet } from 'src/db/timesheets/UploadTimesheet'; +import { OperationRequestHandler } from 'src/db/timesheets/OperationRequestHandler'; import { TimesheetUpdateRequest } from 'src/db/schemas/UpdateTimesheet'; import { Formatter } from 'src/db/timesheets/Formatter'; @@ -21,7 +21,7 @@ import { Formatter } from 'src/db/timesheets/Formatter'; @UseGuards(RolesGuard) export class AuthController { - uploadApi = new UploadTimesheet(); + uploadApi = new OperationRequestHandler(); constructor(private authService: AuthService) {} @@ -44,7 +44,7 @@ export class AuthController { @Get("timesheet") //@Roles('breaktime-management-role') - public async grab_timesheets(@Headers() headers: any): Promise { + public async grab_timesheets(@Headers() headers: any): Promise { const userId = await TokenClient.grabUserID(headers); if (userId) { diff --git a/apps/backend/src/aws/cognito/cognito.wrapper.ts b/apps/backend/src/aws/cognito/cognito.wrapper.ts index 3236c1e..421dd7e 100644 --- a/apps/backend/src/aws/cognito/cognito.wrapper.ts +++ b/apps/backend/src/aws/cognito/cognito.wrapper.ts @@ -21,7 +21,6 @@ export class CognitoWrapper { clientId: process.env.AWS_ACCESS_KEY, }); - // TODO : uhhhhh does this require no credentials? I think that it may have something to with how we set up credentialproviders, but not sure... Can anyone get our users' attributes if they have our region and user pool id? serviceProvider = new CognitoIdentityProviderClient({ region: process.env.AWS_USER_POOL_REGION, }); diff --git a/apps/backend/src/db/Timesheet.ts b/apps/backend/src/db/Timesheet.ts deleted file mode 100644 index 0f9533e..0000000 --- a/apps/backend/src/db/Timesheet.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { z } from "zod"; - -/** - * Represents the database schema for a note. This can be one of the following types: - * -- Comment: a general comment made for an entry or whole timesheet. - * -- Report: a specific report to reflect an incident that happens and requires admin attention, e.g. no-show or late attendance - */ -export const NoteSchema = z.object({ - Type: z.enum(["Comment", "Report"]), - AuthorUUID: z.string().uuid(), - DateTime: z.number(), - Content: z.string(), - State: z.enum(["Active", "Deleted"]), -}); - -/** - * Represents the database schema for a schedule shift entry, made by a supervisor or admin - */ -export const ScheduleEntrySchema = z.object({ - StartDateTime: z.number(), - EndDateTime: z.number(), -}); - -/** - * Represents the database schema for a clockin/clockout pair in epoch - */ -export const TimeEntrySchema = z.object({ - StartDateTime: z.number(), - EndDateTime: z.number(), -}); - -/** - * Represents the database schema for the status of a timesheet. This could be one of the following types: - * -- HoursSubmitted (Associate has submitted their hours worked) - * -- HoursReviewed (Supervisor has reviewed and approved the associate-submitted hours) - * -- ScheduleSubmitted (Supervisor has submitted the scheduled hours) - * -- Finalized (Admin has approved the submitted hours and schedule, and resolved any issue necessary) - * - * SubmittedDate reflects the time of last submission, whether from associate, supervisor, or admin. - */ -export const StatusSchema = z.object({ - StatusType: z.enum([ - "HoursSubmitted", - "HoursReviewed", - "Finalized", - ]), - SubmittedDateTime: z.number(), -}); - -/** - * Represents the database schema for a single shift or entry in the weekly timesheet. - */ -export const TimesheetEntrySchema = z.object({ - AssociateTimes: TimeEntrySchema.optional(), - SupervisorTimes: TimeEntrySchema.optional(), - AdminTimes: TimeEntrySchema.optional(), - Note: NoteSchema.optional(), -}); - -/** - * Represents the database schema for a weekly timesheet - */ -export const TimeSheetSchema = z.object({ - TimesheetID: z.number(), - UserID: z.string().uuid(), - StartDate: z.number(), - StatusList: z.array(StatusSchema), // TODO: This is no longer correct schema for the database. This should be it's own object - CompanyID: z.string(), - HoursData: z.array(TimesheetEntrySchema).default([]), - ScheduleData: z.array(ScheduleEntrySchema).default([]), - WeekNotes: z.array(NoteSchema).default([]), -}); - -export type TimeSheetSchema = z.infer; - -export enum TimesheetStatus { - HOURS_SUBMITTED="HoursSubmitted", - HOURS_REVIEWED="HoursReviewed", - FINALIZED="Finalized" -} diff --git a/apps/backend/src/db/schemas/Timesheet.ts b/apps/backend/src/db/schemas/DynamoTimesheet.ts similarity index 63% rename from apps/backend/src/db/schemas/Timesheet.ts rename to apps/backend/src/db/schemas/DynamoTimesheet.ts index 7965309..eaede5e 100644 --- a/apps/backend/src/db/schemas/Timesheet.ts +++ b/apps/backend/src/db/schemas/DynamoTimesheet.ts @@ -1,4 +1,5 @@ import { z } from "zod"; + /** * Represents the database schema for a note. This can be one of the following types: * -- Comment: a general comment made for an entry or whole timesheet. @@ -13,17 +14,6 @@ export const NoteSchema = z.object({ State: z.enum(["Active", "Deleted"]), }) -/** - * Represents the database schema for a schedule shift entry, made by a supervisor or admin - */ -export const ScheduleEntrySchema = z.object({ - EntryID: z.string(), - Date: z.number(), - StartDateTime: z.number().optional(), - EndDateTime: z.number().optional(), - AuthorUUID: z.string() -}) - /** * Represents the database schema for a clockin/clockout pair in epoch */ @@ -33,23 +23,22 @@ export const TimeEntrySchema = z.object({ AuthorUUID: z.string(), }) - /* Supported type of cells for each row in a timesheet @REGULAR - a regular cell @PTO - Cell signifying paid time off (PTO) */ -export enum CellType { +export enum DynamoCellType { REGULAR_LEGACY = "Regular", // No longer using this format for data, but some older timesheet entries may have the 'legacy' type REGULAR = "Time Worked", PTO = "PTO" } /** - * Represents the database schema for a single shift or entry in the weekly timesheet. + * Represents the database schema for a single shift (visually, a row) in the weekly timesheet. */ -export const TimesheetEntrySchema = z.object({ - Type: z.enum([CellType.REGULAR, CellType.REGULAR_LEGACY, CellType.PTO]).transform((cellType) => cellType === CellType.REGULAR_LEGACY ? CellType.REGULAR : cellType), +export const ShiftSchema = z.object({ + Type: z.enum([DynamoCellType.REGULAR, DynamoCellType.REGULAR_LEGACY, DynamoCellType.PTO]).transform((cellType) => cellType === DynamoCellType.REGULAR_LEGACY ? DynamoCellType.REGULAR : cellType), EntryID: z.string(), Date: z.number(), AssociateTimes: TimeEntrySchema.optional(), @@ -58,7 +47,6 @@ export const TimesheetEntrySchema = z.object({ Note: z.array(NoteSchema).optional(), }) - // The status is either undefined, for not being at that stage yet, or // contains the date and author of approving this submission export const StatusEntryType = z.union( @@ -75,25 +63,21 @@ export const TimesheetStatus = z.object({ Finalized: StatusEntryType }); - - /** * Represents the database schema for a weekly timesheet */ -export const TimeSheetSchema = z.object({ +export const TimesheetSchema = z.object({ TimesheetID: z.number(), UserID: z.string(), StartDate: z.number(), Status: TimesheetStatus, CompanyID: z.string(), - HoursData: z.array(TimesheetEntrySchema).default([]), - ScheduleData: z.array(ScheduleEntrySchema).default([]), + HoursData: z.array(ShiftSchema).default([]), WeekNotes: z.array(NoteSchema).default([]), }) -export type TimesheetStatus = z.infer -export type TimeEntrySchema = z.infer -export type ScheduleEntrySchema = z.infer -export type NoteSchema = z.infer -export type TimesheetEntrySchema = z.infer -export type TimeSheetSchema = z.infer +export type DynamoStatusSchema = z.infer +export type DynamoTimeEntrySchema = z.infer +export type DynamoNoteSchema = z.infer +export type DynamoShiftSchema = z.infer +export type DynamoTimesheetSchema = z.infer \ No newline at end of file diff --git a/apps/backend/src/db/schemas/UpdateTimesheet.ts b/apps/backend/src/db/schemas/UpdateTimesheet.ts deleted file mode 100644 index 0275c7f..0000000 --- a/apps/backend/src/db/schemas/UpdateTimesheet.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { z } from "zod"; -import { RowSchema, CommentSchema, ScheduledRowSchema } from "../frontend/RowSchema"; -import * as dbTypes from '../schemas/Timesheet' -import { TimesheetStatus } from "../Timesheet"; - -/* - The supported timesheet operations currently supported. - Most operations relate to items that are inside the timesheet, whether it is the rows of the timesheet, the comments someone left - on it for example. - - INSERT - Inserting an item into the timesheet - UPDATE - Updating a specific item in the timesheet - DELETE - Deleting a speciic item in the timesheet - - STATUS_CHANGE - When the timesheet has been submitted / should be advanced to the next stage - CREATE-TIMESHEET - Operation for creating a timesheet, if it would be useful to have in the future. -*/ -export const enum TimesheetOperations { - INSERT = "INSERT", - UPDATE = "UPDATE", - DELETE = "DELETE", - STATUS_CHANGE = "STATUS_CHANGE", - CREATE_TIMESHEET = "CREATE_TIMESHEET" -} - - -/* - The available types of items that are currently supported in the timesheet that list operations can be performed on. - TABLEDATA - the rows of the timesheet- basically their worked schedule - SCHEDULEDATA - the expected schedule they should have worked - WEEKNOTES - the comments left by an employer for that week -*/ -export const enum TimesheetListItems { - TABLEDATA = "TABLEDATA", - SCHEDULEDATA = "SCHEDULEDATA", // TODO : delete this - WEEKNOTES = "WEEKNOTES" -} - -const availableListTypes = z.enum([TimesheetListItems.TABLEDATA, TimesheetListItems.SCHEDULEDATA, TimesheetListItems.WEEKNOTES]) - -/* - The schema for a delete request - @Type: The type of the item this delete request is processing - see available types in TimesheetListItems - @Id: The id of the item we are deleting - to know what to remove -*/ -export const DeleteRequest = z.object({ - Type: availableListTypes, - Id: z.string() -}) -export type DeleteRequest = z.infer - -/* - The schema for an insert request for an item - @Type: The type of the item that we are inserting, to know what we should be adding this item to - @Item: The item we are actually inserting, should be the actual item itself. -*/ -export const InsertRequest = z.object({ - Type: availableListTypes, - Item: z.union([RowSchema, CommentSchema, ScheduledRowSchema, dbTypes.TimesheetEntrySchema]), -}) -export type InsertRequest = z.infer -/* - Schema for updating an item from the three possible list of items in the timesheet - @Type: The field of the timesheet we are updating from the three supported - @Id: the id of the entry we are updating - correlates to that row / entry in the list of items - @Attribute: The specific attribute of the object we are updating - @Data: The payload we are updating this attribute to be - can be a wide range of things currently -*/ -export const UpdateRequest = z.object({ - Type: availableListTypes, - Id: z.string(), - Attribute: z.string(), - Data: z.any() -}) -export type UpdateRequest = z.infer - -/* - Schema for changing the status of a timesheet - @TimesheetId: The id of the timesheet we are updating - @AssociateId: The id of the associate whose timesheet is being submitted -*/ -export const StatusChangeRequest = z.object({ - TimesheetId: z.number(), - AssociateId: z.string(), - authorId: z.string(), - dateSubmitted: z.number(), - statusType: z.enum([TimesheetStatus.FINALIZED, TimesheetStatus.HOURS_REVIEWED, TimesheetStatus.HOURS_SUBMITTED]) -}) -export type StatusChangeRequest = z.infer - -/* The main request body that is used to determine what we should be updating in a request - @TimesheetID: The id of the timesheet we are updating - @Operation: The type of operation we are performing on this timesheet - @Payload: The contents to be used in the operation for updating this. -*/ -export const TimesheetUpdateRequest = z.object({ - TimesheetID: z.number(), - Operation: z.enum([ - TimesheetOperations.INSERT, - TimesheetOperations.UPDATE, - TimesheetOperations.DELETE, - TimesheetOperations.STATUS_CHANGE, - TimesheetOperations.CREATE_TIMESHEET - ]), - Payload: z.any() -}) -export type TimesheetUpdateRequest = z.infer - diff --git a/apps/backend/src/db/timesheets/EntryOperations.ts b/apps/backend/src/db/timesheets/EntryOperations.ts index 617cc37..c376e09 100644 --- a/apps/backend/src/db/timesheets/EntryOperations.ts +++ b/apps/backend/src/db/timesheets/EntryOperations.ts @@ -1,6 +1,9 @@ -import * as dbTimesheetTypes from '../schemas/Timesheet' -import * as sharedSchemas from '@org/schemas'; +import * as dbTimesheetTypes from '../schemas/DynamoTimesheet' +import {UpdateTimesheetRequests, TimesheetSchemas} from '@org/schemas'; + +// TODO : As we are shifting towards a shared schema system, we will move forward with an 'external' schema that handles dynamo data, and an 'internal' schema that works as the shared model of our data between the frontend and backend. +// Therefore, this file should be deprecated once the shift is complete. /* Code for converting from the frontend to our backend equivalents. Useful for actually processing this to be stored in our database / align with what our backend expects to see in this data. @@ -34,13 +37,13 @@ export class frontendEntryConversions { /* Delegate that converts the item we are inserting to its database equivalent so that it can actually exist on the table */ - public static insertConversion(body: sharedSchemas.InsertRequest) : sharedSchemas.InsertRequest { + public static insertConversion(body: UpdateTimesheetRequests.InsertRequest) : UpdateTimesheetRequests.InsertRequest { switch (body.Type) { - case sharedSchemas.TimesheetListItems.TABLEDATA: + case TimesheetSchemas.TimesheetListItems.TABLEDATA: return { ...body, - Item: this.toDBRow(sharedSchemas.TimesheetEntrySchema.parse(body.Item)) + Item: this.toDBRow(TimesheetSchemas.TimesheetEntrySchema.parse(body.Item)) } case sharedSchemas.TimesheetListItems.SCHEDULEDATA: @@ -80,8 +83,8 @@ export class frontendEntryConversions { /* Converts a row in our timesheet to our database equivalent from frontend. */ - private static toDBRow(row: frontendRowTypes.RowSchema): dbTimesheetTypes.TimesheetEntrySchema { - return dbTimesheetTypes.TimesheetEntrySchema.parse({ + private static toDBRow(row: frontendRowTypes.RowSchema): dbTimesheetTypes.DynamoShiftSchema { + return dbTimesheetTypes.ShiftSchema.parse({ Type: this.toDBType(row.Type), EntryID: row.UUID, Date: row.Date, @@ -93,7 +96,7 @@ export class frontendEntryConversions { } // Converts a timesheet entry to our database equivalent from frontend. - private static toDBRowEntry(row: frontendRowTypes.TimeRowEntry | undefined): dbTimesheetTypes.TimeEntrySchema | undefined{ + private static toDBRowEntry(row: frontendRowTypes.TimeRowEntry | undefined): dbTimesheetTypes.DynamoTimeEntrySchema | undefined{ if (row !== undefined) { return dbTimesheetTypes.TimeEntrySchema.parse({ StartDateTime: row.Start, @@ -105,19 +108,19 @@ export class frontendEntryConversions { } // Converts a frontend cell type to our database equivalent. - private static toDBType(entryType: sharedSchemas..RowType): dbTimesheetTypes.CellType { + private static toDBType(entryType: sharedSchemas..RowType): dbTimesheetTypes.DynamoCellType { switch (entryType) { case sharedSchemas.CellType.REGULAR: - return dbTimesheetTypes.CellType.REGULAR; + return dbTimesheetTypes.DynamoCellType.REGULAR; case frontendTypes.CellType.PTO: - return dbTimesheetTypes.CellType.PTO; + return dbTimesheetTypes.DynamoCellType.PTO; default: return undefined } } // Converts from our frontend week comments to our database equivalents. - private static toDBNotes(comments: frontendRowTypes.CommentSchema[] | undefined): dbTimesheetTypes.NoteSchema[] | undefined { + private static toDBNotes(comments: frontendRowTypes.CommentSchema[] | undefined): dbTimesheetTypes.DynamoNoteSchema[] | undefined { if (comments !== undefined) { return comments.map((comment) => frontendEntryConversions.toDBNote(comment)) @@ -126,7 +129,7 @@ export class frontendEntryConversions { } // Converts a singular week comment / note from our frontend to database. - private static toDBNote(comment: frontendRowTypes.CommentSchema | undefined): dbTimesheetTypes.NoteSchema | undefined { + private static toDBNote(comment: frontendRowTypes.CommentSchema | undefined): dbTimesheetTypes.DynamoNoteSchema | undefined { if (comment !== undefined) { return dbTimesheetTypes.NoteSchema.parse({ Type: comment.Type, diff --git a/apps/backend/src/db/timesheets/Formatter.ts b/apps/backend/src/db/timesheets/Formatter.ts index 764a072..02e6a20 100644 --- a/apps/backend/src/db/timesheets/Formatter.ts +++ b/apps/backend/src/db/timesheets/Formatter.ts @@ -1,19 +1,19 @@ -import * as timesheetSchemas from 'src/db/schemas/Timesheet' +import * as timesheetSchemas from 'src/db/schemas/DynamoTimesheet' import * as constants from 'src/constants' import { v4 as uuidv4 } from 'uuid'; import {UserTimesheets, WriteEntryToTable} from 'src/dynamodb' -import { DBToFrontend } from './FrontendConversions'; +import { DBToModel } from './FrontendConversions'; const moment = require('moment-timezone'); +/* + Processes the timesheets we are grabbing for a user to ensure they are properly prepared + for the user - i.e. any missing days are added, etc. +*/ export class Formatter { - /* - Processes the timesheets we are grabbing for a user to ensure they are properly prepared - for the user - i.e. any missing days are added, etc. - */ // Fetches timesheets and properly formats them to our frontend data versions. public static async fetchUserTimesheets(userid: string) { @@ -23,11 +23,11 @@ export class Formatter { timesheets = this.format(timesheets); - return DBToFrontend.convertTimesheets(timesheets); + return DBToModel.convertTimesheets(timesheets); } // Formats a list of backend / database timesheets to the frontend equivalents. - public static format(timesheets: timesheetSchemas.TimeSheetSchema[]) : timesheetSchemas.TimeSheetSchema[] { + public static format(timesheets: timesheetSchemas.DynamoTimesheetSchema[]) : timesheetSchemas.DynamoTimesheetSchema[] { const updatedTimesheets = timesheets.map((timesheet) => { const [updatedTimesheet, modified] = this.validate(timesheet); if (modified) { @@ -41,12 +41,12 @@ export class Formatter { } // Main method all other future methods delegate to / would return to when we are processing a timesheet to convert to frontend - private static validate(timesheet): [timesheetSchemas.TimeSheetSchema, boolean] { + private static validate(timesheet): [timesheetSchemas.DynamoTimesheetSchema, boolean] { //When more functions are introduced here, create logic to determine whether any modified it to return return this.ensureAllDays(timesheet); } - private static ensureAllDays(timesheet:timesheetSchemas.TimeSheetSchema): [timesheetSchemas.TimeSheetSchema, boolean] { + private static ensureAllDays(timesheet:timesheetSchemas.DynamoTimesheetSchema): [timesheetSchemas.DynamoTimesheetSchema, boolean] { /* Ensures that for each day from START_DATE to START_DATE + TIMESHEET_DURATION that each day has at-least one entry */ @@ -74,7 +74,7 @@ export class Formatter { } //Returns the updated timesheet and whether or not it was modified return [ - timesheetSchemas.TimeSheetSchema.parse( + timesheetSchemas.TimesheetSchema.parse( {...timesheet, HoursData: updatedRows } @@ -82,9 +82,9 @@ export class Formatter { } //Creates an empty row in the timesheet for a specified date. - private static createEmptyRow(date: number): timesheetSchemas.TimesheetEntrySchema { - return timesheetSchemas.TimesheetEntrySchema.parse({ - Type: timesheetSchemas.CellType.REGULAR, + private static createEmptyRow(date: number): timesheetSchemas.DynamoShiftSchema { + return timesheetSchemas.ShiftSchema.parse({ + Type: timesheetSchemas.DynamoCellType.REGULAR, EntryID: uuidv4(), Date: date, AssociateTimes: undefined, diff --git a/apps/backend/src/db/timesheets/FrontendConversions.ts b/apps/backend/src/db/timesheets/FrontendConversions.ts index db9de77..6e0030b 100644 --- a/apps/backend/src/db/timesheets/FrontendConversions.ts +++ b/apps/backend/src/db/timesheets/FrontendConversions.ts @@ -1,18 +1,19 @@ -import * as dbTypes from '../schemas/Timesheet' +import * as DynamoSchemas from '../schemas/DynamoTimesheet' import * as frontendRowTypes from '../frontend/RowSchema' -import * as frontendTimesheetTypes from '../frontend/TimesheetSchema' -export class DBToFrontend { - /* - Mapper from converting from a Database backend timesheet to a frontend one - */ +import * as frontendTimesheetTypes from '@org/schemas/' + +/* + Mapper from converting from DynamoDB Timesheet schema to the internal backend/frontend model. +*/ +export class DBToModel { // Converts a list of backend timesheets to frontend ones - public static convertTimesheets(timesheets: dbTypes.TimeSheetSchema[]) : frontendTimesheetTypes.FrontendTimeSheetSchema[] { + public static convertTimesheets(timesheets: DynamoSchemas.DynamoTimesheetSchema[]) : frontendTimesheetTypes.FrontendTimeSheetSchema[] { return timesheets.map((timesheet) => this.toFrontendTimesheet(timesheet)); } // Converts a singular backend timesheet to a frontend one - public static toFrontendTimesheet(timesheet: dbTypes.TimeSheetSchema): frontendTimesheetTypes.FrontendTimeSheetSchema { + public static toFrontendTimesheet(timesheet: DynamoSchemas.DynamoTimesheetSchema): frontendTimesheetTypes.FrontendTimeSheetSchema { return frontendTimesheetTypes.FrontendTimeSheetSchema.parse({ TimesheetID: timesheet.TimesheetID, UserID: timesheet.UserID, @@ -20,13 +21,12 @@ export class DBToFrontend { Status: this.toFrontendStatus(timesheet.Status), CompanyID: timesheet.CompanyID, TableData: this.toFrontendRows(timesheet.HoursData), - ScheduleTableData: this.toFrontendScheduleData(timesheet.ScheduleData), WeekNotes: this.toFrontendComments(timesheet.WeekNotes) }); } // Converts a backend status to a frontend one - private static toFrontendStatus(status: dbTypes.TimesheetStatus): frontendTimesheetTypes.StatusType { + private static toFrontendStatus(status: DynamoSchemas.DynamoStatusSchema): frontendTimesheetTypes.StatusType { return frontendTimesheetTypes.StatusType.parse({ HoursSubmitted: status.HoursSubmitted, HoursReviewed: status.HoursReviewed, @@ -35,7 +35,7 @@ export class DBToFrontend { } //Converts a backend row to a frontend one - private static toFrontendRows(rows: dbTypes.TimesheetEntrySchema[]): frontendRowTypes.RowSchema[] { + private static toFrontendRows(rows: DynamoSchemas.DynamoShiftSchema[]): frontendRowTypes.RowSchema[] { if (rows === undefined) { return []; } @@ -52,26 +52,8 @@ export class DBToFrontend { }) } - //Converts the backend schedule data to the frontend equivalent. - private static toFrontendScheduleData(rows: dbTypes.ScheduleEntrySchema[]): frontendRowTypes.ScheduledRowSchema[] { - if (rows === undefined) { - return []; - } - return rows.map((row) => { - return frontendRowTypes.ScheduledRowSchema.parse({ - UUID: row.EntryID, - Date: row.Date, - Entry: frontendRowTypes.TimeRowEntry.parse({ - Start: row.StartDateTime, - End: row.EndDateTime, - AuthorID: row.AuthorUUID - }) - }); - }) - } - //Converts a backend row entry to a frontend one - private static toFrontendRowEntry(row: dbTypes.TimeEntrySchema): frontendRowTypes.TimeRowEntry { + private static toFrontendRowEntry(row: DynamoSchemas.DynamoTimeEntrySchema): frontendRowTypes.TimeRowEntry { if (row === undefined) { return undefined; } @@ -83,7 +65,7 @@ export class DBToFrontend { } //Converts a list of backend comments to frontend equivalents. - private static toFrontendComments(comments: dbTypes.NoteSchema[]): frontendRowTypes.CommentSchema[] { + private static toFrontendComments(comments: DynamoSchemas.DynamoNoteSchema[]): frontendRowTypes.CommentSchema[] { if (comments === undefined) { return []; } diff --git a/apps/backend/src/db/timesheets/ItemsOperations.ts b/apps/backend/src/db/timesheets/ItemsOperations.ts index 4ba7705..4b5c18e 100644 --- a/apps/backend/src/db/timesheets/ItemsOperations.ts +++ b/apps/backend/src/db/timesheets/ItemsOperations.ts @@ -1,4 +1,4 @@ -import {TimeSheetSchema, TimesheetEntrySchema, ScheduleEntrySchema, NoteSchema, StatusEntryType} from '../schemas/Timesheet' +import {DynamoTimesheetSchema, DynamoShiftSchema, ScheduleEntrySchema, DynamoNoteSchema, StatusEntryType} from '../schemas/DynamoTimesheet' import {UpdateRequest, InsertRequest, DeleteRequest, TimesheetListItems, StatusChangeRequest} from '../schemas/UpdateTimesheet' import { ExceptionsHandler } from '@nestjs/core/exceptions/exceptions-handler'; //Not sure why but only works if imported like this :| @@ -9,13 +9,13 @@ const moment = require('moment-timezone'); */ interface ItemsOperations { // Insert into the list of items - Insert(timesheet: TimeSheetSchema, body:InsertRequest): TimeSheetSchema + Insert(timesheet: DynamoTimesheetSchema, body:InsertRequest): DynamoTimesheetSchema // Delete a specific item from the list of items - Delete(timesheet: TimeSheetSchema, body:DeleteRequest): TimeSheetSchema + Delete(timesheet: DynamoTimesheetSchema, body:DeleteRequest): DynamoTimesheetSchema // Update a specific item in the list of items - Update(timesheet: TimeSheetSchema, body:UpdateRequest) : TimeSheetSchema + Update(timesheet: DynamoTimesheetSchema, body:UpdateRequest) : DynamoTimesheetSchema // TODO: add a new StatusChange(....) function - StatusChange(timesheet: TimeSheetSchema, body:StatusChangeRequest): TimeSheetSchema + StatusChange(timesheet: DynamoTimesheetSchema, body:StatusChangeRequest): DynamoTimesheetSchema } /* @@ -49,7 +49,7 @@ export class ItemsDelegator { i.e. the user entered rows of the time they worked. */ export class HoursDataOperations implements ItemsOperations { - public Insert(timesheet: TimeSheetSchema, body:InsertRequest) { + public Insert(timesheet: DynamoTimesheetSchema, body:InsertRequest) { const data = timesheet.HoursData; const item = TimesheetEntrySchema.parse(body.Item); @@ -90,7 +90,7 @@ export class HoursDataOperations implements ItemsOperations { } } } - public Delete(timesheet: TimeSheetSchema, body:DeleteRequest) { + public Delete(timesheet: DynamoTimesheetSchema, body:DeleteRequest) { return { ...timesheet, HoursData: timesheet.HoursData.filter((row) => row.EntryID !== body.Id) @@ -98,7 +98,7 @@ export class HoursDataOperations implements ItemsOperations { } - public Update(timesheet: TimeSheetSchema, body:UpdateRequest) { + public Update(timesheet: DynamoTimesheetSchema, body:UpdateRequest) { if (timesheet.HoursData?.filter((row) => row.EntryID === body.Id).length === 0) { throw new Error("Could not find a row with that ID"); } @@ -117,7 +117,7 @@ export class HoursDataOperations implements ItemsOperations { } } - public StatusChange(timesheet: TimeSheetSchema, body:StatusChangeRequest) { + public StatusChange(timesheet: DynamoTimesheetSchema, body:StatusChangeRequest) { if (timesheet.TimesheetID !== body.TimesheetId) { throw new Error("Requested timesheet does not match timesheet ID of timesheet being updated"); } @@ -148,7 +148,7 @@ export class HoursDataOperations implements ItemsOperations { // Class for operations on the schedule data field - i.e. the supervisor reported hours they should have worked. export class ScheduledDataOperations implements ItemsOperations { - public Insert(timesheet: TimeSheetSchema, body:InsertRequest) { + public Insert(timesheet: DynamoTimesheetSchema, body:InsertRequest) { const data = timesheet.ScheduleData; const item = ScheduleEntrySchema.parse(body.Item); //TODO - Fledge out the sorting to be simplified / actually accurate on the minute by minute. Currently is only based on day @@ -188,14 +188,14 @@ export class ScheduledDataOperations implements ItemsOperations { } } } - public Delete(timesheet: TimeSheetSchema, body:DeleteRequest) { + public Delete(timesheet: DynamoTimesheetSchema, body:DeleteRequest) { return { ...timesheet, ScheduleData: timesheet.ScheduleData.filter((row) => row.EntryID !== body.Id) } } - public Update(timesheet: TimeSheetSchema, body:UpdateRequest) { + public Update(timesheet: DynamoTimesheetSchema, body:UpdateRequest) { //TODO - Add in functionality to trigger insert instead of update if ID does not yet exist return { ...timesheet, @@ -212,14 +212,14 @@ export class ScheduledDataOperations implements ItemsOperations { } } - public StatusChange(timesheet: TimeSheetSchema, body:StatusChangeRequest) { + public StatusChange(timesheet: DynamoTimesheetSchema, body:StatusChangeRequest) { return undefined; } } // Operations on the weekly notes on the timesheet - i.e. comments relating to the entire timesheet / specific day worked. export class NotesOperations implements ItemsOperations { - public Insert(timesheet: TimeSheetSchema, body:InsertRequest) { + public Insert(timesheet: DynamoTimesheetSchema, body:InsertRequest) { return { ...timesheet, WeekNotes: [ @@ -228,14 +228,14 @@ export class NotesOperations implements ItemsOperations { ] }; } - public Delete(timesheet: TimeSheetSchema, body:DeleteRequest) { + public Delete(timesheet: DynamoTimesheetSchema, body:DeleteRequest) { return { ...timesheet, WeekNotes: timesheet.WeekNotes.filter((note) => note.EntryID !== body.Id) } } - public Update(timesheet: TimeSheetSchema, body:UpdateRequest) { + public Update(timesheet: DynamoTimesheetSchema, body:UpdateRequest) { //TODO - Add in functionality to trigger insert instead of update if ID does not yet exist return { @@ -252,7 +252,7 @@ export class NotesOperations implements ItemsOperations { } } - public StatusChange(timesheet: TimeSheetSchema, body:StatusChangeRequest) { + public StatusChange(timesheet: DynamoTimesheetSchema, body:StatusChangeRequest) { return undefined; } } diff --git a/apps/backend/src/db/timesheets/UploadTimesheet.ts b/apps/backend/src/db/timesheets/OperationRequestHandler.ts similarity index 96% rename from apps/backend/src/db/timesheets/UploadTimesheet.ts rename to apps/backend/src/db/timesheets/OperationRequestHandler.ts index 7917881..eef2492 100644 --- a/apps/backend/src/db/timesheets/UploadTimesheet.ts +++ b/apps/backend/src/db/timesheets/OperationRequestHandler.ts @@ -1,4 +1,4 @@ -import { DBToFrontend } from "./FrontendConversions"; +import { DBToModel } from "./FrontendConversions"; import { FrontendTimeSheetSchema } from "../frontend/TimesheetSchema"; import { TimesheetUpdateRequest, TimesheetOperations } from "../schemas/UpdateTimesheet"; @@ -9,7 +9,10 @@ import { HoursDataOperations, ItemsDelegator } from "./ItemsOperations"; import {WriteEntryToTable} from "src/dynamodb" import {frontendEntryConversions} from './EntryOperations' -export class UploadTimesheet { +/** + * Purpose: Handle Operation Requests + */ +export class OperationRequestHandler { private delegator = new ItemsDelegator() diff --git a/apps/backend/src/dynamodb.ts b/apps/backend/src/dynamodb.ts index 6a2954b..44fb043 100644 --- a/apps/backend/src/dynamodb.ts +++ b/apps/backend/src/dynamodb.ts @@ -8,7 +8,7 @@ import { import { unmarshall, marshall } from "@aws-sdk/util-dynamodb"; import * as dotenv from "dotenv"; -import {TimeSheetSchema} from './db/schemas/Timesheet' +import {DynamoTimesheetSchema} from './db/schemas/DynamoTimesheet' import { CompanySchema, UserCompaniesSchema } from './db/schemas/CompanyUsers'; dotenv.config(); @@ -24,7 +24,7 @@ console.log("secret", process.env.AWS_SECRET_ACCESS_KEY!); const client = new DynamoDB({ region: "us-east-2" }); -export async function UserTimesheets(uuid: string): Promise { +export async function UserTimesheets(uuid: string): Promise { // Set up the query to get all timesheets for a given uuid const command = new QueryCommand({ TableName: "BreaktimeTimesheets", @@ -128,7 +128,7 @@ export async function GetCompanyData( return companyData[0]; } -export async function WriteEntryToTable(table:TimeSheetSchema): Promise { +export async function WriteEntryToTable(table:DynamoTimesheetSchema): Promise { const options = { removeUndefinedValues: true }; diff --git a/apps/backend/test/UploadTimesheet.ts b/apps/backend/test/UploadTimesheet.ts index 87b6c23..a138bca 100644 --- a/apps/backend/test/UploadTimesheet.ts +++ b/apps/backend/test/UploadTimesheet.ts @@ -1,5 +1,5 @@ -import { TimeSheetSchema, TimesheetStatus, TimesheetEntrySchema, CellType, TimeEntrySchema } from "../src/db/schemas/Timesheet" +import { DynamoTimesheetSchema, DynamoStatusSchema, DynamoShiftSchema, DynamoCellType, DynamoTimeEntrySchema } from "../src/db/schemas/DynamoTimesheet" import { v4 as uuidv4 } from 'uuid'; import { WriteEntryToTable } from "../src/dynamodb"; //No idea why this require statement is needed but moment breaks otherwise :( @@ -49,9 +49,9 @@ const timesheetToUpload = TimeSheetSchema.parse({ }), CompanyID: "Example Company 401", HoursData: [ - createEntry(CellType.REGULAR, daysOfWeek.day(1).unix(), undefined, undefined), - createEntry(CellType.PTO, daysOfWeek.day(2).unix(), undefined, undefined), - createEntry(CellType.REGULAR, daysOfWeek.day(5).unix(), createTimeEntry(100, 500), undefined) + createEntry(DynamoCellType.REGULAR, daysOfWeek.day(1).unix(), undefined, undefined), + createEntry(DynamoCellType.PTO, daysOfWeek.day(2).unix(), undefined, undefined), + createEntry(DynamoCellType.REGULAR, daysOfWeek.day(5).unix(), createTimeEntry(100, 500), undefined) ], ScheduleData: [], WeekNotes: [] diff --git a/apps/frontend/src/components/TimeCardPage/types.tsx b/apps/frontend/src/components/TimeCardPage/types.tsx index 653ec37..d48a0f2 100644 --- a/apps/frontend/src/components/TimeCardPage/types.tsx +++ b/apps/frontend/src/components/TimeCardPage/types.tsx @@ -1,24 +1,3 @@ -export enum CellType { - Regular = "Time Worked", - PTO = "PTO" -}; - -export enum CellStatus { - Active = "Active", - Deleted = "Deleted" -} - -export enum CommentType { - Comment = "Comment", - Report = "Report", -}; - -export enum ReportOptions { - Late = "Late Arrival", - LeftEarly = "Early Departure", - Absent = "No Show" -} - export enum Color { Red = "red", Blue = "blue", @@ -26,15 +5,6 @@ export enum Color { Gray = "gray" } -export const enum Review_Stages { - UNSUBMITTED = "Not-Submitted", - EMPLOYEE_SUBMITTED = "Employee Submitted", - ADMIN_REVIEW = "Review (Breaktime)", - APPROVED = "Approved" -}; - -export const TABLE_COLUMNS = ['Type', 'Date', 'Clock-in', 'Clock-Out', 'Hours', 'Comment']; - export enum CardState { Rejected = "Rejected", InReviewEmployer = "In Review - Employer", diff --git a/libs/shared/schemas/src/index.ts b/libs/shared/schemas/src/index.ts index 22588bc..7eb90f6 100644 --- a/libs/shared/schemas/src/index.ts +++ b/libs/shared/schemas/src/index.ts @@ -1,6 +1,6 @@ -export * from './lib/CellTypes'; -export * from './lib/Timesheet'; -export * from './lib/UpdateTimesheet'; -export * from './lib/UserSchema'; +export * as CellTypes from './lib/CellTypes'; +export * as TimesheetSchemas from './lib/Timesheet-backenddb'; +export * as OperationRequests from './lib/UpdateTimesheet'; +export * as UserSchemas from './lib/UserSchema'; diff --git a/libs/shared/schemas/src/lib/CellTypes.ts b/libs/shared/schemas/src/lib/CellTypes.ts index fbf91cb..7502cc4 100644 --- a/libs/shared/schemas/src/lib/CellTypes.ts +++ b/libs/shared/schemas/src/lib/CellTypes.ts @@ -11,7 +11,13 @@ export enum CellStatus { export enum CommentType { Comment = "Comment", Report = "Report", -}; +}; + +export enum ReportOptions { + Late = "Late Arrival", + LeftEarly = "Early Departure", + Absent = "No Show" +} export const enum Review_Stages { UNSUBMITTED = "Not-Submitted", diff --git a/libs/shared/schemas/src/lib/Timesheet.ts b/libs/shared/schemas/src/lib/Timesheet-backenddb.ts similarity index 99% rename from libs/shared/schemas/src/lib/Timesheet.ts rename to libs/shared/schemas/src/lib/Timesheet-backenddb.ts index 8fcd08a..d039c03 100644 --- a/libs/shared/schemas/src/lib/Timesheet.ts +++ b/libs/shared/schemas/src/lib/Timesheet-backenddb.ts @@ -76,8 +76,6 @@ export const TimesheetStatus = z.object({ Finalized: StatusEntryType }); - - /** * Represents the database schema for a weekly timesheet */ diff --git a/libs/shared/schemas/src/lib/TimesheetRow.ts b/libs/shared/schemas/src/lib/TimesheetRow.ts new file mode 100644 index 0000000..2a15da6 --- /dev/null +++ b/libs/shared/schemas/src/lib/TimesheetRow.ts @@ -0,0 +1,50 @@ +import { z } from "zod"; +import { CellStatus, CellType, CommentType } from "./CellTypes"; + +/** + * A collection of various schemas used in creating a shift entry in the timesheet. These schemas are internal models, + * used for logic in the backend and frontend. + */ + +const optionalNumber = z.union([z.undefined(), z.number()]); +const optionalString = z.union([z.undefined(), z.string()]); + +export const TimeRowEntry = z.union([z.undefined(), z.object({ + Start: optionalNumber, End: optionalNumber, AuthorID: optionalString +})]); +export type TimeRowEntry = z.infer + +export const CommentSchema = z.object({ + UUID: z.string(), + AuthorID:z.string(), + Type: z.nativeEnum(CellType), + Timestamp: z.number(), + Content: z.string(), + State: z.nativeEnum(CellStatus), +}); + +export type CommentSchema = z.infer + +export const ReportSchema = z.object({ + AuthorID:z.string(), + Timestamp: z.number(), + Type: z.nativeEnum(CommentType), + CorrectTime: z.number(), + Content: z.nativeEnum(ReportOptions), + Notified: z.string(), + Explanation: z.string(), + State: z.nativeEnum(CellStatus), +}); + +export type ReportSchema = z.infer + +export const RowSchema = z.object({ + Type: z.nativeEnum(CellType), + UUID: z.string(), + Date: z.number(), + Associate: TimeRowEntry, + Supervisor: TimeRowEntry, + Admin: TimeRowEntry, + Comment: z.union([z.undefined(), z.array(CommentSchema || ReportSchema)]) +}); +export type RowSchema = z.infer \ No newline at end of file diff --git a/libs/shared/schemas/src/lib/UpdateTimesheet.ts b/libs/shared/schemas/src/lib/UpdateTimesheet.ts index 325b167..539b905 100644 --- a/libs/shared/schemas/src/lib/UpdateTimesheet.ts +++ b/libs/shared/schemas/src/lib/UpdateTimesheet.ts @@ -1,12 +1,18 @@ import { z } from "zod"; -import { NoteSchema, TimesheetEntrySchema, ScheduleEntrySchema } from "./Timesheet"; +import { NoteSchema, TimesheetEntrySchema } from "./Timesheet-backenddb"; -/** - * Schemas for all 'UpdateTimesheet' requests. This includes inserting new data, updating current data, deleting data, - * creating a new week's timesheet, and changing the status of a current timesheet. - */ +/* + The supported timesheet operations currently supported. + Most operations relate to items that are inside the timesheet, whether it is the rows of the timesheet, the comments someone left + on it for example. + + INSERT - Inserting an item into the timesheet + UPDATE - Updating a specific item in the timesheet + DELETE - Deleting a speciic item in the timesheet -// Currently supported timesheet operations + STATUS_CHANGE - When the timesheet has been submitted / should be advanced to the next stage + CREATE-TIMESHEET - Operation for creating a timesheet, if it would be useful to have in the future. +*/ export const enum TimesheetOperations { INSERT = "INSERT", UPDATE = "UPDATE", @@ -15,31 +21,45 @@ export const enum TimesheetOperations { CREATE_TIMESHEET = "CREATE_TIMESHEET" } +/* + The available types of items that are currently supported in the timesheet that list operations can be performed on. + TABLEDATA - the rows of the timesheet- basically their worked schedule + WEEKNOTES - the comments left by an employer for that week +*/ export const enum TimesheetListItems { TABLEDATA = "TABLEDATA", - SCHEDULEDATA = "SCHEDULEDATA", WEEKNOTES = "WEEKNOTES" } -const availableListTypes = z.enum([TimesheetListItems.TABLEDATA, TimesheetListItems.SCHEDULEDATA, TimesheetListItems.WEEKNOTES]) +const availableListTypes = z.enum([TimesheetListItems.TABLEDATA, TimesheetListItems.WEEKNOTES]) +/* + The schema for a delete request + @Type: The type of the item this delete request is processing - see available types in TimesheetListItems + @Id: The id of the item we are deleting - to know what to remove +*/ export const DeleteRequest = z.object({ Type: availableListTypes, Id: z.string() }) export type DeleteRequest = z.infer +/* + The schema for an insert request for an item + @Type: The type of the item that we are inserting, to know what we should be adding this item to (Either weekly notes or timesheet data) + @Item: The item we are inserting - either a timesheet row or a note for the week, depending on the type of the request +*/ export const InsertRequest = z.object({ Type: availableListTypes, - Item: z.union([TimesheetEntrySchema, NoteSchema, ScheduleEntrySchema]), + Item: z.union([TimesheetEntrySchema, NoteSchema]), }) export type InsertRequest = z.infer /* Schema for updating an item from the three possible list of items in the timesheet - Type: The field of the timesheet we are updating from the three supported - Id: the id of the entry we are updating - correlates to that row / entry in the list of items - Attribute: The specific attribute of the object we are updating - Data: The payload we are updating this attribute to be - can be a wide range of things currently + @Type: The field of the timesheet we are updating from the three supported + @Id: the id of the entry we are updating - correlates to that row / entry in the list of items + @Attribute: The specific attribute of the object we are updating + @Data: The payload we are updating this attribute to be - can be a wide range of things currently */ export const UpdateRequest = z.object({ Type: availableListTypes, @@ -49,8 +69,25 @@ export const UpdateRequest = z.object({ }) export type UpdateRequest = z.infer +/* + Schema for changing the status of a timesheet + @TimesheetId: The id of the timesheet we are updating + @AssociateId: The id of the associate whose timesheet is being submitted +*/ +export const StatusChangeRequest = z.object({ + TimesheetId: z.number(), + AssociateId: z.string(), + authorId: z.string(), + dateSubmitted: z.number(), + statusType: z.enum([TimesheetStatus.FINALIZED, TimesheetStatus.HOURS_REVIEWED, TimesheetStatus.HOURS_SUBMITTED]) +}) +export type StatusChangeRequest = z.infer -// The main request body that is used to determine what we should be updating in a request +/* The main request body that is used to determine what we should be updating in a request + @TimesheetID: The id of the timesheet we are updating + @Operation: The type of operation we are performing on this timesheet + @Payload: The contents to be used in the operation for updating this. +*/ export const TimesheetUpdateRequest = z.object({ TimesheetID: z.number(), Operation: z.enum([ diff --git a/libs/shared/timesheet-schemas/.eslintrc.json b/libs/shared/timesheet-schemas/.eslintrc.json new file mode 100644 index 0000000..3230caf --- /dev/null +++ b/libs/shared/timesheet-schemas/.eslintrc.json @@ -0,0 +1,25 @@ +{ + "extends": ["../../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.json"], + "parser": "jsonc-eslint-parser", + "rules": { + "@nx/dependency-checks": "error" + } + } + ] +} diff --git a/libs/shared/timesheet-schemas/README.md b/libs/shared/timesheet-schemas/README.md new file mode 100644 index 0000000..599f873 --- /dev/null +++ b/libs/shared/timesheet-schemas/README.md @@ -0,0 +1,11 @@ +# timesheet-schemas + +This library was generated with [Nx](https://nx.dev). + +## Building + +Run `nx build timesheet-schemas` to build the library. + +## Running unit tests + +Run `nx test timesheet-schemas` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/shared/timesheet-schemas/jest.config.ts b/libs/shared/timesheet-schemas/jest.config.ts new file mode 100644 index 0000000..7a5c783 --- /dev/null +++ b/libs/shared/timesheet-schemas/jest.config.ts @@ -0,0 +1,11 @@ +/* eslint-disable */ +export default { + displayName: 'timesheet-schemas', + preset: '../../../jest.preset.js', + testEnvironment: 'node', + transform: { + '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], + }, + moduleFileExtensions: ['ts', 'js', 'html'], + coverageDirectory: '../../../coverage/libs/shared/timesheet-schemas', +}; diff --git a/libs/shared/timesheet-schemas/package.json b/libs/shared/timesheet-schemas/package.json new file mode 100644 index 0000000..b5597fd --- /dev/null +++ b/libs/shared/timesheet-schemas/package.json @@ -0,0 +1,10 @@ +{ + "name": "@org/timesheet-schemas", + "version": "0.0.1", + "dependencies": { + "tslib": "^2.3.0" + }, + "type": "commonjs", + "main": "./src/index.js", + "typings": "./src/index.d.ts" +} diff --git a/libs/shared/timesheet-schemas/project.json b/libs/shared/timesheet-schemas/project.json new file mode 100644 index 0000000..f963614 --- /dev/null +++ b/libs/shared/timesheet-schemas/project.json @@ -0,0 +1,30 @@ +{ + "name": "timesheet-schemas", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "libs/shared/timesheet-schemas/src", + "projectType": "library", + "targets": { + "build": { + "executor": "@nx/js:tsc", + "outputs": ["{options.outputPath}"], + "options": { + "outputPath": "dist/libs/shared/timesheet-schemas", + "main": "libs/shared/timesheet-schemas/src/index.ts", + "tsConfig": "libs/shared/timesheet-schemas/tsconfig.lib.json", + "assets": ["libs/shared/timesheet-schemas/*.md"] + } + }, + "lint": { + "executor": "@nx/eslint:lint", + "outputs": ["{options.outputFile}"] + }, + "test": { + "executor": "@nx/jest:jest", + "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "options": { + "jestConfig": "libs/shared/timesheet-schemas/jest.config.ts" + } + } + }, + "tags": [] +} diff --git a/libs/shared/timesheet-schemas/src/index.ts b/libs/shared/timesheet-schemas/src/index.ts new file mode 100644 index 0000000..338ca00 --- /dev/null +++ b/libs/shared/timesheet-schemas/src/index.ts @@ -0,0 +1 @@ +export * from './lib/timesheet-schemas'; diff --git a/libs/shared/timesheet-schemas/src/lib/timesheet-schemas.spec.ts b/libs/shared/timesheet-schemas/src/lib/timesheet-schemas.spec.ts new file mode 100644 index 0000000..581b4b4 --- /dev/null +++ b/libs/shared/timesheet-schemas/src/lib/timesheet-schemas.spec.ts @@ -0,0 +1,7 @@ +import { timesheetSchemas } from './timesheet-schemas'; + +describe('timesheetSchemas', () => { + it('should work', () => { + expect(timesheetSchemas()).toEqual('timesheet-schemas'); + }); +}); diff --git a/libs/shared/timesheet-schemas/src/lib/timesheet-schemas.ts b/libs/shared/timesheet-schemas/src/lib/timesheet-schemas.ts new file mode 100644 index 0000000..33277de --- /dev/null +++ b/libs/shared/timesheet-schemas/src/lib/timesheet-schemas.ts @@ -0,0 +1,3 @@ +export function timesheetSchemas(): string { + return 'timesheet-schemas'; +} diff --git a/libs/shared/timesheet-schemas/tsconfig.json b/libs/shared/timesheet-schemas/tsconfig.json new file mode 100644 index 0000000..8122543 --- /dev/null +++ b/libs/shared/timesheet-schemas/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "module": "commonjs", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/libs/shared/timesheet-schemas/tsconfig.lib.json b/libs/shared/timesheet-schemas/tsconfig.lib.json new file mode 100644 index 0000000..4befa7f --- /dev/null +++ b/libs/shared/timesheet-schemas/tsconfig.lib.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "declaration": true, + "types": ["node"] + }, + "include": ["src/**/*.ts"], + "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] +} diff --git a/libs/shared/timesheet-schemas/tsconfig.spec.json b/libs/shared/timesheet-schemas/tsconfig.spec.json new file mode 100644 index 0000000..69a251f --- /dev/null +++ b/libs/shared/timesheet-schemas/tsconfig.spec.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/tsconfig.base.json b/tsconfig.base.json index c37c7d7..99b8068 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -15,7 +15,8 @@ "skipDefaultLibCheck": true, "baseUrl": ".", "paths": { - "@org/schemas": ["libs/shared/schemas/src/index.ts"] + "@org/schemas": ["libs/shared/schemas/src/index.ts"], + "@org/timesheet-schemas": ["libs/shared/timesheet-schemas/src/index.ts"] } }, "exclude": ["node_modules", "tmp"] From 37e8db7cd833b0a2f6ea4360e84509e3c699d1a8 Mon Sep 17 00:00:00 2001 From: izzyconner <32255130+izzyconner@users.noreply.github.com> Date: Sun, 10 Mar 2024 16:02:08 -0400 Subject: [PATCH 05/15] Adding in more shared schemas, more transition work --- apps/backend/src/aws/auth.controller.ts | 9 +- .../CompanyUsers.ts | 4 +- .../DynamoTimesheet.ts | 0 .../src/db/timesheets/EntryOperations.ts | 120 ++++-------------- apps/backend/src/db/timesheets/Formatter.ts | 2 +- .../src/db/timesheets/FrontendConversions.ts | 2 +- .../src/db/timesheets/ItemsOperations.ts | 4 +- .../db/timesheets/OperationRequestHandler.ts | 2 +- apps/backend/src/dynamodb.ts | 4 +- apps/backend/test/UploadTimesheet.ts | 2 +- .../frontend/src/schemas/backend/Timesheet.ts | 104 --------------- .../src/schemas/backend/UpdateTimesheet.ts | 74 ----------- libs/shared/schemas/src/index.ts | 4 +- libs/shared/schemas/src/lib/CellTypes.ts | 12 +- libs/shared/schemas/src/lib/StatusSchema.ts | 21 +++ .../schemas/src/lib/Timesheet-backenddb.ts | 9 -- libs/shared/schemas/src/lib/TimesheetRow.ts | 50 ++++++-- .../shared/schemas/src/lib/UpdateTimesheet.ts | 1 + 18 files changed, 108 insertions(+), 316 deletions(-) rename apps/backend/src/db/{schemas => dynamoSchemas}/CompanyUsers.ts (87%) rename apps/backend/src/db/{schemas => dynamoSchemas}/DynamoTimesheet.ts (100%) delete mode 100644 apps/frontend/src/schemas/backend/Timesheet.ts delete mode 100644 apps/frontend/src/schemas/backend/UpdateTimesheet.ts create mode 100644 libs/shared/schemas/src/lib/StatusSchema.ts diff --git a/apps/backend/src/aws/auth.controller.ts b/apps/backend/src/aws/auth.controller.ts index b729e39..d14b95b 100644 --- a/apps/backend/src/aws/auth.controller.ts +++ b/apps/backend/src/aws/auth.controller.ts @@ -7,13 +7,10 @@ import { UseGuards, } from "@nestjs/common"; import { AuthService } from "./auth.service"; -import { WriteEntryToTable, UserTimesheets } from "../dynamodb"; import TokenClient from './cognito/cognito.keyparser' -import { DynamoTimesheetSchema } from 'src/db/schemas/DynamoTimesheet'; -import * as frontendTimesheetSchemas from 'src/db/schemas/DynamoTimesheet' +import * as frontendTimesheetSchemas from 'src/db/dynamoSchemas/DynamoTimesheet' import { RolesGuard } from 'src/utils/guards/roles.guard'; import { OperationRequestHandler } from 'src/db/timesheets/OperationRequestHandler'; -import { TimesheetUpdateRequest } from 'src/db/schemas/UpdateTimesheet'; import { Formatter } from 'src/db/timesheets/Formatter'; @@ -21,7 +18,7 @@ import { Formatter } from 'src/db/timesheets/Formatter'; @UseGuards(RolesGuard) export class AuthController { - uploadApi = new OperationRequestHandler(); + operationRequestHandler = new OperationRequestHandler(); constructor(private authService: AuthService) {} @@ -35,7 +32,7 @@ export class AuthController { console.log("Update Timesheet Request: Processing") console.log("Request received:") console.log(body) - const result = this.uploadApi.updateTimesheet(body, userId); + const result = this.operationRequestHandler.updateTimesheet(body, userId); //TODO: Do something with this result? return result; } diff --git a/apps/backend/src/db/schemas/CompanyUsers.ts b/apps/backend/src/db/dynamoSchemas/CompanyUsers.ts similarity index 87% rename from apps/backend/src/db/schemas/CompanyUsers.ts rename to apps/backend/src/db/dynamoSchemas/CompanyUsers.ts index db34fd4..83202e9 100644 --- a/apps/backend/src/db/schemas/CompanyUsers.ts +++ b/apps/backend/src/db/dynamoSchemas/CompanyUsers.ts @@ -6,8 +6,8 @@ import { z } from "zod"; export const CompanySchema = z.object({ CompanyID: z.string(), CompanyName: z.string(), - AssociateIDs: z.array(z.string().nonempty()), - SupervisorIDs: z.array(z.string().nonempty()), + AssociateIDs: z.array(z.string().min(1)), + SupervisorIDs: z.array(z.string().min(1)), }); /** diff --git a/apps/backend/src/db/schemas/DynamoTimesheet.ts b/apps/backend/src/db/dynamoSchemas/DynamoTimesheet.ts similarity index 100% rename from apps/backend/src/db/schemas/DynamoTimesheet.ts rename to apps/backend/src/db/dynamoSchemas/DynamoTimesheet.ts diff --git a/apps/backend/src/db/timesheets/EntryOperations.ts b/apps/backend/src/db/timesheets/EntryOperations.ts index c376e09..2e946d6 100644 --- a/apps/backend/src/db/timesheets/EntryOperations.ts +++ b/apps/backend/src/db/timesheets/EntryOperations.ts @@ -1,5 +1,5 @@ -import * as dbTimesheetTypes from '../schemas/DynamoTimesheet' -import {UpdateTimesheetRequests, TimesheetSchemas} from '@org/schemas'; +import * as DynamoSchemas from '../dynamoSchemas/DynamoTimesheet' +import {TimesheetSchemas, Types} from '@org/schemas'; // TODO : As we are shifting towards a shared schema system, we will move forward with an 'external' schema that handles dynamo data, and an 'internal' schema that works as the shared model of our data between the frontend and backend. @@ -24,83 +24,27 @@ class KeyPairMappings { } export class frontendEntryConversions { - //NOTE: The key in the dictionary must match frontend key name as this is how we automatically convert keys - private static hoursDataMappings = { - Type: new KeyPairMappings("Type", "Type", frontendEntryConversions.toDBType), - Associate: new KeyPairMappings("Associate", "AssociateTimes", frontendEntryConversions.toDBRowEntry), - Supervisor: new KeyPairMappings("Supervisor", "SupervisorTimes", frontendEntryConversions.toDBRowEntry), - Admin: new KeyPairMappings("Admin", "AdminTimes", frontendEntryConversions.toDBRowEntry), - Comment: new KeyPairMappings("Comment", "Note", frontendEntryConversions.toDBNotes) - } - - - /* - Delegate that converts the item we are inserting to its database equivalent so that it can actually exist on the table - */ - public static insertConversion(body: UpdateTimesheetRequests.InsertRequest) : UpdateTimesheetRequests.InsertRequest { - - switch (body.Type) { - case TimesheetSchemas.TimesheetListItems.TABLEDATA: - return { - ...body, - Item: this.toDBRow(TimesheetSchemas.TimesheetEntrySchema.parse(body.Item)) - - } - case sharedSchemas.TimesheetListItems.SCHEDULEDATA: - throw new Error("Not yet implemented") - - case sharedSchemas.TimesheetListItems.WEEKNOTES: - throw new Error("Not yet implemented") - - default: - throw new Error("Invalid conversion type provided"); - } - } - - /* - Delegate that converts the item we are updating to its database equivalent so that it can actually exist on the table - */ - public static updateConversion(body: sharedSchemas.UpdateRequest) : sharedSchemas.UpdateRequest { - switch (body.Type) { - case sharedSchemas.TimesheetListItems.TABLEDATA: - - const convertedKey = this.hoursDataMappings[body.Attribute].finalKey; - const convertedValue = this.hoursDataMappings[body.Attribute].conversionFn(body.Data) - return { - ...body, - Attribute: convertedKey, - Data: convertedValue - } - case sharedSchemas.TimesheetListItems.SCHEDULEDATA: - throw new Error("Not yet implemented") - case sharedSchemas.TimesheetListItems.WEEKNOTES: - throw new Error("Not yet implemented") - default: - throw new Error("Invalid conversion type provided"); - } - } - /* - Converts a row in our timesheet to our database equivalent from frontend. + Converts a shift in our timesheet to our database equivalent from frontend. */ - private static toDBRow(row: frontendRowTypes.RowSchema): dbTimesheetTypes.DynamoShiftSchema { - return dbTimesheetTypes.ShiftSchema.parse({ + private static toDBShift(row: TimesheetSchemas.ShiftSchema): DynamoSchemas.DynamoShiftSchema { + return DynamoSchemas.ShiftSchema.parse({ Type: this.toDBType(row.Type), - EntryID: row.UUID, + EntryID: row.EntryId, Date: row.Date, - AssociateTimes: this.toDBRowEntry(row.Associate), - SupervisorTimes: this.toDBRowEntry(row.Supervisor), - AdminTimes: this.toDBRowEntry(row.Admin), - Note: row.Comment?.map((comment) => this.toDBNote(comment)) + AssociateTimes: this.toDBRowEntry(row.AssociateTimeEntry), + SupervisorTimes: this.toDBRowEntry(row.SupervisorTimeEntry), + AdminTimes: this.toDBRowEntry(row.AdminTimeEntry), + Note: row.Notes?.map((comment) => this.toDBNote(comment)) }); } // Converts a timesheet entry to our database equivalent from frontend. - private static toDBRowEntry(row: frontendRowTypes.TimeRowEntry | undefined): dbTimesheetTypes.DynamoTimeEntrySchema | undefined{ + private static toDBRowEntry(row: TimesheetSchemas.TimeEntrySchema | undefined): DynamoSchemas.DynamoTimeEntrySchema | undefined{ if (row !== undefined) { - return dbTimesheetTypes.TimeEntrySchema.parse({ - StartDateTime: row.Start, - EndDateTime: row.End, + return DynamoSchemas.TimeEntrySchema.parse({ + StartDateTime: row.StartDateTime, + EndDateTime: row.EndDateTime, AuthorUUID: row.AuthorID }); } @@ -108,30 +52,21 @@ export class frontendEntryConversions { } // Converts a frontend cell type to our database equivalent. - private static toDBType(entryType: sharedSchemas..RowType): dbTimesheetTypes.DynamoCellType { + private static toDBType(entryType: Types.CellType): DynamoSchemas.DynamoCellType { switch (entryType) { - case sharedSchemas.CellType.REGULAR: - return dbTimesheetTypes.DynamoCellType.REGULAR; - case frontendTypes.CellType.PTO: - return dbTimesheetTypes.DynamoCellType.PTO; + case Types.CellType.REGULAR: + return DynamoSchemas.DynamoCellType.REGULAR; + case Types.CellType.PTO: + return DynamoSchemas.DynamoCellType.PTO; default: return undefined } } - // Converts from our frontend week comments to our database equivalents. - private static toDBNotes(comments: frontendRowTypes.CommentSchema[] | undefined): dbTimesheetTypes.DynamoNoteSchema[] | undefined { - if (comments !== undefined) { - return comments.map((comment) => frontendEntryConversions.toDBNote(comment)) - - } - return undefined; - } - - // Converts a singular week comment / note from our frontend to database. - private static toDBNote(comment: frontendRowTypes.CommentSchema | undefined): dbTimesheetTypes.DynamoNoteSchema | undefined { + // Converts a singular weekly comment / note from our frontend to database. + private static toDBNote(comment: TimesheetSchemas.CommentSchema | undefined): DynamoSchemas.DynamoNoteSchema | undefined { if (comment !== undefined) { - return dbTimesheetTypes.NoteSchema.parse({ + return DynamoSchemas.NoteSchema.parse({ Type: comment.Type, EntryID: comment.UUID, AuthorUUID: comment.AuthorID, @@ -142,15 +77,4 @@ export class frontendEntryConversions { } return undefined; } - - // Converts from a singular frontend schedule entry to our database equivalent. - private static toDBSchedule(row: frontendRowTypes.ScheduledRowSchema): dbTimesheetTypes.ScheduleEntrySchema { - return dbTimesheetTypes.ScheduleEntrySchema.parse({ - EntryID: row.UUID, - Date: row.Date, - StartDateTime: row.Entry?.Start, - EndDateTime: row.Entry?.End, - AuthorUUID: row.Entry?.AuthorID - }) - } } \ No newline at end of file diff --git a/apps/backend/src/db/timesheets/Formatter.ts b/apps/backend/src/db/timesheets/Formatter.ts index 02e6a20..0a43ee1 100644 --- a/apps/backend/src/db/timesheets/Formatter.ts +++ b/apps/backend/src/db/timesheets/Formatter.ts @@ -1,4 +1,4 @@ -import * as timesheetSchemas from 'src/db/schemas/DynamoTimesheet' +import * as timesheetSchemas from 'src/db/dynamoSchemas/DynamoTimesheet' import * as constants from 'src/constants' import { v4 as uuidv4 } from 'uuid'; diff --git a/apps/backend/src/db/timesheets/FrontendConversions.ts b/apps/backend/src/db/timesheets/FrontendConversions.ts index 6e0030b..c09fbca 100644 --- a/apps/backend/src/db/timesheets/FrontendConversions.ts +++ b/apps/backend/src/db/timesheets/FrontendConversions.ts @@ -1,4 +1,4 @@ -import * as DynamoSchemas from '../schemas/DynamoTimesheet' +import * as DynamoSchemas from '../dynamoSchemas/DynamoTimesheet' import * as frontendRowTypes from '../frontend/RowSchema' import * as frontendTimesheetTypes from '@org/schemas/' diff --git a/apps/backend/src/db/timesheets/ItemsOperations.ts b/apps/backend/src/db/timesheets/ItemsOperations.ts index 4b5c18e..4dfcfdf 100644 --- a/apps/backend/src/db/timesheets/ItemsOperations.ts +++ b/apps/backend/src/db/timesheets/ItemsOperations.ts @@ -1,5 +1,5 @@ -import {DynamoTimesheetSchema, DynamoShiftSchema, ScheduleEntrySchema, DynamoNoteSchema, StatusEntryType} from '../schemas/DynamoTimesheet' -import {UpdateRequest, InsertRequest, DeleteRequest, TimesheetListItems, StatusChangeRequest} from '../schemas/UpdateTimesheet' +import {DynamoTimesheetSchema, DynamoShiftSchema, ScheduleEntrySchema, DynamoNoteSchema, StatusEntryType} from '../dynamoSchemas/DynamoTimesheet' +import {UpdateRequest, InsertRequest, DeleteRequest, TimesheetListItems, StatusChangeRequest} from '../dynamoSchemas/UpdateTimesheet' import { ExceptionsHandler } from '@nestjs/core/exceptions/exceptions-handler'; //Not sure why but only works if imported like this :| const moment = require('moment-timezone'); diff --git a/apps/backend/src/db/timesheets/OperationRequestHandler.ts b/apps/backend/src/db/timesheets/OperationRequestHandler.ts index eef2492..ea34f95 100644 --- a/apps/backend/src/db/timesheets/OperationRequestHandler.ts +++ b/apps/backend/src/db/timesheets/OperationRequestHandler.ts @@ -1,6 +1,6 @@ import { DBToModel } from "./FrontendConversions"; import { FrontendTimeSheetSchema } from "../frontend/TimesheetSchema"; -import { TimesheetUpdateRequest, TimesheetOperations } from "../schemas/UpdateTimesheet"; +import { TimesheetUpdateRequest, TimesheetOperations } from "../dynamoSchemas/UpdateTimesheet"; import {UserTimesheets} from "src/dynamodb" import { ExceptionsHandler } from "@nestjs/core/exceptions/exceptions-handler"; diff --git a/apps/backend/src/dynamodb.ts b/apps/backend/src/dynamodb.ts index 44fb043..c94b1e7 100644 --- a/apps/backend/src/dynamodb.ts +++ b/apps/backend/src/dynamodb.ts @@ -8,8 +8,8 @@ import { import { unmarshall, marshall } from "@aws-sdk/util-dynamodb"; import * as dotenv from "dotenv"; -import {DynamoTimesheetSchema} from './db/schemas/DynamoTimesheet' -import { CompanySchema, UserCompaniesSchema } from './db/schemas/CompanyUsers'; +import {DynamoTimesheetSchema} from './db/dynamoSchemas/DynamoTimesheet' +import { CompanySchema, UserCompaniesSchema } from './db/dynamoSchemas/CompanyUsers'; dotenv.config(); diff --git a/apps/backend/test/UploadTimesheet.ts b/apps/backend/test/UploadTimesheet.ts index a138bca..e317978 100644 --- a/apps/backend/test/UploadTimesheet.ts +++ b/apps/backend/test/UploadTimesheet.ts @@ -1,5 +1,5 @@ -import { DynamoTimesheetSchema, DynamoStatusSchema, DynamoShiftSchema, DynamoCellType, DynamoTimeEntrySchema } from "../src/db/schemas/DynamoTimesheet" +import { DynamoTimesheetSchema, DynamoStatusSchema, DynamoShiftSchema, DynamoCellType, DynamoTimeEntrySchema } from "../src/db/dynamoSchemas/DynamoTimesheet" import { v4 as uuidv4 } from 'uuid'; import { WriteEntryToTable } from "../src/dynamodb"; //No idea why this require statement is needed but moment breaks otherwise :( diff --git a/apps/frontend/src/schemas/backend/Timesheet.ts b/apps/frontend/src/schemas/backend/Timesheet.ts deleted file mode 100644 index 949513e..0000000 --- a/apps/frontend/src/schemas/backend/Timesheet.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { z } from "zod"; - -/* -------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------- ----------------------------------DELETE WHEN MONOREPO CREATED------------------------------------------------------ - SEE BACKEND DIRECTORY FOR ALL DOCUMENTATION / COMMENTS -------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------- -*/ - -/** - * Represents the database schema for a note. This can be one of the following types: - * -- Comment: a general comment made for an entry or whole timesheet. - * -- Report: a specific report to reflect an incident that happens and requires admin attention, e.g. no-show or late attendance - */ -export const NoteSchema = z.object({ - Type: z.enum(["Comment", "Report"]), - EntryID: z.string(), - AuthorUUID: z.string(), - DateTime: z.number(), - Content: z.string(), - State: z.enum(["Active", "Deleted"]), -}) - -/** - * Represents the database schema for a schedule shift entry, made by a supervisor or admin - */ -export const ScheduleEntrySchema = z.object({ - EntryID: z.string(), - Date: z.number(), - StartDateTime: z.number().optional(), - EndDateTime: z.number().optional(), - AuthorUUID: z.string() -}) - -/** - * Represents the database schema for a clockin/clockout pair in epoch - */ -export const TimeEntrySchema = z.object({ - StartDateTime: z.number().optional(), - EndDateTime: z.number().optional(), - AuthorUUID: z.string(), -}) - - -export enum CellType { - REGULAR = "Time Worked", - PTO = "PTO" -} - -/** - * Represents the database schema for a single shift or entry in the weekly timesheet. - */ -export const TimesheetEntrySchema = z.object({ - Type: z.enum([CellType.REGULAR, CellType.PTO]), - EntryID: z.string(), - Date: z.number(), - AssociateTimes: TimeEntrySchema.optional(), - SupervisorTimes: TimeEntrySchema.optional(), - AdminTimes: TimeEntrySchema.optional(), - Note: z.array(NoteSchema).optional(), -}) - - -// The status is either undefined, for not being at that stage yet, or -// contains the date and author of approving this submission -export const StatusEntryType = z.union( - [z.object({ - Date: z.number(), - AuthorID: z.string() - }), - z.undefined()]); - -// Status type contains the four stages of the pipeline we have defined -export const TimesheetStatus = z.object({ - HoursSubmitted: StatusEntryType, - HoursReviewed: StatusEntryType, - ScheduleSubmitted: StatusEntryType, - Finalized: StatusEntryType -}); - - - -/** - * Represents the database schema for a weekly timesheet - */ -export const TimeSheetSchema = z.object({ - TimesheetID: z.number(), - UserID: z.string(), - StartDate: z.number(), - Status: TimesheetStatus, - CompanyID: z.string(), - HoursData: z.array(TimesheetEntrySchema).default([]), - ScheduleData: z.array(ScheduleEntrySchema).default([]), - WeekNotes: z.array(NoteSchema).default([]), -}) - -export type TimesheetStatus = z.infer -export type TimeEntrySchema = z.infer -export type ScheduleEntrySchema = z.infer -export type NoteSchema = z.infer -export type TimesheetEntrySchema = z.infer -export type TimeSheetSchema = z.infer diff --git a/apps/frontend/src/schemas/backend/UpdateTimesheet.ts b/apps/frontend/src/schemas/backend/UpdateTimesheet.ts deleted file mode 100644 index 851382d..0000000 --- a/apps/frontend/src/schemas/backend/UpdateTimesheet.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { z } from "zod"; -import { RowSchema, CommentSchema, ScheduledRowSchema } from "../RowSchema" -import * as dbtypes from './Timesheet' - -/* -------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------- ----------------------------------DELETE WHEN MONOREPO CREATED------------------------------------------------------ - SEE BACKEND DIRECTORY FOR ALL DOCUMENTATION / COMMENTS -------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------- - -*/ - -// Currently supported timesheet operations -export const enum TimesheetOperations { - INSERT = "INSERT", - UPDATE = "UPDATE", - DELETE = "DELETE", - STATUS_CHANGE = "STATUS_CHANGE", - CREATE_TIMESHEET = "CREATE_TIMESHEET" -} - - - -export const enum TimesheetListItems { - TABLEDATA = "TABLEDATA", - SCHEDULEDATA = "SCHEDULEDATA", - WEEKNOTES = "WEEKNOTES" -} - -const availableListTypes = z.enum([TimesheetListItems.TABLEDATA, TimesheetListItems.SCHEDULEDATA, TimesheetListItems.WEEKNOTES]) - -export const DeleteRequest = z.object({ - Type: availableListTypes, - Id: z.string() -}) -export type DeleteRequest = z.infer - -export const InsertRequest = z.object({ - Type: availableListTypes, - Item: z.union([RowSchema, CommentSchema, ScheduledRowSchema, dbtypes.TimesheetEntrySchema]), -}) -export type InsertRequest = z.infer -/* - Schema for updating an item from the three possible list of items in the timesheet - Type: The field of the timesheet we are updating from the three supported - Id: the id of the entry we are updating - correlates to that row / entry in the list of items - Attribute: The specific attribute of the object we are updating - Data: The payload we are updating this attribute to be - can be a wide range of things currently -*/ -export const UpdateRequest = z.object({ - Type: availableListTypes, - Id: z.string(), - Attribute: z.string(), - Data: z.any() -}) -export type UpdateRequest = z.infer - - -// The main request body that is used to determine what we should be updating in a request -export const TimesheetUpdateRequest = z.object({ - TimesheetID: z.number(), - Operation: z.enum([ - TimesheetOperations.INSERT, - TimesheetOperations.UPDATE, - TimesheetOperations.DELETE, - TimesheetOperations.STATUS_CHANGE, - TimesheetOperations.CREATE_TIMESHEET - ]), - Payload: z.any(), -}) -export type TimesheetUpdateRequest = z.infer - diff --git a/libs/shared/schemas/src/index.ts b/libs/shared/schemas/src/index.ts index 7eb90f6..bcd7d91 100644 --- a/libs/shared/schemas/src/index.ts +++ b/libs/shared/schemas/src/index.ts @@ -1,5 +1,5 @@ -export * as CellTypes from './lib/CellTypes'; -export * as TimesheetSchemas from './lib/Timesheet-backenddb'; +export * as Types from './lib/CellTypes'; +export * as TimesheetSchemas from './lib/TimesheetRow'; export * as OperationRequests from './lib/UpdateTimesheet'; export * as UserSchemas from './lib/UserSchema'; diff --git a/libs/shared/schemas/src/lib/CellTypes.ts b/libs/shared/schemas/src/lib/CellTypes.ts index 7502cc4..167473b 100644 --- a/libs/shared/schemas/src/lib/CellTypes.ts +++ b/libs/shared/schemas/src/lib/CellTypes.ts @@ -19,11 +19,19 @@ export enum ReportOptions { Absent = "No Show" } -export const enum Review_Stages { +export const enum ReviewStages { UNSUBMITTED = "Not-Submitted", EMPLOYEE_SUBMITTED = "Employee Submitted", ADMIN_REVIEW = "Review (Breaktime)", APPROVED = "Approved" -}; +}; + +// TODO : Does this need to be different than the enum above? Not sure it does... see if we can replace or combine them +export enum TimesheetStatus { + UNSUBMITTED = "Unsubmitted", + HOURS_SUBMITTED = "HoursSubmitted", + HOURS_REVIEWED = "HoursReviewed", + FINALIZED = "Finalized", + } export const TABLE_COLUMNS = ['Type', 'Date','Clock-in','Clock-Out','Hours','Comment']; \ No newline at end of file diff --git a/libs/shared/schemas/src/lib/StatusSchema.ts b/libs/shared/schemas/src/lib/StatusSchema.ts new file mode 100644 index 0000000..8eeaa86 --- /dev/null +++ b/libs/shared/schemas/src/lib/StatusSchema.ts @@ -0,0 +1,21 @@ +import { z } from "zod"; + +// The status is either undefined, for not being at that stage yet, or +// contains the date and author of approving this submission +export const StatusEntryType = z.union([ + z.object({ + Date: z.number(), + AuthorID: z.string(), + }), + z.undefined(), +]); + +// Status type contains the three stages of the pipeline we have defined +export const StatusType = z.object({ + HoursSubmitted: StatusEntryType, + HoursReviewed: StatusEntryType, + Finalized: StatusEntryType, +}); + +export type StatusEntryType = z.infer; +export type StatusType = z.infer; \ No newline at end of file diff --git a/libs/shared/schemas/src/lib/Timesheet-backenddb.ts b/libs/shared/schemas/src/lib/Timesheet-backenddb.ts index d039c03..41f790c 100644 --- a/libs/shared/schemas/src/lib/Timesheet-backenddb.ts +++ b/libs/shared/schemas/src/lib/Timesheet-backenddb.ts @@ -1,15 +1,6 @@ import { z } from "zod"; import { CellType } from "./CellTypes"; -/* -------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------- ----------------------------------DELETE WHEN MONOREPO CREATED------------------------------------------------------ - SEE BACKEND DIRECTORY FOR ALL DOCUMENTATION / COMMENTS -------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------- -*/ - /** * Represents the database schema for a note. This can be one of the following types: * -- Comment: a general comment made for an entry or whole timesheet. diff --git a/libs/shared/schemas/src/lib/TimesheetRow.ts b/libs/shared/schemas/src/lib/TimesheetRow.ts index 2a15da6..4caadd5 100644 --- a/libs/shared/schemas/src/lib/TimesheetRow.ts +++ b/libs/shared/schemas/src/lib/TimesheetRow.ts @@ -1,5 +1,6 @@ import { z } from "zod"; -import { CellStatus, CellType, CommentType } from "./CellTypes"; +import { CellStatus, CellType, CommentType, ReportOptions } from "./CellTypes"; +import { StatusType } from "./StatusSchema"; /** * A collection of various schemas used in creating a shift entry in the timesheet. These schemas are internal models, @@ -9,10 +10,15 @@ import { CellStatus, CellType, CommentType } from "./CellTypes"; const optionalNumber = z.union([z.undefined(), z.number()]); const optionalString = z.union([z.undefined(), z.string()]); -export const TimeRowEntry = z.union([z.undefined(), z.object({ - Start: optionalNumber, End: optionalNumber, AuthorID: optionalString +/** + * Represents the schema for an epoch clockin/clockout pair + */ +export const TimeEntrySchema = z.union([z.undefined(), z.object({ + StartDateTime: optionalNumber, + EndDateTime: optionalNumber, + AuthorID: optionalString })]); -export type TimeRowEntry = z.infer +export type TimeEntrySchema = z.infer export const CommentSchema = z.object({ UUID: z.string(), @@ -38,13 +44,35 @@ export const ReportSchema = z.object({ export type ReportSchema = z.infer -export const RowSchema = z.object({ +/** + * The schema for a shift entry (visually, a row in the timesheet). + * @Type: What type of entry the shift is (PTO, Regular, etc.) + * @EntryId: The unique ID for this shift + * @Date: The epoch value for the date of this shift. Note that this is different than the timestamp of the clock in and clock out. + * @AssociateTimeEntry: The clock-in/clock-out times recorded by the associate + * @SupervisorTimeEntry: The clock-in/clock-out times recorded by the supervisor + * @AdminTimeEntry: The clock-in/clock-out times recorded by the admin + * @Notes: The list of comments and reports saved for this shift. + */ +export const ShiftSchema = z.object({ Type: z.nativeEnum(CellType), - UUID: z.string(), + EntryId: z.string(), Date: z.number(), - Associate: TimeRowEntry, - Supervisor: TimeRowEntry, - Admin: TimeRowEntry, - Comment: z.union([z.undefined(), z.array(CommentSchema || ReportSchema)]) + AssociateTimeEntry: TimeEntrySchema, + SupervisorTimeEntry: TimeEntrySchema, + AdminTimeEntry: TimeEntrySchema, + Notes: z.array(CommentSchema || ReportSchema).default([]), // TODO : This will likely need to be two separate lists. }); -export type RowSchema = z.infer \ No newline at end of file +export type ShiftSchema = z.infer + +export const TimeSheetSchema = z.object({ + TimesheetID: z.number(), + UserID: z.string(), + StartDate: z.number(), + Status: StatusType, + CompanyID: z.string(), + TableData: z.array(ShiftSchema), + WeekNotes: z.union([z.undefined(), z.array(CommentSchema)]), +}); + +export type TimeSheetSchema = z.infer; \ No newline at end of file diff --git a/libs/shared/schemas/src/lib/UpdateTimesheet.ts b/libs/shared/schemas/src/lib/UpdateTimesheet.ts index 539b905..b63ca79 100644 --- a/libs/shared/schemas/src/lib/UpdateTimesheet.ts +++ b/libs/shared/schemas/src/lib/UpdateTimesheet.ts @@ -1,5 +1,6 @@ import { z } from "zod"; import { NoteSchema, TimesheetEntrySchema } from "./Timesheet-backenddb"; +import { TimesheetStatus } from "./CellTypes"; /* The supported timesheet operations currently supported. From 3f805821cd9b971a96e5a04fc9993b0d49ac8262 Mon Sep 17 00:00:00 2001 From: izzyconner <32255130+izzyconner@users.noreply.github.com> Date: Sun, 10 Mar 2024 16:07:10 -0400 Subject: [PATCH 06/15] Removing dynamo schema from shared schema lib --- .../schemas/src/lib/Timesheet-backenddb.ts | 89 ------------------- 1 file changed, 89 deletions(-) delete mode 100644 libs/shared/schemas/src/lib/Timesheet-backenddb.ts diff --git a/libs/shared/schemas/src/lib/Timesheet-backenddb.ts b/libs/shared/schemas/src/lib/Timesheet-backenddb.ts deleted file mode 100644 index 41f790c..0000000 --- a/libs/shared/schemas/src/lib/Timesheet-backenddb.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { z } from "zod"; -import { CellType } from "./CellTypes"; - -/** - * Represents the database schema for a note. This can be one of the following types: - * -- Comment: a general comment made for an entry or whole timesheet. - * -- Report: a specific report to reflect an incident that happens and requires admin attention, e.g. no-show or late attendance - */ -export const NoteSchema = z.object({ - Type: z.enum(["Comment", "Report"]), - EntryID: z.string(), - AuthorUUID: z.string(), - DateTime: z.number(), - Content: z.string(), - State: z.enum(["Active", "Deleted"]), -}) - -/** - * Represents the database schema for a schedule shift entry, made by a supervisor or admin - */ -export const ScheduleEntrySchema = z.object({ - EntryID: z.string(), - Date: z.number(), - StartDateTime: z.number().optional(), - EndDateTime: z.number().optional(), - AuthorUUID: z.string() -}) - -/** - * Represents the database schema for a clockin/clockout pair in epoch - */ -export const TimeEntrySchema = z.object({ - StartDateTime: z.number().optional(), - EndDateTime: z.number().optional(), - AuthorUUID: z.string(), -}) - - -/** - * Represents the database schema for a single shift or entry in the weekly timesheet. - */ -export const TimesheetEntrySchema = z.object({ - Type: z.enum([CellType.REGULAR, CellType.PTO]), - EntryID: z.string(), - Date: z.number(), - AssociateTimes: TimeEntrySchema.optional(), - SupervisorTimes: TimeEntrySchema.optional(), - AdminTimes: TimeEntrySchema.optional(), - Note: z.array(NoteSchema).optional(), -}) - - -// The status is either undefined, for not being at that stage yet, or -// contains the date and author of approving this submission -export const StatusEntryType = z.union( - [z.object({ - Date: z.number(), - AuthorID: z.string() - }), - z.undefined()]); - -// Status type contains the four stages of the pipeline we have defined -export const TimesheetStatus = z.object({ - HoursSubmitted: StatusEntryType, - HoursReviewed: StatusEntryType, - ScheduleSubmitted: StatusEntryType, - Finalized: StatusEntryType -}); - -/** - * Represents the database schema for a weekly timesheet - */ -export const TimeSheetSchema = z.object({ - TimesheetID: z.number(), - UserID: z.string(), - StartDate: z.number(), - Status: TimesheetStatus, - CompanyID: z.string(), - HoursData: z.array(TimesheetEntrySchema).default([]), - ScheduleData: z.array(ScheduleEntrySchema).default([]), - WeekNotes: z.array(NoteSchema).default([]), -}) - -export type TimesheetStatus = z.infer -export type TimeEntrySchema = z.infer -export type ScheduleEntrySchema = z.infer -export type NoteSchema = z.infer -export type TimesheetEntrySchema = z.infer -export type TimeSheetSchema = z.infer From 4e51d8b8d2a5fd7514cec58acb5b6f675b329aef Mon Sep 17 00:00:00 2001 From: izzyconner <32255130+izzyconner@users.noreply.github.com> Date: Mon, 11 Mar 2024 01:42:02 -0400 Subject: [PATCH 07/15] More backend replacement work; updating operation request handling --- .../src/db/timesheets/EntryOperations.ts | 80 ---------- .../src/db/timesheets/FrontendConversions.ts | 82 +++++++++-- .../src/db/timesheets/ItemsOperations.ts | 139 +++++------------- .../db/timesheets/OperationRequestHandler.ts | 28 ++-- apps/backend/src/dynamodb.ts | 4 +- libs/shared/schemas/src/lib/StatusSchema.ts | 21 --- libs/shared/schemas/src/lib/TimesheetRow.ts | 28 +++- 7 files changed, 140 insertions(+), 242 deletions(-) delete mode 100644 apps/backend/src/db/timesheets/EntryOperations.ts delete mode 100644 libs/shared/schemas/src/lib/StatusSchema.ts diff --git a/apps/backend/src/db/timesheets/EntryOperations.ts b/apps/backend/src/db/timesheets/EntryOperations.ts deleted file mode 100644 index 2e946d6..0000000 --- a/apps/backend/src/db/timesheets/EntryOperations.ts +++ /dev/null @@ -1,80 +0,0 @@ -import * as DynamoSchemas from '../dynamoSchemas/DynamoTimesheet' -import {TimesheetSchemas, Types} from '@org/schemas'; - - -// TODO : As we are shifting towards a shared schema system, we will move forward with an 'external' schema that handles dynamo data, and an 'internal' schema that works as the shared model of our data between the frontend and backend. -// Therefore, this file should be deprecated once the shift is complete. -/* - Code for converting from the frontend to our backend equivalents. Useful for actually processing this to be stored in our database / align with what our - backend expects to see in this data. -*/ - - -// Class to represent the mappings from a frontend key to a backend key alongside a conversion fn for the data -class KeyPairMappings { - originalKey:string; - conversionFn: Function; - finalKey: string; - - constructor(originalKey:string, finalKey: string, conversionFn:Function) { - this.originalKey = originalKey; - this.conversionFn = conversionFn; - this.finalKey = finalKey; - } -} - -export class frontendEntryConversions { - /* - Converts a shift in our timesheet to our database equivalent from frontend. - */ - private static toDBShift(row: TimesheetSchemas.ShiftSchema): DynamoSchemas.DynamoShiftSchema { - return DynamoSchemas.ShiftSchema.parse({ - Type: this.toDBType(row.Type), - EntryID: row.EntryId, - Date: row.Date, - AssociateTimes: this.toDBRowEntry(row.AssociateTimeEntry), - SupervisorTimes: this.toDBRowEntry(row.SupervisorTimeEntry), - AdminTimes: this.toDBRowEntry(row.AdminTimeEntry), - Note: row.Notes?.map((comment) => this.toDBNote(comment)) - }); - } - - // Converts a timesheet entry to our database equivalent from frontend. - private static toDBRowEntry(row: TimesheetSchemas.TimeEntrySchema | undefined): DynamoSchemas.DynamoTimeEntrySchema | undefined{ - if (row !== undefined) { - return DynamoSchemas.TimeEntrySchema.parse({ - StartDateTime: row.StartDateTime, - EndDateTime: row.EndDateTime, - AuthorUUID: row.AuthorID - }); - } - return undefined; - } - - // Converts a frontend cell type to our database equivalent. - private static toDBType(entryType: Types.CellType): DynamoSchemas.DynamoCellType { - switch (entryType) { - case Types.CellType.REGULAR: - return DynamoSchemas.DynamoCellType.REGULAR; - case Types.CellType.PTO: - return DynamoSchemas.DynamoCellType.PTO; - default: - return undefined - } - } - - // Converts a singular weekly comment / note from our frontend to database. - private static toDBNote(comment: TimesheetSchemas.CommentSchema | undefined): DynamoSchemas.DynamoNoteSchema | undefined { - if (comment !== undefined) { - return DynamoSchemas.NoteSchema.parse({ - Type: comment.Type, - EntryID: comment.UUID, - AuthorUUID: comment.AuthorID, - DateTime: comment.Timestamp, - Content: comment.Content, - State: comment.State - }); - } - return undefined; - } -} \ No newline at end of file diff --git a/apps/backend/src/db/timesheets/FrontendConversions.ts b/apps/backend/src/db/timesheets/FrontendConversions.ts index c09fbca..683a53f 100644 --- a/apps/backend/src/db/timesheets/FrontendConversions.ts +++ b/apps/backend/src/db/timesheets/FrontendConversions.ts @@ -1,20 +1,20 @@ +import { StatusEntry } from '../../../../../libs/shared/schemas/src/lib/TimesheetRow'; import * as DynamoSchemas from '../dynamoSchemas/DynamoTimesheet' -import * as frontendRowTypes from '../frontend/RowSchema' -import * as frontendTimesheetTypes from '@org/schemas/' +import {TimesheetSchemas, Types} from '@org/schemas'; /* Mapper from converting from DynamoDB Timesheet schema to the internal backend/frontend model. */ -export class DBToModel { +export class DynamoSchemaConverter { // Converts a list of backend timesheets to frontend ones - public static convertTimesheets(timesheets: DynamoSchemas.DynamoTimesheetSchema[]) : frontendTimesheetTypes.FrontendTimeSheetSchema[] { + public static convertDbTimesheets(timesheets: DynamoSchemas.DynamoTimesheetSchema[]) : TimesheetSchemas.TimeSheetSchema[] { return timesheets.map((timesheet) => this.toFrontendTimesheet(timesheet)); } // Converts a singular backend timesheet to a frontend one - public static toFrontendTimesheet(timesheet: DynamoSchemas.DynamoTimesheetSchema): frontendTimesheetTypes.FrontendTimeSheetSchema { - return frontendTimesheetTypes.FrontendTimeSheetSchema.parse({ + public static toFrontendTimesheet(timesheet: DynamoSchemas.DynamoTimesheetSchema): TimesheetSchemas.TimeSheetSchema { + return TimesheetSchemas.TimeSheetSchema.parse({ TimesheetID: timesheet.TimesheetID, UserID: timesheet.UserID, StartDate: timesheet.StartDate, @@ -26,8 +26,8 @@ export class DBToModel { } // Converts a backend status to a frontend one - private static toFrontendStatus(status: DynamoSchemas.DynamoStatusSchema): frontendTimesheetTypes.StatusType { - return frontendTimesheetTypes.StatusType.parse({ + private static toFrontendStatus(status: DynamoSchemas.DynamoStatusSchema): TimesheetSchemas.StatusEntry { + return StatusEntry.parse({ HoursSubmitted: status.HoursSubmitted, HoursReviewed: status.HoursReviewed, Finalized: status.Finalized @@ -35,12 +35,12 @@ export class DBToModel { } //Converts a backend row to a frontend one - private static toFrontendRows(rows: DynamoSchemas.DynamoShiftSchema[]): frontendRowTypes.RowSchema[] { + private static toFrontendRows(rows: DynamoSchemas.DynamoShiftSchema[]): TimesheetSchemas.ShiftSchema[] { if (rows === undefined) { return []; } return rows.map((row) => { - return frontendRowTypes.RowSchema.parse({ + return TimesheetSchemas.ShiftSchema.parse({ UUID: row.EntryID, Type: row.Type, Date: row.Date, @@ -53,11 +53,11 @@ export class DBToModel { } //Converts a backend row entry to a frontend one - private static toFrontendRowEntry(row: DynamoSchemas.DynamoTimeEntrySchema): frontendRowTypes.TimeRowEntry { + private static toFrontendRowEntry(row: DynamoSchemas.DynamoTimeEntrySchema): TimesheetSchemas.TimeEntrySchema { if (row === undefined) { return undefined; } - return frontendRowTypes.TimeRowEntry.parse({ + return TimesheetSchemas.TimeEntrySchema.parse({ Start: row.StartDateTime, End: row.EndDateTime, AuthorID: row.AuthorUUID @@ -65,12 +65,12 @@ export class DBToModel { } //Converts a list of backend comments to frontend equivalents. - private static toFrontendComments(comments: DynamoSchemas.DynamoNoteSchema[]): frontendRowTypes.CommentSchema[] { + private static toFrontendComments(comments: DynamoSchemas.DynamoNoteSchema[]): TimesheetSchemas.CommentSchema[] { if (comments === undefined) { return []; } return comments.map((comment) => { - return frontendRowTypes.CommentSchema.parse({ + return TimesheetSchemas.CommentSchema.parse({ UUID: comment.EntryID, AuthorID: comment.AuthorUUID, Type: comment.Type, @@ -80,4 +80,58 @@ export class DBToModel { }); }) } + + /* + Converts a shift in our timesheet to our database equivalent from frontend. + */ + private static toDBShift(row: TimesheetSchemas.ShiftSchema): DynamoSchemas.DynamoShiftSchema { + return DynamoSchemas.ShiftSchema.parse({ + Type: this.toDBType(row.Type), + EntryID: row.EntryId, + Date: row.Date, + AssociateTimes: this.toDBRowEntry(row.AssociateTimeEntry), + SupervisorTimes: this.toDBRowEntry(row.SupervisorTimeEntry), + AdminTimes: this.toDBRowEntry(row.AdminTimeEntry), + Note: row.Notes?.map((comment) => this.toDBNote(comment)) + }); + } + + // Converts a timesheet entry to our database equivalent from frontend. + private static toDBRowEntry(row: TimesheetSchemas.TimeEntrySchema | undefined): DynamoSchemas.DynamoTimeEntrySchema | undefined{ + if (row !== undefined) { + return DynamoSchemas.TimeEntrySchema.parse({ + StartDateTime: row.StartDateTime, + EndDateTime: row.EndDateTime, + AuthorUUID: row.AuthorID + }); + } + return undefined; + } + + // Converts a frontend cell type to our database equivalent. + private static toDBType(entryType: Types.CellType): DynamoSchemas.DynamoCellType { + switch (entryType) { + case Types.CellType.REGULAR: + return DynamoSchemas.DynamoCellType.REGULAR; + case Types.CellType.PTO: + return DynamoSchemas.DynamoCellType.PTO; + default: + return undefined + } + } + + // Converts a singular weekly comment / note from our frontend to database. + private static toDBNote(comment: TimesheetSchemas.CommentSchema | TimesheetSchemas.ReportSchema | undefined): DynamoSchemas.DynamoNoteSchema | undefined { + if (comment !== undefined) { + return DynamoSchemas.NoteSchema.parse({ + Type: comment.Type, + EntryID: "", // TODO: EntryId will need to be updated + AuthorUUID: comment.AuthorID, + DateTime: comment.Timestamp, + Content: comment.Content, + State: comment.State + }); + } + return undefined; + } } \ No newline at end of file diff --git a/apps/backend/src/db/timesheets/ItemsOperations.ts b/apps/backend/src/db/timesheets/ItemsOperations.ts index 4dfcfdf..6ce1994 100644 --- a/apps/backend/src/db/timesheets/ItemsOperations.ts +++ b/apps/backend/src/db/timesheets/ItemsOperations.ts @@ -1,6 +1,5 @@ -import {DynamoTimesheetSchema, DynamoShiftSchema, ScheduleEntrySchema, DynamoNoteSchema, StatusEntryType} from '../dynamoSchemas/DynamoTimesheet' -import {UpdateRequest, InsertRequest, DeleteRequest, TimesheetListItems, StatusChangeRequest} from '../dynamoSchemas/UpdateTimesheet' -import { ExceptionsHandler } from '@nestjs/core/exceptions/exceptions-handler'; +import {OperationRequests, TimesheetSchemas} from '@org/schemas' +import { CommentSchema } from '../../../../../libs/shared/schemas/src/lib/TimesheetRow'; //Not sure why but only works if imported like this :| const moment = require('moment-timezone'); @@ -9,13 +8,13 @@ const moment = require('moment-timezone'); */ interface ItemsOperations { // Insert into the list of items - Insert(timesheet: DynamoTimesheetSchema, body:InsertRequest): DynamoTimesheetSchema + Insert(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.InsertRequest): TimesheetSchemas.TimeSheetSchema // Delete a specific item from the list of items - Delete(timesheet: DynamoTimesheetSchema, body:DeleteRequest): DynamoTimesheetSchema + Delete(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.DeleteRequest): TimesheetSchemas.TimeSheetSchema // Update a specific item in the list of items - Update(timesheet: DynamoTimesheetSchema, body:UpdateRequest) : DynamoTimesheetSchema - // TODO: add a new StatusChange(....) function - StatusChange(timesheet: DynamoTimesheetSchema, body:StatusChangeRequest): DynamoTimesheetSchema + Update(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.UpdateRequest) : TimesheetSchemas.TimeSheetSchema + // Update the status of a timesheet + StatusChange(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.StatusChangeRequest): TimesheetSchemas.TimeSheetSchema } /* @@ -25,17 +24,14 @@ interface ItemsOperations { export class ItemsDelegator { // Class to determine what field of the timesheet we are performing item operations on tableData = new HoursDataOperations() - scheduleData = new ScheduledDataOperations() notesData = new NotesOperations() - public AttributeToModify(body: InsertRequest | DeleteRequest | UpdateRequest) { + public AttributeToModify(body: OperationRequests.InsertRequest | OperationRequests.DeleteRequest | OperationRequests.UpdateRequest) { switch (body.Type) { - case TimesheetListItems.TABLEDATA: + case OperationRequests.TimesheetListItems.TABLEDATA: return this.tableData; - case TimesheetListItems.SCHEDULEDATA: - return this.scheduleData; - case TimesheetListItems.WEEKNOTES: + case OperationRequests.TimesheetListItems.WEEKNOTES: return this.notesData; default: throw new Error ("Invalid operation provided"); @@ -49,10 +45,11 @@ export class ItemsDelegator { i.e. the user entered rows of the time they worked. */ export class HoursDataOperations implements ItemsOperations { - public Insert(timesheet: DynamoTimesheetSchema, body:InsertRequest) { - const data = timesheet.HoursData; - const item = TimesheetEntrySchema.parse(body.Item); + public Insert(timesheet: TimesheetSchemas.TimeSheetSchema, body: OperationRequests.InsertRequest) { + const data = timesheet.TableData; + + const item = TimesheetSchemas.ShiftSchema.parse(body.Item); // Sorting is currently only day by day based - need some way of minute by minute var idx = 0; for (idx; idx < data.length; idx += 1) { @@ -61,11 +58,12 @@ export class HoursDataOperations implements ItemsOperations { break; } } + //Insert into front of list if (idx === 0) { return { ...timesheet, - HoursData: [ + TableData: [ item, ...data ] @@ -74,7 +72,7 @@ export class HoursDataOperations implements ItemsOperations { //End of list return { ...timesheet, - HoursData: [ + TableData: [ ...data, item ] @@ -82,7 +80,7 @@ export class HoursDataOperations implements ItemsOperations { } else { return { ...timesheet, - HoursData: [ + TableData: [ ...data.slice(0, idx), item, ...data.slice(idx + 1 ) @@ -90,23 +88,23 @@ export class HoursDataOperations implements ItemsOperations { } } } - public Delete(timesheet: DynamoTimesheetSchema, body:DeleteRequest) { + public Delete(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.DeleteRequest) { return { ...timesheet, - HoursData: timesheet.HoursData.filter((row) => row.EntryID !== body.Id) + TableData: timesheet.TableData.filter((row) => row.EntryId !== body.Id) }; } - public Update(timesheet: DynamoTimesheetSchema, body:UpdateRequest) { - if (timesheet.HoursData?.filter((row) => row.EntryID === body.Id).length === 0) { + public Update(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.UpdateRequest) { + if (timesheet.TableData?.filter((row) => row.EntryId === body.Id).length === 0) { throw new Error("Could not find a row with that ID"); } return { ...timesheet, - HoursData: timesheet.HoursData.map((row) => { + TableData: timesheet.TableData.map((row) => { // Only update the one specific id - if (row.EntryID === body.Id) { + if (row.EntryId === body.Id) { return { ...row, [body.Attribute] : body.Data @@ -117,7 +115,7 @@ export class HoursDataOperations implements ItemsOperations { } } - public StatusChange(timesheet: DynamoTimesheetSchema, body:StatusChangeRequest) { + public StatusChange(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.StatusChangeRequest) { if (timesheet.TimesheetID !== body.TimesheetId) { throw new Error("Requested timesheet does not match timesheet ID of timesheet being updated"); } @@ -126,7 +124,7 @@ export class HoursDataOperations implements ItemsOperations { As an example... original Status : {HoursSubmitted=undefined, HoursReviewed=undefined, Finalized=undefined} - StatusChangeRequest: {TimesheetId=abc, AssociateId=123456, authorId:123456, dateSubmited=0638457, StatusType='HoursSubmitted'} + OperationRequests.StatusChangeRequest: {TimesheetId=abc, AssociateId=123456, authorId:123456, dateSubmited=0638457, StatusType='HoursSubmitted'} new Status: {HoursSubmitted={Date: 0638457, AuthorID: 123456}, HoursReviewed=undefined, Finalized=undefined} */ @@ -146,102 +144,31 @@ export class HoursDataOperations implements ItemsOperations { } } -// Class for operations on the schedule data field - i.e. the supervisor reported hours they should have worked. -export class ScheduledDataOperations implements ItemsOperations { - public Insert(timesheet: DynamoTimesheetSchema, body:InsertRequest) { - const data = timesheet.ScheduleData; - const item = ScheduleEntrySchema.parse(body.Item); - //TODO - Fledge out the sorting to be simplified / actually accurate on the minute by minute. Currently is only based on day - var idx = 0; - for (idx; idx < data.length; idx += 1) { - const row = data[idx]; - if (moment.unix(row.Date).isAfter(moment.unix(item.Date), 'day')) { - break; - } - } - //Insert into front of list - if (idx === 0) { - return { - ...timesheet, - ScheduleData: [ - item, - ...data - ] - }; - } else if (idx === data.length) { - //End of list - return { - ...timesheet, - ScheduleData: [ - ...data, - item - ] - }; - } else { - return { - ...timesheet, - ScheduleData: [ - ...data.slice(0, idx), - item, - ...data.slice(idx + 1 ) - ] - } - } - } - public Delete(timesheet: DynamoTimesheetSchema, body:DeleteRequest) { - return { - ...timesheet, - ScheduleData: timesheet.ScheduleData.filter((row) => row.EntryID !== body.Id) - } - } - - public Update(timesheet: DynamoTimesheetSchema, body:UpdateRequest) { - //TODO - Add in functionality to trigger insert instead of update if ID does not yet exist - return { - ...timesheet, - ScheduleData: timesheet.ScheduleData.map((row) => { - // Only update the one specific id - if (row.EntryID === body.Id) { - return { - ...row, - [body.Attribute] : body.Data - }; - } - return row; - }) - } - } - - public StatusChange(timesheet: DynamoTimesheetSchema, body:StatusChangeRequest) { - return undefined; - } -} - // Operations on the weekly notes on the timesheet - i.e. comments relating to the entire timesheet / specific day worked. export class NotesOperations implements ItemsOperations { - public Insert(timesheet: DynamoTimesheetSchema, body:InsertRequest) { + public Insert(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.InsertRequest) { return { ...timesheet, WeekNotes: [ ...timesheet.WeekNotes, - NoteSchema.parse(body.Item) + CommentSchema.parse(body.Item) // TODO : Need to add report parsing as well ] }; } - public Delete(timesheet: DynamoTimesheetSchema, body:DeleteRequest) { + public Delete(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.DeleteRequest) { return { ...timesheet, - WeekNotes: timesheet.WeekNotes.filter((note) => note.EntryID !== body.Id) + WeekNotes: timesheet.WeekNotes.filter((note) => note.EntryId !== body.Id) } } - public Update(timesheet: DynamoTimesheetSchema, body:UpdateRequest) { + public Update(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.UpdateRequest) { //TODO - Add in functionality to trigger insert instead of update if ID does not yet exist return { ...timesheet, WeekNotes: timesheet.WeekNotes.map((note) => { - if (note.EntryID === body.Id) { + if (note.EntryId === body.Id) { return { ...note, [body.Attribute] : body.Data @@ -252,7 +179,7 @@ export class NotesOperations implements ItemsOperations { } } - public StatusChange(timesheet: DynamoTimesheetSchema, body:StatusChangeRequest) { + public StatusChange(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.StatusChangeRequest) { return undefined; } } diff --git a/apps/backend/src/db/timesheets/OperationRequestHandler.ts b/apps/backend/src/db/timesheets/OperationRequestHandler.ts index ea34f95..3c963c0 100644 --- a/apps/backend/src/db/timesheets/OperationRequestHandler.ts +++ b/apps/backend/src/db/timesheets/OperationRequestHandler.ts @@ -1,13 +1,11 @@ -import { DBToModel } from "./FrontendConversions"; -import { FrontendTimeSheetSchema } from "../frontend/TimesheetSchema"; -import { TimesheetUpdateRequest, TimesheetOperations } from "../dynamoSchemas/UpdateTimesheet"; +import { OperationRequests } from "@org/schemas"; import {UserTimesheets} from "src/dynamodb" import { ExceptionsHandler } from "@nestjs/core/exceptions/exceptions-handler"; import { HoursDataOperations, ItemsDelegator } from "./ItemsOperations"; import {WriteEntryToTable} from "src/dynamodb" -import {frontendEntryConversions} from './EntryOperations' +import {DynamoSchemaConverter} from './FrontendConversions' /** * Purpose: Handle Operation Requests @@ -16,7 +14,7 @@ export class OperationRequestHandler { private delegator = new ItemsDelegator() - public async updateTimesheet(request: TimesheetUpdateRequest, userid: string): Promise { + public async updateTimesheet(request: OperationRequests.TimesheetUpdateRequest, userid: string): Promise { /* Provided a request to update a timesheet, processes the request and then return a response indicating success or failure. @@ -29,26 +27,24 @@ export class OperationRequestHandler { const userTimesheets = await UserTimesheets(userid); const selectedTimesheet = userTimesheets.filter((timesheet) => timesheet.TimesheetID === request.TimesheetID) if (selectedTimesheet.length == 1) { + const convertedTimesheet = DynamoSchemaConverter.toFrontendTimesheet(selectedTimesheet[0]); console.log("Timesheet found for Update Timesheet Operation %s", request.Operation.valueOf()) var modifiedTimesheet = undefined; switch (request.Operation) { - case TimesheetOperations.STATUS_CHANGE: + case OperationRequests.TimesheetOperations.STATUS_CHANGE: // This operation should only be supported for Hours Data - modifiedTimesheet = this.delegator.tableData.StatusChange(selectedTimesheet[0], request.Payload); + modifiedTimesheet = this.delegator.tableData.StatusChange(convertedTimesheet, request.Payload); break; - case TimesheetOperations.DELETE: - modifiedTimesheet = this.delegator.AttributeToModify(request.Payload).Delete(selectedTimesheet[0], request.Payload); + case OperationRequests.TimesheetOperations.DELETE: + modifiedTimesheet = this.delegator.AttributeToModify(request.Payload).Delete(convertedTimesheet, request.Payload); break; - case TimesheetOperations.INSERT: + case OperationRequests.TimesheetOperations.INSERT: //Determine attribute we are modifying and then also convert the field from frontend to backend. - modifiedTimesheet = this.delegator.AttributeToModify(request.Payload).Insert(selectedTimesheet[0], - frontendEntryConversions.insertConversion(request.Payload)); + modifiedTimesheet = this.delegator.AttributeToModify(request.Payload).Insert(convertedTimesheet, request.Payload); break; - case TimesheetOperations.UPDATE: + case OperationRequests.TimesheetOperations.UPDATE: //Determine attribute we are modifying and then also convert the field from frontend to backend. - modifiedTimesheet = this.delegator.AttributeToModify(request.Payload).Update(selectedTimesheet[0], - frontendEntryConversions.updateConversion(request.Payload)); - + modifiedTimesheet = this.delegator.AttributeToModify(request.Payload).Update(convertedTimesheet, request.Payload); break; default: throw new Error(`Invalid operation: ${request.Operation}`); diff --git a/apps/backend/src/dynamodb.ts b/apps/backend/src/dynamodb.ts index c94b1e7..3e75df2 100644 --- a/apps/backend/src/dynamodb.ts +++ b/apps/backend/src/dynamodb.ts @@ -24,6 +24,7 @@ console.log("secret", process.env.AWS_SECRET_ACCESS_KEY!); const client = new DynamoDB({ region: "us-east-2" }); +// TODO : This should return the 'internal' version of the timesheet schema I think? export async function UserTimesheets(uuid: string): Promise { // Set up the query to get all timesheets for a given uuid const command = new QueryCommand({ @@ -128,7 +129,8 @@ export async function GetCompanyData( return companyData[0]; } -export async function WriteEntryToTable(table:DynamoTimesheetSchema): Promise { +// TODO: +export async function WriteEntryToTable(table: DynamoTimesheetSchema): Promise { const options = { removeUndefinedValues: true }; diff --git a/libs/shared/schemas/src/lib/StatusSchema.ts b/libs/shared/schemas/src/lib/StatusSchema.ts deleted file mode 100644 index 8eeaa86..0000000 --- a/libs/shared/schemas/src/lib/StatusSchema.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { z } from "zod"; - -// The status is either undefined, for not being at that stage yet, or -// contains the date and author of approving this submission -export const StatusEntryType = z.union([ - z.object({ - Date: z.number(), - AuthorID: z.string(), - }), - z.undefined(), -]); - -// Status type contains the three stages of the pipeline we have defined -export const StatusType = z.object({ - HoursSubmitted: StatusEntryType, - HoursReviewed: StatusEntryType, - Finalized: StatusEntryType, -}); - -export type StatusEntryType = z.infer; -export type StatusType = z.infer; \ No newline at end of file diff --git a/libs/shared/schemas/src/lib/TimesheetRow.ts b/libs/shared/schemas/src/lib/TimesheetRow.ts index 4caadd5..a34ef87 100644 --- a/libs/shared/schemas/src/lib/TimesheetRow.ts +++ b/libs/shared/schemas/src/lib/TimesheetRow.ts @@ -1,6 +1,5 @@ import { z } from "zod"; import { CellStatus, CellType, CommentType, ReportOptions } from "./CellTypes"; -import { StatusType } from "./StatusSchema"; /** * A collection of various schemas used in creating a shift entry in the timesheet. These schemas are internal models, @@ -21,7 +20,7 @@ export const TimeEntrySchema = z.union([z.undefined(), z.object({ export type TimeEntrySchema = z.infer export const CommentSchema = z.object({ - UUID: z.string(), + EntryId: z.string(), AuthorID:z.string(), Type: z.nativeEnum(CellType), Timestamp: z.number(), @@ -32,7 +31,8 @@ export const CommentSchema = z.object({ export type CommentSchema = z.infer export const ReportSchema = z.object({ - AuthorID:z.string(), + AuthorID:z.string(), + EntryId: z.string(), Timestamp: z.number(), Type: z.nativeEnum(CommentType), CorrectTime: z.number(), @@ -44,6 +44,26 @@ export const ReportSchema = z.object({ export type ReportSchema = z.infer +// The status is either undefined, for not being at that stage yet, or +// contains the date and author of approving this submission +export const StatusEntryType = z.union([ + z.object({ + Date: z.number(), + AuthorID: z.string(), + }), + z.undefined(), +]); + +// Status type contains the three stages of the pipeline we have defined +export const StatusEntry = z.object({ + HoursSubmitted: StatusEntryType, + HoursReviewed: StatusEntryType, + Finalized: StatusEntryType, +}); + +export type StatusEntryType = z.infer; +export type StatusEntry = z.infer; + /** * The schema for a shift entry (visually, a row in the timesheet). * @Type: What type of entry the shift is (PTO, Regular, etc.) @@ -69,7 +89,7 @@ export const TimeSheetSchema = z.object({ TimesheetID: z.number(), UserID: z.string(), StartDate: z.number(), - Status: StatusType, + Status: StatusEntry, CompanyID: z.string(), TableData: z.array(ShiftSchema), WeekNotes: z.union([z.undefined(), z.array(CommentSchema)]), From 5b6cc20dc388be1f5b9a55a7eb534c38d42e09c2 Mon Sep 17 00:00:00 2001 From: izzyconner <32255130+izzyconner@users.noreply.github.com> Date: Sun, 17 Mar 2024 12:06:49 -0400 Subject: [PATCH 08/15] Finished backend replacement of schemas --- .../src/db/dynamoSchemas/DynamoTimesheet.ts | 34 +++++++++---------- apps/backend/src/dynamodb.ts | 7 ++-- apps/backend/src/users/user.dto.ts | 0 apps/backend/test/UploadTimesheet.ts | 8 ++--- 4 files changed, 23 insertions(+), 26 deletions(-) delete mode 100644 apps/backend/src/users/user.dto.ts diff --git a/apps/backend/src/db/dynamoSchemas/DynamoTimesheet.ts b/apps/backend/src/db/dynamoSchemas/DynamoTimesheet.ts index eaede5e..d354a71 100644 --- a/apps/backend/src/db/dynamoSchemas/DynamoTimesheet.ts +++ b/apps/backend/src/db/dynamoSchemas/DynamoTimesheet.ts @@ -5,7 +5,7 @@ import { z } from "zod"; * -- Comment: a general comment made for an entry or whole timesheet. * -- Report: a specific report to reflect an incident that happens and requires admin attention, e.g. no-show or late attendance */ -export const NoteSchema = z.object({ +export const DynamoNoteSchema = z.object({ Type: z.enum(["Comment", "Report"]), EntryID: z.string(), AuthorUUID: z.string(), @@ -17,7 +17,7 @@ export const NoteSchema = z.object({ /** * Represents the database schema for a clockin/clockout pair in epoch */ -export const TimeEntrySchema = z.object({ +export const DynamoTimeEntrySchema = z.object({ StartDateTime: z.number().optional(), EndDateTime: z.number().optional(), AuthorUUID: z.string(), @@ -37,14 +37,14 @@ export enum DynamoCellType { /** * Represents the database schema for a single shift (visually, a row) in the weekly timesheet. */ -export const ShiftSchema = z.object({ +export const DynamoShiftSchema = z.object({ Type: z.enum([DynamoCellType.REGULAR, DynamoCellType.REGULAR_LEGACY, DynamoCellType.PTO]).transform((cellType) => cellType === DynamoCellType.REGULAR_LEGACY ? DynamoCellType.REGULAR : cellType), EntryID: z.string(), Date: z.number(), - AssociateTimes: TimeEntrySchema.optional(), - SupervisorTimes: TimeEntrySchema.optional(), - AdminTimes: TimeEntrySchema.optional(), - Note: z.array(NoteSchema).optional(), + AssociateTimes: DynamoTimeEntrySchema.optional(), + SupervisorTimes: DynamoTimeEntrySchema.optional(), + AdminTimes: DynamoTimeEntrySchema.optional(), + Note: z.array(DynamoNoteSchema).optional(), }) // The status is either undefined, for not being at that stage yet, or @@ -57,7 +57,7 @@ export const StatusEntryType = z.union( z.undefined()]); // Status type contains the four stages of the pipeline we have defined -export const TimesheetStatus = z.object({ +export const DynamoStatusSchema = z.object({ HoursSubmitted: StatusEntryType, HoursReviewed: StatusEntryType, Finalized: StatusEntryType @@ -66,18 +66,18 @@ export const TimesheetStatus = z.object({ /** * Represents the database schema for a weekly timesheet */ -export const TimesheetSchema = z.object({ +export const DynamoTimesheetSchema = z.object({ TimesheetID: z.number(), UserID: z.string(), StartDate: z.number(), - Status: TimesheetStatus, + Status: DynamoStatusSchema, CompanyID: z.string(), - HoursData: z.array(ShiftSchema).default([]), - WeekNotes: z.array(NoteSchema).default([]), + HoursData: z.array(DynamoShiftSchema).default([]), + WeekNotes: z.array(DynamoNoteSchema).default([]), }) -export type DynamoStatusSchema = z.infer -export type DynamoTimeEntrySchema = z.infer -export type DynamoNoteSchema = z.infer -export type DynamoShiftSchema = z.infer -export type DynamoTimesheetSchema = z.infer \ No newline at end of file +export type DynamoStatusSchema = z.infer +export type DynamoTimeEntrySchema = z.infer +export type DynamoNoteSchema = z.infer +export type DynamoShiftSchema = z.infer +export type DynamoTimesheetSchema = z.infer \ No newline at end of file diff --git a/apps/backend/src/dynamodb.ts b/apps/backend/src/dynamodb.ts index 3e75df2..a85bc58 100644 --- a/apps/backend/src/dynamodb.ts +++ b/apps/backend/src/dynamodb.ts @@ -1,9 +1,6 @@ import { - DynamoDBClient, DynamoDB, - ScanCommand, QueryCommand, - BatchGetItemCommand, } from "@aws-sdk/client-dynamodb"; import { unmarshall, marshall } from "@aws-sdk/util-dynamodb"; import * as dotenv from "dotenv"; @@ -41,7 +38,7 @@ export async function UserTimesheets(uuid: string): Promise unmarshall(i)); - const timesheetData = unmarshalledItems.map((i) => TimeSheetSchema.parse(i)); + const timesheetData = unmarshalledItems.map((i) => DynamoTimesheetSchema.parse(i)); return timesheetData; } @@ -145,7 +142,7 @@ export async function WriteEntryToTable(table: DynamoTimesheetSchema): Promise Date: Sun, 17 Mar 2024 13:15:27 -0400 Subject: [PATCH 09/15] Updates to frontend, fixing schema types --- apps/backend/src/db/timesheets/Formatter.ts | 11 +- .../src/db/timesheets/FrontendConversions.ts | 35 +- .../src/db/timesheets/ItemsOperations.ts | 37 +- .../db/timesheets/OperationRequestHandler.ts | 14 +- .../src/components/Auth/apiClient.tsx | 21 +- .../TimeCardPage/AggregationTable.tsx | 144 ++-- .../TimeCardPage/CellTypes/CellType.tsx | 2 +- .../TimeCardPage/CellTypes/CommentCell.tsx | 11 +- .../CommentModals/ShowCommentModal.tsx | 4 +- .../CommentModals/ShowReportModal.tsx | 394 ++++++----- .../TimeCardPage/CellTypes/HoursCell.tsx | 32 +- .../TimeCardPage/CellTypes/TimeEntry.tsx | 12 +- .../components/TimeCardPage/CommentModal.tsx | 3 +- .../components/TimeCardPage/SubmitCard.tsx | 85 ++- .../src/components/TimeCardPage/TimeSheet.tsx | 655 +++++++++--------- .../src/components/TimeCardPage/TimeTable.tsx | 182 ++--- .../components/TimeCardPage/TimeTableRow.tsx | 168 +++-- .../components/TimeCardPage/UserContext.tsx | 6 +- .../src/components/TimeCardPage/types.tsx | 1 + .../src/components/TimeCardPage/utils.tsx | 61 +- apps/frontend/src/schemas/RowSchema.tsx | 55 -- apps/frontend/src/schemas/TimesheetSchema.tsx | 32 - apps/frontend/src/schemas/UserSchema.tsx | 11 - apps/frontend/tsconfig.json | 5 +- libs/shared/schemas/src/index.ts | 10 +- libs/shared/schemas/src/lib/TimesheetRow.ts | 4 +- 26 files changed, 1034 insertions(+), 961 deletions(-) delete mode 100644 apps/frontend/src/schemas/RowSchema.tsx delete mode 100644 apps/frontend/src/schemas/TimesheetSchema.tsx delete mode 100644 apps/frontend/src/schemas/UserSchema.tsx diff --git a/apps/backend/src/db/timesheets/Formatter.ts b/apps/backend/src/db/timesheets/Formatter.ts index 0a43ee1..6defd83 100644 --- a/apps/backend/src/db/timesheets/Formatter.ts +++ b/apps/backend/src/db/timesheets/Formatter.ts @@ -4,7 +4,7 @@ import * as constants from 'src/constants' import { v4 as uuidv4 } from 'uuid'; import {UserTimesheets, WriteEntryToTable} from 'src/dynamodb' -import { DBToModel } from './FrontendConversions'; +import { DynamoSchemaConverter } from './FrontendConversions'; const moment = require('moment-timezone'); @@ -23,10 +23,10 @@ export class Formatter { timesheets = this.format(timesheets); - return DBToModel.convertTimesheets(timesheets); + return DynamoSchemaConverter.convertDbTimesheets(timesheets); } - // Formats a list of backend / database timesheets to the frontend equivalents. + // Formats a list of backend / database timesheets to the frontend equivalents. TODO: That isn't what this does - should fix public static format(timesheets: timesheetSchemas.DynamoTimesheetSchema[]) : timesheetSchemas.DynamoTimesheetSchema[] { const updatedTimesheets = timesheets.map((timesheet) => { const [updatedTimesheet, modified] = this.validate(timesheet); @@ -37,7 +37,6 @@ export class Formatter { return updatedTimesheet; }) return updatedTimesheets - } // Main method all other future methods delegate to / would return to when we are processing a timesheet to convert to frontend @@ -74,7 +73,7 @@ export class Formatter { } //Returns the updated timesheet and whether or not it was modified return [ - timesheetSchemas.TimesheetSchema.parse( + timesheetSchemas.DynamoTimesheetSchema.parse( {...timesheet, HoursData: updatedRows } @@ -83,7 +82,7 @@ export class Formatter { } //Creates an empty row in the timesheet for a specified date. private static createEmptyRow(date: number): timesheetSchemas.DynamoShiftSchema { - return timesheetSchemas.ShiftSchema.parse({ + return timesheetSchemas.DynamoShiftSchema.parse({ Type: timesheetSchemas.DynamoCellType.REGULAR, EntryID: uuidv4(), Date: date, diff --git a/apps/backend/src/db/timesheets/FrontendConversions.ts b/apps/backend/src/db/timesheets/FrontendConversions.ts index 683a53f..2324d02 100644 --- a/apps/backend/src/db/timesheets/FrontendConversions.ts +++ b/apps/backend/src/db/timesheets/FrontendConversions.ts @@ -1,6 +1,5 @@ -import { StatusEntry } from '../../../../../libs/shared/schemas/src/lib/TimesheetRow'; import * as DynamoSchemas from '../dynamoSchemas/DynamoTimesheet' -import {TimesheetSchemas, Types} from '@org/schemas'; +import {CommentSchema, ReportSchema, ShiftSchema, StatusEntry, TimeEntrySchema, TimeSheetSchema} from '@org/schemas'; /* Mapper from converting from DynamoDB Timesheet schema to the internal backend/frontend model. @@ -8,13 +7,13 @@ import {TimesheetSchemas, Types} from '@org/schemas'; export class DynamoSchemaConverter { // Converts a list of backend timesheets to frontend ones - public static convertDbTimesheets(timesheets: DynamoSchemas.DynamoTimesheetSchema[]) : TimesheetSchemas.TimeSheetSchema[] { + public static convertDbTimesheets(timesheets: DynamoSchemas.DynamoTimesheetSchema[]) : TimeSheetSchema[] { return timesheets.map((timesheet) => this.toFrontendTimesheet(timesheet)); } // Converts a singular backend timesheet to a frontend one - public static toFrontendTimesheet(timesheet: DynamoSchemas.DynamoTimesheetSchema): TimesheetSchemas.TimeSheetSchema { - return TimesheetSchemas.TimeSheetSchema.parse({ + public static toFrontendTimesheet(timesheet: DynamoSchemas.DynamoTimesheetSchema): TimeSheetSchema { + return TimeSheetSchema.parse({ TimesheetID: timesheet.TimesheetID, UserID: timesheet.UserID, StartDate: timesheet.StartDate, @@ -26,7 +25,7 @@ export class DynamoSchemaConverter { } // Converts a backend status to a frontend one - private static toFrontendStatus(status: DynamoSchemas.DynamoStatusSchema): TimesheetSchemas.StatusEntry { + private static toFrontendStatus(status: DynamoSchemas.DynamoStatusSchema): StatusEntry { return StatusEntry.parse({ HoursSubmitted: status.HoursSubmitted, HoursReviewed: status.HoursReviewed, @@ -35,12 +34,12 @@ export class DynamoSchemaConverter { } //Converts a backend row to a frontend one - private static toFrontendRows(rows: DynamoSchemas.DynamoShiftSchema[]): TimesheetSchemas.ShiftSchema[] { + private static toFrontendRows(rows: DynamoSchemas.DynamoShiftSchema[]): ShiftSchema[] { if (rows === undefined) { return []; } return rows.map((row) => { - return TimesheetSchemas.ShiftSchema.parse({ + return ShiftSchema.parse({ UUID: row.EntryID, Type: row.Type, Date: row.Date, @@ -53,11 +52,11 @@ export class DynamoSchemaConverter { } //Converts a backend row entry to a frontend one - private static toFrontendRowEntry(row: DynamoSchemas.DynamoTimeEntrySchema): TimesheetSchemas.TimeEntrySchema { + private static toFrontendRowEntry(row: DynamoSchemas.DynamoTimeEntrySchema): TimeEntrySchema { if (row === undefined) { return undefined; } - return TimesheetSchemas.TimeEntrySchema.parse({ + return TimeEntrySchema.parse({ Start: row.StartDateTime, End: row.EndDateTime, AuthorID: row.AuthorUUID @@ -65,12 +64,12 @@ export class DynamoSchemaConverter { } //Converts a list of backend comments to frontend equivalents. - private static toFrontendComments(comments: DynamoSchemas.DynamoNoteSchema[]): TimesheetSchemas.CommentSchema[] { + private static toFrontendComments(comments: DynamoSchemas.DynamoNoteSchema[]): CommentSchema[] { if (comments === undefined) { return []; } return comments.map((comment) => { - return TimesheetSchemas.CommentSchema.parse({ + return CommentSchema.parse({ UUID: comment.EntryID, AuthorID: comment.AuthorUUID, Type: comment.Type, @@ -84,8 +83,8 @@ export class DynamoSchemaConverter { /* Converts a shift in our timesheet to our database equivalent from frontend. */ - private static toDBShift(row: TimesheetSchemas.ShiftSchema): DynamoSchemas.DynamoShiftSchema { - return DynamoSchemas.ShiftSchema.parse({ + private static toDBShift(row: ShiftSchema): DynamoSchemas.DynamoShiftSchema { + return DynamoSchemas.DynamoShiftSchema.parse({ Type: this.toDBType(row.Type), EntryID: row.EntryId, Date: row.Date, @@ -97,9 +96,9 @@ export class DynamoSchemaConverter { } // Converts a timesheet entry to our database equivalent from frontend. - private static toDBRowEntry(row: TimesheetSchemas.TimeEntrySchema | undefined): DynamoSchemas.DynamoTimeEntrySchema | undefined{ + private static toDBRowEntry(row: TimeEntrySchema | undefined): DynamoSchemas.DynamoTimeEntrySchema | undefined{ if (row !== undefined) { - return DynamoSchemas.TimeEntrySchema.parse({ + return DynamoSchemas.DynamoTimeEntrySchema.parse({ StartDateTime: row.StartDateTime, EndDateTime: row.EndDateTime, AuthorUUID: row.AuthorID @@ -121,9 +120,9 @@ export class DynamoSchemaConverter { } // Converts a singular weekly comment / note from our frontend to database. - private static toDBNote(comment: TimesheetSchemas.CommentSchema | TimesheetSchemas.ReportSchema | undefined): DynamoSchemas.DynamoNoteSchema | undefined { + private static toDBNote(comment: CommentSchema | ReportSchema | undefined): DynamoSchemas.DynamoNoteSchema | undefined { if (comment !== undefined) { - return DynamoSchemas.NoteSchema.parse({ + return DynamoSchemas.DynamoNoteSchema.parse({ Type: comment.Type, EntryID: "", // TODO: EntryId will need to be updated AuthorUUID: comment.AuthorID, diff --git a/apps/backend/src/db/timesheets/ItemsOperations.ts b/apps/backend/src/db/timesheets/ItemsOperations.ts index 6ce1994..94105b6 100644 --- a/apps/backend/src/db/timesheets/ItemsOperations.ts +++ b/apps/backend/src/db/timesheets/ItemsOperations.ts @@ -1,5 +1,4 @@ -import {OperationRequests, TimesheetSchemas} from '@org/schemas' -import { CommentSchema } from '../../../../../libs/shared/schemas/src/lib/TimesheetRow'; +import {DeleteRequest, InsertRequest, StatusChangeRequest, TimesheetListItems, UpdateRequest, TimeSheetSchema, CommentSchema, ShiftSchema} from '@org/schemas' //Not sure why but only works if imported like this :| const moment = require('moment-timezone'); @@ -8,13 +7,13 @@ const moment = require('moment-timezone'); */ interface ItemsOperations { // Insert into the list of items - Insert(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.InsertRequest): TimesheetSchemas.TimeSheetSchema + Insert(timesheet: TimeSheetSchema, body:InsertRequest): TimeSheetSchema // Delete a specific item from the list of items - Delete(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.DeleteRequest): TimesheetSchemas.TimeSheetSchema + Delete(timesheet: TimeSheetSchema, body:DeleteRequest): TimeSheetSchema // Update a specific item in the list of items - Update(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.UpdateRequest) : TimesheetSchemas.TimeSheetSchema + Update(timesheet: TimeSheetSchema, body:UpdateRequest) : TimeSheetSchema // Update the status of a timesheet - StatusChange(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.StatusChangeRequest): TimesheetSchemas.TimeSheetSchema + StatusChange(timesheet: TimeSheetSchema, body:StatusChangeRequest): TimeSheetSchema } /* @@ -27,11 +26,11 @@ export class ItemsDelegator { notesData = new NotesOperations() - public AttributeToModify(body: OperationRequests.InsertRequest | OperationRequests.DeleteRequest | OperationRequests.UpdateRequest) { + public AttributeToModify(body: InsertRequest | DeleteRequest | UpdateRequest) { switch (body.Type) { - case OperationRequests.TimesheetListItems.TABLEDATA: + case TimesheetListItems.TABLEDATA: return this.tableData; - case OperationRequests.TimesheetListItems.WEEKNOTES: + case TimesheetListItems.WEEKNOTES: return this.notesData; default: throw new Error ("Invalid operation provided"); @@ -46,10 +45,10 @@ export class ItemsDelegator { */ export class HoursDataOperations implements ItemsOperations { - public Insert(timesheet: TimesheetSchemas.TimeSheetSchema, body: OperationRequests.InsertRequest) { + public Insert(timesheet: TimeSheetSchema, body: InsertRequest) { const data = timesheet.TableData; - const item = TimesheetSchemas.ShiftSchema.parse(body.Item); + const item = ShiftSchema.parse(body.Item); // Sorting is currently only day by day based - need some way of minute by minute var idx = 0; for (idx; idx < data.length; idx += 1) { @@ -88,7 +87,7 @@ export class HoursDataOperations implements ItemsOperations { } } } - public Delete(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.DeleteRequest) { + public Delete(timesheet: TimeSheetSchema, body:DeleteRequest) { return { ...timesheet, TableData: timesheet.TableData.filter((row) => row.EntryId !== body.Id) @@ -96,7 +95,7 @@ export class HoursDataOperations implements ItemsOperations { } - public Update(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.UpdateRequest) { + public Update(timesheet: TimeSheetSchema, body:UpdateRequest) { if (timesheet.TableData?.filter((row) => row.EntryId === body.Id).length === 0) { throw new Error("Could not find a row with that ID"); } @@ -115,7 +114,7 @@ export class HoursDataOperations implements ItemsOperations { } } - public StatusChange(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.StatusChangeRequest) { + public StatusChange(timesheet: TimeSheetSchema, body:StatusChangeRequest) { if (timesheet.TimesheetID !== body.TimesheetId) { throw new Error("Requested timesheet does not match timesheet ID of timesheet being updated"); } @@ -124,7 +123,7 @@ export class HoursDataOperations implements ItemsOperations { As an example... original Status : {HoursSubmitted=undefined, HoursReviewed=undefined, Finalized=undefined} - OperationRequests.StatusChangeRequest: {TimesheetId=abc, AssociateId=123456, authorId:123456, dateSubmited=0638457, StatusType='HoursSubmitted'} + StatusChangeRequest: {TimesheetId=abc, AssociateId=123456, authorId:123456, dateSubmited=0638457, StatusType='HoursSubmitted'} new Status: {HoursSubmitted={Date: 0638457, AuthorID: 123456}, HoursReviewed=undefined, Finalized=undefined} */ @@ -146,7 +145,7 @@ export class HoursDataOperations implements ItemsOperations { // Operations on the weekly notes on the timesheet - i.e. comments relating to the entire timesheet / specific day worked. export class NotesOperations implements ItemsOperations { - public Insert(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.InsertRequest) { + public Insert(timesheet: TimeSheetSchema, body:InsertRequest) { return { ...timesheet, WeekNotes: [ @@ -155,14 +154,14 @@ export class NotesOperations implements ItemsOperations { ] }; } - public Delete(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.DeleteRequest) { + public Delete(timesheet: TimeSheetSchema, body:DeleteRequest) { return { ...timesheet, WeekNotes: timesheet.WeekNotes.filter((note) => note.EntryId !== body.Id) } } - public Update(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.UpdateRequest) { + public Update(timesheet: TimeSheetSchema, body:UpdateRequest) { //TODO - Add in functionality to trigger insert instead of update if ID does not yet exist return { @@ -179,7 +178,7 @@ export class NotesOperations implements ItemsOperations { } } - public StatusChange(timesheet: TimesheetSchemas.TimeSheetSchema, body:OperationRequests.StatusChangeRequest) { + public StatusChange(timesheet: TimeSheetSchema, body:StatusChangeRequest) { return undefined; } } diff --git a/apps/backend/src/db/timesheets/OperationRequestHandler.ts b/apps/backend/src/db/timesheets/OperationRequestHandler.ts index 3c963c0..fbe9674 100644 --- a/apps/backend/src/db/timesheets/OperationRequestHandler.ts +++ b/apps/backend/src/db/timesheets/OperationRequestHandler.ts @@ -1,4 +1,4 @@ -import { OperationRequests } from "@org/schemas"; +import { TimesheetOperations, TimesheetUpdateRequest } from "@org/schemas"; import {UserTimesheets} from "src/dynamodb" import { ExceptionsHandler } from "@nestjs/core/exceptions/exceptions-handler"; @@ -14,7 +14,7 @@ export class OperationRequestHandler { private delegator = new ItemsDelegator() - public async updateTimesheet(request: OperationRequests.TimesheetUpdateRequest, userid: string): Promise { + public async updateTimesheet(request: TimesheetUpdateRequest, userid: string): Promise { /* Provided a request to update a timesheet, processes the request and then return a response indicating success or failure. @@ -24,25 +24,25 @@ export class OperationRequestHandler { */ //Retrieve a specified timesheet console.log(request) - const userTimesheets = await UserTimesheets(userid); + const userTimesheets = await UserTimesheets(userid); // TODO: SHould use formatter for this? formatter. const selectedTimesheet = userTimesheets.filter((timesheet) => timesheet.TimesheetID === request.TimesheetID) if (selectedTimesheet.length == 1) { const convertedTimesheet = DynamoSchemaConverter.toFrontendTimesheet(selectedTimesheet[0]); console.log("Timesheet found for Update Timesheet Operation %s", request.Operation.valueOf()) var modifiedTimesheet = undefined; switch (request.Operation) { - case OperationRequests.TimesheetOperations.STATUS_CHANGE: + case TimesheetOperations.STATUS_CHANGE: // This operation should only be supported for Hours Data modifiedTimesheet = this.delegator.tableData.StatusChange(convertedTimesheet, request.Payload); break; - case OperationRequests.TimesheetOperations.DELETE: + case TimesheetOperations.DELETE: modifiedTimesheet = this.delegator.AttributeToModify(request.Payload).Delete(convertedTimesheet, request.Payload); break; - case OperationRequests.TimesheetOperations.INSERT: + case TimesheetOperations.INSERT: //Determine attribute we are modifying and then also convert the field from frontend to backend. modifiedTimesheet = this.delegator.AttributeToModify(request.Payload).Insert(convertedTimesheet, request.Payload); break; - case OperationRequests.TimesheetOperations.UPDATE: + case TimesheetOperations.UPDATE: //Determine attribute we are modifying and then also convert the field from frontend to backend. modifiedTimesheet = this.delegator.AttributeToModify(request.Payload).Update(convertedTimesheet, request.Payload); break; diff --git a/apps/frontend/src/components/Auth/apiClient.tsx b/apps/frontend/src/components/Auth/apiClient.tsx index 83cc88a..39449c9 100644 --- a/apps/frontend/src/components/Auth/apiClient.tsx +++ b/apps/frontend/src/components/Auth/apiClient.tsx @@ -1,8 +1,7 @@ import { Auth } from "aws-amplify"; import axios, { AxiosInstance } from "axios"; -import { TimeSheetSchema } from "../../schemas/TimesheetSchema"; -import { UserSchema } from "../../schemas/UserSchema"; -import { ReportOptions } from "../TimeCardPage/types"; +import { TimeSheetSchema, ReportOptions } from "@org/schemas"; +import { UserSchema } from "@org/schemas"; const defaultBaseUrl = process.env.REACT_APP_API_BASE_URL ?? "http://localhost:3000"; @@ -67,7 +66,7 @@ export class ApiClient { } public async updateTimesheet(req): Promise { - return this.axiosInstance.post('/auth/timesheet', req) + return this.axiosInstance.post("/auth/timesheet", req); } // TODO: setup endpoint for associate/supervisor/admin so it returns a list of timesheets for given uuid @@ -94,7 +93,8 @@ export class ApiClient { FirstName: "john", LastName: "doe", Type: "Admin", - Picture: "https://imgs.search.brave.com/DZmzoTAPlNT9HUb2ISfyTd_sPZab1hG4VcyupoK2gwE/rs:fit:860:0:0/g:ce/aHR0cHM6Ly90My5m/dGNkbi5uZXQvanBn/LzAwLzYxLzU0LzA4/LzM2MF9GXzYxNTQw/ODU1X3lFYmIwTlRr/d3ZJVzdaZG1KeThM/aHU1WHJPMXlweURl/LmpwZw", + Picture: + "https://imgs.search.brave.com/DZmzoTAPlNT9HUb2ISfyTd_sPZab1hG4VcyupoK2gwE/rs:fit:860:0:0/g:ce/aHR0cHM6Ly90My5m/dGNkbi5uZXQvanBn/LzAwLzYxLzU0LzA4/LzM2MF9GXzYxNTQw/ODU1X3lFYmIwTlRr/d3ZJVzdaZG1KeThM/aHU1WHJPMXlweURl/LmpwZw", }; } @@ -112,14 +112,19 @@ export class ApiClient { } //TODO: hook up to backend - public async saveComment(comment: string, timesheetID: number): Promise { + public async saveComment( + comment: string, + timesheetID: number + ): Promise { return true; } //TODO: hook up to backend - public async saveReport(report: ReportOptions, timesheetID: number): Promise { + public async saveReport( + report: ReportOptions, + timesheetID: number + ): Promise { return true; } - } export default new ApiClient(); diff --git a/apps/frontend/src/components/TimeCardPage/AggregationTable.tsx b/apps/frontend/src/components/TimeCardPage/AggregationTable.tsx index 27629a1..2f54aea 100644 --- a/apps/frontend/src/components/TimeCardPage/AggregationTable.tsx +++ b/apps/frontend/src/components/TimeCardPage/AggregationTable.tsx @@ -1,92 +1,80 @@ -import { - Table, - Thead, - Tbody, - Tfoot, - Tr, - Th, - Td -} from '@chakra-ui/react'; -import React from 'react'; -import { v4 as uuidv4 } from 'uuid'; -import moment, { Moment } from 'moment-timezone'; -import { TimeSheetSchema } from '../../schemas/TimesheetSchema' +import { Table, Thead, Tbody, Tfoot, Tr, Th, Td } from "@chakra-ui/react"; +import React from "react"; +import { v4 as uuidv4 } from "uuid"; +import moment, { Moment } from "moment-timezone"; +import { TimeSheetSchema } from "@org/schemas"; interface AggregationProps { - Date: Moment, - timesheets: TimeSheetSchema[] + Date: Moment; + timesheets: TimeSheetSchema[]; } - function AggregationTable(props: AggregationProps) { - //NOTE: Aggregation is only applying to associate entries currently - TODO is to develop logic for all user types + //NOTE: Aggregation is only applying to associate entries currently - TODO is to develop logic for all user types - const totalHoursForEachDay = {}; + const totalHoursForEachDay = {}; - // add the days in that stretch to dictionary - // set all to 0 - // iterate through each sheet and increment accordingly + // add the days in that stretch to dictionary + // set all to 0 + // iterate through each sheet and increment accordingly - const finalDate = moment(props.Date).add(7, 'days'); - const currentDate = moment(props.Date); - while (currentDate.isBefore(finalDate, 'days')) { - totalHoursForEachDay[currentDate.format("MM/DD/YY")] = 0; - currentDate.add(1, 'day'); - //console.log("Date: ", currentDate.format("MM/DD/YY")); - } - props.timesheets.forEach(sheet => { - if (sheet.TableData !== undefined) { - sheet.TableData.forEach(entry => { - if (entry.Associate !== undefined && entry.Associate.Start !== undefined && entry.Associate.End !== undefined) { - totalHoursForEachDay[moment.unix(entry.Date).format("MM/DD/YY")] += Number(entry.Associate.End - entry.Associate.Start); - } - totalHoursForEachDay[moment.unix(entry.Date).format("MM/DD/YY")] += 0; - }); - } - }); + const finalDate = moment(props.Date).add(7, "days"); + const currentDate = moment(props.Date); + while (currentDate.isBefore(finalDate, "days")) { + totalHoursForEachDay[currentDate.format("MM/DD/YY")] = 0; + currentDate.add(1, "day"); + //console.log("Date: ", currentDate.format("MM/DD/YY")); + } + props.timesheets.forEach((sheet) => { + if (sheet.TableData !== undefined) { + sheet.TableData.forEach((entry) => { + if ( + entry.AssociateTimeEntry !== undefined && + entry.AssociateTimeEntry.StartDateTime !== undefined && + entry.AssociateTimeEntry.EndDateTime !== undefined + ) { + totalHoursForEachDay[moment.unix(entry.Date).format("MM/DD/YY")] += + Number( + entry.AssociateTimeEntry.EndDateTime - + entry.AssociateTimeEntry.StartDateTime + ); + } + totalHoursForEachDay[moment.unix(entry.Date).format("MM/DD/YY")] += 0; + }); + } + }); - const aggregatedRows = Object.entries(totalHoursForEachDay).map(entry => - ({ - "Date": entry[0], - "Duration": Number(entry[1]) - })); + const aggregatedRows = Object.entries(totalHoursForEachDay).map((entry) => ({ + Date: entry[0], + Duration: Number(entry[1]), + })); - const totalHours = aggregatedRows.reduce((acc, row) => acc + row.Duration, 0); + const totalHours = aggregatedRows.reduce((acc, row) => acc + row.Duration, 0); - return ( - - - - - - - - - {aggregatedRows.map( - (totalRow) => { - return ( - - - - - ) - } - )} - - - - - -
DateHours
- {totalRow.Date} - - {(totalRow.Duration / 60).toFixed(2)} -
- Total Hours - - {(totalHours / 60).toFixed(2)} -
- ); + return ( + + + + + + + + + {aggregatedRows.map((totalRow) => { + return ( + + + + + ); + })} + + + + + +
DateHours
{totalRow.Date}{(totalRow.Duration / 60).toFixed(2)}
Total Hours{(totalHours / 60).toFixed(2)}
+ ); } export default AggregationTable; diff --git a/apps/frontend/src/components/TimeCardPage/CellTypes/CellType.tsx b/apps/frontend/src/components/TimeCardPage/CellTypes/CellType.tsx index 104c8db..19ca0eb 100644 --- a/apps/frontend/src/components/TimeCardPage/CellTypes/CellType.tsx +++ b/apps/frontend/src/components/TimeCardPage/CellTypes/CellType.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react"; -import { CellType } from "../types"; +import { CellType } from "@org/schemas"; import { Select } from "@chakra-ui/react"; interface TypeProps { diff --git a/apps/frontend/src/components/TimeCardPage/CellTypes/CommentCell.tsx b/apps/frontend/src/components/TimeCardPage/CellTypes/CommentCell.tsx index 59eb993..262ef5c 100644 --- a/apps/frontend/src/components/TimeCardPage/CellTypes/CommentCell.tsx +++ b/apps/frontend/src/components/TimeCardPage/CellTypes/CommentCell.tsx @@ -2,8 +2,7 @@ import React, { useState, useEffect, useContext } from "react"; import { Stack } from "@chakra-ui/react"; import { UserContext } from "../UserContext"; -import { CommentSchema, ReportSchema } from "../../../schemas/RowSchema"; -import { CommentType } from "../types"; +import { CommentType, CommentSchema, ReportSchema } from "@org/schemas"; import { getAllActiveCommentsOfType } from "../utils"; import ShowCommentModal from "./CommentModals/ShowCommentModal"; @@ -15,11 +14,7 @@ interface CommentProps { timesheetID: number; } -export function CommentCell({ - comments, - date, - timesheetID -}: CommentProps) { +export function CommentCell({ comments, date, timesheetID }: CommentProps) { const [currentComments, setCurrentComments] = useState( getAllActiveCommentsOfType(CommentType.Comment, comments) ); @@ -37,7 +32,7 @@ export function CommentCell({ }, [user?.Type]); return ( - + { + setReports: Function, + comments: ReportSchema[], + prevComment: ReportSchema, + newComment: ReportSchema +) => { // previous comment edited over so set it to deleted - prevComment.State = CellStatus.Deleted - setReports(getAllActiveCommentsOfType(CommentType.Report, [...comments, newComment]) as ReportSchema[]); + prevComment.State = CellStatus.Deleted; + setReports( + getAllActiveCommentsOfType(CommentType.Report, [ + ...comments, + newComment, + ]) as ReportSchema[] + ); // TODO: save to DB }; const deleteComment = ( - onCloseDisplay: Function, - setComments: Function, - comments: CommentSchema[], - typeOfComment: CommentType, - comment: CommentSchema) => { + onCloseDisplay: Function, + setComments: Function, + comments: CommentSchema[], + typeOfComment: CommentType, + comment: CommentSchema +) => { // TODO: add confirmation popup - comment.State = CellStatus.Deleted + comment.State = CellStatus.Deleted; setComments(getAllActiveCommentsOfType(typeOfComment, comments)); if (comments.length === 1) { - onCloseDisplay() + onCloseDisplay(); } // TODO: save to DB -} +}; interface ShowReportModalProps { date: number; @@ -82,159 +87,215 @@ export default function ShowReportModal({ reports, setReports, isEditable, - timesheetID + timesheetID, }: ShowReportModalProps) { - const { isOpen: isOpenDisplay, onOpen: onOpenDisplay, onClose: onCloseDisplay } = useDisclosure(); - const { isOpen: isOpenAdd, onOpen: onOpenAdd, onClose: onCloseAdd } = useDisclosure(); + const { + isOpen: isOpenDisplay, + onOpen: onOpenDisplay, + onClose: onCloseDisplay, + } = useDisclosure(); + const { + isOpen: isOpenAdd, + onOpen: onOpenAdd, + onClose: onCloseAdd, + } = useDisclosure(); const user = useContext(UserContext); - let color = Color.Red + let color = Color.Red; - const doReportsExist = reports.length > 0 + const doReportsExist = reports.length > 0; // no reports so gray it out if (doReportsExist === false) { - color = Color.Gray + color = Color.Gray; } const DisplayReportsModal = () => { return ( - + View {CommentType.Report} - + - {reports.map( - (report) => ( - - {/* TODO: add UserDisplay card once pr merged in*/} - + {reports.map((report) => ( + + {/* TODO: add UserDisplay card once pr merged in*/} + {/* {TODO: show time} */} - - Reason for report: - - - saveEditedReport(setReports, reports, report, - createNewReport(user, value as ReportOptions, report.Notified, report.Explanation))} - > - - - - - - Supervisor notified reasonably in advance: - - - saveEditedReport(setReports, reports, report, - createNewReport(user, report.Content, value, report.Explanation))} - > - - {isEditable && ( - <> - - - )} - - - - - - Explanation: - - Reason for report: + - saveEditedReport(setReports, reports, report, - createNewReport(user, report.Content, report.Notified, value))} - > - - {isEditable && ( - <> - - - )} + defaultValue={report.Content} + onSubmit={(value) => + saveEditedReport( + setReports, + reports, + report, + createNewReport( + user, + value as ReportOptions, + report.Notified, + report.Explanation + ) + ) + } + > + + + + + + Supervisor notified reasonably in advance: + + + saveEditedReport( + setReports, + reports, + report, + createNewReport( + user, + report.Content, + value, + report.Explanation + ) + ) + } + > + + {isEditable && ( + <> + + + )} + + + + + Explanation: + + saveEditedReport( + setReports, + reports, + report, + createNewReport( + user, + report.Content, + report.Notified, + value + ) + ) + } + > + + {isEditable && ( + <> + + + )} - {/* TODO: add editable controls specifically with only enum options*/} - } onClick={() => deleteComment(onCloseDisplay, setReports, reports, CommentType.Report, report)} /> - - - - ))} + {/* TODO: add editable controls specifically with only enum options*/} + } + onClick={() => + deleteComment( + onCloseDisplay, + setReports, + reports, + CommentType.Report, + report + ) + } + /> + + + + ))} - - + - ) - } + ); + }; const AddReportModal = () => { - const [submitDisabled, setSubmitDisabled] = useState(false); + const [submitDisabled, setSubmitDisabled] = useState(false); const [reason, setReason] = useState(ReportOptions.Late); - const [notify, setNotify] = useState('Yes'); - const [explanation, setExplanation] = useState(''); + const [notify, setNotify] = useState("Yes"); + const [explanation, setExplanation] = useState(""); const user = useContext(UserContext); const toast = useToast(); const handleReasonChange = (option) => { setReason(option as ReportOptions); - } + }; const handleSubmit = (e) => { e.preventDefault(); - if (reports.filter(report => report.Content === reason).length === 0) { - setReports([...reports, createNewReport(user, reason, notify, explanation)]); + if (reports.filter((report) => report.Content === reason).length === 0) { + setReports([ + ...reports, + createNewReport(user, reason, notify, explanation), + ]); toast({ - title: 'Report submitted.', + title: "Report submitted.", description: "We've received your report.", - status: 'success', + status: "success", duration: 9000, isClosable: true, }); - } else { + } else { toast({ - title: 'Report submission failed.', + title: "Report submission failed.", description: "There was a problem with your report. Please try again", - status: 'error', + status: "error", duration: 9000, isClosable: true, }); } - onCloseAdd() + onCloseAdd(); }; return ( - + - - {CommentType.Report} - + + + {CommentType.Report} + + - +
- - Select reason for report: + + Select reason for report: - + Tardy Absent Left Early @@ -243,39 +304,48 @@ export default function ShowReportModal({ - Did the associate notify the supervisor reasonably in advance? - - - Yes - No - - + + Did the associate notify the supervisor reasonably in + advance? + + + + Yes + No + + - Why did the associate arrive late/no show/leave early? - - setExplanation(e.target.value)} - /> - } - /> - + + Why did the associate arrive late/no show/leave early? + + + setExplanation(e.target.value)} + /> + } /> + -
- - + @@ -283,39 +353,45 @@ export default function ShowReportModal({
- ) - } + ); + }; return ( <> - {doReportsExist ? + {doReportsExist ? ( <> - {isEditable && + {isEditable && ( } + {isEditable && ( + + )} - } + )} diff --git a/apps/frontend/src/components/TimeCardPage/CellTypes/HoursCell.tsx b/apps/frontend/src/components/TimeCardPage/CellTypes/HoursCell.tsx index 9de3e90..357db7a 100644 --- a/apps/frontend/src/components/TimeCardPage/CellTypes/HoursCell.tsx +++ b/apps/frontend/src/components/TimeCardPage/CellTypes/HoursCell.tsx @@ -1,10 +1,9 @@ -import React, { useEffect, useState } from 'react'; -import { RowSchema } from '../../../schemas/RowSchema'; -import { Box } from '@chakra-ui/react'; - +import React, { useEffect, useState } from "react"; +import { ShiftSchema } from "@org/schemas"; +import { Box } from "@chakra-ui/react"; interface DurationProps { - row: RowSchema; + row: ShiftSchema; } export function Duration(props: DurationProps) { @@ -12,9 +11,24 @@ export function Duration(props: DurationProps) { const [duration, setDuration] = useState(""); useEffect(() => { - if (row.Associate !== undefined && row.Associate.Start !== undefined && row.Associate.End !== undefined) { - setDuration(String(((row.Associate.End - row.Associate.Start) / 60).toFixed(2))); + if ( + row.AssociateTimeEntry !== undefined && + row.AssociateTimeEntry.StartDateTime !== undefined && + row.AssociateTimeEntry.EndDateTime !== undefined + ) { + setDuration( + String( + ( + (row.AssociateTimeEntry.EndDateTime - + row.AssociateTimeEntry.StartDateTime) / + 60 + ).toFixed(2) + ) + ); } - }, [row.Associate?.Start, row.Associate?.End]) - return {duration} + }, [ + row.AssociateTimeEntry?.StartDateTime, + row.AssociateTimeEntry?.EndDateTime, + ]); + return {duration}; } diff --git a/apps/frontend/src/components/TimeCardPage/CellTypes/TimeEntry.tsx b/apps/frontend/src/components/TimeCardPage/CellTypes/TimeEntry.tsx index 04579af..1450193 100644 --- a/apps/frontend/src/components/TimeCardPage/CellTypes/TimeEntry.tsx +++ b/apps/frontend/src/components/TimeCardPage/CellTypes/TimeEntry.tsx @@ -1,11 +1,11 @@ import React, { useEffect, useState } from "react"; -import { RowSchema } from "../../../schemas/RowSchema"; +import { ShiftSchema } from "@org/schemas"; import { Input } from '@chakra-ui/react'; import moment from 'moment'; interface TimeEntryProps { field: string; - row: RowSchema; + row: ShiftSchema; updateFields: Function; } @@ -25,10 +25,10 @@ export function TimeEntry(props: TimeEntryProps) { setMinutes(calculatedTime); //Triggering parent class to update its references here as well - var rowToMutate = props.row.Associate; + var rowToMutate = props.row.AssociateTimeEntry; if (rowToMutate === undefined) { rowToMutate = { - Start:undefined, End:undefined, AuthorID:"" + StartDateTime:undefined, EndDateTime:undefined, AuthorID:"" } } @@ -62,8 +62,8 @@ export function TimeEntry(props: TimeEntryProps) { } useEffect(() => { - if (props.row.Associate !== undefined) { - setMinutes(props.row.Associate[props.field]); + if (props.row.AssociateTimeEntry !== undefined) { + setMinutes(props.row.AssociateTimeEntry[props.field]); } }, []); diff --git a/apps/frontend/src/components/TimeCardPage/CommentModal.tsx b/apps/frontend/src/components/TimeCardPage/CommentModal.tsx index 72ec1df..43dfeee 100644 --- a/apps/frontend/src/components/TimeCardPage/CommentModal.tsx +++ b/apps/frontend/src/components/TimeCardPage/CommentModal.tsx @@ -13,8 +13,7 @@ import { Select } from "@chakra-ui/react"; import React, { useState, useContext } from "react"; -import { CommentType } from "./types"; -import { CommentSchema } from "src/schemas/RowSchema"; +import { CommentType, CommentSchema } from "@org/schemas"; import { createNewComment } from "./utils"; import { UserContext } from "./UserContext"; diff --git a/apps/frontend/src/components/TimeCardPage/SubmitCard.tsx b/apps/frontend/src/components/TimeCardPage/SubmitCard.tsx index 8d44146..2db48b7 100644 --- a/apps/frontend/src/components/TimeCardPage/SubmitCard.tsx +++ b/apps/frontend/src/components/TimeCardPage/SubmitCard.tsx @@ -1,31 +1,36 @@ -import React, { useState, useEffect } from 'react' -import { WeeklyCommentModal } from './CommentModal'; -import { Box, Card, CardHeader, CardBody, CardFooter, Button } from '@chakra-ui/react'; -import { CardState } from './types' -import { CommentSchema } from 'src/schemas/RowSchema'; +import React, { useState, useEffect } from "react"; +import { WeeklyCommentModal } from "./CommentModal"; +import { + Box, + Card, + CardBody, + CardFooter, + Button, +} from "@chakra-ui/react"; +import { CardState } from "./types"; +import { CommentSchema } from "@org/schemas"; interface SubmitCardProps { - setWeeklyComments: Function; - setWeeklyReports: Function; - weeklyComments: CommentSchema[]; - weeklyReports: CommentSchema[]; + setWeeklyComments: Function; + setWeeklyReports: Function; + weeklyComments: CommentSchema[]; + weeklyReports: CommentSchema[]; } export default function SubmitCard({ - setWeeklyComments, - setWeeklyReports, - weeklyComments, - weeklyReports + setWeeklyComments, + setWeeklyReports, + weeklyComments, + weeklyReports, }: SubmitCardProps) { - const [submitted, setSubmitted] = useState(false); const [submitDate, setSubmitDate] = useState(null); const [state, setState] = useState(CardState.Unsubmitted); useEffect(() => { //TODO - API Call to determine if the table has been submitted or not. - //Will set submitted? here and also submitDate if it was submitted to grab the date - }, []) + //Will set submitted? here and also submitDate if it was submitted to grab the date + }, []); const submitAction = () => { setSubmitted(!submitted); @@ -33,29 +38,47 @@ export default function SubmitCard({ setSubmitDate(currentTime.toString()); if (state === CardState.Unsubmitted) { setState(CardState.InReviewEmployer); - } - else { + } else { setState(CardState.Unsubmitted); } - } + }; return ( - + + className="mb-2 text-center" + > - + - {submitted && - {submitDate} - {state} - - } + {submitted && ( + + {submitDate} + {state} + + + )} - + ); - -} \ No newline at end of file +} diff --git a/apps/frontend/src/components/TimeCardPage/TimeSheet.tsx b/apps/frontend/src/components/TimeCardPage/TimeSheet.tsx index fb0edec..33446c0 100644 --- a/apps/frontend/src/components/TimeCardPage/TimeSheet.tsx +++ b/apps/frontend/src/components/TimeCardPage/TimeSheet.tsx @@ -1,341 +1,376 @@ -import React, {useState, useMemo} from 'react'; -import TimeTable from './TimeTable' -import {useEffect} from 'react'; -import SubmitCard from './SubmitCard'; -import DateSelectorCard from './SelectWeekCard'; -import {UserContext} from './UserContext'; +import React, { useState, useMemo } from "react"; +import TimeTable from "./TimeTable"; +import { useEffect } from "react"; +import DateSelectorCard from "./SelectWeekCard"; +import { UserContext } from "./UserContext"; import { - Alert, - AlertIcon, - AlertTitle, - AlertDescription, - Box, - IconButton, - Card, - CardBody, - Avatar, - Flex, - Text, - Tabs, - TabList, - Tab, - Spacer, - HStack, - VStack, - ButtonGroup -} from '@chakra-ui/react' - - -import {TIMESHEET_DURATION, TIMEZONE} from 'src/constants'; - -import {Review_Stages, TABLE_COLUMNS, CommentType} from './types'; -import moment, {Moment} from 'moment-timezone'; - -import apiClient from '../Auth/apiClient'; -import AggregationTable from './AggregationTable'; -import {v4 as uuidv4} from 'uuid'; -import {UserSchema} from '../../schemas/UserSchema' - -import { SearchIcon, WarningIcon, DownloadIcon } from '@chakra-ui/icons'; -import { Select, components } from 'chakra-react-select' -import { TimeSheetSchema } from 'src/schemas/TimesheetSchema'; -import { CommentSchema, RowSchema } from 'src/schemas/RowSchema'; -import { getAllActiveCommentsOfType } from './utils'; -import { Stack } from 'react-bootstrap'; -import { Divider } from '@aws-amplify/ui-react'; - - + Alert, + AlertIcon, + AlertTitle, + AlertDescription, + IconButton, + Card, + CardBody, + Avatar, + Text, + Tabs, + TabList, + Tab, + HStack, +} from "@chakra-ui/react"; + +import { TIMESHEET_DURATION, TIMEZONE } from "src/constants"; + +import moment, { Moment } from "moment-timezone"; + +import apiClient from "../Auth/apiClient"; +import AggregationTable from "./AggregationTable"; +import { SearchIcon, WarningIcon, DownloadIcon } from "@chakra-ui/icons"; +import { Select, components } from "chakra-react-select"; +import { + UserSchema, + TABLE_COLUMNS, + CommentType, + CommentSchema, +} from "@org/schemas"; +import { getAllActiveCommentsOfType } from "./utils"; +import { Stack } from "react-bootstrap"; +import { Divider } from "@aws-amplify/ui-react"; // Always adjust local timezone to Breaktime's timezone moment.tz.setDefault(TIMEZONE); const testingEmployees = [ - { - UserID: "abc", - FirstName: "joe", - LastName: "jane", - Type: "Employee", - Picture: "https://upload.wikimedia.org/wikipedia/commons/4/49/Koala_climbing_tree.jpg" - }, - { - UserID: "bcd", - FirstName: "david", - LastName: "lev", - Type: "Employee", - Picture: "https://upload.wikimedia.org/wikipedia/commons/thumb/0/0f/Grosser_Panda.JPG/1200px-Grosser_Panda.JPG" - }, - { - UserID: "cde", - FirstName: "crys", - LastName: "tal", - Type: "Employee", - Picture: "https://www.google.com/capybara.png" - }, - {UserID: "def", FirstName: "ken", LastName: "ney", Type: "Employee", Picture: "https://www.google.com/koala.png"}, -] - -function ProfileCard({employee}) { - - return ( - - - - {employee?.FirstName + " " + employee?.LastName} - - - ) + { + UserID: "abc", + FirstName: "joe", + LastName: "jane", + Type: "Employee", + Picture: + "https://upload.wikimedia.org/wikipedia/commons/4/49/Koala_climbing_tree.jpg", + }, + { + UserID: "bcd", + FirstName: "david", + LastName: "lev", + Type: "Employee", + Picture: + "https://upload.wikimedia.org/wikipedia/commons/thumb/0/0f/Grosser_Panda.JPG/1200px-Grosser_Panda.JPG", + }, + { + UserID: "cde", + FirstName: "crys", + LastName: "tal", + Type: "Employee", + Picture: "https://www.google.com/capybara.png", + }, + { + UserID: "def", + FirstName: "ken", + LastName: "ney", + Type: "Employee", + Picture: "https://www.google.com/koala.png", + }, +]; + +function ProfileCard({ employee }) { + return ( + + + + {employee?.FirstName + " " + employee?.LastName} + + + ); } -function SearchEmployeeTimesheet({employees, setSelected}) { +function SearchEmployeeTimesheet({ employees, setSelected }) { + const handleChange = (selectedOption) => { + setSelected(selectedOption); + }; - const handleChange = (selectedOption) => { - setSelected(selectedOption); - } + const customStyles = { + control: (base) => ({ + ...base, + flexDirection: "row-reverse", + }), + }; - const customStyles = { - control: (base) => ({ - ...base, - flexDirection: 'row-reverse', - }), - } - - const DropdownIndicator = (props) => { - return ( - - - - ); - }; - - // TODO: fix styling - // at the moment defaultValue is the first user in the employees array - // which is currently an invariant that matches the useState in Page + const DropdownIndicator = (props) => { return ( -
- + `${option.FirstName + " " + option.LastName}` + } + getOptionValue={(option) => + `${option.FirstName + " " + option.LastName}` + } + /> +
+ ); } interface WeeklyCommentSectionProps { - weeklyComments: CommentSchema[]; - weeklyReports: CommentSchema[]; + weeklyComments: CommentSchema[]; + weeklyReports: CommentSchema[]; } // TODO: idk if we're keeping up just gonna remove bc doesnt look great atm function WeeklyCommentSection({ - weeklyComments, - weeklyReports - }: WeeklyCommentSectionProps) { - // row of Comments - // row of Reports - - // repetitive but readable code and should be more extensible - return ( + weeklyComments, + weeklyReports, +}: WeeklyCommentSectionProps) { + // row of Comments + // row of Reports + + // repetitive but readable code and should be more extensible + return ( + + Weekly Feedback + + + + + {weeklyComments.map((comment) => ( + + {/* TODO: later replace w api call to get user from userID*/} + {/* also use display card once it gets merged in*/} + + {comment.Content} + + ))} + + + - Weekly Feedback - - - - - {weeklyComments.map( - (comment) => ( - - {/* TODO: later replace w api call to get user from userID*/} - {/* also use display card once it gets merged in*/} - - {comment.Content} - - ))} - - - - - - {weeklyReports.map( - (report) => ( - - {/* TODO: later replace w api call to get user from userID*/} - - {report.Content} - - ))} - - - + + {weeklyReports.map((report) => ( + + {/* TODO: later replace w api call to get user from userID*/} + + {report.Content} + + ))} + - ) + + + ); } export default function Page() { - //const today = moment(); - const [selectedDate, setSelectedDate] = useState(moment().startOf('week').day(0)); - - // fetch the information of the user whos timesheet is being displayed - // if user is an employee selected and user would be the same - // if user is a supervisor/admin then selected would contain the information of the user - // whos timesheet is being looked at and user would contain the supervisor/admins information - // by default the first user is selected - const [selectedUser, setSelectedUser] = useState(); - const [user, setUser] = useState(); - - // associates is only used by supervisor/admin for the list of all associates they have access to - const [associates, setAssociates] = useState([]); - - // A list of the timesheet objects - // TODO: add types - const [userTimesheets, setUserTimesheets] = useState([]); - const [currentTimesheets, setCurrentTimesheets] = useState([]); - const [selectedTimesheet, setTimesheet] = useState(undefined); - - const [weeklyComments, setWeeklyComments] = useState([]); - const [weeklyReports, setWeeklyReports] = useState([]); - - // this hook should always run first - useEffect(() => { - apiClient.getUser().then(userInfo => { - setUser(userInfo); - if (userInfo.Type === "Supervisor" || userInfo.Type === "Admin") { - apiClient.getAllUsers().then(users => { - setAssociates(users); - setSelectedUser(users[0]); - }) - } - setSelectedUser(userInfo) - }) - // if employee setSelectedUSer to be userinfo - // if supervisor/admin get all users - // set selected user - }, []) - - // Pulls user timesheets, marking first returned as the active one - useEffect(() => { - apiClient.getUserTimesheets(selectedUser?.UserID).then(timesheets => { - setUserTimesheets(timesheets); - //By Default just render / select the first timesheet for now - setCurrentTimesheetsToDisplay(timesheets, selectedDate); - }); - }, [selectedUser]) - - const processTimesheetChange = (updated_sheet) => { - // Updating the rows of the selected timesheets from our list of timesheets - const modifiedTimesheets = userTimesheets.map((entry) => { - if (entry.TimesheetID === selectedTimesheet.TimesheetID) { - return { - ...entry, - TableData: updated_sheet.TableData - } - } - return entry + //const today = moment(); + const [selectedDate, setSelectedDate] = useState( + moment().startOf("week").day(0) + ); + + // fetch the information of the user whos timesheet is being displayed + // if user is an employee selected and user would be the same + // if user is a supervisor/admin then selected would contain the information of the user + // whos timesheet is being looked at and user would contain the supervisor/admins information + // by default the first user is selected + const [selectedUser, setSelectedUser] = useState(); + const [user, setUser] = useState(); + + // associates is only used by supervisor/admin for the list of all associates they have access to + const [associates, setAssociates] = useState([]); + + // A list of the timesheet objects + // TODO: add types + const [userTimesheets, setUserTimesheets] = useState([]); + const [currentTimesheets, setCurrentTimesheets] = useState([]); + const [selectedTimesheet, setTimesheet] = useState(undefined); + + const [weeklyComments, setWeeklyComments] = useState([]); + const [weeklyReports, setWeeklyReports] = useState([]); + + // this hook should always run first + useEffect(() => { + apiClient.getUser().then((userInfo) => { + setUser(userInfo); + if (userInfo.Type === "Supervisor" || userInfo.Type === "Admin") { + apiClient.getAllUsers().then((users) => { + setAssociates(users); + setSelectedUser(users[0]); }); - setUserTimesheets(modifiedTimesheets); - - //Also need to update our list of currently selected - TODO come up with a way to not need these duplicated lists - setCurrentTimesheets(currentTimesheets.map( - (entry) => { - if (entry.TimesheetID === selectedTimesheet.TimesheetID) { - return { - ...entry, - TableData: updated_sheet.TableData - } - } - return entry - } - )); - } - - const updateDateRange = (date: Moment) => { - setSelectedDate(date); - //TODO - Refactor this to use the constant in merge with contants branch - setCurrentTimesheetsToDisplay(userTimesheets, date); - } - - const changeTimesheet = (sheet) => { - setTimesheet(sheet) - setWeeklyComments(getAllActiveCommentsOfType(CommentType.Comment, sheet.WeekNotes)) - setWeeklyReports(getAllActiveCommentsOfType(CommentType.Report, sheet.WeekNotes)) - } - - - const setCurrentTimesheetsToDisplay = (timesheets, currentStartDate: Moment) => { - const newCurrentTimesheets = timesheets.filter(sheet => moment.unix(sheet.StartDate).isSame(currentStartDate, 'day')); - - setCurrentTimesheets(newCurrentTimesheets); - if (newCurrentTimesheets.length > 0) { - changeTimesheet(newCurrentTimesheets[0]) + } + setSelectedUser(userInfo); + }); + // if employee setSelectedUSer to be userinfo + // if supervisor/admin get all users + // set selected user + }, []); + + // Pulls user timesheets, marking first returned as the active one + useEffect(() => { + apiClient.getUserTimesheets(selectedUser?.UserID).then((timesheets) => { + setUserTimesheets(timesheets); + //By Default just render / select the first timesheet for now + setCurrentTimesheetsToDisplay(timesheets, selectedDate); + }); + }, [selectedUser]); + + const processTimesheetChange = (updated_sheet) => { + // Updating the rows of the selected timesheets from our list of timesheets + const modifiedTimesheets = userTimesheets.map((entry) => { + if (entry.TimesheetID === selectedTimesheet.TimesheetID) { + return { + ...entry, + TableData: updated_sheet.TableData, + }; + } + return entry; + }); + setUserTimesheets(modifiedTimesheets); + + //Also need to update our list of currently selected - TODO come up with a way to not need these duplicated lists + setCurrentTimesheets( + currentTimesheets.map((entry) => { + if (entry.TimesheetID === selectedTimesheet.TimesheetID) { + return { + ...entry, + TableData: updated_sheet.TableData, + }; } + return entry; + }) + ); + }; + + const updateDateRange = (date: Moment) => { + setSelectedDate(date); + //TODO - Refactor this to use the constant in merge with contants branch + setCurrentTimesheetsToDisplay(userTimesheets, date); + }; + + const changeTimesheet = (sheet) => { + setTimesheet(sheet); + setWeeklyComments( + getAllActiveCommentsOfType(CommentType.Comment, sheet.WeekNotes) + ); + setWeeklyReports( + getAllActiveCommentsOfType(CommentType.Report, sheet.WeekNotes) + ); + }; + + const setCurrentTimesheetsToDisplay = ( + timesheets, + currentStartDate: Moment + ) => { + const newCurrentTimesheets = timesheets.filter((sheet) => + moment.unix(sheet.StartDate).isSame(currentStartDate, "day") + ); + + setCurrentTimesheets(newCurrentTimesheets); + if (newCurrentTimesheets.length > 0) { + changeTimesheet(newCurrentTimesheets[0]); } - - const renderWarning = () => { - const currentDate = moment(); - - const dateToCheck = moment(selectedDate); - dateToCheck.add(TIMESHEET_DURATION, 'days'); - if (currentDate.isAfter(dateToCheck, 'days')) { - return - - Your timesheet is late! - Please submit this as soon as possible - - } else { - const dueDuration = dateToCheck.diff(currentDate, 'days'); - return - - Your timesheet is due in {dueDuration} days! - Remember to press the submit button! - - } + }; + + const renderWarning = () => { + const currentDate = moment(); + + const dateToCheck = moment(selectedDate); + dateToCheck.add(TIMESHEET_DURATION, "days"); + if (currentDate.isAfter(dateToCheck, "days")) { + return ( + + + Your timesheet is late! + + Please submit this as soon as possible + + + ); + } else { + const dueDuration = dateToCheck.diff(currentDate, "days"); + return ( + + + Your timesheet is due in {dueDuration} days! + + Remember to press the submit button! + + + ); } + }; // use this to control whether the timesheet is disabled or not - const disabled = false - - - return ( - <> - - - {(user?.Type === "Supervisor" || user?.Type === "Admin") ? - <> - - }/> - }/> - : <>} - - - - - {useMemo(() => renderWarning(), [selectedDate])} -
- - - {currentTimesheets.map( - (sheet) => ( - changeTimesheet(sheet)}>{sheet.CompanyID} - ) - )} - - -
- {selectedTimesheet?.CompanyID === "Total" ? - () - : ( - - )} -
- + const disabled = false; + + return ( + <> + + + {user?.Type === "Supervisor" || user?.Type === "Admin" ? ( + <> + + } /> + } /> + + ) : ( + <> + )} + + + {useMemo(() => renderWarning(), [selectedDate])} +
+ + + {currentTimesheets.map((sheet) => ( + changeTimesheet(sheet)}> + {sheet.CompanyID} + + ))} + + +
+ {selectedTimesheet?.CompanyID === "Total" ? ( + + ) : ( + + + + )} +
- - ) -} \ No newline at end of file + + ); +} diff --git a/apps/frontend/src/components/TimeCardPage/TimeTable.tsx b/apps/frontend/src/components/TimeCardPage/TimeTable.tsx index fdfc444..9420cb4 100644 --- a/apps/frontend/src/components/TimeCardPage/TimeTable.tsx +++ b/apps/frontend/src/components/TimeCardPage/TimeTable.tsx @@ -7,123 +7,123 @@ import { Td, ButtonGroup, IconButton, -} from '@chakra-ui/react' -import React, { useEffect, useState } from 'react'; -import { v4 as uuidv4 } from 'uuid'; +} from "@chakra-ui/react"; +import React, { useEffect, useState } from "react"; +import { v4 as uuidv4 } from "uuid"; import TimeTableRow from "./TimeTableRow"; -import { TimeSheetSchema } from '../../schemas/TimesheetSchema'; -import { CellType } from './types'; -import { AddIcon, MinusIcon } from '@chakra-ui/icons'; - -import * as rowSchemas from 'src/schemas/RowSchema' -import ApiClient from '../Auth/apiClient'; -import * as updateSchemas from 'src/schemas/backend/UpdateTimesheet' -import { UserSchema } from 'src/schemas/UserSchema'; - +import { + TimeSheetSchema, + CellType, + DeleteRequest, + InsertRequest, + TimesheetListItems, + TimesheetOperations, + TimesheetUpdateRequest, + ShiftSchema, +} from "@org/schemas"; +import { AddIcon, MinusIcon } from "@chakra-ui/icons"; +import ApiClient from "../Auth/apiClient"; -//Can expand upon this further by specifying input types - to allow only dates, numbers, etc for the input https://www.w3schools.com/bootstrap/bootstrap_forms_inputs.asp +//Can expand upon this further by specifying input types - to allow only dates, numbers, etc for the input https://www.w3schools.com/bootstrap/bootstrap_forms_inputs.asp //Can expand upon this further by specifying input types - to allow only dates, numbers, etc for the input https://www.w3schools.com/bootstrap/bootstrap_forms_inputs.asp function uploadNewRow(row, timesheetid: number) { ApiClient.updateTimesheet( - updateSchemas.TimesheetUpdateRequest.parse({ + TimesheetUpdateRequest.parse({ TimesheetID: timesheetid, - Operation: updateSchemas.TimesheetOperations.INSERT, - Payload: updateSchemas.InsertRequest.parse({ - Type: updateSchemas.TimesheetListItems.TABLEDATA, - Item: row - }) + Operation: TimesheetOperations.INSERT, + Payload: InsertRequest.parse({ + Type: TimesheetListItems.TABLEDATA, + Item: row, + }), }) ); } const createEmptyRow = (date) => { - // We assign uuid to provide a unique key identifier to each row for reacts rendering + // We assign uuid to provide a unique key identifier to each row for reacts rendering return { UUID: uuidv4(), - Type: CellType.Regular, + Type: CellType.REGULAR, Date: date, Associate: undefined, Supervisor: undefined, Admin: undefined, - Comment: undefined - } -} + Comment: undefined, + }; +}; interface TableProps { - timesheet: TimeSheetSchema; - columns: String[]; + timesheet: TimeSheetSchema; + columns: String[]; onTimesheetChange: Function; -} +} function TimeTable(props: TableProps) { - //When a row is updated, replace it in our list of rows + //When a row is updated, replace it in our list of rows const onRowChange = (row, rowIndex) => { const updatedRows = [ ...rows.slice(0, rowIndex), row, - ...rows.slice(rowIndex + 1) - ] - setRows( - updatedRows - ); + ...rows.slice(rowIndex + 1), + ]; + setRows(updatedRows); props.onTimesheetChange({ ...props.timesheet, - TableData: updatedRows + TableData: updatedRows, }); - } + }; - //Adds a row to the specified index + //Adds a row to the specified index const addRow = (row, index) => { - const newRow = createEmptyRow(rows[index].Date) + const newRow = createEmptyRow(rows[index].Date); const updatedRows = [ ...rows.slice(0, index + 1), newRow, - ...rows.slice(index + 1) - ] - setRows( - updatedRows - ); + ...rows.slice(index + 1), + ]; + setRows(updatedRows); props.onTimesheetChange({ ...props.timesheet, - TableData: updatedRows + TableData: updatedRows, }); - //Add this row to the DB + //Add this row to the DB uploadNewRow(newRow, props.timesheet.TimesheetID); + }; - } - - const delRow = (row: rowSchemas.RowSchema, index) => { - const updatedRows = rows.filter((_, idx) => { return index !== idx }); + const delRow = (row: ShiftSchema, index) => { + const updatedRows = rows.filter((_, idx) => { + return index !== idx; + }); setRows(updatedRows); props.onTimesheetChange({ ...props.timesheet, - TableData: updatedRows + TableData: updatedRows, }); - //Trigger DB call to remove this from the DB + + //Trigger DB call to remove this from the DB ApiClient.updateTimesheet( - updateSchemas.TimesheetUpdateRequest.parse({ + TimesheetUpdateRequest.parse({ TimesheetID: props.timesheet.TimesheetID, - Operation: updateSchemas.TimesheetOperations.DELETE, - Payload: updateSchemas.DeleteRequest.parse({ - Type: updateSchemas.TimesheetListItems.TABLEDATA, - Id: row.UUID - }) + Operation: TimesheetOperations.DELETE, + Payload: DeleteRequest.parse({ + Type: TimesheetListItems.TABLEDATA, + Id: row.EntryId, + }), }) ); - - } + }; const [rows, setRows] = useState([]); - // Anytime the timesheet object changes this is linked to, re-build rows + // Anytime the timesheet object changes this is linked to, re-build rows useEffect(() => { const timesheet = props.timesheet; if (timesheet !== undefined) { setRows(timesheet.TableData); } - }, [props.timesheet]) + }, [props.timesheet]); var prevDate = undefined; @@ -132,33 +132,47 @@ function TimeTable(props: TableProps) { - {props.columns.map( - (column, idx) => ( - {column} - ) - )} + {props.columns.map((column, idx) => ( + {column} + ))} - {rows.map( - (row, index) => { - // Let the row know the day of the date before it to know if we should display its start date or not - const dateToSend = prevDate; - prevDate = row.StartDate; - return ( - - - - { addRow(row, index) }} icon={} /> - { delRow(row, index) }} icon={} /> - - - { - onRowChange(row, index)} prevDate={dateToSend} TimesheetID={props.timesheet.TimesheetID} /> - } - ); - } - )} + {rows.map((row, index) => { + // Let the row know the day of the date before it to know if we should display its start date or not + const dateToSend = prevDate; + prevDate = row.StartDate; + return ( + + + + { + addRow(row, index); + }} + icon={} + /> + { + delRow(row, index); + }} + icon={} + /> + + + { + onRowChange(row, index)} + prevDate={dateToSend} + TimesheetID={props.timesheet.TimesheetID} + /> + } + + ); + })} ); diff --git a/apps/frontend/src/components/TimeCardPage/TimeTableRow.tsx b/apps/frontend/src/components/TimeCardPage/TimeTableRow.tsx index 670879e..a377ead 100644 --- a/apps/frontend/src/components/TimeCardPage/TimeTableRow.tsx +++ b/apps/frontend/src/components/TimeCardPage/TimeTableRow.tsx @@ -1,84 +1,100 @@ -import React, { useEffect, useState } from 'react'; -import 'react-time-picker/dist/TimePicker.css'; -import 'react-clock/dist/Clock.css'; -import { Fragment } from 'react'; - -import { Td } from '@chakra-ui/react'; - -import { TimeEntry } from './CellTypes/TimeEntry'; -import { Duration } from './CellTypes/HoursCell' -import { DateCell } from './CellTypes/DateCell'; -import { TypeCell } from './CellTypes/CellType'; -import { CommentCell } from './CellTypes/CommentCell'; -import { RowSchema } from '../../schemas/RowSchema'; -import ApiClient from 'src/components/Auth/apiClient' - -import * as updateSchemas from 'src/schemas/backend/UpdateTimesheet' -import apiClient from 'src/components/Auth/apiClient'; -import { UserSchema } from 'src/schemas/UserSchema'; +import React, { useEffect, useState } from "react"; +import "react-time-picker/dist/TimePicker.css"; +import "react-clock/dist/Clock.css"; +import { Fragment } from "react"; + +import { Td } from "@chakra-ui/react"; + +import { TimeEntry } from "./CellTypes/TimeEntry"; +import { Duration } from "./CellTypes/HoursCell"; +import { DateCell } from "./CellTypes/DateCell"; +import { TypeCell } from "./CellTypes/CellType"; +import { CommentCell } from "./CellTypes/CommentCell"; +import { + ShiftSchema, + TimesheetListItems, + TimesheetOperations, + TimesheetUpdateRequest, + UpdateRequest, +} from "@org/schemas"; +import ApiClient from "src/components/Auth/apiClient"; interface RowProps { - row: RowSchema; - prevDate: number; - onRowChange: Function; - TimesheetID: number; + row: ShiftSchema; + prevDate: number; + onRowChange: Function; + TimesheetID: number; } - - - function Row(props: RowProps) { - - const [fields, setFields] = useState(undefined); - - const updateField = (key, value) => { - - const newFields = { - ...fields, - [key]: value - } - - setFields(newFields); - props.onRowChange(newFields); - //Send a request to update the db on this item being changed - ApiClient.updateTimesheet(updateSchemas.TimesheetUpdateRequest.parse({ - TimesheetID: props.TimesheetID, - Operation: updateSchemas.TimesheetOperations.UPDATE, - Payload: updateSchemas.UpdateRequest.parse({ - Type: updateSchemas.TimesheetListItems.TABLEDATA, - Id: props.row.UUID, - Attribute: key, - Data: value - }) - })); - - } - - useEffect(() => { - if (props.row !== undefined) { - setFields(RowSchema.parse(props.row)); - } - }, []) - - if (fields !== undefined) { - const items = { - "Type": , - "Date": , - "Clock-in": , - "Clock-out": , - "Hours": , - "Comment": , - } - const itemOrdering = ["Type", "Date", "Clock-in", "Clock-out", "Hours", "Comment"]; - - return - {itemOrdering.map((entry) => {items[entry]})} - - - } else { - return - - + const [fields, setFields] = useState(undefined); + + const updateField = (key, value) => { + const newFields = { + ...fields, + [key]: value, + }; + + setFields(newFields); + props.onRowChange(newFields); + //Send a request to update the db on this item being changed + ApiClient.updateTimesheet( + TimesheetUpdateRequest.parse({ + TimesheetID: props.TimesheetID, + Operation: TimesheetOperations.UPDATE, + Payload: UpdateRequest.parse({ + Type: TimesheetListItems.TABLEDATA, + Id: props.row.EntryId, + Attribute: key, + Data: value, + }), + }) + ); + }; + + useEffect(() => { + if (props.row !== undefined) { + setFields(ShiftSchema.parse(props.row)); } + }, []); + + if (fields !== undefined) { + const items = { + Type: , + Date: , + "Clock-in": ( + + ), + "Clock-out": ( + + ), + Hours: , + Comment: ( + + ), + }; + const itemOrdering = [ + "Type", + "Date", + "Clock-in", + "Clock-out", + "Hours", + "Comment", + ]; + + return ( + + {itemOrdering.map((entry) => ( + {items[entry]} + ))} + + ); + } else { + return ; + } } export default Row; diff --git a/apps/frontend/src/components/TimeCardPage/UserContext.tsx b/apps/frontend/src/components/TimeCardPage/UserContext.tsx index eac456e..06f4bc4 100644 --- a/apps/frontend/src/components/TimeCardPage/UserContext.tsx +++ b/apps/frontend/src/components/TimeCardPage/UserContext.tsx @@ -1,4 +1,4 @@ -import { createContext } from 'react'; -import { UserSchema } from 'src/schemas/UserSchema'; +import { createContext } from "react"; +import { UserSchema } from "@org/schemas"; -export const UserContext = createContext(undefined); \ No newline at end of file +export const UserContext = createContext(undefined); diff --git a/apps/frontend/src/components/TimeCardPage/types.tsx b/apps/frontend/src/components/TimeCardPage/types.tsx index d48a0f2..be1759b 100644 --- a/apps/frontend/src/components/TimeCardPage/types.tsx +++ b/apps/frontend/src/components/TimeCardPage/types.tsx @@ -5,6 +5,7 @@ export enum Color { Gray = "gray" } +// TODO: Consolidate CardState with ReviewStages export enum CardState { Rejected = "Rejected", InReviewEmployer = "In Review - Employer", diff --git a/apps/frontend/src/components/TimeCardPage/utils.tsx b/apps/frontend/src/components/TimeCardPage/utils.tsx index c68c961..fafc5f8 100644 --- a/apps/frontend/src/components/TimeCardPage/utils.tsx +++ b/apps/frontend/src/components/TimeCardPage/utils.tsx @@ -1,17 +1,25 @@ -import { CellStatus, CommentType } from "./types"; -import { CommentSchema } from "src/schemas/RowSchema"; -import { UserSchema } from "src/schemas/UserSchema"; -import { ReportOptions } from "./types"; +import { + CellStatus, + CommentType, + CommentSchema, + UserSchema, + ReportOptions, +} from "@org/schemas"; import moment from "moment"; -import { UseToastOptions, createStandaloneToast } from "@chakra-ui/react"; +import { UseToastOptions } from "@chakra-ui/react"; -export const getAllActiveCommentsOfType = (type: CommentType, commentArray: CommentSchema[]) => { - if (commentArray === undefined) { - return []; - } else { - return commentArray.filter((comment) => comment.Type === type && comment.State === CellStatus.Active); - } - }; +export const getAllActiveCommentsOfType = ( + type: CommentType, + commentArray: CommentSchema[] +) => { + if (commentArray === undefined) { + return []; + } else { + return commentArray.filter( + (comment) => comment.Type === type && comment.State === CellStatus.Active + ); + } +}; export const createToast = (props: UseToastOptions) => { return { @@ -22,29 +30,28 @@ export const createToast = (props: UseToastOptions) => { duration: 9000, isClosable: true, }; -} +}; export const createNewComment = ( - user: UserSchema, - type: CommentType, - content: string - ) => { - return { - AuthorID: user?.UserID, // need to add loading logic so user is defined before anything occurs - Type: type, - Timestamp: moment().unix(), // TODO: possibly change it to be more specific formatting - Content: content, - State: CellStatus.Active, - }; + user: UserSchema, + type: CommentType, + content: string +) => { + return { + AuthorID: user?.UserID, // need to add loading logic so user is defined before anything occurs + Type: type, + Timestamp: moment().unix(), // TODO: possibly change it to be more specific formatting + Content: content, + State: CellStatus.Active, }; - +}; // TODO: fix types and add a new type for report but this will do for demo export const createNewReport = ( user: UserSchema, content: ReportOptions, notified: string, - explanation: string, + explanation: string ) => { return { AuthorID: user?.UserID, // TODO: need to add loading logic so user is defined before anything occurs @@ -55,4 +62,4 @@ export const createNewReport = ( State: CellStatus.Active, time: moment().unix(), }; -}; \ No newline at end of file +}; diff --git a/apps/frontend/src/schemas/RowSchema.tsx b/apps/frontend/src/schemas/RowSchema.tsx deleted file mode 100644 index 1e98d4f..0000000 --- a/apps/frontend/src/schemas/RowSchema.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import { z } from "zod"; -import {CellType, CommentType, Review_Stages, CellStatus, ReportOptions} from '../components/TimeCardPage/types'; - -const optionalNumber = z.union([z.undefined(), z.number()]); -const optionalString = z.union([z.undefined(), z.string()]); - - - -export const TimeRowEntry = z.union([z.undefined(), z.object({ - Start: optionalNumber, End: optionalNumber, AuthorID: optionalString -})]); -export type TimeRowEntry = z.infer - -export const CommentSchema = z.object({ - UUID: z.string(), - AuthorID:z.string(), - Type: z.nativeEnum(CommentType), // remove this - Timestamp: z.number(), - Content: z.string(), - State: z.nativeEnum(CellStatus), -}); - -export type CommentSchema = z.infer - -export const ReportSchema = z.object({ - AuthorID:z.string(), - Timestamp: z.number(), - Type: z.nativeEnum(CommentType), - CorrectTime: z.number(), - Content: z.nativeEnum(ReportOptions), - Notified: z.string(), - Explanation: z.string(), - State: z.nativeEnum(CellStatus), -}); - -export type ReportSchema = z.infer - -export const RowSchema = z.object({ - Type: z.nativeEnum(CellType), - UUID: z.string(), - Date: z.number(), - Associate: TimeRowEntry, - Supervisor: TimeRowEntry, - Admin: TimeRowEntry, - Comment: z.union([z.undefined(), z.array(CommentSchema || ReportSchema)]) -}); -export type RowSchema = z.infer - -export const ScheduledRowSchema = z.object({ - UUID: z.string(), - Date: z.number(), - Entry: TimeRowEntry -}); - -export type ScheduledRowSchema = z.infer diff --git a/apps/frontend/src/schemas/TimesheetSchema.tsx b/apps/frontend/src/schemas/TimesheetSchema.tsx deleted file mode 100644 index bbd835e..0000000 --- a/apps/frontend/src/schemas/TimesheetSchema.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { z } from "zod"; -import { RowSchema, ScheduledRowSchema, CommentSchema } from './RowSchema'; - -// The status is either undefined, for not being at that stage yet, or -// contains the date and author of approving this submission -export const StatusEntryType = z.union( - [z.object({ - Date: z.number(), - AuthorID: z.string() - }), - z.undefined()]); - -// Status type contains the four stages of the pipeline we have defined -export const StatusType = z.object({ - HoursSubmitted: StatusEntryType, - HoursReviewed: StatusEntryType, - ScheduleSubmitted: StatusEntryType, - Finalized: StatusEntryType -}); - -export const TimeSheetSchema = z.object({ - TimesheetID: z.number(), - UserID: z.string(), - StartDate: z.number(), - Status: StatusType, - CompanyID: z.string(), - TableData: z.array(RowSchema), - ScheduleTableData: z.union([z.undefined(), z.array(ScheduledRowSchema)]), - WeekNotes: z.union([z.undefined(), z.array(CommentSchema)]), -}); - -export type TimeSheetSchema = z.infer; diff --git a/apps/frontend/src/schemas/UserSchema.tsx b/apps/frontend/src/schemas/UserSchema.tsx deleted file mode 100644 index a51af17..0000000 --- a/apps/frontend/src/schemas/UserSchema.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { z } from "zod"; - -export const UserSchema = z.object({ - UserID: z.string(), - FirstName: z.string(), - LastName: z.string(), - Type: z.enum(["Associate", "Supervisor", "Admin"]), - Picture: z.string().optional(), -}); - -export type UserSchema = z.infer; diff --git a/apps/frontend/tsconfig.json b/apps/frontend/tsconfig.json index 866836b..9794df7 100644 --- a/apps/frontend/tsconfig.json +++ b/apps/frontend/tsconfig.json @@ -17,6 +17,9 @@ "noImplicitAny": false, "strictBindCallApply": false, "forceConsistentCasingInFileNames": false, - "noFallthroughCasesInSwitch": false + "noFallthroughCasesInSwitch": false, + "paths": { + "@org/schemas": ["../../libs/shared/schemas/src/index.ts"] + } } } diff --git a/libs/shared/schemas/src/index.ts b/libs/shared/schemas/src/index.ts index bcd7d91..6d5404d 100644 --- a/libs/shared/schemas/src/index.ts +++ b/libs/shared/schemas/src/index.ts @@ -1,6 +1,4 @@ -export * as Types from './lib/CellTypes'; -export * as TimesheetSchemas from './lib/TimesheetRow'; -export * as OperationRequests from './lib/UpdateTimesheet'; -export * as UserSchemas from './lib/UserSchema'; - - +export * from './lib/CellTypes'; +export * from './lib/TimesheetRow'; +export * from './lib/UpdateTimesheet'; +export * from './lib/UserSchema'; \ No newline at end of file diff --git a/libs/shared/schemas/src/lib/TimesheetRow.ts b/libs/shared/schemas/src/lib/TimesheetRow.ts index a34ef87..5f9e30a 100644 --- a/libs/shared/schemas/src/lib/TimesheetRow.ts +++ b/libs/shared/schemas/src/lib/TimesheetRow.ts @@ -22,7 +22,7 @@ export type TimeEntrySchema = z.infer export const CommentSchema = z.object({ EntryId: z.string(), AuthorID:z.string(), - Type: z.nativeEnum(CellType), + Type: z.nativeEnum(CommentType), Timestamp: z.number(), Content: z.string(), State: z.nativeEnum(CellStatus), @@ -81,7 +81,7 @@ export const ShiftSchema = z.object({ AssociateTimeEntry: TimeEntrySchema, SupervisorTimeEntry: TimeEntrySchema, AdminTimeEntry: TimeEntrySchema, - Notes: z.array(CommentSchema || ReportSchema).default([]), // TODO : This will likely need to be two separate lists. + Notes: z.union([z.undefined(), z.array(CommentSchema || ReportSchema)]), // TODO : This will likely need to be two separate lists. }); export type ShiftSchema = z.infer From 07d3ea0b46d1c50ec8d90320dfccb239db469d66 Mon Sep 17 00:00:00 2001 From: izzyconner <32255130+izzyconner@users.noreply.github.com> Date: Sun, 17 Mar 2024 14:03:04 -0400 Subject: [PATCH 10/15] Fixing more errors --- apps/backend/src/db/timesheets/FrontendConversions.ts | 8 ++++---- libs/shared/schemas/src/lib/UpdateTimesheet.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/backend/src/db/timesheets/FrontendConversions.ts b/apps/backend/src/db/timesheets/FrontendConversions.ts index 2324d02..d0c817f 100644 --- a/apps/backend/src/db/timesheets/FrontendConversions.ts +++ b/apps/backend/src/db/timesheets/FrontendConversions.ts @@ -1,5 +1,5 @@ import * as DynamoSchemas from '../dynamoSchemas/DynamoTimesheet' -import {CommentSchema, ReportSchema, ShiftSchema, StatusEntry, TimeEntrySchema, TimeSheetSchema} from '@org/schemas'; +import {CommentSchema, ReportSchema, ShiftSchema, StatusEntry, TimeEntrySchema, TimeSheetSchema, CellType} from '@org/schemas'; /* Mapper from converting from DynamoDB Timesheet schema to the internal backend/frontend model. @@ -108,11 +108,11 @@ export class DynamoSchemaConverter { } // Converts a frontend cell type to our database equivalent. - private static toDBType(entryType: Types.CellType): DynamoSchemas.DynamoCellType { + private static toDBType(entryType: CellType): DynamoSchemas.DynamoCellType { switch (entryType) { - case Types.CellType.REGULAR: + case CellType.REGULAR: return DynamoSchemas.DynamoCellType.REGULAR; - case Types.CellType.PTO: + case CellType.PTO: return DynamoSchemas.DynamoCellType.PTO; default: return undefined diff --git a/libs/shared/schemas/src/lib/UpdateTimesheet.ts b/libs/shared/schemas/src/lib/UpdateTimesheet.ts index b63ca79..a0360bf 100644 --- a/libs/shared/schemas/src/lib/UpdateTimesheet.ts +++ b/libs/shared/schemas/src/lib/UpdateTimesheet.ts @@ -1,5 +1,5 @@ import { z } from "zod"; -import { NoteSchema, TimesheetEntrySchema } from "./Timesheet-backenddb"; +import { CommentSchema, ReportSchema, ShiftSchema } from "./TimesheetRow"; import { TimesheetStatus } from "./CellTypes"; /* @@ -52,7 +52,7 @@ export type DeleteRequest = z.infer */ export const InsertRequest = z.object({ Type: availableListTypes, - Item: z.union([TimesheetEntrySchema, NoteSchema]), + Item: z.union([ShiftSchema, CommentSchema, ReportSchema]), }) export type InsertRequest = z.infer /* From 3822148c24500be045c33e8d37d0b4a3ddc3f5fe Mon Sep 17 00:00:00 2001 From: izzyconner <32255130+izzyconner@users.noreply.github.com> Date: Mon, 15 Apr 2024 11:30:53 -0400 Subject: [PATCH 11/15] trying various tsconfig settings --- apps/backend/nest-cli.json | 3 ++- apps/backend/tsconfig.json | 9 +++++++-- apps/frontend/tsconfig.json | 9 +++++++-- libs/shared/schemas/tsconfig.json | 6 +++++- libs/shared/schemas/tsconfig.lib.json | 2 +- libs/shared/schemas/tsconfig.spec.json | 2 +- 6 files changed, 23 insertions(+), 8 deletions(-) diff --git a/apps/backend/nest-cli.json b/apps/backend/nest-cli.json index f9aa683..812ce91 100644 --- a/apps/backend/nest-cli.json +++ b/apps/backend/nest-cli.json @@ -4,5 +4,6 @@ "sourceRoot": "src", "compilerOptions": { "deleteOutDir": true - } + }, + "entryFile": "apps/backend/src/main.js" } diff --git a/apps/backend/tsconfig.json b/apps/backend/tsconfig.json index 59174fe..0eef060 100644 --- a/apps/backend/tsconfig.json +++ b/apps/backend/tsconfig.json @@ -11,7 +11,7 @@ "outDir": "./dist", "baseUrl": "./", "paths": { - "@org/schemas": ["../../libs/shared/schemas/src/index.ts"] + "@org/schemas": ["../../libs/shared/schemas/dist/src/index.d.ts"] }, "incremental": true, "skipLibCheck": true, @@ -20,5 +20,10 @@ "strictBindCallApply": false, "forceConsistentCasingInFileNames": false, "noFallthroughCasesInSwitch": false - } + }, + "references": [ + { + "path": "../../libs/shared/schemas/" + } + ] } diff --git a/apps/frontend/tsconfig.json b/apps/frontend/tsconfig.json index 9794df7..f9f5aef 100644 --- a/apps/frontend/tsconfig.json +++ b/apps/frontend/tsconfig.json @@ -19,7 +19,12 @@ "forceConsistentCasingInFileNames": false, "noFallthroughCasesInSwitch": false, "paths": { - "@org/schemas": ["../../libs/shared/schemas/src/index.ts"] + "@org/schemas": ["../../libs/shared/schemas/dist/src/index.d.ts"] } - } + }, + "references": [ + { + "path": "../../libs/shared/schemas/" + } + ] } diff --git a/libs/shared/schemas/tsconfig.json b/libs/shared/schemas/tsconfig.json index 8122543..cf95d57 100644 --- a/libs/shared/schemas/tsconfig.json +++ b/libs/shared/schemas/tsconfig.json @@ -7,7 +7,11 @@ "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true + "noFallthroughCasesInSwitch": true, + "declaration": true, + "declarationMap": true, + "rootDir": ".", + "composite": true, }, "files": [], "include": [], diff --git a/libs/shared/schemas/tsconfig.lib.json b/libs/shared/schemas/tsconfig.lib.json index 4befa7f..77d7bbd 100644 --- a/libs/shared/schemas/tsconfig.lib.json +++ b/libs/shared/schemas/tsconfig.lib.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../../dist/out-tsc", + "outDir": "./dist", "declaration": true, "types": ["node"] }, diff --git a/libs/shared/schemas/tsconfig.spec.json b/libs/shared/schemas/tsconfig.spec.json index 69a251f..de74f90 100644 --- a/libs/shared/schemas/tsconfig.spec.json +++ b/libs/shared/schemas/tsconfig.spec.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../../dist/out-tsc", + "outDir": "./dist", "module": "commonjs", "types": ["jest", "node"] }, From 5adf5f927e0fe5deb07f42a482ab03d94ed74fd4 Mon Sep 17 00:00:00 2001 From: izzyconner <32255130+izzyconner@users.noreply.github.com> Date: Mon, 15 Apr 2024 12:07:58 -0400 Subject: [PATCH 12/15] backend seemingly working with shared schema --- apps/backend/tsconfig.json | 2 +- apps/frontend/tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/backend/tsconfig.json b/apps/backend/tsconfig.json index 0eef060..fba30d0 100644 --- a/apps/backend/tsconfig.json +++ b/apps/backend/tsconfig.json @@ -11,7 +11,7 @@ "outDir": "./dist", "baseUrl": "./", "paths": { - "@org/schemas": ["../../libs/shared/schemas/dist/src/index.d.ts"] + "@org/schemas": ["../../libs/shared/schemas/src/index.ts"] }, "incremental": true, "skipLibCheck": true, diff --git a/apps/frontend/tsconfig.json b/apps/frontend/tsconfig.json index f9f5aef..f2799ae 100644 --- a/apps/frontend/tsconfig.json +++ b/apps/frontend/tsconfig.json @@ -19,7 +19,7 @@ "forceConsistentCasingInFileNames": false, "noFallthroughCasesInSwitch": false, "paths": { - "@org/schemas": ["../../libs/shared/schemas/dist/src/index.d.ts"] + "@org/schemas": ["../../libs/shared/schemas/src/index.ts"] } }, "references": [ From 3911aabc95a343ac53b14daecce975b9beb0e09a Mon Sep 17 00:00:00 2001 From: izzyconner Date: Mon, 15 Apr 2024 16:53:02 -0400 Subject: [PATCH 13/15] temporary fix to put schemas back in the individual apps --- apps/backend/src/src/index.ts | 4 + apps/backend/src/src/lib/CellTypes.ts | 37 +++++++ apps/backend/src/src/lib/TimesheetRow.ts | 98 +++++++++++++++++ apps/backend/src/src/lib/UpdateTimesheet.ts | 104 +++++++++++++++++++ apps/backend/src/src/lib/UserSchema.ts | 11 ++ apps/backend/tsconfig.json | 2 +- apps/frontend/src/src/index.ts | 4 + apps/frontend/src/src/lib/CellTypes.ts | 37 +++++++ apps/frontend/src/src/lib/TimesheetRow.ts | 98 +++++++++++++++++ apps/frontend/src/src/lib/UpdateTimesheet.ts | 104 +++++++++++++++++++ apps/frontend/src/src/lib/UserSchema.ts | 11 ++ apps/frontend/tsconfig.json | 12 +-- 12 files changed, 515 insertions(+), 7 deletions(-) create mode 100644 apps/backend/src/src/index.ts create mode 100644 apps/backend/src/src/lib/CellTypes.ts create mode 100644 apps/backend/src/src/lib/TimesheetRow.ts create mode 100644 apps/backend/src/src/lib/UpdateTimesheet.ts create mode 100644 apps/backend/src/src/lib/UserSchema.ts create mode 100644 apps/frontend/src/src/index.ts create mode 100644 apps/frontend/src/src/lib/CellTypes.ts create mode 100644 apps/frontend/src/src/lib/TimesheetRow.ts create mode 100644 apps/frontend/src/src/lib/UpdateTimesheet.ts create mode 100644 apps/frontend/src/src/lib/UserSchema.ts diff --git a/apps/backend/src/src/index.ts b/apps/backend/src/src/index.ts new file mode 100644 index 0000000..6d5404d --- /dev/null +++ b/apps/backend/src/src/index.ts @@ -0,0 +1,4 @@ +export * from './lib/CellTypes'; +export * from './lib/TimesheetRow'; +export * from './lib/UpdateTimesheet'; +export * from './lib/UserSchema'; \ No newline at end of file diff --git a/apps/backend/src/src/lib/CellTypes.ts b/apps/backend/src/src/lib/CellTypes.ts new file mode 100644 index 0000000..167473b --- /dev/null +++ b/apps/backend/src/src/lib/CellTypes.ts @@ -0,0 +1,37 @@ +export enum CellType { + REGULAR = "Time Worked", + PTO = "PTO" +}; + +export enum CellStatus { + Active="Active", + Deleted="Deleted" +} + +export enum CommentType { + Comment = "Comment", + Report = "Report", +}; + +export enum ReportOptions { + Late = "Late Arrival", + LeftEarly = "Early Departure", + Absent = "No Show" +} + +export const enum ReviewStages { + UNSUBMITTED = "Not-Submitted", + EMPLOYEE_SUBMITTED = "Employee Submitted", + ADMIN_REVIEW = "Review (Breaktime)", + APPROVED = "Approved" +}; + +// TODO : Does this need to be different than the enum above? Not sure it does... see if we can replace or combine them +export enum TimesheetStatus { + UNSUBMITTED = "Unsubmitted", + HOURS_SUBMITTED = "HoursSubmitted", + HOURS_REVIEWED = "HoursReviewed", + FINALIZED = "Finalized", + } + +export const TABLE_COLUMNS = ['Type', 'Date','Clock-in','Clock-Out','Hours','Comment']; \ No newline at end of file diff --git a/apps/backend/src/src/lib/TimesheetRow.ts b/apps/backend/src/src/lib/TimesheetRow.ts new file mode 100644 index 0000000..5f9e30a --- /dev/null +++ b/apps/backend/src/src/lib/TimesheetRow.ts @@ -0,0 +1,98 @@ +import { z } from "zod"; +import { CellStatus, CellType, CommentType, ReportOptions } from "./CellTypes"; + +/** + * A collection of various schemas used in creating a shift entry in the timesheet. These schemas are internal models, + * used for logic in the backend and frontend. + */ + +const optionalNumber = z.union([z.undefined(), z.number()]); +const optionalString = z.union([z.undefined(), z.string()]); + +/** + * Represents the schema for an epoch clockin/clockout pair + */ +export const TimeEntrySchema = z.union([z.undefined(), z.object({ + StartDateTime: optionalNumber, + EndDateTime: optionalNumber, + AuthorID: optionalString +})]); +export type TimeEntrySchema = z.infer + +export const CommentSchema = z.object({ + EntryId: z.string(), + AuthorID:z.string(), + Type: z.nativeEnum(CommentType), + Timestamp: z.number(), + Content: z.string(), + State: z.nativeEnum(CellStatus), +}); + +export type CommentSchema = z.infer + +export const ReportSchema = z.object({ + AuthorID:z.string(), + EntryId: z.string(), + Timestamp: z.number(), + Type: z.nativeEnum(CommentType), + CorrectTime: z.number(), + Content: z.nativeEnum(ReportOptions), + Notified: z.string(), + Explanation: z.string(), + State: z.nativeEnum(CellStatus), +}); + +export type ReportSchema = z.infer + +// The status is either undefined, for not being at that stage yet, or +// contains the date and author of approving this submission +export const StatusEntryType = z.union([ + z.object({ + Date: z.number(), + AuthorID: z.string(), + }), + z.undefined(), +]); + +// Status type contains the three stages of the pipeline we have defined +export const StatusEntry = z.object({ + HoursSubmitted: StatusEntryType, + HoursReviewed: StatusEntryType, + Finalized: StatusEntryType, +}); + +export type StatusEntryType = z.infer; +export type StatusEntry = z.infer; + +/** + * The schema for a shift entry (visually, a row in the timesheet). + * @Type: What type of entry the shift is (PTO, Regular, etc.) + * @EntryId: The unique ID for this shift + * @Date: The epoch value for the date of this shift. Note that this is different than the timestamp of the clock in and clock out. + * @AssociateTimeEntry: The clock-in/clock-out times recorded by the associate + * @SupervisorTimeEntry: The clock-in/clock-out times recorded by the supervisor + * @AdminTimeEntry: The clock-in/clock-out times recorded by the admin + * @Notes: The list of comments and reports saved for this shift. + */ +export const ShiftSchema = z.object({ + Type: z.nativeEnum(CellType), + EntryId: z.string(), + Date: z.number(), + AssociateTimeEntry: TimeEntrySchema, + SupervisorTimeEntry: TimeEntrySchema, + AdminTimeEntry: TimeEntrySchema, + Notes: z.union([z.undefined(), z.array(CommentSchema || ReportSchema)]), // TODO : This will likely need to be two separate lists. +}); +export type ShiftSchema = z.infer + +export const TimeSheetSchema = z.object({ + TimesheetID: z.number(), + UserID: z.string(), + StartDate: z.number(), + Status: StatusEntry, + CompanyID: z.string(), + TableData: z.array(ShiftSchema), + WeekNotes: z.union([z.undefined(), z.array(CommentSchema)]), +}); + +export type TimeSheetSchema = z.infer; \ No newline at end of file diff --git a/apps/backend/src/src/lib/UpdateTimesheet.ts b/apps/backend/src/src/lib/UpdateTimesheet.ts new file mode 100644 index 0000000..a0360bf --- /dev/null +++ b/apps/backend/src/src/lib/UpdateTimesheet.ts @@ -0,0 +1,104 @@ +import { z } from "zod"; +import { CommentSchema, ReportSchema, ShiftSchema } from "./TimesheetRow"; +import { TimesheetStatus } from "./CellTypes"; + +/* + The supported timesheet operations currently supported. + Most operations relate to items that are inside the timesheet, whether it is the rows of the timesheet, the comments someone left + on it for example. + + INSERT - Inserting an item into the timesheet + UPDATE - Updating a specific item in the timesheet + DELETE - Deleting a speciic item in the timesheet + + STATUS_CHANGE - When the timesheet has been submitted / should be advanced to the next stage + CREATE-TIMESHEET - Operation for creating a timesheet, if it would be useful to have in the future. +*/ +export const enum TimesheetOperations { + INSERT = "INSERT", + UPDATE = "UPDATE", + DELETE = "DELETE", + STATUS_CHANGE = "STATUS_CHANGE", + CREATE_TIMESHEET = "CREATE_TIMESHEET" +} + +/* + The available types of items that are currently supported in the timesheet that list operations can be performed on. + TABLEDATA - the rows of the timesheet- basically their worked schedule + WEEKNOTES - the comments left by an employer for that week +*/ +export const enum TimesheetListItems { + TABLEDATA = "TABLEDATA", + WEEKNOTES = "WEEKNOTES" +} + +const availableListTypes = z.enum([TimesheetListItems.TABLEDATA, TimesheetListItems.WEEKNOTES]) + +/* + The schema for a delete request + @Type: The type of the item this delete request is processing - see available types in TimesheetListItems + @Id: The id of the item we are deleting - to know what to remove +*/ +export const DeleteRequest = z.object({ + Type: availableListTypes, + Id: z.string() +}) +export type DeleteRequest = z.infer + +/* + The schema for an insert request for an item + @Type: The type of the item that we are inserting, to know what we should be adding this item to (Either weekly notes or timesheet data) + @Item: The item we are inserting - either a timesheet row or a note for the week, depending on the type of the request +*/ +export const InsertRequest = z.object({ + Type: availableListTypes, + Item: z.union([ShiftSchema, CommentSchema, ReportSchema]), +}) +export type InsertRequest = z.infer +/* + Schema for updating an item from the three possible list of items in the timesheet + @Type: The field of the timesheet we are updating from the three supported + @Id: the id of the entry we are updating - correlates to that row / entry in the list of items + @Attribute: The specific attribute of the object we are updating + @Data: The payload we are updating this attribute to be - can be a wide range of things currently +*/ +export const UpdateRequest = z.object({ + Type: availableListTypes, + Id: z.string(), + Attribute: z.string(), + Data: z.any() +}) +export type UpdateRequest = z.infer + +/* + Schema for changing the status of a timesheet + @TimesheetId: The id of the timesheet we are updating + @AssociateId: The id of the associate whose timesheet is being submitted +*/ +export const StatusChangeRequest = z.object({ + TimesheetId: z.number(), + AssociateId: z.string(), + authorId: z.string(), + dateSubmitted: z.number(), + statusType: z.enum([TimesheetStatus.FINALIZED, TimesheetStatus.HOURS_REVIEWED, TimesheetStatus.HOURS_SUBMITTED]) +}) +export type StatusChangeRequest = z.infer + +/* The main request body that is used to determine what we should be updating in a request + @TimesheetID: The id of the timesheet we are updating + @Operation: The type of operation we are performing on this timesheet + @Payload: The contents to be used in the operation for updating this. +*/ +export const TimesheetUpdateRequest = z.object({ + TimesheetID: z.number(), + Operation: z.enum([ + TimesheetOperations.INSERT, + TimesheetOperations.UPDATE, + TimesheetOperations.DELETE, + TimesheetOperations.STATUS_CHANGE, + TimesheetOperations.CREATE_TIMESHEET + ]), + Payload: z.any(), +}) +export type TimesheetUpdateRequest = z.infer + diff --git a/apps/backend/src/src/lib/UserSchema.ts b/apps/backend/src/src/lib/UserSchema.ts new file mode 100644 index 0000000..a51af17 --- /dev/null +++ b/apps/backend/src/src/lib/UserSchema.ts @@ -0,0 +1,11 @@ +import { z } from "zod"; + +export const UserSchema = z.object({ + UserID: z.string(), + FirstName: z.string(), + LastName: z.string(), + Type: z.enum(["Associate", "Supervisor", "Admin"]), + Picture: z.string().optional(), +}); + +export type UserSchema = z.infer; diff --git a/apps/backend/tsconfig.json b/apps/backend/tsconfig.json index fba30d0..ad78022 100644 --- a/apps/backend/tsconfig.json +++ b/apps/backend/tsconfig.json @@ -11,7 +11,7 @@ "outDir": "./dist", "baseUrl": "./", "paths": { - "@org/schemas": ["../../libs/shared/schemas/src/index.ts"] + "@org/schemas": ["src/src/index.ts"] }, "incremental": true, "skipLibCheck": true, diff --git a/apps/frontend/src/src/index.ts b/apps/frontend/src/src/index.ts new file mode 100644 index 0000000..6d5404d --- /dev/null +++ b/apps/frontend/src/src/index.ts @@ -0,0 +1,4 @@ +export * from './lib/CellTypes'; +export * from './lib/TimesheetRow'; +export * from './lib/UpdateTimesheet'; +export * from './lib/UserSchema'; \ No newline at end of file diff --git a/apps/frontend/src/src/lib/CellTypes.ts b/apps/frontend/src/src/lib/CellTypes.ts new file mode 100644 index 0000000..167473b --- /dev/null +++ b/apps/frontend/src/src/lib/CellTypes.ts @@ -0,0 +1,37 @@ +export enum CellType { + REGULAR = "Time Worked", + PTO = "PTO" +}; + +export enum CellStatus { + Active="Active", + Deleted="Deleted" +} + +export enum CommentType { + Comment = "Comment", + Report = "Report", +}; + +export enum ReportOptions { + Late = "Late Arrival", + LeftEarly = "Early Departure", + Absent = "No Show" +} + +export const enum ReviewStages { + UNSUBMITTED = "Not-Submitted", + EMPLOYEE_SUBMITTED = "Employee Submitted", + ADMIN_REVIEW = "Review (Breaktime)", + APPROVED = "Approved" +}; + +// TODO : Does this need to be different than the enum above? Not sure it does... see if we can replace or combine them +export enum TimesheetStatus { + UNSUBMITTED = "Unsubmitted", + HOURS_SUBMITTED = "HoursSubmitted", + HOURS_REVIEWED = "HoursReviewed", + FINALIZED = "Finalized", + } + +export const TABLE_COLUMNS = ['Type', 'Date','Clock-in','Clock-Out','Hours','Comment']; \ No newline at end of file diff --git a/apps/frontend/src/src/lib/TimesheetRow.ts b/apps/frontend/src/src/lib/TimesheetRow.ts new file mode 100644 index 0000000..5f9e30a --- /dev/null +++ b/apps/frontend/src/src/lib/TimesheetRow.ts @@ -0,0 +1,98 @@ +import { z } from "zod"; +import { CellStatus, CellType, CommentType, ReportOptions } from "./CellTypes"; + +/** + * A collection of various schemas used in creating a shift entry in the timesheet. These schemas are internal models, + * used for logic in the backend and frontend. + */ + +const optionalNumber = z.union([z.undefined(), z.number()]); +const optionalString = z.union([z.undefined(), z.string()]); + +/** + * Represents the schema for an epoch clockin/clockout pair + */ +export const TimeEntrySchema = z.union([z.undefined(), z.object({ + StartDateTime: optionalNumber, + EndDateTime: optionalNumber, + AuthorID: optionalString +})]); +export type TimeEntrySchema = z.infer + +export const CommentSchema = z.object({ + EntryId: z.string(), + AuthorID:z.string(), + Type: z.nativeEnum(CommentType), + Timestamp: z.number(), + Content: z.string(), + State: z.nativeEnum(CellStatus), +}); + +export type CommentSchema = z.infer + +export const ReportSchema = z.object({ + AuthorID:z.string(), + EntryId: z.string(), + Timestamp: z.number(), + Type: z.nativeEnum(CommentType), + CorrectTime: z.number(), + Content: z.nativeEnum(ReportOptions), + Notified: z.string(), + Explanation: z.string(), + State: z.nativeEnum(CellStatus), +}); + +export type ReportSchema = z.infer + +// The status is either undefined, for not being at that stage yet, or +// contains the date and author of approving this submission +export const StatusEntryType = z.union([ + z.object({ + Date: z.number(), + AuthorID: z.string(), + }), + z.undefined(), +]); + +// Status type contains the three stages of the pipeline we have defined +export const StatusEntry = z.object({ + HoursSubmitted: StatusEntryType, + HoursReviewed: StatusEntryType, + Finalized: StatusEntryType, +}); + +export type StatusEntryType = z.infer; +export type StatusEntry = z.infer; + +/** + * The schema for a shift entry (visually, a row in the timesheet). + * @Type: What type of entry the shift is (PTO, Regular, etc.) + * @EntryId: The unique ID for this shift + * @Date: The epoch value for the date of this shift. Note that this is different than the timestamp of the clock in and clock out. + * @AssociateTimeEntry: The clock-in/clock-out times recorded by the associate + * @SupervisorTimeEntry: The clock-in/clock-out times recorded by the supervisor + * @AdminTimeEntry: The clock-in/clock-out times recorded by the admin + * @Notes: The list of comments and reports saved for this shift. + */ +export const ShiftSchema = z.object({ + Type: z.nativeEnum(CellType), + EntryId: z.string(), + Date: z.number(), + AssociateTimeEntry: TimeEntrySchema, + SupervisorTimeEntry: TimeEntrySchema, + AdminTimeEntry: TimeEntrySchema, + Notes: z.union([z.undefined(), z.array(CommentSchema || ReportSchema)]), // TODO : This will likely need to be two separate lists. +}); +export type ShiftSchema = z.infer + +export const TimeSheetSchema = z.object({ + TimesheetID: z.number(), + UserID: z.string(), + StartDate: z.number(), + Status: StatusEntry, + CompanyID: z.string(), + TableData: z.array(ShiftSchema), + WeekNotes: z.union([z.undefined(), z.array(CommentSchema)]), +}); + +export type TimeSheetSchema = z.infer; \ No newline at end of file diff --git a/apps/frontend/src/src/lib/UpdateTimesheet.ts b/apps/frontend/src/src/lib/UpdateTimesheet.ts new file mode 100644 index 0000000..a0360bf --- /dev/null +++ b/apps/frontend/src/src/lib/UpdateTimesheet.ts @@ -0,0 +1,104 @@ +import { z } from "zod"; +import { CommentSchema, ReportSchema, ShiftSchema } from "./TimesheetRow"; +import { TimesheetStatus } from "./CellTypes"; + +/* + The supported timesheet operations currently supported. + Most operations relate to items that are inside the timesheet, whether it is the rows of the timesheet, the comments someone left + on it for example. + + INSERT - Inserting an item into the timesheet + UPDATE - Updating a specific item in the timesheet + DELETE - Deleting a speciic item in the timesheet + + STATUS_CHANGE - When the timesheet has been submitted / should be advanced to the next stage + CREATE-TIMESHEET - Operation for creating a timesheet, if it would be useful to have in the future. +*/ +export const enum TimesheetOperations { + INSERT = "INSERT", + UPDATE = "UPDATE", + DELETE = "DELETE", + STATUS_CHANGE = "STATUS_CHANGE", + CREATE_TIMESHEET = "CREATE_TIMESHEET" +} + +/* + The available types of items that are currently supported in the timesheet that list operations can be performed on. + TABLEDATA - the rows of the timesheet- basically their worked schedule + WEEKNOTES - the comments left by an employer for that week +*/ +export const enum TimesheetListItems { + TABLEDATA = "TABLEDATA", + WEEKNOTES = "WEEKNOTES" +} + +const availableListTypes = z.enum([TimesheetListItems.TABLEDATA, TimesheetListItems.WEEKNOTES]) + +/* + The schema for a delete request + @Type: The type of the item this delete request is processing - see available types in TimesheetListItems + @Id: The id of the item we are deleting - to know what to remove +*/ +export const DeleteRequest = z.object({ + Type: availableListTypes, + Id: z.string() +}) +export type DeleteRequest = z.infer + +/* + The schema for an insert request for an item + @Type: The type of the item that we are inserting, to know what we should be adding this item to (Either weekly notes or timesheet data) + @Item: The item we are inserting - either a timesheet row or a note for the week, depending on the type of the request +*/ +export const InsertRequest = z.object({ + Type: availableListTypes, + Item: z.union([ShiftSchema, CommentSchema, ReportSchema]), +}) +export type InsertRequest = z.infer +/* + Schema for updating an item from the three possible list of items in the timesheet + @Type: The field of the timesheet we are updating from the three supported + @Id: the id of the entry we are updating - correlates to that row / entry in the list of items + @Attribute: The specific attribute of the object we are updating + @Data: The payload we are updating this attribute to be - can be a wide range of things currently +*/ +export const UpdateRequest = z.object({ + Type: availableListTypes, + Id: z.string(), + Attribute: z.string(), + Data: z.any() +}) +export type UpdateRequest = z.infer + +/* + Schema for changing the status of a timesheet + @TimesheetId: The id of the timesheet we are updating + @AssociateId: The id of the associate whose timesheet is being submitted +*/ +export const StatusChangeRequest = z.object({ + TimesheetId: z.number(), + AssociateId: z.string(), + authorId: z.string(), + dateSubmitted: z.number(), + statusType: z.enum([TimesheetStatus.FINALIZED, TimesheetStatus.HOURS_REVIEWED, TimesheetStatus.HOURS_SUBMITTED]) +}) +export type StatusChangeRequest = z.infer + +/* The main request body that is used to determine what we should be updating in a request + @TimesheetID: The id of the timesheet we are updating + @Operation: The type of operation we are performing on this timesheet + @Payload: The contents to be used in the operation for updating this. +*/ +export const TimesheetUpdateRequest = z.object({ + TimesheetID: z.number(), + Operation: z.enum([ + TimesheetOperations.INSERT, + TimesheetOperations.UPDATE, + TimesheetOperations.DELETE, + TimesheetOperations.STATUS_CHANGE, + TimesheetOperations.CREATE_TIMESHEET + ]), + Payload: z.any(), +}) +export type TimesheetUpdateRequest = z.infer + diff --git a/apps/frontend/src/src/lib/UserSchema.ts b/apps/frontend/src/src/lib/UserSchema.ts new file mode 100644 index 0000000..a51af17 --- /dev/null +++ b/apps/frontend/src/src/lib/UserSchema.ts @@ -0,0 +1,11 @@ +import { z } from "zod"; + +export const UserSchema = z.object({ + UserID: z.string(), + FirstName: z.string(), + LastName: z.string(), + Type: z.enum(["Associate", "Supervisor", "Admin"]), + Picture: z.string().optional(), +}); + +export type UserSchema = z.infer; diff --git a/apps/frontend/tsconfig.json b/apps/frontend/tsconfig.json index f2799ae..236427f 100644 --- a/apps/frontend/tsconfig.json +++ b/apps/frontend/tsconfig.json @@ -19,12 +19,12 @@ "forceConsistentCasingInFileNames": false, "noFallthroughCasesInSwitch": false, "paths": { - "@org/schemas": ["../../libs/shared/schemas/src/index.ts"] + "@org/schemas": ["src/src/index.ts"] } }, - "references": [ - { - "path": "../../libs/shared/schemas/" - } - ] + // "references": [ + // { + // "path": "../../libs/shared/schemas/" + // } + // ] } From acfe3f1fb5f0f4f79ab5cf63c86b0867ae6e16c3 Mon Sep 17 00:00:00 2001 From: izzyconner <32255130+izzyconner@users.noreply.github.com> Date: Mon, 15 Apr 2024 17:57:57 -0400 Subject: [PATCH 14/15] fixing frontend temporarily with local copy of shared schemas --- .../src/components/Auth/apiClient.tsx | 4 +- .../TimeCardPage/AggregationTable.tsx | 2 +- .../TimeCardPage/CellTypes/CellType.tsx | 2 +- .../TimeCardPage/CellTypes/CommentCell.tsx | 2 +- .../CommentModals/ShowCommentModal.tsx | 2 +- .../CommentModals/ShowReportModal.tsx | 2 +- .../TimeCardPage/CellTypes/HoursCell.tsx | 2 +- .../TimeCardPage/CellTypes/TimeEntry.tsx | 96 +++++++------- .../components/TimeCardPage/CommentModal.tsx | 121 +++++++++--------- .../components/TimeCardPage/SubmitCard.tsx | 10 +- .../src/components/TimeCardPage/TimeSheet.tsx | 2 +- .../src/components/TimeCardPage/TimeTable.tsx | 2 +- .../components/TimeCardPage/TimeTableRow.tsx | 2 +- .../components/TimeCardPage/UserContext.tsx | 2 +- .../src/components/TimeCardPage/utils.tsx | 2 +- .../src/{src => shared-schemas}/index.ts | 0 .../{src => shared-schemas}/lib/CellTypes.ts | 0 .../lib/TimesheetRow.ts | 0 .../lib/UpdateTimesheet.ts | 0 .../{src => shared-schemas}/lib/UserSchema.ts | 0 apps/frontend/tsconfig.json | 3 +- 21 files changed, 127 insertions(+), 129 deletions(-) rename apps/frontend/src/{src => shared-schemas}/index.ts (100%) rename apps/frontend/src/{src => shared-schemas}/lib/CellTypes.ts (100%) rename apps/frontend/src/{src => shared-schemas}/lib/TimesheetRow.ts (100%) rename apps/frontend/src/{src => shared-schemas}/lib/UpdateTimesheet.ts (100%) rename apps/frontend/src/{src => shared-schemas}/lib/UserSchema.ts (100%) diff --git a/apps/frontend/src/components/Auth/apiClient.tsx b/apps/frontend/src/components/Auth/apiClient.tsx index 39449c9..bf0781c 100644 --- a/apps/frontend/src/components/Auth/apiClient.tsx +++ b/apps/frontend/src/components/Auth/apiClient.tsx @@ -1,7 +1,7 @@ import { Auth } from "aws-amplify"; import axios, { AxiosInstance } from "axios"; -import { TimeSheetSchema, ReportOptions } from "@org/schemas"; -import { UserSchema } from "@org/schemas"; +import { TimeSheetSchema, ReportOptions } from "src/shared-schemas"; +import { UserSchema } from "src/shared-schemas"; const defaultBaseUrl = process.env.REACT_APP_API_BASE_URL ?? "http://localhost:3000"; diff --git a/apps/frontend/src/components/TimeCardPage/AggregationTable.tsx b/apps/frontend/src/components/TimeCardPage/AggregationTable.tsx index 2f54aea..7f0c296 100644 --- a/apps/frontend/src/components/TimeCardPage/AggregationTable.tsx +++ b/apps/frontend/src/components/TimeCardPage/AggregationTable.tsx @@ -2,7 +2,7 @@ import { Table, Thead, Tbody, Tfoot, Tr, Th, Td } from "@chakra-ui/react"; import React from "react"; import { v4 as uuidv4 } from "uuid"; import moment, { Moment } from "moment-timezone"; -import { TimeSheetSchema } from "@org/schemas"; +import { TimeSheetSchema } from "src/shared-schemas"; interface AggregationProps { Date: Moment; diff --git a/apps/frontend/src/components/TimeCardPage/CellTypes/CellType.tsx b/apps/frontend/src/components/TimeCardPage/CellTypes/CellType.tsx index 19ca0eb..93c7de2 100644 --- a/apps/frontend/src/components/TimeCardPage/CellTypes/CellType.tsx +++ b/apps/frontend/src/components/TimeCardPage/CellTypes/CellType.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react"; -import { CellType } from "@org/schemas"; +import { CellType } from "src/shared-schemas"; import { Select } from "@chakra-ui/react"; interface TypeProps { diff --git a/apps/frontend/src/components/TimeCardPage/CellTypes/CommentCell.tsx b/apps/frontend/src/components/TimeCardPage/CellTypes/CommentCell.tsx index 262ef5c..226d23e 100644 --- a/apps/frontend/src/components/TimeCardPage/CellTypes/CommentCell.tsx +++ b/apps/frontend/src/components/TimeCardPage/CellTypes/CommentCell.tsx @@ -2,7 +2,7 @@ import React, { useState, useEffect, useContext } from "react"; import { Stack } from "@chakra-ui/react"; import { UserContext } from "../UserContext"; -import { CommentType, CommentSchema, ReportSchema } from "@org/schemas"; +import { CommentType, CommentSchema, ReportSchema } from "src/shared-schemas"; import { getAllActiveCommentsOfType } from "../utils"; import ShowCommentModal from "./CommentModals/ShowCommentModal"; diff --git a/apps/frontend/src/components/TimeCardPage/CellTypes/CommentModals/ShowCommentModal.tsx b/apps/frontend/src/components/TimeCardPage/CellTypes/CommentModals/ShowCommentModal.tsx index f463b7f..20f2c8f 100644 --- a/apps/frontend/src/components/TimeCardPage/CellTypes/CommentModals/ShowCommentModal.tsx +++ b/apps/frontend/src/components/TimeCardPage/CellTypes/CommentModals/ShowCommentModal.tsx @@ -37,7 +37,7 @@ import { } from "@chakra-ui/icons"; import { Color } from "../../types"; -import { CommentType, CellStatus, CommentSchema } from "@org/schemas" +import { CommentType, CellStatus, CommentSchema } from "src/shared-schemas" import { getAllActiveCommentsOfType, createNewComment } from "../../utils"; import apiClient from "src/components/Auth/apiClient"; import { createToast } from "../../utils"; diff --git a/apps/frontend/src/components/TimeCardPage/CellTypes/CommentModals/ShowReportModal.tsx b/apps/frontend/src/components/TimeCardPage/CellTypes/CommentModals/ShowReportModal.tsx index a51b7bb..594e9cc 100644 --- a/apps/frontend/src/components/TimeCardPage/CellTypes/CommentModals/ShowReportModal.tsx +++ b/apps/frontend/src/components/TimeCardPage/CellTypes/CommentModals/ShowReportModal.tsx @@ -38,7 +38,7 @@ import { CellStatus, CommentSchema, ReportSchema, -} from "@org/schemas"; +} from "src/shared-schemas"; import { getAllActiveCommentsOfType, createNewReport } from "../../utils"; const saveEditedReport = ( diff --git a/apps/frontend/src/components/TimeCardPage/CellTypes/HoursCell.tsx b/apps/frontend/src/components/TimeCardPage/CellTypes/HoursCell.tsx index 357db7a..212d2c5 100644 --- a/apps/frontend/src/components/TimeCardPage/CellTypes/HoursCell.tsx +++ b/apps/frontend/src/components/TimeCardPage/CellTypes/HoursCell.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react"; -import { ShiftSchema } from "@org/schemas"; +import { ShiftSchema } from "src/shared-schemas"; import { Box } from "@chakra-ui/react"; interface DurationProps { diff --git a/apps/frontend/src/components/TimeCardPage/CellTypes/TimeEntry.tsx b/apps/frontend/src/components/TimeCardPage/CellTypes/TimeEntry.tsx index 1450193..188fbe7 100644 --- a/apps/frontend/src/components/TimeCardPage/CellTypes/TimeEntry.tsx +++ b/apps/frontend/src/components/TimeCardPage/CellTypes/TimeEntry.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from "react"; -import { ShiftSchema } from "@org/schemas"; -import { Input } from '@chakra-ui/react'; -import moment from 'moment'; +import { ShiftSchema } from "src/shared-schemas"; +import { Input } from "@chakra-ui/react"; +import moment from "moment"; interface TimeEntryProps { field: string; @@ -12,55 +12,55 @@ interface TimeEntryProps { export function TimeEntry(props: TimeEntryProps) { const [minutes, setMinutes] = useState(undefined); - const onChange = (time) => { - let calculatedTime; - // TODO: account for possible time deletions when updating DB and whatnot - if (time === null) { - calculatedTime = undefined; - } else { - const [currentHours, parsedMinutes] = time.split(":"); - calculatedTime = Number(currentHours) * 60 + Number(parsedMinutes); - } + const onChange = (time) => { + let calculatedTime; + // TODO: account for possible time deletions when updating DB and whatnot + if (time === null) { + calculatedTime = undefined; + } else { + const [currentHours, parsedMinutes] = time.split(":"); + calculatedTime = Number(currentHours) * 60 + Number(parsedMinutes); + } - setMinutes(calculatedTime); - - //Triggering parent class to update its references here as well - var rowToMutate = props.row.AssociateTimeEntry; - if (rowToMutate === undefined) { - rowToMutate = { - StartDateTime:undefined, EndDateTime:undefined, AuthorID:"" - } - } + setMinutes(calculatedTime); + //Triggering parent class to update its references here as well + var rowToMutate = props.row.AssociateTimeEntry; + if (rowToMutate === undefined) { + rowToMutate = { + StartDateTime: undefined, + EndDateTime: undefined, + AuthorID: "", + }; + } - if (time !== null) { - const [hours, parsedMinutes] = time.split(":"); - const calculatedTime = Number(hours) * 60 + Number(parsedMinutes) - setMinutes(calculatedTime); - console.log(calculatedTime); - rowToMutate[props.field] = calculatedTime; - } else { - // Value is null, so mark it as undefined in our processing - rowToMutate[props.field] = undefined; - setMinutes(undefined); - } - //Triggering parent class to update its references here as well - props.updateFields("Associate", rowToMutate); + if (time !== null) { + const [hours, parsedMinutes] = time.split(":"); + const calculatedTime = Number(hours) * 60 + Number(parsedMinutes); + setMinutes(calculatedTime); + console.log(calculatedTime); + rowToMutate[props.field] = calculatedTime; + } else { + // Value is null, so mark it as undefined in our processing + rowToMutate[props.field] = undefined; + setMinutes(undefined); } + //Triggering parent class to update its references here as well + props.updateFields("Associate", rowToMutate); + }; + + // converts minutes from 00:00 to the current hour and minute it represents + const minutesFrom00 = (minutes) => { + // initialize an epoch that starts at 00:00 and add in the minutes + // to string its hour and time + if (minutes == undefined) { + return undefined; + } + const epoch = moment().set("hour", 0).set("minute", 0); + epoch.add(minutes, "minutes"); + return epoch.format("HH:mm"); + }; - // converts minutes from 00:00 to the current hour and minute it represents - const minutesFrom00 = (minutes) => - { - // initialize an epoch that starts at 00:00 and add in the minutes - // to string its hour and time - if (minutes == undefined) { - return undefined; - } - const epoch = moment().set('hour', 0).set('minute', 0); - epoch.add(minutes, 'minutes'); - return epoch.format("HH:mm"); - } - useEffect(() => { if (props.row.AssociateTimeEntry !== undefined) { setMinutes(props.row.AssociateTimeEntry[props.field]); @@ -76,8 +76,6 @@ export function TimeEntry(props: TimeEntryProps) { onChange(event.target.value); }} value={minutesFrom00(minutes)} - /> ); } - diff --git a/apps/frontend/src/components/TimeCardPage/CommentModal.tsx b/apps/frontend/src/components/TimeCardPage/CommentModal.tsx index 43dfeee..6366ef2 100644 --- a/apps/frontend/src/components/TimeCardPage/CommentModal.tsx +++ b/apps/frontend/src/components/TimeCardPage/CommentModal.tsx @@ -10,10 +10,10 @@ import { ModalFooter, HStack, Center, - Select + Select, } from "@chakra-ui/react"; import React, { useState, useContext } from "react"; -import { CommentType, CommentSchema } from "@org/schemas"; +import { CommentType, CommentSchema } from "src/shared-schemas"; import { createNewComment } from "./utils"; import { UserContext } from "./UserContext"; @@ -28,11 +28,10 @@ export function WeeklyCommentModal({ setWeeklyComments, setWeeklyReports, weeklyComments, - weeklyReports + weeklyReports, }: WeeklyCommentModalProps) { - const { isOpen, onOpen, onClose } = useDisclosure(); - const [type, setType] = useState(CommentType.Comment) + const [type, setType] = useState(CommentType.Comment); const [remark, setRemark] = useState(); const user = useContext(UserContext); @@ -41,69 +40,75 @@ export function WeeklyCommentModal({ }; const handleTypeChange = (e) => { - setType(e.target.value); + setType(e.target.value); }; const handleFormSubmit = () => { // TODO: reuse comment validation - if (type === CommentType.Comment){ - setWeeklyComments([...weeklyComments, createNewComment(user, type, remark)]); - } else{ - setWeeklyReports([...weeklyReports, createNewComment(user, type, remark)]); + if (type === CommentType.Comment) { + setWeeklyComments([ + ...weeklyComments, + createNewComment(user, type, remark), + ]); + } else { + setWeeklyReports([ + ...weeklyReports, + createNewComment(user, type, remark), + ]); } alert(`Your ${type} has been submitted!`); // TODO: call to db - setType(CommentType.Comment) // so that Comment is consistently first option in drop down - onClose() // maybe don't autoclose? currently mimicking how daily comment modal closes + setType(CommentType.Comment); // so that Comment is consistently first option in drop down + onClose(); // maybe don't autoclose? currently mimicking how daily comment modal closes }; return ( <> -
- -
- - - }> - {type} +
+ +
+ + + }> + {type} -
- - - - - - -
+
+ + + + + + +
- - - - - - -
-
-
- - ) -}; \ No newline at end of file + + + + + + +
+
+
+ + ); +} diff --git a/apps/frontend/src/components/TimeCardPage/SubmitCard.tsx b/apps/frontend/src/components/TimeCardPage/SubmitCard.tsx index 2db48b7..ed28532 100644 --- a/apps/frontend/src/components/TimeCardPage/SubmitCard.tsx +++ b/apps/frontend/src/components/TimeCardPage/SubmitCard.tsx @@ -1,14 +1,8 @@ import React, { useState, useEffect } from "react"; import { WeeklyCommentModal } from "./CommentModal"; -import { - Box, - Card, - CardBody, - CardFooter, - Button, -} from "@chakra-ui/react"; +import { Box, Card, CardBody, CardFooter, Button } from "@chakra-ui/react"; import { CardState } from "./types"; -import { CommentSchema } from "@org/schemas"; +import { CommentSchema } from "src/shared-schemas"; interface SubmitCardProps { setWeeklyComments: Function; diff --git a/apps/frontend/src/components/TimeCardPage/TimeSheet.tsx b/apps/frontend/src/components/TimeCardPage/TimeSheet.tsx index 33446c0..dc62763 100644 --- a/apps/frontend/src/components/TimeCardPage/TimeSheet.tsx +++ b/apps/frontend/src/components/TimeCardPage/TimeSheet.tsx @@ -33,7 +33,7 @@ import { TABLE_COLUMNS, CommentType, CommentSchema, -} from "@org/schemas"; +} from "src/shared-schemas"; import { getAllActiveCommentsOfType } from "./utils"; import { Stack } from "react-bootstrap"; import { Divider } from "@aws-amplify/ui-react"; diff --git a/apps/frontend/src/components/TimeCardPage/TimeTable.tsx b/apps/frontend/src/components/TimeCardPage/TimeTable.tsx index 9420cb4..e294ed9 100644 --- a/apps/frontend/src/components/TimeCardPage/TimeTable.tsx +++ b/apps/frontend/src/components/TimeCardPage/TimeTable.tsx @@ -21,7 +21,7 @@ import { TimesheetOperations, TimesheetUpdateRequest, ShiftSchema, -} from "@org/schemas"; +} from "src/shared-schemas"; import { AddIcon, MinusIcon } from "@chakra-ui/icons"; import ApiClient from "../Auth/apiClient"; diff --git a/apps/frontend/src/components/TimeCardPage/TimeTableRow.tsx b/apps/frontend/src/components/TimeCardPage/TimeTableRow.tsx index a377ead..2cfc716 100644 --- a/apps/frontend/src/components/TimeCardPage/TimeTableRow.tsx +++ b/apps/frontend/src/components/TimeCardPage/TimeTableRow.tsx @@ -16,7 +16,7 @@ import { TimesheetOperations, TimesheetUpdateRequest, UpdateRequest, -} from "@org/schemas"; +} from "src/shared-schemas"; import ApiClient from "src/components/Auth/apiClient"; interface RowProps { diff --git a/apps/frontend/src/components/TimeCardPage/UserContext.tsx b/apps/frontend/src/components/TimeCardPage/UserContext.tsx index 06f4bc4..1a2088f 100644 --- a/apps/frontend/src/components/TimeCardPage/UserContext.tsx +++ b/apps/frontend/src/components/TimeCardPage/UserContext.tsx @@ -1,4 +1,4 @@ import { createContext } from "react"; -import { UserSchema } from "@org/schemas"; +import { UserSchema } from "src/shared-schemas"; export const UserContext = createContext(undefined); diff --git a/apps/frontend/src/components/TimeCardPage/utils.tsx b/apps/frontend/src/components/TimeCardPage/utils.tsx index fafc5f8..6e99074 100644 --- a/apps/frontend/src/components/TimeCardPage/utils.tsx +++ b/apps/frontend/src/components/TimeCardPage/utils.tsx @@ -4,7 +4,7 @@ import { CommentSchema, UserSchema, ReportOptions, -} from "@org/schemas"; +} from "src/shared-schemas"; import moment from "moment"; import { UseToastOptions } from "@chakra-ui/react"; diff --git a/apps/frontend/src/src/index.ts b/apps/frontend/src/shared-schemas/index.ts similarity index 100% rename from apps/frontend/src/src/index.ts rename to apps/frontend/src/shared-schemas/index.ts diff --git a/apps/frontend/src/src/lib/CellTypes.ts b/apps/frontend/src/shared-schemas/lib/CellTypes.ts similarity index 100% rename from apps/frontend/src/src/lib/CellTypes.ts rename to apps/frontend/src/shared-schemas/lib/CellTypes.ts diff --git a/apps/frontend/src/src/lib/TimesheetRow.ts b/apps/frontend/src/shared-schemas/lib/TimesheetRow.ts similarity index 100% rename from apps/frontend/src/src/lib/TimesheetRow.ts rename to apps/frontend/src/shared-schemas/lib/TimesheetRow.ts diff --git a/apps/frontend/src/src/lib/UpdateTimesheet.ts b/apps/frontend/src/shared-schemas/lib/UpdateTimesheet.ts similarity index 100% rename from apps/frontend/src/src/lib/UpdateTimesheet.ts rename to apps/frontend/src/shared-schemas/lib/UpdateTimesheet.ts diff --git a/apps/frontend/src/src/lib/UserSchema.ts b/apps/frontend/src/shared-schemas/lib/UserSchema.ts similarity index 100% rename from apps/frontend/src/src/lib/UserSchema.ts rename to apps/frontend/src/shared-schemas/lib/UserSchema.ts diff --git a/apps/frontend/tsconfig.json b/apps/frontend/tsconfig.json index 236427f..6be2f08 100644 --- a/apps/frontend/tsconfig.json +++ b/apps/frontend/tsconfig.json @@ -11,6 +11,7 @@ "sourceMap": true, "outDir": "./dist", "baseUrl": "./", + "rootDir": ".", "incremental": true, "skipLibCheck": true, "strictNullChecks": false, @@ -19,7 +20,7 @@ "forceConsistentCasingInFileNames": false, "noFallthroughCasesInSwitch": false, "paths": { - "@org/schemas": ["src/src/index.ts"] + "@org/schemas": ["src/shared-schemas/index.ts"] } }, // "references": [ From 787e1b35bcc0362bb108cc14b6a1090febd0ddcf Mon Sep 17 00:00:00 2001 From: izzyconner <32255130+izzyconner@users.noreply.github.com> Date: Mon, 15 Apr 2024 18:14:46 -0400 Subject: [PATCH 15/15] Setting up backend with temporary fix for shared schemas --- apps/backend/nest-cli.json | 3 +-- .../src/db/timesheets/FrontendConversions.ts | 2 +- apps/backend/src/db/timesheets/ItemsOperations.ts | 2 +- .../src/db/timesheets/OperationRequestHandler.ts | 2 +- apps/backend/src/{src => shared-schemas}/index.ts | 0 .../src/{src => shared-schemas}/lib/CellTypes.ts | 0 .../src/{src => shared-schemas}/lib/TimesheetRow.ts | 0 .../{src => shared-schemas}/lib/UpdateTimesheet.ts | 0 .../src/{src => shared-schemas}/lib/UserSchema.ts | 0 apps/backend/tsconfig.json | 13 ++++--------- 10 files changed, 8 insertions(+), 14 deletions(-) rename apps/backend/src/{src => shared-schemas}/index.ts (100%) rename apps/backend/src/{src => shared-schemas}/lib/CellTypes.ts (100%) rename apps/backend/src/{src => shared-schemas}/lib/TimesheetRow.ts (100%) rename apps/backend/src/{src => shared-schemas}/lib/UpdateTimesheet.ts (100%) rename apps/backend/src/{src => shared-schemas}/lib/UserSchema.ts (100%) diff --git a/apps/backend/nest-cli.json b/apps/backend/nest-cli.json index 812ce91..f9aa683 100644 --- a/apps/backend/nest-cli.json +++ b/apps/backend/nest-cli.json @@ -4,6 +4,5 @@ "sourceRoot": "src", "compilerOptions": { "deleteOutDir": true - }, - "entryFile": "apps/backend/src/main.js" + } } diff --git a/apps/backend/src/db/timesheets/FrontendConversions.ts b/apps/backend/src/db/timesheets/FrontendConversions.ts index d0c817f..c1a449c 100644 --- a/apps/backend/src/db/timesheets/FrontendConversions.ts +++ b/apps/backend/src/db/timesheets/FrontendConversions.ts @@ -1,5 +1,5 @@ import * as DynamoSchemas from '../dynamoSchemas/DynamoTimesheet' -import {CommentSchema, ReportSchema, ShiftSchema, StatusEntry, TimeEntrySchema, TimeSheetSchema, CellType} from '@org/schemas'; +import {CommentSchema, ReportSchema, ShiftSchema, StatusEntry, TimeEntrySchema, TimeSheetSchema, CellType} from '../../shared-schemas'; /* Mapper from converting from DynamoDB Timesheet schema to the internal backend/frontend model. diff --git a/apps/backend/src/db/timesheets/ItemsOperations.ts b/apps/backend/src/db/timesheets/ItemsOperations.ts index 94105b6..40e41a7 100644 --- a/apps/backend/src/db/timesheets/ItemsOperations.ts +++ b/apps/backend/src/db/timesheets/ItemsOperations.ts @@ -1,4 +1,4 @@ -import {DeleteRequest, InsertRequest, StatusChangeRequest, TimesheetListItems, UpdateRequest, TimeSheetSchema, CommentSchema, ShiftSchema} from '@org/schemas' +import {DeleteRequest, InsertRequest, StatusChangeRequest, TimesheetListItems, UpdateRequest, TimeSheetSchema, CommentSchema, ShiftSchema} from '../../shared-schemas' //Not sure why but only works if imported like this :| const moment = require('moment-timezone'); diff --git a/apps/backend/src/db/timesheets/OperationRequestHandler.ts b/apps/backend/src/db/timesheets/OperationRequestHandler.ts index fbe9674..5274e66 100644 --- a/apps/backend/src/db/timesheets/OperationRequestHandler.ts +++ b/apps/backend/src/db/timesheets/OperationRequestHandler.ts @@ -1,4 +1,4 @@ -import { TimesheetOperations, TimesheetUpdateRequest } from "@org/schemas"; +import { TimesheetOperations, TimesheetUpdateRequest } from "../../shared-schemas"; import {UserTimesheets} from "src/dynamodb" import { ExceptionsHandler } from "@nestjs/core/exceptions/exceptions-handler"; diff --git a/apps/backend/src/src/index.ts b/apps/backend/src/shared-schemas/index.ts similarity index 100% rename from apps/backend/src/src/index.ts rename to apps/backend/src/shared-schemas/index.ts diff --git a/apps/backend/src/src/lib/CellTypes.ts b/apps/backend/src/shared-schemas/lib/CellTypes.ts similarity index 100% rename from apps/backend/src/src/lib/CellTypes.ts rename to apps/backend/src/shared-schemas/lib/CellTypes.ts diff --git a/apps/backend/src/src/lib/TimesheetRow.ts b/apps/backend/src/shared-schemas/lib/TimesheetRow.ts similarity index 100% rename from apps/backend/src/src/lib/TimesheetRow.ts rename to apps/backend/src/shared-schemas/lib/TimesheetRow.ts diff --git a/apps/backend/src/src/lib/UpdateTimesheet.ts b/apps/backend/src/shared-schemas/lib/UpdateTimesheet.ts similarity index 100% rename from apps/backend/src/src/lib/UpdateTimesheet.ts rename to apps/backend/src/shared-schemas/lib/UpdateTimesheet.ts diff --git a/apps/backend/src/src/lib/UserSchema.ts b/apps/backend/src/shared-schemas/lib/UserSchema.ts similarity index 100% rename from apps/backend/src/src/lib/UserSchema.ts rename to apps/backend/src/shared-schemas/lib/UserSchema.ts diff --git a/apps/backend/tsconfig.json b/apps/backend/tsconfig.json index ad78022..38e7d02 100644 --- a/apps/backend/tsconfig.json +++ b/apps/backend/tsconfig.json @@ -10,9 +10,9 @@ "sourceMap": true, "outDir": "./dist", "baseUrl": "./", - "paths": { - "@org/schemas": ["src/src/index.ts"] - }, + // "paths": { + // "@org/schemas": ["src/shared-schemas/index.ts"] + // }, "incremental": true, "skipLibCheck": true, "strictNullChecks": false, @@ -20,10 +20,5 @@ "strictBindCallApply": false, "forceConsistentCasingInFileNames": false, "noFallthroughCasesInSwitch": false - }, - "references": [ - { - "path": "../../libs/shared/schemas/" - } - ] + } }