@adonisjs/assembler 8.0.0-next.8 → 8.0.0-next.9

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.
@@ -50,8 +50,13 @@ var FileBuffer = class _FileBuffer {
50
50
  * @returns This FileBuffer instance for method chaining
51
51
  */
52
52
  writeLine(text) {
53
- this.#buffer.push(`${" ".repeat(this.#identationSize)}${text}
53
+ if (typeof text === "string") {
54
+ this.#buffer.push(`${" ".repeat(this.#identationSize)}${text}
54
55
  `);
56
+ } else {
57
+ this.#buffer.push(text);
58
+ this.#buffer.push("");
59
+ }
55
60
  return this;
56
61
  }
57
62
  /**
@@ -61,7 +66,11 @@ var FileBuffer = class _FileBuffer {
61
66
  * @returns This FileBuffer instance for method chaining
62
67
  */
63
68
  write(text) {
64
- this.#buffer.push(`${" ".repeat(this.#identationSize)}${text}`);
69
+ if (typeof text === "string") {
70
+ this.#buffer.push(`${" ".repeat(this.#identationSize)}${text}`);
71
+ } else {
72
+ this.#buffer.push(text);
73
+ }
65
74
  return this;
66
75
  }
67
76
  /**
@@ -85,6 +94,9 @@ var FileBuffer = class _FileBuffer {
85
94
  }
86
95
  return this;
87
96
  }
97
+ toString() {
98
+ return this.flush();
99
+ }
88
100
  /**
89
101
  * Return template as a string, joining all buffer lines
90
102
  *
@@ -401,5 +413,6 @@ var IndexGenerator = class {
401
413
  };
402
414
 
403
415
  export {
416
+ FileBuffer,
404
417
  IndexGenerator
405
418
  };
package/build/index.d.ts CHANGED
@@ -2,4 +2,6 @@ export { hooks } from './src/hooks.ts';
2
2
  export { Bundler } from './src/bundler.ts';
3
3
  export { DevServer } from './src/dev_server.ts';
4
4
  export { TestRunner } from './src/test_runner.ts';
5
+ export { FileBuffer } from './src/file_buffer.ts';
6
+ export { VirtualFileSystem } from './src/virtual_file_system.ts';
5
7
  export { SUPPORTED_PACKAGE_MANAGERS } from './src/bundler.ts';
package/build/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  import {
2
+ FileBuffer,
2
3
  IndexGenerator
3
- } from "./chunk-N6H4XTTC.js";
4
+ } from "./chunk-7XU453QB.js";
4
5
  import {
6
+ VirtualFileSystem,
5
7
  copyFiles,
6
8
  debug_default,
7
9
  getPort,
@@ -1735,7 +1737,9 @@ var TestRunner = class {
1735
1737
  export {
1736
1738
  Bundler,
1737
1739
  DevServer,
1740
+ FileBuffer,
1738
1741
  SUPPORTED_PACKAGE_MANAGERS,
1739
1742
  TestRunner,
1743
+ VirtualFileSystem,
1740
1744
  hooks
1741
1745
  };
@@ -35,14 +35,14 @@ export declare class FileBuffer {
35
35
  * @param text - The text to write as a new line
36
36
  * @returns This FileBuffer instance for method chaining
37
37
  */
38
- writeLine(text: string): this;
38
+ writeLine(text: string | FileBuffer): this;
39
39
  /**
40
40
  * Write text to the output without adding a new line
41
41
  *
42
42
  * @param text - The text to write without a newline
43
43
  * @returns This FileBuffer instance for method chaining
44
44
  */
45
- write(text: string): this;
45
+ write(text: string | FileBuffer): this;
46
46
  /**
47
47
  * Increase indentation by 2 spaces
48
48
  *
@@ -55,6 +55,7 @@ export declare class FileBuffer {
55
55
  * @returns This FileBuffer instance for method chaining
56
56
  */
57
57
  dedent(): this;
58
+ toString(): string;
58
59
  /**
59
60
  * Return template as a string, joining all buffer lines
60
61
  *
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  IndexGenerator
3
- } from "../../chunk-N6H4XTTC.js";
3
+ } from "../../chunk-7XU453QB.js";
4
4
  import "../../chunk-PORDZS62.js";
5
5
  export {
6
6
  IndexGenerator
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": "8.0.0-next.8",
4
+ "version": "8.0.0-next.9",
5
5
  "engines": {
6
6
  "node": ">=24.0.0"
7
7
  },