@jvittechs/jai1-cli 0.1.95 → 0.1.96
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 +27 -4
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -33,7 +33,7 @@ var NetworkError = class extends Jai1Error {
|
|
|
33
33
|
// package.json
|
|
34
34
|
var package_default = {
|
|
35
35
|
name: "@jvittechs/jai1-cli",
|
|
36
|
-
version: "0.1.
|
|
36
|
+
version: "0.1.96",
|
|
37
37
|
description: "A unified CLI tool for JV-IT TECHS developers to manage Jai1 Framework. Please contact TeamAI for usage instructions.",
|
|
38
38
|
type: "module",
|
|
39
39
|
bin: {
|
|
@@ -1000,7 +1000,14 @@ var MigrateIdeService = class {
|
|
|
1000
1000
|
const stat = await fs4.stat(filepath);
|
|
1001
1001
|
if (!stat.isFile()) continue;
|
|
1002
1002
|
const content = await fs4.readFile(filepath, "utf-8");
|
|
1003
|
-
|
|
1003
|
+
let frontmatter = {};
|
|
1004
|
+
try {
|
|
1005
|
+
const { data } = matter(content);
|
|
1006
|
+
frontmatter = data;
|
|
1007
|
+
} catch (e) {
|
|
1008
|
+
console.warn(`\u26A0\uFE0F Skipping ${file}: Invalid YAML frontmatter`);
|
|
1009
|
+
continue;
|
|
1010
|
+
}
|
|
1004
1011
|
const name = path.basename(file, ".md");
|
|
1005
1012
|
const trigger = this.extractTrigger(frontmatter);
|
|
1006
1013
|
const alwaysApply = this.isAlwaysTrigger(trigger);
|
|
@@ -2349,7 +2356,15 @@ var ContextScannerService = class {
|
|
|
2349
2356
|
async parseContextItem(filepath, ide, type) {
|
|
2350
2357
|
const content = await fs5.readFile(filepath, "utf-8");
|
|
2351
2358
|
const stat = await fs5.stat(filepath);
|
|
2352
|
-
|
|
2359
|
+
let frontmatter = {};
|
|
2360
|
+
let bodyContent = content;
|
|
2361
|
+
try {
|
|
2362
|
+
const parsed = matter2(content);
|
|
2363
|
+
frontmatter = parsed.data;
|
|
2364
|
+
bodyContent = parsed.content;
|
|
2365
|
+
} catch (e) {
|
|
2366
|
+
console.warn(`\u26A0\uFE0F Invalid YAML frontmatter in ${filepath}, skipping frontmatter parsing`);
|
|
2367
|
+
}
|
|
2353
2368
|
const config = IDE_CONFIGS[ide];
|
|
2354
2369
|
const description = frontmatter[config.frontmatterSchema.descriptionField];
|
|
2355
2370
|
let globs;
|
|
@@ -11166,7 +11181,15 @@ function parseMarkdownContent(content) {
|
|
|
11166
11181
|
rawContent: content
|
|
11167
11182
|
};
|
|
11168
11183
|
}
|
|
11169
|
-
|
|
11184
|
+
let frontmatter = {};
|
|
11185
|
+
let body = content;
|
|
11186
|
+
try {
|
|
11187
|
+
const parsed = matter3(content);
|
|
11188
|
+
frontmatter = parsed.data;
|
|
11189
|
+
body = parsed.content;
|
|
11190
|
+
} catch (e) {
|
|
11191
|
+
console.warn(`\u26A0\uFE0F Invalid YAML frontmatter, skipping frontmatter parsing`);
|
|
11192
|
+
}
|
|
11170
11193
|
const comments = extractCommentsSection(body);
|
|
11171
11194
|
const mainContent = removeCommentsSection(body);
|
|
11172
11195
|
return {
|