@justin_666/square-couplets-master-skills 1.0.10 → 1.0.11

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": "@justin_666/square-couplets-master-skills",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "Claude Agent Skills for generating Chinese New Year Doufang (diamond-shaped couplet) artwork using Google Gemini AI",
5
5
  "type": "module",
6
6
  "main": "bin/doufang-skills.js",
@@ -58,10 +58,10 @@
58
58
  "node": ">=18.0.0"
59
59
  },
60
60
  "dependencies": {
61
- "dotenv": "^17.2.3"
61
+ "dotenv": "^17.2.3",
62
+ "@google/genai": "^1.37.0"
62
63
  },
63
64
  "devDependencies": {
64
- "@google/genai": "^1.37.0",
65
65
  "@types/node": "^22.14.0",
66
66
  "@vitejs/plugin-react": "^5.0.0",
67
67
  "react": "^19.2.3",
@@ -42,7 +42,7 @@ const __dirname = dirname(__filename);
42
42
  const skillDir = resolve(__dirname);
43
43
  const projectRoot = resolve(skillDir, '../..');
44
44
 
45
- // Try to find services directory
45
+ // Try to find dist directory (compiled JS) or services directory (source TS)
46
46
  function findServicesPath() {
47
47
  // Get npm global prefix to find globally installed packages
48
48
  let globalPrefix = null;
@@ -62,29 +62,42 @@ function findServicesPath() {
62
62
  // Package not found via require.resolve, will try other paths
63
63
  }
64
64
 
65
+ // Build list of possible paths
66
+ // IMPORTANT: We're looking for dist/services (compiled) not services/ (source)
65
67
  const possiblePaths = [
66
- // Global npm package (highest priority - most reliable for installed packages)
68
+ // Global npm package - dist directory (compiled JS)
67
69
  ...(globalPrefix ? [
68
- join(globalPrefix, 'lib', 'node_modules', '@justin_666', 'square-couplets-master-skills', 'services'),
69
- join(globalPrefix, 'node_modules', '@justin_666', 'square-couplets-master-skills', 'services'),
70
+ join(globalPrefix, 'lib', 'node_modules', '@justin_666', 'square-couplets-master-skills', 'dist', 'services'),
71
+ join(globalPrefix, 'node_modules', '@justin_666', 'square-couplets-master-skills', 'dist', 'services'),
70
72
  ] : []),
71
- // From resolved package root (if it has services)
72
- ...(packageRoot ? [join(packageRoot, 'services')] : []),
73
- // Local project root
74
- join(projectRoot, 'services'),
75
- // Local node_modules
76
- join(projectRoot, 'node_modules', '@justin_666', 'square-couplets-master-skills', 'services'),
77
- // Current working directory
73
+ // From resolved package root - dist directory
74
+ ...(packageRoot ? [
75
+ join(packageRoot, 'dist', 'services'),
76
+ join(packageRoot, 'services'), // fallback to source
77
+ ] : []),
78
+ // Local project root - dist directory
79
+ join(projectRoot, 'dist', 'services'),
80
+ join(projectRoot, 'services'), // fallback to source
81
+ // Local node_modules - dist directory
82
+ join(projectRoot, 'node_modules', '@justin_666', 'square-couplets-master-skills', 'dist', 'services'),
83
+ // Current working directory - dist directory
84
+ join(process.cwd(), 'dist', 'services'),
78
85
  join(process.cwd(), 'services'),
79
86
  // Current working directory node_modules
80
- join(process.cwd(), 'node_modules', '@justin_666', 'square-couplets-master-skills', 'services'),
87
+ join(process.cwd(), 'node_modules', '@justin_666', 'square-couplets-master-skills', 'dist', 'services'),
81
88
  ];
82
89
 
83
- // Debug: log all paths being checked (only in development)
90
+ // Debug: log all paths being checked (enable with DEBUG_DOUFANG=1)
84
91
  if (process.env.DEBUG_DOUFANG) {
85
92
  console.log('šŸ” Checking paths for services directory:');
93
+ console.log(` packageRoot: ${packageRoot || 'not found'}`);
94
+ console.log(` globalPrefix: ${globalPrefix || 'not found'}`);
95
+ console.log(` projectRoot: ${projectRoot}`);
96
+ console.log(` cwd: ${process.cwd()}`);
97
+ console.log('\n Trying paths:');
86
98
  for (const path of possiblePaths) {
87
- console.log(` - ${path} ${existsSync(path) ? 'āœ…' : 'āŒ'}`);
99
+ const exists = existsSync(path);
100
+ console.log(` ${exists ? 'āœ…' : 'āŒ'} ${path}`);
88
101
  }
89
102
  }
90
103
 
@@ -92,7 +105,7 @@ function findServicesPath() {
92
105
  try {
93
106
  if (statSync(path).isDirectory()) {
94
107
  if (process.env.DEBUG_DOUFANG) {
95
- console.log(`āœ… Found services at: ${path}`);
108
+ console.log(`\nāœ… Found services at: ${path}`);
96
109
  }
97
110
  return path;
98
111
  }
@@ -103,7 +116,7 @@ function findServicesPath() {
103
116
 
104
117
  // If not found, provide helpful error message
105
118
  if (process.env.DEBUG_DOUFANG) {
106
- console.log('āŒ Services directory not found in any of the checked paths');
119
+ console.log('\nāŒ Services directory not found in any of the checked paths');
107
120
  }
108
121
  return null;
109
122
  }