@adonisjs/core 6.10.0 → 6.11.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.
|
@@ -12,6 +12,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
12
12
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
13
13
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
14
|
};
|
|
15
|
+
import { stubsRoot } from '../stubs/main.js';
|
|
15
16
|
import { args, BaseCommand, flags } from '../modules/ace/main.js';
|
|
16
17
|
/**
|
|
17
18
|
* The configure command is used to configure packages after installation
|
|
@@ -69,6 +70,16 @@ export default class Configure extends BaseCommand {
|
|
|
69
70
|
rcFile.addMetaFile('resources/views/**/*.edge', false);
|
|
70
71
|
});
|
|
71
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Configure health checks
|
|
75
|
+
*/
|
|
76
|
+
async #configureHealthChecks() {
|
|
77
|
+
const codemods = await this.createCodemods();
|
|
78
|
+
await codemods.makeUsingStub(stubsRoot, 'make/health/main.stub', {
|
|
79
|
+
flags: this.parsed.flags,
|
|
80
|
+
entity: this.app.generators.createEntity('health'),
|
|
81
|
+
});
|
|
82
|
+
}
|
|
72
83
|
/**
|
|
73
84
|
* Creates codemods as per configure command options
|
|
74
85
|
*/
|
|
@@ -88,6 +99,9 @@ export default class Configure extends BaseCommand {
|
|
|
88
99
|
if (this.name === 'edge') {
|
|
89
100
|
return this.#configureEdge();
|
|
90
101
|
}
|
|
102
|
+
if (this.name === 'health_checks') {
|
|
103
|
+
return this.#configureHealthChecks();
|
|
104
|
+
}
|
|
91
105
|
const packageExports = await this.#getPackageSource(this.name);
|
|
92
106
|
if (!packageExports) {
|
|
93
107
|
this.logger.error(`Cannot find module "${this.name}". Make sure to install it`);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{{#var preloadFileName = string(entity.name).snakeCase().removeExtension().ext('.ts').toString()}}
|
|
2
|
+
{{{
|
|
3
|
+
exports({
|
|
4
|
+
to: app.startPath(entity.path, preloadFileName)
|
|
5
|
+
})
|
|
6
|
+
}}}
|
|
7
|
+
import {
|
|
8
|
+
HealthChecks,
|
|
9
|
+
DiskSpaceHealthCheck,
|
|
10
|
+
MemoryHeapHealthCheck,
|
|
11
|
+
} from '@adonisjs/core/health'
|
|
12
|
+
|
|
13
|
+
export const healthChecks = new HealthChecks().register([
|
|
14
|
+
new DiskSpaceHealthCheck(),
|
|
15
|
+
new MemoryHeapHealthCheck(),
|
|
16
|
+
])
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonisjs/core",
|
|
3
3
|
"description": "Core of AdonisJS",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.11.0",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.6.0"
|
|
7
7
|
},
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@japa/expect-type": "^2.0.2",
|
|
92
92
|
"@japa/file-system": "^2.3.0",
|
|
93
93
|
"@japa/runner": "^3.1.4",
|
|
94
|
-
"@swc/core": "^1.
|
|
94
|
+
"@swc/core": "^1.6.0",
|
|
95
95
|
"@types/node": "^20.14.2",
|
|
96
96
|
"@types/pretty-hrtime": "^1.0.3",
|
|
97
97
|
"@types/sinon": "^17.0.3",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"@vinejs/vine": "^2.1.0",
|
|
101
101
|
"argon2": "^0.40.3",
|
|
102
102
|
"bcrypt": "^5.1.1",
|
|
103
|
-
"c8": "^
|
|
103
|
+
"c8": "^10.1.2",
|
|
104
104
|
"copyfiles": "^2.4.1",
|
|
105
105
|
"cross-env": "^7.0.3",
|
|
106
106
|
"del-cli": "^5.1.0",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"get-port": "^7.1.0",
|
|
111
111
|
"github-label-sync": "^2.3.1",
|
|
112
112
|
"husky": "^9.0.11",
|
|
113
|
-
"prettier": "^3.3.
|
|
113
|
+
"prettier": "^3.3.2",
|
|
114
114
|
"release-it": "^17.3.0",
|
|
115
115
|
"sinon": "^18.0.0",
|
|
116
116
|
"supertest": "^7.0.0",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"@adonisjs/events": "^9.0.2",
|
|
129
129
|
"@adonisjs/fold": "^10.1.2",
|
|
130
130
|
"@adonisjs/hash": "^9.0.3",
|
|
131
|
-
"@adonisjs/health": "^1.
|
|
131
|
+
"@adonisjs/health": "^1.1.0",
|
|
132
132
|
"@adonisjs/http-server": "^7.2.3",
|
|
133
133
|
"@adonisjs/logger": "^6.0.3",
|
|
134
134
|
"@adonisjs/repl": "^4.0.1",
|
|
File without changes
|
|
File without changes
|