@eventra_dev/eventra-cli 0.2.3 → 0.2.4
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/commands/sync.js
CHANGED
|
@@ -58,7 +58,7 @@ async function sync() {
|
|
|
58
58
|
const parsed = cache.get(file);
|
|
59
59
|
if (!parsed)
|
|
60
60
|
continue;
|
|
61
|
-
const res = engine.
|
|
61
|
+
const res = engine.scanFile((0, getVirtualFile_1.getVirtualFile)(file), parsed.content, config);
|
|
62
62
|
res.detectedFunctionWrappers.forEach(w => detectedFn.add(w));
|
|
63
63
|
res.detectedComponentWrappers.forEach((v, k) => detectedCmp.set(k, v));
|
|
64
64
|
}
|
|
@@ -46,15 +46,7 @@ class TSService {
|
|
|
46
46
|
this.compilerOptions = compilerOptions;
|
|
47
47
|
this.baseUrl = baseUrl;
|
|
48
48
|
this.paths = paths;
|
|
49
|
-
const allFiles = typescript_1.default.sys.readDirectory(root, [
|
|
50
|
-
".ts",
|
|
51
|
-
".tsx",
|
|
52
|
-
".js",
|
|
53
|
-
".jsx",
|
|
54
|
-
".vue",
|
|
55
|
-
".svelte",
|
|
56
|
-
".astro"
|
|
57
|
-
], undefined, undefined);
|
|
49
|
+
const allFiles = typescript_1.default.sys.readDirectory(root, [".ts", ".tsx", ".js", ".jsx"], undefined, undefined);
|
|
58
50
|
for (const f of allFiles) {
|
|
59
51
|
this.fileNames.add(this.normalize(f));
|
|
60
52
|
}
|
|
@@ -68,10 +60,7 @@ class TSService {
|
|
|
68
60
|
},
|
|
69
61
|
getScriptKind: (fileName) => {
|
|
70
62
|
fileName = this.normalize(fileName);
|
|
71
|
-
if (fileName.endsWith(".tsx")
|
|
72
|
-
fileName.endsWith(".vue") ||
|
|
73
|
-
fileName.endsWith(".svelte") ||
|
|
74
|
-
fileName.endsWith(".astro")) {
|
|
63
|
+
if (fileName.endsWith(".tsx")) {
|
|
75
64
|
return typescript_1.default.ScriptKind.TSX;
|
|
76
65
|
}
|
|
77
66
|
if (fileName.endsWith(".ts")) {
|
|
@@ -102,7 +91,8 @@ class TSService {
|
|
|
102
91
|
return typescript_1.default.ScriptSnapshot.fromString(content);
|
|
103
92
|
}
|
|
104
93
|
}
|
|
105
|
-
catch {
|
|
94
|
+
catch {
|
|
95
|
+
}
|
|
106
96
|
return typescript_1.default.ScriptSnapshot.fromString("");
|
|
107
97
|
},
|
|
108
98
|
getCurrentDirectory: () => this.root,
|
package/package.json
CHANGED
package/src/commands/sync.ts
CHANGED
|
@@ -59,15 +59,7 @@ export class TSService {
|
|
|
59
59
|
|
|
60
60
|
const allFiles = ts.sys.readDirectory(
|
|
61
61
|
root,
|
|
62
|
-
[
|
|
63
|
-
".ts",
|
|
64
|
-
".tsx",
|
|
65
|
-
".js",
|
|
66
|
-
".jsx",
|
|
67
|
-
".vue",
|
|
68
|
-
".svelte",
|
|
69
|
-
".astro"
|
|
70
|
-
],
|
|
62
|
+
[".ts", ".tsx", ".js", ".jsx"],
|
|
71
63
|
undefined,
|
|
72
64
|
undefined
|
|
73
65
|
);
|
|
@@ -88,12 +80,7 @@ export class TSService {
|
|
|
88
80
|
getScriptKind: (fileName) => {
|
|
89
81
|
fileName = this.normalize(fileName);
|
|
90
82
|
|
|
91
|
-
if (
|
|
92
|
-
fileName.endsWith(".tsx") ||
|
|
93
|
-
fileName.endsWith(".vue") ||
|
|
94
|
-
fileName.endsWith(".svelte") ||
|
|
95
|
-
fileName.endsWith(".astro")
|
|
96
|
-
) {
|
|
83
|
+
if (fileName.endsWith(".tsx")) {
|
|
97
84
|
return ts.ScriptKind.TSX;
|
|
98
85
|
}
|
|
99
86
|
|
|
@@ -131,7 +118,8 @@ export class TSService {
|
|
|
131
118
|
|
|
132
119
|
return ts.ScriptSnapshot.fromString(content);
|
|
133
120
|
}
|
|
134
|
-
} catch {
|
|
121
|
+
} catch {
|
|
122
|
+
}
|
|
135
123
|
|
|
136
124
|
return ts.ScriptSnapshot.fromString("");
|
|
137
125
|
},
|