mycontext-cli 4.2.23 → 4.2.25
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/generate-components-manifest.d.ts.map +1 -1
- package/dist/commands/generate-components-manifest.js +7 -1
- package/dist/commands/generate-components-manifest.js.map +1 -1
- package/dist/commands/generate-design-prompt.d.ts +1 -0
- package/dist/commands/generate-design-prompt.d.ts.map +1 -1
- package/dist/commands/generate-design-prompt.js +35 -1
- package/dist/commands/generate-design-prompt.js.map +1 -1
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +9 -10
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +80 -74
- package/dist/commands/init.js.map +1 -1
- package/dist/constants/fileNames.d.ts +9 -9
- package/dist/constants/fileNames.js +2 -2
- package/dist/constants/fileNames.js.map +1 -1
- package/dist/doctor/rules/node-rules.d.ts.map +1 -1
- package/dist/doctor/rules/node-rules.js +32 -6
- package/dist/doctor/rules/node-rules.js.map +1 -1
- package/dist/utils/contextRenderer.d.ts.map +1 -1
- package/dist/utils/contextRenderer.js +48 -8
- package/dist/utils/contextRenderer.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,12 @@ exports.ContextRenderer = void 0;
|
|
|
6
6
|
*/
|
|
7
7
|
class ContextRenderer {
|
|
8
8
|
static renderPRD(context) {
|
|
9
|
-
return
|
|
9
|
+
return `> [!IMPORTANT]
|
|
10
|
+
> **READ-ONLY VIEW**: This file is an export from \`context.json\`.
|
|
11
|
+
> Do NOT edit this file directly. Any manual changes will be overwritten.
|
|
12
|
+
> **Source of Truth**: [\`.mycontext/context.json\`](file://./.mycontext/context.json)
|
|
13
|
+
|
|
14
|
+
# Product Requirements Document
|
|
10
15
|
|
|
11
16
|
## Project Overview
|
|
12
17
|
**Project Name:** ${context.metadata?.projectConfig?.name || "The App"}
|
|
@@ -34,7 +39,12 @@ ${context.prd?.successMetrics?.map(m => `- ${m}`).join("\n") || "- Increased dev
|
|
|
34
39
|
static renderFeatures(context) {
|
|
35
40
|
if (!context.features || !Array.isArray(context.features))
|
|
36
41
|
return "# Product Features\n\nNo features defined yet.";
|
|
37
|
-
return
|
|
42
|
+
return `> [!IMPORTANT]
|
|
43
|
+
> **READ-ONLY VIEW**: This file is an export from \`context.json\`.
|
|
44
|
+
> Do NOT edit this file directly. Any manual changes will be overwritten.
|
|
45
|
+
> **Source of Truth**: [\`.mycontext/context.json\`](file://./.mycontext/context.json)
|
|
46
|
+
|
|
47
|
+
# Product Features
|
|
38
48
|
|
|
39
49
|
${context.features.map(f => `
|
|
40
50
|
### ${f.name || "Unnamed Feature"} (${(f.priority || "medium").toUpperCase()})
|
|
@@ -52,7 +62,12 @@ ${f.acceptanceCriteria?.map(ac => `- [ ] ${ac}`).join("\n") || "- N/A"}
|
|
|
52
62
|
static renderTechnicalSpecs(context) {
|
|
53
63
|
if (!context.specs)
|
|
54
64
|
return "# Technical Specifications\n\nNo technical specifications defined yet.";
|
|
55
|
-
return
|
|
65
|
+
return `> [!IMPORTANT]
|
|
66
|
+
> **READ-ONLY VIEW**: This file is an export from \`context.json\`.
|
|
67
|
+
> Do NOT edit this file directly. Any manual changes will be overwritten.
|
|
68
|
+
> **Source of Truth**: [\`.mycontext/context.json\`](file://./.mycontext/context.json)
|
|
69
|
+
|
|
70
|
+
# Technical Specifications
|
|
56
71
|
|
|
57
72
|
## Architecture
|
|
58
73
|
${context.specs.architecture || "Standard modern web architecture"}
|
|
@@ -80,7 +95,12 @@ ${context.specs.databaseSchema?.tables?.map(t => `
|
|
|
80
95
|
static renderUserFlows(context) {
|
|
81
96
|
if (!context.flows || !Array.isArray(context.flows))
|
|
82
97
|
return "# User Flows\n\nNo user flows defined yet.";
|
|
83
|
-
return
|
|
98
|
+
return `> [!IMPORTANT]
|
|
99
|
+
> **READ-ONLY VIEW**: This file is an export from \`context.json\`.
|
|
100
|
+
> Do NOT edit this file directly. Any manual changes will be overwritten.
|
|
101
|
+
> **Source of Truth**: [\`.mycontext/context.json\`](file://./.mycontext/context.json)
|
|
102
|
+
|
|
103
|
+
# User Flows
|
|
84
104
|
|
|
85
105
|
${context.flows.map(f => `
|
|
86
106
|
### ${f.name || "Unnamed Flow"}
|
|
@@ -97,7 +117,12 @@ ${f.steps?.map((s, i) => `${i + 1}. ${s}`).join("\n") || "None defined"}
|
|
|
97
117
|
static renderEdgeCases(context) {
|
|
98
118
|
if (!context.edgeCases || !Array.isArray(context.edgeCases))
|
|
99
119
|
return "# Edge Cases\n\nNo edge cases defined yet.";
|
|
100
|
-
return
|
|
120
|
+
return `> [!IMPORTANT]
|
|
121
|
+
> **READ-ONLY VIEW**: This file is an export from \`context.json\`.
|
|
122
|
+
> Do NOT edit this file directly. Any manual changes will be overwritten.
|
|
123
|
+
> **Source of Truth**: [\`.mycontext/context.json\`](file://./.mycontext/context.json)
|
|
124
|
+
|
|
125
|
+
# Edge Cases
|
|
101
126
|
|
|
102
127
|
${context.edgeCases.map(ec => `
|
|
103
128
|
### [${ec.category || "General"}] ${ec.description || "N/A"}
|
|
@@ -118,7 +143,12 @@ ${context.edgeCases.map(ec => `
|
|
|
118
143
|
groups[g] = [];
|
|
119
144
|
groups[g].push(c);
|
|
120
145
|
});
|
|
121
|
-
return
|
|
146
|
+
return `> [!IMPORTANT]
|
|
147
|
+
> **READ-ONLY VIEW**: This file is an export from \`context.json\`.
|
|
148
|
+
> Do NOT edit this file directly. Any manual changes will be overwritten.
|
|
149
|
+
> **Source of Truth**: [\`.mycontext/context.json\`](file://./.mycontext/context.json)
|
|
150
|
+
|
|
151
|
+
# Component Architecture
|
|
122
152
|
|
|
123
153
|
${Object.entries(groups).map(([group, comps]) => `
|
|
124
154
|
## ${group}
|
|
@@ -131,7 +161,12 @@ ${comps.map(c => `- **${c.name}**: ${c.description || "N/A"} (${c.type || "UI Co
|
|
|
131
161
|
}
|
|
132
162
|
static renderTypesGuide(context) {
|
|
133
163
|
const types = context.brain?.types || { entities: [], shared: [] };
|
|
134
|
-
return
|
|
164
|
+
return `> [!IMPORTANT]
|
|
165
|
+
> **READ-ONLY VIEW**: This file is an export from \`context.json\`.
|
|
166
|
+
> Do NOT edit this file directly. Any manual changes will be overwritten.
|
|
167
|
+
> **Source of Truth**: [\`.mycontext/context.json\`](file://./.mycontext/context.json)
|
|
168
|
+
|
|
169
|
+
# Architecture & Type Guide
|
|
135
170
|
|
|
136
171
|
## Core Entities
|
|
137
172
|
${(types.entities || []).map((e) => `
|
|
@@ -157,7 +192,12 @@ ${s.schema}
|
|
|
157
192
|
}
|
|
158
193
|
static renderBrandGuide(context) {
|
|
159
194
|
const brand = context.brain?.brand || { theme: "light", colors: {}, typography: {}, designPrinciples: [] };
|
|
160
|
-
return
|
|
195
|
+
return `> [!IMPORTANT]
|
|
196
|
+
> **READ-ONLY VIEW**: This file is an export from \`context.json\`.
|
|
197
|
+
> Do NOT edit this file directly. Any manual changes will be overwritten.
|
|
198
|
+
> **Source of Truth**: [\`.mycontext/context.json\`](file://./.mycontext/context.json)
|
|
199
|
+
|
|
200
|
+
# Brand & Design Guidelines
|
|
161
201
|
|
|
162
202
|
## Visual Identity
|
|
163
203
|
**Theme:** ${brand.theme || "light"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextRenderer.js","sourceRoot":"","sources":["../../src/utils/contextRenderer.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,eAAe;IACnB,MAAM,CAAC,SAAS,CAAC,OAAsB;QAC5C,OAAO
|
|
1
|
+
{"version":3,"file":"contextRenderer.js","sourceRoot":"","sources":["../../src/utils/contextRenderer.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,eAAe;IACnB,MAAM,CAAC,SAAS,CAAC,OAAsB;QAC5C,OAAO;;;;;;;;oBAQS,OAAO,CAAC,QAAQ,EAAE,aAAa,EAAE,IAAI,IAAI,SAAS;mBACnD,OAAO,CAAC,QAAQ,EAAE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