@danieldeusing/seedr 0.1.113 → 0.1.114
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.js +37 -16
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -148,7 +148,7 @@ function isTelemetryDisabled(env = process.env) {
|
|
|
148
148
|
return env[TELEMETRY_OPT_OUT_VARIABLE] !== void 0;
|
|
149
149
|
}
|
|
150
150
|
function cliVersion() {
|
|
151
|
-
return true ? "0.1.
|
|
151
|
+
return true ? "0.1.114" : "dev";
|
|
152
152
|
}
|
|
153
153
|
async function sendEvent(event) {
|
|
154
154
|
try {
|
|
@@ -1226,7 +1226,7 @@ import ora6 from "ora";
|
|
|
1226
1226
|
|
|
1227
1227
|
// src/handlers/pluginStores.ts
|
|
1228
1228
|
import { homedir as homedir4 } from "os";
|
|
1229
|
-
import { basename as basename2, isAbsolute, join as join4 } from "path";
|
|
1229
|
+
import { basename as basename2, dirname as dirname3, isAbsolute, join as join4 } from "path";
|
|
1230
1230
|
import { mkdir as mkdir2, readFile as readFile3, writeFile } from "fs/promises";
|
|
1231
1231
|
import { execFile } from "child_process";
|
|
1232
1232
|
import { promisify } from "util";
|
|
@@ -1255,14 +1255,14 @@ function manifestsFor(ownManifest) {
|
|
|
1255
1255
|
return ownManifest ? [ownManifest, CLAUDE_MANIFEST] : [CLAUDE_MANIFEST];
|
|
1256
1256
|
}
|
|
1257
1257
|
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1258
|
+
var CLAUDE_SELF_MARKETPLACE = join4(".claude-plugin", "marketplace.json");
|
|
1259
|
+
var COPILOT_SELF_MARKETPLACE = join4(".github", "plugin", "marketplace.json");
|
|
1260
|
+
async function alignSelfMarketplace(path, marketplace, name, item) {
|
|
1261
1261
|
const existing = await exists(path) ? await readJson(path) : {};
|
|
1262
1262
|
const plugins = Array.isArray(existing.plugins) ? existing.plugins : [];
|
|
1263
1263
|
const listed = plugins.some((entry) => isRecord(entry) && entry.name === name);
|
|
1264
1264
|
const description = item.description ? { description: item.description } : {};
|
|
1265
|
-
await mkdir2(
|
|
1265
|
+
await mkdir2(dirname3(path), { recursive: true });
|
|
1266
1266
|
await writeJson(path, {
|
|
1267
1267
|
...existing,
|
|
1268
1268
|
name: marketplace,
|
|
@@ -1271,6 +1271,13 @@ async function ensureSelfMarketplace(contentPath, marketplace, name, item) {
|
|
|
1271
1271
|
plugins: listed ? plugins : [...plugins, { name, source: "./", ...description }]
|
|
1272
1272
|
});
|
|
1273
1273
|
}
|
|
1274
|
+
async function ensureSelfMarketplace(contentPath, marketplace, name, item, alsoAlign = []) {
|
|
1275
|
+
await alignSelfMarketplace(join4(contentPath, CLAUDE_SELF_MARKETPLACE), marketplace, name, item);
|
|
1276
|
+
for (const relative4 of alsoAlign) {
|
|
1277
|
+
const path = join4(contentPath, relative4);
|
|
1278
|
+
if (await exists(path)) await alignSelfMarketplace(path, marketplace, name, item);
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1274
1281
|
var CLAUDE_PLUGINS_DIR = join4(claudeUserRoot(), "plugins");
|
|
1275
1282
|
var CLAUDE_CACHE_DIR = join4(CLAUDE_PLUGINS_DIR, "cache");
|
|
1276
1283
|
var CLAUDE_INSTALLED_PATH = join4(CLAUDE_PLUGINS_DIR, "installed_plugins.json");
|
|
@@ -1447,18 +1454,32 @@ var copilotStore = {
|
|
|
1447
1454
|
firstParty: true,
|
|
1448
1455
|
cacheRoot: COPILOT_PLUGINS_DIR,
|
|
1449
1456
|
cachePath: (marketplace, name) => resolveContained(COPILOT_PLUGINS_DIR, marketplace, name),
|
|
1457
|
+
/**
|
|
1458
|
+
* Every plugin's installed tree becomes its own marketplace here, not just a
|
|
1459
|
+
* first-party one — see `ensureMarketplace` for why. Copilot's own manifest
|
|
1460
|
+
* wins over the Claude one where a tree ships both, so both are aligned.
|
|
1461
|
+
*/
|
|
1450
1462
|
async prepareTree(contentPath, { name, marketplace, item }) {
|
|
1451
|
-
|
|
1463
|
+
await ensureSelfMarketplace(contentPath, marketplace, name, item, [COPILOT_SELF_MARKETPLACE]);
|
|
1452
1464
|
},
|
|
1453
1465
|
/**
|
|
1454
|
-
*
|
|
1455
|
-
*
|
|
1456
|
-
*
|
|
1457
|
-
*
|
|
1466
|
+
* The installed tree is the marketplace, recorded the way `copilot plugin
|
|
1467
|
+
* marketplace add <dir>` records one: a `directory` source. Direct installs
|
|
1468
|
+
* from a path exist too, but Copilot 1.0.80 announces them as deprecated in
|
|
1469
|
+
* favour of `plugin@marketplace`, which this is.
|
|
1470
|
+
*
|
|
1471
|
+
* This is not only the first-party path. Pointing Copilot at the upstream
|
|
1472
|
+
* repository instead leaves the plugin uninstalled and says nothing: Copilot
|
|
1473
|
+
* fetches that marketplace and validates it whole, and Anthropic's
|
|
1474
|
+
* marketplaces — which every mirrored item names — fail that validation
|
|
1475
|
+
* outright (object-form `source` values, descriptions past 1024 characters),
|
|
1476
|
+
* so no plugin from them can be installed. The tree seedr has already
|
|
1477
|
+
* downloaded and digest-verified is a marketplace of exactly one plugin at
|
|
1478
|
+
* the pinned revision, which sidesteps the upstream file and is the only
|
|
1479
|
+
* shape that carries the pin into Copilot at all.
|
|
1458
1480
|
*/
|
|
1459
1481
|
async ensureMarketplace(marketplace, item, cachePath) {
|
|
1460
|
-
if (
|
|
1461
|
-
if (!cachePath) return [];
|
|
1482
|
+
if (cachePath) {
|
|
1462
1483
|
return [
|
|
1463
1484
|
{
|
|
1464
1485
|
path: COPILOT_SETTINGS_PATH,
|
|
@@ -2029,7 +2050,7 @@ var pluginHandler = {
|
|
|
2029
2050
|
};
|
|
2030
2051
|
|
|
2031
2052
|
// src/handlers/rule.ts
|
|
2032
|
-
import { dirname as
|
|
2053
|
+
import { dirname as dirname4 } from "path";
|
|
2033
2054
|
import { readdir as readdir3, readFile as readFile4, writeFile as writeFile2, mkdir as mkdir4 } from "fs/promises";
|
|
2034
2055
|
import chalk8 from "chalk";
|
|
2035
2056
|
import ora7 from "ora";
|
|
@@ -2146,7 +2167,7 @@ async function installRuleForAgent(item, agent, scope, force, cwd, content) {
|
|
|
2146
2167
|
try {
|
|
2147
2168
|
const target = ruleTargetFor(agent);
|
|
2148
2169
|
const destination = await destinationFor(target, item.slug, scope, cwd);
|
|
2149
|
-
await mkdir4(
|
|
2170
|
+
await mkdir4(dirname4(destination), { recursive: true });
|
|
2150
2171
|
if (target.kind === "file") {
|
|
2151
2172
|
await assertOverwritable(destination, force);
|
|
2152
2173
|
await writeFile2(
|
|
@@ -2873,7 +2894,7 @@ var initCommand = new Command4("init").description("Initialize coding agent conf
|
|
|
2873
2894
|
// package.json
|
|
2874
2895
|
var package_default = {
|
|
2875
2896
|
name: "@danieldeusing/seedr",
|
|
2876
|
-
version: "0.1.
|
|
2897
|
+
version: "0.1.114",
|
|
2877
2898
|
description: "Seed your projects with AI configurations",
|
|
2878
2899
|
type: "module",
|
|
2879
2900
|
bin: {
|