@mestreyoda/fabrica 0.1.17 → 0.1.19
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 +7 -3
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -111337,8 +111337,8 @@ import fsSync from "node:fs";
|
|
|
111337
111337
|
import path5 from "node:path";
|
|
111338
111338
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
111339
111339
|
function getCurrentVersion() {
|
|
111340
|
-
if ("0.1.
|
|
111341
|
-
return "0.1.
|
|
111340
|
+
if ("0.1.19") {
|
|
111341
|
+
return "0.1.19";
|
|
111342
111342
|
}
|
|
111343
111343
|
try {
|
|
111344
111344
|
const pkgPath = path5.join(THIS_DIR, "..", "..", "package.json");
|
|
@@ -142556,6 +142556,7 @@ function normalizeUserResponse(text) {
|
|
|
142556
142556
|
function detectStackHint(text) {
|
|
142557
142557
|
const lower2 = text.toLowerCase();
|
|
142558
142558
|
if (/\b(nextjs|next\.js)\b/.test(lower2)) return "nextjs";
|
|
142559
|
+
if (/\bnode\.?js\b/.test(lower2)) return "node-cli";
|
|
142559
142560
|
if (/\b(node-cli|typescript cli|ts cli|cli em typescript|typescript command line|typescript terminal cli)\b/.test(lower2)) return "node-cli";
|
|
142560
142561
|
if (/\bexpress\b/.test(lower2)) return "express";
|
|
142561
142562
|
if (/\b(fastapi)\b/.test(lower2)) return "fastapi";
|
|
@@ -142677,7 +142678,10 @@ function parseClarificationResponse(text, session) {
|
|
|
142677
142678
|
}
|
|
142678
142679
|
const detectedStack = detectStackHint(text);
|
|
142679
142680
|
if (detectedStack) {
|
|
142680
|
-
|
|
142681
|
+
const projectNameFromField = parseField(text, ["project name", "nome do projeto", "nome", "name"]);
|
|
142682
|
+
const nameItMatch = !projectNameFromField ? text.match(/(?:name|call|chamar?)\s+(?:it\s+)?([\w-]{2,64})/i) : null;
|
|
142683
|
+
const inlineName = projectNameFromField ?? (nameItMatch ? nameItMatch[1].toLowerCase().replace(/[^a-z0-9-]/g, "").replace(/-+/g, "-") || void 0 : void 0);
|
|
142684
|
+
return { recognized: true, stackHint: detectedStack, projectName: inlineName };
|
|
142681
142685
|
}
|
|
142682
142686
|
const lower2 = normalizeUserResponse(text);
|
|
142683
142687
|
const bareStackMap = {
|