@adonisjs/assembler 6.1.3-18 → 6.1.3-19
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.
|
@@ -22,6 +22,14 @@ export class CodeTransformer {
|
|
|
22
22
|
* The TsMorph project
|
|
23
23
|
*/
|
|
24
24
|
#project;
|
|
25
|
+
/**
|
|
26
|
+
* Settings to use when persisting files
|
|
27
|
+
*/
|
|
28
|
+
#editorSettings = {
|
|
29
|
+
indentSize: 2,
|
|
30
|
+
convertTabsToSpaces: true,
|
|
31
|
+
trimTrailingWhitespace: true,
|
|
32
|
+
};
|
|
25
33
|
constructor(cwd) {
|
|
26
34
|
this.#cwd = cwd;
|
|
27
35
|
this.#project = new Project({
|
|
@@ -118,7 +126,7 @@ export class CodeTransformer {
|
|
|
118
126
|
this.#addToMiddlewareArray(file, `${stack}.use`, middlewareEntry);
|
|
119
127
|
}
|
|
120
128
|
}
|
|
121
|
-
file.formatText();
|
|
129
|
+
file.formatText(this.#editorSettings);
|
|
122
130
|
await file.save();
|
|
123
131
|
}
|
|
124
132
|
/**
|
|
@@ -160,7 +168,7 @@ export class CodeTransformer {
|
|
|
160
168
|
},
|
|
161
169
|
});
|
|
162
170
|
}
|
|
163
|
-
file.formatText();
|
|
171
|
+
file.formatText(this.#editorSettings);
|
|
164
172
|
await file.save();
|
|
165
173
|
}
|
|
166
174
|
}
|
|
@@ -7,6 +7,14 @@ import { Node, SyntaxKind, } from 'ts-morph';
|
|
|
7
7
|
export class RcFileTransformer {
|
|
8
8
|
#cwd;
|
|
9
9
|
#project;
|
|
10
|
+
/**
|
|
11
|
+
* Settings to use when persisting files
|
|
12
|
+
*/
|
|
13
|
+
#editorSettings = {
|
|
14
|
+
indentSize: 2,
|
|
15
|
+
convertTabsToSpaces: true,
|
|
16
|
+
trimTrailingWhitespace: true,
|
|
17
|
+
};
|
|
10
18
|
constructor(cwd, project) {
|
|
11
19
|
this.#cwd = cwd;
|
|
12
20
|
this.#project = project;
|
|
@@ -258,7 +266,7 @@ export class RcFileTransformer {
|
|
|
258
266
|
*/
|
|
259
267
|
save() {
|
|
260
268
|
const file = this.#getRcFileOrThrow();
|
|
261
|
-
file.formatText();
|
|
269
|
+
file.formatText(this.#editorSettings);
|
|
262
270
|
return file.save();
|
|
263
271
|
}
|
|
264
272
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonisjs/assembler",
|
|
3
3
|
"description": "Provides utilities to run AdonisJS development server and build project for production",
|
|
4
|
-
"version": "6.1.3-
|
|
4
|
+
"version": "6.1.3-19",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.16.0"
|
|
7
7
|
},
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"quick:test": "node --enable-source-maps --loader=ts-node/esm bin/test.ts"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@adonisjs/application": "7.1.2-
|
|
36
|
+
"@adonisjs/application": "^7.1.2-12",
|
|
37
37
|
"@adonisjs/eslint-config": "^1.1.8",
|
|
38
38
|
"@adonisjs/prettier-config": "^1.1.8",
|
|
39
39
|
"@adonisjs/tsconfig": "^1.1.8",
|