radar-cli 0.1.1 → 0.2.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/dist/index.js +23 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var api = anyApi;
|
|
|
12
12
|
var components = componentsGeneric();
|
|
13
13
|
|
|
14
14
|
// src/convex-client.ts
|
|
15
|
-
var DEFAULT_CONVEX_URL = "https://
|
|
15
|
+
var DEFAULT_CONVEX_URL = "https://fine-vole-489.convex.cloud";
|
|
16
16
|
var cachedClient = null;
|
|
17
17
|
function getConvexClient() {
|
|
18
18
|
if (cachedClient) return cachedClient;
|
|
@@ -182,10 +182,29 @@ import { parse } from "zod-matter";
|
|
|
182
182
|
|
|
183
183
|
// src/schemas/frontmatter.ts
|
|
184
184
|
import { z } from "zod";
|
|
185
|
+
var FILE_TYPES = [
|
|
186
|
+
"readme",
|
|
187
|
+
"sitemap",
|
|
188
|
+
"flow",
|
|
189
|
+
"script",
|
|
190
|
+
"selectors",
|
|
191
|
+
"api",
|
|
192
|
+
"guide"
|
|
193
|
+
];
|
|
194
|
+
var SCRIPT_LANGUAGES = [
|
|
195
|
+
"playwright-ts",
|
|
196
|
+
"playwright-py",
|
|
197
|
+
"puppeteer",
|
|
198
|
+
"selenium-py",
|
|
199
|
+
"selenium-java",
|
|
200
|
+
"cypress",
|
|
201
|
+
"other"
|
|
202
|
+
];
|
|
185
203
|
var knowledgeFrontmatterSchema = z.object({
|
|
186
204
|
title: z.string(),
|
|
187
205
|
domain: z.string(),
|
|
188
206
|
path: z.string(),
|
|
207
|
+
type: z.enum(FILE_TYPES),
|
|
189
208
|
summary: z.string().max(300),
|
|
190
209
|
tags: z.array(z.string()),
|
|
191
210
|
entities: z.object({
|
|
@@ -199,6 +218,7 @@ var knowledgeFrontmatterSchema = z.object({
|
|
|
199
218
|
}),
|
|
200
219
|
confidence: z.enum(["low", "medium", "high"]),
|
|
201
220
|
requires_auth: z.boolean(),
|
|
221
|
+
script_language: z.enum(SCRIPT_LANGUAGES).optional(),
|
|
202
222
|
selectors_count: z.number().int().min(0).optional(),
|
|
203
223
|
related_files: z.array(z.string()).default([]),
|
|
204
224
|
version: z.number().int().positive(),
|
|
@@ -248,6 +268,7 @@ Ensure the markdown has valid YAML frontmatter matching the knowledge file schem
|
|
|
248
268
|
const result = await client.mutation(api.files.submit, {
|
|
249
269
|
domain: fm.domain,
|
|
250
270
|
path: fm.path,
|
|
271
|
+
type: fm.type,
|
|
251
272
|
title: fm.title,
|
|
252
273
|
summary: fm.summary,
|
|
253
274
|
tags: fm.tags,
|
|
@@ -262,6 +283,7 @@ Ensure the markdown has valid YAML frontmatter matching the knowledge file schem
|
|
|
262
283
|
},
|
|
263
284
|
confidence: fm.confidence,
|
|
264
285
|
requiresAuth: fm.requires_auth,
|
|
286
|
+
scriptLanguage: fm.script_language,
|
|
265
287
|
selectorsCount: fm.selectors_count,
|
|
266
288
|
relatedFiles: fm.related_files,
|
|
267
289
|
content: body.trim(),
|