mycontext-cli 4.2.7 → 4.2.10
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/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +10 -1
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +19 -60
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init-interactive.d.ts +20 -0
- package/dist/commands/init-interactive.d.ts.map +1 -1
- package/dist/commands/init-interactive.js +168 -5
- package/dist/commands/init-interactive.js.map +1 -1
- package/dist/config/shadcn-catalog.json +93 -0
- package/dist/core/brain/BrainClient.d.ts +1 -1
- package/dist/core/brain/BrainClient.d.ts.map +1 -1
- package/dist/core/brain/BrainClient.js +5 -5
- package/dist/core/brain/BrainClient.js.map +1 -1
- package/dist/doctor/DoctorEngine.d.ts.map +1 -1
- package/dist/doctor/DoctorEngine.js +21 -11
- package/dist/doctor/DoctorEngine.js.map +1 -1
- package/dist/doctor/rules/dead-code-rules.d.ts.map +1 -1
- package/dist/doctor/rules/dead-code-rules.js +33 -0
- package/dist/doctor/rules/dead-code-rules.js.map +1 -1
- package/dist/doctor/rules/instantdb-rules.d.ts.map +1 -1
- package/dist/doctor/rules/instantdb-rules.js +278 -69
- package/dist/doctor/rules/instantdb-rules.js.map +1 -1
- package/dist/doctor/rules/nextjs-rules.d.ts.map +1 -1
- package/dist/doctor/rules/nextjs-rules.js +53 -3
- package/dist/doctor/rules/nextjs-rules.js.map +1 -1
- package/dist/package.json +4 -2
- package/dist/services/ComponentInferenceEngine.d.ts +66 -0
- package/dist/services/ComponentInferenceEngine.d.ts.map +1 -0
- package/dist/services/ComponentInferenceEngine.js +302 -0
- package/dist/services/ComponentInferenceEngine.js.map +1 -0
- package/dist/services/ComponentRegistry.d.ts +61 -0
- package/dist/services/ComponentRegistry.d.ts.map +1 -0
- package/dist/services/ComponentRegistry.js +128 -0
- package/dist/services/ComponentRegistry.js.map +1 -0
- package/dist/services/InferenceEngine.js +1 -1
- package/dist/services/ProjectScanner.d.ts.map +1 -1
- package/dist/services/ProjectScanner.js +18 -1
- package/dist/services/ProjectScanner.js.map +1 -1
- package/dist/services/ScaffoldEngine.d.ts +87 -0
- package/dist/services/ScaffoldEngine.d.ts.map +1 -0
- package/dist/services/ScaffoldEngine.js +409 -0
- package/dist/services/ScaffoldEngine.js.map +1 -0
- package/dist/services/ScaffoldPreview.d.ts +62 -0
- package/dist/services/ScaffoldPreview.d.ts.map +1 -0
- package/dist/services/ScaffoldPreview.js +292 -0
- package/dist/services/ScaffoldPreview.js.map +1 -0
- package/dist/services/TemplateEngine.d.ts +136 -0
- package/dist/services/TemplateEngine.d.ts.map +1 -0
- package/dist/services/TemplateEngine.js +483 -0
- package/dist/services/TemplateEngine.js.map +1 -0
- package/dist/services/TemplateHelpers.d.ts +9 -0
- package/dist/services/TemplateHelpers.d.ts.map +1 -0
- package/dist/services/TemplateHelpers.js +212 -0
- package/dist/services/TemplateHelpers.js.map +1 -0
- package/dist/templates/actions/auth-actions.ts.hbs +140 -0
- package/dist/templates/actions/crud-actions.ts.hbs +113 -0
- package/dist/templates/components/auth/login-form.tsx.hbs +67 -0
- package/dist/templates/components/auth/login-skeleton.tsx.hbs +24 -0
- package/dist/templates/components/auth/register-form.tsx.hbs +116 -0
- package/dist/templates/components/crud/entity-card.tsx.hbs +71 -0
- package/dist/templates/components/crud/entity-form.tsx.hbs +158 -0
- package/dist/templates/components/crud/entity-skeleton.tsx.hbs +90 -0
- package/dist/templates/components/crud/entity-table.tsx.hbs +129 -0
- package/dist/templates/components/ui/button.tsx.hbs +53 -0
- package/dist/templates/components/ui/card.tsx.hbs +68 -0
- package/dist/templates/components/ui/input.tsx.hbs +33 -0
- package/dist/templates/components/ui/label.tsx.hbs +20 -0
- package/dist/templates/components/ui/skeleton.tsx.hbs +15 -0
- package/dist/templates/components/ui/theme-provider.tsx.hbs +66 -0
- package/dist/templates/components/ui/theme-toggle.tsx.hbs +30 -0
- package/dist/templates/config/app.css.hbs +150 -0
- package/dist/templates/layouts/dashboard-layout.tsx.hbs +69 -0
- package/dist/templates/layouts/error.tsx.hbs +51 -0
- package/dist/templates/layouts/loading.tsx.hbs +22 -0
- package/dist/templates/layouts/not-found.tsx.hbs +24 -0
- package/dist/templates/layouts/root-layout.tsx.hbs +40 -0
- package/dist/templates/lib/instant.ts.hbs +19 -0
- package/dist/templates/lib/utils.ts.hbs +24 -0
- package/dist/templates/pages/auth/login-page.tsx.hbs +30 -0
- package/dist/templates/pages/auth/register-page.tsx.hbs +38 -0
- package/dist/templates/pages/crud/create-page.tsx.hbs +42 -0
- package/dist/templates/pages/crud/detail-page.tsx.hbs +90 -0
- package/dist/templates/pages/crud/list-page.tsx.hbs +60 -0
- package/dist/templates/pages/crud/loading.tsx.hbs +13 -0
- package/dist/templates/pages/landing-page.tsx.hbs +111 -0
- package/dist/types/asl.d.ts +1 -1
- package/dist/types/asl.d.ts.map +1 -1
- package/dist/types/living-context.d.ts +1 -1
- package/dist/types/living-context.d.ts.map +1 -1
- package/dist/utils/FileGenerator.js +3 -3
- package/dist/utils/FileGenerator.js.map +1 -1
- package/dist/utils/generateTypesFromSchema.d.ts +47 -0
- package/dist/utils/generateTypesFromSchema.d.ts.map +1 -0
- package/dist/utils/generateTypesFromSchema.js +298 -0
- package/dist/utils/generateTypesFromSchema.js.map +1 -0
- package/package.json +4 -2
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.parseSchema = parseSchema;
|
|
37
|
+
exports.generateTypes = generateTypes;
|
|
38
|
+
exports.generateTypesFromSchemaFile = generateTypesFromSchemaFile;
|
|
39
|
+
/**
|
|
40
|
+
* generateTypesFromSchema — Parse InstantDB schema and generate TypeScript types
|
|
41
|
+
*
|
|
42
|
+
* Reads `instant.schema.ts` as text, extracts entity definitions using the
|
|
43
|
+
* `i.entity()` DSL, and produces typed output for every entity:
|
|
44
|
+
* - Entity type (with all fields)
|
|
45
|
+
* - EntityInsert type (omits `id`)
|
|
46
|
+
* - EntityWithRelations type (adds optional relation fields)
|
|
47
|
+
*/
|
|
48
|
+
const fs = __importStar(require("fs-extra"));
|
|
49
|
+
const path = __importStar(require("path"));
|
|
50
|
+
// ─── Type Maps ────────────────────────────────────────────────────
|
|
51
|
+
const INSTANTDB_TO_TS = {
|
|
52
|
+
string: "string",
|
|
53
|
+
number: "number",
|
|
54
|
+
boolean: "boolean",
|
|
55
|
+
date: "string", // InstantDB dates are ISO strings
|
|
56
|
+
json: "Record<string, unknown>",
|
|
57
|
+
any: "unknown",
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Parse an InstantDB schema file and extract all entity and link definitions.
|
|
61
|
+
*/
|
|
62
|
+
function parseSchema(content) {
|
|
63
|
+
const entities = parseEntities(content);
|
|
64
|
+
const links = parseLinks(content);
|
|
65
|
+
return { entities, links };
|
|
66
|
+
}
|
|
67
|
+
function parseEntities(content) {
|
|
68
|
+
if (!content.includes("i.entity("))
|
|
69
|
+
return [];
|
|
70
|
+
const results = [];
|
|
71
|
+
const entityStartPattern = /(\w+)\s*:\s*i\.entity\(\s*\{/g;
|
|
72
|
+
let match;
|
|
73
|
+
while ((match = entityStartPattern.exec(content)) !== null) {
|
|
74
|
+
const entityName = match[1];
|
|
75
|
+
if (!entityName)
|
|
76
|
+
continue;
|
|
77
|
+
const startIdx = match.index + match[0].length;
|
|
78
|
+
const body = extractBalancedBraces(content, startIdx);
|
|
79
|
+
if (!body)
|
|
80
|
+
continue;
|
|
81
|
+
const fields = [
|
|
82
|
+
// InstantDB always provides an `id` field
|
|
83
|
+
{ name: "id", tsType: "string", optional: false, indexed: true, unique: true },
|
|
84
|
+
];
|
|
85
|
+
// Match field patterns: `fieldName: i.string()`, `i.number().optional()`, etc.
|
|
86
|
+
const fieldPattern = /(\w+)\s*:\s*i\.(string|number|boolean|date|json|any)\(\)/g;
|
|
87
|
+
let fieldMatch;
|
|
88
|
+
while ((fieldMatch = fieldPattern.exec(body)) !== null) {
|
|
89
|
+
const fieldName = fieldMatch[1];
|
|
90
|
+
const idbType = fieldMatch[2];
|
|
91
|
+
if (!fieldName || !idbType)
|
|
92
|
+
continue;
|
|
93
|
+
const tsType = INSTANTDB_TO_TS[idbType] || "unknown";
|
|
94
|
+
// Check modifiers after the i.type() call
|
|
95
|
+
const rest = body.substring(fieldMatch.index + fieldMatch[0].length, Math.min(fieldMatch.index + fieldMatch[0].length + 50, body.length));
|
|
96
|
+
fields.push({
|
|
97
|
+
name: fieldName,
|
|
98
|
+
tsType,
|
|
99
|
+
optional: rest.startsWith(".optional()"),
|
|
100
|
+
indexed: rest.includes(".indexed("),
|
|
101
|
+
unique: rest.includes(".unique("),
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
results.push({ name: entityName, fields });
|
|
105
|
+
}
|
|
106
|
+
return results;
|
|
107
|
+
}
|
|
108
|
+
function parseLinks(content) {
|
|
109
|
+
const results = [];
|
|
110
|
+
// Find the links section
|
|
111
|
+
const linksMatch = content.match(/links:\s*\{/);
|
|
112
|
+
if (!linksMatch)
|
|
113
|
+
return results;
|
|
114
|
+
const startIdx = (linksMatch.index || 0) + linksMatch[0].length;
|
|
115
|
+
const linksBody = extractBalancedBraces(content, startIdx);
|
|
116
|
+
if (!linksBody)
|
|
117
|
+
return results;
|
|
118
|
+
// Match each link definition:
|
|
119
|
+
// linkName: { forward: { on: "entity", has: "many", label: "items" }, reverse: { ... } }
|
|
120
|
+
const linkStartPattern = /(\w+)\s*:\s*\{/g;
|
|
121
|
+
let match;
|
|
122
|
+
while ((match = linkStartPattern.exec(linksBody)) !== null) {
|
|
123
|
+
const linkName = match[1];
|
|
124
|
+
if (!linkName)
|
|
125
|
+
continue;
|
|
126
|
+
const linkStartIdx = match.index + match[0].length;
|
|
127
|
+
const linkBody = extractBalancedBraces(linksBody, linkStartIdx);
|
|
128
|
+
if (!linkBody)
|
|
129
|
+
continue;
|
|
130
|
+
// Parse forward
|
|
131
|
+
const forwardMatch = linkBody.match(/forward:\s*\{[^}]*on:\s*["'](\w+)["'][^}]*has:\s*["'](one|many)["'][^}]*label:\s*["'](\w+)["']/);
|
|
132
|
+
if (!forwardMatch)
|
|
133
|
+
continue;
|
|
134
|
+
const link = {
|
|
135
|
+
name: linkName,
|
|
136
|
+
forward: {
|
|
137
|
+
on: forwardMatch[1] || "",
|
|
138
|
+
has: forwardMatch[2] || "many",
|
|
139
|
+
label: forwardMatch[3] || linkName,
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
// Parse reverse (optional)
|
|
143
|
+
const reverseMatch = linkBody.match(/reverse:\s*\{[^}]*on:\s*["'](\w+)["'][^}]*has:\s*["'](one|many)["'][^}]*label:\s*["'](\w+)["']/);
|
|
144
|
+
if (reverseMatch) {
|
|
145
|
+
link.reverse = {
|
|
146
|
+
on: reverseMatch[1] || "",
|
|
147
|
+
has: reverseMatch[2] || "many",
|
|
148
|
+
label: reverseMatch[3] || linkName,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
results.push(link);
|
|
152
|
+
}
|
|
153
|
+
return results;
|
|
154
|
+
}
|
|
155
|
+
// ─── Type Generation ──────────────────────────────────────────────
|
|
156
|
+
function toPascalCase(str) {
|
|
157
|
+
return str
|
|
158
|
+
.replace(/[-_](\w)/g, (_, c) => c.toUpperCase())
|
|
159
|
+
.replace(/^(\w)/, (_, c) => c.toUpperCase())
|
|
160
|
+
// Handle plurals → singular for type names
|
|
161
|
+
.replace(/ies$/, "y")
|
|
162
|
+
.replace(/ses$/, "s")
|
|
163
|
+
.replace(/s$/, "");
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Generate TypeScript types from a parsed schema.
|
|
167
|
+
*/
|
|
168
|
+
function generateTypes(schema) {
|
|
169
|
+
const lines = [
|
|
170
|
+
"/**",
|
|
171
|
+
" * Auto-generated TypeScript types from InstantDB schema.",
|
|
172
|
+
` * Generated at: ${new Date().toISOString()}`,
|
|
173
|
+
" * DO NOT EDIT — regenerate with: mycontext generate types --from-schema",
|
|
174
|
+
" */",
|
|
175
|
+
"",
|
|
176
|
+
];
|
|
177
|
+
// Build relation map for each entity
|
|
178
|
+
const entityRelations = new Map();
|
|
179
|
+
for (const link of schema.links) {
|
|
180
|
+
// Forward relation
|
|
181
|
+
const fwdEntity = link.forward.on;
|
|
182
|
+
if (!entityRelations.has(fwdEntity))
|
|
183
|
+
entityRelations.set(fwdEntity, []);
|
|
184
|
+
const reverseTarget = link.reverse?.on || "";
|
|
185
|
+
if (reverseTarget) {
|
|
186
|
+
entityRelations.get(fwdEntity).push({
|
|
187
|
+
label: link.forward.label,
|
|
188
|
+
targetEntity: reverseTarget,
|
|
189
|
+
has: link.forward.has,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
// Reverse relation
|
|
193
|
+
if (link.reverse) {
|
|
194
|
+
const revEntity = link.reverse.on;
|
|
195
|
+
if (!entityRelations.has(revEntity))
|
|
196
|
+
entityRelations.set(revEntity, []);
|
|
197
|
+
entityRelations.get(revEntity).push({
|
|
198
|
+
label: link.reverse.label,
|
|
199
|
+
targetEntity: fwdEntity,
|
|
200
|
+
has: link.reverse.has,
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
// Track used type names to handle duplicates (e.g., multiple "presence" entities in rooms)
|
|
205
|
+
const usedTypeNames = new Map();
|
|
206
|
+
function getUniqueTypeName(baseName) {
|
|
207
|
+
const pascal = toPascalCase(baseName);
|
|
208
|
+
const count = usedTypeNames.get(pascal) || 0;
|
|
209
|
+
usedTypeNames.set(pascal, count + 1);
|
|
210
|
+
return count === 0 ? pascal : `${pascal}${count + 1}`;
|
|
211
|
+
}
|
|
212
|
+
for (const entity of schema.entities) {
|
|
213
|
+
const typeName = getUniqueTypeName(entity.name);
|
|
214
|
+
// Base entity type
|
|
215
|
+
lines.push(`export type ${typeName} = {`);
|
|
216
|
+
for (const field of entity.fields) {
|
|
217
|
+
const optMarker = field.optional ? "?" : "";
|
|
218
|
+
lines.push(` ${field.name}${optMarker}: ${field.tsType};`);
|
|
219
|
+
}
|
|
220
|
+
lines.push("};");
|
|
221
|
+
lines.push("");
|
|
222
|
+
// Insert type (omits id)
|
|
223
|
+
lines.push(`export type ${typeName}Insert = Omit<${typeName}, "id">;`);
|
|
224
|
+
lines.push("");
|
|
225
|
+
// WithRelations type
|
|
226
|
+
const relations = entityRelations.get(entity.name);
|
|
227
|
+
if (relations && relations.length > 0) {
|
|
228
|
+
lines.push(`export type ${typeName}WithRelations = ${typeName} & {`);
|
|
229
|
+
for (const rel of relations) {
|
|
230
|
+
const relType = toPascalCase(rel.targetEntity);
|
|
231
|
+
if (rel.has === "many") {
|
|
232
|
+
lines.push(` ${rel.label}?: ${relType}[];`);
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
lines.push(` ${rel.label}?: ${relType};`);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
lines.push("};");
|
|
239
|
+
lines.push("");
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
// Entity name union (deduplicated)
|
|
243
|
+
if (schema.entities.length > 0) {
|
|
244
|
+
const uniqueNames = [...new Set(schema.entities.map((e) => e.name))];
|
|
245
|
+
lines.push("// Entity name union");
|
|
246
|
+
lines.push(`export type EntityName = ${uniqueNames.map((n) => `"${n}"`).join(" | ")};`);
|
|
247
|
+
lines.push("");
|
|
248
|
+
}
|
|
249
|
+
return lines.join("\n");
|
|
250
|
+
}
|
|
251
|
+
// ─── Public API ───────────────────────────────────────────────────
|
|
252
|
+
/**
|
|
253
|
+
* Read an InstantDB schema file and generate TypeScript types.
|
|
254
|
+
* Returns the generated types content string.
|
|
255
|
+
*/
|
|
256
|
+
async function generateTypesFromSchemaFile(projectRoot) {
|
|
257
|
+
const schemaPaths = [
|
|
258
|
+
"instant.schema.ts",
|
|
259
|
+
"src/instant.schema.ts",
|
|
260
|
+
".mycontext/schema.ts",
|
|
261
|
+
"instant.schema.js",
|
|
262
|
+
];
|
|
263
|
+
let schemaContent = null;
|
|
264
|
+
for (const sp of schemaPaths) {
|
|
265
|
+
const fullPath = path.join(projectRoot, sp);
|
|
266
|
+
if (await fs.pathExists(fullPath)) {
|
|
267
|
+
schemaContent = await fs.readFile(fullPath, "utf-8");
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
if (!schemaContent) {
|
|
272
|
+
throw new Error(`Schema file not found. Looked in: ${schemaPaths.join(", ")}. ` +
|
|
273
|
+
`Please create an InstantDB schema file (e.g., instant.schema.ts)`);
|
|
274
|
+
}
|
|
275
|
+
const schema = parseSchema(schemaContent);
|
|
276
|
+
if (schema.entities.length === 0) {
|
|
277
|
+
throw new Error("No entities found in schema. Ensure your schema uses the i.entity() format.");
|
|
278
|
+
}
|
|
279
|
+
const content = generateTypes(schema);
|
|
280
|
+
const fieldCount = schema.entities.reduce((sum, e) => sum + e.fields.length, 0);
|
|
281
|
+
return { content, entityCount: schema.entities.length, fieldCount };
|
|
282
|
+
}
|
|
283
|
+
// ─── Helpers ──────────────────────────────────────────────────────
|
|
284
|
+
function extractBalancedBraces(content, startAfterOpenBrace) {
|
|
285
|
+
let depth = 1;
|
|
286
|
+
let i = startAfterOpenBrace;
|
|
287
|
+
while (i < content.length && depth > 0) {
|
|
288
|
+
if (content[i] === "{")
|
|
289
|
+
depth++;
|
|
290
|
+
else if (content[i] === "}")
|
|
291
|
+
depth--;
|
|
292
|
+
i++;
|
|
293
|
+
}
|
|
294
|
+
if (depth !== 0)
|
|
295
|
+
return null;
|
|
296
|
+
return content.substring(startAfterOpenBrace, i - 1);
|
|
297
|
+
}
|
|
298
|
+
//# sourceMappingURL=generateTypesFromSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateTypesFromSchema.js","sourceRoot":"","sources":["../../src/utils/generateTypesFromSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,kCAIC;AA0HD,sCA4FC;AAQD,kEAuCC;AA7TD;;;;;;;;GAQG;AACH,6CAA+B;AAC/B,2CAA6B;AAE7B,qEAAqE;AAErE,MA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O,OAAO,CAAC,SAAS,CAAC,mBAAmB,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACvD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mycontext-cli",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.10",
|
|
4
4
|
"description": "CLI tool for spec-driven development - Generate comprehensive context, visual screens, and scaffolding for AI-powered coding",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -54,9 +54,10 @@
|
|
|
54
54
|
"@google/generative-ai": "^0.24.1",
|
|
55
55
|
"@huggingface/inference": "^4.11.1",
|
|
56
56
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
57
|
-
"@myycontext/core": "
|
|
57
|
+
"@myycontext/core": "workspace:*",
|
|
58
58
|
"@playwright/test": "^1.58.2",
|
|
59
59
|
"@types/figlet": "^1.7.0",
|
|
60
|
+
"@types/handlebars": "^4.1.0",
|
|
60
61
|
"axios": "^1.6.0",
|
|
61
62
|
"chalk": "^5.6.2",
|
|
62
63
|
"commander": "^11.1.0",
|
|
@@ -68,6 +69,7 @@
|
|
|
68
69
|
"fuse.js": "^7.1.0",
|
|
69
70
|
"glob": "^10.3.10",
|
|
70
71
|
"gradient-string": "^3.0.0",
|
|
72
|
+
"handlebars": "^4.7.8",
|
|
71
73
|
"inquirer": "^9.2.12",
|
|
72
74
|
"mdast-util-to-markdown": "^2.1.2",
|
|
73
75
|
"node-fetch": "^2.7.0",
|