rulesync 9.2.0 → 9.4.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 +5 -62
- package/dist/cli/index.js +3 -60
- package/dist/cli/index.js.map +1 -1
- package/dist/{import-BkxwFCDM.js → import-BxqZVTKb.js} +1799 -509
- package/dist/import-BxqZVTKb.js.map +1 -0
- package/dist/{import-H0MKtu9x.cjs → import-DVGMvuhx.cjs} +1813 -619
- 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-BkxwFCDM.js.map +0 -1
package/dist/cli/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const require_import = require("../import-
|
|
2
|
+
const require_import = require("../import-DVGMvuhx.cjs");
|
|
3
3
|
let commander = require("commander");
|
|
4
4
|
let zod_mini = require("zod/mini");
|
|
5
5
|
let node_path = require("node:path");
|
|
@@ -1192,63 +1192,6 @@ async function generateCommand(logger, options) {
|
|
|
1192
1192
|
else logger.success(`🎉 All done! Written ${totalGenerated} file(s) total (${parts.join(" + ")})`);
|
|
1193
1193
|
}
|
|
1194
1194
|
//#endregion
|
|
1195
|
-
//#region src/types/processor-registry.ts
|
|
1196
|
-
const PROCESSOR_REGISTRY = [
|
|
1197
|
-
{
|
|
1198
|
-
feature: "rules",
|
|
1199
|
-
processor: require_import.RulesProcessor,
|
|
1200
|
-
schema: require_import.RulesProcessorToolTargetSchema,
|
|
1201
|
-
factory: require_import.toolRuleFactories
|
|
1202
|
-
},
|
|
1203
|
-
{
|
|
1204
|
-
feature: "ignore",
|
|
1205
|
-
processor: require_import.IgnoreProcessor,
|
|
1206
|
-
schema: require_import.IgnoreProcessorToolTargetSchema,
|
|
1207
|
-
factory: require_import.toolIgnoreFactories
|
|
1208
|
-
},
|
|
1209
|
-
{
|
|
1210
|
-
feature: "mcp",
|
|
1211
|
-
processor: require_import.McpProcessor,
|
|
1212
|
-
schema: require_import.McpProcessorToolTargetSchema,
|
|
1213
|
-
factory: require_import.toolMcpFactories
|
|
1214
|
-
},
|
|
1215
|
-
{
|
|
1216
|
-
feature: "commands",
|
|
1217
|
-
processor: require_import.CommandsProcessor,
|
|
1218
|
-
schema: require_import.CommandsProcessorToolTargetSchema,
|
|
1219
|
-
factory: require_import.toolCommandFactories
|
|
1220
|
-
},
|
|
1221
|
-
{
|
|
1222
|
-
feature: "subagents",
|
|
1223
|
-
processor: require_import.SubagentsProcessor,
|
|
1224
|
-
schema: require_import.SubagentsProcessorToolTargetSchema,
|
|
1225
|
-
factory: require_import.toolSubagentFactories
|
|
1226
|
-
},
|
|
1227
|
-
{
|
|
1228
|
-
feature: "skills",
|
|
1229
|
-
processor: require_import.SkillsProcessor,
|
|
1230
|
-
schema: require_import.SkillsProcessorToolTargetSchema,
|
|
1231
|
-
factory: require_import.toolSkillFactories
|
|
1232
|
-
},
|
|
1233
|
-
{
|
|
1234
|
-
feature: "hooks",
|
|
1235
|
-
processor: require_import.HooksProcessor,
|
|
1236
|
-
schema: require_import.HooksProcessorToolTargetSchema,
|
|
1237
|
-
factory: require_import.toolHooksFactories
|
|
1238
|
-
},
|
|
1239
|
-
{
|
|
1240
|
-
feature: "permissions",
|
|
1241
|
-
processor: require_import.PermissionsProcessor,
|
|
1242
|
-
schema: require_import.PermissionsProcessorToolTargetSchema,
|
|
1243
|
-
factory: require_import.toolPermissionsFactories
|
|
1244
|
-
}
|
|
1245
|
-
];
|
|
1246
|
-
const getProcessorRegistryEntry = (feature) => {
|
|
1247
|
-
const entry = PROCESSOR_REGISTRY.find((e) => e.feature === feature);
|
|
1248
|
-
if (!entry) throw new Error(`No processor registered for feature: ${feature}`);
|
|
1249
|
-
return entry;
|
|
1250
|
-
};
|
|
1251
|
-
//#endregion
|
|
1252
1195
|
//#region src/cli/commands/gitignore-derive.ts
|
|
1253
1196
|
const TARGETS_NOT_DERIVED = /* @__PURE__ */ new Set([
|
|
1254
1197
|
"agentsskills",
|
|
@@ -1312,7 +1255,7 @@ const deriveFileEntries = (factories, feature) => {
|
|
|
1312
1255
|
};
|
|
1313
1256
|
const deriveRulesEntries = () => {
|
|
1314
1257
|
const entries = [];
|
|
1315
|
-
const factories = getProcessorRegistryEntry("rules").factory;
|
|
1258
|
+
const factories = require_import.getProcessorRegistryEntry("rules").factory;
|
|
1316
1259
|
for (const [target, factory] of factories) {
|
|
1317
1260
|
if (TARGETS_NOT_DERIVED.has(target)) continue;
|
|
1318
1261
|
const paths = getProjectPaths(factory);
|
|
@@ -1335,7 +1278,7 @@ const FILE_FEATURES = /* @__PURE__ */ new Set([
|
|
|
1335
1278
|
]);
|
|
1336
1279
|
const deriveFeatureGitignoreEntries = (feature) => {
|
|
1337
1280
|
if (feature === "rules") return deriveRulesEntries();
|
|
1338
|
-
const factory = getProcessorRegistryEntry(feature).factory;
|
|
1281
|
+
const factory = require_import.getProcessorRegistryEntry(feature).factory;
|
|
1339
1282
|
if (DIR_FEATURES.has(feature)) return deriveDirEntries(factory, feature);
|
|
1340
1283
|
if (FILE_FEATURES.has(feature)) return deriveFileEntries(factory, feature);
|
|
1341
1284
|
return [];
|
|
@@ -1451,7 +1394,7 @@ const GITIGNORE_ENTRY_REGISTRY = [
|
|
|
1451
1394
|
{
|
|
1452
1395
|
target: "devin",
|
|
1453
1396
|
feature: "skills",
|
|
1454
|
-
entry: "**/.
|
|
1397
|
+
entry: "**/.config/devin/skills/"
|
|
1455
1398
|
},
|
|
1456
1399
|
{
|
|
1457
1400
|
target: "copilotcli",
|
|
@@ -6485,7 +6428,7 @@ function wrapCommand$1({ name, errorCode, handler, getVersion, loggerFactory = c
|
|
|
6485
6428
|
}
|
|
6486
6429
|
//#endregion
|
|
6487
6430
|
//#region src/cli/index.ts
|
|
6488
|
-
const getVersion = () => "9.
|
|
6431
|
+
const getVersion = () => "9.4.0";
|
|
6489
6432
|
function wrapCommand(name, errorCode, handler) {
|
|
6490
6433
|
return wrapCommand$1({
|
|
6491
6434
|
name,
|
package/dist/cli/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as toPosixPath, A as RulesyncCommand, B as createTempDirectory, C as RulesyncHooks, Ct as RULESYNC_SKILLS_RELATIVE_DIR_PATH, D as CLAUDECODE_MEMORIES_DIR_NAME, Dt as ALL_FEATURES, E as CLAUDECODE_LOCAL_RULE_FILE_NAME, Et as formatError, F as ConsoleLogger, G as getFileSize, H as ensureDir, I as JsonLogger, J as listDirectoryFiles, K as getHomeDirectory, L as CLIError, M as stringifyFrontmatter, N as ConfigResolver, O as CLAUDECODE_SETTINGS_LOCAL_FILE_NAME, Ot as ALL_FEATURES_WITH_WILDCARD, P as findControlCharacter, Q as removeTempDirectory, R as ErrorCodes, S as HooksProcessor, St as RULESYNC_RULES_RELATIVE_DIR_PATH, T as CLAUDECODE_DIR, Tt as RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, U as fileExists, V as directoryExists, W as findFilesByGlobs, X as removeDirectory, Y as readFileContent, Z as removeFile, _ as RulesyncPermissions, _t as RULESYNC_MCP_SCHEMA_URL, a as convertFromTool, at as RULESYNC_AIIGNORE_FILE_NAME, b as IgnoreProcessor, bt as RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH, c as RulesyncRuleFrontmatterSchema, ct as RULESYNC_CONFIG_RELATIVE_FILE_PATH, d as RulesyncSubagentFrontmatterSchema, dt as RULESYNC_HOOKS_FILE_NAME, et as writeFileContent, f as SkillsProcessor, ft as RULESYNC_HOOKS_RELATIVE_FILE_PATH, g as SKILL_FILE_NAME$1, gt as RULESYNC_MCP_RELATIVE_FILE_PATH, h as RulesyncSkillFrontmatterSchema, ht as RULESYNC_MCP_FILE_NAME, i as getProcessorRegistryEntry, it as MAX_FILE_SIZE, j as RulesyncCommandFrontmatterSchema, k as CLAUDECODE_SKILLS_DIR_PATH, l as SubagentsProcessor, lt as RULESYNC_CONFIG_SCHEMA_URL, m as RulesyncSkill, mt as RULESYNC_LOCAL_CONFIG_RELATIVE_FILE_PATH, n as checkRulesyncDirExists, nt as ALL_TOOL_TARGETS_WITH_WILDCARD, o as RulesProcessor, ot as RULESYNC_AIIGNORE_RELATIVE_FILE_PATH, p as getLocalSkillDirNames, pt as RULESYNC_IGNORE_RELATIVE_FILE_PATH, q as isSymlink, r as generate, rt as ToolTargetSchema, s as RulesyncRule, st as RULESYNC_COMMANDS_RELATIVE_DIR_PATH, t as importFromTool, tt as ALL_TOOL_TARGETS, u as RulesyncSubagent, ut as RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH, v as McpProcessor, vt as RULESYNC_OVERVIEW_FILE_NAME, w as CommandsProcessor, wt as RULESYNC_SOURCES_LOCK_RELATIVE_FILE_PATH, x as RulesyncIgnore, xt as RULESYNC_RELATIVE_DIR_PATH, y as RulesyncMcp, yt as RULESYNC_PERMISSIONS_FILE_NAME, z as checkPathTraversal } from "../import-BxqZVTKb.js";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
import { nonnegative, optional, refine, z } from "zod/mini";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
@@ -1190,63 +1190,6 @@ async function generateCommand(logger, options) {
|
|
|
1190
1190
|
else logger.success(`🎉 All done! Written ${totalGenerated} file(s) total (${parts.join(" + ")})`);
|
|
1191
1191
|
}
|
|
1192
1192
|
//#endregion
|
|
1193
|
-
//#region src/types/processor-registry.ts
|
|
1194
|
-
const PROCESSOR_REGISTRY = [
|
|
1195
|
-
{
|
|
1196
|
-
feature: "rules",
|
|
1197
|
-
processor: RulesProcessor,
|
|
1198
|
-
schema: RulesProcessorToolTargetSchema,
|
|
1199
|
-
factory: toolRuleFactories
|
|
1200
|
-
},
|
|
1201
|
-
{
|
|
1202
|
-
feature: "ignore",
|
|
1203
|
-
processor: IgnoreProcessor,
|
|
1204
|
-
schema: IgnoreProcessorToolTargetSchema,
|
|
1205
|
-
factory: toolIgnoreFactories
|
|
1206
|
-
},
|
|
1207
|
-
{
|
|
1208
|
-
feature: "mcp",
|
|
1209
|
-
processor: McpProcessor,
|
|
1210
|
-
schema: McpProcessorToolTargetSchema,
|
|
1211
|
-
factory: toolMcpFactories
|
|
1212
|
-
},
|
|
1213
|
-
{
|
|
1214
|
-
feature: "commands",
|
|
1215
|
-
processor: CommandsProcessor,
|
|
1216
|
-
schema: CommandsProcessorToolTargetSchema,
|
|
1217
|
-
factory: toolCommandFactories
|
|
1218
|
-
},
|
|
1219
|
-
{
|
|
1220
|
-
feature: "subagents",
|
|
1221
|
-
processor: SubagentsProcessor,
|
|
1222
|
-
schema: SubagentsProcessorToolTargetSchema,
|
|
1223
|
-
factory: toolSubagentFactories
|
|
1224
|
-
},
|
|
1225
|
-
{
|
|
1226
|
-
feature: "skills",
|
|
1227
|
-
processor: SkillsProcessor,
|
|
1228
|
-
schema: SkillsProcessorToolTargetSchema,
|
|
1229
|
-
factory: toolSkillFactories
|
|
1230
|
-
},
|
|
1231
|
-
{
|
|
1232
|
-
feature: "hooks",
|
|
1233
|
-
processor: HooksProcessor,
|
|
1234
|
-
schema: HooksProcessorToolTargetSchema,
|
|
1235
|
-
factory: toolHooksFactories
|
|
1236
|
-
},
|
|
1237
|
-
{
|
|
1238
|
-
feature: "permissions",
|
|
1239
|
-
processor: PermissionsProcessor,
|
|
1240
|
-
schema: PermissionsProcessorToolTargetSchema,
|
|
1241
|
-
factory: toolPermissionsFactories
|
|
1242
|
-
}
|
|
1243
|
-
];
|
|
1244
|
-
const getProcessorRegistryEntry = (feature) => {
|
|
1245
|
-
const entry = PROCESSOR_REGISTRY.find((e) => e.feature === feature);
|
|
1246
|
-
if (!entry) throw new Error(`No processor registered for feature: ${feature}`);
|
|
1247
|
-
return entry;
|
|
1248
|
-
};
|
|
1249
|
-
//#endregion
|
|
1250
1193
|
//#region src/cli/commands/gitignore-derive.ts
|
|
1251
1194
|
const TARGETS_NOT_DERIVED = /* @__PURE__ */ new Set([
|
|
1252
1195
|
"agentsskills",
|
|
@@ -1449,7 +1392,7 @@ const GITIGNORE_ENTRY_REGISTRY = [
|
|
|
1449
1392
|
{
|
|
1450
1393
|
target: "devin",
|
|
1451
1394
|
feature: "skills",
|
|
1452
|
-
entry: "**/.
|
|
1395
|
+
entry: "**/.config/devin/skills/"
|
|
1453
1396
|
},
|
|
1454
1397
|
{
|
|
1455
1398
|
target: "copilotcli",
|
|
@@ -6483,7 +6426,7 @@ function wrapCommand$1({ name, errorCode, handler, getVersion, loggerFactory = c
|
|
|
6483
6426
|
}
|
|
6484
6427
|
//#endregion
|
|
6485
6428
|
//#region src/cli/index.ts
|
|
6486
|
-
const getVersion = () => "9.
|
|
6429
|
+
const getVersion = () => "9.4.0";
|
|
6487
6430
|
function wrapCommand(name, errorCode, handler) {
|
|
6488
6431
|
return wrapCommand$1({
|
|
6489
6432
|
name,
|