Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Nestjs Aragami
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
Nestjs Aragami
Commits
7191e15c
Commit
7191e15c
authored
Jan 04, 2026
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use singleton MemoryDriver
parent
1c2946a7
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
113 additions
and
165 deletions
+113
-165
index.ts
index.ts
+16
-3
package-lock.json
package-lock.json
+96
-161
package.json
package.json
+1
-1
No files found.
index.ts
View file @
7191e15c
import
{
ConfigurableModuleBuilder
,
Inject
,
Module
}
from
'
@nestjs/common
'
;
import
{
ConfigurableModuleBuilder
,
Inject
,
Module
}
from
'
@nestjs/common
'
;
import
{
Aragami
,
AragamiOptions
}
from
'
aragami
'
;
import
{
Aragami
,
AragamiOptions
,
MemoryDriver
}
from
'
aragami
'
;
const
{
ConfigurableModuleClass
,
MODULE_OPTIONS_TOKEN
}
=
const
{
ConfigurableModuleClass
,
MODULE_OPTIONS_TOKEN
}
=
new
ConfigurableModuleBuilder
<
AragamiOptions
>
()
new
ConfigurableModuleBuilder
<
AragamiOptions
>
()
...
@@ -15,14 +15,27 @@ const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN } =
...
@@ -15,14 +15,27 @@ const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN } =
.
build
();
.
build
();
export
const
ARAGAMI_TOKEN
=
'
ARAGAMI_TOKEN
'
;
export
const
ARAGAMI_TOKEN
=
'
ARAGAMI_TOKEN
'
;
export
const
AGAGAMI_MEMORY_DRIVER_TOKEN
=
'
AGAGAMI_MEMORY_DRIVER_TOKEN
'
;
export
const
InjectAragami
=
()
=>
Inject
(
ARAGAMI_TOKEN
);
export
const
InjectAragami
=
()
=>
Inject
(
ARAGAMI_TOKEN
);
@
Module
({
@
Module
({
providers
:
[
providers
:
[
{
{
provide
:
ARAGAMI_TOKEN
,
provide
:
ARAGAMI_TOKEN
,
useFactory
:
(
options
:
AragamiOptions
)
=>
new
Aragami
(
options
),
useFactory
:
(
options
:
AragamiOptions
,
memoryDriver
:
MemoryDriver
)
=>
inject
:
[
MODULE_OPTIONS_TOKEN
],
new
Aragami
({
...
options
,
...(
!
options
.
useDriver
&&
!
options
.
redis
?
{
useDriver
:
memoryDriver
,
}
:
{}),
}),
inject
:
[
MODULE_OPTIONS_TOKEN
,
AGAGAMI_MEMORY_DRIVER_TOKEN
],
},
{
provide
:
AGAGAMI_MEMORY_DRIVER_TOKEN
,
useFactory
:
()
=>
new
MemoryDriver
(),
},
},
],
],
exports
:
[
ARAGAMI_TOKEN
],
exports
:
[
ARAGAMI_TOKEN
],
...
...
package-lock.json
View file @
7191e15c
This diff is collapsed.
Click to expand it.
package.json
View file @
7191e15c
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
"peerDependencies"
:
{
"peerDependencies"
:
{
"@nestjs/common"
:
"^9.1.2 || ^10.0.0 || ^11.0.0"
,
"@nestjs/common"
:
"^9.1.2 || ^10.0.0 || ^11.0.0"
,
"@nestjs/core"
:
"^9.4.2 || ^10.0.0 || ^11.0.0"
,
"@nestjs/core"
:
"^9.4.2 || ^10.0.0 || ^11.0.0"
,
"aragami"
:
"^1.2.0"
,
"aragami"
:
"^1.2.
1
0"
,
"rxjs"
:
"^7.8.1"
"rxjs"
:
"^7.8.1"
}
}
}
}
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