From 75019d65f734f6c490301b67f4bc559980914b4d Mon Sep 17 00:00:00 2001 From: TechQuery Date: Tue, 17 Oct 2023 05:06:18 +0800 Subject: [PATCH] [add] support saving All files of a BI Data Table [fix] some detail bugs [optimize] update Upstream packages --- ReadMe.md | 4 +- docker-compose.yml | 4 + package.json | 11 +- pnpm-lock.yaml | 466 ++++++++++++++++++-------------------- src/controller/Crawler.ts | 64 ++++-- src/index.ts | 4 +- src/model/Base.ts | 8 +- src/model/Crawler.ts | 9 +- type/.npmrc | 1 + type/package.json | 7 +- 10 files changed, 296 insertions(+), 282 deletions(-) create mode 100644 type/.npmrc diff --git a/ReadMe.md b/ReadMe.md index be86695..0938fda 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -26,7 +26,7 @@ #### Sign in GitHub packages with NPM 1. Generate a [PAT][10] with `read:packages` authorization -2. Run Sign-in command in your terminal: +2. Run Sign-in command in your terminal, and use PAT as password: ```shell npm login --scope=@kaiyuanshe --registry=https://npm.pkg.github.com @@ -37,7 +37,7 @@ npm login --scope=@kaiyuanshe --registry=https://npm.pkg.github.com ```shell npm i pnpm -g -pnpm i @kaiyuanshe/kys-service +pnpm i @kaiyuanshe/kys-service -D ``` ## Environment variables diff --git a/docker-compose.yml b/docker-compose.yml index 8a16fa7..36e9ad1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,4 +26,8 @@ services: - 443:443 networks: - kaiyuanshe + deploy: + restart_policy: + condition: on-failure + max_attempts: 3 command: caddy reverse-proxy --from service.kaiyuanshe.cn --to kys-service:8080 diff --git a/package.json b/package.json index e484174..bfda93f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kys-service", - "version": "0.6.4", + "version": "0.6.5", "license": "AGPL-3.0", "author": "shiy2008@gmail.com", "description": "RESTful API service of KaiYuanShe", @@ -20,13 +20,14 @@ "class-validator": "^0.14.0", "dotenv": "^16.3.1", "file-type": "^16.5.4", + "iterator-helpers-polyfill": "^2.3.2", "jsonwebtoken": "^9.0.2", "koa": "^2.14.2", "koa-bodyparser": "^4.4.1", "koa-jwt": "^4.0.4", "koa-logger": "^3.2.1", "koa-multer": "^1.0.2", - "koa-router": "^12.0.0", + "koa-router": "^12.0.1", "koa2-swagger-ui": "^5.9.1", "koagger": "^0.3.0", "koajax": "^0.9.4", @@ -41,7 +42,7 @@ "sqlite3": "^5.1.6", "tslib": "^2.6.2", "typeorm": "^0.3.17", - "web-fetch": "^1.3.2" + "web-fetch": "^1.3.3" }, "devDependencies": { "@types/jsonwebtoken": "^9.0.3", @@ -49,10 +50,10 @@ "@types/koa-bodyparser": "^4.3.10", "@types/koa-logger": "^3.1.3", "@types/koa-router": "^7.4.5", - "@types/node": "^18.18.1", + "@types/node": "^18.18.5", "get-git-folder": "^0.1.2", "husky": "^8.0.3", - "lint-staged": "^14.0.1", + "lint-staged": "^15.0.1", "prettier": "^3.0.3", "ts-node-dev": "^2.0.0", "typescript": "~5.2.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5a0b75c..4f56413 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,6 +23,9 @@ dependencies: file-type: specifier: ^16.5.4 version: 16.5.4 + iterator-helpers-polyfill: + specifier: ^2.3.2 + version: 2.3.2 jsonwebtoken: specifier: ^9.0.2 version: 9.0.2 @@ -42,8 +45,8 @@ dependencies: specifier: ^1.0.2 version: 1.0.2 koa-router: - specifier: ^12.0.0 - version: 12.0.0 + specifier: ^12.0.1 + version: 12.0.1 koa2-swagger-ui: specifier: ^5.9.1 version: 5.9.1 @@ -87,8 +90,8 @@ dependencies: specifier: ^0.3.17 version: 0.3.17(pg@8.11.3)(sqlite3@5.1.6) web-fetch: - specifier: ^1.3.2 - version: 1.3.2(@types/node@18.18.1)(typescript@5.2.2) + specifier: ^1.3.3 + version: 1.3.3(@types/node@18.18.5) devDependencies: '@types/jsonwebtoken': @@ -107,23 +110,23 @@ devDependencies: specifier: ^7.4.5 version: 7.4.5 '@types/node': - specifier: ^18.18.1 - version: 18.18.1 + specifier: ^18.18.5 + version: 18.18.5 get-git-folder: specifier: ^0.1.2 - version: 0.1.2(@types/node@18.18.1) + version: 0.1.2(@types/node@18.18.5) husky: specifier: ^8.0.3 version: 8.0.3 lint-staged: - specifier: ^14.0.1 - version: 14.0.1 + specifier: ^15.0.1 + version: 15.0.1 prettier: specifier: ^3.0.3 version: 3.0.3 ts-node-dev: specifier: ^2.0.0 - version: 2.0.0(@types/node@18.18.1)(typescript@5.2.2) + version: 2.0.0(@types/node@18.18.5)(typescript@5.2.2) typescript: specifier: ~5.2.2 version: 5.2.2 @@ -137,8 +140,8 @@ packages: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.19 - /@apidevtools/json-schema-ref-parser@10.1.0: - resolution: {integrity: sha512-3e+viyMuXdrcK8v5pvP+SDoAQ77FH6OyRmuK48SZKmdHJRFm87RsSs8qm6kP39a/pOPURByJw+OXzQIqcfmKtA==} + /@apidevtools/json-schema-ref-parser@11.1.0: + resolution: {integrity: sha512-g/VW9ZQEFJAOwAyUb8JFf7MLiLy2uEB4rU270rGzDwICxnxMlPy0O11KVePSgS36K1NI29gSlK84n5INGhd4Ag==} engines: {node: '>= 16'} dependencies: '@jsdevtools/ono': 7.1.3 @@ -249,23 +252,23 @@ packages: '@babel/highlight': 7.22.20 chalk: 2.4.2 - /@babel/compat-data@7.22.20: - resolution: {integrity: sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw==} + /@babel/compat-data@7.23.2: + resolution: {integrity: sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==} engines: {node: '>=6.9.0'} - /@babel/core@7.23.0: - resolution: {integrity: sha512-97z/ju/Jy1rZmDxybphrBuI+jtJjFVoz7Mr9yUQVVVi+DNZE333uFQeMOqcCIy1x3WYBIbWftUSLmbNXNT7qFQ==} + /@babel/core@7.23.2: + resolution: {integrity: sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.1 '@babel/code-frame': 7.22.13 '@babel/generator': 7.23.0 '@babel/helper-compilation-targets': 7.22.15 - '@babel/helper-module-transforms': 7.23.0(@babel/core@7.23.0) - '@babel/helpers': 7.23.1 + '@babel/helper-module-transforms': 7.23.0(@babel/core@7.23.2) + '@babel/helpers': 7.23.2 '@babel/parser': 7.23.0 '@babel/template': 7.22.15 - '@babel/traverse': 7.23.0 + '@babel/traverse': 7.23.2 '@babel/types': 7.23.0 convert-source-map: 2.0.0 debug: 4.3.4 @@ -288,7 +291,7 @@ packages: resolution: {integrity: sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/compat-data': 7.22.20 + '@babel/compat-data': 7.23.2 '@babel/helper-validator-option': 7.22.15 browserslist: 4.22.1 lru-cache: 5.1.1 @@ -317,13 +320,13 @@ packages: dependencies: '@babel/types': 7.23.0 - /@babel/helper-module-transforms@7.23.0(@babel/core@7.23.0): + /@babel/helper-module-transforms@7.23.0(@babel/core@7.23.2): resolution: {integrity: sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.23.0 + '@babel/core': 7.23.2 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-module-imports': 7.22.15 '@babel/helper-simple-access': 7.22.5 @@ -361,12 +364,12 @@ packages: resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} engines: {node: '>=6.9.0'} - /@babel/helpers@7.23.1: - resolution: {integrity: sha512-chNpneuK18yW5Oxsr+t553UZzzAs3aZnFm4bxhebsNTeshrC95yA7l5yl7GBAG+JG1rF0F7zzD2EixK9mWSDoA==} + /@babel/helpers@7.23.2: + resolution: {integrity: sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.15 - '@babel/traverse': 7.23.0 + '@babel/traverse': 7.23.2 '@babel/types': 7.23.0 transitivePeerDependencies: - supports-color @@ -386,7 +389,7 @@ packages: dependencies: '@babel/types': 7.23.0 - /@babel/plugin-proposal-export-namespace-from@7.18.9(@babel/core@7.23.0): + /@babel/plugin-proposal-export-namespace-from@7.18.9(@babel/core@7.23.2): resolution: {integrity: sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==} engines: {node: '>=6.9.0'} deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead. @@ -394,39 +397,39 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.23.0 + '@babel/core': 7.23.2 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.23.0) + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.23.2) dev: false optional: true - /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.23.0): + /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.23.2): resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==} requiresBuild: true peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.23.0 + '@babel/core': 7.23.2 '@babel/helper-plugin-utils': 7.22.5 dev: false optional: true - /@babel/plugin-transform-modules-commonjs@7.23.0(@babel/core@7.23.0): + /@babel/plugin-transform-modules-commonjs@7.23.0(@babel/core@7.23.2): resolution: {integrity: sha512-32Xzss14/UVc7k9g775yMIvkVK8xwKE0DPdP5JTapr3+Z9w4tzeOuLNY6BXDQR6BdnzIlXnCGAzsk/ICHBLVWQ==} engines: {node: '>=6.9.0'} requiresBuild: true peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.23.0 - '@babel/helper-module-transforms': 7.23.0(@babel/core@7.23.0) + '@babel/core': 7.23.2 + '@babel/helper-module-transforms': 7.23.0(@babel/core@7.23.2) '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-simple-access': 7.22.5 dev: false optional: true - /@babel/runtime@7.23.1: - resolution: {integrity: sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g==} + /@babel/runtime@7.23.2: + resolution: {integrity: sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.0 @@ -440,8 +443,8 @@ packages: '@babel/parser': 7.23.0 '@babel/types': 7.23.0 - /@babel/traverse@7.23.0: - resolution: {integrity: sha512-t/QaEvyIoIkwzpiZ7aoSKK8kObQYeF7T2v+dazAYCb8SXtp58zEVkWW7zAnju8FNKNdr4ScAOEDmMItbyOmEYw==} + /@babel/traverse@7.23.2: + resolution: {integrity: sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.22.13 @@ -547,15 +550,18 @@ packages: dev: false optional: true - /@koa/router@12.0.0: - resolution: {integrity: sha512-cnnxeKHXlt7XARJptflGURdJaO+ITpNkOHmQu7NHmCoRinPbyvFzce/EG/E8Zy81yQ1W9MoSdtklc3nyaDReUw==} + /@koa/router@12.0.1: + resolution: {integrity: sha512-ribfPYfHb+Uw3b27Eiw6NPqjhIhTpVFzEWLwyc/1Xp+DCdwRRyIlAUODX+9bPARF6aQtUu1+/PHzdNvRzcs/+Q==} engines: {node: '>= 12'} requiresBuild: true dependencies: + debug: 4.3.4 http-errors: 2.0.0 koa-compose: 4.1.0 methods: 1.1.2 path-to-regexp: 6.2.1 + transitivePeerDependencies: + - supports-color dev: false optional: true @@ -630,22 +636,16 @@ packages: dev: false optional: true - /@puppeteer/browsers@1.4.6(typescript@5.2.2): - resolution: {integrity: sha512-x4BEjr2SjOPowNeiguzjozQbsc6h437ovD/wu+JpaenxVLm3jkgzHY2xOslMTp50HoTvQreMjiexiGQw1sqZlQ==} + /@puppeteer/browsers@1.7.1: + resolution: {integrity: sha512-nIb8SOBgDEMFY2iS2MdnUZOg2ikcYchRrBoF+wtdjieRFKR2uGRipHY/oFLo+2N6anDualyClPzGywTHRGrLfw==} engines: {node: '>=16.3.0'} hasBin: true - peerDependencies: - typescript: '>= 4.7.4' - peerDependenciesMeta: - typescript: - optional: true dependencies: debug: 4.3.4 extract-zip: 2.0.1 progress: 2.0.3 - proxy-agent: 6.3.0 + proxy-agent: 6.3.1 tar-fs: 3.0.4 - typescript: 5.2.2 unbzip2-stream: 1.4.3 yargs: 17.7.1 transitivePeerDependencies: @@ -656,34 +656,21 @@ packages: resolution: {integrity: sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw==} dev: false - /@swc/helpers@0.4.14: - resolution: {integrity: sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==} + /@swc/helpers@0.5.3: + resolution: {integrity: sha512-FaruWX6KdudYloq1AHD/4nU+UsMTdNE8CKyrseXWEcgjDAbvkwJg2QGPAnfIJLIWsjZOSPLOAykK6fuYp4vp4A==} dependencies: tslib: 2.6.2 dev: false - /@swc/helpers@0.4.36: - resolution: {integrity: sha512-5lxnyLEYFskErRPenYItLRSge5DjrJngYKdVjRSrWfza9G6KkgHEXi0vUZiyUeMU5JfXH1YnvXZzSp8ul88o2Q==} - dependencies: - legacy-swc-helpers: /@swc/helpers@0.4.14 - tslib: 2.6.2 - dev: false - - /@swc/helpers@0.5.2: - resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==} - dependencies: - tslib: 2.6.2 - dev: false - - /@tech_query/node-toolkit@1.2.1(@types/node@18.18.1): + /@tech_query/node-toolkit@1.2.1(@types/node@18.18.5): resolution: {integrity: sha512-XFw0EVc8LCcC+CNo+lCxi+5iiPzQyubz41rP4iNuMueN+kjn/KMliaHKLZ5kAnCi+HxmuJPmzrSi6vZtuP07Hg==} peerDependencies: '@babel/plugin-transform-modules-commonjs': ^7.0.0 '@babel/preset-env': ^7.0.0 '@types/node': '>=18' dependencies: - '@babel/core': 7.23.0 - '@types/node': 18.18.1 + '@babel/core': 7.23.2 + '@types/node': 18.18.5 cross-spawn: 7.0.3 file-type: 16.5.4 fs-extra: 11.1.1 @@ -692,7 +679,7 @@ packages: prettier: 2.8.8 prismjs: 1.29.0 uglify-js: 3.17.4 - yaml: 2.3.2 + yaml: 2.3.3 transitivePeerDependencies: - supports-color @@ -734,18 +721,18 @@ packages: /@types/accepts@1.3.5: resolution: {integrity: sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==} dependencies: - '@types/node': 18.18.1 + '@types/node': 18.18.5 /@types/body-parser@1.19.3: resolution: {integrity: sha512-oyl4jvAfTGX9Bt6Or4H9ni1Z447/tQuxnZsytsCaExKlmJiU8sFgnIBRzJUpKwB5eWn9HuBYlUlVA74q/yN0eQ==} dependencies: '@types/connect': 3.4.36 - '@types/node': 18.18.1 + '@types/node': 18.18.5 /@types/connect@3.4.36: resolution: {integrity: sha512-P63Zd/JUGq+PdrM1lv0Wv5SBYeA2+CORvbrXbngriYY0jzLUWfQMQQxOhjONEz/wlHOAxOdY7CY65rgQdTjq2w==} dependencies: - '@types/node': 18.18.1 + '@types/node': 18.18.5 /@types/content-disposition@0.5.6: resolution: {integrity: sha512-GmShTb4qA9+HMPPaV2+Up8tJafgi38geFi7vL4qAM7k8BwjoelgHZqEUKJZLvughUw22h6vD/wvwN4IUCaWpDA==} @@ -754,20 +741,20 @@ packages: resolution: {integrity: sha512-y6KhF1GtsLERUpqOV+qZJrjUGzc0GE6UTa0b5Z/LZ7Nm2mKSdCXmS6Kdnl7fctPNnMSouHjxqEWI12/YqQfk5w==} dependencies: '@types/connect': 3.4.36 - '@types/express': 4.17.18 + '@types/express': 4.17.19 '@types/keygrip': 1.0.3 - '@types/node': 18.18.1 + '@types/node': 18.18.5 /@types/express-serve-static-core@4.17.37: resolution: {integrity: sha512-ZohaCYTgGFcOP7u6aJOhY9uIZQgZ2vxC2yWoArY+FeDXlqeH66ZVBjgvg+RLVAS/DWNq4Ap9ZXu1+SUQiiWYMg==} dependencies: - '@types/node': 18.18.1 + '@types/node': 18.18.5 '@types/qs': 6.9.8 '@types/range-parser': 1.2.5 '@types/send': 0.17.2 - /@types/express@4.17.18: - resolution: {integrity: sha512-Sxv8BSLLgsBYmcnGdGjjEjqET2U+AKAdCRODmMiq02FgjwuV75Ut85DRpvFjyw/Mk0vgUOliGRU0UUmuuZHByQ==} + /@types/express@4.17.19: + resolution: {integrity: sha512-UtOfBtzN9OvpZPPbnnYunfjM7XCI4jyk1NvnFhTVz5krYAnW4o5DCoIekvms+8ApqhB4+9wSge1kBijdfTSmfg==} dependencies: '@types/body-parser': 1.19.3 '@types/express-serve-static-core': 4.17.37 @@ -778,7 +765,7 @@ packages: resolution: {integrity: sha512-c0hrgAOVYr21EX8J0jBMXGLMgJqVf/v6yxi0dLaJboW9aQPh16Id+z6w2Tx1hm+piJOLv8xPfVKZCLfjPw/IMQ==} dependencies: '@types/jsonfile': 6.1.2 - '@types/node': 18.18.1 + '@types/node': 18.18.5 dev: true /@types/http-assert@1.5.3: @@ -790,7 +777,7 @@ packages: /@types/jsdom@21.1.3: resolution: {integrity: sha512-1zzqSP+iHJYV4lB3lZhNBa012pubABkj9yG/GuXuf6LZH1cSPIJBqFDrm5JX65HHt6VOnNYdTui/0ySerRbMgA==} dependencies: - '@types/node': 18.18.1 + '@types/node': 18.18.5 '@types/tough-cookie': 4.0.3 parse5: 7.1.2 dev: false @@ -802,13 +789,13 @@ packages: /@types/jsonfile@6.1.2: resolution: {integrity: sha512-8t92P+oeW4d/CRQfJaSqEwXujrhH4OEeHRjGU3v1Q8mUS8GPF3yiX26sw4svv6faL2HfBtGTe2xWIoVgN3dy9w==} dependencies: - '@types/node': 18.18.1 + '@types/node': 18.18.5 dev: true /@types/jsonwebtoken@9.0.3: resolution: {integrity: sha512-b0jGiOgHtZ2jqdPgPnP6WLCXZk1T8p06A/vPGzUvxpFGgKMbjXJDjC5m52ErqBnIuWZFgGoIJyRdeG5AyreJjA==} dependencies: - '@types/node': 18.18.1 + '@types/node': 18.18.5 dev: true /@types/keygrip@1.0.3: @@ -847,7 +834,7 @@ packages: '@types/http-errors': 2.0.2 '@types/keygrip': 1.0.3 '@types/koa-compose': 3.2.6 - '@types/node': 18.18.1 + '@types/node': 18.18.5 /@types/lodash.clonedeep@4.5.7: resolution: {integrity: sha512-ccNqkPptFIXrpVqUECi60/DFxjNKsfoQxSQsgcBJCX/fuX1wgyQieojkcWH/KpE3xzLoWN/2k+ZeGqIN3paSvw==} @@ -872,12 +859,12 @@ packages: /@types/node-fetch@2.6.6: resolution: {integrity: sha512-95X8guJYhfqiuVVhRFxVQcf4hW/2bCuoPwDasMf/531STFoNoWTT7YDnWdXHEZKqAGUigmpG31r2FE70LwnzJw==} dependencies: - '@types/node': 18.18.1 + '@types/node': 18.18.5 form-data: 4.0.0 dev: false - /@types/node@18.18.1: - resolution: {integrity: sha512-3G42sxmm0fF2+Vtb9TJQpnjmP+uKlWvFa8KoEGquh4gqRmoUG/N0ufuhikw6HEsdG2G2oIKhog1GCTfz9v5NdQ==} + /@types/node@18.18.5: + resolution: {integrity: sha512-4slmbtwV59ZxitY4ixUZdy1uRLf9eSIvBWPQxNjhHYWEtn0FryfKpyS2cvADYXTayWdKEIsJengncrVvkI4I6A==} /@types/normalize-package-data@2.4.2: resolution: {integrity: sha512-lqa4UEhhv/2sjjIQgjX8B+RBjj47eo0mzGasklVJ78UKGQY1r0VpB9XHDaZZO9qzEFDdy4MrXLuEaSmPrPSe/A==} @@ -897,14 +884,14 @@ packages: resolution: {integrity: sha512-aAG6yRf6r0wQ29bkS+x97BIs64ZLxeE/ARwyS6wrldMm3C1MdKwCcnnEwMC1slI8wuxJOpiUH9MioC0A0i+GJw==} dependencies: '@types/mime': 1.3.3 - '@types/node': 18.18.1 + '@types/node': 18.18.5 /@types/serve-static@1.15.3: resolution: {integrity: sha512-yVRvFsEMrv7s0lGhzrggJjNOSmZCdgCjw9xWrPr/kNNLp6FaDfMC1KaYl3TSJ0c58bECwNBMoQrZJ8hA8E1eFg==} dependencies: '@types/http-errors': 2.0.2 '@types/mime': 3.0.2 - '@types/node': 18.18.1 + '@types/node': 18.18.5 /@types/strip-bom@3.0.0: resolution: {integrity: sha512-xevGOReSYGM7g/kUBZzPqCrR/KYAo+F0yiPc85WFTJa0MSLtyFTVTU6cJu/aV4mid7IffDIWqo69THF2o4JiEQ==} @@ -921,11 +908,11 @@ packages: /@types/tunnel@0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 18.18.1 + '@types/node': 18.18.5 dev: false - /@types/validator@13.11.2: - resolution: {integrity: sha512-nIKVVQKT6kGKysnNt+xLobr+pFJNssJRi2s034wgWeFBUx01fI8BeHTW2TcRp7VcFu9QCYG8IlChTuovcm0oKQ==} + /@types/validator@13.11.3: + resolution: {integrity: sha512-jxjhh33aTYDHnrV1vZ3AvWQHfrGx2f5UxKjaP13l5q04fG+/hCKKm0MfodIoCqxevhbcfBb6ZjynyHuQ/jueGQ==} dev: false /@types/which@3.0.0: @@ -936,7 +923,7 @@ packages: resolution: {integrity: sha512-CHzgNU3qYBnp/O4S3yv2tXPlvMTq0YWSTVg2/JYLqWZGHwwgJGAwd00poay/11asPq8wLFwHzubyInqHIFmmiw==} requiresBuild: true dependencies: - '@types/node': 18.18.1 + '@types/node': 18.18.5 dev: false optional: true @@ -957,21 +944,16 @@ packages: negotiator: 0.6.3 dev: false - /acorn-globals@7.0.1: - resolution: {integrity: sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==} - dependencies: - acorn: 8.10.0 - acorn-walk: 8.2.0 - dev: false - /acorn-walk@8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} + dev: true /acorn@8.10.0: resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} engines: {node: '>=0.4.0'} hasBin: true + dev: true /agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} @@ -1232,8 +1214,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001541 - electron-to-chromium: 1.4.537 + caniuse-lite: 1.0.30001549 + electron-to-chromium: 1.4.555 node-releases: 2.0.13 update-browserslist-db: 1.0.13(browserslist@4.22.1) @@ -1328,12 +1310,12 @@ packages: /call-bind@1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: - function-bind: 1.1.1 + function-bind: 1.1.2 get-intrinsic: 1.2.1 dev: false - /caniuse-lite@1.0.30001541: - resolution: {integrity: sha512-bLOsqxDgTqUBkzxbNlSBt8annkDpQB9NdzdTbO2ooJ+eC/IQcvDspDc058g84ejCelF7vHUx57KIOjEecOHXaw==} + /caniuse-lite@1.0.30001549: + resolution: {integrity: sha512-qRp48dPYSCYaP+KurZLhDYdVE+yEyht/3NlmcJgVQ2VMGt6JL36ndQ/7rgspdZsJuxDPFIo/OzBT2+GmIJ53BA==} /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} @@ -1376,13 +1358,14 @@ packages: engines: {node: '>=10'} dev: false - /chromium-bidi@0.4.16(devtools-protocol@0.0.1147663): - resolution: {integrity: sha512-7ZbXdWERxRxSwo3txsBjjmc/NLxqb1Bk30mRb0BMS4YIaiV6zvKZqL/UAH+DdqcDYayDWk2n/y8klkBDODrPvA==} + /chromium-bidi@0.4.31(devtools-protocol@0.0.1179426): + resolution: {integrity: sha512-OtvEg2JMRQrHsmLx4FV3u1Hf9waYxB5PmL+yM0HkFpc9H2x3TMbUqS+GP2/fC4399hzOO+EQF8uVU43By9ILag==} peerDependencies: devtools-protocol: '*' dependencies: - devtools-protocol: 0.0.1147663 - mitt: 3.0.0 + devtools-protocol: 0.0.1179426 + mitt: 3.0.1 + urlpattern-polyfill: 9.0.0 dev: false /class-transformer@0.5.1: @@ -1407,8 +1390,8 @@ packages: /class-validator@0.14.0: resolution: {integrity: sha512-ct3ltplN8I9fOwUd8GrP8UQixwff129BkEtuWDKL5W45cQuLd19xqmTLu5ge78YDm/fdje6FMt0hGOhl0lii3A==} dependencies: - '@types/validator': 13.11.2 - libphonenumber-js: 1.10.45 + '@types/validator': 13.11.3 + libphonenumber-js: 1.10.48 validator: 13.11.0 dev: false @@ -1465,7 +1448,7 @@ packages: /co-body@6.1.0: resolution: {integrity: sha512-m7pOT6CdLN7FuXUcpuz/8lfQ/L77x8SchHCF4G0RBTJO20Wzmhn5Sp4/5WsKy8OSpifBSUrmg83qEqaDHdyFuQ==} dependencies: - inflation: 2.0.0 + inflation: 2.1.0 qs: 6.11.2 raw-body: 2.5.2 type-is: 1.6.18 @@ -1511,10 +1494,10 @@ packages: delayed-stream: 1.0.0 dev: false - /commander-jsx@0.6.9(@types/node@18.18.1): + /commander-jsx@0.6.9(@types/node@18.18.5): resolution: {integrity: sha512-E/wSYQhT7kgqd98WW8sdRiM+3i+J9Z30NOBTCdfD88p2k/po4+JEzikqOECKA1OouTqnAuIgdg5aKGbjq5B0jg==} dependencies: - '@tech_query/node-toolkit': 1.2.1(@types/node@18.18.1) + '@tech_query/node-toolkit': 1.2.1(@types/node@18.18.5) tslib: 2.6.2 transitivePeerDependencies: - '@babel/plugin-transform-modules-commonjs' @@ -1522,8 +1505,8 @@ packages: - '@types/node' - supports-color - /commander@11.0.0: - resolution: {integrity: sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==} + /commander@11.1.0: + resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} engines: {node: '>=16'} dev: true @@ -1625,8 +1608,8 @@ packages: engines: {node: '>= 12'} dev: true - /data-uri-to-buffer@5.0.1: - resolution: {integrity: sha512-a9l6T1qqDogvvnw0nKlfZzqsyikEBZBClF39V3TFoKhDtGBqHu2HkuomJc02j5zft8zrUaXEuoicLeW54RkzPg==} + /data-uri-to-buffer@6.0.1: + resolution: {integrity: sha512-MZd3VlchQkp8rdend6vrx7MmVDJzSNTBvghvKjirLkD+WTChA3KUf0jkE68Q4UyctNqI11zZO9/x2Yx+ub5Cvg==} engines: {node: '>= 14'} dev: false @@ -1643,7 +1626,7 @@ packages: resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} engines: {node: '>=0.11'} dependencies: - '@babel/runtime': 7.23.1 + '@babel/runtime': 7.23.2 dev: false /debug@2.6.9: @@ -1720,8 +1703,8 @@ packages: engines: {node: '>=8'} dev: false - /devtools-protocol@0.0.1147663: - resolution: {integrity: sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==} + /devtools-protocol@0.0.1179426: + resolution: {integrity: sha512-KKC7IGwdOr7u9kTGgjUvGTov/z1s2H7oHi3zKCdR9eSDyCPia5CBi4aRhtp7d8uR7l0GS5UTDw3TjKGu5CqINg==} dev: false /dicer@0.2.5: @@ -1783,8 +1766,8 @@ packages: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: false - /electron-to-chromium@1.4.537: - resolution: {integrity: sha512-W1+g9qs9hviII0HAwOdehGYkr+zt7KKdmCcJcjH0mYg6oL8+ioT3Skjmt7BLoAQqXhjf40AXd+HlR4oAWMlXjA==} + /electron-to-chromium@1.4.555: + resolution: {integrity: sha512-k1wGC7UXDTyCWcONkEMRG/w6Jvrxi+SVEU+IeqUKUKjv2lGJ1b+jf1mqrloyxVTG5WYYjNQ+F6+Cb1fGrLvNcA==} /element-internals-polyfill@1.3.8: resolution: {integrity: sha512-nymTA/NftVOlS6UjLCL8lKUm8MEgt6TXntQqGGKt+er4dzS9eU88zaGUHLTYVgdfifQ8JQFGbQERMvxse5GMrA==} @@ -1908,18 +1891,18 @@ packages: engines: {node: '>=0.8.x'} dev: false - /execa@7.2.0: - resolution: {integrity: sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==} - engines: {node: ^14.18.0 || ^16.14.0 || >=18.0.0} + /execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} dependencies: cross-spawn: 7.0.3 - get-stream: 6.0.1 - human-signals: 4.3.1 + get-stream: 8.0.1 + human-signals: 5.0.0 is-stream: 3.0.0 merge-stream: 2.0.0 npm-run-path: 5.1.0 onetime: 6.0.0 - signal-exit: 3.0.7 + signal-exit: 4.1.0 strip-final-newline: 3.0.0 dev: true @@ -2079,9 +2062,9 @@ packages: resolution: {integrity: sha512-EZtb7wPXZS54GaGxaWxMlhd1DUDCnAg5srlYdu/1ZVeW+7wwR3Tp59nu52dXByFs3MBRq+SByx1wDOJpRvLEXw==} requiresBuild: true dependencies: - '@babel/core': 7.23.0 - '@babel/plugin-proposal-export-namespace-from': 7.18.9(@babel/core@7.23.0) - '@babel/plugin-transform-modules-commonjs': 7.23.0(@babel/core@7.23.0) + '@babel/core': 7.23.2 + '@babel/plugin-proposal-export-namespace-from': 7.18.9(@babel/core@7.23.2) + '@babel/plugin-transform-modules-commonjs': 7.23.0(@babel/core@7.23.2) transitivePeerDependencies: - supports-color dev: false @@ -2144,11 +2127,11 @@ packages: universalify: 0.1.2 dev: false - /fs-match@1.7.1(@types/node@18.18.1): + /fs-match@1.7.1(@types/node@18.18.5): resolution: {integrity: sha512-8tb7tQsSoHpGJJscGdrdi983tRr6HZMB7i4dTPHGgL8XoRfIVnQiTq/xvSTeW3bHAfHEF/Uhe4z683Ym+ACMnA==} hasBin: true dependencies: - commander-jsx: 0.6.9(@types/node@18.18.1) + commander-jsx: 0.6.9(@types/node@18.18.5) fs-extra: 11.1.1 tslib: 2.6.2 transitivePeerDependencies: @@ -2176,8 +2159,9 @@ packages: dev: true optional: true - /function-bind@1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + /function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + dev: false /fx@30.2.0: resolution: {integrity: sha512-rIYQBmx85Jfhd3pkSw06YPgvSvfTi022ZXTeFDkcCZGCs5nt3sjqFBGtcMFe1TR2S00RDz63be0ab5mhCiOLBw==} @@ -2224,11 +2208,11 @@ packages: engines: {node: 6.* || 8.* || >= 10.*} dev: false - /get-git-folder@0.1.2(@types/node@18.18.1): + /get-git-folder@0.1.2(@types/node@18.18.5): resolution: {integrity: sha512-LYf1bS5g3PH71uGLVe3jR2jZm2DbJjoQk7w99WAR7fsdzqEuzGUGqFiVszTHTUXGp+N0gT+kLKhy9isUhM5a2Q==} hasBin: true dependencies: - commander-jsx: 0.6.9(@types/node@18.18.1) + commander-jsx: 0.6.9(@types/node@18.18.5) zx: 7.2.3 transitivePeerDependencies: - '@babel/plugin-transform-modules-commonjs' @@ -2240,8 +2224,8 @@ packages: /get-intrinsic@1.2.1: resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} dependencies: - function-bind: 1.1.1 - has: 1.0.3 + function-bind: 1.1.2 + has: 1.0.4 has-proto: 1.0.1 has-symbols: 1.0.3 dev: false @@ -2253,17 +2237,17 @@ packages: pump: 3.0.0 dev: false - /get-stream@6.0.1: - resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} - engines: {node: '>=10'} + /get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} dev: true - /get-uri@6.0.1: - resolution: {integrity: sha512-7ZqONUVqaabogsYNWlYj0t3YZaL6dhuEueZXGF+/YVmf6dHmaFg8/6psJKqhx9QykIDKzpGcy2cn4oV4YC7V/Q==} + /get-uri@6.0.2: + resolution: {integrity: sha512-5KLucCJobh8vBY1K07EFV4+cPZH3mrV9YeAruUseCQKHB58SGjjT2l9/eA9LD082IiuMjSlFJEcdJ27TXvbZNw==} engines: {node: '>= 14'} dependencies: basic-ftp: 5.0.3 - data-uri-to-buffer: 5.0.1 + data-uri-to-buffer: 6.0.1 debug: 4.3.4 fs-extra: 8.1.0 transitivePeerDependencies: @@ -2371,11 +2355,9 @@ packages: resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} dev: false - /has@1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + /has@1.0.4: + resolution: {integrity: sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==} engines: {node: '>= 0.4.0'} - dependencies: - function-bind: 1.1.1 /highlight.js@10.7.3: resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} @@ -2482,9 +2464,9 @@ packages: - supports-color dev: false - /human-signals@4.3.1: - resolution: {integrity: sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==} - engines: {node: '>=14.18.0'} + /human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} dev: true /humanize-ms@1.2.1: @@ -2545,8 +2527,8 @@ packages: dev: false optional: true - /inflation@2.0.0: - resolution: {integrity: sha512-m3xv4hJYR2oXw4o4Y5l6P5P16WYmazYof+el6Al3f+YlggGj6qT9kImBAnzDelRALnP5d3h4jGBPKzYCizjZZw==} + /inflation@2.1.0: + resolution: {integrity: sha512-t54PPJHG1Pp7VQvxyVCJ9mBbjG3Hqryges9bXoOO6GExCPa+//i/d5GSuFtpx3ALLd7lgIAur6zrIlBQyJuMlQ==} engines: {node: '>= 0.8.0'} dev: false @@ -2589,7 +2571,7 @@ packages: /is-core-module@2.13.0: resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} dependencies: - has: 1.0.3 + has: 1.0.4 /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} @@ -2651,10 +2633,15 @@ packages: /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - /iterable-observer@1.0.0: - resolution: {integrity: sha512-DV9Cuh50EKRQ87V1L92E8R/rrEeowO78a86VDzvG350khRhjNAvkQMLxZ/02MOvoJeMl7NqU0Y4Y9z6xLOjS7g==} + /iterable-observer@1.0.1: + resolution: {integrity: sha512-qy2Kuf1drKVmWgWaRsqdM8EHanAW4xS37j1nFdVP07qiN0Mj4D5sl9dYA8mZJdX/d3De4bhZoFuVWXvcOM1usg==} dependencies: - '@swc/helpers': 0.4.36 + '@swc/helpers': 0.5.3 + dev: false + + /iterator-helpers-polyfill@2.3.2: + resolution: {integrity: sha512-lbZz5wWcqHXYMj+J5e8Wa+8h1s7ZG5xrdgwqKAUC4K++fUgFDCANjsoyQcZMgI6Xf5QvuokpXV24tZ+wVOA03w==} + engines: {chrome: '>=63', firefox: '>=57', node: '>=10.0.0', safari: '>=11'} dev: false /jackspeak@2.3.6: @@ -2676,9 +2663,9 @@ packages: argparse: 2.0.1 dev: false - /jsdom@21.1.2: - resolution: {integrity: sha512-sCpFmK2jv+1sjff4u7fzft+pUh2KSUbUrEHYHyfSIbGTIcmnjyp83qg6qLwdJ/I3LpTXx33ACxeRL7Lsyc6lGQ==} - engines: {node: '>=14'} + /jsdom@22.1.0: + resolution: {integrity: sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==} + engines: {node: '>=16'} peerDependencies: canvas: ^2.5.0 peerDependenciesMeta: @@ -2686,13 +2673,10 @@ packages: optional: true dependencies: abab: 2.0.6 - acorn: 8.10.0 - acorn-globals: 7.0.1 cssstyle: 3.0.0 data-urls: 4.0.0 decimal.js: 10.4.3 domexception: 4.0.0 - escodegen: 2.1.0 form-data: 4.0.0 html-encoding-sniffer: 3.0.0 http-proxy-agent: 5.0.0 @@ -2844,14 +2828,17 @@ packages: multer: 1.3.0 dev: false - /koa-router@12.0.0: - resolution: {integrity: sha512-zGrdiXygGYW8WvrzeGsHZvKnHs4DzyGoqJ9a8iHlRkiwuEAOAPyI27//OlhoWdgFAEIM3qbUgr0KCuRaP/TCag==} + /koa-router@12.0.1: + resolution: {integrity: sha512-gaDdj3GtzoLoeosacd50kBBTnnh3B9AYxDThQUo4sfUyXdOhY6ku1qyZKW88tQCRgc3Sw6ChXYXWZwwgjOxE0w==} engines: {node: '>= 12'} dependencies: + debug: 4.3.4 http-errors: 2.0.0 koa-compose: 4.1.0 methods: 1.1.2 path-to-regexp: 6.2.1 + transitivePeerDependencies: + - supports-color dev: false /koa-unless@1.0.7: @@ -2907,7 +2894,7 @@ packages: koa: 2.14.2 koa-mount: 4.0.0 koa2-swagger-ui: 5.9.1 - openapi-backend: 5.9.2 + openapi-backend: 5.10.5 openapi3-ts: 2.0.2 routing-controllers: 0.10.4(class-transformer@0.5.1)(class-validator@0.14.0) routing-controllers-openapi: 4.0.0(routing-controllers@0.10.4) @@ -2921,16 +2908,16 @@ packages: peerDependencies: jsdom: '>=21' dependencies: - '@swc/helpers': 0.5.2 - iterable-observer: 1.0.0 + '@swc/helpers': 0.5.3 + iterable-observer: 1.0.1 regenerator-runtime: 0.14.0 web-utility: 4.1.3(typescript@5.2.2) transitivePeerDependencies: - typescript dev: false - /libphonenumber-js@1.10.45: - resolution: {integrity: sha512-eeHcvGafEYCaKB4fo2uBINfG7j7PcGwBHUaTVfbwl/6KcjCgIKNlIOsSXVRp9BH10NQwmvvk+nQ1e/Yp4BGB7w==} + /libphonenumber-js@1.10.48: + resolution: {integrity: sha512-Vvcgt4+o8+puIBJZLdMshPYx9nRN3/kTT7HPtOyfYrSQuN9PGBF1KUv0g07fjNzt4E4GuA7FnsLb+WeAMzyRQg==} dev: false /lilconfig@2.1.0: @@ -2942,34 +2929,28 @@ packages: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: false - /lint-staged@14.0.1: - resolution: {integrity: sha512-Mw0cL6HXnHN1ag0mN/Dg4g6sr8uf8sn98w2Oc1ECtFto9tvRF7nkXGJRbx8gPlHyoR0pLyBr2lQHbWwmUHe1Sw==} - engines: {node: ^16.14.0 || >=18.0.0} + /lint-staged@15.0.1: + resolution: {integrity: sha512-2IU5OWmCaxch0X0+IBF4/v7sutpB+F3qoXbro43pYjQTOo5wumckjxoxn47pQBqqBsCWrD5HnI2uG/zJA7isew==} + engines: {node: '>=18.12.0'} hasBin: true dependencies: chalk: 5.3.0 - commander: 11.0.0 + commander: 11.1.0 debug: 4.3.4 - execa: 7.2.0 + execa: 8.0.1 lilconfig: 2.1.0 - listr2: 6.6.1 + listr2: 7.0.1 micromatch: 4.0.5 pidtree: 0.6.0 string-argv: 0.3.2 - yaml: 2.3.1 + yaml: 2.3.2 transitivePeerDependencies: - - enquirer - supports-color dev: true - /listr2@6.6.1: - resolution: {integrity: sha512-+rAXGHh0fkEWdXBmX+L6mmfmXmXvDGEKzkjxO+8mP3+nI/r/CWznVBvsibXdxda9Zz0OW2e2ikphN3OwCT/jSg==} + /listr2@7.0.1: + resolution: {integrity: sha512-nz+7hwgbDp8eWNoDgzdl4hA/xDSLrNRzPu1TLgOYs6l5Y+Ma6zVWWy9Oyt9TQFONwKoSPoka3H50D3vD5EuNwg==} engines: {node: '>=16.0.0'} - peerDependencies: - enquirer: '>= 2.3.0 < 3' - peerDependenciesMeta: - enquirer: - optional: true dependencies: cli-truncate: 3.1.0 colorette: 2.0.20 @@ -3286,8 +3267,8 @@ packages: yallist: 4.0.0 dev: false - /mitt@3.0.0: - resolution: {integrity: sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==} + /mitt@3.0.1: + resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} dev: false /mkdirp-classic@0.5.3: @@ -3317,7 +3298,7 @@ packages: peerDependencies: mobx: '>=4' dependencies: - '@swc/helpers': 0.5.2 + '@swc/helpers': 0.5.3 koajax: 0.9.4(typescript@5.2.2) mobx: 5.15.7 mobx-restful: 0.6.12(mobx@5.15.7)(typescript@5.2.2) @@ -3333,7 +3314,7 @@ packages: peerDependencies: mobx: '>=4' dependencies: - '@swc/helpers': 0.5.2 + '@swc/helpers': 0.5.3 class-validator: 0.14.0 koajax: 0.9.4(typescript@5.2.2) mobx: 5.15.7 @@ -3487,7 +3468,7 @@ packages: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: hosted-git-info: 2.8.9 - resolve: 1.22.6 + resolve: 1.22.8 semver: 5.7.2 validate-npm-package-license: 3.0.4 dev: false @@ -3539,8 +3520,8 @@ packages: engines: {node: '>=0.10.0'} dev: false - /object-inspect@1.12.3: - resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} + /object-inspect@1.13.0: + resolution: {integrity: sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g==} dev: false /on-finished@2.4.1: @@ -3580,11 +3561,11 @@ packages: resolution: {integrity: sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==} dev: false - /openapi-backend@5.9.2: - resolution: {integrity: sha512-x49QIeqwsty0v5BGzjXsEnx4Hm3cYYU9LOOc2+wWtF0ksMiCBdoZlwk/FQ2bvuZaECSoeCT8wc1iZArP3klwuA==} + /openapi-backend@5.10.5: + resolution: {integrity: sha512-ivZfL0Lwj7rRctCqxAquGy4j/VcdUXUvDsEVM3NG/2jDuvYT2dS+sf9ntGo5vv4hkOnkWgPnR6HxHp7NPexqAA==} engines: {node: '>=12.0.0'} dependencies: - '@apidevtools/json-schema-ref-parser': 10.1.0 + '@apidevtools/json-schema-ref-parser': 11.1.0 ajv: 8.12.0 bath-es5: 3.0.3 cookie: 0.5.0 @@ -3672,7 +3653,7 @@ packages: '@tootallnate/quickjs-emscripten': 0.23.0 agent-base: 7.1.0 debug: 4.3.4 - get-uri: 6.0.1 + get-uri: 6.0.2 http-proxy-agent: 7.0.0 https-proxy-agent: 7.0.2 pac-resolver: 7.0.0 @@ -3951,8 +3932,8 @@ packages: dev: false optional: true - /proxy-agent@6.3.0: - resolution: {integrity: sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og==} + /proxy-agent@6.3.1: + resolution: {integrity: sha512-Rb5RVBy1iyqOtNl15Cw/llpeLH8bsb37gM1FUfKQ+Wck6xHlbAhWGUFiTRHtkjqGTA5pSHz6+0hrPW/oECihPQ==} engines: {node: '>= 14'} dependencies: agent-base: 7.1.0 @@ -3995,22 +3976,16 @@ packages: engines: {node: '>=6'} dev: false - /puppeteer-core@20.9.0(typescript@5.2.2): - resolution: {integrity: sha512-H9fYZQzMTRrkboEfPmf7m3CLDN6JvbxXA3qTtS+dFt27tR+CsFHzPsT6pzp6lYL6bJbAPaR0HaPO6uSi+F94Pg==} + /puppeteer-core@21.3.8: + resolution: {integrity: sha512-yv12E/+zZ7Lei5tJB4sUkSrsuqKibuYpYxLGbmtLUjjYIqGE5HKz9OUI2I/RFHEvF+pHi2bTbv5bWydeCGJ6Mw==} engines: {node: '>=16.3.0'} - peerDependencies: - typescript: '>= 4.7.4' - peerDependenciesMeta: - typescript: - optional: true dependencies: - '@puppeteer/browsers': 1.4.6(typescript@5.2.2) - chromium-bidi: 0.4.16(devtools-protocol@0.0.1147663) + '@puppeteer/browsers': 1.7.1 + chromium-bidi: 0.4.31(devtools-protocol@0.0.1179426) cross-fetch: 4.0.0 debug: 4.3.4 - devtools-protocol: 0.0.1147663 - typescript: 5.2.2 - ws: 8.13.0 + devtools-protocol: 0.0.1179426 + ws: 8.14.2 transitivePeerDependencies: - bufferutil - encoding @@ -4165,8 +4140,8 @@ packages: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} dev: false - /resolve@1.22.6: - resolution: {integrity: sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==} + /resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true dependencies: is-core-module: 2.13.0 @@ -4240,7 +4215,7 @@ packages: template-url: 1.0.0 optionalDependencies: '@koa/multer': 3.0.2(multer@1.4.5-lts.1) - '@koa/router': 12.0.0 + '@koa/router': 12.0.1 body-parser: 1.20.2 express: 4.18.2 express-session: 1.17.3 @@ -4368,7 +4343,7 @@ packages: dependencies: call-bind: 1.0.2 get-intrinsic: 1.2.1 - object-inspect: 1.12.3 + object-inspect: 1.13.0 dev: false /signal-exit@3.0.7: @@ -4377,7 +4352,6 @@ packages: /signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} - dev: false /slash@4.0.0: resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} @@ -4445,7 +4419,7 @@ packages: resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} dependencies: spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.15 + spdx-license-ids: 3.0.16 dev: false /spdx-exceptions@2.3.0: @@ -4456,11 +4430,11 @@ packages: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.15 + spdx-license-ids: 3.0.16 dev: false - /spdx-license-ids@3.0.15: - resolution: {integrity: sha512-lpT8hSQp9jAKp9mhtBU4Xjon8LPGBvLIuBiSVhMEtmLecTh2mO0tlqrAMp47tBXzMr13NJMQ2lf7RpQGLJ3HsQ==} + /spdx-license-ids@3.0.16: + resolution: {integrity: sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==} dev: false /split2@4.2.0: @@ -4726,7 +4700,7 @@ packages: hasBin: true dev: true - /ts-node-dev@2.0.0(@types/node@18.18.1)(typescript@5.2.2): + /ts-node-dev@2.0.0(@types/node@18.18.5)(typescript@5.2.2): resolution: {integrity: sha512-ywMrhCfH6M75yftYvrvNarLEY+SUXtUvU8/0Z6llrHQVBx12GiFk5sStF8UdfE/yfzk9IAq7O5EEbTQsxlBI8w==} engines: {node: '>=0.8.0'} hasBin: true @@ -4741,11 +4715,11 @@ packages: dynamic-dedupe: 0.3.0 minimist: 1.2.8 mkdirp: 1.0.4 - resolve: 1.22.6 + resolve: 1.22.8 rimraf: 2.7.1 source-map-support: 0.5.21 tree-kill: 1.2.2 - ts-node: 10.9.1(@types/node@18.18.1)(typescript@5.2.2) + ts-node: 10.9.1(@types/node@18.18.5)(typescript@5.2.2) tsconfig: 7.0.0 typescript: 5.2.2 transitivePeerDependencies: @@ -4754,7 +4728,7 @@ packages: - '@types/node' dev: true - /ts-node@10.9.1(@types/node@18.18.1)(typescript@5.2.2): + /ts-node@10.9.1(@types/node@18.18.5)(typescript@5.2.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -4773,7 +4747,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 18.18.1 + '@types/node': 18.18.5 acorn: 8.10.0 acorn-walk: 8.2.0 arg: 4.1.3 @@ -5012,6 +4986,10 @@ packages: requires-port: 1.0.0 dev: false + /urlpattern-polyfill@9.0.0: + resolution: {integrity: sha512-WHN8KDQblxd32odxeIgo83rdVDE2bvdkb86it7bMhYZwWKJz0+O0RK/eZiHYnM+zgt/U7hAHOlCQGfjjvSkw2g==} + dev: false + /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -5060,27 +5038,27 @@ packages: xml-name-validator: 4.0.0 dev: false - /web-fetch@1.3.2(@types/node@18.18.1)(typescript@5.2.2): - resolution: {integrity: sha512-liC7CgTg8iMfL80HnOpvZTw1rTBOQDKf7ATWX858A8E35i1j4mr2BQu9yyNPZD3zfjU83Z4H4ZMuv6S1eUkhbQ==} + /web-fetch@1.3.3(@types/node@18.18.5): + resolution: {integrity: sha512-FfNFuYP2+bhsVQhDYt3kCdxnQi3HiMGcYMFLDTqYS7wYREPuJ3XwcR8bEqL9Nk3ldXj2jZMoxAmATKJ56P9uJA==} engines: {node: '>=18'} hasBin: true requiresBuild: true dependencies: - '@tech_query/node-toolkit': 1.2.1(@types/node@18.18.1) + '@tech_query/node-toolkit': 1.2.1(@types/node@18.18.5) '@types/jsdom': 21.1.3 array-unique-proposal: 0.3.4 - commander-jsx: 0.6.9(@types/node@18.18.1) + commander-jsx: 0.6.9(@types/node@18.18.5) file-type: 16.5.4 fs-extra: 11.1.1 - fs-match: 1.7.1(@types/node@18.18.1) - jsdom: 21.1.2 + fs-match: 1.7.1(@types/node@18.18.5) + jsdom: 22.1.0 lodash.memoize: 4.1.2 node-fetch: 2.7.0 - puppeteer-core: 20.9.0(typescript@5.2.2) + puppeteer-core: 21.3.8 tslib: 2.6.2 turndown: 7.1.2 turndown-plugin-gfm: 1.0.2 - yaml: 2.3.2 + yaml: 2.3.3 transitivePeerDependencies: - '@babel/plugin-transform-modules-commonjs' - '@babel/preset-env' @@ -5089,7 +5067,6 @@ packages: - canvas - encoding - supports-color - - typescript - utf-8-validate dev: false @@ -5103,7 +5080,7 @@ packages: peerDependencies: typescript: '>=4.1' dependencies: - '@swc/helpers': 0.5.2 + '@swc/helpers': 0.5.3 element-internals-polyfill: 1.3.8 regenerator-runtime: 0.14.0 typescript: 5.2.2 @@ -5195,19 +5172,6 @@ packages: /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - /ws@8.13.0: - resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - dev: false - /ws@8.14.2: resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} engines: {node: '>=10.0.0'} @@ -5264,13 +5228,13 @@ packages: engines: {node: '>= 6'} dev: false - /yaml@2.3.1: - resolution: {integrity: sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==} + /yaml@2.3.2: + resolution: {integrity: sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==} engines: {node: '>= 14'} dev: true - /yaml@2.3.2: - resolution: {integrity: sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==} + /yaml@2.3.3: + resolution: {integrity: sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==} engines: {node: '>= 14'} /yargs-parser@20.2.9: @@ -5346,7 +5310,7 @@ packages: dependencies: '@types/fs-extra': 11.0.2 '@types/minimist': 1.2.3 - '@types/node': 18.18.1 + '@types/node': 18.18.5 '@types/ps-tree': 1.1.3 '@types/which': 3.0.0 chalk: 5.3.0 @@ -5358,5 +5322,5 @@ packages: ps-tree: 1.2.0 webpod: 0.0.2 which: 3.0.1 - yaml: 2.3.2 + yaml: 2.3.3 dev: true diff --git a/src/controller/Crawler.ts b/src/controller/Crawler.ts index 1616678..6dda6d3 100644 --- a/src/controller/Crawler.ts +++ b/src/controller/Crawler.ts @@ -1,3 +1,4 @@ +import { TableRecordFields } from 'mobx-lark'; import { parse } from 'path'; import { JsonController, @@ -20,7 +21,9 @@ import { PageTask, PageTaskModel, LarkBaseTableRecordFileTask, - LarkBaseTableRecordFileModel + LarkBaseTableRecordFileModel, + LarkBaseTableFileTask, + LarkBaseTableFileModel } from '../model'; const OWSBlobHost = blobEndPointOf(AZURE_BLOB_CONNECTION); @@ -59,6 +62,25 @@ export class CrawlerController { }; } + async *saveFiles(fields: TableRecordFields) { + for (const value of Object.values(fields)) + if (value instanceof Array) + for (const item of value) + if (typeof item === 'object' && 'file_token' in item) { + const file = Buffer.from( + await lark.downloadFile(item.file_token) + ), + path = `file/${item.name}`; + const URI = `${OWSBlobHost}/$web/${path}`; + + await uploadToAzureBlob(file, path, item.type); + + console.log(`[upload] ${URI}`); + + yield URI; + } + } + @Post('/task/lark/base/:base/:table/:record/file') @Authorized() @ResponseSchema(LarkBaseTableRecordFileModel) @@ -71,21 +93,35 @@ export class CrawlerController { const table = new CommonBiDataTable(bid, tid); const fields = await table.getOne(rid), - files = []; + files = [ + ...(await AsyncIterator.from(this.saveFiles(fields)).toArray()) + ]; + return { files }; + } - for (const value of Object.values(fields)) - if (value instanceof Array) - for (const item of value) - if (typeof item === 'object' && 'file_token' in item) { - const file = Buffer.from( - await lark.downloadFile(item.file_token) - ), - path = `file/${item.name}`; + @Post('/task/lark/base/:base/:table/file') + @Authorized() + @ResponseSchema(LarkBaseTableFileModel, { isArray: true }) + async createLarkBaseTableFileTask( + @Params() + { base: bid, table: tid }: LarkBaseTableFileTask + ): Promise { + await lark.getAccessToken(); - await uploadToAzureBlob(file, path, item.type); + const table = new CommonBiDataTable(bid, tid); - files.push(`${OWSBlobHost}/$web/${path}`); - } - return { files }; + const records = await table.getAll(), + list: LarkBaseTableFileModel[] = []; + + for (const fields of records) + list.push({ + id: fields['id'] as string, + files: [ + ...(await AsyncIterator.from( + this.saveFiles(fields) + ).toArray()) + ] + }); + return list; } } diff --git a/src/index.ts b/src/index.ts index 90bca8d..9990089 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,6 @@ import 'dotenv/config'; +import { installIntoGlobal } from 'iterator-helpers-polyfill'; +installIntoGlobal(); import 'reflect-metadata'; import Koa, { Context } from 'koa'; @@ -22,7 +24,7 @@ if (!isProduct) app.use(mocker()); useKoaServer(app, { ...router, cors: true, - authorizationChecker: async (action, roles) => { + authorizationChecker: async action => { const [_, token] = (action.context as Context).get('Authorization')?.split(/\s+/) || []; diff --git a/src/model/Base.ts b/src/model/Base.ts index dac4e95..c58cd73 100644 --- a/src/model/Base.ts +++ b/src/model/Base.ts @@ -14,22 +14,24 @@ import { } from 'typeorm'; export abstract class Base { - constructor(id: number) { - this.id = id; + constructor(id?: number) { + if (id) this.id = id; } @IsInt() + @IsOptional() @PrimaryGeneratedColumn() id: number; @IsDateString() + @IsOptional() @CreateDateColumn() createdAt: string; @IsDateString() @IsOptional() @UpdateDateColumn() - updatedAt?: string; + updatedAt: string; } export type InputData = NewData, Base>; diff --git a/src/model/Crawler.ts b/src/model/Crawler.ts index ed12c91..d21094d 100644 --- a/src/model/Crawler.ts +++ b/src/model/Crawler.ts @@ -15,13 +15,15 @@ export class PageTaskModel { target: string; } -export class LarkBaseTableRecordFileTask { +export class LarkBaseTableFileTask { @IsString() base: string; @IsString() table: string; +} +export class LarkBaseTableRecordFileTask extends LarkBaseTableFileTask { @IsString() record: string; } @@ -30,3 +32,8 @@ export class LarkBaseTableRecordFileModel { @IsString({ each: true }) files: string[]; } + +export class LarkBaseTableFileModel extends LarkBaseTableRecordFileModel { + @IsString() + id: string; +} diff --git a/type/.npmrc b/type/.npmrc new file mode 100644 index 0000000..8638f02 --- /dev/null +++ b/type/.npmrc @@ -0,0 +1 @@ +auto-install-peers = false diff --git a/type/package.json b/type/package.json index 6d69ecf..fb15746 100644 --- a/type/package.json +++ b/type/package.json @@ -1,16 +1,13 @@ { "name": "@kaiyuanshe/kys-service", - "version": "0.6.8", + "version": "0.6.9", "types": "index.d.ts", - "files": [ - "*.d.ts" - ], "dependencies": { "@types/jsonwebtoken": "^9.0.3", "@types/koa": "^2.13.9", "mobx-restful": "^0.6.12" }, "peerDependencies": { - "web-fetch": "^1.3.2" + "web-fetch": "^1.3.3" } }