@valbuild/cli 0.61.0 → 0.62.0
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/package.json +4 -4
- package/src/files.ts +5 -2
- package/src/validate.ts +5 -2
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@valbuild/cli",
|
3
3
|
"private": false,
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.62.0",
|
5
5
|
"description": "Val CLI tools",
|
6
6
|
"bin": {
|
7
7
|
"val": "./bin.js"
|
@@ -18,9 +18,9 @@
|
|
18
18
|
"typecheck": "tsc --noEmit"
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
|
-
"@valbuild/core": "~0.
|
22
|
-
"@valbuild/server": "~0.
|
23
|
-
"@valbuild/eslint-plugin": "~0.
|
21
|
+
"@valbuild/core": "~0.62.0",
|
22
|
+
"@valbuild/server": "~0.62.0",
|
23
|
+
"@valbuild/eslint-plugin": "~0.62.0",
|
24
24
|
"eslint": "^8.31.0",
|
25
25
|
"@inquirer/confirm": "^2.0.15",
|
26
26
|
"@inquirer/prompts": "^3.0.2",
|
package/src/files.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
FILE_REF_PROP,
|
3
|
-
|
3
|
+
ModuleFilePath,
|
4
4
|
ModulePath,
|
5
5
|
SourcePath,
|
6
6
|
VAL_EXTENSION,
|
@@ -28,7 +28,10 @@ export async function files({
|
|
28
28
|
|
29
29
|
const absoluteFilesPathUsedByVal: string[] = [];
|
30
30
|
async function printOrGetFileRefs(file: string) {
|
31
|
-
const moduleId = `/${file}`.replace(
|
31
|
+
const moduleId = `/${file}`.replace(
|
32
|
+
/(\.val\.(ts|js))$/,
|
33
|
+
""
|
34
|
+
) as ModuleFilePath; // TODO: check if this always works? (Windows?)
|
32
35
|
const valModule = await service.get(moduleId, "" as ModulePath, {
|
33
36
|
validate: true,
|
34
37
|
source: true,
|
package/src/validate.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import path from "path";
|
2
2
|
import { createFixPatch, createService } from "@valbuild/server";
|
3
|
-
import {
|
3
|
+
import { ModuleFilePath, ModulePath, SourcePath } from "@valbuild/core";
|
4
4
|
import { glob } from "fast-glob";
|
5
5
|
import picocolors from "picocolors";
|
6
6
|
import { ESLint } from "eslint";
|
@@ -68,7 +68,10 @@ export async function validate({
|
|
68
68
|
console.log("Validating...", valFiles.length, "files");
|
69
69
|
|
70
70
|
async function validateFile(file: string): Promise<number> {
|
71
|
-
const moduleId = `/${file}`.replace(
|
71
|
+
const moduleId = `/${file}`.replace(
|
72
|
+
/(\.val\.(ts|js))$/,
|
73
|
+
""
|
74
|
+
) as ModuleFilePath; // TODO: check if this always works? (Windows?)
|
72
75
|
const start = Date.now();
|
73
76
|
const valModule = await service.get(moduleId, "" as ModulePath, {
|
74
77
|
source: true,
|