@arikajs/cli 0.0.3 → 0.0.5
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 +99 -6
- package/dist/bin/arika.js +2 -2
- package/dist/bin/arika.js.map +1 -1
- package/dist/src/ApplicationLoader.d.ts +5 -0
- package/dist/src/ApplicationLoader.d.ts.map +1 -1
- package/dist/src/ApplicationLoader.js +24 -2
- package/dist/src/ApplicationLoader.js.map +1 -1
- package/dist/src/Bootstrap.d.ts.map +1 -1
- package/dist/src/Bootstrap.js +35 -0
- package/dist/src/Bootstrap.js.map +1 -1
- package/dist/src/Commands/AuthApiInstallCommand.d.ts +24 -0
- package/dist/src/Commands/AuthApiInstallCommand.d.ts.map +1 -0
- package/dist/src/Commands/AuthApiInstallCommand.js +751 -0
- package/dist/src/Commands/AuthApiInstallCommand.js.map +1 -0
- package/dist/src/Commands/AuthInstallCommand.d.ts +7 -0
- package/dist/src/Commands/AuthInstallCommand.d.ts.map +1 -0
- package/dist/src/Commands/AuthInstallCommand.js +46 -0
- package/dist/src/Commands/AuthInstallCommand.js.map +1 -0
- package/dist/src/Commands/AuthWebInstallCommand.d.ts +31 -0
- package/dist/src/Commands/AuthWebInstallCommand.d.ts.map +1 -0
- package/dist/src/Commands/AuthWebInstallCommand.js +1100 -0
- package/dist/src/Commands/AuthWebInstallCommand.js.map +1 -0
- package/dist/src/Commands/BenchmarkCommand.d.ts +7 -0
- package/dist/src/Commands/BenchmarkCommand.d.ts.map +1 -0
- package/dist/src/Commands/BenchmarkCommand.js +25 -0
- package/dist/src/Commands/BenchmarkCommand.js.map +1 -0
- package/dist/src/Commands/CacheClearCommand.d.ts +7 -0
- package/dist/src/Commands/CacheClearCommand.d.ts.map +1 -0
- package/dist/src/Commands/CacheClearCommand.js +33 -0
- package/dist/src/Commands/CacheClearCommand.js.map +1 -0
- package/dist/src/Commands/CacheTableCommand.d.ts.map +1 -1
- package/dist/src/Commands/CacheTableCommand.js +21 -9
- package/dist/src/Commands/CacheTableCommand.js.map +1 -1
- package/dist/src/Commands/ConfigCacheCommand.d.ts +7 -0
- package/dist/src/Commands/ConfigCacheCommand.d.ts.map +1 -0
- package/dist/src/Commands/ConfigCacheCommand.js +86 -0
- package/dist/src/Commands/ConfigCacheCommand.js.map +1 -0
- package/dist/src/Commands/ConfigClearCommand.d.ts +7 -0
- package/dist/src/Commands/ConfigClearCommand.d.ts.map +1 -0
- package/dist/src/Commands/ConfigClearCommand.js +29 -0
- package/dist/src/Commands/ConfigClearCommand.js.map +1 -0
- package/dist/src/Commands/DocsGenerateCommand.d.ts +0 -1
- package/dist/src/Commands/DocsGenerateCommand.d.ts.map +1 -1
- package/dist/src/Commands/DocsGenerateCommand.js +68 -77
- package/dist/src/Commands/DocsGenerateCommand.js.map +1 -1
- package/dist/src/Commands/EnvValidateCommand.d.ts +7 -0
- package/dist/src/Commands/EnvValidateCommand.d.ts.map +1 -0
- package/dist/src/Commands/EnvValidateCommand.js +51 -0
- package/dist/src/Commands/EnvValidateCommand.js.map +1 -0
- package/dist/src/Commands/ListCommand.d.ts.map +1 -1
- package/dist/src/Commands/ListCommand.js +15 -8
- package/dist/src/Commands/ListCommand.js.map +1 -1
- package/dist/src/Commands/MakeCommand.d.ts +7 -0
- package/dist/src/Commands/MakeCommand.d.ts.map +1 -0
- package/dist/src/Commands/MakeCommand.js +110 -0
- package/dist/src/Commands/MakeCommand.js.map +1 -0
- package/dist/src/Commands/MakeCommandCommand.d.ts +20 -0
- package/dist/src/Commands/MakeCommandCommand.d.ts.map +1 -0
- package/dist/src/Commands/MakeCommandCommand.js +82 -0
- package/dist/src/Commands/MakeCommandCommand.js.map +1 -0
- package/dist/src/Commands/MakeControllerCommand.d.ts +17 -0
- package/dist/src/Commands/MakeControllerCommand.d.ts.map +1 -0
- package/dist/src/Commands/MakeControllerCommand.js +90 -0
- package/dist/src/Commands/MakeControllerCommand.js.map +1 -0
- package/dist/src/Commands/MakeEventCommand.d.ts +8 -0
- package/dist/src/Commands/MakeEventCommand.d.ts.map +1 -0
- package/dist/src/Commands/MakeEventCommand.js +48 -0
- package/dist/src/Commands/MakeEventCommand.js.map +1 -0
- package/dist/src/Commands/MakeJobCommand.d.ts +8 -0
- package/dist/src/Commands/MakeJobCommand.d.ts.map +1 -0
- package/dist/src/Commands/MakeJobCommand.js +55 -0
- package/dist/src/Commands/MakeJobCommand.js.map +1 -0
- package/dist/src/Commands/MakeListenerCommand.d.ts +8 -0
- package/dist/src/Commands/MakeListenerCommand.d.ts.map +1 -0
- package/dist/src/Commands/MakeListenerCommand.js +55 -0
- package/dist/src/Commands/MakeListenerCommand.js.map +1 -0
- package/dist/src/Commands/MakeMiddlewareCommand.d.ts +17 -0
- package/dist/src/Commands/MakeMiddlewareCommand.d.ts.map +1 -0
- package/dist/src/Commands/MakeMiddlewareCommand.js +69 -0
- package/dist/src/Commands/MakeMiddlewareCommand.js.map +1 -0
- package/dist/src/Commands/MakeMigrationCommand.js +4 -4
- package/dist/src/Commands/MakeMigrationCommand.js.map +1 -1
- package/dist/src/Commands/MakeModelCommand.d.ts +26 -0
- package/dist/src/Commands/MakeModelCommand.d.ts.map +1 -0
- package/dist/src/Commands/MakeModelCommand.js +193 -0
- package/dist/src/Commands/MakeModelCommand.js.map +1 -0
- package/dist/src/Commands/MakeProviderCommand.d.ts +17 -0
- package/dist/src/Commands/MakeProviderCommand.d.ts.map +1 -0
- package/dist/src/Commands/MakeProviderCommand.js +72 -0
- package/dist/src/Commands/MakeProviderCommand.js.map +1 -0
- package/dist/src/Commands/MakeViewCommand.d.ts +7 -0
- package/dist/src/Commands/MakeViewCommand.d.ts.map +1 -0
- package/dist/src/Commands/MakeViewCommand.js +37 -0
- package/dist/src/Commands/MakeViewCommand.js.map +1 -0
- package/dist/src/Commands/MigrateFreshCommand.d.ts +10 -0
- package/dist/src/Commands/MigrateFreshCommand.d.ts.map +1 -0
- package/dist/src/Commands/MigrateFreshCommand.js +129 -0
- package/dist/src/Commands/MigrateFreshCommand.js.map +1 -0
- package/dist/src/Commands/NewCommand.d.ts.map +1 -1
- package/dist/src/Commands/NewCommand.js +92 -24
- package/dist/src/Commands/NewCommand.js.map +1 -1
- package/dist/src/Commands/QueueFailedCommand.d.ts +7 -0
- package/dist/src/Commands/QueueFailedCommand.d.ts.map +1 -0
- package/dist/src/Commands/QueueFailedCommand.js +30 -0
- package/dist/src/Commands/QueueFailedCommand.js.map +1 -0
- package/dist/src/Commands/QueueFailedTableCommand.d.ts +7 -0
- package/dist/src/Commands/QueueFailedTableCommand.d.ts.map +1 -0
- package/dist/src/Commands/QueueFailedTableCommand.js +55 -0
- package/dist/src/Commands/QueueFailedTableCommand.js.map +1 -0
- package/dist/src/Commands/QueueFlushCommand.d.ts +7 -0
- package/dist/src/Commands/QueueFlushCommand.d.ts.map +1 -0
- package/dist/src/Commands/QueueFlushCommand.js +21 -0
- package/dist/src/Commands/QueueFlushCommand.js.map +1 -0
- package/dist/src/Commands/QueueRetryCommand.d.ts +7 -0
- package/dist/src/Commands/QueueRetryCommand.d.ts.map +1 -0
- package/dist/src/Commands/QueueRetryCommand.js +36 -0
- package/dist/src/Commands/QueueRetryCommand.js.map +1 -0
- package/dist/src/Commands/QueueTableCommand.d.ts.map +1 -1
- package/dist/src/Commands/QueueTableCommand.js +19 -13
- package/dist/src/Commands/QueueTableCommand.js.map +1 -1
- package/dist/src/Commands/QueueWorkCommand.d.ts +8 -0
- package/dist/src/Commands/QueueWorkCommand.d.ts.map +1 -0
- package/dist/src/Commands/QueueWorkCommand.js +88 -0
- package/dist/src/Commands/QueueWorkCommand.js.map +1 -0
- package/dist/src/Commands/RouteListCommand.d.ts +7 -0
- package/dist/src/Commands/RouteListCommand.d.ts.map +1 -0
- package/dist/src/Commands/RouteListCommand.js +108 -0
- package/dist/src/Commands/RouteListCommand.js.map +1 -0
- package/dist/src/Commands/ScheduleRunCommand.d.ts +9 -0
- package/dist/src/Commands/ScheduleRunCommand.d.ts.map +1 -0
- package/dist/src/Commands/ScheduleRunCommand.js +80 -0
- package/dist/src/Commands/ScheduleRunCommand.js.map +1 -0
- package/dist/src/Commands/ScheduleWorkCommand.d.ts +9 -0
- package/dist/src/Commands/ScheduleWorkCommand.d.ts.map +1 -0
- package/dist/src/Commands/ScheduleWorkCommand.js +81 -0
- package/dist/src/Commands/ScheduleWorkCommand.js.map +1 -0
- package/dist/src/Commands/ServeCommand.d.ts +1 -0
- package/dist/src/Commands/ServeCommand.d.ts.map +1 -1
- package/dist/src/Commands/ServeCommand.js +111 -21
- package/dist/src/Commands/ServeCommand.js.map +1 -1
- package/dist/src/TemplateManager.d.ts +4 -0
- package/dist/src/TemplateManager.d.ts.map +1 -1
- package/dist/src/TemplateManager.js +35 -6
- package/dist/src/TemplateManager.js.map +1 -1
- package/dist/templates/app/.env.example +47 -0
- package/dist/templates/app/README.md +62 -0
- package/dist/templates/app/app/Exceptions/Handler.ts +19 -0
- package/dist/templates/app/app/Http/Controllers/UserController.ts +90 -0
- package/dist/templates/app/app/Http/Kernel.ts +43 -0
- package/dist/templates/app/app/Http/Middleware/Authenticate.ts +10 -0
- package/dist/templates/app/app/Http/Middleware/EnsureEmailIsVerified.ts +18 -0
- package/dist/templates/app/app/Http/Middleware/ExampleMiddleware.ts +12 -0
- package/dist/templates/app/app/Http/Middleware/RedirectIfAuthenticated.ts +18 -0
- package/dist/templates/app/app/Http/Middleware/TrimStrings.ts +12 -0
- package/dist/templates/app/app/Http/Middleware/TrustProxies.ts +23 -0
- package/dist/templates/app/app/Http/Middleware/VerifyCsrfToken.ts +10 -0
- package/dist/templates/app/app/Models/User.ts +15 -0
- package/dist/templates/app/app/Providers/AppServiceProvider.ts +17 -0
- package/dist/templates/app/app/Providers/RouteServiceProvider.ts +35 -0
- package/dist/templates/app/bootstrap/app.ts +41 -0
- package/dist/templates/app/config/app.ts +10 -0
- package/dist/templates/app/config/cache.ts +44 -0
- package/dist/templates/app/config/database.ts +63 -0
- package/dist/templates/app/config/filesystems.ts +35 -0
- package/dist/templates/app/config/http.ts +6 -0
- package/dist/templates/app/config/logging.ts +37 -0
- package/dist/templates/app/config/mail.ts +29 -0
- package/dist/templates/app/config/queue.ts +42 -0
- package/{templates/app/database/migrations/0001_create_users_table.ts → dist/templates/app/database/migrations/2024_01_01_000001_create_users_table.ts} +3 -1
- package/dist/templates/app/database/migrations/2024_01_01_000002_create_password_resets_table.ts +22 -0
- package/dist/templates/app/database/migrations/2024_01_01_000003_create_failed_jobs_table.ts +25 -0
- package/dist/templates/app/package.json +22 -0
- package/dist/templates/app/public/assets/img/favicon.png +0 -0
- package/dist/templates/app/public/assets/img/logo.png +0 -0
- package/dist/templates/app/resources/views/errors/401.ark.html +320 -0
- package/dist/templates/app/resources/views/errors/403.ark.html +320 -0
- package/dist/templates/app/resources/views/errors/404.ark.html +320 -0
- package/dist/templates/app/resources/views/errors/419.ark.html +320 -0
- package/dist/templates/app/resources/views/errors/429.ark.html +320 -0
- package/dist/templates/app/resources/views/errors/500.ark.html +320 -0
- package/dist/templates/app/resources/views/errors/503.ark.html +320 -0
- package/dist/templates/app/resources/views/welcome.ark.html +846 -0
- package/dist/templates/app/routes/api.ts +39 -0
- package/dist/templates/app/routes/web.ts +10 -0
- package/dist/templates/app/server.ts +15 -0
- package/dist/templates/app/tsconfig.json +27 -0
- package/package.json +16 -10
- package/templates/app/.env.example +2 -2
- package/templates/app/README.md +62 -0
- package/templates/app/app/Exceptions/Handler.ts +19 -0
- package/templates/app/app/Http/Controllers/UserController.ts +90 -0
- package/templates/app/app/Http/Kernel.ts +39 -14
- package/templates/app/app/Http/Middleware/Authenticate.ts +10 -0
- package/templates/app/app/Http/Middleware/EnsureEmailIsVerified.ts +18 -0
- package/templates/app/app/Http/Middleware/ExampleMiddleware.ts +12 -0
- package/templates/app/app/Http/Middleware/RedirectIfAuthenticated.ts +18 -0
- package/templates/app/app/Http/Middleware/TrimStrings.ts +12 -0
- package/templates/app/app/Http/Middleware/TrustProxies.ts +23 -0
- package/templates/app/app/Http/Middleware/VerifyCsrfToken.ts +10 -0
- package/templates/app/app/Models/User.ts +5 -5
- package/templates/app/app/Providers/AppServiceProvider.ts +17 -0
- package/templates/app/app/Providers/RouteServiceProvider.ts +35 -0
- package/templates/app/bootstrap/app.ts +30 -2
- package/templates/app/config/app.ts +7 -6
- package/templates/app/config/cache.ts +14 -7
- package/templates/app/config/database.ts +48 -21
- package/templates/app/config/filesystems.ts +11 -9
- package/templates/app/config/http.ts +3 -2
- package/templates/app/config/logging.ts +6 -4
- package/templates/app/config/mail.ts +10 -8
- package/templates/app/config/queue.ts +6 -4
- package/templates/app/database/migrations/2024_01_01_000001_create_users_table.ts +25 -0
- package/templates/app/database/migrations/2024_01_01_000002_create_password_resets_table.ts +22 -0
- package/templates/app/database/migrations/2024_01_01_000003_create_failed_jobs_table.ts +25 -0
- package/templates/app/package.json +4 -3
- package/templates/app/public/assets/img/favicon.png +0 -0
- package/templates/app/public/assets/img/logo.png +0 -0
- package/templates/app/resources/views/welcome.ark.html +846 -0
- package/templates/app/routes/api.ts +8 -3
- package/templates/app/routes/web.ts +8 -4
- package/templates/app/server.ts +3 -4
- package/templates/app/tsconfig.json +12 -0
- package/dist/tests/Cli.test.d.ts +0 -2
- package/dist/tests/Cli.test.d.ts.map +0 -1
- package/dist/tests/Cli.test.js +0 -16
- package/dist/tests/Cli.test.js.map +0 -1
- package/templates/app/app/Controllers/UserController.ts +0 -88
- package/templates/app/resources/views/welcome.html +0 -470
|
@@ -1,13 +1,20 @@
|
|
|
1
|
+
import { env } from 'arikajs';
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
4
|
/**
|
|
3
5
|
* Default Cache Store
|
|
4
6
|
*/
|
|
5
|
-
default:
|
|
7
|
+
default: env('CACHE_STORE', 'file'),
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* Cache Stores
|
|
9
11
|
*/
|
|
10
12
|
stores: {
|
|
13
|
+
file: {
|
|
14
|
+
driver: 'file',
|
|
15
|
+
path: 'storage/cache/data',
|
|
16
|
+
},
|
|
17
|
+
|
|
11
18
|
memory: {
|
|
12
19
|
driver: 'memory',
|
|
13
20
|
},
|
|
@@ -22,16 +29,16 @@ export default {
|
|
|
22
29
|
redis: {
|
|
23
30
|
driver: 'redis',
|
|
24
31
|
connection: 'default',
|
|
25
|
-
mode:
|
|
26
|
-
host:
|
|
27
|
-
password:
|
|
28
|
-
port:
|
|
29
|
-
database:
|
|
32
|
+
mode: env('REDIS_MODE', 'standalone'), // standalone, sentinel, cluster
|
|
33
|
+
host: env('REDIS_HOST', '127.0.0.1'),
|
|
34
|
+
password: env('REDIS_PASSWORD', null),
|
|
35
|
+
port: env('REDIS_PORT', 6379),
|
|
36
|
+
database: env('REDIS_DB', 0),
|
|
30
37
|
},
|
|
31
38
|
},
|
|
32
39
|
|
|
33
40
|
/**
|
|
34
41
|
* Cache Key Prefix
|
|
35
42
|
*/
|
|
36
|
-
prefix:
|
|
43
|
+
prefix: env('CACHE_PREFIX', 'arika_cache'),
|
|
37
44
|
};
|
|
@@ -1,35 +1,62 @@
|
|
|
1
|
+
import { env } from 'arikajs';
|
|
1
2
|
|
|
2
3
|
export default {
|
|
3
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Default Database Connection Name
|
|
6
|
+
*/
|
|
7
|
+
default: env('DB_CONNECTION', 'mysql'),
|
|
4
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Database Connections
|
|
11
|
+
*/
|
|
5
12
|
connections: {
|
|
6
13
|
sqlite: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
useNullAsDefault: true
|
|
14
|
+
driver: 'sqlite',
|
|
15
|
+
database: env('DB_DATABASE', './database.sqlite'),
|
|
16
|
+
charset: 'utf8',
|
|
12
17
|
},
|
|
13
18
|
|
|
14
19
|
mysql: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
driver: 'mysql',
|
|
21
|
+
host: env('DB_HOST', '127.0.0.1'),
|
|
22
|
+
port: env('DB_PORT', 3306),
|
|
23
|
+
database: env('DB_DATABASE', 'arikajs'),
|
|
24
|
+
username: env('DB_USERNAME', 'root'),
|
|
25
|
+
password: env('DB_PASSWORD', ''),
|
|
26
|
+
charset: 'utf8mb4',
|
|
27
|
+
timezone: 'local',
|
|
28
|
+
pool: {
|
|
29
|
+
min: 2,
|
|
30
|
+
max: 20
|
|
22
31
|
}
|
|
23
32
|
},
|
|
24
33
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
pgsql: {
|
|
35
|
+
driver: 'pgsql',
|
|
36
|
+
host: env('DB_HOST', '127.0.0.1'),
|
|
37
|
+
port: env('DB_PORT', 5432),
|
|
38
|
+
database: env('DB_DATABASE', 'arikajs'),
|
|
39
|
+
username: env('DB_USERNAME', 'postgres'),
|
|
40
|
+
password: env('DB_PASSWORD', ''),
|
|
41
|
+
charset: 'utf8',
|
|
42
|
+
timezone: 'local',
|
|
43
|
+
pool: {
|
|
44
|
+
min: 2,
|
|
45
|
+
max: 20
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
mongodb: {
|
|
50
|
+
driver: 'mongodb',
|
|
51
|
+
host: env('DB_HOST', '127.0.0.1'),
|
|
52
|
+
port: env('DB_PORT', 27017),
|
|
53
|
+
database: env('DB_DATABASE', 'arikajs'),
|
|
54
|
+
username: env('DB_USERNAME', ''),
|
|
55
|
+
password: env('DB_PASSWORD', ''),
|
|
56
|
+
options: {
|
|
57
|
+
useUnifiedTopology: true,
|
|
58
|
+
maxPoolSize: 10,
|
|
59
|
+
minPoolSize: 2
|
|
33
60
|
}
|
|
34
61
|
}
|
|
35
62
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { env } from 'arikajs';
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
4
|
/**
|
|
3
5
|
* Default Filesystem Disk
|
|
4
6
|
*/
|
|
5
|
-
default:
|
|
7
|
+
default: env('FILESYSTEM_DISK', 'local'),
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* Filesystem Disks
|
|
@@ -16,18 +18,18 @@ export default {
|
|
|
16
18
|
public: {
|
|
17
19
|
driver: 'local',
|
|
18
20
|
root: './storage/public',
|
|
19
|
-
url: (
|
|
21
|
+
url: env('APP_URL', 'http://localhost:3000') + '/storage',
|
|
20
22
|
},
|
|
21
23
|
|
|
22
24
|
s3: {
|
|
23
25
|
driver: 's3',
|
|
24
|
-
key:
|
|
25
|
-
secret:
|
|
26
|
-
region:
|
|
27
|
-
bucket:
|
|
28
|
-
url:
|
|
29
|
-
endpoint:
|
|
30
|
-
forcePathStyle:
|
|
26
|
+
key: env('AWS_ACCESS_KEY_ID'),
|
|
27
|
+
secret: env('AWS_SECRET_ACCESS_KEY'),
|
|
28
|
+
region: env('AWS_DEFAULT_REGION', 'us-east-1'),
|
|
29
|
+
bucket: env('AWS_BUCKET'),
|
|
30
|
+
url: env('AWS_URL'),
|
|
31
|
+
endpoint: env('AWS_ENDPOINT'),
|
|
32
|
+
forcePathStyle: env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
|
31
33
|
},
|
|
32
34
|
},
|
|
33
35
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { env } from 'arikajs';
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
4
|
/**
|
|
3
5
|
* Default Log Channel
|
|
4
6
|
*/
|
|
5
|
-
default:
|
|
7
|
+
default: env('LOG_CHANNEL', 'stack'),
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* Log Channels
|
|
@@ -17,19 +19,19 @@ export default {
|
|
|
17
19
|
single: {
|
|
18
20
|
driver: 'file',
|
|
19
21
|
path: './storage/logs/arika.log',
|
|
20
|
-
level:
|
|
22
|
+
level: env('LOG_LEVEL', 'debug'),
|
|
21
23
|
},
|
|
22
24
|
|
|
23
25
|
daily: {
|
|
24
26
|
driver: 'daily',
|
|
25
27
|
path: './storage/logs/arika.log',
|
|
26
|
-
level:
|
|
28
|
+
level: env('LOG_LEVEL', 'debug'),
|
|
27
29
|
days: 14,
|
|
28
30
|
},
|
|
29
31
|
|
|
30
32
|
console: {
|
|
31
33
|
driver: 'console',
|
|
32
|
-
level:
|
|
34
|
+
level: env('LOG_LEVEL', 'debug'),
|
|
33
35
|
},
|
|
34
36
|
},
|
|
35
37
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import { env } from 'arikajs';
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
|
-
default:
|
|
4
|
+
default: env('MAIL_MAILER', 'log'),
|
|
3
5
|
|
|
4
6
|
mailers: {
|
|
5
7
|
smtp: {
|
|
6
8
|
transport: 'smtp',
|
|
7
|
-
host:
|
|
8
|
-
port:
|
|
9
|
-
encryption:
|
|
10
|
-
username:
|
|
11
|
-
password:
|
|
9
|
+
host: env('MAIL_HOST', '127.0.0.1'),
|
|
10
|
+
port: env('MAIL_PORT', 2525),
|
|
11
|
+
encryption: env('MAIL_ENCRYPTION', 'tls'),
|
|
12
|
+
username: env('MAIL_USERNAME'),
|
|
13
|
+
password: env('MAIL_PASSWORD'),
|
|
12
14
|
},
|
|
13
15
|
|
|
14
16
|
log: {
|
|
@@ -21,7 +23,7 @@ export default {
|
|
|
21
23
|
},
|
|
22
24
|
|
|
23
25
|
from: {
|
|
24
|
-
address:
|
|
25
|
-
name:
|
|
26
|
+
address: env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
|
27
|
+
name: env('MAIL_FROM_NAME', 'Example'),
|
|
26
28
|
},
|
|
27
29
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { env } from 'arikajs';
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
4
|
/**
|
|
3
5
|
* Default Queue Connection Name
|
|
4
6
|
*/
|
|
5
|
-
default:
|
|
7
|
+
default: env('QUEUE_CONNECTION', 'sync'),
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* Queue Connections
|
|
@@ -25,7 +27,7 @@ export default {
|
|
|
25
27
|
* Job Batching
|
|
26
28
|
*/
|
|
27
29
|
batching: {
|
|
28
|
-
database:
|
|
30
|
+
database: env('DB_CONNECTION', 'mysql'),
|
|
29
31
|
table: 'job_batches',
|
|
30
32
|
},
|
|
31
33
|
|
|
@@ -33,8 +35,8 @@ export default {
|
|
|
33
35
|
* Failed Queue Jobs
|
|
34
36
|
*/
|
|
35
37
|
failed: {
|
|
36
|
-
driver:
|
|
37
|
-
database:
|
|
38
|
+
driver: env('QUEUE_FAILED_DRIVER', 'database-uuids'),
|
|
39
|
+
database: env('DB_CONNECTION', 'mysql'),
|
|
38
40
|
table: 'failed_jobs',
|
|
39
41
|
},
|
|
40
42
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Migration, SchemaBuilder } from 'arikajs';
|
|
2
|
+
|
|
3
|
+
export default class CreateUsersTable extends Migration {
|
|
4
|
+
/**
|
|
5
|
+
* Run the migrations.
|
|
6
|
+
*/
|
|
7
|
+
public async up(schema: SchemaBuilder): Promise<void> {
|
|
8
|
+
await schema.create('users', (table: any) => {
|
|
9
|
+
table.id();
|
|
10
|
+
table.string('name');
|
|
11
|
+
table.string('email').unique();
|
|
12
|
+
table.timestamp('email_verified_at').nullable();
|
|
13
|
+
table.string('password');
|
|
14
|
+
table.string('remember_token', 100).nullable();
|
|
15
|
+
table.timestamps();
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Reverse the migrations.
|
|
21
|
+
*/
|
|
22
|
+
public async down(schema: SchemaBuilder): Promise<void> {
|
|
23
|
+
await schema.dropIfExists('users');
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Migration, SchemaBuilder } from 'arikajs';
|
|
2
|
+
|
|
3
|
+
export default class CreatePasswordResetsTable extends Migration {
|
|
4
|
+
/**
|
|
5
|
+
* Run the migrations.
|
|
6
|
+
*/
|
|
7
|
+
public async up(schema: SchemaBuilder): Promise<void> {
|
|
8
|
+
await schema.create('password_resets', (table: any) => {
|
|
9
|
+
table.string('email');
|
|
10
|
+
table.index('email');
|
|
11
|
+
table.string('token');
|
|
12
|
+
table.timestamp('created_at').nullable();
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Reverse the migrations.
|
|
18
|
+
*/
|
|
19
|
+
public async down(schema: SchemaBuilder): Promise<void> {
|
|
20
|
+
await schema.dropIfExists('password_resets');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Migration, SchemaBuilder } from 'arikajs';
|
|
2
|
+
|
|
3
|
+
export default class CreateFailedJobsTable extends Migration {
|
|
4
|
+
/**
|
|
5
|
+
* Run the migrations.
|
|
6
|
+
*/
|
|
7
|
+
public async up(schema: SchemaBuilder): Promise<void> {
|
|
8
|
+
await schema.create('failed_jobs', (table: any) => {
|
|
9
|
+
table.id();
|
|
10
|
+
table.string('uuid').unique();
|
|
11
|
+
table.text('connection');
|
|
12
|
+
table.text('queue');
|
|
13
|
+
table.text('payload');
|
|
14
|
+
table.text('exception');
|
|
15
|
+
table.timestamp('failed_at').nullable();
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Reverse the migrations.
|
|
21
|
+
*/
|
|
22
|
+
public async down(schema: SchemaBuilder): Promise<void> {
|
|
23
|
+
await schema.dropIfExists('failed_jobs');
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
"private": true,
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "arika serve --dev",
|
|
8
|
-
"start": "
|
|
8
|
+
"start": "node -r tsconfig-paths/register dist/server.js",
|
|
9
9
|
"build": "tsc"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"arikajs": "
|
|
12
|
+
"arikajs": "file:../arikajs",
|
|
13
|
+
"tsconfig-paths": "^4.0.0"
|
|
13
14
|
},
|
|
14
15
|
"devDependencies": {
|
|
15
|
-
"@arikajs/cli": "
|
|
16
|
+
"@arikajs/cli": "file:../cli",
|
|
16
17
|
"typescript": "^5.0.0",
|
|
17
18
|
"tsx": "^4.0.0",
|
|
18
19
|
"@types/node": "^20.0.0"
|
|
Binary file
|
|
Binary file
|