Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
koishi-plugin-typeorm
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-typeorm
Commits
55572131
Commit
55572131
authored
Nov 30, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bump to Koishi 4.10.3
parent
cdea8999
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
248 additions
and
447 deletions
+248
-447
dev/index.ts
dev/index.ts
+1
-1
package-lock.json
package-lock.json
+238
-437
package.json
package.json
+6
-6
tests/typeorm.spec.ts
tests/typeorm.spec.ts
+3
-3
No files found.
dev/index.ts
View file @
55572131
import
{
Context
}
from
'
koishi
'
;
import
{
Context
}
from
'
koishi
'
;
import
TargetPlugin
from
'
../src
'
;
import
TargetPlugin
from
'
../src
'
;
import
ConsolePlugin
from
'
@koishijs/plugin-console
'
;
import
ConsolePlugin
from
'
@koishijs/plugin-console
'
;
import
SandboxPlugin
from
'
@koishijs/plugin-sandbox
'
;
import
*
as
SandboxPlugin
from
'
@koishijs/plugin-sandbox
'
;
import
DatabasePlugin
from
'
@koishijs/plugin-database-memory
'
;
import
DatabasePlugin
from
'
@koishijs/plugin-database-memory
'
;
// import CachePlugin from '@koishijs/plugin-cache-lru';
// import CachePlugin from '@koishijs/plugin-cache-lru';
import
ExtrasInDev
from
'
./extras
'
;
import
ExtrasInDev
from
'
./extras
'
;
...
...
package-lock.json
View file @
55572131
This diff is collapsed.
Click to expand it.
package.json
View file @
55572131
...
@@ -32,15 +32,15 @@
...
@@ -32,15 +32,15 @@
},
},
"homepage"
:
"
https://code.mycard.moe/3rdeye/koishi-plugin-typeorm
"
,
"homepage"
:
"
https://code.mycard.moe/3rdeye/koishi-plugin-typeorm
"
,
"dependencies"
:
{
"dependencies"
:
{
"
koishi-thirdeye
"
:
"
^11.1.1
1
"
,
"
koishi-thirdeye
"
:
"
^11.1.1
3
"
,
"
mysql
"
:
"
^2.18.1
"
,
"
mysql
"
:
"
^2.18.1
"
,
"
pg
"
:
"
^8.
7.3
"
,
"
pg
"
:
"
^8.
8.0
"
,
"
typeorm
"
:
"
^0.3.
7
"
"
typeorm
"
:
"
^0.3.
10
"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"
@koishijs/plugin-console
"
:
"
^4.5.4
"
,
"
@koishijs/plugin-console
"
:
"
^4.5.4
"
,
"
@koishijs/plugin-database-memory
"
:
"
^
1.5
.0
"
,
"
@koishijs/plugin-database-memory
"
:
"
^
2.0
.0
"
,
"
@koishijs/plugin-sandbox
"
:
"
^2.
2.9
"
,
"
@koishijs/plugin-sandbox
"
:
"
^2.
3.5
"
,
"
@types/jest
"
:
"
^29.2.0
"
,
"
@types/jest
"
:
"
^29.2.0
"
,
"
@types/node
"
:
"
^17.0.16
"
,
"
@types/node
"
:
"
^17.0.16
"
,
"
@typescript-eslint/eslint-plugin
"
:
"
^4.33.0
"
,
"
@typescript-eslint/eslint-plugin
"
:
"
^4.33.0
"
,
...
@@ -79,6 +79,6 @@
...
@@ -79,6 +79,6 @@
"testEnvironment"
:
"node"
"testEnvironment"
:
"node"
},
},
"peerDependencies"
:
{
"peerDependencies"
:
{
"koishi"
:
"^4.
9.7
"
"koishi"
:
"^4.
10.3
"
}
}
}
}
tests/typeorm.spec.ts
View file @
55572131
import
{
Context
,
Fork
}
from
'
koishi
'
;
import
{
Context
,
Fork
Scope
}
from
'
koishi
'
;
import
TypeORMPlugin
from
'
../src
'
;
import
TypeORMPlugin
from
'
../src
'
;
import
{
import
{
Column
,
Column
,
...
@@ -44,7 +44,7 @@ class Magic {
...
@@ -44,7 +44,7 @@ class Magic {
describe
(
'
Koishi typeorm
'
,
()
=>
{
describe
(
'
Koishi typeorm
'
,
()
=>
{
let
app
:
Context
;
let
app
:
Context
;
let
pluginInstance
:
Fork
;
let
pluginInstance
:
Fork
Scope
;
beforeEach
(
async
()
=>
{
beforeEach
(
async
()
=>
{
app
=
new
Context
();
app
=
new
Context
();
...
@@ -102,7 +102,7 @@ describe('Koishi typeorm', () => {
...
@@ -102,7 +102,7 @@ describe('Koishi typeorm', () => {
});
});
it
(
'
should auto dispose when plugin gone
'
,
async
()
=>
{
it
(
'
should auto dispose when plugin gone
'
,
async
()
=>
{
let
instance
:
Fork
;
let
instance
:
Fork
Scope
;
await
new
Promise
<
void
>
((
resolve
)
=>
{
await
new
Promise
<
void
>
((
resolve
)
=>
{
instance
=
app
.
plugin
(
async
(
ctx
)
=>
{
instance
=
app
.
plugin
(
async
(
ctx
)
=>
{
await
ctx
.
typeorm
.
create
(
'
bar
'
,
[
User
,
Book
]);
await
ctx
.
typeorm
.
create
(
'
bar
'
,
[
User
,
Book
]);
...
...
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