@adonisjs/core 5.9.0 → 6.0.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -15
- package/build/commands/commands.json +1 -0
- package/build/commands/eject.d.ts +8 -0
- package/build/commands/eject.js +34 -0
- package/build/commands/{GenerateKey.d.ts → generate_key.d.ts} +3 -4
- package/build/commands/generate_key.js +47 -0
- package/build/commands/main.js +36 -0
- package/build/commands/make/_base.d.ts +6 -0
- package/build/commands/make/_base.js +19 -0
- package/build/commands/make/command.d.ts +8 -0
- package/build/commands/make/command.js +25 -0
- package/build/commands/make/controller.d.ts +12 -0
- package/build/commands/make/controller.js +57 -0
- package/build/commands/make/event.d.ts +8 -0
- package/build/commands/make/event.js +25 -0
- package/build/commands/make/listener.d.ts +10 -0
- package/build/commands/make/listener.js +48 -0
- package/build/commands/make/middleware.d.ts +8 -0
- package/build/commands/make/middleware.js +25 -0
- package/build/commands/make/provider.d.ts +8 -0
- package/build/commands/make/provider.js +25 -0
- package/build/index.d.ts +140 -0
- package/build/index.js +21 -0
- package/build/legacy/validator.d.ts +1 -0
- package/build/legacy/validator.js +1 -0
- package/build/modules/ace/commands.d.ts +26 -0
- package/build/modules/ace/commands.js +63 -0
- package/build/modules/ace/create_kernel.d.ts +3 -0
- package/build/modules/ace/create_kernel.js +33 -0
- package/build/modules/ace/kernel.d.ts +7 -0
- package/build/modules/ace/kernel.js +14 -0
- package/build/modules/ace/main.d.ts +3 -0
- package/build/modules/ace/main.js +3 -0
- package/build/modules/app.d.ts +1 -0
- package/build/modules/app.js +1 -0
- package/build/modules/bodyparser/bodyparser_middleware.d.ts +2 -0
- package/build/modules/bodyparser/bodyparser_middleware.js +2 -0
- package/build/modules/bodyparser/main.d.ts +1 -0
- package/build/modules/bodyparser/main.js +1 -0
- package/build/modules/config.d.ts +1 -0
- package/build/modules/config.js +1 -0
- package/build/modules/container.d.ts +1 -0
- package/build/modules/container.js +1 -0
- package/build/modules/encryption.d.ts +1 -0
- package/build/modules/encryption.js +1 -0
- package/build/modules/env.d.ts +1 -0
- package/build/modules/env.js +1 -0
- package/build/modules/events.d.ts +1 -0
- package/build/modules/events.js +1 -0
- package/build/modules/hash/define_config.d.ts +15 -0
- package/build/modules/hash/define_config.js +19 -0
- package/build/modules/hash/drivers_collection.d.ts +9 -0
- package/build/modules/hash/drivers_collection.js +22 -0
- package/build/modules/hash/main.d.ts +2 -0
- package/build/modules/hash/main.js +2 -0
- package/build/modules/http.d.ts +1 -0
- package/build/modules/http.js +1 -0
- package/build/modules/logger.d.ts +1 -0
- package/build/modules/logger.js +1 -0
- package/build/providers/app_provider.d.ts +16 -0
- package/build/providers/app_provider.js +74 -0
- package/build/providers/hash_provider.d.ts +9 -0
- package/build/providers/hash_provider.js +29 -0
- package/build/providers/http_provider.d.ts +9 -0
- package/build/providers/http_provider.js +36 -0
- package/build/services/ace.d.ts +3 -0
- package/build/services/ace.js +6 -0
- package/build/services/app.d.ts +4 -12
- package/build/services/app.js +5 -12
- package/build/services/config.d.ts +3 -3
- package/build/services/config.js +6 -12
- package/build/services/emitter.d.ts +3 -0
- package/build/services/emitter.js +7 -0
- package/build/services/encryption.d.ts +3 -3
- package/build/services/encryption.js +7 -12
- package/build/services/hash.d.ts +3 -3
- package/build/services/hash.js +7 -12
- package/build/services/logger.d.ts +3 -0
- package/build/services/logger.js +7 -0
- package/build/services/router.d.ts +3 -0
- package/build/services/router.js +7 -0
- package/build/services/server.d.ts +3 -0
- package/build/services/server.js +7 -0
- package/build/services/test_utils.d.ts +3 -0
- package/build/services/test_utils.js +6 -0
- package/build/src/debug.d.ts +3 -0
- package/build/src/debug.js +2 -0
- package/build/src/helpers/is.d.ts +2 -0
- package/build/src/helpers/is.js +2 -0
- package/build/src/helpers/main.d.ts +2 -0
- package/build/src/helpers/main.js +2 -0
- package/build/src/helpers/string.d.ts +17 -0
- package/build/src/helpers/string.js +26 -0
- package/build/src/helpers/string_builder.d.ts +23 -0
- package/build/src/helpers/string_builder.js +86 -0
- package/build/src/helpers/types.d.ts +24 -0
- package/build/src/helpers/types.js +29 -0
- package/build/src/ignitor/ace.d.ts +8 -0
- package/build/src/ignitor/ace.js +31 -0
- package/build/src/ignitor/http.d.ts +10 -0
- package/build/src/ignitor/http.js +62 -0
- package/build/src/ignitor/main.d.ts +17 -0
- package/build/src/ignitor/main.js +45 -0
- package/build/src/ignitor/test.d.ts +8 -0
- package/build/src/ignitor/test.js +18 -0
- package/build/src/test_utils/http.d.ts +10 -0
- package/build/src/test_utils/http.js +42 -0
- package/build/src/test_utils/main.d.ts +19 -0
- package/build/src/test_utils/main.js +33 -0
- package/build/src/types.d.ts +63 -0
- package/build/src/types.js +1 -0
- package/build/stubs/index.d.ts +1 -0
- package/build/stubs/index.js +2 -0
- package/build/stubs/make/command/main.stub +19 -0
- package/build/stubs/make/controller/api.stub +33 -0
- package/build/stubs/make/controller/main.stub +9 -0
- package/build/stubs/make/controller/resource.stub +43 -0
- package/build/stubs/make/event/main.stub +15 -0
- package/build/stubs/make/listener/for_event.stub +13 -0
- package/build/stubs/make/listener/main.stub +7 -0
- package/build/stubs/make/middleware/main.stub +22 -0
- package/build/stubs/make/provider/main.stub +35 -0
- package/build/types/ace.d.ts +5 -0
- package/build/types/ace.js +1 -0
- package/build/types/app.d.ts +1 -0
- package/build/types/app.js +1 -0
- package/build/types/bodyparser.d.ts +1 -0
- package/build/types/bodyparser.js +1 -0
- package/build/types/container.d.ts +1 -0
- package/build/types/container.js +1 -0
- package/build/types/encryption.d.ts +1 -0
- package/build/types/encryption.js +1 -0
- package/build/types/events.d.ts +1 -0
- package/build/types/events.js +1 -0
- package/build/types/hash.d.ts +1 -0
- package/build/types/hash.js +1 -0
- package/build/types/http.d.ts +1 -0
- package/build/types/http.js +1 -0
- package/build/types/logger.d.ts +1 -0
- package/build/types/logger.js +1 -0
- package/package.json +226 -245
- package/build/adonis-typings/ace.d.ts +0 -5
- package/build/adonis-typings/ace.js +0 -8
- package/build/adonis-typings/assets-manager.d.ts +0 -92
- package/build/adonis-typings/assets-manager.js +0 -8
- package/build/adonis-typings/container.d.ts +0 -14
- package/build/adonis-typings/container.js +0 -8
- package/build/adonis-typings/cors.d.ts +0 -15
- package/build/adonis-typings/cors.js +0 -8
- package/build/adonis-typings/exception-handler.d.ts +0 -31
- package/build/adonis-typings/exception-handler.js +0 -8
- package/build/adonis-typings/health-check.d.ts +0 -40
- package/build/adonis-typings/health-check.js +0 -8
- package/build/adonis-typings/index.d.ts +0 -17
- package/build/adonis-typings/index.js +0 -25
- package/build/adonis-typings/static.d.ts +0 -15
- package/build/adonis-typings/static.js +0 -8
- package/build/adonis-typings/test-utils.d.ts +0 -24
- package/build/adonis-typings/test-utils.js +0 -8
- package/build/adonis-typings/tests.d.ts +0 -13
- package/build/adonis-typings/tests.js +0 -11
- package/build/commands/DumpRc.d.ts +0 -13
- package/build/commands/DumpRc.js +0 -33
- package/build/commands/GenerateKey.js +0 -25
- package/build/commands/ListRoutes/Renderers/Base.d.ts +0 -31
- package/build/commands/ListRoutes/Renderers/Base.js +0 -70
- package/build/commands/ListRoutes/Renderers/PrettyRenderer.d.ts +0 -51
- package/build/commands/ListRoutes/Renderers/PrettyRenderer.js +0 -135
- package/build/commands/ListRoutes/Renderers/TableRenderer.d.ts +0 -36
- package/build/commands/ListRoutes/Renderers/TableRenderer.js +0 -137
- package/build/commands/ListRoutes/index.d.ts +0 -75
- package/build/commands/ListRoutes/index.js +0 -166
- package/build/commands/index.d.ts +0 -2
- package/build/commands/index.js +0 -15
- package/build/config.d.ts +0 -2
- package/build/config.js +0 -15
- package/build/instructions.js +0 -81
- package/build/providers/AppProvider.d.ts +0 -68
- package/build/providers/AppProvider.js +0 -201
- package/build/services/base.d.ts +0 -3
- package/build/services/base.js +0 -23
- package/build/services/bodyparser.d.ts +0 -2
- package/build/services/bodyparser.js +0 -12
- package/build/services/drive.d.ts +0 -3
- package/build/services/drive.js +0 -12
- package/build/services/event.d.ts +0 -3
- package/build/services/event.js +0 -12
- package/build/services/healthChecks.d.ts +0 -3
- package/build/services/healthChecks.js +0 -12
- package/build/services/httpContext.d.ts +0 -3
- package/build/services/httpContext.js +0 -12
- package/build/services/route.d.ts +0 -3
- package/build/services/route.js +0 -12
- package/build/services/validator.d.ts +0 -3
- package/build/services/validator.js +0 -12
- package/build/src/AssetsManager/Drivers/Base.d.ts +0 -27
- package/build/src/AssetsManager/Drivers/Base.js +0 -66
- package/build/src/AssetsManager/Drivers/Encore.d.ts +0 -58
- package/build/src/AssetsManager/Drivers/Encore.js +0 -93
- package/build/src/AssetsManager/Drivers/Fake.d.ts +0 -38
- package/build/src/AssetsManager/Drivers/Fake.js +0 -61
- package/build/src/AssetsManager/Drivers/Vite.d.ts +0 -84
- package/build/src/AssetsManager/Drivers/Vite.js +0 -139
- package/build/src/AssetsManager/index.d.ts +0 -87
- package/build/src/AssetsManager/index.js +0 -184
- package/build/src/Bindings/Repl.d.ts +0 -8
- package/build/src/Bindings/Repl.js +0 -90
- package/build/src/Bindings/Tests.d.ts +0 -7
- package/build/src/Bindings/Tests.js +0 -66
- package/build/src/HealthCheck/Checkers/AppKey.d.ts +0 -6
- package/build/src/HealthCheck/Checkers/AppKey.js +0 -60
- package/build/src/HealthCheck/Checkers/Env.d.ts +0 -6
- package/build/src/HealthCheck/Checkers/Env.js +0 -42
- package/build/src/HealthCheck/index.d.ts +0 -48
- package/build/src/HealthCheck/index.js +0 -99
- package/build/src/Hooks/Cors/index.d.ts +0 -70
- package/build/src/Hooks/Cors/index.js +0 -314
- package/build/src/Hooks/Static/index.d.ts +0 -18
- package/build/src/Hooks/Static/index.js +0 -66
- package/build/src/HttpExceptionHandler/index.d.ts +0 -82
- package/build/src/HttpExceptionHandler/index.js +0 -213
- package/build/src/Ignitor/Ace/App/index.d.ts +0 -60
- package/build/src/Ignitor/Ace/App/index.js +0 -236
- package/build/src/Ignitor/Ace/Exceptions/index.d.ts +0 -4
- package/build/src/Ignitor/Ace/Exceptions/index.js +0 -19
- package/build/src/Ignitor/Ace/GenerateManifest/index.d.ts +0 -28
- package/build/src/Ignitor/Ace/GenerateManifest/index.js +0 -75
- package/build/src/Ignitor/Ace/index.d.ts +0 -11
- package/build/src/Ignitor/Ace/index.js +0 -36
- package/build/src/Ignitor/HttpServer/index.d.ts +0 -56
- package/build/src/Ignitor/HttpServer/index.js +0 -127
- package/build/src/Ignitor/Kernel/index.d.ts +0 -56
- package/build/src/Ignitor/Kernel/index.js +0 -123
- package/build/src/Ignitor/SignalsListener/index.d.ts +0 -23
- package/build/src/Ignitor/SignalsListener/index.js +0 -66
- package/build/src/Ignitor/index.d.ts +0 -32
- package/build/src/Ignitor/index.js +0 -58
- package/build/src/TestUtils/HttpServer/index.d.ts +0 -27
- package/build/src/TestUtils/HttpServer/index.js +0 -56
- package/build/src/TestUtils/index.d.ts +0 -24
- package/build/src/TestUtils/index.js +0 -43
- package/build/src/utils/index.d.ts +0 -18
- package/build/src/utils/index.js +0 -82
- package/build/standalone.d.ts +0 -9
- package/build/standalone.js +0 -52
- package/build/templates/config/app.txt +0 -303
- package/build/templates/config/bodyparser.txt +0 -211
- package/build/templates/config/cors.txt +0 -134
- package/build/templates/config/drive.txt +0 -149
- package/build/templates/config/hash.txt +0 -96
- package/build/templates/config/static.txt +0 -89
- package/build/templates/contracts/drive.txt +0 -13
- package/build/templates/contracts/env.txt +0 -24
- package/build/templates/contracts/events.txt +0 -31
- package/build/templates/contracts/hash.txt +0 -13
- package/build/templates/env.txt +0 -31
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Config source: https://git.io/JBt3o
|
|
3
|
-
*
|
|
4
|
-
* Feel free to let us know via PR, if you find something broken in this config
|
|
5
|
-
* file.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import Env from '@ioc:Adonis/Core/Env'
|
|
9
|
-
import { driveConfig } from '@adonisjs/core/build/config'
|
|
10
|
-
import Application from '@ioc:Adonis/Core/Application'
|
|
11
|
-
|
|
12
|
-
/*
|
|
13
|
-
|--------------------------------------------------------------------------
|
|
14
|
-
| Drive Config
|
|
15
|
-
|--------------------------------------------------------------------------
|
|
16
|
-
|
|
|
17
|
-
| The `DriveConfig` relies on the `DisksList` interface which is
|
|
18
|
-
| defined inside the `contracts` directory.
|
|
19
|
-
|
|
|
20
|
-
*/
|
|
21
|
-
export default driveConfig({
|
|
22
|
-
/*
|
|
23
|
-
|--------------------------------------------------------------------------
|
|
24
|
-
| Default disk
|
|
25
|
-
|--------------------------------------------------------------------------
|
|
26
|
-
|
|
|
27
|
-
| The default disk to use for managing file uploads. The value is driven by
|
|
28
|
-
| the `DRIVE_DISK` environment variable.
|
|
29
|
-
|
|
|
30
|
-
*/
|
|
31
|
-
disk: Env.get('DRIVE_DISK'),
|
|
32
|
-
|
|
33
|
-
disks: {
|
|
34
|
-
/*
|
|
35
|
-
|--------------------------------------------------------------------------
|
|
36
|
-
| Local
|
|
37
|
-
|--------------------------------------------------------------------------
|
|
38
|
-
|
|
|
39
|
-
| Uses the local file system to manage files. Make sure to turn off serving
|
|
40
|
-
| files when not using this disk.
|
|
41
|
-
|
|
|
42
|
-
*/
|
|
43
|
-
local: {
|
|
44
|
-
driver: 'local',
|
|
45
|
-
visibility: 'public',
|
|
46
|
-
|
|
47
|
-
/*
|
|
48
|
-
|--------------------------------------------------------------------------
|
|
49
|
-
| Storage root - Local driver only
|
|
50
|
-
|--------------------------------------------------------------------------
|
|
51
|
-
|
|
|
52
|
-
| Define an absolute path to the storage directory from where to read the
|
|
53
|
-
| files.
|
|
54
|
-
|
|
|
55
|
-
*/
|
|
56
|
-
root: Application.tmpPath('uploads'),
|
|
57
|
-
|
|
58
|
-
/*
|
|
59
|
-
|--------------------------------------------------------------------------
|
|
60
|
-
| Serve files - Local driver only
|
|
61
|
-
|--------------------------------------------------------------------------
|
|
62
|
-
|
|
|
63
|
-
| When this is set to true, AdonisJS will configure a files server to serve
|
|
64
|
-
| files from the disk root. This is done to mimic the behavior of cloud
|
|
65
|
-
| storage services that has inbuilt capabilities to serve files.
|
|
66
|
-
|
|
|
67
|
-
*/
|
|
68
|
-
serveFiles: true,
|
|
69
|
-
|
|
70
|
-
/*
|
|
71
|
-
|--------------------------------------------------------------------------
|
|
72
|
-
| Base path - Local driver only
|
|
73
|
-
|--------------------------------------------------------------------------
|
|
74
|
-
|
|
|
75
|
-
| Base path is always required when "serveFiles = true". Also make sure
|
|
76
|
-
| the `basePath` is unique across all the disks using "local" driver and
|
|
77
|
-
| you are not registering routes with this prefix.
|
|
78
|
-
|
|
|
79
|
-
*/
|
|
80
|
-
basePath: '/uploads',
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
/*
|
|
84
|
-
|--------------------------------------------------------------------------
|
|
85
|
-
| S3 Driver
|
|
86
|
-
|--------------------------------------------------------------------------
|
|
87
|
-
|
|
|
88
|
-
| Uses the S3 cloud storage to manage files. Make sure to install the s3
|
|
89
|
-
| drive separately when using it.
|
|
90
|
-
|
|
|
91
|
-
|**************************************************************************
|
|
92
|
-
| npm i @adonisjs/drive-s3
|
|
93
|
-
|**************************************************************************
|
|
94
|
-
|
|
|
95
|
-
*/
|
|
96
|
-
// s3: {
|
|
97
|
-
// driver: 's3',
|
|
98
|
-
// visibility: 'public',
|
|
99
|
-
// key: Env.get('S3_KEY'),
|
|
100
|
-
// secret: Env.get('S3_SECRET'),
|
|
101
|
-
// region: Env.get('S3_REGION'),
|
|
102
|
-
// bucket: Env.get('S3_BUCKET'),
|
|
103
|
-
// endpoint: Env.get('S3_ENDPOINT'),
|
|
104
|
-
//
|
|
105
|
-
// // For minio to work
|
|
106
|
-
// // forcePathStyle: true,
|
|
107
|
-
// },
|
|
108
|
-
|
|
109
|
-
/*
|
|
110
|
-
|--------------------------------------------------------------------------
|
|
111
|
-
| GCS Driver
|
|
112
|
-
|--------------------------------------------------------------------------
|
|
113
|
-
|
|
|
114
|
-
| Uses the Google cloud storage to manage files. Make sure to install the GCS
|
|
115
|
-
| drive separately when using it.
|
|
116
|
-
|
|
|
117
|
-
|**************************************************************************
|
|
118
|
-
| npm i @adonisjs/drive-gcs
|
|
119
|
-
|**************************************************************************
|
|
120
|
-
|
|
|
121
|
-
*/
|
|
122
|
-
// gcs: {
|
|
123
|
-
// driver: 'gcs',
|
|
124
|
-
// visibility: 'public',
|
|
125
|
-
// keyFilename: Env.get('GCS_KEY_FILENAME'),
|
|
126
|
-
// bucket: Env.get('GCS_BUCKET'),
|
|
127
|
-
|
|
128
|
-
/*
|
|
129
|
-
|--------------------------------------------------------------------------
|
|
130
|
-
| Uniform ACL - Google cloud storage only
|
|
131
|
-
|--------------------------------------------------------------------------
|
|
132
|
-
|
|
|
133
|
-
| When using the Uniform ACL on the bucket, the "visibility" option is
|
|
134
|
-
| ignored. Since, the files ACL is managed by the google bucket policies
|
|
135
|
-
| directly.
|
|
136
|
-
|
|
|
137
|
-
|**************************************************************************
|
|
138
|
-
| Learn more: https://cloud.google.com/storage/docs/uniform-bucket-level-access
|
|
139
|
-
|**************************************************************************
|
|
140
|
-
|
|
|
141
|
-
| The following option just informs drive whether your bucket is using uniform
|
|
142
|
-
| ACL or not. The actual setting needs to be toggled within the Google cloud
|
|
143
|
-
| console.
|
|
144
|
-
|
|
|
145
|
-
*/
|
|
146
|
-
// usingUniformAcl: false,
|
|
147
|
-
// },
|
|
148
|
-
},
|
|
149
|
-
})
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Config source: https://git.io/JfefW
|
|
3
|
-
*
|
|
4
|
-
* Feel free to let us know via PR, if you find something broken in this config
|
|
5
|
-
* file.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import Env from '@ioc:Adonis/Core/Env'
|
|
9
|
-
import { hashConfig } from '@adonisjs/core/build/config'
|
|
10
|
-
|
|
11
|
-
/*
|
|
12
|
-
|--------------------------------------------------------------------------
|
|
13
|
-
| Hash Config
|
|
14
|
-
|--------------------------------------------------------------------------
|
|
15
|
-
|
|
|
16
|
-
| The `HashConfig` relies on the `HashList` interface which is
|
|
17
|
-
| defined inside `contracts` directory.
|
|
18
|
-
|
|
|
19
|
-
*/
|
|
20
|
-
export default hashConfig({
|
|
21
|
-
/*
|
|
22
|
-
|--------------------------------------------------------------------------
|
|
23
|
-
| Default hasher
|
|
24
|
-
|--------------------------------------------------------------------------
|
|
25
|
-
|
|
|
26
|
-
| By default we make use of the argon hasher to hash values. However, feel
|
|
27
|
-
| free to change the default value
|
|
28
|
-
|
|
|
29
|
-
*/
|
|
30
|
-
default: Env.get('HASH_DRIVER', 'scrypt'),
|
|
31
|
-
|
|
32
|
-
list: {
|
|
33
|
-
/*
|
|
34
|
-
|--------------------------------------------------------------------------
|
|
35
|
-
| scrypt
|
|
36
|
-
|--------------------------------------------------------------------------
|
|
37
|
-
|
|
|
38
|
-
| Scrypt mapping uses the Node.js inbuilt crypto module for creating
|
|
39
|
-
| hashes.
|
|
40
|
-
|
|
|
41
|
-
| We are using the default configuration recommended within the Node.js
|
|
42
|
-
| documentation.
|
|
43
|
-
| https://nodejs.org/api/crypto.html#cryptoscryptpassword-salt-keylen-options-callback
|
|
44
|
-
|
|
|
45
|
-
*/
|
|
46
|
-
scrypt: {
|
|
47
|
-
driver: 'scrypt',
|
|
48
|
-
cost: 16384,
|
|
49
|
-
blockSize: 8,
|
|
50
|
-
parallelization: 1,
|
|
51
|
-
saltSize: 16,
|
|
52
|
-
keyLength: 64,
|
|
53
|
-
maxMemory: 32 * 1024 * 1024,
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
/*
|
|
57
|
-
|--------------------------------------------------------------------------
|
|
58
|
-
| Argon
|
|
59
|
-
|--------------------------------------------------------------------------
|
|
60
|
-
|
|
|
61
|
-
| Argon mapping uses the `argon2` driver to hash values.
|
|
62
|
-
|
|
|
63
|
-
| Make sure you install the underlying dependency for this driver to work.
|
|
64
|
-
| https://www.npmjs.com/package/phc-argon2.
|
|
65
|
-
|
|
|
66
|
-
| npm install phc-argon2
|
|
67
|
-
|
|
|
68
|
-
*/
|
|
69
|
-
argon: {
|
|
70
|
-
driver: 'argon2',
|
|
71
|
-
variant: 'id',
|
|
72
|
-
iterations: 3,
|
|
73
|
-
memory: 4096,
|
|
74
|
-
parallelism: 1,
|
|
75
|
-
saltSize: 16,
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
/*
|
|
79
|
-
|--------------------------------------------------------------------------
|
|
80
|
-
| Bcrypt
|
|
81
|
-
|--------------------------------------------------------------------------
|
|
82
|
-
|
|
|
83
|
-
| Bcrypt mapping uses the `bcrypt` driver to hash values.
|
|
84
|
-
|
|
|
85
|
-
| Make sure you install the underlying dependency for this driver to work.
|
|
86
|
-
| https://www.npmjs.com/package/phc-bcrypt.
|
|
87
|
-
|
|
|
88
|
-
| npm install phc-bcrypt
|
|
89
|
-
|
|
|
90
|
-
*/
|
|
91
|
-
bcrypt: {
|
|
92
|
-
driver: 'bcrypt',
|
|
93
|
-
rounds: 10,
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
})
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Config source: https://git.io/Jfefl
|
|
3
|
-
*
|
|
4
|
-
* Feel free to let us know via PR, if you find something broken in this config
|
|
5
|
-
* file.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { AssetsConfig } from '@ioc:Adonis/Core/Static'
|
|
9
|
-
|
|
10
|
-
const staticConfig: AssetsConfig = {
|
|
11
|
-
/*
|
|
12
|
-
|--------------------------------------------------------------------------
|
|
13
|
-
| Enabled
|
|
14
|
-
|--------------------------------------------------------------------------
|
|
15
|
-
|
|
|
16
|
-
| A boolean to enable or disable serving static files. The static files
|
|
17
|
-
| are served from the `public` directory inside the application root.
|
|
18
|
-
| However, you can override the default path inside `.adonisrc.json`
|
|
19
|
-
| file.
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
*/
|
|
23
|
-
enabled: true,
|
|
24
|
-
|
|
25
|
-
/*
|
|
26
|
-
|--------------------------------------------------------------------------
|
|
27
|
-
| Handling Dot Files
|
|
28
|
-
|--------------------------------------------------------------------------
|
|
29
|
-
|
|
|
30
|
-
| Decide how you want the static assets server to handle the `dotfiles`.
|
|
31
|
-
| By default, we ignore them as if they don't exists. However, you
|
|
32
|
-
| can choose between one of the following options.
|
|
33
|
-
|
|
|
34
|
-
| - ignore: Behave as if the file doesn't exists. Results in 404.
|
|
35
|
-
| - deny: Deny access to the file. Results in 403.
|
|
36
|
-
| - allow: Serve the file contents
|
|
37
|
-
|
|
|
38
|
-
*/
|
|
39
|
-
dotFiles: 'ignore',
|
|
40
|
-
|
|
41
|
-
/*
|
|
42
|
-
|--------------------------------------------------------------------------
|
|
43
|
-
| Generating Etag
|
|
44
|
-
|--------------------------------------------------------------------------
|
|
45
|
-
|
|
|
46
|
-
| Handle whether or not to generate etags for the files. Etag allows browser
|
|
47
|
-
| to utilize the cache when file hasn't been changed.
|
|
48
|
-
|
|
|
49
|
-
*/
|
|
50
|
-
etag: true,
|
|
51
|
-
|
|
52
|
-
/*
|
|
53
|
-
|--------------------------------------------------------------------------
|
|
54
|
-
| Set Last Modified
|
|
55
|
-
|--------------------------------------------------------------------------
|
|
56
|
-
|
|
|
57
|
-
| Whether or not to set the `Last-Modified` header in the response. Uses
|
|
58
|
-
| the file system's last modified value.
|
|
59
|
-
|
|
|
60
|
-
*/
|
|
61
|
-
lastModified: true,
|
|
62
|
-
|
|
63
|
-
/*
|
|
64
|
-
|--------------------------------------------------------------------------
|
|
65
|
-
| Max age
|
|
66
|
-
|--------------------------------------------------------------------------
|
|
67
|
-
|
|
|
68
|
-
| Set the value for the max-age directive. Set a higher value in production
|
|
69
|
-
| if you fingerprint your assets.
|
|
70
|
-
|
|
|
71
|
-
| Learn more: https://docs.adonisjs.com/guides/deployment#serving-static-assets
|
|
72
|
-
|
|
|
73
|
-
*/
|
|
74
|
-
maxAge: 0,
|
|
75
|
-
|
|
76
|
-
/*
|
|
77
|
-
|--------------------------------------------------------------------------
|
|
78
|
-
| Immutable
|
|
79
|
-
|--------------------------------------------------------------------------
|
|
80
|
-
|
|
|
81
|
-
| Set the immutable directive. Set it to `true` if the assets are generated
|
|
82
|
-
| with a fingerprint. In others words the file name changes when the file
|
|
83
|
-
| contents change.
|
|
84
|
-
|
|
|
85
|
-
*/
|
|
86
|
-
immutable: false,
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export default staticConfig
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Contract source: https://git.io/JBt3I
|
|
3
|
-
*
|
|
4
|
-
* Feel free to let us know via PR, if you find something broken in this contract
|
|
5
|
-
* file.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type { InferDisksFromConfig } from '@adonisjs/core/build/config'
|
|
9
|
-
import type driveConfig from '../config/drive'
|
|
10
|
-
|
|
11
|
-
declare module '@ioc:Adonis/Core/Drive' {
|
|
12
|
-
interface DisksList extends InferDisksFromConfig<typeof driveConfig> {}
|
|
13
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Contract source: https://git.io/JTm6U
|
|
3
|
-
*
|
|
4
|
-
* Feel free to let us know via PR, if you find something broken in this contract
|
|
5
|
-
* file.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
declare module '@ioc:Adonis/Core/Env' {
|
|
9
|
-
/*
|
|
10
|
-
|--------------------------------------------------------------------------
|
|
11
|
-
| Getting types for validated environment variables
|
|
12
|
-
|--------------------------------------------------------------------------
|
|
13
|
-
|
|
|
14
|
-
| The `default` export from the "../env.ts" file exports types for the
|
|
15
|
-
| validated environment variables. Here we merge them with the `EnvTypes`
|
|
16
|
-
| interface so that you can enjoy intellisense when using the "Env"
|
|
17
|
-
| module.
|
|
18
|
-
|
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
type CustomTypes = typeof import('../env').default
|
|
22
|
-
interface EnvTypes extends CustomTypes {
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Contract source: https://git.io/JfefG
|
|
3
|
-
*
|
|
4
|
-
* Feel free to let us know via PR, if you find something broken in this contract
|
|
5
|
-
* file.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
declare module '@ioc:Adonis/Core/Event' {
|
|
9
|
-
/*
|
|
10
|
-
|--------------------------------------------------------------------------
|
|
11
|
-
| Define typed events
|
|
12
|
-
|--------------------------------------------------------------------------
|
|
13
|
-
|
|
|
14
|
-
| You can define types for events inside the following interface and
|
|
15
|
-
| AdonisJS will make sure that all listeners and emit calls adheres
|
|
16
|
-
| to the defined types.
|
|
17
|
-
|
|
|
18
|
-
| For example:
|
|
19
|
-
|
|
|
20
|
-
| interface EventsList {
|
|
21
|
-
| 'new:user': UserModel
|
|
22
|
-
| }
|
|
23
|
-
|
|
|
24
|
-
| Now calling `Event.emit('new:user')` will statically ensure that passed value is
|
|
25
|
-
| an instance of the the UserModel only.
|
|
26
|
-
|
|
|
27
|
-
*/
|
|
28
|
-
interface EventsList {
|
|
29
|
-
//
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Contract source: https://git.io/Jfefs
|
|
3
|
-
*
|
|
4
|
-
* Feel free to let us know via PR, if you find something broken in this contract
|
|
5
|
-
* file.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type { InferListFromConfig } from '@adonisjs/core/build/config'
|
|
9
|
-
import type hashConfig from '../config/hash'
|
|
10
|
-
|
|
11
|
-
declare module '@ioc:Adonis/Core/Hash' {
|
|
12
|
-
interface HashersList extends InferListFromConfig<typeof hashConfig> {}
|
|
13
|
-
}
|
package/build/templates/env.txt
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|--------------------------------------------------------------------------
|
|
3
|
-
| Validating Environment Variables
|
|
4
|
-
|--------------------------------------------------------------------------
|
|
5
|
-
|
|
|
6
|
-
| In this file we define the rules for validating environment variables.
|
|
7
|
-
| By performing validation we ensure that your application is running in
|
|
8
|
-
| a stable environment with correct configuration values.
|
|
9
|
-
|
|
|
10
|
-
| This file is read automatically by the framework during the boot lifecycle
|
|
11
|
-
| and hence do not rename or move this file to a different location.
|
|
12
|
-
|
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import Env from '@ioc:Adonis/Core/Env'
|
|
16
|
-
|
|
17
|
-
export default Env.rules({
|
|
18
|
-
PORT: Env.schema.number(),
|
|
19
|
-
HOST: Env.schema.string({ format: 'host' }),
|
|
20
|
-
APP_KEY: Env.schema.string(),
|
|
21
|
-
APP_NAME: Env.schema.string(),
|
|
22
|
-
NODE_ENV: Env.schema.enum(['development', 'production', 'testing'] as const),
|
|
23
|
-
/**
|
|
24
|
-
* Feel free to change the enum options to the actual disk names
|
|
25
|
-
* you have defined inside the "contracts/drive.ts" file.
|
|
26
|
-
*/
|
|
27
|
-
DRIVE_DISK: Env.schema.enum(['local', 's3', 'gcs'] as const),
|
|
28
|
-
{{#assetsManager}}
|
|
29
|
-
ASSETS_DRIVER: Env.schema.enum(['fake', 'encore'] as const),
|
|
30
|
-
{{/assetsManager}}
|
|
31
|
-
})
|