@adonisjs/assembler 6.1.3-1 → 6.1.3-2
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/src/bundler.js +5 -4
- package/package.json +1 -3
package/build/src/bundler.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import fs from 'fs-extra';
|
|
2
1
|
import slash from 'slash';
|
|
3
2
|
import copyfiles from 'cpy';
|
|
3
|
+
import fs from 'node:fs/promises';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
5
|
import { join, relative } from 'node:path';
|
|
6
6
|
import { cliui } from '@poppinss/cliui';
|
|
@@ -26,7 +26,7 @@ export class Bundler {
|
|
|
26
26
|
return slash(relative(this.#cwdPath, filePath));
|
|
27
27
|
}
|
|
28
28
|
async #cleanupBuildDirectory(outDir) {
|
|
29
|
-
await fs.
|
|
29
|
+
await fs.rm(outDir, { recursive: true, force: true, maxRetries: 5 });
|
|
30
30
|
}
|
|
31
31
|
async #buildAssets() {
|
|
32
32
|
const assetsBundler = this.#options.assets;
|
|
@@ -76,12 +76,13 @@ export class Bundler {
|
|
|
76
76
|
await this.#copyFiles(metaFiles, outDir);
|
|
77
77
|
}
|
|
78
78
|
async #copyAdonisRcFile(outDir) {
|
|
79
|
-
const existingContents = await fs.
|
|
79
|
+
const existingContents = JSON.parse(await fs.readFile(join(this.#cwdPath, '.adonisrc.json'), 'utf-8'));
|
|
80
80
|
const compiledContents = Object.assign({}, existingContents, {
|
|
81
81
|
typescript: false,
|
|
82
82
|
lastCompiledAt: new Date().toISOString(),
|
|
83
83
|
});
|
|
84
|
-
await fs.
|
|
84
|
+
await fs.mkdir(outDir, { recursive: true });
|
|
85
|
+
await fs.writeFile(join(outDir, '.adonisrc.json'), JSON.stringify(compiledContents, null, 2) + '\n');
|
|
85
86
|
}
|
|
86
87
|
#getClientLockFile(client) {
|
|
87
88
|
switch (client) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonisjs/assembler",
|
|
3
|
-
"version": "6.1.3-
|
|
3
|
+
"version": "6.1.3-2",
|
|
4
4
|
"description": "Provides utilities to run AdonisJS development server and build project for production",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -63,11 +63,9 @@
|
|
|
63
63
|
"@adonisjs/env": "^4.2.0-0",
|
|
64
64
|
"@poppinss/chokidar-ts": "^4.1.0-1",
|
|
65
65
|
"@poppinss/cliui": "^6.1.1-1",
|
|
66
|
-
"@types/fs-extra": "^11.0.1",
|
|
67
66
|
"@types/picomatch": "^2.3.0",
|
|
68
67
|
"cpy": "^9.0.1",
|
|
69
68
|
"execa": "^7.0.0",
|
|
70
|
-
"fs-extra": "^11.1.0",
|
|
71
69
|
"get-port": "^6.1.2",
|
|
72
70
|
"picomatch": "^2.3.1",
|
|
73
71
|
"slash": "^5.0.0"
|