@adonisjs/assembler 8.0.0-next.10 → 8.0.0-next.11

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.
@@ -13,6 +13,10 @@ import StringBuilder from "@poppinss/utils/string_builder";
13
13
 
14
14
  // src/file_buffer.ts
15
15
  var FileBuffer = class _FileBuffer {
16
+ /**
17
+ * Whether to add an end-of-line character at the end of the output
18
+ */
19
+ #eol = false;
16
20
  /**
17
21
  * Collected lines
18
22
  */
@@ -43,6 +47,20 @@ var FileBuffer = class _FileBuffer {
43
47
  get size() {
44
48
  return this.#buffer.length;
45
49
  }
50
+ /**
51
+ * Enable or disable end-of-line character at the end of output
52
+ *
53
+ * @param enabled - Whether to add EOL character
54
+ * @returns This FileBuffer instance for method chaining
55
+ *
56
+ * @example
57
+ * const buffer = new FileBuffer()
58
+ * buffer.eol(true).writeLine('Hello').flush() // 'Hello\n\n'
59
+ */
60
+ eol(enabled) {
61
+ this.#eol = enabled;
62
+ return this;
63
+ }
46
64
  /**
47
65
  * Write a new line to the output with current indentation
48
66
  *
@@ -94,6 +112,14 @@ var FileBuffer = class _FileBuffer {
94
112
  }
95
113
  return this;
96
114
  }
115
+ /**
116
+ * Convert the buffer to a string representation
117
+ *
118
+ * @example
119
+ * const buffer = new FileBuffer()
120
+ * buffer.writeLine('Hello')
121
+ * console.log(buffer.toString())
122
+ */
97
123
  toString() {
98
124
  return this.flush();
99
125
  }
@@ -110,7 +136,8 @@ var FileBuffer = class _FileBuffer {
110
136
  return this.#compiledOutput;
111
137
  }
112
138
  this.#compiledOutput = this.#buffer.join("\n");
113
- return this.#compiledOutput;
139
+ return this.#eol ? `${this.#compiledOutput}
140
+ ` : this.#compiledOutput;
114
141
  }
115
142
  };
116
143
 
package/build/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FileBuffer,
3
3
  IndexGenerator
4
- } from "./chunk-EWPEL2ET.js";
4
+ } from "./chunk-FSSS6GZ2.js";
5
5
  import {
6
6
  VirtualFileSystem,
7
7
  copyFiles,
@@ -1051,7 +1051,7 @@ var DevServer = class _DevServer {
1051
1051
  this.options.env = {
1052
1052
  ...this.options.env,
1053
1053
  HOT_HOOK_INCLUDE: this.#fileSystem.includes.join(","),
1054
- HOT_HOOK_IGNORE: this.#fileSystem.excludes.join(","),
1054
+ HOT_HOOK_IGNORE: this.#fileSystem.excludes.filter((exclude) => !exclude.includes("inertia")).join(","),
1055
1055
  HOT_HOOK_RESTART: (this.options.metaFiles ?? []).filter(({ reloadServer }) => !!reloadServer).map(({ pattern }) => pattern).join(",")
1056
1056
  };
1057
1057
  }
@@ -1079,6 +1079,9 @@ var DevServer = class _DevServer {
1079
1079
  if (!stats) {
1080
1080
  return false;
1081
1081
  }
1082
+ if (file.includes("inertia") && !file.includes("node_modules")) {
1083
+ return false;
1084
+ }
1082
1085
  if (stats.isFile()) {
1083
1086
  return !this.#fileSystem.shouldWatchFile(file);
1084
1087
  }
@@ -29,6 +29,17 @@ export declare class FileBuffer {
29
29
  * @returns The number of lines in the buffer
30
30
  */
31
31
  get size(): number;
32
+ /**
33
+ * Enable or disable end-of-line character at the end of output
34
+ *
35
+ * @param enabled - Whether to add EOL character
36
+ * @returns This FileBuffer instance for method chaining
37
+ *
38
+ * @example
39
+ * const buffer = new FileBuffer()
40
+ * buffer.eol(true).writeLine('Hello').flush() // 'Hello\n\n'
41
+ */
42
+ eol(enabled: boolean): this;
32
43
  /**
33
44
  * Write a new line to the output with current indentation
34
45
  *
@@ -55,6 +66,14 @@ export declare class FileBuffer {
55
66
  * @returns This FileBuffer instance for method chaining
56
67
  */
57
68
  dedent(): this;
69
+ /**
70
+ * Convert the buffer to a string representation
71
+ *
72
+ * @example
73
+ * const buffer = new FileBuffer()
74
+ * buffer.writeLine('Hello')
75
+ * console.log(buffer.toString())
76
+ */
58
77
  toString(): string;
59
78
  /**
60
79
  * Return template as a string, joining all buffer lines
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  IndexGenerator
3
- } from "../../chunk-EWPEL2ET.js";
3
+ } from "../../chunk-FSSS6GZ2.js";
4
4
  import "../../chunk-MVIHDM7A.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.10",
4
+ "version": "8.0.0-next.11",
5
5
  "engines": {
6
6
  "node": ">=24.0.0"
7
7
  },