@squidcloud/cli 1.0.459 → 1.0.460

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/dist/index.js +39 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -32529,6 +32529,40 @@ const logging_1 = __webpack_require__(443);
32529
32529
  const validate_1 = __webpack_require__(2246);
32530
32530
  /** List of Squid-owned skills that can be copied/updated. */
32531
32531
  exports.SQUID_SKILLS = ['squid-development', 'squid-react-development'];
32532
+ /**
32533
+ * Finds a .claude directory in the project, otherwise return null
32534
+ *
32535
+ * Squid CLI commands can only run from the backend directory
32536
+ * For backend-only projects, .claude is in cwd.
32537
+ * For fullstack projects with frontend/backend dirs, .claude is at project root which is the direct parent of backend/
32538
+ */
32539
+ function findClaudeDir() {
32540
+ const cwdClaude = path_1.default.join(process.cwd(), '.claude');
32541
+ if (fsSync.existsSync(cwdClaude) && fsSync.statSync(cwdClaude).isDirectory()) {
32542
+ return cwdClaude;
32543
+ }
32544
+ const parentClaude = path_1.default.resolve(process.cwd(), '..', '.claude');
32545
+ if (fsSync.existsSync(parentClaude) && fsSync.statSync(parentClaude).isDirectory()) {
32546
+ return parentClaude;
32547
+ }
32548
+ return null;
32549
+ }
32550
+ /**
32551
+ * Gets the .claude directory path existing in the project
32552
+ * or sets a location for a new .claude directory based on the project structure.
32553
+ */
32554
+ function getClaudeDir() {
32555
+ const found = findClaudeDir();
32556
+ if (found)
32557
+ return found;
32558
+ // Fullstack project: create .claude at parent (project root)
32559
+ const parentFrontend = path_1.default.resolve(process.cwd(), '..', 'frontend');
32560
+ if (fsSync.existsSync(parentFrontend) && fsSync.statSync(parentFrontend).isDirectory()) {
32561
+ return path_1.default.resolve(process.cwd(), '..', '.claude');
32562
+ }
32563
+ // Backend-only project: create in cwd
32564
+ return path_1.default.join(process.cwd(), '.claude');
32565
+ }
32532
32566
  /**
32533
32567
  * Gets all files in a directory, sorted for consistent ordering.
32534
32568
  */
@@ -32542,7 +32576,8 @@ function getFilesSorted(dir) {
32542
32576
  * Extra files in project are ignored
32543
32577
  */
32544
32578
  function skillNeedsUpdate(skillName) {
32545
- const projectSkillPath = path_1.default.join(process.cwd(), '.claude', 'skills', skillName);
32579
+ const claudeDir = getClaudeDir();
32580
+ const projectSkillPath = path_1.default.join(claudeDir, 'skills', skillName);
32546
32581
  const cliSkillPath = path_1.default.join(__dirname, 'resources', 'claude', 'skills', skillName);
32547
32582
  // If CLI doesn't have this skill bundled, nothing to update.
32548
32583
  if (!fsSync.existsSync(cliSkillPath)) {
@@ -32595,7 +32630,8 @@ async function updateSkills() {
32595
32630
  console.log(chalk_1.default.green('✓ Skills already up to date'));
32596
32631
  return;
32597
32632
  }
32598
- const skillsDir = path_1.default.join(process.cwd(), '.claude', 'skills');
32633
+ const claudeDir = getClaudeDir();
32634
+ const skillsDir = path_1.default.join(claudeDir, 'skills');
32599
32635
  let updatedCount = 0;
32600
32636
  for (const skillName of skillsToUpdate) {
32601
32637
  const cliSkillPath = path_1.default.join(__dirname, 'resources', 'claude', 'skills', skillName);
@@ -37339,7 +37375,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"seek-bzip","version":"1.0.6",
37339
37375
  (module) {
37340
37376
 
37341
37377
  "use strict";
37342
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.459","description":"The Squid CLI","main":"dist/index.js","scripts":{"start":"node dist/index.js","start-ts":"ts-node -r tsconfig-paths/register src/index.ts","prebuild":"rimraf dist","build":"webpack --mode=production","build:dev":"webpack --mode=development","lint":"eslint","link":"npm run build && chmod 755 dist/index.js && npm link","watch":"webpack --watch","deploy":"npm run build && npm pack --silent | xargs -I {} mv {} package.tgz && npm install -g package.tgz && rm -rf package.tgz","publish:public":"npm run build && npm publish --access public"},"files":["dist/**/*"],"bin":{"squid":"dist/index.js"},"keywords":[],"author":"","license":"ISC","engines":{"node":">=18.0.0"},"dependencies":{"@squidcloud/local-backend":"^1.0.459","adm-zip":"^0.5.16","copy-webpack-plugin":"^12.0.2","decompress":"^4.2.1","logpipes":"^1.11.0","nodemon":"^3.1.9","terser-webpack-plugin":"^5.3.10","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.1.0","webpack":"^5.101.3","zip-webpack-plugin":"^4.0.1"},"devDependencies":{"@types/adm-zip":"^0.5.7","@types/decompress":"^4.2.7","@types/node":"^20.19.9","terminal-link":"^3.0.0"}}');
37378
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.460","description":"The Squid CLI","main":"dist/index.js","scripts":{"start":"node dist/index.js","start-ts":"ts-node -r tsconfig-paths/register src/index.ts","prebuild":"rimraf dist","build":"webpack --mode=production","build:dev":"webpack --mode=development","lint":"eslint","link":"npm run build && chmod 755 dist/index.js && npm link","watch":"webpack --watch","deploy":"npm run build && npm pack --silent | xargs -I {} mv {} package.tgz && npm install -g package.tgz && rm -rf package.tgz","publish:public":"npm run build && npm publish --access public"},"files":["dist/**/*"],"bin":{"squid":"dist/index.js"},"keywords":[],"author":"","license":"ISC","engines":{"node":">=18.0.0"},"dependencies":{"@squidcloud/local-backend":"^1.0.460","adm-zip":"^0.5.16","copy-webpack-plugin":"^12.0.2","decompress":"^4.2.1","logpipes":"^1.11.0","nodemon":"^3.1.9","terser-webpack-plugin":"^5.3.10","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.1.0","webpack":"^5.101.3","zip-webpack-plugin":"^4.0.1"},"devDependencies":{"@types/adm-zip":"^0.5.7","@types/decompress":"^4.2.7","@types/node":"^20.19.9","terminal-link":"^3.0.0"}}');
37343
37379
 
37344
37380
  /***/ }
37345
37381
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/cli",
3
- "version": "1.0.459",
3
+ "version": "1.0.460",
4
4
  "description": "The Squid CLI",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -28,7 +28,7 @@
28
28
  "node": ">=18.0.0"
29
29
  },
30
30
  "dependencies": {
31
- "@squidcloud/local-backend": "^1.0.459",
31
+ "@squidcloud/local-backend": "^1.0.460",
32
32
  "adm-zip": "^0.5.16",
33
33
  "copy-webpack-plugin": "^12.0.2",
34
34
  "decompress": "^4.2.1",