@appweaver/create-weaver-app 1.0.24 → 1.0.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/create-weaver-app.js +21 -11
- package/package.json +1 -1
- package/skill/GUIDELINES.md +1 -1
- package/skill/SKILL.md +1 -2
- package/skill/references/cli.md +5 -6
package/create-weaver-app.js
CHANGED
|
@@ -158,24 +158,34 @@ program
|
|
|
158
158
|
agentsDir = '.agents';
|
|
159
159
|
}
|
|
160
160
|
const guidelinesFileName = agent === 'claude' ? 'CLAUDE.md' : 'AGENTS.md';
|
|
161
|
-
// Copy skill and referenced files
|
|
161
|
+
// Copy skill and referenced files. The framework guidelines
|
|
162
|
+
// (GUIDELINES.md) are preserved inside the skills directory so that
|
|
163
|
+
// `weaver update` can keep them in sync without touching the project's
|
|
164
|
+
// own root guidelines file.
|
|
162
165
|
const skillDir = node_path_1.default.join(__dirname, 'skill');
|
|
163
166
|
const projectSkillPath = node_path_1.default.join(agentsDir, 'skills', 'appweaver');
|
|
164
167
|
const projectSkillDir = node_path_1.default.join(destDir, projectSkillPath);
|
|
165
168
|
await promises_1.default.cp(skillDir, projectSkillDir, {
|
|
166
169
|
recursive: true
|
|
167
170
|
});
|
|
168
|
-
//
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
const guidelinesContents = await promises_1.default.readFile(guidelinesFilePath, 'utf8');
|
|
174
|
-
const referencesPath = node_path_1.default
|
|
175
|
-
.join(projectSkillPath, 'references')
|
|
171
|
+
// Create a thin root guidelines file that references the framework
|
|
172
|
+
// guidelines from the skills directory. This file is never overwritten
|
|
173
|
+
// by `weaver update`, so it can be freely extended in the project.
|
|
174
|
+
const guidelinesPath = node_path_1.default
|
|
175
|
+
.join(projectSkillPath, 'GUIDELINES.md')
|
|
176
176
|
.replace(/\\/g, '/');
|
|
177
|
-
const
|
|
178
|
-
|
|
177
|
+
const guidelinesFilePath = node_path_1.default.join(destDir, guidelinesFileName);
|
|
178
|
+
const guidelinesReference = agent === 'claude'
|
|
179
|
+
? `@${guidelinesPath}`
|
|
180
|
+
: `[Appweaver framework guidelines](${guidelinesPath})`;
|
|
181
|
+
const guidelinesContent = `# ${variables.NAME}\n\n` +
|
|
182
|
+
`${description}\n\n` +
|
|
183
|
+
`This is an [Appweaver](https://github.com/lmatosevic/appweaver) project. ` +
|
|
184
|
+
`Follow the framework conventions, architecture, and usage documented in the guidelines:\n\n` +
|
|
185
|
+
`${guidelinesReference}\n\n` +
|
|
186
|
+
`<!-- Add your own project-specific instructions below this line. ` +
|
|
187
|
+
`This file is not modified by \`weaver update\`. -->\n`;
|
|
188
|
+
await promises_1.default.writeFile(guidelinesFilePath, guidelinesContent, {
|
|
179
189
|
encoding: 'utf8'
|
|
180
190
|
});
|
|
181
191
|
}
|
package/package.json
CHANGED
package/skill/GUIDELINES.md
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -472,7 +472,7 @@ export async function createAdminUser(): Promise<void> {
|
|
|
472
472
|
data: {
|
|
473
473
|
firstName: 'Admin',
|
|
474
474
|
lastName: 'Admin',
|
|
475
|
-
email: 'admin@appweaver.
|
|
475
|
+
email: 'admin@appweaver.co',
|
|
476
476
|
phone: '01234435',
|
|
477
477
|
roles: {
|
|
478
478
|
connectOrCreate: [
|
|
@@ -554,7 +554,6 @@ weaver update # update all @appweaver/* packages
|
|
|
554
554
|
weaver update @appweaver/core @appweaver/cli # update specific packages
|
|
555
555
|
weaver update --targetVersion 1.2.3 # update to a specific version
|
|
556
556
|
weaver update --noSkill # skip updating AI agent skill files (.claude, .agents, …)
|
|
557
|
-
weaver update --noGuidelines # skip updating AI agent guideline files (AGENTS.md, CLAUDE.md)
|
|
558
557
|
weaver update --force # force update despite peerDependency mismatches
|
|
559
558
|
```
|
|
560
559
|
|
package/skill/references/cli.md
CHANGED
|
@@ -205,10 +205,9 @@ Update the Appweaver packages.
|
|
|
205
205
|
|
|
206
206
|
**Options:**
|
|
207
207
|
|
|
208
|
-
| Option | Description
|
|
209
|
-
|
|
210
|
-
| `--targetVersion [targetVersion]` | The version to update the packages to
|
|
208
|
+
| Option | Description | Default |
|
|
209
|
+
|-----------------------------------|-----------------------------------------------------------------------------|------------|
|
|
210
|
+
| `--targetVersion [targetVersion]` | The version to update the packages to | `"latest"` |
|
|
211
211
|
| `--noSkill` | Skip updating AI agents skill files in agent dirs (`.claude`, `.agents`, …) | `false` |
|
|
212
|
-
|
|
|
213
|
-
|
|
|
214
|
-
| `--verbose` | Print verbose output | `false` |
|
|
212
|
+
| `-f, --force` | Force update despite peerDependency version mismatches | `false` |
|
|
213
|
+
| `--verbose` | Print verbose output | `false` |
|