mirror of
https://github.com/halo-dev/plugin-s3.git
synced 2025-10-14 22:27:11 +00:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
82f409e349 | ||
![]() |
71d303404a | ||
![]() |
b2cd58a7f7 | ||
![]() |
3fda6e0cde | ||
![]() |
ac9c9b88a6 | ||
![]() |
77c8b21248 | ||
![]() |
6f59d0ee32 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -70,4 +70,6 @@ application-local.yml
|
||||
application-local.yaml
|
||||
application-local.properties
|
||||
|
||||
/admin-frontend/node_modules/
|
||||
/workplace/
|
||||
/src/main/resources/console/
|
25
README.md
25
README.md
@@ -8,9 +8,18 @@
|
||||
- GitHub Releases:访问 [Releases](https://github.com/halo-dev/plugin-s3/releases) 下载 Assets 中的 JAR 文件。
|
||||
- Halo 应用市场:<https://halo.run/store/apps/app-Qxhpp>
|
||||
2. 安装,插件安装和更新方式可参考:<https://docs.halo.run/user-guide/plugins>
|
||||
3. 进入后台附件管理。
|
||||
4. 点击右上角的存储策略,在存储策略弹框的右上角可新建 S3 Object Storage 存储策略。
|
||||
5. 创建完成之后即可在上传的时候选择新创建的 S3 Object Storage 存储策略。
|
||||
3. 配置存储策略:
|
||||
* 在 Halo 后台管理系统中,点击左侧“附件”导航至附件管理页面,点击右上角的存储策略。
|
||||
* 在存储策略管理界面中,您可以新建和编辑 S3 Object Storage 存储策略。
|
||||
4. 上传到存储策略:
|
||||
* 在附件页面中点击上传按钮,选择好存储策略后上传文件即可上传到对应的对象存储中。
|
||||
* 在 Halo 2.11 以上版本中可在 Halo 设置界面中设定文章附件、头像等的默认存储策略。
|
||||
5. 使用“关联 S3 文件”功能:
|
||||
* 在插件管理界面中,点击“对象存储(Amazon S3 协议)”插件标题,然后选择“关联 S3 文件”选项卡。
|
||||
* 在此界面中,您可以浏览并选择已在对象存储中但不是通过 Halo 上传的文件,关联后会在 Halo 生成相应的附件记录。这些文件现在可以方便地在 Halo 中管理和使用。
|
||||
6. 使用“解除 S3 关联”功能:
|
||||
* 在附件页面中,找到由本插件管理的附件记录,点击更多操作(右侧的三个点)按钮,然后点击“解除 S3 关联”按钮。
|
||||
* 此操作将仅删除 Halo 中的附件记录,而不会实际删除对象存储中的文件。如需恢复请使用“关联 S3 文件”功能。
|
||||
|
||||
## 配置指南
|
||||
|
||||
@@ -51,6 +60,16 @@
|
||||
>
|
||||
> Cloudflare 需要填写均为小写字母的 `auto`。
|
||||
|
||||
### 上传时重命名文件方式
|
||||
* **保留原文件名:** 默认使用上传时的文件名,如遇文件名冲突会自动使用`使用原文件名 + 随机字符串` 模式重命名。
|
||||
* **使用原文件名 + 随机字符串:** 上传时会自动重命名为原文件名 + 随机的小写英文字母,长度请在`随机字符串长度`中设置。
|
||||
* **使用日期 + 随机字符串:** 上传时会自动重命名为日期 + 随机的小写英文字母,例如 `2023-12-01-abcdefgh.png`。
|
||||
* **使用日期时间 + 随机字符串:** 上传时会自动重命名为日期时间 + 随机的小写英文字母,例如 `2023-12-01T09:30:01.123456789-abcdef.png`。
|
||||
* **使用随机字符串:** 上传时会自动重命名为随机的小写英文字母,长度请在`随机字符串长度`中设置。
|
||||
* **使用 UUID:** 上传时会自动重命名为随机的 UUID。
|
||||
|
||||
> 所有随机字符串的长度可在`随机字符串长度`中设置。
|
||||
|
||||
## 部分对象存储服务商兼容性
|
||||
|
||||
|服务商|文档|兼容访问风格|兼容性|
|
||||
|
@@ -20,7 +20,10 @@ dependencies {
|
||||
compileOnly 'run.halo.app:api'
|
||||
|
||||
implementation platform('software.amazon.awssdk:bom:2.19.8')
|
||||
implementation 'software.amazon.awssdk:s3'
|
||||
implementation ('software.amazon.awssdk:s3') {
|
||||
exclude group: 'org.slf4j'
|
||||
exclude group: 'commons-logging'
|
||||
}
|
||||
|
||||
testImplementation 'run.halo.app:api'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
@@ -33,7 +36,7 @@ configurations.runtimeClasspath {
|
||||
|
||||
|
||||
halo {
|
||||
version = '2.10.0'
|
||||
version = '2.10.1'
|
||||
}
|
||||
|
||||
haloPlugin {
|
||||
|
@@ -11,12 +11,14 @@
|
||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
|
||||
},
|
||||
"dependencies": {
|
||||
"@halo-dev/components": "^1.5.0",
|
||||
"@halo-dev/console-shared": "^2.8.0",
|
||||
"@halo-dev/api-client": "^2.10.0",
|
||||
"@halo-dev/components": "^1.9.0",
|
||||
"@halo-dev/console-shared": "^2.10.0",
|
||||
"@tanstack/vue-query": "4.29.1",
|
||||
"axios": "^1.4.0",
|
||||
"canvas-confetti": "^1.6.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"vue": "^3.2.41"
|
||||
"vue": "^3.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify/json": "^2.2.18",
|
||||
|
322
console/pnpm-lock.yaml
generated
322
console/pnpm-lock.yaml
generated
@@ -1,12 +1,22 @@
|
||||
lockfileVersion: '6.0'
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
dependencies:
|
||||
'@halo-dev/api-client':
|
||||
specifier: ^2.10.0
|
||||
version: 2.10.0
|
||||
'@halo-dev/components':
|
||||
specifier: ^1.5.0
|
||||
version: 1.5.0(vue@3.2.41)
|
||||
specifier: ^1.9.0
|
||||
version: 1.9.0(vue-router@4.2.5)(vue@3.3.7)
|
||||
'@halo-dev/console-shared':
|
||||
specifier: ^2.8.0
|
||||
version: 2.8.0(vue@3.2.41)
|
||||
specifier: ^2.10.0
|
||||
version: 2.10.0(vue-router@4.2.5)(vue@3.3.7)
|
||||
'@tanstack/vue-query':
|
||||
specifier: 4.29.1
|
||||
version: 4.29.1(vue@3.3.7)
|
||||
axios:
|
||||
specifier: ^1.4.0
|
||||
version: 1.4.0
|
||||
@@ -17,8 +27,8 @@ dependencies:
|
||||
specifier: ^1.0.1
|
||||
version: 1.0.1
|
||||
vue:
|
||||
specifier: ^3.2.41
|
||||
version: 3.2.41
|
||||
specifier: ^3.3.4
|
||||
version: 3.3.7(typescript@4.7.4)
|
||||
|
||||
devDependencies:
|
||||
'@iconify/json':
|
||||
@@ -38,10 +48,10 @@ devDependencies:
|
||||
version: 16.18.0
|
||||
'@vitejs/plugin-vue':
|
||||
specifier: ^3.1.2
|
||||
version: 3.1.2(vite@3.1.8)(vue@3.2.41)
|
||||
version: 3.1.2(vite@3.1.8)(vue@3.3.7)
|
||||
'@vitejs/plugin-vue-jsx':
|
||||
specifier: ^2.0.1
|
||||
version: 2.0.1(vite@3.1.8)(vue@3.2.41)
|
||||
version: 2.0.1(vite@3.1.8)(vue@3.3.7)
|
||||
'@vue/eslint-config-prettier':
|
||||
specifier: ^7.0.0
|
||||
version: 7.0.0(eslint@8.26.0)(prettier@2.7.1)
|
||||
@@ -50,7 +60,7 @@ devDependencies:
|
||||
version: 11.0.2(eslint-plugin-vue@9.6.0)(eslint@8.26.0)(typescript@4.7.4)
|
||||
'@vue/test-utils':
|
||||
specifier: ^2.2.0
|
||||
version: 2.2.0(vue@3.2.41)
|
||||
version: 2.2.0(vue@3.3.7)
|
||||
'@vue/tsconfig':
|
||||
specifier: ^0.1.3
|
||||
version: 0.1.3(@types/node@16.18.0)
|
||||
@@ -322,16 +332,15 @@ packages:
|
||||
/@babel/helper-string-parser@7.19.4:
|
||||
resolution: {integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
dev: true
|
||||
|
||||
/@babel/helper-validator-identifier@7.16.7:
|
||||
resolution: {integrity: sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
dev: true
|
||||
|
||||
/@babel/helper-validator-identifier@7.19.1:
|
||||
resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
dev: true
|
||||
|
||||
/@babel/helper-validator-option@7.18.6:
|
||||
resolution: {integrity: sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==}
|
||||
@@ -364,6 +373,7 @@ packages:
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@babel/types': 7.18.4
|
||||
dev: true
|
||||
|
||||
/@babel/parser@7.19.6:
|
||||
resolution: {integrity: sha512-h1IUp81s2JYJ3mRkdxJgs4UvmSsRvDrx5ICSJbPvtWYv5i1nTBGcBpnog+89rAFMwvvru6E5NUHdBe01UeSzYA==}
|
||||
@@ -373,6 +383,13 @@ packages:
|
||||
'@babel/types': 7.19.4
|
||||
dev: true
|
||||
|
||||
/@babel/parser@7.23.0:
|
||||
resolution: {integrity: sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@babel/types': 7.19.4
|
||||
|
||||
/@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.19.6):
|
||||
resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==}
|
||||
peerDependencies:
|
||||
@@ -476,6 +493,7 @@ packages:
|
||||
dependencies:
|
||||
'@babel/helper-validator-identifier': 7.16.7
|
||||
to-fast-properties: 2.0.0
|
||||
dev: true
|
||||
|
||||
/@babel/types@7.19.4:
|
||||
resolution: {integrity: sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==}
|
||||
@@ -484,7 +502,6 @@ packages:
|
||||
'@babel/helper-string-parser': 7.19.4
|
||||
'@babel/helper-validator-identifier': 7.19.1
|
||||
to-fast-properties: 2.0.0
|
||||
dev: true
|
||||
|
||||
/@esbuild/android-arm@0.15.12:
|
||||
resolution: {integrity: sha512-IC7TqIqiyE0MmvAhWkl/8AEzpOtbhRNDo7aph47We1NbE5w2bt/Q+giAhe0YYeVpYnIhGMcuZY92qDK6dQauvA==}
|
||||
@@ -521,38 +538,48 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@floating-ui/core@0.3.1:
|
||||
resolution: {integrity: sha512-ensKY7Ub59u16qsVIFEo2hwTCqZ/r9oZZFh51ivcLGHfUwTn8l1Xzng8RJUe91H/UP8PeqeBronAGx0qmzwk2g==}
|
||||
dev: false
|
||||
|
||||
/@floating-ui/dom@0.1.10:
|
||||
resolution: {integrity: sha512-4kAVoogvQm2N0XE0G6APQJuCNuErjOfPW8Ux7DFxh8+AfugWflwVJ5LDlHOwrwut7z/30NUvdtHzQ3zSip4EzQ==}
|
||||
/@floating-ui/core@1.5.0:
|
||||
resolution: {integrity: sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg==}
|
||||
dependencies:
|
||||
'@floating-ui/core': 0.3.1
|
||||
'@floating-ui/utils': 0.1.6
|
||||
dev: false
|
||||
|
||||
/@halo-dev/api-client@2.8.0:
|
||||
resolution: {integrity: sha512-mVfYYO437TOshRppCnfYBbc4pvbpNWPmlsv8UAWr3F3Zs3LafcHcF4hb7rq03qfEahsnoLtX8jXVWjmFtf4xqw==}
|
||||
/@floating-ui/dom@1.1.1:
|
||||
resolution: {integrity: sha512-TpIO93+DIujg3g7SykEAGZMDtbJRrmnYRCNYSjJlvIbGhBjRSNTLVbNeDQBrzy9qDgUbiWdc7KA0uZHZ2tJmiw==}
|
||||
dependencies:
|
||||
'@floating-ui/core': 1.5.0
|
||||
dev: false
|
||||
|
||||
/@halo-dev/components@1.5.0(vue@3.2.41):
|
||||
resolution: {integrity: sha512-zVRY2AzeE83fR5omZO8q6R/kAAxZ7iSgVNcLxTjOXSPl0SP3HD4LWXoloO1rWoa/O/JUlFY2WqBAEWnu8miCGA==}
|
||||
/@floating-ui/utils@0.1.6:
|
||||
resolution: {integrity: sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==}
|
||||
dev: false
|
||||
|
||||
/@halo-dev/api-client@2.10.0:
|
||||
resolution: {integrity: sha512-c1fgp+xzE1gQ7O36miWU2Oz+Uh1G4Hqs3clxLSxBD7vuvktgndZGZblNDi5morHB9UkiauAIQP0+PH9L9jwBfA==}
|
||||
dev: false
|
||||
|
||||
/@halo-dev/components@1.9.0(vue-router@4.2.5)(vue@3.3.7):
|
||||
resolution: {integrity: sha512-Rc6zK7Uno+kLqvmZkv/NIv1EUVcFzS5FR7s0ai3LHbwybFF2BNul9HEEslS3Z5a9C0M0arnvkjpUlyBmrWbfRQ==}
|
||||
peerDependencies:
|
||||
vue: ^3.2.37
|
||||
vue-router: ^4.0.16
|
||||
vue: ^3.3.4
|
||||
vue-router: ^4.2.4
|
||||
dependencies:
|
||||
floating-vue: 2.0.0-beta.20(vue@3.2.41)
|
||||
vue: 3.2.41
|
||||
floating-vue: 2.0.0-beta.24(vue@3.3.7)
|
||||
vue: 3.3.7(typescript@4.7.4)
|
||||
vue-router: 4.2.5(vue@3.3.7)
|
||||
transitivePeerDependencies:
|
||||
- '@nuxt/kit'
|
||||
dev: false
|
||||
|
||||
/@halo-dev/console-shared@2.8.0(vue@3.2.41):
|
||||
resolution: {integrity: sha512-Zhi5FbVrdzSSaaT6i2xh8JOhmi9keetjg8zrYd+tEp4Iy+mPke4ZA4SIYaO1Bkwr9MD5BZ+sNswgYCPd36wYaw==}
|
||||
/@halo-dev/console-shared@2.10.0(vue-router@4.2.5)(vue@3.3.7):
|
||||
resolution: {integrity: sha512-c1Ol/xIU2DZk1MWhxtuk1csD90DPvCLByQyGenLgLPX1kVe6QCodWgPG4Uz0WOE1s+rZ2W6XDV0DBXrIHCYBxg==}
|
||||
peerDependencies:
|
||||
vue: ^3.2.37
|
||||
vue-router: ^4.0.16
|
||||
vue: ^3.3.4
|
||||
vue-router: ^4.2.4
|
||||
dependencies:
|
||||
'@halo-dev/api-client': 2.8.0
|
||||
vue: 3.2.41
|
||||
'@halo-dev/api-client': 2.10.0
|
||||
vue: 3.3.7(typescript@4.7.4)
|
||||
vue-router: 4.2.5(vue@3.3.7)
|
||||
dev: false
|
||||
|
||||
/@humanwhocodes/config-array@0.11.6:
|
||||
@@ -630,6 +657,9 @@ packages:
|
||||
resolution: {integrity: sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==}
|
||||
dev: true
|
||||
|
||||
/@jridgewell/sourcemap-codec@1.4.15:
|
||||
resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
|
||||
|
||||
/@jridgewell/trace-mapping@0.3.13:
|
||||
resolution: {integrity: sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==}
|
||||
dependencies:
|
||||
@@ -662,6 +692,33 @@ packages:
|
||||
resolution: {integrity: sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==}
|
||||
dev: true
|
||||
|
||||
/@tanstack/match-sorter-utils@8.8.4:
|
||||
resolution: {integrity: sha512-rKH8LjZiszWEvmi01NR72QWZ8m4xmXre0OOwlRGnjU01Eqz/QnN+cqpty2PJ0efHblq09+KilvyR7lsbzmXVEw==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
remove-accents: 0.4.2
|
||||
dev: false
|
||||
|
||||
/@tanstack/query-core@4.29.1:
|
||||
resolution: {integrity: sha512-vkPewLEG8ua0efo3SsVT0BcBtkq5RZX8oPhDAyKL+k/rdOYSQTEocfGEXSaBwIwsXeOGBUpfKqI+UmHvNqdWXg==}
|
||||
dev: false
|
||||
|
||||
/@tanstack/vue-query@4.29.1(vue@3.3.7):
|
||||
resolution: {integrity: sha512-2/F12lOHQw3YQbHVKGZUTEuwxrws6UR3VEXNX/Obw2NLupmCYR7+dcBwwHQ75zUQngxLFQwHCJKX7Ne1Wyk/HA==}
|
||||
peerDependencies:
|
||||
'@vue/composition-api': ^1.1.2
|
||||
vue: ^2.5.0 || ^3.0.0
|
||||
peerDependenciesMeta:
|
||||
'@vue/composition-api':
|
||||
optional: true
|
||||
dependencies:
|
||||
'@tanstack/match-sorter-utils': 8.8.4
|
||||
'@tanstack/query-core': 4.29.1
|
||||
'@vue/devtools-api': 6.5.1
|
||||
vue: 3.3.7(typescript@4.7.4)
|
||||
vue-demi: 0.13.11(vue@3.3.7)
|
||||
dev: false
|
||||
|
||||
/@tootallnate/once@2.0.0:
|
||||
resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==}
|
||||
engines: {node: '>= 10'}
|
||||
@@ -827,7 +884,7 @@ packages:
|
||||
eslint-visitor-keys: 3.3.0
|
||||
dev: true
|
||||
|
||||
/@vitejs/plugin-vue-jsx@2.0.1(vite@3.1.8)(vue@3.2.41):
|
||||
/@vitejs/plugin-vue-jsx@2.0.1(vite@3.1.8)(vue@3.3.7):
|
||||
resolution: {integrity: sha512-lmiR1k9+lrF7LMczO0pxtQ8mOn6XeppJDHxnpxkJQpT5SiKz4SKhKdeNstXaTNuR8qZhUo5X0pJlcocn72Y4Jg==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
@@ -839,12 +896,12 @@ packages:
|
||||
'@babel/plugin-transform-typescript': 7.19.3(@babel/core@7.19.6)
|
||||
'@vue/babel-plugin-jsx': 1.1.1(@babel/core@7.19.6)
|
||||
vite: 3.1.8(sass@1.58.0)
|
||||
vue: 3.2.41
|
||||
vue: 3.3.7(typescript@4.7.4)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@vitejs/plugin-vue@3.1.2(vite@3.1.8)(vue@3.2.41):
|
||||
/@vitejs/plugin-vue@3.1.2(vite@3.1.8)(vue@3.3.7):
|
||||
resolution: {integrity: sha512-3zxKNlvA3oNaKDYX0NBclgxTQ1xaFdL7PzwF6zj9tGFziKwmBa3Q/6XcJQxudlT81WxDjEhHmevvIC4Orc1LhQ==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
@@ -852,7 +909,7 @@ packages:
|
||||
vue: ^3.2.25
|
||||
dependencies:
|
||||
vite: 3.1.8(sass@1.58.0)
|
||||
vue: 3.2.41
|
||||
vue: 3.3.7(typescript@4.7.4)
|
||||
dev: true
|
||||
|
||||
/@volar/language-core@1.0.9:
|
||||
@@ -923,12 +980,28 @@ packages:
|
||||
'@vue/shared': 3.2.41
|
||||
estree-walker: 2.0.2
|
||||
source-map: 0.6.1
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-core@3.3.7:
|
||||
resolution: {integrity: sha512-pACdY6YnTNVLXsB86YD8OF9ihwpolzhhtdLVHhBL6do/ykr6kKXNYABRtNMGrsQXpEXXyAdwvWWkuTbs4MFtPQ==}
|
||||
dependencies:
|
||||
'@babel/parser': 7.23.0
|
||||
'@vue/shared': 3.3.7
|
||||
estree-walker: 2.0.2
|
||||
source-map-js: 1.0.2
|
||||
|
||||
/@vue/compiler-dom@3.2.41:
|
||||
resolution: {integrity: sha512-xe5TbbIsonjENxJsYRbDJvthzqxLNk+tb3d/c47zgREDa/PCp6/Y4gC/skM4H6PIuX5DAxm7fFJdbjjUH2QTMw==}
|
||||
dependencies:
|
||||
'@vue/compiler-core': 3.2.41
|
||||
'@vue/shared': 3.2.41
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-dom@3.3.7:
|
||||
resolution: {integrity: sha512-0LwkyJjnUPssXv/d1vNJ0PKfBlDoQs7n81CbO6Q0zdL7H1EzqYRrTVXDqdBVqro0aJjo/FOa1qBAPVI4PGSHBw==}
|
||||
dependencies:
|
||||
'@vue/compiler-core': 3.3.7
|
||||
'@vue/shared': 3.3.7
|
||||
|
||||
/@vue/compiler-sfc@3.2.41:
|
||||
resolution: {integrity: sha512-+1P2m5kxOeaxVmJNXnBskAn3BenbTmbxBxWOtBq3mQTCokIreuMULFantBUclP0+KnzNCMOvcnKinqQZmiOF8w==}
|
||||
@@ -943,12 +1016,38 @@ packages:
|
||||
magic-string: 0.25.9
|
||||
postcss: 8.4.14
|
||||
source-map: 0.6.1
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-sfc@3.3.7:
|
||||
resolution: {integrity: sha512-7pfldWy/J75U/ZyYIXRVqvLRw3vmfxDo2YLMwVtWVNew8Sm8d6wodM+OYFq4ll/UxfqVr0XKiVwti32PCrruAw==}
|
||||
dependencies:
|
||||
'@babel/parser': 7.23.0
|
||||
'@vue/compiler-core': 3.3.7
|
||||
'@vue/compiler-dom': 3.3.7
|
||||
'@vue/compiler-ssr': 3.3.7
|
||||
'@vue/reactivity-transform': 3.3.7
|
||||
'@vue/shared': 3.3.7
|
||||
estree-walker: 2.0.2
|
||||
magic-string: 0.30.5
|
||||
postcss: 8.4.31
|
||||
source-map-js: 1.0.2
|
||||
|
||||
/@vue/compiler-ssr@3.2.41:
|
||||
resolution: {integrity: sha512-Y5wPiNIiaMz/sps8+DmhaKfDm1xgj6GrH99z4gq2LQenfVQcYXmHIOBcs5qPwl7jaW3SUQWjkAPKMfQemEQZwQ==}
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.2.41
|
||||
'@vue/shared': 3.2.41
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-ssr@3.3.7:
|
||||
resolution: {integrity: sha512-TxOfNVVeH3zgBc82kcUv+emNHo+vKnlRrkv8YvQU5+Y5LJGJwSNzcmLUoxD/dNzv0bhQ/F0s+InlgV0NrApJZg==}
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.3.7
|
||||
'@vue/shared': 3.3.7
|
||||
|
||||
/@vue/devtools-api@6.5.1:
|
||||
resolution: {integrity: sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==}
|
||||
dev: false
|
||||
|
||||
/@vue/eslint-config-prettier@7.0.0(eslint@8.26.0)(prettier@2.7.1):
|
||||
resolution: {integrity: sha512-/CTc6ML3Wta1tCe1gUeO0EYnVXfo3nJXsIhZ8WJr3sov+cGASr6yuiibJTL6lmIBm7GobopToOuB3B6AWyV0Iw==}
|
||||
@@ -991,43 +1090,63 @@ packages:
|
||||
'@vue/shared': 3.2.41
|
||||
estree-walker: 2.0.2
|
||||
magic-string: 0.25.9
|
||||
dev: true
|
||||
|
||||
/@vue/reactivity-transform@3.3.7:
|
||||
resolution: {integrity: sha512-APhRmLVbgE1VPGtoLQoWBJEaQk4V8JUsqrQihImVqKT+8U6Qi3t5ATcg4Y9wGAPb3kIhetpufyZ1RhwbZCIdDA==}
|
||||
dependencies:
|
||||
'@babel/parser': 7.23.0
|
||||
'@vue/compiler-core': 3.3.7
|
||||
'@vue/shared': 3.3.7
|
||||
estree-walker: 2.0.2
|
||||
magic-string: 0.30.5
|
||||
|
||||
/@vue/reactivity@3.2.41:
|
||||
resolution: {integrity: sha512-9JvCnlj8uc5xRiQGZ28MKGjuCoPhhTwcoAdv3o31+cfGgonwdPNuvqAXLhlzu4zwqavFEG5tvaoINQEfxz+l6g==}
|
||||
dependencies:
|
||||
'@vue/shared': 3.2.41
|
||||
dev: true
|
||||
|
||||
/@vue/runtime-core@3.2.41:
|
||||
resolution: {integrity: sha512-0LBBRwqnI0p4FgIkO9q2aJBBTKDSjzhnxrxHYengkAF6dMOjeAIZFDADAlcf2h3GDALWnblbeprYYpItiulSVQ==}
|
||||
/@vue/reactivity@3.3.7:
|
||||
resolution: {integrity: sha512-cZNVjWiw00708WqT0zRpyAgduG79dScKEPYJXq2xj/aMtk3SKvL3FBt2QKUlh6EHBJ1m8RhBY+ikBUzwc7/khg==}
|
||||
dependencies:
|
||||
'@vue/reactivity': 3.2.41
|
||||
'@vue/shared': 3.2.41
|
||||
'@vue/shared': 3.3.7
|
||||
|
||||
/@vue/runtime-dom@3.2.41:
|
||||
resolution: {integrity: sha512-U7zYuR1NVIP8BL6jmOqmapRAHovEFp7CSw4pR2FacqewXNGqZaRfHoNLQsqQvVQ8yuZNZtxSZy0FFyC70YXPpA==}
|
||||
/@vue/runtime-core@3.3.7:
|
||||
resolution: {integrity: sha512-LHq9du3ubLZFdK/BP0Ysy3zhHqRfBn80Uc+T5Hz3maFJBGhci1MafccnL3rpd5/3wVfRHAe6c+PnlO2PAavPTQ==}
|
||||
dependencies:
|
||||
'@vue/runtime-core': 3.2.41
|
||||
'@vue/shared': 3.2.41
|
||||
csstype: 2.6.20
|
||||
'@vue/reactivity': 3.3.7
|
||||
'@vue/shared': 3.3.7
|
||||
|
||||
/@vue/server-renderer@3.2.41(vue@3.2.41):
|
||||
resolution: {integrity: sha512-7YHLkfJdTlsZTV0ae5sPwl9Gn/EGr2hrlbcS/8naXm2CDpnKUwC68i1wGlrYAfIgYWL7vUZwk2GkYLQH5CvFig==}
|
||||
/@vue/runtime-dom@3.3.7:
|
||||
resolution: {integrity: sha512-PFQU1oeJxikdDmrfoNQay5nD4tcPNYixUBruZzVX/l0eyZvFKElZUjW4KctCcs52nnpMGO6UDK+jF5oV4GT5Lw==}
|
||||
dependencies:
|
||||
'@vue/runtime-core': 3.3.7
|
||||
'@vue/shared': 3.3.7
|
||||
csstype: 3.1.2
|
||||
|
||||
/@vue/server-renderer@3.3.7(vue@3.3.7):
|
||||
resolution: {integrity: sha512-UlpKDInd1hIZiNuVVVvLgxpfnSouxKQOSE2bOfQpBuGwxRV/JqqTCyyjXUWiwtVMyeRaZhOYYqntxElk8FhBhw==}
|
||||
peerDependencies:
|
||||
vue: 3.2.41
|
||||
vue: 3.3.7
|
||||
dependencies:
|
||||
'@vue/compiler-ssr': 3.2.41
|
||||
'@vue/shared': 3.2.41
|
||||
vue: 3.2.41
|
||||
'@vue/compiler-ssr': 3.3.7
|
||||
'@vue/shared': 3.3.7
|
||||
vue: 3.3.7(typescript@4.7.4)
|
||||
|
||||
/@vue/shared@3.2.41:
|
||||
resolution: {integrity: sha512-W9mfWLHmJhkfAmV+7gDjcHeAWALQtgGT3JErxULl0oz6R6+3ug91I7IErs93eCFhPCZPHBs4QJS7YWEV7A3sxw==}
|
||||
dev: true
|
||||
|
||||
/@vue/test-utils@2.2.0(vue@3.2.41):
|
||||
/@vue/shared@3.3.7:
|
||||
resolution: {integrity: sha512-N/tbkINRUDExgcPTBvxNkvHGu504k8lzlNQRITVnm6YjOjwa4r0nnbd4Jb01sNpur5hAllyRJzSK5PvB9PPwRg==}
|
||||
|
||||
/@vue/test-utils@2.2.0(vue@3.3.7):
|
||||
resolution: {integrity: sha512-EKp5/N7ieNZdoLTkD16j/irUjIEDN63QUIc41vLUMqGvSsTQN0QxbFiQqh5v49RPfS5vZH+DhjNUEkijCMOCSg==}
|
||||
peerDependencies:
|
||||
vue: ^3.0.1
|
||||
dependencies:
|
||||
vue: 3.2.41
|
||||
vue: 3.3.7(typescript@4.7.4)
|
||||
dev: true
|
||||
|
||||
/@vue/tsconfig@0.1.3(@types/node@16.18.0):
|
||||
@@ -1354,8 +1473,8 @@ packages:
|
||||
cssom: 0.3.8
|
||||
dev: true
|
||||
|
||||
/csstype@2.6.20:
|
||||
resolution: {integrity: sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==}
|
||||
/csstype@3.1.2:
|
||||
resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==}
|
||||
|
||||
/data-urls@3.0.2:
|
||||
resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==}
|
||||
@@ -1978,14 +2097,18 @@ packages:
|
||||
resolution: {integrity: sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==}
|
||||
dev: true
|
||||
|
||||
/floating-vue@2.0.0-beta.20(vue@3.2.41):
|
||||
resolution: {integrity: sha512-N68otcpp6WwcYC7zP8GeJqNZVdfvS7tEY88lwmuAHeqRgnfWx1Un8enzLxROyVnBDZ3TwUoUdj5IFg+bUT7JeA==}
|
||||
/floating-vue@2.0.0-beta.24(vue@3.3.7):
|
||||
resolution: {integrity: sha512-URSzP6YXaF4u1oZ9XGL8Sn8puuM7ivp5jkOUrpy5Q1mfo9BfGppJOn+ierTmsSUfJEeHBae8KT7r5DeI3vQIEw==}
|
||||
peerDependencies:
|
||||
'@nuxt/kit': ^3.2.0
|
||||
vue: ^3.2.0
|
||||
peerDependenciesMeta:
|
||||
'@nuxt/kit':
|
||||
optional: true
|
||||
dependencies:
|
||||
'@floating-ui/dom': 0.1.10
|
||||
vue: 3.2.41
|
||||
vue-resize: 2.0.0-alpha.1(vue@3.2.41)
|
||||
'@floating-ui/dom': 1.1.1
|
||||
vue: 3.3.7(typescript@4.7.4)
|
||||
vue-resize: 2.0.0-alpha.1(vue@3.3.7)
|
||||
dev: false
|
||||
|
||||
/follow-redirects@1.15.2:
|
||||
@@ -2534,6 +2657,13 @@ packages:
|
||||
resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==}
|
||||
dependencies:
|
||||
sourcemap-codec: 1.4.8
|
||||
dev: true
|
||||
|
||||
/magic-string@0.30.5:
|
||||
resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
'@jridgewell/sourcemap-codec': 1.4.15
|
||||
|
||||
/memorystream@0.3.1:
|
||||
resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==}
|
||||
@@ -2597,6 +2727,12 @@ packages:
|
||||
resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==}
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/nanoid@3.3.6:
|
||||
resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==}
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
hasBin: true
|
||||
|
||||
/natural-compare@1.4.0:
|
||||
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
|
||||
@@ -2834,6 +2970,7 @@ packages:
|
||||
nanoid: 3.3.4
|
||||
picocolors: 1.0.0
|
||||
source-map-js: 1.0.2
|
||||
dev: true
|
||||
|
||||
/postcss@8.4.18:
|
||||
resolution: {integrity: sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA==}
|
||||
@@ -2844,6 +2981,14 @@ packages:
|
||||
source-map-js: 1.0.2
|
||||
dev: true
|
||||
|
||||
/postcss@8.4.31:
|
||||
resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==}
|
||||
engines: {node: ^10 || ^12 || >=14}
|
||||
dependencies:
|
||||
nanoid: 3.3.6
|
||||
picocolors: 1.0.0
|
||||
source-map-js: 1.0.2
|
||||
|
||||
/prelude-ls@1.1.2:
|
||||
resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
@@ -2914,6 +3059,10 @@ packages:
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/remove-accents@0.4.2:
|
||||
resolution: {integrity: sha512-7pXIJqJOq5tFgG1A2Zxti3Ht8jJF337m4sowbuHsW30ZnkQFnDzy9qBNhgzX8ZLW4+UBcXiiR7SwR6pokHsxiA==}
|
||||
dev: false
|
||||
|
||||
/resolve-from@4.0.0:
|
||||
resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
|
||||
engines: {node: '>=4'}
|
||||
@@ -3058,9 +3207,11 @@ packages:
|
||||
/source-map@0.6.1:
|
||||
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/sourcemap-codec@1.4.8:
|
||||
resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==}
|
||||
dev: true
|
||||
|
||||
/spdx-correct@3.1.1:
|
||||
resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==}
|
||||
@@ -3251,7 +3402,6 @@ packages:
|
||||
resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==}
|
||||
engines: {node: '>=4.2.0'}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/unbox-primitive@1.0.2:
|
||||
resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==}
|
||||
@@ -3402,6 +3552,21 @@ packages:
|
||||
- terser
|
||||
dev: true
|
||||
|
||||
/vue-demi@0.13.11(vue@3.3.7):
|
||||
resolution: {integrity: sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==}
|
||||
engines: {node: '>=12'}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
peerDependencies:
|
||||
'@vue/composition-api': ^1.0.0-rc.1
|
||||
vue: ^3.0.0-0 || ^2.6.0
|
||||
peerDependenciesMeta:
|
||||
'@vue/composition-api':
|
||||
optional: true
|
||||
dependencies:
|
||||
vue: 3.3.7(typescript@4.7.4)
|
||||
dev: false
|
||||
|
||||
/vue-eslint-parser@9.1.0(eslint@8.26.0):
|
||||
resolution: {integrity: sha512-NGn/iQy8/Wb7RrRa4aRkokyCZfOUWk19OP5HP6JEozQFX5AoS/t+Z0ZN7FY4LlmWc4FNI922V7cvX28zctN8dQ==}
|
||||
engines: {node: ^14.17.0 || >=16.0.0}
|
||||
@@ -3420,12 +3585,21 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/vue-resize@2.0.0-alpha.1(vue@3.2.41):
|
||||
/vue-resize@2.0.0-alpha.1(vue@3.3.7):
|
||||
resolution: {integrity: sha512-7+iqOueLU7uc9NrMfrzbG8hwMqchfVfSzpVlCMeJQe4pyibqyoifDNbKTZvwxZKDvGkB+PdFeKvnGZMoEb8esg==}
|
||||
peerDependencies:
|
||||
vue: ^3.0.0
|
||||
dependencies:
|
||||
vue: 3.2.41
|
||||
vue: 3.3.7(typescript@4.7.4)
|
||||
dev: false
|
||||
|
||||
/vue-router@4.2.5(vue@3.3.7):
|
||||
resolution: {integrity: sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==}
|
||||
peerDependencies:
|
||||
vue: ^3.2.0
|
||||
dependencies:
|
||||
'@vue/devtools-api': 6.5.1
|
||||
vue: 3.3.7(typescript@4.7.4)
|
||||
dev: false
|
||||
|
||||
/vue-template-compiler@2.7.13:
|
||||
@@ -3446,14 +3620,20 @@ packages:
|
||||
typescript: 4.7.4
|
||||
dev: true
|
||||
|
||||
/vue@3.2.41:
|
||||
resolution: {integrity: sha512-uuuvnrDXEeZ9VUPljgHkqB5IaVO8SxhPpqF2eWOukVrBnRBx2THPSGQBnVRt0GrIG1gvCmFXMGbd7FqcT1ixNQ==}
|
||||
/vue@3.3.7(typescript@4.7.4):
|
||||
resolution: {integrity: sha512-YEMDia1ZTv1TeBbnu6VybatmSteGOS3A3YgfINOfraCbf85wdKHzscD6HSS/vB4GAtI7sa1XPX7HcQaJ1l24zA==}
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.2.41
|
||||
'@vue/compiler-sfc': 3.2.41
|
||||
'@vue/runtime-dom': 3.2.41
|
||||
'@vue/server-renderer': 3.2.41(vue@3.2.41)
|
||||
'@vue/shared': 3.2.41
|
||||
'@vue/compiler-dom': 3.3.7
|
||||
'@vue/compiler-sfc': 3.3.7
|
||||
'@vue/runtime-dom': 3.3.7
|
||||
'@vue/server-renderer': 3.3.7(vue@3.3.7)
|
||||
'@vue/shared': 3.3.7
|
||||
typescript: 4.7.4
|
||||
|
||||
/w3c-hr-time@1.0.2:
|
||||
resolution: {integrity: sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==}
|
||||
|
@@ -1 +1,2 @@
|
||||
export * from "./s-3-link-controller";
|
||||
export * from "./s-3-unlink-controller";
|
||||
|
@@ -0,0 +1,14 @@
|
||||
import request from "@/utils/request";
|
||||
import { DeepRequired } from "../../interface";
|
||||
import { Attachment } from "@halo-dev/api-client";
|
||||
|
||||
/**
|
||||
* /apis/s3os.halo.run/v1alpha1/attachments/{name}
|
||||
*/
|
||||
export function deleteApisS3OsHaloRunV1Alpha1AttachmentsByName(params: DeleteApisS3OsHaloRunV1Alpha1AttachmentsByNameParams) {
|
||||
return request.delete<DeepRequired<Attachment>>(`/apis/s3os.halo.run/v1alpha1/attachments/${params.name}`);
|
||||
}
|
||||
|
||||
interface DeleteApisS3OsHaloRunV1Alpha1AttachmentsByNameParams {
|
||||
name: any;
|
||||
}
|
1
console/src/controller/s-3-unlink-controller/index.ts
Normal file
1
console/src/controller/s-3-unlink-controller/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./deleteApisS3OsHaloRunV1Alpha1AttachmentsByName";
|
@@ -1,21 +1,40 @@
|
||||
import {definePlugin} from "@halo-dev/console-shared";
|
||||
import type {Attachment} from "@halo-dev/api-client";
|
||||
import type {PluginTab} from "@halo-dev/console-shared";
|
||||
import {definePlugin} from "@halo-dev/console-shared";
|
||||
import S3Link from "./views/S3Link.vue";
|
||||
import S3Unlink from "./views/S3Unlink.vue"
|
||||
import type {Ref} from "vue";
|
||||
import {markRaw} from "vue";
|
||||
|
||||
export default definePlugin({
|
||||
components: {},
|
||||
routes: [],
|
||||
extensionPoints: {
|
||||
"plugin:self:tabs:create": () : PluginTab[] => {
|
||||
"plugin:self:tabs:create": (): PluginTab[] => {
|
||||
return [
|
||||
{
|
||||
id: "s3-link",
|
||||
label: "关联S3文件",
|
||||
// @ts-ignore
|
||||
component: markRaw(S3Link),
|
||||
permissions: ["plugin:s3os:link"]
|
||||
},
|
||||
];
|
||||
},
|
||||
// @ts-ignore
|
||||
"attachment:list-item:operation:create": (attachment: Ref<Attachment>) => {
|
||||
return [
|
||||
{
|
||||
priority: 21,
|
||||
component: markRaw(S3Unlink),
|
||||
permissions: ["plugin:s3os:unlink"],
|
||||
props: {
|
||||
"attachment": attachment,
|
||||
},
|
||||
hidden: !(attachment.value.metadata.annotations
|
||||
&& attachment.value.metadata.annotations["s3os.plugin.halo.run/object-key"])
|
||||
},
|
||||
];
|
||||
},
|
||||
},
|
||||
});
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"docsUrl": "http://localhost:8090/v3/api-docs/extension-api",
|
||||
"includeTags": ["s-3-link-controller"],
|
||||
"includeTags": ["s-3-link-controller", "s-3-unlink-controller"],
|
||||
"excludeTags": [],
|
||||
"axiosInstanceUrl": "@/utils/request",
|
||||
"prefix": ""
|
||||
|
37
console/src/views/S3Unlink.vue
Normal file
37
console/src/views/S3Unlink.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<script setup lang="ts">
|
||||
import {deleteApisS3OsHaloRunV1Alpha1AttachmentsByName} from "@/controller";
|
||||
import type {Attachment} from "@halo-dev/api-client";
|
||||
import {Dialog, Toast, VDropdownDivider, VDropdownItem} from "@halo-dev/components";
|
||||
import {useQueryClient} from "@tanstack/vue-query";
|
||||
|
||||
const props = defineProps<{
|
||||
attachment: Attachment;
|
||||
}>();
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const handleUnlink = () => {
|
||||
Dialog.warning({
|
||||
title: "解除 S3 关联",
|
||||
description: "解除关联后,附件中的记录将会被删除,而对象存储中的文件仍然保留,若需重新关联请使用“关联 S3 文件”功能。",
|
||||
confirmType: "danger",
|
||||
confirmText: "确定",
|
||||
cancelText: "取消",
|
||||
onConfirm: async () => {
|
||||
try {
|
||||
await deleteApisS3OsHaloRunV1Alpha1AttachmentsByName({name: props.attachment.metadata.name});
|
||||
Toast.success("解除关联成功");
|
||||
} catch (e) {
|
||||
console.error("Failed to delete attachment", e);
|
||||
} finally {
|
||||
queryClient.invalidateQueries({queryKey: ["attachments"]});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
<VDropdownDivider/>
|
||||
<VDropdownItem type="danger" @click="handleUnlink">解除 S3 关联</VDropdownItem>
|
||||
</div>
|
||||
</template>
|
@@ -1 +1 @@
|
||||
version=1.6.1-SNAPSHOT
|
||||
version=1.7.0-SNAPSHOT
|
||||
|
@@ -32,7 +32,7 @@ public class S3LinkController {
|
||||
}
|
||||
|
||||
@GetMapping("/objects/{policyName}")
|
||||
public Mono<S3ListResult> listObjects(@PathVariable String policyName,
|
||||
public Mono<S3ListResult> listObjects(@PathVariable(value = "policyName") String policyName,
|
||||
@RequestParam(name = "continuationToken", required = false) String continuationToken,
|
||||
@RequestParam(name = "continuationObject", required = false) String continuationObject,
|
||||
@RequestParam(name = "pageSize") Integer pageSize,
|
||||
|
@@ -37,6 +37,7 @@ import run.halo.app.core.extension.attachment.Policy;
|
||||
import run.halo.app.core.extension.attachment.endpoint.AttachmentHandler;
|
||||
import run.halo.app.extension.ConfigMap;
|
||||
import run.halo.app.extension.Metadata;
|
||||
import run.halo.app.extension.MetadataUtil;
|
||||
import run.halo.app.infra.utils.JsonUtils;
|
||||
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
|
||||
import software.amazon.awssdk.awscore.presigner.SdkPresigner;
|
||||
@@ -66,6 +67,7 @@ public class S3OsAttachmentHandler implements AttachmentHandler {
|
||||
|
||||
public static final String OBJECT_KEY = "s3os.plugin.halo.run/object-key";
|
||||
public static final String URL_SUFFIX_ANNO_KEY = "s3os.plugin.halo.run/url-suffix";
|
||||
public static final String SKIP_REMOTE_DELETION_ANNO = "s3os.plugin.halo.run/skip-remote-deletion";
|
||||
public static final int MULTIPART_MIN_PART_SIZE = 5 * 1024 * 1024;
|
||||
|
||||
/**
|
||||
@@ -90,6 +92,13 @@ public class S3OsAttachmentHandler implements AttachmentHandler {
|
||||
.flatMap(context -> {
|
||||
var objectKey = getObjectKey(context.attachment());
|
||||
if (objectKey == null) {
|
||||
log.warn(
|
||||
"Cannot obtain object key from attachment {}, skip deleting object from S3.",
|
||||
context.attachment().getMetadata().getName());
|
||||
return Mono.just(context);
|
||||
} else if (MetadataUtil.nullSafeAnnotations(context.attachment())
|
||||
.containsKey(SKIP_REMOTE_DELETION_ANNO)) {
|
||||
log.info("Skip deleting object {} from S3.", objectKey);
|
||||
return Mono.just(context);
|
||||
}
|
||||
var properties = getProperties(deleteContext.configMap());
|
||||
@@ -213,8 +222,7 @@ public class S3OsAttachmentHandler implements AttachmentHandler {
|
||||
var attachment = new Attachment();
|
||||
attachment.setMetadata(metadata);
|
||||
attachment.setSpec(spec);
|
||||
log.info("Upload object {} to bucket {} successfully", objectDetail.uploadState.objectKey,
|
||||
properties.getBucket());
|
||||
log.info("Built attachment {} successfully", objectDetail.uploadState.objectKey);
|
||||
return attachment;
|
||||
}
|
||||
|
||||
@@ -365,6 +373,8 @@ public class S3OsAttachmentHandler implements AttachmentHandler {
|
||||
// build object detail
|
||||
.map((response) -> {
|
||||
checkResult(response, "getMetadata");
|
||||
log.info("Uploaded object {} to bucket {} successfully",
|
||||
uploadState.objectKey, properties.getBucket());
|
||||
return new ObjectDetail(uploadState, response);
|
||||
})
|
||||
// close client
|
||||
|
21
src/main/java/run/halo/s3os/S3UnlinkController.java
Normal file
21
src/main/java/run/halo/s3os/S3UnlinkController.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package run.halo.s3os;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.core.extension.attachment.Attachment;
|
||||
import run.halo.app.plugin.ApiVersion;
|
||||
|
||||
@ApiVersion("s3os.halo.run/v1alpha1")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
public class S3UnlinkController {
|
||||
private final S3UnlinkService s3UnlinkService;
|
||||
|
||||
@DeleteMapping("/attachments/{name}")
|
||||
public Mono<Attachment> unlink(@PathVariable("name") String name) {
|
||||
return s3UnlinkService.unlink(name);
|
||||
}
|
||||
}
|
8
src/main/java/run/halo/s3os/S3UnlinkService.java
Normal file
8
src/main/java/run/halo/s3os/S3UnlinkService.java
Normal file
@@ -0,0 +1,8 @@
|
||||
package run.halo.s3os;
|
||||
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.core.extension.attachment.Attachment;
|
||||
|
||||
public interface S3UnlinkService {
|
||||
Mono<Attachment> unlink(String name);
|
||||
}
|
37
src/main/java/run/halo/s3os/S3UnlinkServiceImpl.java
Normal file
37
src/main/java/run/halo/s3os/S3UnlinkServiceImpl.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package run.halo.s3os;
|
||||
|
||||
import java.time.Instant;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.server.ServerWebInputException;
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.core.extension.attachment.Attachment;
|
||||
import run.halo.app.core.extension.attachment.Policy;
|
||||
import run.halo.app.extension.ReactiveExtensionClient;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class S3UnlinkServiceImpl implements S3UnlinkService {
|
||||
private final ReactiveExtensionClient client;
|
||||
private final S3OsAttachmentHandler handler;
|
||||
|
||||
@Override
|
||||
public Mono<Attachment> unlink(String name) {
|
||||
return client.get(Attachment.class, name)
|
||||
.flatMap((attachment) -> client.get(Policy.class, attachment.getSpec().getPolicyName())
|
||||
.doOnNext((policy) -> {
|
||||
if (!handler.shouldHandle(policy)) {
|
||||
throw new ServerWebInputException(
|
||||
"This attachment policy is not managed by plugin-s3.");
|
||||
}
|
||||
}).thenReturn(attachment))
|
||||
.flatMap(attachment -> {
|
||||
attachment.getMetadata().getAnnotations().put(
|
||||
S3OsAttachmentHandler.SKIP_REMOTE_DELETION_ANNO, Boolean.TRUE.toString());
|
||||
return client.delete(attachment);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because one or more lines are too long
@@ -21,3 +21,21 @@ rules:
|
||||
verbs: [ "get", "list" ]
|
||||
- nonResourceURLs: ["/apis/s3os.halo.run/v1alpha1/attachments/link"]
|
||||
verbs: [ "create" ]
|
||||
---
|
||||
apiVersion: v1alpha1
|
||||
kind: "Role"
|
||||
metadata:
|
||||
name: role-template-s3os-unlink
|
||||
labels:
|
||||
halo.run/role-template: "true"
|
||||
annotations:
|
||||
rbac.authorization.halo.run/dependencies: |
|
||||
[ "role-template-manage-attachments" ]
|
||||
rbac.authorization.halo.run/module: "S3 Attachments Management"
|
||||
rbac.authorization.halo.run/display-name: "S3 UnLink"
|
||||
rbac.authorization.halo.run/ui-permissions: |
|
||||
["plugin:s3os:unlink"]
|
||||
rules:
|
||||
- apiGroups: [ "s3os.halo.run" ]
|
||||
resources: [ "attachments" ]
|
||||
verbs: [ "delete" ]
|
||||
|
@@ -4,7 +4,7 @@ metadata:
|
||||
name: PluginS3ObjectStorage
|
||||
spec:
|
||||
enabled: true
|
||||
requires: ">=2.9.0"
|
||||
requires: ">=2.10.0"
|
||||
author:
|
||||
name: Halo OSS Team
|
||||
website: https://github.com/halo-dev
|
||||
|
Reference in New Issue
Block a user