@adonisjs/assembler 8.0.0-next.23 → 8.0.0-next.24
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/index.js +3 -3
- package/build/{main-Byxt3AdL.js → main-DcPeMQQd.js} +1 -1
- package/build/{main-1eXSE5Xo.js → main-XUXlmlEy.js} +5 -2
- package/build/src/code_scanners/routes_scanner/main.js +2 -2
- package/build/src/index_generator/main.js +2 -2
- package/build/src/types/common.d.ts +3 -2
- package/build/{virtual_file_system-DM1KRNbk.js → virtual_file_system-bGeoWsK-.js} +3 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as loadHooks, c as readTsConfig, d as runNode, f as throttle, m as debug_default, n as copyFiles, o as memoize, p as watch, r as getPort, s as parseConfig, t as VirtualFileSystem, u as run } from "./virtual_file_system-
|
|
2
|
-
import { n as FileBuffer, t as IndexGenerator } from "./main-
|
|
3
|
-
import { t as RoutesScanner } from "./main-
|
|
1
|
+
import { a as loadHooks, c as readTsConfig, d as runNode, f as throttle, m as debug_default, n as copyFiles, o as memoize, p as watch, r as getPort, s as parseConfig, t as VirtualFileSystem, u as run } from "./virtual_file_system-bGeoWsK-.js";
|
|
2
|
+
import { n as FileBuffer, t as IndexGenerator } from "./main-XUXlmlEy.js";
|
|
3
|
+
import { t as RoutesScanner } from "./main-DcPeMQQd.js";
|
|
4
4
|
import "./helpers-DDurYRsZ.js";
|
|
5
5
|
import dedent from "dedent";
|
|
6
6
|
import fs, { readFile, unlink } from "node:fs/promises";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as isRelative, m as debug_default, t as VirtualFileSystem } from "./virtual_file_system-
|
|
1
|
+
import { i as isRelative, m as debug_default, t as VirtualFileSystem } from "./virtual_file_system-bGeoWsK-.js";
|
|
2
2
|
import { a as nodeToPlainText, i as inspectMethodArguments, n as inspectClass, o as searchValidatorDirectUsage, r as inspectClassMethods, t as findImport } from "./helpers-DDurYRsZ.js";
|
|
3
3
|
import { cliui } from "@poppinss/cliui";
|
|
4
4
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as throttle, l as removeExtension, m as debug_default, t as VirtualFileSystem } from "./virtual_file_system-
|
|
1
|
+
import { f as throttle, l as removeExtension, m as debug_default, t as VirtualFileSystem } from "./virtual_file_system-bGeoWsK-.js";
|
|
2
2
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
3
3
|
import string from "@poppinss/utils/string";
|
|
4
4
|
import { dirname, join, relative } from "node:path/posix";
|
|
@@ -73,7 +73,10 @@ var IndexGeneratorSource = class {
|
|
|
73
73
|
this.#source = join(this.#appRoot, this.#config.source);
|
|
74
74
|
this.#output = join(this.#appRoot, this.#config.output);
|
|
75
75
|
this.#outputDirname = dirname(this.#output);
|
|
76
|
-
this.#vfs = new VirtualFileSystem(this.#source, {
|
|
76
|
+
this.#vfs = new VirtualFileSystem(this.#source, {
|
|
77
|
+
glob: this.#config.glob,
|
|
78
|
+
filter: this.#config.filter
|
|
79
|
+
});
|
|
77
80
|
}
|
|
78
81
|
#treeToString(input, buffer) {
|
|
79
82
|
Object.keys(input).forEach((key) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../virtual_file_system-
|
|
2
|
-
import { t as RoutesScanner } from "../../../main-
|
|
1
|
+
import "../../../virtual_file_system-bGeoWsK-.js";
|
|
2
|
+
import { t as RoutesScanner } from "../../../main-DcPeMQQd.js";
|
|
3
3
|
import "../../../helpers-DDurYRsZ.js";
|
|
4
4
|
export { RoutesScanner };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../../virtual_file_system-
|
|
2
|
-
import { t as IndexGenerator } from "../../main-
|
|
1
|
+
import "../../virtual_file_system-bGeoWsK-.js";
|
|
2
|
+
import { t as IndexGenerator } from "../../main-XUXlmlEy.js";
|
|
3
3
|
export { IndexGenerator };
|
|
@@ -4,6 +4,7 @@ import type StringBuilder from '@poppinss/utils/string_builder';
|
|
|
4
4
|
import { type AllHooks } from './hooks.ts';
|
|
5
5
|
import { type FileBuffer } from '../file_buffer.ts';
|
|
6
6
|
import { type VirtualFileSystem } from '../virtual_file_system.ts';
|
|
7
|
+
import { type FilterPredicate } from 'fdir';
|
|
7
8
|
/**
|
|
8
9
|
* Recursive file tree structure for representing nested directory hierarchies
|
|
9
10
|
*/
|
|
@@ -15,6 +16,7 @@ export type RecursiveFileTree = {
|
|
|
15
16
|
*/
|
|
16
17
|
export type VirtualFileSystemOptions = {
|
|
17
18
|
glob?: string[];
|
|
19
|
+
filter?: FilterPredicate;
|
|
18
20
|
};
|
|
19
21
|
/**
|
|
20
22
|
* Source configuration accepted by the index generator
|
|
@@ -35,11 +37,10 @@ export type IndexGeneratorSourceConfig = ({
|
|
|
35
37
|
computeBaseName?: (baseName: StringBuilder) => StringBuilder;
|
|
36
38
|
source: string;
|
|
37
39
|
output: string;
|
|
38
|
-
glob?: string[];
|
|
39
40
|
importAlias?: string;
|
|
40
41
|
removeSuffix?: string;
|
|
41
42
|
skipSegments?: string[];
|
|
42
|
-
};
|
|
43
|
+
} & VirtualFileSystemOptions;
|
|
43
44
|
/**
|
|
44
45
|
* Marks a given optional property as required
|
|
45
46
|
*
|
|
@@ -211,7 +211,9 @@ var VirtualFileSystem = class {
|
|
|
211
211
|
}
|
|
212
212
|
async scan() {
|
|
213
213
|
debug_default("fetching entities from source \"%s\"", this.#source);
|
|
214
|
-
const
|
|
214
|
+
const crawler = new fdir().globWithOptions(this.#options.glob ?? DEFAULT_GLOB, this.#picoMatchOptions).withFullPaths();
|
|
215
|
+
if (this.#options.filter) crawler.filter(this.#options.filter);
|
|
216
|
+
const filesList = await crawler.crawl(this.#source).withPromise();
|
|
215
217
|
debug_default("scanned files %O", filesList);
|
|
216
218
|
const sortedFiles = filesList.sort(naturalSort);
|
|
217
219
|
this.#files.clear();
|
package/package.json
CHANGED