@powerformer/refly-cli 0.1.17 → 0.1.18
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/bin/refly.js +708 -204
- package/dist/bin/refly.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ declare const ErrorCodes: {
|
|
|
69
69
|
readonly PERMISSION_DENIED: "PERMISSION_DENIED";
|
|
70
70
|
readonly INVALID_INPUT: "INVALID_INPUT";
|
|
71
71
|
readonly INTERNAL_ERROR: "INTERNAL_ERROR";
|
|
72
|
+
readonly MISSING_VARIABLES: "MISSING_VARIABLES";
|
|
72
73
|
};
|
|
73
74
|
type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
|
|
74
75
|
|
package/dist/index.js
CHANGED
|
@@ -317,11 +317,17 @@ function initializeBaseSkillSymlink() {
|
|
|
317
317
|
ensureDir(path5.join(baseDir, "rules"));
|
|
318
318
|
return createSkillSymlink("refly");
|
|
319
319
|
}
|
|
320
|
-
function createReflySkillWithSymlink(skillName, skillMdContent) {
|
|
320
|
+
function createReflySkillWithSymlink(skillName, skillMdContent, options) {
|
|
321
321
|
const skillDir = getReflyDomainSkillDir(skillName);
|
|
322
322
|
try {
|
|
323
323
|
ensureReflySkillsDir();
|
|
324
324
|
if (fs5.existsSync(skillDir)) {
|
|
325
|
+
if (options?.force) {
|
|
326
|
+
const skillMdPath2 = path5.join(skillDir, "SKILL.md");
|
|
327
|
+
fs5.writeFileSync(skillMdPath2, skillMdContent, { encoding: "utf-8", mode: 420 });
|
|
328
|
+
logger.debug(`Updated SKILL.md (force): ${skillMdPath2}`);
|
|
329
|
+
return createSkillSymlink(skillName);
|
|
330
|
+
}
|
|
325
331
|
return {
|
|
326
332
|
success: false,
|
|
327
333
|
skillName,
|
|
@@ -657,7 +663,9 @@ var ErrorCodes = {
|
|
|
657
663
|
CONFLICT: "CONFLICT",
|
|
658
664
|
PERMISSION_DENIED: "PERMISSION_DENIED",
|
|
659
665
|
INVALID_INPUT: "INVALID_INPUT",
|
|
660
|
-
INTERNAL_ERROR: "INTERNAL_ERROR"
|
|
666
|
+
INTERNAL_ERROR: "INTERNAL_ERROR",
|
|
667
|
+
// Variables
|
|
668
|
+
MISSING_VARIABLES: "MISSING_VARIABLES"
|
|
661
669
|
};
|
|
662
670
|
|
|
663
671
|
// src/utils/errors.ts
|