@powerformer/refly-cli 0.1.13 → 0.1.14

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/dist/index.js CHANGED
@@ -4560,7 +4560,7 @@ var ConfigSchema = external_exports.object({
4560
4560
  installedAt: external_exports.string().optional()
4561
4561
  }).optional()
4562
4562
  });
4563
- var DEFAULT_API_ENDPOINT = "https://api.refly.ai";
4563
+ var DEFAULT_API_ENDPOINT = "https://refly-api.powerformer.net";
4564
4564
  var DEFAULT_CONFIG = {
4565
4565
  version: 1,
4566
4566
  api: {
@@ -4909,22 +4909,16 @@ var path5 = __toESM(require("path"));
4909
4909
  function getPackageSkillDir() {
4910
4910
  const possiblePaths = [
4911
4911
  path5.join(__dirname, "..", "..", "skill"),
4912
- // Built package: dist/bin/../../skill
4913
- path5.join(__dirname, "..", "..", "..", "skill"),
4914
- // Development: dist/bin/../../../skill
4915
- path5.join(__dirname, "..", "skill")
4916
- // Alternative: dist/../skill
4912
+ // Built package
4913
+ path5.join(__dirname, "..", "..", "..", "skill")
4914
+ // Development
4917
4915
  ];
4918
- logger.debug("Looking for skill files, __dirname:", __dirname);
4919
4916
  for (const p of possiblePaths) {
4920
- const resolved = path5.resolve(p);
4921
- const exists = fs5.existsSync(resolved);
4922
- logger.debug(` Checking path: ${resolved} - exists: ${exists}`);
4923
- if (exists) {
4924
- return resolved;
4917
+ if (fs5.existsSync(p)) {
4918
+ return p;
4925
4919
  }
4926
4920
  }
4927
- throw new Error(`Skill files not found in package. Searched paths from __dirname=${__dirname}`);
4921
+ throw new Error("Skill files not found in package");
4928
4922
  }
4929
4923
  function installSkill() {
4930
4924
  const result = {
@@ -4935,50 +4929,31 @@ function installSkill() {
4935
4929
  version: getSkillVersion()
4936
4930
  };
4937
4931
  const sourceDir = getPackageSkillDir();
4938
- logger.debug("Source skill directory:", sourceDir);
4939
4932
  const targetDir = getClaudeSkillDir();
4940
- logger.debug("Target skill directory:", targetDir);
4941
- try {
4942
- ensureDir(targetDir);
4943
- ensureDir(path5.join(targetDir, "references"));
4944
- logger.debug("Created target directories");
4945
- } catch (err) {
4946
- logger.error("Failed to create target directories:", err);
4947
- throw err;
4948
- }
4933
+ ensureDir(targetDir);
4934
+ ensureDir(path5.join(targetDir, "references"));
4949
4935
  const skillSource = path5.join(sourceDir, "SKILL.md");
4950
4936
  const skillTarget = path5.join(targetDir, "SKILL.md");
4951
- logger.debug(`Copying SKILL.md: ${skillSource} -> ${skillTarget}`);
4952
4937
  if (fs5.existsSync(skillSource)) {
4953
4938
  fs5.copyFileSync(skillSource, skillTarget);
4954
4939
  result.skillInstalled = true;
4955
4940
  result.skillPath = targetDir;
4956
- logger.debug("SKILL.md copied successfully");
4957
- } else {
4958
- logger.warn("SKILL.md source not found:", skillSource);
4959
4941
  }
4960
4942
  const refsSource = path5.join(sourceDir, "references");
4961
4943
  const refsTarget = path5.join(targetDir, "references");
4962
4944
  if (fs5.existsSync(refsSource)) {
4963
4945
  const files = fs5.readdirSync(refsSource);
4964
- logger.debug(`Copying ${files.length} reference files`);
4965
4946
  for (const file of files) {
4966
4947
  fs5.copyFileSync(path5.join(refsSource, file), path5.join(refsTarget, file));
4967
4948
  }
4968
4949
  }
4969
4950
  const commandsDir = getClaudeCommandsDir();
4970
- logger.debug("Commands directory:", commandsDir);
4971
4951
  ensureDir(commandsDir);
4972
4952
  result.commandsInstalled = installSlashCommands(sourceDir, commandsDir);
4973
4953
  if (result.commandsInstalled) {
4974
4954
  result.commandsPath = commandsDir;
4975
4955
  }
4976
- logger.debug("Commands installed:", result.commandsInstalled);
4977
4956
  updateSkillInfo(result.version);
4978
- logger.info("Skill installation complete:", {
4979
- skillInstalled: result.skillInstalled,
4980
- commandsInstalled: result.commandsInstalled
4981
- });
4982
4957
  return result;
4983
4958
  }
4984
4959
  function installSlashCommands(sourceDir, targetDir) {