rulesync 16.2.0 → 16.3.0
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/cli/index.cjs +563 -2
- package/dist/cli/index.js +563 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/{import-CArKOPG_.js → import-Bj5HxY9p.js} +21 -4
- package/dist/import-Bj5HxY9p.js.map +1 -0
- package/dist/{import-DNfxS6QZ.cjs → import-DD-GRmB9.cjs} +37 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/import-CArKOPG_.js.map +0 -1
|
@@ -61,6 +61,13 @@ const ALL_FEATURES = [
|
|
|
61
61
|
...ACTIVE_FEATURES_AFTER_IGNORE
|
|
62
62
|
];
|
|
63
63
|
const ALL_FEATURES_WITH_WILDCARD = [...ALL_FEATURES, "*"];
|
|
64
|
+
/**
|
|
65
|
+
* Features that remain accepted for compatibility but are superseded by a
|
|
66
|
+
* newer feature. Maps each deprecated feature to its replacement; consumers
|
|
67
|
+
* (e.g. `rulesync doctor`) derive their deprecation warnings from this map so
|
|
68
|
+
* the set cannot drift from the schema above.
|
|
69
|
+
*/
|
|
70
|
+
const DEPRECATED_FEATURE_REPLACEMENTS = { ignore: "permissions" };
|
|
64
71
|
const ACTIVE_FEATURES = [...ACTIVE_FEATURES_BEFORE_IGNORE, ...ACTIVE_FEATURES_AFTER_IGNORE];
|
|
65
72
|
const DeprecatedIgnoreFeatureSchema = z.literal("ignore").check(meta({
|
|
66
73
|
deprecated: true,
|
|
@@ -810,6 +817,7 @@ const ErrorCodes = {
|
|
|
810
817
|
GITIGNORE_FAILED: "GITIGNORE_FAILED",
|
|
811
818
|
INIT_FAILED: "INIT_FAILED",
|
|
812
819
|
MCP_FAILED: "MCP_FAILED",
|
|
820
|
+
DOCTOR_FAILED: "DOCTOR_FAILED",
|
|
813
821
|
UNKNOWN_ERROR: "UNKNOWN_ERROR"
|
|
814
822
|
};
|
|
815
823
|
/**
|
|
@@ -818,10 +826,12 @@ const ErrorCodes = {
|
|
|
818
826
|
var CLIError = class extends Error {
|
|
819
827
|
code;
|
|
820
828
|
exitCode;
|
|
821
|
-
|
|
829
|
+
details;
|
|
830
|
+
constructor(message, code = ErrorCodes.UNKNOWN_ERROR, exitCode = 1, details) {
|
|
822
831
|
super(message);
|
|
823
832
|
this.code = code;
|
|
824
833
|
this.exitCode = exitCode;
|
|
834
|
+
this.details = details;
|
|
825
835
|
this.name = "CLIError";
|
|
826
836
|
}
|
|
827
837
|
};
|
|
@@ -945,6 +955,7 @@ var JsonLogger = class extends BaseLogger {
|
|
|
945
955
|
message: errorMessage
|
|
946
956
|
};
|
|
947
957
|
if (this._verbose && message instanceof Error && message.stack) errorInfo.stack = message.stack;
|
|
958
|
+
if (message instanceof CLIError && message.details !== void 0) errorInfo.details = message.details;
|
|
948
959
|
this.outputJson(false, errorInfo);
|
|
949
960
|
}
|
|
950
961
|
debug(_message, ..._args) {}
|
|
@@ -1005,6 +1016,10 @@ function hasControlCharacters(value) {
|
|
|
1005
1016
|
}
|
|
1006
1017
|
//#endregion
|
|
1007
1018
|
//#region src/config/config.ts
|
|
1019
|
+
/**
|
|
1020
|
+
* Key accepted alongside feature names in the per-feature object form of
|
|
1021
|
+
* `targets`. Exported so `rulesync doctor` treats the same key as valid.
|
|
1022
|
+
*/
|
|
1008
1023
|
const GITIGNORE_DESTINATION_KEY = "gitignoreDestination";
|
|
1009
1024
|
/**
|
|
1010
1025
|
* Schema for a single source entry in the sources array.
|
|
@@ -1071,7 +1086,9 @@ function normalizeConfigFilePath({ configFilePath, inputRoot }) {
|
|
|
1071
1086
|
return isAbsolute(configFilePath) ? configFilePath : resolve(configFilePath);
|
|
1072
1087
|
}
|
|
1073
1088
|
/**
|
|
1074
|
-
* Conflicting target pairs that cannot be used together
|
|
1089
|
+
* Conflicting target pairs that cannot be used together.
|
|
1090
|
+
* Exported so `rulesync doctor` can report the same conflicts as diagnostics
|
|
1091
|
+
* without duplicating the list.
|
|
1075
1092
|
*/
|
|
1076
1093
|
const CONFLICTING_TARGET_PAIRS = [["augmentcode", "augmentcode-legacy"], ["claudecode", "claudecode-legacy"]];
|
|
1077
1094
|
/**
|
|
@@ -49967,6 +49984,6 @@ async function importChecksCore(params) {
|
|
|
49967
49984
|
return writtenCount;
|
|
49968
49985
|
}
|
|
49969
49986
|
//#endregion
|
|
49970
|
-
export {
|
|
49987
|
+
export { warnOnConflictingFlags as $, RULESYNC_RELATIVE_DIR_PATH as $t, RulesyncMcp as A, MAX_FILE_SIZE as At, stringifyFrontmatter as B, RULESYNC_HOOKS_LEGACY_FILE_NAME as Bt, RulesyncSubagent as C, runWithDirectoryRollback as Ct, RulesyncRule as D, ALL_TOOL_TARGETS_WITH_WILDCARD as Dt, RulesyncSkillFrontmatterSchema as E, ALL_TOOL_TARGETS as Et, parseJsonc as F, RULESYNC_CONFIG_RELATIVE_FILE_PATH as Ft, CONFLICTING_TARGET_PAIRS as G, RULESYNC_MCP_LEGACY_FILE_NAME as Gt, SHARED_USER_MANAGED_CONFIG_PATHS as H, RULESYNC_IGNORE_RELATIVE_FILE_PATH as Ht, RulesyncCommand as I, RULESYNC_CONFIG_SCHEMA_URL as It, SourceEntrySchema as J, RULESYNC_NPM_SOURCES_LOCK_RELATIVE_FILE_PATH as Jt, ConfigFileSchema as K, RULESYNC_MCP_RELATIVE_FILE_PATH as Kt, RulesyncCommandFrontmatterSchema as L, RULESYNC_CURATED_RULES_RELATIVE_DIR_PATH as Lt, RulesyncHooks as M, RULESYNC_AIIGNORE_RELATIVE_FILE_PATH as Mt, getRulesyncSourceCandidates as N, RULESYNC_CHECKS_RELATIVE_DIR_PATH as Nt, RulesyncRuleFrontmatterSchema as O, PACKAGING_TOOL_TARGETS as Ot, resolveRulesyncSourceWritePath as P, RULESYNC_COMMANDS_RELATIVE_DIR_PATH as Pt, fallbackLogger as Q, RULESYNC_PERMISSIONS_SCHEMA_URL as Qt, RulesyncCheck as R, RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH as Rt, getLocalSkillDirNames as S, resolvePath as St, RulesyncSkill as T, writeFileContent as Tt, SKILL_FILE_NAME as U, RULESYNC_LOCAL_CONFIG_RELATIVE_FILE_PATH as Ut, loadYaml as V, RULESYNC_HOOKS_RELATIVE_FILE_PATH as Vt, ConfigResolver as W, RULESYNC_MCP_FILE_NAME as Wt, ConsoleLogger as X, RULESYNC_PERMISSIONS_LEGACY_FILE_NAME as Xt, findControlCharacter as Y, RULESYNC_PERMISSIONS_FILE_NAME as Yt, JsonLogger as Z, RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH as Zt, CLAUDECODE_SETTINGS_LOCAL_FILE_NAME as _, removeDirectory as _t, convertFromTool as a, ALL_FEATURES_WITH_WILDCARD as an, checkPathTraversal as at, CODEXCLI_BASH_RULES_FILE_NAME as b, removeFileStrict as bt, SubagentsProcessor as c, ensureDir as ct, IgnoreProcessor as d, getFileSize as dt, RULESYNC_RULES_RELATIVE_DIR_PATH as en, CLIError as et, HooksProcessor as f, getHomeDirectory as ft, CLAUDECODE_MEMORIES_DIR_NAME as g, readFileContentOrNull as gt, CLAUDECODE_LOCAL_RULE_FILE_NAME as h, readFileContent as ht, getProcessorRegistryEntry as i, ALL_FEATURES as in, assertWritablePathInsideRoot as it, RulesyncIgnore as j, RULESYNC_AIIGNORE_FILE_NAME as jt, RulesyncPermissions as k, ToolTargetSchema as kt, SkillsProcessor as l, fileExists as lt, CLAUDECODE_DIR as m, listDirectoryFiles as mt, checkRulesyncDirExists as n, RULESYNC_SOURCES_LOCK_RELATIVE_FILE_PATH as nn, assertDirectoryIfExists as nt, isPackagingToolTarget as o, DEPRECATED_FEATURE_REPLACEMENTS as on, createTempDirectory as ot, CommandsProcessor as p, isSymlink as pt, GITIGNORE_DESTINATION_KEY as q, RULESYNC_MCP_SCHEMA_URL as qt, generate as r, RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH as rn, assertTreeContainsNoSymlinks as rt, RulesProcessor as s, formatError as sn, directoryExists as st, importFromTool as t, RULESYNC_SKILLS_RELATIVE_DIR_PATH as tn, ErrorCodes as tt, McpProcessor as u, findFilesByGlobs as ut, CLAUDECODE_SKILLS_DIR_PATH as v, removeDirectoryStrict as vt, RulesyncSubagentFrontmatterSchema as w, toPosixPath as wt, CODEXCLI_DIR as x, removeTempDirectory as xt, ChecksProcessor as y, removeFile as yt, RulesyncCheckFrontmatterSchema as z, RULESYNC_HOOKS_FILE_NAME as zt };
|
|
49971
49988
|
|
|
49972
|
-
//# sourceMappingURL=import-
|
|
49989
|
+
//# sourceMappingURL=import-Bj5HxY9p.js.map
|