@fermindi/pwn-cli 0.3.2 → 0.3.3

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.
Files changed (2) hide show
  1. package/cli/update.js +28 -25
  2. package/package.json +1 -1
package/cli/update.js CHANGED
@@ -93,6 +93,34 @@ export default async function updateCommand(args = []) {
93
93
  const skipped = [];
94
94
  const backed_up = [];
95
95
 
96
+ // ============================================
97
+ // MIGRATION: v0.3.2 (can remove after 2025-07-01)
98
+ // Rename README.md → .template.md in patterns/
99
+ // Must run BEFORE copying framework files
100
+ // ============================================
101
+ const migrations = [
102
+ { from: 'patterns/frontend/README.md', to: 'patterns/frontend/frontend.template.md' },
103
+ { from: 'patterns/backend/README.md', to: 'patterns/backend/backend.template.md' },
104
+ { from: 'patterns/universal/README.md', to: 'patterns/universal/universal.template.md' },
105
+ ];
106
+
107
+ for (const { from, to } of migrations) {
108
+ const oldPath = join(aiDir, from);
109
+ const newPath = join(aiDir, to);
110
+ if (existsSync(oldPath)) {
111
+ if (dryRun) {
112
+ console.log(` 🔄 Would migrate: ${from} → ${to}`);
113
+ } else {
114
+ // Delete old file (new template will be copied by framework files update)
115
+ const { unlinkSync } = await import('fs');
116
+ unlinkSync(oldPath);
117
+ console.log(` 🔄 Migrated: ${from} (removed, new template will be copied)`);
118
+ }
119
+ updated.push(`${from} → ${to}`);
120
+ }
121
+ }
122
+ // ============================================
123
+
96
124
  // Update framework files in .ai/
97
125
  for (const file of FRAMEWORK_FILES) {
98
126
  const templateFile = join(templateDir, file);
@@ -188,31 +216,6 @@ export default async function updateCommand(args = []) {
188
216
  }
189
217
  }
190
218
 
191
- // ============================================
192
- // MIGRATION: v1.1.0 (can remove after 2025-07-01)
193
- // Rename README.md → .template.md in patterns/
194
- // ============================================
195
- const migrations = [
196
- { from: 'patterns/frontend/README.md', to: 'patterns/frontend/frontend.template.md' },
197
- { from: 'patterns/backend/README.md', to: 'patterns/backend/backend.template.md' },
198
- { from: 'patterns/universal/README.md', to: 'patterns/universal/universal.template.md' },
199
- ];
200
-
201
- for (const { from, to } of migrations) {
202
- const oldPath = join(aiDir, from);
203
- const newPath = join(aiDir, to);
204
- if (existsSync(oldPath) && !existsSync(newPath)) {
205
- if (dryRun) {
206
- console.log(` 🔄 Would migrate: ${from} → ${to}`);
207
- } else {
208
- renameSync(oldPath, newPath);
209
- console.log(` 🔄 Migrated: ${from} → ${to}`);
210
- }
211
- updated.push(`${from} → ${to}`);
212
- }
213
- }
214
- // ============================================
215
-
216
219
  // Update state.json with new version
217
220
  if (!dryRun && existsSync(statePath)) {
218
221
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fermindi/pwn-cli",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Professional AI Workspace - Inject structured memory and automation into any project for AI-powered development",
5
5
  "type": "module",
6
6
  "bin": {