@schandlergarcia/sf-web-components 1.9.21 → 1.9.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schandlergarcia/sf-web-components",
3
- "version": "1.9.21",
3
+ "version": "1.9.22",
4
4
  "description": "Reusable Salesforce web components library with Tailwind CSS v4 and shadcn/ui",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -268,6 +268,39 @@ if (fs.existsSync(packageJsonPath)) {
268
268
  }
269
269
  }
270
270
 
271
+ // Copy .a4drules from package to project root (so AI assistants can discover them)
272
+ const packageA4dRules = path.join(packageRoot, '.a4drules');
273
+ const projectRootA4dRules = path.join(cwd, '../../../../../.a4drules'); // Go up from webapp to project root
274
+
275
+ if (fs.existsSync(packageA4dRules)) {
276
+ console.log('\nšŸ“‹ Copying AI assistant rules to project root...\n');
277
+
278
+ // Resolve to absolute path
279
+ const projectRootPath = path.resolve(cwd, '../../../../../');
280
+ const targetA4dRules = path.join(projectRootPath, '.a4drules');
281
+
282
+ // Create .a4drules if it doesn't exist
283
+ if (!fs.existsSync(targetA4dRules)) {
284
+ fs.mkdirSync(targetA4dRules, { recursive: true });
285
+ }
286
+
287
+ // Copy skills directory
288
+ const skillsSource = path.join(packageA4dRules, 'skills');
289
+ const skillsTarget = path.join(targetA4dRules, 'skills');
290
+ if (fs.existsSync(skillsSource)) {
291
+ const skillsCopied = copyDirectoryRecursive(skillsSource, skillsTarget);
292
+ console.log(` āœ“ Copied ${skillsCopied} skill files`);
293
+ }
294
+
295
+ // Copy features directory
296
+ const featuresSource = path.join(packageA4dRules, 'features');
297
+ const featuresTarget = path.join(targetA4dRules, 'features');
298
+ if (fs.existsSync(featuresSource)) {
299
+ const featuresCopied = copyDirectoryRecursive(featuresSource, featuresTarget);
300
+ console.log(` āœ“ Copied ${featuresCopied} feature rule files`);
301
+ }
302
+ }
303
+
271
304
  // Migrate any dashboards from old location (src/components/pages/) to new location (src/pages/)
272
305
  const oldPagesDir = path.join(cwd, 'src/components/pages');
273
306
  const newPagesDir = path.join(cwd, 'src/pages');
@@ -315,6 +348,7 @@ console.log(` - Updated ${filesUpdated} files`);
315
348
  console.log(` - Installed ${templatesInstalled} page templates`);
316
349
  console.log(` - Installed CommandCenter.tsx for dashboard management`);
317
350
  console.log(` - Added "npm run reset:command-center" script`);
351
+ console.log(` - Installed AI assistant rules for command center building`);
318
352
  if (migratedFiles > 0) {
319
353
  console.log(` - Migrated ${migratedFiles} dashboard files to correct location`);
320
354
  }