wayfind 2.0.23 → 2.0.24

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.
@@ -4729,6 +4729,21 @@ const COMMANDS = {
4729
4729
  'sync-public': {
4730
4730
  desc: 'Sync code to the public usewayfind/wayfind repo',
4731
4731
  run: () => {
4732
+ // Source must be the repo checkout you're working in, not the npm global install.
4733
+ // Use cwd if it looks like a wayfind repo, otherwise fall back to ROOT.
4734
+ const cwdPkg = path.join(process.cwd(), 'package.json');
4735
+ let sourceRoot = ROOT;
4736
+ if (fs.existsSync(cwdPkg)) {
4737
+ try {
4738
+ const pkg = JSON.parse(fs.readFileSync(cwdPkg, 'utf8'));
4739
+ if (pkg.name === 'wayfind') sourceRoot = process.cwd();
4740
+ } catch {}
4741
+ }
4742
+ if (sourceRoot === ROOT && ROOT !== process.cwd()) {
4743
+ console.log(`Syncing from: ${sourceRoot}`);
4744
+ console.log('Tip: run from your wayfind repo checkout to sync local changes.');
4745
+ }
4746
+
4732
4747
  const tmpDir = path.join(os.tmpdir(), 'wayfind-public-sync');
4733
4748
  const publicRepo = process.env.WAYFIND_PUBLIC_REPO || 'https://github.com/usewayfind/wayfind.git';
4734
4749
 
@@ -4761,13 +4776,13 @@ const COMMANDS = {
4761
4776
  const privateOnlyWorkflows = ['sync-public.yml', 'simulation.yml'];
4762
4777
 
4763
4778
  // Also sync public-staging docs if they exist
4764
- const publicDocsDir = path.join(ROOT, 'public-staging', 'docs');
4779
+ const publicDocsDir = path.join(sourceRoot, 'public-staging', 'docs');
4765
4780
 
4766
4781
  console.log('Syncing files...');
4767
4782
  for (const item of syncItems) {
4768
4783
  const isDir = item.endsWith('/');
4769
4784
  const name = item.replace(/\/$/, '');
4770
- const src = path.join(ROOT, name);
4785
+ const src = path.join(sourceRoot, name);
4771
4786
  if (!fs.existsSync(src)) continue;
4772
4787
  if (isDir) {
4773
4788
  // rsync without trailing slash on source copies the directory itself into dest
@@ -4787,7 +4802,7 @@ const COMMANDS = {
4787
4802
 
4788
4803
  // Sync public-staging/ → public repo root (recursive)
4789
4804
  // This overlays LICENSE, README, CHANGELOG, SECURITY, CONTRIBUTING, docs/, etc.
4790
- const publicStagingDir = path.join(ROOT, 'public-staging');
4805
+ const publicStagingDir = path.join(sourceRoot, 'public-staging');
4791
4806
  if (fs.existsSync(publicStagingDir)) {
4792
4807
  spawnSync('rsync', ['-a', publicStagingDir + '/', tmpDir + '/'], { stdio: 'inherit' });
4793
4808
  }
@@ -4795,7 +4810,7 @@ const COMMANDS = {
4795
4810
  // ── Sanitization gate ───────────────────────────────────────────────
4796
4811
  // Scan all tracked text files for proprietary patterns before pushing.
4797
4812
  // Patterns loaded from .sync-blocklist (not synced to public repo).
4798
- const blocklistPath = path.join(ROOT, '.sync-blocklist');
4813
+ const blocklistPath = path.join(sourceRoot, '.sync-blocklist');
4799
4814
  const BLOCKED_PATTERNS = [];
4800
4815
  if (fs.existsSync(blocklistPath)) {
4801
4816
  for (const line of fs.readFileSync(blocklistPath, 'utf8').split('\n')) {
@@ -4873,7 +4888,7 @@ const COMMANDS = {
4873
4888
 
4874
4889
  // Get version for commit message
4875
4890
  let version = 'unknown';
4876
- try { version = require(path.join(ROOT, 'package.json')).version; } catch {}
4891
+ try { version = require(path.join(sourceRoot, 'package.json')).version; } catch {}
4877
4892
 
4878
4893
  // Commit and push
4879
4894
  spawnSync('git', ['add', '-A'], { cwd: tmpDir, stdio: 'inherit' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wayfind",
3
- "version": "2.0.23",
3
+ "version": "2.0.24",
4
4
  "description": "Team decision trail for AI-assisted development. The connective tissue between product, engineering, and strategy.",
5
5
  "bin": {
6
6
  "wayfind": "./bin/team-context.js"