Compare commits
No commits in common. "7d93f0eef3267155786a9c6a8241fa0d9401ca8c" and "64c70ce527119c7822ae9dd51c6e80d4652c51c4" have entirely different histories.
7d93f0eef3
...
64c70ce527
3
.gitignore
vendored
3
.gitignore
vendored
@ -18,8 +18,7 @@ release/*
|
|||||||
|
|
||||||
.turbo
|
.turbo
|
||||||
|
|
||||||
.env*
|
.env
|
||||||
!.env.example
|
|
||||||
|
|
||||||
pack-dist
|
pack-dist
|
||||||
app.config.json5.envision
|
app.config.json5.envision
|
||||||
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -7,6 +7,3 @@
|
|||||||
[submodule "submodules/oss"]
|
[submodule "submodules/oss"]
|
||||||
path = submodules/oss
|
path = submodules/oss
|
||||||
url = git@git.xiongxiao.me:kevisual/kevisual-oss.git
|
url = git@git.xiongxiao.me:kevisual/kevisual-oss.git
|
||||||
[submodule "submodules/pay-center-code"]
|
|
||||||
path = submodules/pay-center-code
|
|
||||||
url = git@git.xiongxiao.me:kevisual/pay-center-code.git
|
|
||||||
|
23
app.config.json5.example
Normal file
23
app.config.json5.example
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
port: 4005, // 端口
|
||||||
|
tokenSecret: '<TOKEN_SECRET>',
|
||||||
|
appPath: 'apps',
|
||||||
|
appName: 'codeflow',
|
||||||
|
domain: '*',
|
||||||
|
mainApp: 'https://kevisual.xiongxiao.me',
|
||||||
|
postgres: {
|
||||||
|
username: 'root',
|
||||||
|
host: 'localhost',
|
||||||
|
database: 'postgres',
|
||||||
|
password: '*****',
|
||||||
|
port: 5432,
|
||||||
|
},
|
||||||
|
redis: {},
|
||||||
|
minio: {
|
||||||
|
endPoint: 'minio.xiongxiao.me',
|
||||||
|
bucketName: 'resources',
|
||||||
|
useSSL: false,
|
||||||
|
accessKey: 'username',
|
||||||
|
secretKey: 'password',
|
||||||
|
},
|
||||||
|
}
|
11
package.json
11
package.json
@ -25,7 +25,7 @@
|
|||||||
"start": "pm2 start dist/app.mjs --name codecenter",
|
"start": "pm2 start dist/app.mjs --name codecenter",
|
||||||
"release": "node ./config/release/index.mjs",
|
"release": "node ./config/release/index.mjs",
|
||||||
"pub": "envision pack -p -u",
|
"pub": "envision pack -p -u",
|
||||||
"ssh": "ssh -L 6379:localhost:6379 -L 5432:localhost:5432 light ",
|
"ssh": "ssh -L 6379:localhost:6379 light ",
|
||||||
"ssh:sky": "ssh -L 6379:172.21.32.13:6379 sky",
|
"ssh:sky": "ssh -L 6379:172.21.32.13:6379 sky",
|
||||||
"dev:lib": "turbo run dev:lib",
|
"dev:lib": "turbo run dev:lib",
|
||||||
"build:lib": "turbo run build",
|
"build:lib": "turbo run build",
|
||||||
@ -38,14 +38,13 @@
|
|||||||
],
|
],
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@kevisual/local-app-manager": "0.1.10",
|
"@kevisual/local-app-manager": "0.1.9",
|
||||||
"@kevisual/router": "0.0.9",
|
"@kevisual/router": "0.0.9",
|
||||||
"@kevisual/use-config": "^1.0.10",
|
"@kevisual/use-config": "^1.0.10",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
"archiver": "^7.0.1",
|
"archiver": "^7.0.1",
|
||||||
"crypto-js": "^4.2.0",
|
"crypto-js": "^4.2.0",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
"dotenv": "^16.4.7",
|
|
||||||
"formidable": "^3.5.2",
|
"formidable": "^3.5.2",
|
||||||
"ioredis": "^5.6.0",
|
"ioredis": "^5.6.0",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
@ -68,8 +67,8 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@kevisual/code-center-module": "workspace:*",
|
"@kevisual/code-center-module": "workspace:*",
|
||||||
"@kevisual/oss": "workspace:*",
|
|
||||||
"@kevisual/permission": "workspace:*",
|
"@kevisual/permission": "workspace:*",
|
||||||
|
"@kevisual/oss": "workspace:*",
|
||||||
"@kevisual/types": "^0.0.6",
|
"@kevisual/types": "^0.0.6",
|
||||||
"@rollup/plugin-alias": "^5.1.1",
|
"@rollup/plugin-alias": "^5.1.1",
|
||||||
"@rollup/plugin-commonjs": "^28.0.3",
|
"@rollup/plugin-commonjs": "^28.0.3",
|
||||||
@ -82,14 +81,14 @@
|
|||||||
"@types/formidable": "^3.4.5",
|
"@types/formidable": "^3.4.5",
|
||||||
"@types/jsonwebtoken": "^9.0.9",
|
"@types/jsonwebtoken": "^9.0.9",
|
||||||
"@types/lodash-es": "^4.17.12",
|
"@types/lodash-es": "^4.17.12",
|
||||||
"@types/node": "^22.13.13",
|
"@types/node": "^22.13.11",
|
||||||
"@types/react": "^19.0.12",
|
"@types/react": "^19.0.12",
|
||||||
"@types/uuid": "^10.0.0",
|
"@types/uuid": "^10.0.0",
|
||||||
"concurrently": "^9.1.2",
|
"concurrently": "^9.1.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"nodemon": "^3.1.9",
|
"nodemon": "^3.1.9",
|
||||||
"rimraf": "^6.0.1",
|
"rimraf": "^6.0.1",
|
||||||
"rollup": "^4.37.0",
|
"rollup": "^4.36.0",
|
||||||
"rollup-plugin-copy": "^3.5.0",
|
"rollup-plugin-copy": "^3.5.0",
|
||||||
"rollup-plugin-dts": "^6.2.1",
|
"rollup-plugin-dts": "^6.2.1",
|
||||||
"tape": "^5.9.0",
|
"tape": "^5.9.0",
|
||||||
|
338
pnpm-lock.yaml
generated
338
pnpm-lock.yaml
generated
@ -14,8 +14,8 @@ importers:
|
|||||||
.:
|
.:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@kevisual/local-app-manager':
|
'@kevisual/local-app-manager':
|
||||||
specifier: 0.1.10
|
specifier: 0.1.9
|
||||||
version: 0.1.10(@kevisual/router@0.0.9)(@kevisual/types@0.0.6)(@kevisual/use-config@1.0.10(dotenv@16.4.7))(pm2@6.0.5)
|
version: 0.1.9(@kevisual/router@0.0.9)(@kevisual/types@0.0.6)(@kevisual/use-config@1.0.10(dotenv@16.4.7))(pm2@6.0.5)
|
||||||
'@kevisual/router':
|
'@kevisual/router':
|
||||||
specifier: 0.0.9
|
specifier: 0.0.9
|
||||||
version: 0.0.9
|
version: 0.0.9
|
||||||
@ -34,9 +34,6 @@ importers:
|
|||||||
dayjs:
|
dayjs:
|
||||||
specifier: ^1.11.13
|
specifier: ^1.11.13
|
||||||
version: 1.11.13
|
version: 1.11.13
|
||||||
dotenv:
|
|
||||||
specifier: ^16.4.7
|
|
||||||
version: 16.4.7
|
|
||||||
formidable:
|
formidable:
|
||||||
specifier: ^3.5.2
|
specifier: ^3.5.2
|
||||||
version: 3.5.2
|
version: 3.5.2
|
||||||
@ -72,7 +69,7 @@ importers:
|
|||||||
version: 6.0.5
|
version: 6.0.5
|
||||||
rollup-plugin-esbuild:
|
rollup-plugin-esbuild:
|
||||||
specifier: ^6.2.1
|
specifier: ^6.2.1
|
||||||
version: 6.2.1(esbuild@0.25.0)(rollup@4.37.0)
|
version: 6.2.1(esbuild@0.25.0)(rollup@4.36.0)
|
||||||
semver:
|
semver:
|
||||||
specifier: ^7.7.1
|
specifier: ^7.7.1
|
||||||
version: 7.7.1
|
version: 7.7.1
|
||||||
@ -109,22 +106,22 @@ importers:
|
|||||||
version: 0.0.6
|
version: 0.0.6
|
||||||
'@rollup/plugin-alias':
|
'@rollup/plugin-alias':
|
||||||
specifier: ^5.1.1
|
specifier: ^5.1.1
|
||||||
version: 5.1.1(rollup@4.37.0)
|
version: 5.1.1(rollup@4.36.0)
|
||||||
'@rollup/plugin-commonjs':
|
'@rollup/plugin-commonjs':
|
||||||
specifier: ^28.0.3
|
specifier: ^28.0.3
|
||||||
version: 28.0.3(rollup@4.37.0)
|
version: 28.0.3(rollup@4.36.0)
|
||||||
'@rollup/plugin-json':
|
'@rollup/plugin-json':
|
||||||
specifier: ^6.1.0
|
specifier: ^6.1.0
|
||||||
version: 6.1.0(rollup@4.37.0)
|
version: 6.1.0(rollup@4.36.0)
|
||||||
'@rollup/plugin-node-resolve':
|
'@rollup/plugin-node-resolve':
|
||||||
specifier: ^16.0.1
|
specifier: ^16.0.1
|
||||||
version: 16.0.1(rollup@4.37.0)
|
version: 16.0.1(rollup@4.36.0)
|
||||||
'@rollup/plugin-replace':
|
'@rollup/plugin-replace':
|
||||||
specifier: ^6.0.2
|
specifier: ^6.0.2
|
||||||
version: 6.0.2(rollup@4.37.0)
|
version: 6.0.2(rollup@4.36.0)
|
||||||
'@rollup/plugin-typescript':
|
'@rollup/plugin-typescript':
|
||||||
specifier: ^12.1.2
|
specifier: ^12.1.2
|
||||||
version: 12.1.2(rollup@4.37.0)(tslib@2.8.1)(typescript@5.8.2)
|
version: 12.1.2(rollup@4.36.0)(tslib@2.8.1)(typescript@5.8.2)
|
||||||
'@types/archiver':
|
'@types/archiver':
|
||||||
specifier: ^6.0.3
|
specifier: ^6.0.3
|
||||||
version: 6.0.3
|
version: 6.0.3
|
||||||
@ -141,8 +138,8 @@ importers:
|
|||||||
specifier: ^4.17.12
|
specifier: ^4.17.12
|
||||||
version: 4.17.12
|
version: 4.17.12
|
||||||
'@types/node':
|
'@types/node':
|
||||||
specifier: ^22.13.13
|
specifier: ^22.13.11
|
||||||
version: 22.13.13
|
version: 22.13.11
|
||||||
'@types/react':
|
'@types/react':
|
||||||
specifier: ^19.0.12
|
specifier: ^19.0.12
|
||||||
version: 19.0.12
|
version: 19.0.12
|
||||||
@ -162,14 +159,14 @@ importers:
|
|||||||
specifier: latest
|
specifier: latest
|
||||||
version: 6.0.1
|
version: 6.0.1
|
||||||
rollup:
|
rollup:
|
||||||
specifier: ^4.37.0
|
specifier: ^4.36.0
|
||||||
version: 4.37.0
|
version: 4.36.0
|
||||||
rollup-plugin-copy:
|
rollup-plugin-copy:
|
||||||
specifier: ^3.5.0
|
specifier: ^3.5.0
|
||||||
version: 3.5.0
|
version: 3.5.0
|
||||||
rollup-plugin-dts:
|
rollup-plugin-dts:
|
||||||
specifier: ^6.2.1
|
specifier: ^6.2.1
|
||||||
version: 6.2.1(rollup@4.37.0)(typescript@5.8.2)
|
version: 6.2.1(rollup@4.36.0)(typescript@5.8.2)
|
||||||
tape:
|
tape:
|
||||||
specifier: ^5.9.0
|
specifier: ^5.9.0
|
||||||
version: 5.9.0
|
version: 5.9.0
|
||||||
@ -304,12 +301,6 @@ importers:
|
|||||||
specifier: ^8.4.0
|
specifier: ^8.4.0
|
||||||
version: 8.4.0(tsx@4.19.3)(typescript@5.8.2)
|
version: 8.4.0(tsx@4.19.3)(typescript@5.8.2)
|
||||||
|
|
||||||
submodules/pay-center-code:
|
|
||||||
dependencies:
|
|
||||||
dotenv:
|
|
||||||
specifier: ^16.4.7
|
|
||||||
version: 16.4.7
|
|
||||||
|
|
||||||
submodules/permission:
|
submodules/permission:
|
||||||
devDependencies:
|
devDependencies:
|
||||||
tsup:
|
tsup:
|
||||||
@ -511,10 +502,10 @@ packages:
|
|||||||
'@kevisual/load@0.0.4':
|
'@kevisual/load@0.0.4':
|
||||||
resolution: {integrity: sha512-TJBieKsEoEPfP4+tDyhNZdMX2LMAGiDZ/IrAXPFWB4jeFP0Ywm1W5xDV52LhhHq4nwTmuhyTVmPxJYiEVYTHtA==}
|
resolution: {integrity: sha512-TJBieKsEoEPfP4+tDyhNZdMX2LMAGiDZ/IrAXPFWB4jeFP0Ywm1W5xDV52LhhHq4nwTmuhyTVmPxJYiEVYTHtA==}
|
||||||
|
|
||||||
'@kevisual/local-app-manager@0.1.10':
|
'@kevisual/local-app-manager@0.1.9':
|
||||||
resolution: {integrity: sha512-4zE3ndsGe5eA0Wl8b8JgWIbulX8uH8vZWuvBkgnAP9ry99XFYHx5Z3XGO990ZKqzRMy3jIFlfooAc1x1iMoZvQ==}
|
resolution: {integrity: sha512-oppYUjvpPg/7gBw1h3dX63fhxB8MvGc74yGgIM4JifvSuOYLcZ9oZyauYV+5lQVh2tjJImOuUmRHnVXu1FWKDQ==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@kevisual/router': ^0.0.6
|
'@kevisual/router': ^0.0.6-alpha-2
|
||||||
'@kevisual/types': ^0.0.1
|
'@kevisual/types': ^0.0.1
|
||||||
'@kevisual/use-config': ^1.0.5
|
'@kevisual/use-config': ^1.0.5
|
||||||
pm2: ^5.4.3
|
pm2: ^5.4.3
|
||||||
@ -640,196 +631,96 @@ packages:
|
|||||||
cpu: [arm]
|
cpu: [arm]
|
||||||
os: [android]
|
os: [android]
|
||||||
|
|
||||||
'@rollup/rollup-android-arm-eabi@4.37.0':
|
|
||||||
resolution: {integrity: sha512-l7StVw6WAa8l3vA1ov80jyetOAEo1FtHvZDbzXDO/02Sq/QVvqlHkYoFwDJPIMj0GKiistsBudfx5tGFnwYWDQ==}
|
|
||||||
cpu: [arm]
|
|
||||||
os: [android]
|
|
||||||
|
|
||||||
'@rollup/rollup-android-arm64@4.36.0':
|
'@rollup/rollup-android-arm64@4.36.0':
|
||||||
resolution: {integrity: sha512-NyfuLvdPdNUfUNeYKUwPwKsE5SXa2J6bCt2LdB/N+AxShnkpiczi3tcLJrm5mA+eqpy0HmaIY9F6XCa32N5yzg==}
|
resolution: {integrity: sha512-NyfuLvdPdNUfUNeYKUwPwKsE5SXa2J6bCt2LdB/N+AxShnkpiczi3tcLJrm5mA+eqpy0HmaIY9F6XCa32N5yzg==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [android]
|
os: [android]
|
||||||
|
|
||||||
'@rollup/rollup-android-arm64@4.37.0':
|
|
||||||
resolution: {integrity: sha512-6U3SlVyMxezt8Y+/iEBcbp945uZjJwjZimu76xoG7tO1av9VO691z8PkhzQ85ith2I8R2RddEPeSfcbyPfD4hA==}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [android]
|
|
||||||
|
|
||||||
'@rollup/rollup-darwin-arm64@4.36.0':
|
'@rollup/rollup-darwin-arm64@4.36.0':
|
||||||
resolution: {integrity: sha512-JQ1Jk5G4bGrD4pWJQzWsD8I1n1mgPXq33+/vP4sk8j/z/C2siRuxZtaUA7yMTf71TCZTZl/4e1bfzwUmFb3+rw==}
|
resolution: {integrity: sha512-JQ1Jk5G4bGrD4pWJQzWsD8I1n1mgPXq33+/vP4sk8j/z/C2siRuxZtaUA7yMTf71TCZTZl/4e1bfzwUmFb3+rw==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
|
|
||||||
'@rollup/rollup-darwin-arm64@4.37.0':
|
|
||||||
resolution: {integrity: sha512-+iTQ5YHuGmPt10NTzEyMPbayiNTcOZDWsbxZYR1ZnmLnZxG17ivrPSWFO9j6GalY0+gV3Jtwrrs12DBscxnlYA==}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [darwin]
|
|
||||||
|
|
||||||
'@rollup/rollup-darwin-x64@4.36.0':
|
'@rollup/rollup-darwin-x64@4.36.0':
|
||||||
resolution: {integrity: sha512-6c6wMZa1lrtiRsbDziCmjE53YbTkxMYhhnWnSW8R/yqsM7a6mSJ3uAVT0t8Y/DGt7gxUWYuFM4bwWk9XCJrFKA==}
|
resolution: {integrity: sha512-6c6wMZa1lrtiRsbDziCmjE53YbTkxMYhhnWnSW8R/yqsM7a6mSJ3uAVT0t8Y/DGt7gxUWYuFM4bwWk9XCJrFKA==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
|
|
||||||
'@rollup/rollup-darwin-x64@4.37.0':
|
|
||||||
resolution: {integrity: sha512-m8W2UbxLDcmRKVjgl5J/k4B8d7qX2EcJve3Sut7YGrQoPtCIQGPH5AMzuFvYRWZi0FVS0zEY4c8uttPfX6bwYQ==}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [darwin]
|
|
||||||
|
|
||||||
'@rollup/rollup-freebsd-arm64@4.36.0':
|
'@rollup/rollup-freebsd-arm64@4.36.0':
|
||||||
resolution: {integrity: sha512-KXVsijKeJXOl8QzXTsA+sHVDsFOmMCdBRgFmBb+mfEb/7geR7+C8ypAml4fquUt14ZyVXaw2o1FWhqAfOvA4sg==}
|
resolution: {integrity: sha512-KXVsijKeJXOl8QzXTsA+sHVDsFOmMCdBRgFmBb+mfEb/7geR7+C8ypAml4fquUt14ZyVXaw2o1FWhqAfOvA4sg==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [freebsd]
|
os: [freebsd]
|
||||||
|
|
||||||
'@rollup/rollup-freebsd-arm64@4.37.0':
|
|
||||||
resolution: {integrity: sha512-FOMXGmH15OmtQWEt174v9P1JqqhlgYge/bUjIbiVD1nI1NeJ30HYT9SJlZMqdo1uQFyt9cz748F1BHghWaDnVA==}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [freebsd]
|
|
||||||
|
|
||||||
'@rollup/rollup-freebsd-x64@4.36.0':
|
'@rollup/rollup-freebsd-x64@4.36.0':
|
||||||
resolution: {integrity: sha512-dVeWq1ebbvByI+ndz4IJcD4a09RJgRYmLccwlQ8bPd4olz3Y213uf1iwvc7ZaxNn2ab7bjc08PrtBgMu6nb4pQ==}
|
resolution: {integrity: sha512-dVeWq1ebbvByI+ndz4IJcD4a09RJgRYmLccwlQ8bPd4olz3Y213uf1iwvc7ZaxNn2ab7bjc08PrtBgMu6nb4pQ==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [freebsd]
|
os: [freebsd]
|
||||||
|
|
||||||
'@rollup/rollup-freebsd-x64@4.37.0':
|
|
||||||
resolution: {integrity: sha512-SZMxNttjPKvV14Hjck5t70xS3l63sbVwl98g3FlVVx2YIDmfUIy29jQrsw06ewEYQ8lQSuY9mpAPlmgRD2iSsA==}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [freebsd]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm-gnueabihf@4.36.0':
|
'@rollup/rollup-linux-arm-gnueabihf@4.36.0':
|
||||||
resolution: {integrity: sha512-bvXVU42mOVcF4le6XSjscdXjqx8okv4n5vmwgzcmtvFdifQ5U4dXFYaCB87namDRKlUL9ybVtLQ9ztnawaSzvg==}
|
resolution: {integrity: sha512-bvXVU42mOVcF4le6XSjscdXjqx8okv4n5vmwgzcmtvFdifQ5U4dXFYaCB87namDRKlUL9ybVtLQ9ztnawaSzvg==}
|
||||||
cpu: [arm]
|
cpu: [arm]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm-gnueabihf@4.37.0':
|
|
||||||
resolution: {integrity: sha512-hhAALKJPidCwZcj+g+iN+38SIOkhK2a9bqtJR+EtyxrKKSt1ynCBeqrQy31z0oWU6thRZzdx53hVgEbRkuI19w==}
|
|
||||||
cpu: [arm]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm-musleabihf@4.36.0':
|
'@rollup/rollup-linux-arm-musleabihf@4.36.0':
|
||||||
resolution: {integrity: sha512-JFIQrDJYrxOnyDQGYkqnNBtjDwTgbasdbUiQvcU8JmGDfValfH1lNpng+4FWlhaVIR4KPkeddYjsVVbmJYvDcg==}
|
resolution: {integrity: sha512-JFIQrDJYrxOnyDQGYkqnNBtjDwTgbasdbUiQvcU8JmGDfValfH1lNpng+4FWlhaVIR4KPkeddYjsVVbmJYvDcg==}
|
||||||
cpu: [arm]
|
cpu: [arm]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm-musleabihf@4.37.0':
|
|
||||||
resolution: {integrity: sha512-jUb/kmn/Gd8epbHKEqkRAxq5c2EwRt0DqhSGWjPFxLeFvldFdHQs/n8lQ9x85oAeVb6bHcS8irhTJX2FCOd8Ag==}
|
|
||||||
cpu: [arm]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm64-gnu@4.36.0':
|
'@rollup/rollup-linux-arm64-gnu@4.36.0':
|
||||||
resolution: {integrity: sha512-KqjYVh3oM1bj//5X7k79PSCZ6CvaVzb7Qs7VMWS+SlWB5M8p3FqufLP9VNp4CazJ0CsPDLwVD9r3vX7Ci4J56A==}
|
resolution: {integrity: sha512-KqjYVh3oM1bj//5X7k79PSCZ6CvaVzb7Qs7VMWS+SlWB5M8p3FqufLP9VNp4CazJ0CsPDLwVD9r3vX7Ci4J56A==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm64-gnu@4.37.0':
|
|
||||||
resolution: {integrity: sha512-oNrJxcQT9IcbcmKlkF+Yz2tmOxZgG9D9GRq+1OE6XCQwCVwxixYAa38Z8qqPzQvzt1FCfmrHX03E0pWoXm1DqA==}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm64-musl@4.36.0':
|
'@rollup/rollup-linux-arm64-musl@4.36.0':
|
||||||
resolution: {integrity: sha512-QiGnhScND+mAAtfHqeT+cB1S9yFnNQ/EwCg5yE3MzoaZZnIV0RV9O5alJAoJKX/sBONVKeZdMfO8QSaWEygMhw==}
|
resolution: {integrity: sha512-QiGnhScND+mAAtfHqeT+cB1S9yFnNQ/EwCg5yE3MzoaZZnIV0RV9O5alJAoJKX/sBONVKeZdMfO8QSaWEygMhw==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm64-musl@4.37.0':
|
|
||||||
resolution: {integrity: sha512-pfxLBMls+28Ey2enpX3JvjEjaJMBX5XlPCZNGxj4kdJyHduPBXtxYeb8alo0a7bqOoWZW2uKynhHxF/MWoHaGQ==}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-loongarch64-gnu@4.36.0':
|
'@rollup/rollup-linux-loongarch64-gnu@4.36.0':
|
||||||
resolution: {integrity: sha512-1ZPyEDWF8phd4FQtTzMh8FQwqzvIjLsl6/84gzUxnMNFBtExBtpL51H67mV9xipuxl1AEAerRBgBwFNpkw8+Lg==}
|
resolution: {integrity: sha512-1ZPyEDWF8phd4FQtTzMh8FQwqzvIjLsl6/84gzUxnMNFBtExBtpL51H67mV9xipuxl1AEAerRBgBwFNpkw8+Lg==}
|
||||||
cpu: [loong64]
|
cpu: [loong64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-loongarch64-gnu@4.37.0':
|
|
||||||
resolution: {integrity: sha512-yCE0NnutTC/7IGUq/PUHmoeZbIwq3KRh02e9SfFh7Vmc1Z7atuJRYWhRME5fKgT8aS20mwi1RyChA23qSyRGpA==}
|
|
||||||
cpu: [loong64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-powerpc64le-gnu@4.36.0':
|
'@rollup/rollup-linux-powerpc64le-gnu@4.36.0':
|
||||||
resolution: {integrity: sha512-VMPMEIUpPFKpPI9GZMhJrtu8rxnp6mJR3ZzQPykq4xc2GmdHj3Q4cA+7avMyegXy4n1v+Qynr9fR88BmyO74tg==}
|
resolution: {integrity: sha512-VMPMEIUpPFKpPI9GZMhJrtu8rxnp6mJR3ZzQPykq4xc2GmdHj3Q4cA+7avMyegXy4n1v+Qynr9fR88BmyO74tg==}
|
||||||
cpu: [ppc64]
|
cpu: [ppc64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-powerpc64le-gnu@4.37.0':
|
|
||||||
resolution: {integrity: sha512-NxcICptHk06E2Lh3a4Pu+2PEdZ6ahNHuK7o6Np9zcWkrBMuv21j10SQDJW3C9Yf/A/P7cutWoC/DptNLVsZ0VQ==}
|
|
||||||
cpu: [ppc64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-riscv64-gnu@4.36.0':
|
'@rollup/rollup-linux-riscv64-gnu@4.36.0':
|
||||||
resolution: {integrity: sha512-ttE6ayb/kHwNRJGYLpuAvB7SMtOeQnVXEIpMtAvx3kepFQeowVED0n1K9nAdraHUPJ5hydEMxBpIR7o4nrm8uA==}
|
resolution: {integrity: sha512-ttE6ayb/kHwNRJGYLpuAvB7SMtOeQnVXEIpMtAvx3kepFQeowVED0n1K9nAdraHUPJ5hydEMxBpIR7o4nrm8uA==}
|
||||||
cpu: [riscv64]
|
cpu: [riscv64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-riscv64-gnu@4.37.0':
|
|
||||||
resolution: {integrity: sha512-PpWwHMPCVpFZLTfLq7EWJWvrmEuLdGn1GMYcm5MV7PaRgwCEYJAwiN94uBuZev0/J/hFIIJCsYw4nLmXA9J7Pw==}
|
|
||||||
cpu: [riscv64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-riscv64-musl@4.37.0':
|
|
||||||
resolution: {integrity: sha512-DTNwl6a3CfhGTAOYZ4KtYbdS8b+275LSLqJVJIrPa5/JuIufWWZ/QFvkxp52gpmguN95eujrM68ZG+zVxa8zHA==}
|
|
||||||
cpu: [riscv64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-s390x-gnu@4.36.0':
|
'@rollup/rollup-linux-s390x-gnu@4.36.0':
|
||||||
resolution: {integrity: sha512-4a5gf2jpS0AIe7uBjxDeUMNcFmaRTbNv7NxI5xOCs4lhzsVyGR/0qBXduPnoWf6dGC365saTiwag8hP1imTgag==}
|
resolution: {integrity: sha512-4a5gf2jpS0AIe7uBjxDeUMNcFmaRTbNv7NxI5xOCs4lhzsVyGR/0qBXduPnoWf6dGC365saTiwag8hP1imTgag==}
|
||||||
cpu: [s390x]
|
cpu: [s390x]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-s390x-gnu@4.37.0':
|
|
||||||
resolution: {integrity: sha512-hZDDU5fgWvDdHFuExN1gBOhCuzo/8TMpidfOR+1cPZJflcEzXdCy1LjnklQdW8/Et9sryOPJAKAQRw8Jq7Tg+A==}
|
|
||||||
cpu: [s390x]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-x64-gnu@4.36.0':
|
'@rollup/rollup-linux-x64-gnu@4.36.0':
|
||||||
resolution: {integrity: sha512-5KtoW8UWmwFKQ96aQL3LlRXX16IMwyzMq/jSSVIIyAANiE1doaQsx/KRyhAvpHlPjPiSU/AYX/8m+lQ9VToxFQ==}
|
resolution: {integrity: sha512-5KtoW8UWmwFKQ96aQL3LlRXX16IMwyzMq/jSSVIIyAANiE1doaQsx/KRyhAvpHlPjPiSU/AYX/8m+lQ9VToxFQ==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-x64-gnu@4.37.0':
|
|
||||||
resolution: {integrity: sha512-pKivGpgJM5g8dwj0ywBwe/HeVAUSuVVJhUTa/URXjxvoyTT/AxsLTAbkHkDHG7qQxLoW2s3apEIl26uUe08LVQ==}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-x64-musl@4.36.0':
|
'@rollup/rollup-linux-x64-musl@4.36.0':
|
||||||
resolution: {integrity: sha512-sycrYZPrv2ag4OCvaN5js+f01eoZ2U+RmT5as8vhxiFz+kxwlHrsxOwKPSA8WyS+Wc6Epid9QeI/IkQ9NkgYyQ==}
|
resolution: {integrity: sha512-sycrYZPrv2ag4OCvaN5js+f01eoZ2U+RmT5as8vhxiFz+kxwlHrsxOwKPSA8WyS+Wc6Epid9QeI/IkQ9NkgYyQ==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-x64-musl@4.37.0':
|
|
||||||
resolution: {integrity: sha512-E2lPrLKE8sQbY/2bEkVTGDEk4/49UYRVWgj90MY8yPjpnGBQ+Xi1Qnr7b7UIWw1NOggdFQFOLZ8+5CzCiz143w==}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@rollup/rollup-win32-arm64-msvc@4.36.0':
|
'@rollup/rollup-win32-arm64-msvc@4.36.0':
|
||||||
resolution: {integrity: sha512-qbqt4N7tokFwwSVlWDsjfoHgviS3n/vZ8LK0h1uLG9TYIRuUTJC88E1xb3LM2iqZ/WTqNQjYrtmtGmrmmawB6A==}
|
resolution: {integrity: sha512-qbqt4N7tokFwwSVlWDsjfoHgviS3n/vZ8LK0h1uLG9TYIRuUTJC88E1xb3LM2iqZ/WTqNQjYrtmtGmrmmawB6A==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
'@rollup/rollup-win32-arm64-msvc@4.37.0':
|
|
||||||
resolution: {integrity: sha512-Jm7biMazjNzTU4PrQtr7VS8ibeys9Pn29/1bm4ph7CP2kf21950LgN+BaE2mJ1QujnvOc6p54eWWiVvn05SOBg==}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [win32]
|
|
||||||
|
|
||||||
'@rollup/rollup-win32-ia32-msvc@4.36.0':
|
'@rollup/rollup-win32-ia32-msvc@4.36.0':
|
||||||
resolution: {integrity: sha512-t+RY0JuRamIocMuQcfwYSOkmdX9dtkr1PbhKW42AMvaDQa+jOdpUYysroTF/nuPpAaQMWp7ye+ndlmmthieJrQ==}
|
resolution: {integrity: sha512-t+RY0JuRamIocMuQcfwYSOkmdX9dtkr1PbhKW42AMvaDQa+jOdpUYysroTF/nuPpAaQMWp7ye+ndlmmthieJrQ==}
|
||||||
cpu: [ia32]
|
cpu: [ia32]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
'@rollup/rollup-win32-ia32-msvc@4.37.0':
|
|
||||||
resolution: {integrity: sha512-e3/1SFm1OjefWICB2Ucstg2dxYDkDTZGDYgwufcbsxTHyqQps1UQf33dFEChBNmeSsTOyrjw2JJq0zbG5GF6RA==}
|
|
||||||
cpu: [ia32]
|
|
||||||
os: [win32]
|
|
||||||
|
|
||||||
'@rollup/rollup-win32-x64-msvc@4.36.0':
|
'@rollup/rollup-win32-x64-msvc@4.36.0':
|
||||||
resolution: {integrity: sha512-aRXd7tRZkWLqGbChgcMMDEHjOKudo1kChb1Jt1IfR8cY/KIpgNviLeJy5FUb9IpSuQj8dU2fAYNMPW/hLKOSTw==}
|
resolution: {integrity: sha512-aRXd7tRZkWLqGbChgcMMDEHjOKudo1kChb1Jt1IfR8cY/KIpgNviLeJy5FUb9IpSuQj8dU2fAYNMPW/hLKOSTw==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
'@rollup/rollup-win32-x64-msvc@4.37.0':
|
|
||||||
resolution: {integrity: sha512-LWbXUBwn/bcLx2sSsqy7pK5o+Nr+VCoRoAohfJ5C/aBio9nfJmGQqHAhU6pwxV/RmyTk5AqdySma7uwWGlmeuA==}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [win32]
|
|
||||||
|
|
||||||
'@socket.io/component-emitter@3.1.2':
|
'@socket.io/component-emitter@3.1.2':
|
||||||
resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==}
|
resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==}
|
||||||
|
|
||||||
@ -884,9 +775,6 @@ packages:
|
|||||||
'@types/node@22.13.11':
|
'@types/node@22.13.11':
|
||||||
resolution: {integrity: sha512-iEUCUJoU0i3VnrCmgoWCXttklWcvoCIx4jzcP22fioIVSdTmjgoEvmAO/QPw6TcS9k5FrNgn4w7q5lGOd1CT5g==}
|
resolution: {integrity: sha512-iEUCUJoU0i3VnrCmgoWCXttklWcvoCIx4jzcP22fioIVSdTmjgoEvmAO/QPw6TcS9k5FrNgn4w7q5lGOd1CT5g==}
|
||||||
|
|
||||||
'@types/node@22.13.13':
|
|
||||||
resolution: {integrity: sha512-ClsL5nMwKaBRwPcCvH8E7+nU4GxHVx1axNvMZTFHMEfNI7oahimt26P5zjVCRrjiIWj6YFXfE1v3dEp94wLcGQ==}
|
|
||||||
|
|
||||||
'@types/react@19.0.12':
|
'@types/react@19.0.12':
|
||||||
resolution: {integrity: sha512-V6Ar115dBDrjbtXSrS+/Oruobc+qVbbUxDFC1RSbRqLt5SYvxxyIDrSC85RWml54g+jfNeEMZhEj7wW07ONQhA==}
|
resolution: {integrity: sha512-V6Ar115dBDrjbtXSrS+/Oruobc+qVbbUxDFC1RSbRqLt5SYvxxyIDrSC85RWml54g+jfNeEMZhEj7wW07ONQhA==}
|
||||||
|
|
||||||
@ -2329,11 +2217,6 @@ packages:
|
|||||||
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
|
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
rollup@4.37.0:
|
|
||||||
resolution: {integrity: sha512-iAtQy/L4QFU+rTJ1YUjXqJOJzuwEghqWzCEYD2FEghT7Gsy1VdABntrO4CLopA5IkflTyqNiLNwPcOJ3S7UKLg==}
|
|
||||||
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
run-parallel@1.2.0:
|
run-parallel@1.2.0:
|
||||||
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
|
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
|
||||||
|
|
||||||
@ -3019,7 +2902,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
eventemitter3: 5.0.1
|
eventemitter3: 5.0.1
|
||||||
|
|
||||||
'@kevisual/local-app-manager@0.1.10(@kevisual/router@0.0.9)(@kevisual/types@0.0.6)(@kevisual/use-config@1.0.10(dotenv@16.4.7))(pm2@6.0.5)':
|
'@kevisual/local-app-manager@0.1.9(@kevisual/router@0.0.9)(@kevisual/types@0.0.6)(@kevisual/use-config@1.0.10(dotenv@16.4.7))(pm2@6.0.5)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@kevisual/router': 0.0.9
|
'@kevisual/router': 0.0.9
|
||||||
'@kevisual/types': 0.0.6
|
'@kevisual/types': 0.0.6
|
||||||
@ -3120,10 +3003,6 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
rollup: 4.36.0
|
rollup: 4.36.0
|
||||||
|
|
||||||
'@rollup/plugin-alias@5.1.1(rollup@4.37.0)':
|
|
||||||
optionalDependencies:
|
|
||||||
rollup: 4.37.0
|
|
||||||
|
|
||||||
'@rollup/plugin-commonjs@28.0.3(rollup@4.36.0)':
|
'@rollup/plugin-commonjs@28.0.3(rollup@4.36.0)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rollup/pluginutils': 5.1.2(rollup@4.36.0)
|
'@rollup/pluginutils': 5.1.2(rollup@4.36.0)
|
||||||
@ -3136,30 +3015,12 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
rollup: 4.36.0
|
rollup: 4.36.0
|
||||||
|
|
||||||
'@rollup/plugin-commonjs@28.0.3(rollup@4.37.0)':
|
|
||||||
dependencies:
|
|
||||||
'@rollup/pluginutils': 5.1.2(rollup@4.37.0)
|
|
||||||
commondir: 1.0.1
|
|
||||||
estree-walker: 2.0.2
|
|
||||||
fdir: 6.3.0(picomatch@4.0.2)
|
|
||||||
is-reference: 1.2.1
|
|
||||||
magic-string: 0.30.11
|
|
||||||
picomatch: 4.0.2
|
|
||||||
optionalDependencies:
|
|
||||||
rollup: 4.37.0
|
|
||||||
|
|
||||||
'@rollup/plugin-json@6.1.0(rollup@4.36.0)':
|
'@rollup/plugin-json@6.1.0(rollup@4.36.0)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rollup/pluginutils': 5.1.2(rollup@4.36.0)
|
'@rollup/pluginutils': 5.1.2(rollup@4.36.0)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
rollup: 4.36.0
|
rollup: 4.36.0
|
||||||
|
|
||||||
'@rollup/plugin-json@6.1.0(rollup@4.37.0)':
|
|
||||||
dependencies:
|
|
||||||
'@rollup/pluginutils': 5.1.2(rollup@4.37.0)
|
|
||||||
optionalDependencies:
|
|
||||||
rollup: 4.37.0
|
|
||||||
|
|
||||||
'@rollup/plugin-node-resolve@16.0.1(rollup@4.36.0)':
|
'@rollup/plugin-node-resolve@16.0.1(rollup@4.36.0)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rollup/pluginutils': 5.1.2(rollup@4.36.0)
|
'@rollup/pluginutils': 5.1.2(rollup@4.36.0)
|
||||||
@ -3170,16 +3031,6 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
rollup: 4.36.0
|
rollup: 4.36.0
|
||||||
|
|
||||||
'@rollup/plugin-node-resolve@16.0.1(rollup@4.37.0)':
|
|
||||||
dependencies:
|
|
||||||
'@rollup/pluginutils': 5.1.2(rollup@4.37.0)
|
|
||||||
'@types/resolve': 1.20.2
|
|
||||||
deepmerge: 4.3.1
|
|
||||||
is-module: 1.0.0
|
|
||||||
resolve: 1.22.8
|
|
||||||
optionalDependencies:
|
|
||||||
rollup: 4.37.0
|
|
||||||
|
|
||||||
'@rollup/plugin-replace@6.0.2(rollup@4.36.0)':
|
'@rollup/plugin-replace@6.0.2(rollup@4.36.0)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rollup/pluginutils': 5.1.2(rollup@4.36.0)
|
'@rollup/pluginutils': 5.1.2(rollup@4.36.0)
|
||||||
@ -3187,13 +3038,6 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
rollup: 4.36.0
|
rollup: 4.36.0
|
||||||
|
|
||||||
'@rollup/plugin-replace@6.0.2(rollup@4.37.0)':
|
|
||||||
dependencies:
|
|
||||||
'@rollup/pluginutils': 5.1.2(rollup@4.37.0)
|
|
||||||
magic-string: 0.30.11
|
|
||||||
optionalDependencies:
|
|
||||||
rollup: 4.37.0
|
|
||||||
|
|
||||||
'@rollup/plugin-typescript@12.1.2(rollup@4.36.0)(tslib@2.8.1)(typescript@5.8.2)':
|
'@rollup/plugin-typescript@12.1.2(rollup@4.36.0)(tslib@2.8.1)(typescript@5.8.2)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rollup/pluginutils': 5.1.2(rollup@4.36.0)
|
'@rollup/pluginutils': 5.1.2(rollup@4.36.0)
|
||||||
@ -3203,15 +3047,6 @@ snapshots:
|
|||||||
rollup: 4.36.0
|
rollup: 4.36.0
|
||||||
tslib: 2.8.1
|
tslib: 2.8.1
|
||||||
|
|
||||||
'@rollup/plugin-typescript@12.1.2(rollup@4.37.0)(tslib@2.8.1)(typescript@5.8.2)':
|
|
||||||
dependencies:
|
|
||||||
'@rollup/pluginutils': 5.1.2(rollup@4.37.0)
|
|
||||||
resolve: 1.22.8
|
|
||||||
typescript: 5.8.2
|
|
||||||
optionalDependencies:
|
|
||||||
rollup: 4.37.0
|
|
||||||
tslib: 2.8.1
|
|
||||||
|
|
||||||
'@rollup/pluginutils@5.1.2(rollup@4.36.0)':
|
'@rollup/pluginutils@5.1.2(rollup@4.36.0)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/estree': 1.0.6
|
'@types/estree': 1.0.6
|
||||||
@ -3220,131 +3055,63 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
rollup: 4.36.0
|
rollup: 4.36.0
|
||||||
|
|
||||||
'@rollup/pluginutils@5.1.2(rollup@4.37.0)':
|
|
||||||
dependencies:
|
|
||||||
'@types/estree': 1.0.6
|
|
||||||
estree-walker: 2.0.2
|
|
||||||
picomatch: 4.0.2
|
|
||||||
optionalDependencies:
|
|
||||||
rollup: 4.37.0
|
|
||||||
|
|
||||||
'@rollup/rollup-android-arm-eabi@4.36.0':
|
'@rollup/rollup-android-arm-eabi@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-android-arm-eabi@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-android-arm64@4.36.0':
|
'@rollup/rollup-android-arm64@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-android-arm64@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-darwin-arm64@4.36.0':
|
'@rollup/rollup-darwin-arm64@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-darwin-arm64@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-darwin-x64@4.36.0':
|
'@rollup/rollup-darwin-x64@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-darwin-x64@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-freebsd-arm64@4.36.0':
|
'@rollup/rollup-freebsd-arm64@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-freebsd-arm64@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-freebsd-x64@4.36.0':
|
'@rollup/rollup-freebsd-x64@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-freebsd-x64@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm-gnueabihf@4.36.0':
|
'@rollup/rollup-linux-arm-gnueabihf@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm-gnueabihf@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm-musleabihf@4.36.0':
|
'@rollup/rollup-linux-arm-musleabihf@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm-musleabihf@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm64-gnu@4.36.0':
|
'@rollup/rollup-linux-arm64-gnu@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm64-gnu@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm64-musl@4.36.0':
|
'@rollup/rollup-linux-arm64-musl@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm64-musl@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-loongarch64-gnu@4.36.0':
|
'@rollup/rollup-linux-loongarch64-gnu@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-loongarch64-gnu@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-powerpc64le-gnu@4.36.0':
|
'@rollup/rollup-linux-powerpc64le-gnu@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-powerpc64le-gnu@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-riscv64-gnu@4.36.0':
|
'@rollup/rollup-linux-riscv64-gnu@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-riscv64-gnu@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-riscv64-musl@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-s390x-gnu@4.36.0':
|
'@rollup/rollup-linux-s390x-gnu@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-s390x-gnu@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-x64-gnu@4.36.0':
|
'@rollup/rollup-linux-x64-gnu@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-x64-gnu@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-x64-musl@4.36.0':
|
'@rollup/rollup-linux-x64-musl@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-x64-musl@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-win32-arm64-msvc@4.36.0':
|
'@rollup/rollup-win32-arm64-msvc@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-win32-arm64-msvc@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-win32-ia32-msvc@4.36.0':
|
'@rollup/rollup-win32-ia32-msvc@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-win32-ia32-msvc@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rollup/rollup-win32-x64-msvc@4.36.0':
|
'@rollup/rollup-win32-x64-msvc@4.36.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-win32-x64-msvc@4.37.0':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@socket.io/component-emitter@3.1.2': {}
|
'@socket.io/component-emitter@3.1.2': {}
|
||||||
|
|
||||||
'@tootallnate/quickjs-emscripten@0.23.0': {}
|
'@tootallnate/quickjs-emscripten@0.23.0': {}
|
||||||
@ -3357,7 +3124,7 @@ snapshots:
|
|||||||
|
|
||||||
'@types/cors@2.8.17':
|
'@types/cors@2.8.17':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 22.13.13
|
'@types/node': 22.13.11
|
||||||
|
|
||||||
'@types/crypto-js@4.2.2': {}
|
'@types/crypto-js@4.2.2': {}
|
||||||
|
|
||||||
@ -3369,21 +3136,21 @@ snapshots:
|
|||||||
|
|
||||||
'@types/formidable@3.4.5':
|
'@types/formidable@3.4.5':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 22.13.13
|
'@types/node': 22.13.11
|
||||||
|
|
||||||
'@types/fs-extra@8.1.5':
|
'@types/fs-extra@8.1.5':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 22.13.13
|
'@types/node': 22.13.11
|
||||||
|
|
||||||
'@types/glob@7.2.0':
|
'@types/glob@7.2.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/minimatch': 5.1.2
|
'@types/minimatch': 5.1.2
|
||||||
'@types/node': 22.13.13
|
'@types/node': 22.13.11
|
||||||
|
|
||||||
'@types/jsonwebtoken@9.0.9':
|
'@types/jsonwebtoken@9.0.9':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/ms': 0.7.34
|
'@types/ms': 0.7.34
|
||||||
'@types/node': 22.13.13
|
'@types/node': 22.13.11
|
||||||
|
|
||||||
'@types/lodash-es@4.17.12':
|
'@types/lodash-es@4.17.12':
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -3397,23 +3164,19 @@ snapshots:
|
|||||||
|
|
||||||
'@types/node-forge@1.3.11':
|
'@types/node-forge@1.3.11':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 22.13.13
|
'@types/node': 22.13.11
|
||||||
|
|
||||||
'@types/node@22.13.11':
|
'@types/node@22.13.11':
|
||||||
dependencies:
|
dependencies:
|
||||||
undici-types: 6.20.0
|
undici-types: 6.20.0
|
||||||
|
|
||||||
'@types/node@22.13.13':
|
|
||||||
dependencies:
|
|
||||||
undici-types: 6.20.0
|
|
||||||
|
|
||||||
'@types/react@19.0.12':
|
'@types/react@19.0.12':
|
||||||
dependencies:
|
dependencies:
|
||||||
csstype: 3.1.3
|
csstype: 3.1.3
|
||||||
|
|
||||||
'@types/readdir-glob@1.1.5':
|
'@types/readdir-glob@1.1.5':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 22.13.13
|
'@types/node': 22.13.11
|
||||||
|
|
||||||
'@types/resolve@1.20.2': {}
|
'@types/resolve@1.20.2': {}
|
||||||
|
|
||||||
@ -3826,7 +3589,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@types/cookie': 0.4.1
|
'@types/cookie': 0.4.1
|
||||||
'@types/cors': 2.8.17
|
'@types/cors': 2.8.17
|
||||||
'@types/node': 22.13.13
|
'@types/node': 22.13.11
|
||||||
accepts: 1.3.8
|
accepts: 1.3.8
|
||||||
base64id: 2.0.0
|
base64id: 2.0.0
|
||||||
cookie: 0.4.2
|
cookie: 0.4.2
|
||||||
@ -4976,14 +4739,6 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@babel/code-frame': 7.26.2
|
'@babel/code-frame': 7.26.2
|
||||||
|
|
||||||
rollup-plugin-dts@6.2.1(rollup@4.37.0)(typescript@5.8.2):
|
|
||||||
dependencies:
|
|
||||||
magic-string: 0.30.17
|
|
||||||
rollup: 4.37.0
|
|
||||||
typescript: 5.8.2
|
|
||||||
optionalDependencies:
|
|
||||||
'@babel/code-frame': 7.26.2
|
|
||||||
|
|
||||||
rollup-plugin-esbuild@6.2.1(esbuild@0.25.0)(rollup@4.36.0):
|
rollup-plugin-esbuild@6.2.1(esbuild@0.25.0)(rollup@4.36.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.4.0
|
debug: 4.4.0
|
||||||
@ -4995,17 +4750,6 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
rollup-plugin-esbuild@6.2.1(esbuild@0.25.0)(rollup@4.37.0):
|
|
||||||
dependencies:
|
|
||||||
debug: 4.4.0
|
|
||||||
es-module-lexer: 1.6.0
|
|
||||||
esbuild: 0.25.0
|
|
||||||
get-tsconfig: 4.10.0
|
|
||||||
rollup: 4.37.0
|
|
||||||
unplugin-utils: 0.2.4
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- supports-color
|
|
||||||
|
|
||||||
rollup@4.36.0:
|
rollup@4.36.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/estree': 1.0.6
|
'@types/estree': 1.0.6
|
||||||
@ -5031,32 +4775,6 @@ snapshots:
|
|||||||
'@rollup/rollup-win32-x64-msvc': 4.36.0
|
'@rollup/rollup-win32-x64-msvc': 4.36.0
|
||||||
fsevents: 2.3.3
|
fsevents: 2.3.3
|
||||||
|
|
||||||
rollup@4.37.0:
|
|
||||||
dependencies:
|
|
||||||
'@types/estree': 1.0.6
|
|
||||||
optionalDependencies:
|
|
||||||
'@rollup/rollup-android-arm-eabi': 4.37.0
|
|
||||||
'@rollup/rollup-android-arm64': 4.37.0
|
|
||||||
'@rollup/rollup-darwin-arm64': 4.37.0
|
|
||||||
'@rollup/rollup-darwin-x64': 4.37.0
|
|
||||||
'@rollup/rollup-freebsd-arm64': 4.37.0
|
|
||||||
'@rollup/rollup-freebsd-x64': 4.37.0
|
|
||||||
'@rollup/rollup-linux-arm-gnueabihf': 4.37.0
|
|
||||||
'@rollup/rollup-linux-arm-musleabihf': 4.37.0
|
|
||||||
'@rollup/rollup-linux-arm64-gnu': 4.37.0
|
|
||||||
'@rollup/rollup-linux-arm64-musl': 4.37.0
|
|
||||||
'@rollup/rollup-linux-loongarch64-gnu': 4.37.0
|
|
||||||
'@rollup/rollup-linux-powerpc64le-gnu': 4.37.0
|
|
||||||
'@rollup/rollup-linux-riscv64-gnu': 4.37.0
|
|
||||||
'@rollup/rollup-linux-riscv64-musl': 4.37.0
|
|
||||||
'@rollup/rollup-linux-s390x-gnu': 4.37.0
|
|
||||||
'@rollup/rollup-linux-x64-gnu': 4.37.0
|
|
||||||
'@rollup/rollup-linux-x64-musl': 4.37.0
|
|
||||||
'@rollup/rollup-win32-arm64-msvc': 4.37.0
|
|
||||||
'@rollup/rollup-win32-ia32-msvc': 4.37.0
|
|
||||||
'@rollup/rollup-win32-x64-msvc': 4.37.0
|
|
||||||
fsevents: 2.3.3
|
|
||||||
|
|
||||||
run-parallel@1.2.0:
|
run-parallel@1.2.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
queue-microtask: 1.2.3
|
queue-microtask: 1.2.3
|
||||||
@ -5424,7 +5142,7 @@ snapshots:
|
|||||||
picocolors: 1.1.1
|
picocolors: 1.1.1
|
||||||
postcss-load-config: 6.0.1(tsx@4.19.3)
|
postcss-load-config: 6.0.1(tsx@4.19.3)
|
||||||
resolve-from: 5.0.0
|
resolve-from: 5.0.0
|
||||||
rollup: 4.37.0
|
rollup: 4.36.0
|
||||||
source-map: 0.8.0-beta.0
|
source-map: 0.8.0-beta.0
|
||||||
sucrase: 3.35.0
|
sucrase: 3.35.0
|
||||||
tinyexec: 0.3.2
|
tinyexec: 0.3.2
|
||||||
@ -5603,7 +5321,7 @@ snapshots:
|
|||||||
|
|
||||||
wkx@0.5.0:
|
wkx@0.5.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 22.13.13
|
'@types/node': 22.13.11
|
||||||
|
|
||||||
wrap-ansi@7.0.0:
|
wrap-ansi@7.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
import { App } from '@kevisual/router';
|
import { App } from '@kevisual/router';
|
||||||
|
import { useConfig } from '@kevisual/use-config';
|
||||||
import * as redisLib from './modules/redis.ts';
|
import * as redisLib from './modules/redis.ts';
|
||||||
import * as minioLib from './modules/minio.ts';
|
import * as minioLib from './modules/minio.ts';
|
||||||
import * as sequelizeLib from './modules/sequelize.ts';
|
import * as sequelizeLib from './modules/sequelize.ts';
|
||||||
import { useContextKey, useContext } from '@kevisual/use-config/context';
|
import { useContextKey, useContext } from '@kevisual/use-config/context';
|
||||||
import { SimpleRouter } from '@kevisual/router/simple';
|
import { SimpleRouter } from '@kevisual/router/simple';
|
||||||
import { OssBase } from '@kevisual/oss/services';
|
import { OssBase } from '@kevisual/oss/services';
|
||||||
|
useConfig();
|
||||||
export const router = useContextKey('router', () => new SimpleRouter());
|
export const router = useContextKey('router', () => new SimpleRouter());
|
||||||
export const oss = useContextKey(
|
export const oss = useContextKey(
|
||||||
'oss',
|
'oss',
|
||||||
|
10
src/index.ts
10
src/index.ts
@ -1,11 +1,13 @@
|
|||||||
import { config } from './modules/config.ts';
|
import { useConfig } from '@kevisual/use-config';
|
||||||
import { app } from './app.ts';
|
import { app } from './app.ts';
|
||||||
import './route.ts';
|
import './route.ts';
|
||||||
|
const config = useConfig();
|
||||||
import { uploadMiddleware } from './routes-simple/upload.ts';
|
import { uploadMiddleware } from './routes-simple/upload.ts';
|
||||||
import { port } from './modules/config.ts';
|
|
||||||
|
|
||||||
// if (import.meta.url === `file://${process.argv[1]}`) {
|
// if (import.meta.url === `file://${process.argv[1]}`) {
|
||||||
app.listen(port, () => {
|
app.listen(config.port, () => {
|
||||||
console.log(`server is running at http://localhost:${port}`);
|
console.log(`server is running at http://localhost:${config.port}`);
|
||||||
});
|
});
|
||||||
app.server.on(uploadMiddleware);
|
app.server.on(uploadMiddleware);
|
||||||
|
|
||||||
|
console.log(`run ${config.appName} done`);
|
||||||
|
@ -1,3 +1,292 @@
|
|||||||
|
// import { useConfig } from '@kevisual/use-config';
|
||||||
|
// import { DataTypes, Model, Op, Sequelize } from 'sequelize';
|
||||||
|
// import { createToken, checkToken } from '@kevisual/auth';
|
||||||
|
// import { cryptPwd } from '@kevisual/auth';
|
||||||
|
// import { customRandom, nanoid, customAlphabet } from 'nanoid';
|
||||||
|
// import { CustomError } from '@kevisual/router';
|
||||||
|
// import { Org } from './org.ts';
|
||||||
|
|
||||||
|
// import { useContextKey } from '@kevisual/use-config/context';
|
||||||
|
// import { Redis } from 'ioredis';
|
||||||
|
// export const redis = useContextKey<Redis>('redis');
|
||||||
|
// const sequelize = useContextKey<Sequelize>('sequelize');
|
||||||
|
// const config = useConfig<{ tokenSecret: string }>();
|
||||||
|
|
||||||
|
// type UserData = {
|
||||||
|
// orgs?: string[];
|
||||||
|
// };
|
||||||
|
// export class User extends Model {
|
||||||
|
// declare id: string;
|
||||||
|
// declare username: string;
|
||||||
|
// declare nickname: string; // 昵称
|
||||||
|
// declare alias: string; // 别名
|
||||||
|
// declare password: string;
|
||||||
|
// declare salt: string;
|
||||||
|
// declare needChangePassword: boolean;
|
||||||
|
// declare description: string;
|
||||||
|
// declare data: UserData;
|
||||||
|
// declare type: string; // user | org | visitor
|
||||||
|
// declare owner: string;
|
||||||
|
// declare orgId: string;
|
||||||
|
// declare email: string;
|
||||||
|
// declare avatar: string;
|
||||||
|
// tokenUser: any;
|
||||||
|
// setTokenUser(tokenUser: any) {
|
||||||
|
// this.tokenUser = tokenUser;
|
||||||
|
// }
|
||||||
|
// /**
|
||||||
|
// * uid 是用于 orgId 的用户id 真实用户的id
|
||||||
|
// * @param uid
|
||||||
|
// * @returns
|
||||||
|
// */
|
||||||
|
// async createToken(uid?: string, loginType?: 'default' | 'plugin' | 'month' | 'season' | 'year') {
|
||||||
|
// const { id, username, type } = this;
|
||||||
|
// let expireTime = 60 * 60 * 24 * 7; // 7 days
|
||||||
|
// switch (loginType) {
|
||||||
|
// case 'plugin':
|
||||||
|
// expireTime = 60 * 60 * 24 * 30 * 12; // 365 days
|
||||||
|
// break;
|
||||||
|
// case 'month':
|
||||||
|
// expireTime = 60 * 60 * 24 * 30; // 30 days
|
||||||
|
// break;
|
||||||
|
// case 'season':
|
||||||
|
// expireTime = 60 * 60 * 24 * 30 * 3; // 90 days
|
||||||
|
// break;
|
||||||
|
// case 'year':
|
||||||
|
// expireTime = 60 * 60 * 24 * 30 * 12; // 365 days
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// const now = new Date().getTime();
|
||||||
|
// const token = await createToken({ id, username, uid, type }, config.tokenSecret);
|
||||||
|
// return { token, expireTime: now + expireTime };
|
||||||
|
// }
|
||||||
|
// static async verifyToken(token: string) {
|
||||||
|
// const ct = await checkToken(token, config.tokenSecret);
|
||||||
|
// const tokenUser = ct.payload;
|
||||||
|
// return tokenUser;
|
||||||
|
// }
|
||||||
|
// static async createUser(username: string, password?: string, description?: string) {
|
||||||
|
// const user = await User.findOne({ where: { username } });
|
||||||
|
// if (user) {
|
||||||
|
// throw new CustomError('User already exists');
|
||||||
|
// }
|
||||||
|
// const salt = nanoid(6);
|
||||||
|
// let needChangePassword = !password;
|
||||||
|
// password = password || '123456';
|
||||||
|
// const cPassword = cryptPwd(password, salt);
|
||||||
|
// return await User.create({ username, password: cPassword, description, salt, needChangePassword });
|
||||||
|
// }
|
||||||
|
// static async createOrg(username: string, owner: string, description?: string) {
|
||||||
|
// const user = await User.findOne({ where: { username } });
|
||||||
|
// if (user) {
|
||||||
|
// throw new CustomError('User already exists');
|
||||||
|
// }
|
||||||
|
// const me = await User.findByPk(owner);
|
||||||
|
// if (!me) {
|
||||||
|
// throw new CustomError('Owner not found');
|
||||||
|
// }
|
||||||
|
// if (me.type !== 'user') {
|
||||||
|
// throw new CustomError('Owner type is not user');
|
||||||
|
// }
|
||||||
|
// const org = await Org.create({ username, description, users: [{ uid: owner, role: 'owner' }] });
|
||||||
|
// const newUser = await User.create({ username, password: '', description, type: 'org', owner, orgId: org.id });
|
||||||
|
// // owner add
|
||||||
|
// await redis.del(`user:${me.id}:orgs`);
|
||||||
|
// return newUser;
|
||||||
|
// }
|
||||||
|
// createPassword(password: string) {
|
||||||
|
// const salt = this.salt;
|
||||||
|
// const cPassword = cryptPwd(password, salt);
|
||||||
|
// this.password = cPassword;
|
||||||
|
// return cPassword;
|
||||||
|
// }
|
||||||
|
// checkPassword(password: string) {
|
||||||
|
// const salt = this.salt;
|
||||||
|
// const cPassword = cryptPwd(password, salt);
|
||||||
|
// return this.password === cPassword;
|
||||||
|
// }
|
||||||
|
// async getInfo() {
|
||||||
|
// const orgs = await this.getOrgs();
|
||||||
|
// return {
|
||||||
|
// id: this.id,
|
||||||
|
// username: this.username,
|
||||||
|
// nickname: this.nickname,
|
||||||
|
// description: this.description,
|
||||||
|
// needChangePassword: this.needChangePassword,
|
||||||
|
// type: this.type,
|
||||||
|
// avatar: this.avatar,
|
||||||
|
// orgs,
|
||||||
|
// };
|
||||||
|
// }
|
||||||
|
// async getOrgs() {
|
||||||
|
// let id = this.id;
|
||||||
|
// if (this.type === 'org') {
|
||||||
|
// if (this.tokenUser && this.tokenUser.uid) {
|
||||||
|
// id = this.tokenUser.uid;
|
||||||
|
// } else {
|
||||||
|
// console.log('getOrgs', 'no uid', this.id, this.username);
|
||||||
|
// throw new CustomError('Permission denied');
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// const cache = await redis.get(`user:${id}:orgs`);
|
||||||
|
// if (cache) {
|
||||||
|
// return JSON.parse(cache) as string[];
|
||||||
|
// }
|
||||||
|
// const orgs = await Org.findAll({
|
||||||
|
// order: [['updatedAt', 'DESC']],
|
||||||
|
// where: {
|
||||||
|
// users: {
|
||||||
|
// [Op.contains]: [
|
||||||
|
// {
|
||||||
|
// uid: id,
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
// const orgNames = orgs.map((org) => org.username);
|
||||||
|
// if (orgNames.length > 0) {
|
||||||
|
// await redis.set(`user:${id}:orgs`, JSON.stringify(orgNames), 'EX', 60 * 60); // 1 hour
|
||||||
|
// }
|
||||||
|
// return orgNames;
|
||||||
|
// }
|
||||||
|
// async expireOrgs() {
|
||||||
|
// await redis.del(`user:${this.id}:orgs`);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// User.init(
|
||||||
|
// {
|
||||||
|
// id: {
|
||||||
|
// type: DataTypes.UUID,
|
||||||
|
// primaryKey: true,
|
||||||
|
// defaultValue: DataTypes.UUIDV4,
|
||||||
|
// },
|
||||||
|
// username: {
|
||||||
|
// type: DataTypes.STRING,
|
||||||
|
// allowNull: false,
|
||||||
|
// unique: true,
|
||||||
|
// // 用户名或者手机号
|
||||||
|
// // 创建后避免修改的字段,当注册用户后,用户名注册则默认不能用手机号
|
||||||
|
// },
|
||||||
|
// nickname: {
|
||||||
|
// type: DataTypes.TEXT,
|
||||||
|
// allowNull: true,
|
||||||
|
// },
|
||||||
|
// alias: {
|
||||||
|
// type: DataTypes.TEXT,
|
||||||
|
// allowNull: true, // 别名,网络请求的别名,需要唯一,不能和username重复
|
||||||
|
// defaultValue: '',
|
||||||
|
// },
|
||||||
|
// password: {
|
||||||
|
// type: DataTypes.STRING,
|
||||||
|
// allowNull: true,
|
||||||
|
// },
|
||||||
|
// email: {
|
||||||
|
// type: DataTypes.STRING,
|
||||||
|
// allowNull: true,
|
||||||
|
// },
|
||||||
|
// avatar: {
|
||||||
|
// type: DataTypes.TEXT,
|
||||||
|
// allowNull: true,
|
||||||
|
// },
|
||||||
|
// salt: {
|
||||||
|
// type: DataTypes.STRING,
|
||||||
|
// allowNull: true,
|
||||||
|
// },
|
||||||
|
// description: {
|
||||||
|
// type: DataTypes.TEXT,
|
||||||
|
// },
|
||||||
|
// type: {
|
||||||
|
// type: DataTypes.STRING,
|
||||||
|
// defaultValue: 'user',
|
||||||
|
// },
|
||||||
|
// owner: {
|
||||||
|
// type: DataTypes.UUID,
|
||||||
|
// },
|
||||||
|
// orgId: {
|
||||||
|
// type: DataTypes.UUID,
|
||||||
|
// },
|
||||||
|
// needChangePassword: {
|
||||||
|
// type: DataTypes.BOOLEAN,
|
||||||
|
// defaultValue: false,
|
||||||
|
// },
|
||||||
|
// data: {
|
||||||
|
// type: DataTypes.JSONB,
|
||||||
|
// defaultValue: {},
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// sequelize,
|
||||||
|
// tableName: 'cf_user', // codeflow user
|
||||||
|
// paranoid: true,
|
||||||
|
// },
|
||||||
|
// );
|
||||||
|
// User.sync({ alter: true, logging: false })
|
||||||
|
// .then((res) => {
|
||||||
|
// initializeUser();
|
||||||
|
// })
|
||||||
|
// .catch((err) => {
|
||||||
|
// console.error('Sync User error', err);
|
||||||
|
// });
|
||||||
|
|
||||||
|
// const letter = 'abcdefghijklmnopqrstuvwxyz';
|
||||||
|
// const custom = customAlphabet(letter, 6);
|
||||||
|
// export const initializeUser = async (pwd = custom()) => {
|
||||||
|
// const w = await User.findOne({ where: { username: 'root' }, logging: false });
|
||||||
|
// if (!w) {
|
||||||
|
// const root = await User.createUser('root', pwd, '系统管理员');
|
||||||
|
// const org = await User.createOrg('admin', root.id, '管理员');
|
||||||
|
// console.info(' new Users name', root.username, org.username);
|
||||||
|
// console.info('new Users root password', pwd);
|
||||||
|
// console.info('new Users id', root.id, org.id);
|
||||||
|
// const demo = await createDemoUser();
|
||||||
|
// return {
|
||||||
|
// code: 200,
|
||||||
|
// data: { root, org, pwd: pwd, demo },
|
||||||
|
// };
|
||||||
|
// } else {
|
||||||
|
// return {
|
||||||
|
// code: 500,
|
||||||
|
// message: 'Users has been created',
|
||||||
|
// };
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
// export const createDemoUser = async (username = 'demo', pwd = custom()) => {
|
||||||
|
// const u = await User.findOne({ where: { username }, logging: false });
|
||||||
|
// if (!u) {
|
||||||
|
// const user = await User.createUser(username, pwd, 'demo');
|
||||||
|
// console.info('new Users name', user.username, pwd);
|
||||||
|
// return {
|
||||||
|
// code: 200,
|
||||||
|
// data: { user, pwd: pwd },
|
||||||
|
// };
|
||||||
|
// } else {
|
||||||
|
// console.info('Users has been created', u.username);
|
||||||
|
// return {
|
||||||
|
// code: 500,
|
||||||
|
// message: 'Users has been created',
|
||||||
|
// };
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
// // initializeUser();
|
||||||
|
|
||||||
|
// export class UserServices extends User {
|
||||||
|
// static async loginByPhone(phone: string) {
|
||||||
|
// let user = await User.findOne({ where: { username: phone } });
|
||||||
|
// let isNew = false;
|
||||||
|
// if (!user) {
|
||||||
|
// user = await User.createUser(phone, phone.slice(-6));
|
||||||
|
// isNew = true;
|
||||||
|
// }
|
||||||
|
// const token = await user.createToken(null, 'season');
|
||||||
|
// return { ...token, isNew };
|
||||||
|
// }
|
||||||
|
// static initializeUser = initializeUser;
|
||||||
|
// static createDemoUser = createDemoUser;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// useContextKey('UserModel', () => UserServices);
|
||||||
|
|
||||||
import { User, UserInit, UserServices } from '@kevisual/code-center-module/models';
|
import { User, UserInit, UserServices } from '@kevisual/code-center-module/models';
|
||||||
export { User, UserInit, UserServices };
|
export { User, UserInit, UserServices };
|
||||||
import { OrgInit } from '@kevisual/code-center-module/models';
|
import { OrgInit } from '@kevisual/code-center-module/models';
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
import path from 'path';
|
|
||||||
import dotenv from 'dotenv';
|
|
||||||
|
|
||||||
const envFiles = [
|
|
||||||
path.resolve(process.cwd(), '.env.dev'),
|
|
||||||
path.resolve(process.cwd(), '.env'),
|
|
||||||
];
|
|
||||||
dotenv.config({
|
|
||||||
path: envFiles,
|
|
||||||
});
|
|
||||||
|
|
||||||
export const config = process.env;
|
|
||||||
export const port = config.PORT || 4005;
|
|
@ -1,5 +1,11 @@
|
|||||||
|
import { useConfig } from '@kevisual/use-config';
|
||||||
|
|
||||||
|
type MinioConfig = {
|
||||||
|
domain: string;
|
||||||
|
};
|
||||||
|
const config = useConfig<MinioConfig>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用来放cookie的域名
|
* 用来放cookie的域名
|
||||||
*/
|
*/
|
||||||
export const domain = process.env.DOMAIN || ''; // 请在这里填写你的域名
|
export const domain = config.domain || ''; // 请在这里填写你的域名
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
import { Client, ClientOptions } from 'minio';
|
import { Client, ClientOptions } from 'minio';
|
||||||
|
import { useConfig } from '@kevisual/use-config';
|
||||||
|
|
||||||
const minioConfig = {
|
type MinioConfig = {
|
||||||
endPoint: process.env.MINIO_ENDPOINT || 'localhost',
|
minio: ClientOptions & { bucketName: string };
|
||||||
port: parseInt(process.env.MINIO_PORT || '9000'),
|
|
||||||
useSSL: process.env.MINIO_USE_SSL === 'true',
|
|
||||||
accessKey: process.env.MINIO_ACCESS_KEY,
|
|
||||||
secretKey: process.env.MINIO_SECRET_KEY,
|
|
||||||
};
|
};
|
||||||
export const minioClient = new Client(minioConfig);
|
const config = useConfig<MinioConfig>();
|
||||||
|
|
||||||
export const bucketName = process.env.MINIO_BUCKET_NAME || 'resources';
|
const { bucketName, ...minioRest } = config.minio;
|
||||||
|
export const minioClient = new Client(minioRest);
|
||||||
|
export { bucketName };
|
||||||
if (!minioClient) {
|
if (!minioClient) {
|
||||||
throw new Error('Minio client not initialized');
|
throw new Error('Minio client not initialized');
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
import { Redis } from 'ioredis';
|
import { Redis } from 'ioredis';
|
||||||
|
import { useConfig } from '@kevisual/use-config';
|
||||||
|
|
||||||
|
const config = useConfig<{
|
||||||
|
redis: ConstructorParameters<typeof Redis>;
|
||||||
|
}>();
|
||||||
// 配置 Redis 连接
|
// 配置 Redis 连接
|
||||||
export const redis = new Redis({
|
export const redis = new Redis({
|
||||||
host: 'localhost', // Redis 服务器的主机名或 IP 地址
|
host: 'localhost', // Redis 服务器的主机名或 IP 地址
|
||||||
@ -12,6 +16,7 @@ export const redis = new Redis({
|
|||||||
return Math.min(times * 50, 2000); // 每次重试时延迟增加
|
return Math.min(times * 50, 2000); // 每次重试时延迟增加
|
||||||
},
|
},
|
||||||
maxRetriesPerRequest: null, // 允许请求重试的次数 (如果需要无限次重试)
|
maxRetriesPerRequest: null, // 允许请求重试的次数 (如果需要无限次重试)
|
||||||
|
...config.redis,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 监听连接事件
|
// 监听连接事件
|
||||||
@ -26,3 +31,4 @@ redis.on('error', (err) => {
|
|||||||
// 初始化 Redis 客户端
|
// 初始化 Redis 客户端
|
||||||
export const redisPublisher = new Redis(); // 用于发布消息
|
export const redisPublisher = new Redis(); // 用于发布消息
|
||||||
export const redisSubscriber = new Redis(); // 用于订阅消息
|
export const redisSubscriber = new Redis(); // 用于订阅消息
|
||||||
|
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
|
import { useConfig } from '@kevisual/use-config';
|
||||||
import childProcess from 'child_process';
|
import childProcess from 'child_process';
|
||||||
|
const config = useConfig<{
|
||||||
|
appName: string;
|
||||||
|
}>();
|
||||||
|
|
||||||
export const selfRestart = async () => {
|
export const selfRestart = async () => {
|
||||||
const appName = 'codecenter';
|
const appName = config.appName || 'codecenter';
|
||||||
// 检测 pm2 是否安装和是否有 appName 这个应用
|
// 检测 pm2 是否安装和是否有 appName 这个应用
|
||||||
try {
|
try {
|
||||||
const res = childProcess.execSync(`pm2 list`);
|
const res = childProcess.execSync(`pm2 list`);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
import { useConfig } from '@kevisual/use-config';
|
||||||
import { Sequelize } from 'sequelize';
|
import { Sequelize } from 'sequelize';
|
||||||
import { config } from './config.ts';
|
|
||||||
export type PostgresConfig = {
|
type PostgresConfig = {
|
||||||
postgres: {
|
postgres: {
|
||||||
username: string;
|
username: string;
|
||||||
password: string;
|
password: string;
|
||||||
@ -9,17 +10,14 @@ export type PostgresConfig = {
|
|||||||
database: string;
|
database: string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
if (!config.POSTGRES_PASSWORD || !config.POSTGRES_USER) {
|
const config = useConfig<PostgresConfig>();
|
||||||
console.error('postgres config is required password and user');
|
|
||||||
|
const postgresConfig = config.postgres;
|
||||||
|
|
||||||
|
if (!postgresConfig) {
|
||||||
|
console.error('postgres config is required');
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
const postgresConfig = {
|
|
||||||
username: config.POSTGRES_USER,
|
|
||||||
password: config.POSTGRES_PASSWORD,
|
|
||||||
host: config.POSTGRES_HOST || 'localhost',
|
|
||||||
port: parseInt(config.POSTGRES_PORT || '5432'),
|
|
||||||
database: config.POSTGRES_DB || 'postgres',
|
|
||||||
};
|
|
||||||
// connect to db
|
// connect to db
|
||||||
export const sequelize = new Sequelize({
|
export const sequelize = new Sequelize({
|
||||||
dialect: 'postgres',
|
dialect: 'postgres',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { app } from '@/app.ts';
|
import { app } from '@/app.ts';
|
||||||
import { AppModel } from '../module/app.ts';
|
import { AppModel } from './module/app.ts';
|
||||||
import { AppDomainModel } from '../module/app-domain.ts';
|
import { AppDomainModel } from './module/app-domain.ts';
|
||||||
|
|
||||||
app
|
app
|
||||||
.route({
|
.route({
|
||||||
@ -12,7 +12,7 @@ app
|
|||||||
// const query = {
|
// const query = {
|
||||||
// }
|
// }
|
||||||
const domainInfo = await AppDomainModel.findOne({ where: { domain } });
|
const domainInfo = await AppDomainModel.findOne({ where: { domain } });
|
||||||
if (!domainInfo || !domainInfo.appId) {
|
if (!domainInfo) {
|
||||||
ctx.throw(404, 'app not found');
|
ctx.throw(404, 'app not found');
|
||||||
}
|
}
|
||||||
const app = await AppModel.findByPk(domainInfo.appId);
|
const app = await AppModel.findByPk(domainInfo.appId);
|
@ -1,2 +0,0 @@
|
|||||||
import './domain-self.ts';
|
|
||||||
import './manager.ts';
|
|
@ -1,125 +0,0 @@
|
|||||||
import { app } from '@/app.ts';
|
|
||||||
import { AppDomainModel } from '../module/app-domain.ts';
|
|
||||||
import { AppModel } from '../module/app.ts';
|
|
||||||
import { CustomError } from '@kevisual/router';
|
|
||||||
|
|
||||||
app
|
|
||||||
.route({
|
|
||||||
path: 'app.domain.manager',
|
|
||||||
key: 'list',
|
|
||||||
middleware: ['auth-admin'],
|
|
||||||
})
|
|
||||||
.define(async (ctx) => {
|
|
||||||
const { page = 1, pageSize = 999 } = ctx.query.data || {};
|
|
||||||
const { count, rows } = await AppDomainModel.findAndCountAll({
|
|
||||||
offset: (page - 1) * pageSize,
|
|
||||||
limit: pageSize,
|
|
||||||
});
|
|
||||||
ctx.body = { count, list: rows, pagination: { page, pageSize } };
|
|
||||||
return ctx;
|
|
||||||
})
|
|
||||||
.addTo(app);
|
|
||||||
|
|
||||||
app
|
|
||||||
.route({
|
|
||||||
path: 'app.domain.manager',
|
|
||||||
key: 'update',
|
|
||||||
middleware: ['auth-admin'],
|
|
||||||
})
|
|
||||||
.define(async (ctx) => {
|
|
||||||
const { domain, data, id, ...rest } = ctx.query.data || {};
|
|
||||||
if (!domain) {
|
|
||||||
ctx.throw(400, 'domain is required');
|
|
||||||
}
|
|
||||||
let domainInfo: AppDomainModel;
|
|
||||||
if (id) {
|
|
||||||
domainInfo = await AppDomainModel.findByPk(id);
|
|
||||||
} else {
|
|
||||||
domainInfo = await AppDomainModel.create({ domain });
|
|
||||||
}
|
|
||||||
const checkAppId = async () => {
|
|
||||||
const isUUID = (id: string) => {
|
|
||||||
return /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(id);
|
|
||||||
};
|
|
||||||
if (rest.appId) {
|
|
||||||
if (!isUUID(rest.appId)) {
|
|
||||||
ctx.throw(400, 'appId is not valid');
|
|
||||||
}
|
|
||||||
const appInfo = await AppModel.findByPk(rest.appId);
|
|
||||||
if (!appInfo) {
|
|
||||||
ctx.throw(400, 'appId is not exist');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
try {
|
|
||||||
if (!domainInfo) {
|
|
||||||
domainInfo = await AppDomainModel.create({ domain, data: {}, ...rest });
|
|
||||||
await checkAppId();
|
|
||||||
} else {
|
|
||||||
if (rest.status && domainInfo.status !== rest.status) {
|
|
||||||
await domainInfo.clearCache();
|
|
||||||
}
|
|
||||||
await checkAppId();
|
|
||||||
await domainInfo.update({
|
|
||||||
domain,
|
|
||||||
data: {
|
|
||||||
...domainInfo.data,
|
|
||||||
...data,
|
|
||||||
},
|
|
||||||
...rest,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
ctx.body = domainInfo;
|
|
||||||
} catch (error) {
|
|
||||||
if (error.code) {
|
|
||||||
ctx.throw(error.code, error.message);
|
|
||||||
}
|
|
||||||
console.error(error);
|
|
||||||
ctx.throw(500, 'update domain failed, please check the data');
|
|
||||||
}
|
|
||||||
|
|
||||||
return ctx;
|
|
||||||
})
|
|
||||||
.addTo(app);
|
|
||||||
|
|
||||||
app
|
|
||||||
.route({
|
|
||||||
path: 'app.domain.manager',
|
|
||||||
key: 'delete',
|
|
||||||
middleware: ['auth-admin'],
|
|
||||||
})
|
|
||||||
.define(async (ctx) => {
|
|
||||||
const { id, domain } = ctx.query.data || {};
|
|
||||||
if (!id && !domain) {
|
|
||||||
ctx.throw(400, 'id or domain is required');
|
|
||||||
}
|
|
||||||
if (id) {
|
|
||||||
await AppDomainModel.destroy({ where: { id }, force: true });
|
|
||||||
} else {
|
|
||||||
await AppDomainModel.destroy({ where: { domain }, force: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.body = { message: 'delete domain success' };
|
|
||||||
return ctx;
|
|
||||||
})
|
|
||||||
.addTo(app);
|
|
||||||
|
|
||||||
app
|
|
||||||
.route({
|
|
||||||
path: 'app.domain.manager',
|
|
||||||
key: 'get',
|
|
||||||
middleware: ['auth-admin'],
|
|
||||||
})
|
|
||||||
.define(async (ctx) => {
|
|
||||||
const { id, domain } = ctx.query.data || {};
|
|
||||||
if (!id && !domain) {
|
|
||||||
ctx.throw(400, 'id or domain is required');
|
|
||||||
}
|
|
||||||
const domainInfo = await AppDomainModel.findOne({ where: { id } });
|
|
||||||
if (!domainInfo) {
|
|
||||||
ctx.throw(404, 'domain not found');
|
|
||||||
}
|
|
||||||
ctx.body = domainInfo;
|
|
||||||
return ctx;
|
|
||||||
})
|
|
||||||
.addTo(app);
|
|
@ -2,6 +2,6 @@ import './list.ts';
|
|||||||
import './user-app.ts';
|
import './user-app.ts';
|
||||||
|
|
||||||
import './public/index.ts';
|
import './public/index.ts';
|
||||||
import './domain/index.ts';
|
import './domain.ts';
|
||||||
|
|
||||||
export * from './module/index.ts';
|
export * from './module/index.ts';
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { sequelize } from '../../../modules/sequelize.ts';
|
import { sequelize } from '../../../modules/sequelize.ts';
|
||||||
import { DataTypes, Model } from 'sequelize';
|
import { DataTypes, Model } from 'sequelize';
|
||||||
export type DomainList = Partial<InstanceType<typeof AppDomainModel>>;
|
export type DomainList = Partial<InstanceType<typeof AppDomainModel>>;
|
||||||
import { redis } from '../../../modules/redis.ts';
|
|
||||||
|
|
||||||
// 审核,通过,驳回
|
// 审核,通过,驳回
|
||||||
const appDomainStatus = ['audit', 'auditReject', 'auditPending', 'running', 'stop'] as const;
|
const appDomainStatus = ['audit', 'auditReject', 'auditPending', 'running', 'stop'] as const;
|
||||||
@ -17,7 +16,6 @@ export class AppDomainModel extends Model {
|
|||||||
// 状态,
|
// 状态,
|
||||||
declare status: AppDomainStatus;
|
declare status: AppDomainStatus;
|
||||||
declare uid: string;
|
declare uid: string;
|
||||||
declare data: Record<string, any>;
|
|
||||||
|
|
||||||
declare createdAt: Date;
|
declare createdAt: Date;
|
||||||
declare updatedAt: Date;
|
declare updatedAt: Date;
|
||||||
@ -30,18 +28,6 @@ export class AppDomainModel extends Model {
|
|||||||
// 原本是审核状态,不能修改。
|
// 原本是审核状态,不能修改。
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
async clearCache() {
|
|
||||||
// 清除缓存
|
|
||||||
const cacheKey = `domain:${this.domain}`;
|
|
||||||
const checkHas = async () => {
|
|
||||||
const has = await redis.get(cacheKey);
|
|
||||||
return has;
|
|
||||||
};
|
|
||||||
const has = await checkHas();
|
|
||||||
if (has) {
|
|
||||||
await redis.set(cacheKey, '', 'EX', 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AppDomainModel.init(
|
AppDomainModel.init(
|
||||||
@ -57,22 +43,13 @@ AppDomainModel.init(
|
|||||||
allowNull: false,
|
allowNull: false,
|
||||||
unique: true,
|
unique: true,
|
||||||
},
|
},
|
||||||
data: {
|
|
||||||
type: DataTypes.JSONB,
|
|
||||||
allowNull: true,
|
|
||||||
},
|
|
||||||
status: {
|
|
||||||
type: DataTypes.STRING,
|
|
||||||
allowNull: false,
|
|
||||||
defaultValue: 'running',
|
|
||||||
},
|
|
||||||
appId: {
|
appId: {
|
||||||
type: DataTypes.STRING,
|
type: DataTypes.STRING,
|
||||||
allowNull: true,
|
allowNull: false,
|
||||||
},
|
},
|
||||||
uid: {
|
uid: {
|
||||||
type: DataTypes.STRING,
|
type: DataTypes.STRING,
|
||||||
allowNull: true,
|
allowNull: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { app } from '@/app.ts';
|
import { app } from '@/app.ts';
|
||||||
import { getFileStat, getMinioList, deleteFile, updateFileStat, deleteFiles } from './module/get-minio-list.ts';
|
import { getFileStat, getMinioList, deleteFile, updateFileStat } from './module/get-minio-list.ts';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { CustomError } from '@kevisual/router';
|
import { CustomError } from '@kevisual/router';
|
||||||
import { get } from 'http';
|
import { get } from 'http';
|
||||||
@ -147,37 +147,3 @@ app
|
|||||||
return ctx;
|
return ctx;
|
||||||
})
|
})
|
||||||
.addTo(app);
|
.addTo(app);
|
||||||
|
|
||||||
app
|
|
||||||
.route({
|
|
||||||
path: 'file',
|
|
||||||
key: 'delete-all',
|
|
||||||
middleware: ['auth'],
|
|
||||||
})
|
|
||||||
.define(async (ctx) => {
|
|
||||||
const tokenUser = ctx.state.tokenUser;
|
|
||||||
let directory = ctx.query.data?.directory as string;
|
|
||||||
if (!directory) {
|
|
||||||
ctx.throw(400, 'directory is required');
|
|
||||||
}
|
|
||||||
if (directory.startsWith('/')) {
|
|
||||||
ctx.throw(400, 'directory is invalid, cannot start with /');
|
|
||||||
}
|
|
||||||
if (directory.endsWith('/')) {
|
|
||||||
ctx.throw(400, 'directory is invalid, cannot end with /');
|
|
||||||
}
|
|
||||||
const prefix = tokenUser.username + '/' + directory + '/';
|
|
||||||
const list = await getMinioList<true>({ prefix, recursive: true });
|
|
||||||
if (list.length === 0) {
|
|
||||||
ctx.throw(400, 'directory is empty');
|
|
||||||
}
|
|
||||||
const res = await deleteFiles(list.map((item) => item.name));
|
|
||||||
if (!res) {
|
|
||||||
ctx.throw(500, 'delete all failed');
|
|
||||||
}
|
|
||||||
ctx.body = {
|
|
||||||
deleted: list.length,
|
|
||||||
message: 'delete all success',
|
|
||||||
};
|
|
||||||
})
|
|
||||||
.addTo(app);
|
|
||||||
|
@ -16,10 +16,10 @@ export type MinioDirectory = {
|
|||||||
size: number;
|
size: number;
|
||||||
};
|
};
|
||||||
export type MinioList = (MinioFile | MinioDirectory)[];
|
export type MinioList = (MinioFile | MinioDirectory)[];
|
||||||
export const getMinioList = async <IS_FILE extends boolean>(opts: MinioListOpt): Promise<IS_FILE extends true ? MinioFile[] : MinioDirectory[]> => {
|
export const getMinioList = async (opts: MinioListOpt): Promise<MinioList> => {
|
||||||
const prefix = opts.prefix;
|
const prefix = opts.prefix;
|
||||||
const recursive = opts.recursive ?? false;
|
const recursive = opts.recursive ?? false;
|
||||||
const res = await new Promise((resolve, reject) => {
|
return await new Promise((resolve, reject) => {
|
||||||
let res: any[] = [];
|
let res: any[] = [];
|
||||||
let hasError = false;
|
let hasError = false;
|
||||||
minioClient
|
minioClient
|
||||||
@ -40,7 +40,6 @@ export const getMinioList = async <IS_FILE extends boolean>(opts: MinioListOpt):
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return res as IS_FILE extends true ? MinioFile[] : MinioDirectory[];
|
|
||||||
};
|
};
|
||||||
export const getFileStat = async (prefix: string, isFile?: boolean): Promise<any> => {
|
export const getFileStat = async (prefix: string, isFile?: boolean): Promise<any> => {
|
||||||
try {
|
try {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
import { useConfig } from '@kevisual/use-config/env';
|
import { useConfig } from '@kevisual/use-config';
|
||||||
|
|
||||||
type GithubConfig = {
|
type GithubConfig = {
|
||||||
clientId: string;
|
clientId: string;
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 0db28aecde061c597338839408d848ecfe59efdf
|
|
Loading…
x
Reference in New Issue
Block a user