@danieldeusing/seedr 0.1.88 → 0.1.90
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/{chunk-WJEBBHTL.js → chunk-JTCNXHYF.js} +22 -3
- package/dist/cli.js +16 -9
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -34,6 +34,25 @@ function canonicalAgents(values) {
|
|
|
34
34
|
return CANONICAL_AGENTS.filter((a) => present.has(a));
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
// ../registry-ops/src/sourceTypes.ts
|
|
38
|
+
var CANONICAL_SOURCE_TYPES = ["official", "seedr", "community"];
|
|
39
|
+
var SOURCE_TYPE_ALIASES = { toolr: "seedr" };
|
|
40
|
+
var KNOWN_SOURCE_TYPES = [...CANONICAL_SOURCE_TYPES, ...Object.keys(SOURCE_TYPE_ALIASES)];
|
|
41
|
+
function isCanonicalSourceType(value) {
|
|
42
|
+
return typeof value === "string" && CANONICAL_SOURCE_TYPES.includes(value);
|
|
43
|
+
}
|
|
44
|
+
function isLegacySourceType(value) {
|
|
45
|
+
return typeof value === "string" && Object.hasOwn(SOURCE_TYPE_ALIASES, value);
|
|
46
|
+
}
|
|
47
|
+
function canonicalSourceType(value) {
|
|
48
|
+
if (isCanonicalSourceType(value)) return value;
|
|
49
|
+
if (isLegacySourceType(value)) return SOURCE_TYPE_ALIASES[value];
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
function isFirstParty(sourceType) {
|
|
53
|
+
return canonicalSourceType(sourceType) === "seedr";
|
|
54
|
+
}
|
|
55
|
+
|
|
37
56
|
// src/utils/slug.ts
|
|
38
57
|
var SLUG_PATTERN2 = /^[a-z0-9][a-z0-9-]*$/;
|
|
39
58
|
var MAX_SLUG_LENGTH2 = 100;
|
|
@@ -520,7 +539,7 @@ async function getItemFull(item) {
|
|
|
520
539
|
return JSON.parse(content);
|
|
521
540
|
}
|
|
522
541
|
function getItemBaseUrl(item) {
|
|
523
|
-
if (item.sourceType
|
|
542
|
+
if (isFirstParty(item.sourceType)) {
|
|
524
543
|
assertValidSlug(item.slug);
|
|
525
544
|
const typeDir = typeDirName(item.type);
|
|
526
545
|
return {
|
|
@@ -567,7 +586,7 @@ async function fetchItemFile(item, relativePath) {
|
|
|
567
586
|
return fetchRemote(`${remote}/${relativePath}`);
|
|
568
587
|
}
|
|
569
588
|
function getItemSourcePath(item) {
|
|
570
|
-
if (item.sourceType
|
|
589
|
+
if (!isFirstParty(item.sourceType)) {
|
|
571
590
|
return null;
|
|
572
591
|
}
|
|
573
592
|
if (!REGISTRY_PATH) {
|
|
@@ -628,7 +647,7 @@ async function downloadFileSet(location, fileSet, stagingDir) {
|
|
|
628
647
|
async function fetchItemToDestination(item, destPath) {
|
|
629
648
|
const location = getItemBaseUrl(item);
|
|
630
649
|
const fileSet = await resolveFileSet(item);
|
|
631
|
-
if (fileSet.digest === null && item.sourceType
|
|
650
|
+
if (fileSet.digest === null && !isFirstParty(item.sourceType)) {
|
|
632
651
|
throw integrityError(item, "the registry entry carries no contentDigest; refusing to install unverifiable content");
|
|
633
652
|
}
|
|
634
653
|
await mkdir2(dirname2(destPath), { recursive: true });
|
package/dist/cli.js
CHANGED
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
warn,
|
|
57
57
|
writeFileAtomic,
|
|
58
58
|
writeTextFile
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-JTCNXHYF.js";
|
|
60
60
|
|
|
61
61
|
// src/cli.ts
|
|
62
62
|
import { Command as Command5 } from "commander";
|
|
@@ -143,7 +143,7 @@ function isTelemetryDisabled(env = process.env) {
|
|
|
143
143
|
return env[TELEMETRY_OPT_OUT_VARIABLE] !== void 0;
|
|
144
144
|
}
|
|
145
145
|
function cliVersion() {
|
|
146
|
-
return true ? "0.1.
|
|
146
|
+
return true ? "0.1.90" : "dev";
|
|
147
147
|
}
|
|
148
148
|
async function sendEvent(event) {
|
|
149
149
|
try {
|
|
@@ -1807,8 +1807,7 @@ async function runList(options, cwd = process.cwd()) {
|
|
|
1807
1807
|
}
|
|
1808
1808
|
const type = options.type;
|
|
1809
1809
|
if (!options.installed) {
|
|
1810
|
-
|
|
1811
|
-
return 0;
|
|
1810
|
+
return listAvailable(type, options.label);
|
|
1812
1811
|
}
|
|
1813
1812
|
const agents = resolveListAgents(options.agents);
|
|
1814
1813
|
if (typeof agents === "string") {
|
|
@@ -1819,7 +1818,7 @@ async function runList(options, cwd = process.cwd()) {
|
|
|
1819
1818
|
await listInstalled({ types: type ? [type] : void 0, agents, scope, cwd });
|
|
1820
1819
|
return 0;
|
|
1821
1820
|
}
|
|
1822
|
-
var listCommand = new Command2("list").alias("ls").description("List available or installed items").option("-t, --type <type>", "Filter by type (skill, hook, agent, plugin, mcp, settings)").option("-i, --installed", "Show only installed items").option("-a, --agents <agents>", "Comma-separated coding agents or 'all' (installed check)", "all").option("--scope <scope>", "Scope for installed check (project, user, local)", "project").action(async (options) => {
|
|
1821
|
+
var listCommand = new Command2("list").alias("ls").description("List available or installed items").option("-t, --type <type>", "Filter by type (skill, hook, agent, plugin, mcp, settings)").option("-i, --installed", "Show only installed items").option("-a, --agents <agents>", "Comma-separated coding agents or 'all' (installed check)", "all").option("--scope <scope>", "Scope for installed check (project, user, local)", "project").option("--label <label>", "Filter by label (see the registry's labels.json)").action(async (options) => {
|
|
1823
1822
|
try {
|
|
1824
1823
|
const exitCode = await runList(options);
|
|
1825
1824
|
if (exitCode !== 0) process.exit(exitCode);
|
|
@@ -1827,11 +1826,18 @@ var listCommand = new Command2("list").alias("ls").description("List available o
|
|
|
1827
1826
|
handleCommandError(error2);
|
|
1828
1827
|
}
|
|
1829
1828
|
});
|
|
1830
|
-
async function listAvailable(type) {
|
|
1831
|
-
const
|
|
1829
|
+
async function listAvailable(type, label) {
|
|
1830
|
+
const all = await listItems(type);
|
|
1831
|
+
const items = label ? all.filter((item) => item.label === label) : all;
|
|
1832
|
+
if (items.length === 0 && label) {
|
|
1833
|
+
const known = [...new Set(all.map((item) => item.label).filter(Boolean))].sort();
|
|
1834
|
+
console.log(chalk8.red(`No item carries the label "${label}".`));
|
|
1835
|
+
if (known.length > 0) console.log(chalk8.gray(`Labels in use: ${known.join(", ")}`));
|
|
1836
|
+
return 1;
|
|
1837
|
+
}
|
|
1832
1838
|
if (items.length === 0) {
|
|
1833
1839
|
console.log(chalk8.yellow("No items found in registry"));
|
|
1834
|
-
return;
|
|
1840
|
+
return 0;
|
|
1835
1841
|
}
|
|
1836
1842
|
const grouped = groupByType(items);
|
|
1837
1843
|
for (const [itemType, typeItems] of Object.entries(grouped)) {
|
|
@@ -1852,6 +1858,7 @@ ${itemType.toUpperCase()}S`));
|
|
|
1852
1858
|
console.log(
|
|
1853
1859
|
chalk8.gray(`Total: ${items.length} items. Use 'npx @danieldeusing/seedr add <name>' to install.`)
|
|
1854
1860
|
);
|
|
1861
|
+
return 0;
|
|
1855
1862
|
}
|
|
1856
1863
|
async function listInstalled(params) {
|
|
1857
1864
|
console.log(brand(`
|
|
@@ -2096,7 +2103,7 @@ var initCommand = new Command4("init").description("Initialize coding agent conf
|
|
|
2096
2103
|
// package.json
|
|
2097
2104
|
var package_default = {
|
|
2098
2105
|
name: "@danieldeusing/seedr",
|
|
2099
|
-
version: "0.1.
|
|
2106
|
+
version: "0.1.90",
|
|
2100
2107
|
description: "Seed your projects with AI configurations",
|
|
2101
2108
|
type: "module",
|
|
2102
2109
|
bin: {
|
package/dist/index.js
CHANGED