@vesk/vesk-cli 0.2.19 → 0.2.21
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/dist/cli.js +106 -8
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -16904,6 +16904,20 @@ var init_parser = __esm({
|
|
|
16904
16904
|
import { walk } from "zimmerframe";
|
|
16905
16905
|
import { print } from "esrap";
|
|
16906
16906
|
import ts from "esrap/languages/ts";
|
|
16907
|
+
function isTypeOnlyImportExport(node) {
|
|
16908
|
+
if (!node) return false;
|
|
16909
|
+
if (node.type === "ImportDeclaration") return node.importKind === "type";
|
|
16910
|
+
if (node.type === "ExportNamedDeclaration" || node.type === "ExportAllDeclaration") {
|
|
16911
|
+
return node.exportKind === "type";
|
|
16912
|
+
}
|
|
16913
|
+
return false;
|
|
16914
|
+
}
|
|
16915
|
+
function isTypeOnlySpecifier(node) {
|
|
16916
|
+
if (!node) return false;
|
|
16917
|
+
if (node.importKind === "type") return true;
|
|
16918
|
+
if (node.exportKind === "type") return true;
|
|
16919
|
+
return false;
|
|
16920
|
+
}
|
|
16907
16921
|
function hasTsSyntax(ast) {
|
|
16908
16922
|
let found = false;
|
|
16909
16923
|
walk(ast, null, {
|
|
@@ -16912,6 +16926,10 @@ function hasTsSyntax(ast) {
|
|
|
16912
16926
|
found = true;
|
|
16913
16927
|
return;
|
|
16914
16928
|
}
|
|
16929
|
+
if (isTypeOnlyImportExport(node) || isTypeOnlySpecifier(node)) {
|
|
16930
|
+
found = true;
|
|
16931
|
+
return;
|
|
16932
|
+
}
|
|
16915
16933
|
return context.next();
|
|
16916
16934
|
}
|
|
16917
16935
|
});
|
|
@@ -16920,8 +16938,12 @@ function hasTsSyntax(ast) {
|
|
|
16920
16938
|
function isTypeOnlyStatement(node) {
|
|
16921
16939
|
if (!node) return true;
|
|
16922
16940
|
if (node.type === "ExportNamedDeclaration" || node.type === "ExportDefaultDeclaration") {
|
|
16941
|
+
if (node.exportKind === "type") return true;
|
|
16923
16942
|
return !!node.declaration && isTypeOnlyStatement(node.declaration);
|
|
16924
16943
|
}
|
|
16944
|
+
if (node.type === "ImportDeclaration" || node.type === "ExportAllDeclaration") {
|
|
16945
|
+
return isTypeOnlyImportExport(node);
|
|
16946
|
+
}
|
|
16925
16947
|
return TYPE_ONLY_STATEMENTS.has(node.type);
|
|
16926
16948
|
}
|
|
16927
16949
|
function stripTsTypes(ast) {
|
|
@@ -16969,6 +16991,28 @@ function stripTsTypes(ast) {
|
|
|
16969
16991
|
if (node.typeAnnotation) node.typeAnnotation = null;
|
|
16970
16992
|
return context.next();
|
|
16971
16993
|
},
|
|
16994
|
+
ImportDeclaration(node, context) {
|
|
16995
|
+
if (isTypeOnlyImportExport(node)) return null;
|
|
16996
|
+
if (Array.isArray(node.specifiers)) {
|
|
16997
|
+
const kept = node.specifiers.filter((s) => !isTypeOnlySpecifier(s));
|
|
16998
|
+
if (kept.length === 0) return null;
|
|
16999
|
+
node.specifiers = kept;
|
|
17000
|
+
}
|
|
17001
|
+
return context.next();
|
|
17002
|
+
},
|
|
17003
|
+
ExportNamedDeclaration(node, context) {
|
|
17004
|
+
if (isTypeOnlyImportExport(node)) return null;
|
|
17005
|
+
if (Array.isArray(node.specifiers)) {
|
|
17006
|
+
const kept = node.specifiers.filter((s) => !isTypeOnlySpecifier(s));
|
|
17007
|
+
if (kept.length === 0 && node.declaration == null) return null;
|
|
17008
|
+
node.specifiers = kept;
|
|
17009
|
+
}
|
|
17010
|
+
return context.next();
|
|
17011
|
+
},
|
|
17012
|
+
ExportAllDeclaration(node, context) {
|
|
17013
|
+
if (isTypeOnlyImportExport(node)) return null;
|
|
17014
|
+
return context.next();
|
|
17015
|
+
},
|
|
16972
17016
|
TSInterfaceDeclaration(node) {
|
|
16973
17017
|
return null;
|
|
16974
17018
|
},
|
|
@@ -31049,8 +31093,8 @@ var platform_deploy_exports = {};
|
|
|
31049
31093
|
__export(platform_deploy_exports, {
|
|
31050
31094
|
emitPlatformOutput: () => emitPlatformOutput
|
|
31051
31095
|
});
|
|
31052
|
-
import { writeFileSync as writeFileSync9, mkdirSync as mkdirSync7, rmSync as rmSync3,
|
|
31053
|
-
import { resolve as resolve20
|
|
31096
|
+
import { writeFileSync as writeFileSync9, mkdirSync as mkdirSync7, rmSync as rmSync3, cpSync } from "node:fs";
|
|
31097
|
+
import { resolve as resolve20 } from "node:path";
|
|
31054
31098
|
async function emitPlatformOutput(platform, ctx2) {
|
|
31055
31099
|
if (platform === "node") return null;
|
|
31056
31100
|
const prerenderedPaths = ctx2.prerenderedRoutes.map((r) => r.path);
|
|
@@ -31115,10 +31159,9 @@ ${shell.bootstrap}
|
|
|
31115
31159
|
}, null, 2), "utf-8");
|
|
31116
31160
|
if (platform === "vercel") {
|
|
31117
31161
|
const vercelDir = resolve20(projectRoot, ".vercel");
|
|
31118
|
-
|
|
31119
|
-
|
|
31120
|
-
|
|
31121
|
-
symlinkSync(relative3(dirname12(linkPath), outRoot), linkPath, "dir");
|
|
31162
|
+
const outputPath = resolve20(vercelDir, "output");
|
|
31163
|
+
rmSync3(outputPath, { recursive: true, force: true });
|
|
31164
|
+
cpSync(outRoot, outputPath, { recursive: true });
|
|
31122
31165
|
}
|
|
31123
31166
|
rmSync3(entry, { force: true });
|
|
31124
31167
|
return outRoot;
|
|
@@ -39707,6 +39750,25 @@ var TS_NODE_TYPES2 = /* @__PURE__ */ new Set([
|
|
|
39707
39750
|
"TSImportEqualsDeclaration",
|
|
39708
39751
|
"TSParameterProperty"
|
|
39709
39752
|
]);
|
|
39753
|
+
function isTypeOnlyImportExport2(node) {
|
|
39754
|
+
if (!node)
|
|
39755
|
+
return false;
|
|
39756
|
+
if (node.type === "ImportDeclaration")
|
|
39757
|
+
return node.importKind === "type";
|
|
39758
|
+
if (node.type === "ExportNamedDeclaration" || node.type === "ExportAllDeclaration") {
|
|
39759
|
+
return node.exportKind === "type";
|
|
39760
|
+
}
|
|
39761
|
+
return false;
|
|
39762
|
+
}
|
|
39763
|
+
function isTypeOnlySpecifier2(node) {
|
|
39764
|
+
if (!node)
|
|
39765
|
+
return false;
|
|
39766
|
+
if (node.importKind === "type")
|
|
39767
|
+
return true;
|
|
39768
|
+
if (node.exportKind === "type")
|
|
39769
|
+
return true;
|
|
39770
|
+
return false;
|
|
39771
|
+
}
|
|
39710
39772
|
function hasTsSyntax2(ast) {
|
|
39711
39773
|
let found = false;
|
|
39712
39774
|
walk4(ast, null, {
|
|
@@ -39715,6 +39777,10 @@ function hasTsSyntax2(ast) {
|
|
|
39715
39777
|
found = true;
|
|
39716
39778
|
return;
|
|
39717
39779
|
}
|
|
39780
|
+
if (isTypeOnlyImportExport2(node) || isTypeOnlySpecifier2(node)) {
|
|
39781
|
+
found = true;
|
|
39782
|
+
return;
|
|
39783
|
+
}
|
|
39718
39784
|
return context.next();
|
|
39719
39785
|
}
|
|
39720
39786
|
});
|
|
@@ -39733,8 +39799,13 @@ function isTypeOnlyStatement2(node) {
|
|
|
39733
39799
|
if (!node)
|
|
39734
39800
|
return true;
|
|
39735
39801
|
if (node.type === "ExportNamedDeclaration" || node.type === "ExportDefaultDeclaration") {
|
|
39802
|
+
if (node.exportKind === "type")
|
|
39803
|
+
return true;
|
|
39736
39804
|
return !!node.declaration && isTypeOnlyStatement2(node.declaration);
|
|
39737
39805
|
}
|
|
39806
|
+
if (node.type === "ImportDeclaration" || node.type === "ExportAllDeclaration") {
|
|
39807
|
+
return isTypeOnlyImportExport2(node);
|
|
39808
|
+
}
|
|
39738
39809
|
return TYPE_ONLY_STATEMENTS2.has(node.type);
|
|
39739
39810
|
}
|
|
39740
39811
|
function stripTsTypes2(ast) {
|
|
@@ -39786,6 +39857,33 @@ function stripTsTypes2(ast) {
|
|
|
39786
39857
|
node.typeAnnotation = null;
|
|
39787
39858
|
return context.next();
|
|
39788
39859
|
},
|
|
39860
|
+
ImportDeclaration(node, context) {
|
|
39861
|
+
if (isTypeOnlyImportExport2(node))
|
|
39862
|
+
return null;
|
|
39863
|
+
if (Array.isArray(node.specifiers)) {
|
|
39864
|
+
const kept = node.specifiers.filter((s) => !isTypeOnlySpecifier2(s));
|
|
39865
|
+
if (kept.length === 0)
|
|
39866
|
+
return null;
|
|
39867
|
+
node.specifiers = kept;
|
|
39868
|
+
}
|
|
39869
|
+
return context.next();
|
|
39870
|
+
},
|
|
39871
|
+
ExportNamedDeclaration(node, context) {
|
|
39872
|
+
if (isTypeOnlyImportExport2(node))
|
|
39873
|
+
return null;
|
|
39874
|
+
if (Array.isArray(node.specifiers)) {
|
|
39875
|
+
const kept = node.specifiers.filter((s) => !isTypeOnlySpecifier2(s));
|
|
39876
|
+
if (kept.length === 0 && node.declaration == null)
|
|
39877
|
+
return null;
|
|
39878
|
+
node.specifiers = kept;
|
|
39879
|
+
}
|
|
39880
|
+
return context.next();
|
|
39881
|
+
},
|
|
39882
|
+
ExportAllDeclaration(node, context) {
|
|
39883
|
+
if (isTypeOnlyImportExport2(node))
|
|
39884
|
+
return null;
|
|
39885
|
+
return context.next();
|
|
39886
|
+
},
|
|
39789
39887
|
TSInterfaceDeclaration(node) {
|
|
39790
39888
|
return null;
|
|
39791
39889
|
},
|
|
@@ -48495,7 +48593,7 @@ function buildCodeframe2(src2, line, column, context = 5) {
|
|
|
48495
48593
|
|
|
48496
48594
|
// src/build-packages.ts
|
|
48497
48595
|
import { spawnSync } from "node:child_process";
|
|
48498
|
-
import { cpSync, existsSync as existsSync35, mkdirSync as mkdirSync14, readFileSync as readFileSync31, readdirSync as readdirSync11, statSync as statSync20, writeFileSync as writeFileSync18 } from "node:fs";
|
|
48596
|
+
import { cpSync as cpSync2, existsSync as existsSync35, mkdirSync as mkdirSync14, readFileSync as readFileSync31, readdirSync as readdirSync11, statSync as statSync20, writeFileSync as writeFileSync18 } from "node:fs";
|
|
48499
48597
|
import { createRequire as createRequire5 } from "node:module";
|
|
48500
48598
|
import { dirname as dirname21, join as join20, resolve as resolve34 } from "node:path";
|
|
48501
48599
|
import { fileURLToPath as fileURLToPath8 } from "node:url";
|
|
@@ -48574,7 +48672,7 @@ function buildPackages(force = false) {
|
|
|
48574
48672
|
for (const c of cfg.copy || []) {
|
|
48575
48673
|
const to = join20(distDir, c.to);
|
|
48576
48674
|
mkdirSync14(dirname21(to), { recursive: true });
|
|
48577
|
-
|
|
48675
|
+
cpSync2(join20(pkgDir, c.from), to, { recursive: true });
|
|
48578
48676
|
}
|
|
48579
48677
|
const srcPkg = JSON.parse(readFileSync31(join20(pkgDir, "package.json"), "utf-8"));
|
|
48580
48678
|
if (pkg === "lucide-vesk") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vesk/vesk-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vesk — compiler-first framework for the post-VDOM web. vesk dev, vesk build.",
|
|
6
6
|
"bin": {
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
},
|
|
9
9
|
"main": "./dist/cli.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@vesk/adapter": "^0.2.
|
|
12
|
-
"@vesk/compiler": "^0.2.
|
|
13
|
-
"@vesk/plugin-tailwind": "^0.2.
|
|
14
|
-
"@vesk/runtime": "^0.2.
|
|
11
|
+
"@vesk/adapter": "^0.2.21",
|
|
12
|
+
"@vesk/compiler": "^0.2.21",
|
|
13
|
+
"@vesk/plugin-tailwind": "^0.2.21",
|
|
14
|
+
"@vesk/runtime": "^0.2.21",
|
|
15
15
|
"esrap": "^2.3.0",
|
|
16
16
|
"typescript": "^5.8.0",
|
|
17
17
|
"ws": "^8.18.0",
|