Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
koishi-plugin-picsource-localfs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
3rdeye
koishi-plugin-picsource-localfs
Commits
fbdb0bc9
Commit
fbdb0bc9
authored
Dec 04, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
catchup
parent
9a4c7277
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
81 deletions
+50
-81
package-lock.json
package-lock.json
+40
-63
package.json
package.json
+3
-3
src/config.ts
src/config.ts
+6
-15
src/index.ts
src/index.ts
+1
-0
No files found.
package-lock.json
View file @
fbdb0bc9
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
"version"
:
"3.0.0"
,
"version"
:
"3.0.0"
,
"license"
:
"MIT"
,
"license"
:
"MIT"
,
"dependencies"
:
{
"dependencies"
:
{
"schemastery-gen"
:
"^2.
0.0
"
,
"schemastery-gen"
:
"^2.
2.4
"
,
"source-map-support"
:
"^0.5.20"
"source-map-support"
:
"^0.5.20"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
"eslint"
:
"^7.32.0"
,
"eslint"
:
"^7.32.0"
,
"eslint-config-prettier"
:
"^8.3.0"
,
"eslint-config-prettier"
:
"^8.3.0"
,
"eslint-plugin-prettier"
:
"^3.4.1"
,
"eslint-plugin-prettier"
:
"^3.4.1"
,
"koishi"
:
"^4.0.0-beta.
3
"
,
"koishi"
:
"^4.0.0-beta.
4
"
,
"koishi-plugin-pics"
:
"^2.0.0"
,
"koishi-plugin-pics"
:
"^2.0.0"
,
"prettier"
:
"^2.4.1"
,
"prettier"
:
"^2.4.1"
,
"raw-loader"
:
"^4.0.2"
,
"raw-loader"
:
"^4.0.2"
,
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
"webpack-cli"
:
"^4.9.1"
"webpack-cli"
:
"^4.9.1"
},
},
"peerDependencies"
:
{
"peerDependencies"
:
{
"koishi"
:
"^4.0.0-beta.
3
"
,
"koishi"
:
"^4.0.0-beta.
4
"
,
"koishi-plugin-pics"
:
"^2.0.0"
,
"koishi-plugin-pics"
:
"^2.0.0"
,
"read-dir-deep"
:
"^7.0.1"
"read-dir-deep"
:
"^7.0.1"
}
}
...
@@ -212,31 +212,19 @@
...
@@ -212,31 +212,19 @@
}
}
},
},
"node_modules/@koishijs/core"
:
{
"node_modules/@koishijs/core"
:
{
"version"
:
"4.0.0-beta.
3
"
,
"version"
:
"4.0.0-beta.
4
"
,
"resolved"
:
"https://registry.npmjs.org/@koishijs/core/-/core-4.0.0-beta.
3
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/@koishijs/core/-/core-4.0.0-beta.
4
.tgz"
,
"integrity"
:
"sha512-
ZCdjZOQ4yNN49/LdOzHKo61j/S+GwqckM116tXrZYF7gNHRZ5486HFJqJjYDCYO3n2AZvQ4nV6w8OSaoIXIPEQ
=="
,
"integrity"
:
"sha512-
i+66ZR3mSAIm1pJmC21QID8QhqJDdJ7zmZ8pCn3mPcfZFGiwL8MDMvwuDvG2ceCyILmtzmXwstURrc2tjB+QPg
=="
,
"dev"
:
true
,
"dev"
:
true
,
"dependencies"
:
{
"dependencies"
:
{
"@koishijs/utils"
:
"^5.0.0-beta.1"
,
"@koishijs/utils"
:
"^5.0.0-beta.1"
,
"fastest-levenshtein"
:
"^1.0.12"
,
"fastest-levenshtein"
:
"^1.0.12"
,
"schemastery"
:
"^2.
0
.0"
"schemastery"
:
"^2.
1
.0"
},
},
"engines"
:
{
"engines"
:
{
"node"
:
">=12.0.0"
"node"
:
">=12.0.0"
}
}
},
},
"node_modules/@koishijs/plugin-cache-lru"
:
{
"version"
:
"1.0.0-beta.2"
,
"resolved"
:
"https://registry.npmjs.org/@koishijs/plugin-cache-lru/-/plugin-cache-lru-1.0.0-beta.2.tgz"
,
"integrity"
:
"sha512-RkLf6Gb+bvJcfBv9ZtfsEFo7NcCr+buQgiKccllfU5rANvUW5uXlPmjcTmV6AaKAr7fDZsCR3GRusiJtzS7STQ=="
,
"dev"
:
true
,
"dependencies"
:
{
"lru-cache"
:
"^6.0.0"
},
"peerDependencies"
:
{
"koishi"
:
"^4.0.0-beta.3"
}
},
"node_modules/@koishijs/utils"
:
{
"node_modules/@koishijs/utils"
:
{
"version"
:
"5.0.0-beta.1"
,
"version"
:
"5.0.0-beta.1"
,
"resolved"
:
"https://registry.npmjs.org/@koishijs/utils/-/utils-5.0.0-beta.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/@koishijs/utils/-/utils-5.0.0-beta.1.tgz"
,
...
@@ -2710,14 +2698,13 @@
...
@@ -2710,14 +2698,13 @@
}
}
},
},
"node_modules/koishi"
:
{
"node_modules/koishi"
:
{
"version"
:
"4.0.0-beta.
3
"
,
"version"
:
"4.0.0-beta.
4
"
,
"resolved"
:
"https://registry.npmjs.org/koishi/-/koishi-4.0.0-beta.
3
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/koishi/-/koishi-4.0.0-beta.
4
.tgz"
,
"integrity"
:
"sha512-
sWTOU4maJnsRU7w8Upw8rBT1aZ0zEfN9Cs02tR2UP7qdmZiRTyrjWWFElaMhmnoj+6nTH7Udihmwb4MwbBimfA
=="
,
"integrity"
:
"sha512-
H0ci/bZ+wHDCnNmLFM125RI+cdprz3McJLEbyK43tGsGuf2y13BuFb+j1ovb6FBRuT3SXlDqH+BpVMlCV2ZaVg
=="
,
"dev"
:
true
,
"dev"
:
true
,
"dependencies"
:
{
"dependencies"
:
{
"@koa/router"
:
"^10.1.1"
,
"@koa/router"
:
"^10.1.1"
,
"@koishijs/core"
:
"^4.0.0-beta.3"
,
"@koishijs/core"
:
"^4.0.0-beta.4"
,
"@koishijs/plugin-cache-lru"
:
"^1.0.0-beta.2"
,
"@koishijs/utils"
:
"^5.0.0-beta.1"
,
"@koishijs/utils"
:
"^5.0.0-beta.1"
,
"@types/koa"
:
"*"
,
"@types/koa"
:
"*"
,
"@types/koa__router"
:
"*"
,
"@types/koa__router"
:
"*"
,
...
@@ -3646,21 +3633,21 @@
...
@@ -3646,21 +3633,21 @@
}
}
},
},
"node_modules/schemastery"
:
{
"node_modules/schemastery"
:
{
"version"
:
"2.
0
.0"
,
"version"
:
"2.
1
.0"
,
"resolved"
:
"https://registry.npmjs.org/schemastery/-/schemastery-2.
0
.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/schemastery/-/schemastery-2.
1
.0.tgz"
,
"integrity"
:
"sha512-
g628Fvc8cY3Laoyz+v45qZGiClwhTj0MsiGF+tSVlUh+hqYf6kVkTaWdIHNGhfj11h9QzRrs0A4wfvQZuHg3iA
=="
"integrity"
:
"sha512-
D5wGNn5lc8GnhTzSl2ClH6RwUB69NMUrIXn6qWJVZSSq1fJtEodL9zXoJUbzoLQlL7rGMuO6entajhZvJY25Tw
=="
},
},
"node_modules/schemastery-gen"
:
{
"node_modules/schemastery-gen"
:
{
"version"
:
"2.
0.0
"
,
"version"
:
"2.
2.4
"
,
"resolved"
:
"https://registry.npmjs.org/schemastery-gen/-/schemastery-gen-2.
0.0
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/schemastery-gen/-/schemastery-gen-2.
2.4
.tgz"
,
"integrity"
:
"sha512-
lTttqIWwNM8nizqUpUvJOERtb+Su4qkNe5Lp0ruINiZlCuN/HBCAOmf+OcdAlWLW8BRAY+xIzf4o1Kl043HVV
Q=="
,
"integrity"
:
"sha512-
WHneTi+RSo28DRMV/Nxspw/Vyv0c2vExBNskxRTdf/Dik6ZTwF4cC5y9eSas+99kctqgxJKBBBcf9vp9mqPYz
Q=="
,
"dependencies"
:
{
"dependencies"
:
{
"lodash"
:
"^4.17.21"
,
"lodash"
:
"^4.17.21"
,
"reflect-metadata"
:
"^0.1.13"
,
"reflect-metadata"
:
"^0.1.13"
,
"typed-reflector"
:
"^1.0.
5
"
"typed-reflector"
:
"^1.0.
8
"
},
},
"peerDependencies"
:
{
"peerDependencies"
:
{
"schemastery"
:
"^2.
0
.0"
"schemastery"
:
"^2.
1
.0"
}
}
},
},
"node_modules/semver"
:
{
"node_modules/semver"
:
{
...
@@ -4134,9 +4121,9 @@
...
@@ -4134,9 +4121,9 @@
}
}
},
},
"node_modules/typed-reflector"
:
{
"node_modules/typed-reflector"
:
{
"version"
:
"1.0.
5
"
,
"version"
:
"1.0.
8
"
,
"resolved"
:
"https://registry.npmjs.org/typed-reflector/-/typed-reflector-1.0.
5
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/typed-reflector/-/typed-reflector-1.0.
8
.tgz"
,
"integrity"
:
"sha512-
uVXjRyfia44NftErLxahyXgXN2C9GhLtFvVnUxdjwU4fRn0dFI+MbqEKy8oYAMdVkC8xRh8xm3r4w/C1aYZMXg
=="
,
"integrity"
:
"sha512-
Gc2y1jdXpBrRDhTth80ABcmZjL/4Jmx+GrBf7uvn4BXW4J+kj5V3IjA+GQl/n+3ye7SgoEO6HOiDhac1H+mKgw
=="
,
"dependencies"
:
{
"dependencies"
:
{
"reflect-metadata"
:
"^0.1.13"
"reflect-metadata"
:
"^0.1.13"
}
}
...
@@ -4582,23 +4569,14 @@
...
@@ -4582,23 +4569,14 @@
}
}
},
},
"@koishijs/core"
:
{
"@koishijs/core"
:
{
"version"
:
"4.0.0-beta.
3
"
,
"version"
:
"4.0.0-beta.
4
"
,
"resolved"
:
"https://registry.npmjs.org/@koishijs/core/-/core-4.0.0-beta.
3
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/@koishijs/core/-/core-4.0.0-beta.
4
.tgz"
,
"integrity"
:
"sha512-
ZCdjZOQ4yNN49/LdOzHKo61j/S+GwqckM116tXrZYF7gNHRZ5486HFJqJjYDCYO3n2AZvQ4nV6w8OSaoIXIPEQ
=="
,
"integrity"
:
"sha512-
i+66ZR3mSAIm1pJmC21QID8QhqJDdJ7zmZ8pCn3mPcfZFGiwL8MDMvwuDvG2ceCyILmtzmXwstURrc2tjB+QPg
=="
,
"dev"
:
true
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
"@koishijs/utils"
:
"^5.0.0-beta.1"
,
"@koishijs/utils"
:
"^5.0.0-beta.1"
,
"fastest-levenshtein"
:
"^1.0.12"
,
"fastest-levenshtein"
:
"^1.0.12"
,
"schemastery"
:
"^2.0.0"
"schemastery"
:
"^2.1.0"
}
},
"@koishijs/plugin-cache-lru"
:
{
"version"
:
"1.0.0-beta.2"
,
"resolved"
:
"https://registry.npmjs.org/@koishijs/plugin-cache-lru/-/plugin-cache-lru-1.0.0-beta.2.tgz"
,
"integrity"
:
"sha512-RkLf6Gb+bvJcfBv9ZtfsEFo7NcCr+buQgiKccllfU5rANvUW5uXlPmjcTmV6AaKAr7fDZsCR3GRusiJtzS7STQ=="
,
"dev"
:
true
,
"requires"
:
{
"lru-cache"
:
"^6.0.0"
}
}
},
},
"@koishijs/utils"
:
{
"@koishijs/utils"
:
{
...
@@ -6508,14 +6486,13 @@
...
@@ -6508,14 +6486,13 @@
}
}
},
},
"koishi"
:
{
"koishi"
:
{
"version"
:
"4.0.0-beta.
3
"
,
"version"
:
"4.0.0-beta.
4
"
,
"resolved"
:
"https://registry.npmjs.org/koishi/-/koishi-4.0.0-beta.
3
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/koishi/-/koishi-4.0.0-beta.
4
.tgz"
,
"integrity"
:
"sha512-
sWTOU4maJnsRU7w8Upw8rBT1aZ0zEfN9Cs02tR2UP7qdmZiRTyrjWWFElaMhmnoj+6nTH7Udihmwb4MwbBimfA
=="
,
"integrity"
:
"sha512-
H0ci/bZ+wHDCnNmLFM125RI+cdprz3McJLEbyK43tGsGuf2y13BuFb+j1ovb6FBRuT3SXlDqH+BpVMlCV2ZaVg
=="
,
"dev"
:
true
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
"@koa/router"
:
"^10.1.1"
,
"@koa/router"
:
"^10.1.1"
,
"@koishijs/core"
:
"^4.0.0-beta.3"
,
"@koishijs/core"
:
"^4.0.0-beta.4"
,
"@koishijs/plugin-cache-lru"
:
"^1.0.0-beta.2"
,
"@koishijs/utils"
:
"^5.0.0-beta.1"
,
"@koishijs/utils"
:
"^5.0.0-beta.1"
,
"@types/koa"
:
"*"
,
"@types/koa"
:
"*"
,
"@types/koa__router"
:
"*"
,
"@types/koa__router"
:
"*"
,
...
@@ -7215,18 +7192,18 @@
...
@@ -7215,18 +7192,18 @@
}
}
},
},
"schemastery"
:
{
"schemastery"
:
{
"version"
:
"2.
0
.0"
,
"version"
:
"2.
1
.0"
,
"resolved"
:
"https://registry.npmjs.org/schemastery/-/schemastery-2.
0
.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/schemastery/-/schemastery-2.
1
.0.tgz"
,
"integrity"
:
"sha512-
g628Fvc8cY3Laoyz+v45qZGiClwhTj0MsiGF+tSVlUh+hqYf6kVkTaWdIHNGhfj11h9QzRrs0A4wfvQZuHg3iA
=="
"integrity"
:
"sha512-
D5wGNn5lc8GnhTzSl2ClH6RwUB69NMUrIXn6qWJVZSSq1fJtEodL9zXoJUbzoLQlL7rGMuO6entajhZvJY25Tw
=="
},
},
"schemastery-gen"
:
{
"schemastery-gen"
:
{
"version"
:
"2.
0.0
"
,
"version"
:
"2.
2.4
"
,
"resolved"
:
"https://registry.npmjs.org/schemastery-gen/-/schemastery-gen-2.
0.0
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/schemastery-gen/-/schemastery-gen-2.
2.4
.tgz"
,
"integrity"
:
"sha512-
lTttqIWwNM8nizqUpUvJOERtb+Su4qkNe5Lp0ruINiZlCuN/HBCAOmf+OcdAlWLW8BRAY+xIzf4o1Kl043HVV
Q=="
,
"integrity"
:
"sha512-
WHneTi+RSo28DRMV/Nxspw/Vyv0c2vExBNskxRTdf/Dik6ZTwF4cC5y9eSas+99kctqgxJKBBBcf9vp9mqPYz
Q=="
,
"requires"
:
{
"requires"
:
{
"lodash"
:
"^4.17.21"
,
"lodash"
:
"^4.17.21"
,
"reflect-metadata"
:
"^0.1.13"
,
"reflect-metadata"
:
"^0.1.13"
,
"typed-reflector"
:
"^1.0.
5
"
"typed-reflector"
:
"^1.0.
8
"
}
}
},
},
"semver"
:
{
"semver"
:
{
...
@@ -7570,9 +7547,9 @@
...
@@ -7570,9 +7547,9 @@
}
}
},
},
"typed-reflector"
:
{
"typed-reflector"
:
{
"version"
:
"1.0.
5
"
,
"version"
:
"1.0.
8
"
,
"resolved"
:
"https://registry.npmjs.org/typed-reflector/-/typed-reflector-1.0.
5
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/typed-reflector/-/typed-reflector-1.0.
8
.tgz"
,
"integrity"
:
"sha512-
uVXjRyfia44NftErLxahyXgXN2C9GhLtFvVnUxdjwU4fRn0dFI+MbqEKy8oYAMdVkC8xRh8xm3r4w/C1aYZMXg
=="
,
"integrity"
:
"sha512-
Gc2y1jdXpBrRDhTth80ABcmZjL/4Jmx+GrBf7uvn4BXW4J+kj5V3IjA+GQl/n+3ye7SgoEO6HOiDhac1H+mKgw
=="
,
"requires"
:
{
"requires"
:
{
"reflect-metadata"
:
"^0.1.13"
"reflect-metadata"
:
"^0.1.13"
}
}
...
...
package.json
View file @
fbdb0bc9
...
@@ -26,11 +26,11 @@
...
@@ -26,11 +26,11 @@
},
},
"homepage"
:
"
https://github.com/koishijs/koishi-plugin-picsource-localfs
"
,
"homepage"
:
"
https://github.com/koishijs/koishi-plugin-picsource-localfs
"
,
"dependencies"
:
{
"dependencies"
:
{
"
schemastery-gen
"
:
"
^2.
0.0
"
,
"
schemastery-gen
"
:
"
^2.
2.4
"
,
"
source-map-support
"
:
"
^0.5.20
"
"
source-map-support
"
:
"
^0.5.20
"
},
},
"peerDependencies"
:
{
"peerDependencies"
:
{
"
koishi
"
:
"
^4.0.0-beta.
3
"
,
"
koishi
"
:
"
^4.0.0-beta.
4
"
,
"
koishi-plugin-pics
"
:
"
^2.0.0
"
,
"
koishi-plugin-pics
"
:
"
^2.0.0
"
,
"read-dir-deep"
:
"^7.0.1"
"read-dir-deep"
:
"^7.0.1"
},
},
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
"
eslint
"
:
"
^7.32.0
"
,
"
eslint
"
:
"
^7.32.0
"
,
"
eslint-config-prettier
"
:
"
^8.3.0
"
,
"
eslint-config-prettier
"
:
"
^8.3.0
"
,
"
eslint-plugin-prettier
"
:
"
^3.4.1
"
,
"
eslint-plugin-prettier
"
:
"
^3.4.1
"
,
"
koishi
"
:
"
^4.0.0-beta.
3
"
,
"
koishi
"
:
"
^4.0.0-beta.
4
"
,
"
koishi-plugin-pics
"
:
"
^2.0.0
"
,
"
koishi-plugin-pics
"
:
"
^2.0.0
"
,
"
prettier
"
:
"
^2.4.1
"
,
"
prettier
"
:
"
^2.4.1
"
,
"
raw-loader
"
:
"
^4.0.2
"
,
"
raw-loader
"
:
"
^4.0.2
"
,
...
...
src/config.ts
View file @
fbdb0bc9
...
@@ -15,16 +15,16 @@ export interface LocalSourceConfigLike extends PicSourceInfo {
...
@@ -15,16 +15,16 @@ export interface LocalSourceConfigLike extends PicSourceInfo {
export
class
LocalSourceConfig
export
class
LocalSourceConfig
extends
PicSourceConfig
extends
PicSourceConfig
implements
LocalSourceConfigLike
{
implements
LocalSourceConfigLike
{
@
DefineSchema
({
desc
:
'
目录路径
'
,
required
:
true
})
@
DefineSchema
({
desc
ription
:
'
目录路径
'
,
required
:
true
})
path
:
string
;
path
:
string
;
@
DefineSchema
({
@
DefineSchema
({
desc
:
'
允许的文件后缀。使用 `*` 表示当前目录,`**` 表示递归所有子目录。
'
,
desc
ription
:
'
允许的文件后缀。使用 `*` 表示当前目录,`**` 表示递归所有子目录。
'
,
type
:
'
string
'
,
type
:
'
string
'
,
default
:
[
'
**.jpg
'
,
'
**.png
'
],
default
:
[
'
**.jpg
'
,
'
**.png
'
],
})
})
patterns
:
string
[];
patterns
:
string
[];
@
DefineSchema
({
@
DefineSchema
({
desc
:
'
排除的路径
'
,
desc
ription
:
'
排除的路径
'
,
type
:
'
string
'
,
type
:
'
string
'
,
default
:
[
default
:
[
'
**/.DS_Store
'
,
'
**/.DS_Store
'
,
...
@@ -36,7 +36,7 @@ export class LocalSourceConfig
...
@@ -36,7 +36,7 @@ export class LocalSourceConfig
hidden
:
true
,
hidden
:
true
,
})
})
exclude
:
string
[];
exclude
:
string
[];
@
DefineSchema
({
desc
:
'
是否显示文件名
'
,
default
:
true
})
@
DefineSchema
({
desc
ription
:
'
是否显示文件名
'
,
default
:
true
})
displayFilename
:
boolean
;
displayFilename
:
boolean
;
registerInstance
(
ctx
:
Context
)
{
registerInstance
(
ctx
:
Context
)
{
...
@@ -44,16 +44,7 @@ export class LocalSourceConfig
...
@@ -44,16 +44,7 @@ export class LocalSourceConfig
ctx
ctx
.
logger
(
'
picsource-localfs
'
)
.
logger
(
'
picsource-localfs
'
)
.
info
(
`Registered localfs pic source
${
instance
.
name
}
.`
);
.
info
(
`Registered localfs pic source
${
instance
.
name
}
.`
);
if
(
ctx
.
pics
)
{
ctx
.
pics
.
addSource
(
instance
,
ctx
);
ctx
.
pics
.
addSource
(
instance
,
ctx
);
}
ctx
.
on
(
'
service/pics
'
,
()
=>
{
if
(
!
ctx
.
pics
)
{
ctx
.
logger
(
'
picsource-localfs
'
).
warn
(
`Pics container not found.`
);
return
;
}
ctx
.
pics
.
addSource
(
instance
,
ctx
);
});
}
}
}
}
...
@@ -63,6 +54,6 @@ export interface PicSourceLocalFSPluginConfigLike {
...
@@ -63,6 +54,6 @@ export interface PicSourceLocalFSPluginConfigLike {
export
class
PicSourceLocalFSPluginConfig
export
class
PicSourceLocalFSPluginConfig
implements
PicSourceLocalFSPluginConfigLike
{
implements
PicSourceLocalFSPluginConfigLike
{
@
DefineSchema
({
desc
:
'
目录定义
'
,
type
:
LocalSourceConfig
,
required
:
true
})
@
DefineSchema
({
desc
ription
:
'
目录定义
'
,
type
:
LocalSourceConfig
,
required
:
true
})
sources
:
LocalSourceConfig
[];
sources
:
LocalSourceConfig
[];
}
}
src/index.ts
View file @
fbdb0bc9
...
@@ -9,6 +9,7 @@ export * from './LocalSource';
...
@@ -9,6 +9,7 @@ export * from './LocalSource';
export
const
name
=
'
picsource-localfs
'
;
export
const
name
=
'
picsource-localfs
'
;
const
plugin
=
new
PicSourceLocalFSPlugin
();
const
plugin
=
new
PicSourceLocalFSPlugin
();
export
const
schema
=
plugin
.
schema
;
export
const
schema
=
plugin
.
schema
;
export
const
using
=
[
'
pics
'
];
export
function
apply
(
ctx
:
Context
,
config
:
PicSourceLocalFSPluginConfig
)
{
export
function
apply
(
ctx
:
Context
,
config
:
PicSourceLocalFSPluginConfig
)
{
ctx
.
plugin
(
plugin
,
config
);
ctx
.
plugin
(
plugin
,
config
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment