@adonisjs/core 6.12.0 → 6.13.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/build/commands/add.d.ts +3 -1
- package/build/commands/add.js +2 -1
- package/build/commands/configure.js +9 -1
- package/build/factories/core/ace.d.ts +0 -1
- package/build/factories/core/ignitor.d.ts +0 -1
- package/build/factories/core/test_utils.d.ts +0 -1
- package/build/modules/ace/codemods.d.ts +0 -1
- package/build/modules/ace/commands.js +1 -1
- package/build/src/cli_formatters/routes_list.d.ts +1 -1
- package/build/src/config_provider.d.ts +2 -2
- package/build/src/debug.d.ts +0 -1
- package/build/src/helpers/types.d.ts +0 -4
- package/build/src/ignitor/http.d.ts +0 -2
- package/build/src/ignitor/main.d.ts +0 -1
- package/build/src/test_utils/http.d.ts +0 -2
- package/build/src/test_utils/main.d.ts +0 -1
- package/package.json +67 -53
package/build/commands/add.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CommandOptions } from '../types/ace.js';
|
|
2
2
|
import { BaseCommand } from '../modules/ace/main.js';
|
|
3
|
+
declare const KNOWN_PACKAGE_MANAGERS: readonly ["npm", "pnpm", "bun", "yarn", "yarn@berry", "pnpm@6"];
|
|
3
4
|
/**
|
|
4
5
|
* The install command is used to `npm install` and `node ace configure` a new package
|
|
5
6
|
* in one go.
|
|
@@ -11,7 +12,7 @@ export default class Add extends BaseCommand {
|
|
|
11
12
|
static options: CommandOptions;
|
|
12
13
|
name: string;
|
|
13
14
|
verbose?: boolean;
|
|
14
|
-
packageManager?:
|
|
15
|
+
packageManager?: (typeof KNOWN_PACKAGE_MANAGERS)[number];
|
|
15
16
|
dev?: boolean;
|
|
16
17
|
force?: boolean;
|
|
17
18
|
/**
|
|
@@ -19,3 +20,4 @@ export default class Add extends BaseCommand {
|
|
|
19
20
|
*/
|
|
20
21
|
run(): Promise<void>;
|
|
21
22
|
}
|
|
23
|
+
export {};
|
package/build/commands/add.js
CHANGED
|
@@ -14,6 +14,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
14
14
|
};
|
|
15
15
|
import { detectPackageManager, installPackage } from '@antfu/install-pkg';
|
|
16
16
|
import { args, BaseCommand, flags } from '../modules/ace/main.js';
|
|
17
|
+
const KNOWN_PACKAGE_MANAGERS = ['npm', 'pnpm', 'bun', 'yarn', 'yarn@berry', 'pnpm@6'];
|
|
17
18
|
/**
|
|
18
19
|
* The install command is used to `npm install` and `node ace configure` a new package
|
|
19
20
|
* in one go.
|
|
@@ -29,7 +30,7 @@ export default class Add extends BaseCommand {
|
|
|
29
30
|
*/
|
|
30
31
|
async #getPackageManager() {
|
|
31
32
|
const pkgManager = this.packageManager || (await detectPackageManager(this.app.makePath())) || 'npm';
|
|
32
|
-
if (
|
|
33
|
+
if (KNOWN_PACKAGE_MANAGERS.includes(pkgManager)) {
|
|
33
34
|
return pkgManager;
|
|
34
35
|
}
|
|
35
36
|
throw new Error('Invalid package manager. Must be one of npm, pnpm, bun or yarn');
|
|
@@ -14,6 +14,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
14
14
|
};
|
|
15
15
|
import { stubsRoot } from '../stubs/main.js';
|
|
16
16
|
import { args, BaseCommand, flags } from '../modules/ace/main.js';
|
|
17
|
+
import { RuntimeException } from '@poppinss/utils';
|
|
17
18
|
/**
|
|
18
19
|
* The configure command is used to configure packages after installation
|
|
19
20
|
*/
|
|
@@ -129,7 +130,14 @@ export default class Configure extends BaseCommand {
|
|
|
129
130
|
/**
|
|
130
131
|
* Run instructions
|
|
131
132
|
*/
|
|
132
|
-
|
|
133
|
+
try {
|
|
134
|
+
await packageExports.configure(this);
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
throw new RuntimeException(`Unable to configure package "${this.name}"`, {
|
|
138
|
+
cause: error,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
133
141
|
}
|
|
134
142
|
}
|
|
135
143
|
__decorate([
|
|
@@ -67,7 +67,7 @@ export class BaseCommand extends AceBaseCommand {
|
|
|
67
67
|
? await this.app.container.call(this, 'completed')
|
|
68
68
|
: false;
|
|
69
69
|
if (this.error && !errorHandled) {
|
|
70
|
-
this.
|
|
70
|
+
await this.kernel.errorHandler.render(this.error, this.kernel);
|
|
71
71
|
}
|
|
72
72
|
return this.result;
|
|
73
73
|
}
|
|
@@ -4,6 +4,6 @@ import { ApplicationService, ConfigProvider } from './types.js';
|
|
|
4
4
|
* them
|
|
5
5
|
*/
|
|
6
6
|
export declare const configProvider: {
|
|
7
|
-
create<T>(resolver: ConfigProvider<T>[
|
|
8
|
-
resolve<
|
|
7
|
+
create<T>(resolver: ConfigProvider<T>["resolver"]): ConfigProvider<T>;
|
|
8
|
+
resolve<T>(app: ApplicationService, provider: unknown): Promise<T | null>;
|
|
9
9
|
};
|
package/build/src/debug.d.ts
CHANGED
|
@@ -22,12 +22,10 @@ declare const types: {
|
|
|
22
22
|
boundFunction: typeof import("@sindresorhus/is").isBoundFunction;
|
|
23
23
|
buffer: typeof import("@sindresorhus/is").isBuffer;
|
|
24
24
|
class: typeof import("@sindresorhus/is").isClass;
|
|
25
|
-
class_: typeof import("@sindresorhus/is").isClass;
|
|
26
25
|
dataView: typeof import("@sindresorhus/is").isDataView;
|
|
27
26
|
date: typeof import("@sindresorhus/is").isDate;
|
|
28
27
|
detect: (value: unknown) => import("@sindresorhus/is").TypeName;
|
|
29
28
|
directInstanceOf: typeof import("@sindresorhus/is").isDirectInstanceOf;
|
|
30
|
-
domElement: typeof import("@sindresorhus/is").isHtmlElement;
|
|
31
29
|
emptyArray: typeof import("@sindresorhus/is").isEmptyArray;
|
|
32
30
|
emptyMap: typeof import("@sindresorhus/is").isEmptyMap;
|
|
33
31
|
emptyObject: typeof import("@sindresorhus/is").isEmptyObject;
|
|
@@ -42,7 +40,6 @@ declare const types: {
|
|
|
42
40
|
float64Array: typeof import("@sindresorhus/is").isFloat64Array;
|
|
43
41
|
formData: typeof import("@sindresorhus/is").isFormData;
|
|
44
42
|
function: typeof import("@sindresorhus/is").isFunction;
|
|
45
|
-
function_: typeof import("@sindresorhus/is").isFunction;
|
|
46
43
|
generator: typeof import("@sindresorhus/is").isGenerator;
|
|
47
44
|
generatorFunction: typeof import("@sindresorhus/is").isGeneratorFunction;
|
|
48
45
|
htmlElement: typeof import("@sindresorhus/is").isHtmlElement;
|
|
@@ -65,7 +62,6 @@ declare const types: {
|
|
|
65
62
|
nonEmptyString: typeof import("@sindresorhus/is").isNonEmptyString;
|
|
66
63
|
nonEmptyStringAndNotWhitespace: typeof import("@sindresorhus/is").isNonEmptyStringAndNotWhitespace;
|
|
67
64
|
null: typeof import("@sindresorhus/is").isNull;
|
|
68
|
-
null_: typeof import("@sindresorhus/is").isNull;
|
|
69
65
|
nullOrUndefined: typeof import("@sindresorhus/is").isNullOrUndefined;
|
|
70
66
|
number: typeof import("@sindresorhus/is").isNumber;
|
|
71
67
|
numericString: typeof import("@sindresorhus/is").isNumericString;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
1
|
import type { Server as NodeHttpsServer } from 'node:https';
|
|
4
2
|
import { IncomingMessage, ServerResponse, Server as NodeHttpServer } from 'node:http';
|
|
5
3
|
import { Ignitor } from './main.js';
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
1
|
import type { TestUtils } from './main.js';
|
|
4
2
|
import type { Server as NodeHttpsServer } from 'node:https';
|
|
5
3
|
import { IncomingMessage, ServerResponse, Server as NodeHttpServer } from 'node:http';
|
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.13.0",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.6.0"
|
|
7
7
|
},
|
|
@@ -72,54 +72,55 @@
|
|
|
72
72
|
"release": "npx release-it",
|
|
73
73
|
"version": "npm run build",
|
|
74
74
|
"prepublishOnly": "npm run build",
|
|
75
|
-
"lint": "eslint .
|
|
75
|
+
"lint": "eslint .",
|
|
76
76
|
"typecheck": "tsc --noEmit",
|
|
77
77
|
"format": "prettier --write .",
|
|
78
78
|
"sync-labels": "github-label-sync --labels .github/labels.json adonisjs/core",
|
|
79
|
-
"quick:test": "node --
|
|
80
|
-
"citgm": "cross-env FORCE_COLOR=0 node --
|
|
81
|
-
"index:commands": "node --
|
|
79
|
+
"quick:test": "node --import=ts-node-maintained/register/esm --enable-source-maps --experimental-import-meta-resolve bin/test.ts --force-exit",
|
|
80
|
+
"citgm": "cross-env FORCE_COLOR=0 node --import=ts-node-maintained/register/esm --experimental-import-meta-resolve bin/test.ts --force-exit",
|
|
81
|
+
"index:commands": "node --import=ts-node-maintained/register/esm toolkit/main.js index build/commands"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@adonisjs/assembler": "^7.
|
|
85
|
-
"@adonisjs/eslint-config": "^
|
|
86
|
-
"@adonisjs/prettier-config": "^1.
|
|
87
|
-
"@adonisjs/tsconfig": "^1.
|
|
88
|
-
"@commitlint/cli": "^19.
|
|
89
|
-
"@commitlint/config-conventional": "^19.
|
|
84
|
+
"@adonisjs/assembler": "^7.8.2",
|
|
85
|
+
"@adonisjs/eslint-config": "^2.0.0-beta.6",
|
|
86
|
+
"@adonisjs/prettier-config": "^1.4.0",
|
|
87
|
+
"@adonisjs/tsconfig": "^1.4.0",
|
|
88
|
+
"@commitlint/cli": "^19.4.1",
|
|
89
|
+
"@commitlint/config-conventional": "^19.4.1",
|
|
90
90
|
"@japa/assert": "^3.0.0",
|
|
91
91
|
"@japa/expect-type": "^2.0.2",
|
|
92
92
|
"@japa/file-system": "^2.3.0",
|
|
93
93
|
"@japa/runner": "^3.1.4",
|
|
94
|
-
"@
|
|
95
|
-
"@
|
|
94
|
+
"@release-it/conventional-changelog": "^8.0.1",
|
|
95
|
+
"@swc/core": "^1.7.23",
|
|
96
|
+
"@types/node": "^22.5.4",
|
|
96
97
|
"@types/pretty-hrtime": "^1.0.3",
|
|
97
98
|
"@types/sinon": "^17.0.3",
|
|
98
99
|
"@types/supertest": "^6.0.2",
|
|
99
100
|
"@types/test-console": "^2.0.3",
|
|
100
101
|
"@vinejs/vine": "^2.1.0",
|
|
101
|
-
"argon2": "^0.
|
|
102
|
+
"argon2": "^0.41.1",
|
|
102
103
|
"bcrypt": "^5.1.1",
|
|
103
104
|
"c8": "^10.1.2",
|
|
104
105
|
"copyfiles": "^2.4.1",
|
|
105
106
|
"cross-env": "^7.0.3",
|
|
106
107
|
"del-cli": "^5.1.0",
|
|
107
108
|
"edge.js": "^6.0.2",
|
|
108
|
-
"eslint": "^
|
|
109
|
-
"execa": "^9.
|
|
109
|
+
"eslint": "^9.9.1",
|
|
110
|
+
"execa": "^9.3.1",
|
|
110
111
|
"get-port": "^7.1.0",
|
|
111
112
|
"github-label-sync": "^2.3.1",
|
|
112
|
-
"husky": "^9.
|
|
113
|
-
"prettier": "^3.3.
|
|
114
|
-
"release-it": "^17.
|
|
113
|
+
"husky": "^9.1.5",
|
|
114
|
+
"prettier": "^3.3.3",
|
|
115
|
+
"release-it": "^17.6.0",
|
|
115
116
|
"sinon": "^18.0.0",
|
|
116
117
|
"supertest": "^7.0.0",
|
|
117
118
|
"test-console": "^2.0.0",
|
|
118
|
-
"ts-node": "^10.9.
|
|
119
|
-
"typescript": "^5.4
|
|
119
|
+
"ts-node-maintained": "^10.9.4",
|
|
120
|
+
"typescript": "^5.5.4"
|
|
120
121
|
},
|
|
121
122
|
"dependencies": {
|
|
122
|
-
"@adonisjs/ace": "^13.
|
|
123
|
+
"@adonisjs/ace": "^13.2.0",
|
|
123
124
|
"@adonisjs/application": "^8.3.1",
|
|
124
125
|
"@adonisjs/bodyparser": "^10.0.2",
|
|
125
126
|
"@adonisjs/config": "^5.0.2",
|
|
@@ -127,28 +128,28 @@
|
|
|
127
128
|
"@adonisjs/env": "^6.1.0",
|
|
128
129
|
"@adonisjs/events": "^9.0.2",
|
|
129
130
|
"@adonisjs/fold": "^10.1.2",
|
|
130
|
-
"@adonisjs/hash": "^9.0.
|
|
131
|
+
"@adonisjs/hash": "^9.0.4",
|
|
131
132
|
"@adonisjs/health": "^2.0.0",
|
|
132
133
|
"@adonisjs/http-server": "^7.2.3",
|
|
133
134
|
"@adonisjs/logger": "^6.0.3",
|
|
134
135
|
"@adonisjs/repl": "^4.0.1",
|
|
135
|
-
"@antfu/install-pkg": "^0.
|
|
136
|
+
"@antfu/install-pkg": "^0.4.1",
|
|
136
137
|
"@paralleldrive/cuid2": "^2.2.2",
|
|
137
138
|
"@poppinss/macroable": "^1.0.2",
|
|
138
139
|
"@poppinss/utils": "^6.7.3",
|
|
139
|
-
"@sindresorhus/is": "^
|
|
140
|
+
"@sindresorhus/is": "^7.0.0",
|
|
140
141
|
"@types/he": "^1.2.3",
|
|
141
142
|
"he": "^1.2.0",
|
|
142
143
|
"parse-imports": "^1.2.0",
|
|
143
144
|
"pretty-hrtime": "^1.0.3",
|
|
144
|
-
"string-width": "^7.
|
|
145
|
+
"string-width": "^7.2.0",
|
|
145
146
|
"youch": "^3.3.3",
|
|
146
147
|
"youch-terminal": "^2.2.3"
|
|
147
148
|
},
|
|
148
149
|
"peerDependencies": {
|
|
149
|
-
"@adonisjs/assembler": "^7.
|
|
150
|
-
"@vinejs/vine": "^2.
|
|
151
|
-
"argon2": "^0.31.2 || ^0.
|
|
150
|
+
"@adonisjs/assembler": "^7.8.0",
|
|
151
|
+
"@vinejs/vine": "^2.1.0",
|
|
152
|
+
"argon2": "^0.31.2 || ^0.41.0",
|
|
152
153
|
"bcrypt": "^5.1.1",
|
|
153
154
|
"edge.js": "^6.0.1"
|
|
154
155
|
},
|
|
@@ -169,7 +170,12 @@
|
|
|
169
170
|
"optional": true
|
|
170
171
|
}
|
|
171
172
|
},
|
|
172
|
-
"author": "virk
|
|
173
|
+
"author": "Harminder Virk <virk@adonisjs.com>",
|
|
174
|
+
"contributors": [
|
|
175
|
+
"Romain Lanz <romain.lanz@pm.me>",
|
|
176
|
+
"Julien Ripouteau <julien@ripouteau.com>",
|
|
177
|
+
"Michaël Zasso"
|
|
178
|
+
],
|
|
173
179
|
"license": "MIT",
|
|
174
180
|
"homepage": "https://github.com/adonisjs/core#readme",
|
|
175
181
|
"repository": {
|
|
@@ -184,42 +190,50 @@
|
|
|
184
190
|
"framework",
|
|
185
191
|
"mvc"
|
|
186
192
|
],
|
|
187
|
-
"
|
|
188
|
-
"
|
|
193
|
+
"publishConfig": {
|
|
194
|
+
"provenance": true,
|
|
195
|
+
"access": "public"
|
|
196
|
+
},
|
|
197
|
+
"c8": {
|
|
198
|
+
"reporter": [
|
|
199
|
+
"text",
|
|
200
|
+
"html"
|
|
201
|
+
],
|
|
202
|
+
"exclude": [
|
|
203
|
+
"tests/**",
|
|
204
|
+
"build/**",
|
|
205
|
+
"factories/**",
|
|
206
|
+
".yalc/**"
|
|
207
|
+
]
|
|
189
208
|
},
|
|
190
|
-
"prettier": "@adonisjs/prettier-config",
|
|
191
209
|
"commitlint": {
|
|
192
210
|
"extends": [
|
|
193
211
|
"@commitlint/config-conventional"
|
|
194
212
|
]
|
|
195
213
|
},
|
|
196
|
-
"publishConfig": {
|
|
197
|
-
"access": "public",
|
|
198
|
-
"tag": "latest"
|
|
199
|
-
},
|
|
200
214
|
"release-it": {
|
|
201
215
|
"git": {
|
|
216
|
+
"requireCleanWorkingDir": true,
|
|
217
|
+
"requireUpstream": true,
|
|
202
218
|
"commitMessage": "chore(release): ${version}",
|
|
203
219
|
"tagAnnotation": "v${version}",
|
|
220
|
+
"push": true,
|
|
204
221
|
"tagName": "v${version}"
|
|
205
222
|
},
|
|
206
223
|
"github": {
|
|
207
|
-
"release": true
|
|
208
|
-
|
|
209
|
-
|
|
224
|
+
"release": true
|
|
225
|
+
},
|
|
226
|
+
"npm": {
|
|
227
|
+
"publish": true,
|
|
228
|
+
"skipChecks": true
|
|
229
|
+
},
|
|
230
|
+
"plugins": {
|
|
231
|
+
"@release-it/conventional-changelog": {
|
|
232
|
+
"preset": {
|
|
233
|
+
"name": "angular"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
210
236
|
}
|
|
211
237
|
},
|
|
212
|
-
"
|
|
213
|
-
"reporter": [
|
|
214
|
-
"text",
|
|
215
|
-
"html"
|
|
216
|
-
],
|
|
217
|
-
"exclude": [
|
|
218
|
-
"tests/**",
|
|
219
|
-
"build/**",
|
|
220
|
-
"factories/**",
|
|
221
|
-
".yalc/**"
|
|
222
|
-
]
|
|
223
|
-
},
|
|
224
|
-
"packageManager": "pnpm@9.2.0+sha512.98a80fd11c2e7096747762304106432b3ddc67dcf54b5a8c01c93f68a2cd5e05e6821849522a06fb76284d41a2660d5e334f2ee3bbf29183bf2e739b1dafa771"
|
|
238
|
+
"prettier": "@adonisjs/prettier-config"
|
|
225
239
|
}
|