@r_masseater/msch 0.127.1 → 0.129.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.mjs +71 -43
- package/dist/cli.mjs.map +1 -1
- package/dist/config.d.mts +7 -3
- package/dist/config.mjs +1 -1
- package/dist/{published-DkH6B-Gr.mjs → published-BbAu-6IS.mjs} +3 -4
- package/dist/published-BbAu-6IS.mjs.map +1 -0
- package/dist/{repository-config-8JN86BZA.mjs → repository-config-BdFUhbP3.mjs} +39 -8
- package/dist/repository-config-BdFUhbP3.mjs.map +1 -0
- package/dist/workspace-settings.mjs +2 -2
- package/dist/workspace-settings.mjs.map +1 -1
- package/package.json +9 -7
- package/skills/msch-checks/SKILL.md +8 -4
- package/skills/msch-publishing/SKILL.md +8 -4
- package/skills/msch-repository-config/SKILL.md +17 -12
- package/skills/msch-workspace-settings/SKILL.md +11 -7
- package/dist/published-DkH6B-Gr.mjs.map +0 -1
- package/dist/repository-config-8JN86BZA.mjs.map +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Array as Array$1, Boolean as Boolean$1, Clock, Config as Config$1, Console, Context, Effect, Equal, FileSystem, Function, HashMap, HashSet, Match, Metric, Number as Number$1, Option, Order, Path, Predicate as Predicate$1, Record, Redacted, Result, Runtime, Schedule, Schema, SchemaTransformation, Semaphore, Stdio, Stream, String as String$1, pipe } from "effect";
|
|
2
|
+
import { Array as Array$1, Boolean as Boolean$1, Clock, Config as Config$1, Console, Context, Effect, Equal, FileSystem, Function, HashMap, HashSet, Match, Metric, Number as Number$1, Option, Order, Path, Predicate as Predicate$1, Record, Redacted, Result, Runtime, Schedule, Schema, SchemaTransformation, Semaphore, Stdio, Stream, String as String$1, Struct, pipe } from "effect";
|
|
3
3
|
import { Argument, Command, Flag } from "effect/cli";
|
|
4
4
|
import { i as nodeRepositoryFiles, n as NODE_MODULES$2, o as TOOL_NAME$1, r as RepositoryFiles, s as groupOf, t as MSCH_CACHE } from "./repository-files-C_GzAnYp.mjs";
|
|
5
5
|
import { hookFlags } from "@r_masseater/masseater-utils/hook-flags";
|
|
@@ -11,10 +11,10 @@ import { i as workspaceDependencies$1, n as installedManifest, r as readManifest
|
|
|
11
11
|
import { C as childrenOf$4, D as propertyValue, E as nestedValues, O as stringsIn, S as KeySchema, T as literalOf, a as workspaceManifest, c as TASK_NAMES, d as definesTask, f as hasCargoTask, i as workspaceProjects, l as TEST_TASK_NAMES, n as unmatchedWorkspacePatterns, p as hasVerifyTask, r as workspaceDirectories, s as RUN_TASKS, t as publishedProjects, u as VERIFY_TASK, w as keyName, x as workspaceConfigOf } from "./workspace-projects-eapoa0az.mjs";
|
|
12
12
|
import { a as parent, i as join, n as isInside, t as baseName$1 } from "./path-BhBnc3Sn.mjs";
|
|
13
13
|
import { decodePackageJson, decodeVersionedPackageJson, readPackageJson, readRawPackageJson, readVersionedPackageJson, updatePackageJson, writePackageJson } from "@r_masseater/masseater-utils/kestrion/npm";
|
|
14
|
-
import { a as workspaceConfigs, c as publicEntriesOf, d as FRONTMATTER, f as splitFrontmatter, g as deployEntries, h as bundledEntries$1, i as publishedWorkspaces, l as modDirectories, m as workspaceLinks, o as entryNameOf, r as packedWorkspaces, s as isBinEntry, u as
|
|
14
|
+
import { a as workspaceConfigs, c as publicEntriesOf, d as FRONTMATTER, f as splitFrontmatter, g as deployEntries, h as bundledEntries$1, i as publishedWorkspaces, l as modDirectories, m as workspaceLinks, o as entryNameOf, r as packedWorkspaces, s as isBinEntry, u as INDEX_SKILL, v as shadcnUiOf } from "./published-BbAu-6IS.mjs";
|
|
15
15
|
import { parse, resolveConfigFromFile } from "vite-plus";
|
|
16
16
|
import { i as USAGE_SPOOL, n as DECISION_TIMEOUT_MS, r as JAPANESE, t as DECISION_MODEL } from "./config-B3SYjao5.mjs";
|
|
17
|
-
import { _ as
|
|
17
|
+
import { _ as existsAt, a as builtTextRuleNames, b as patternOf$1, c as GIT_HOOKS, d as meteredCommand, f as MDLCT_BIN, g as fu4Of, h as SUBJECT_SCRIPT, i as TEXT_IGNORES, l as MSCH_TASK_COMMANDS, m as COMMIT_LINT, n as STAGED$1, o as secretsOf, s as CI_TASKS, t as FORMAT, u as MSCH_VERIFY_COMMANDS, v as isIgnored, y as namedWorkspaces } from "./repository-config-BdFUhbP3.mjs";
|
|
18
18
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
19
19
|
import treeSitter from "@vscode/tree-sitter-wasm";
|
|
20
20
|
import { t as startedOnce } from "./started-once-BN_hLlmU.mjs";
|
|
@@ -49,7 +49,7 @@ import { Buffer } from "node:buffer";
|
|
|
49
49
|
import { createZstdDecompress } from "node:zlib";
|
|
50
50
|
// package.json
|
|
51
51
|
var name = "@r_masseater/msch";
|
|
52
|
-
var version = "0.
|
|
52
|
+
var version = "0.129.0";
|
|
53
53
|
var homepage = "https://github.com/masseater/ecosystems/tree/main/libs/msch#readme";
|
|
54
54
|
var repository = {
|
|
55
55
|
"type": "git",
|
|
@@ -1268,11 +1268,11 @@ const scanPublishedManifests = Effect.fn("scanPublishedManifests")(function* sca
|
|
|
1268
1268
|
// src/shared/config/self.ts
|
|
1269
1269
|
const GIT_PREFIX = /^git\+/u;
|
|
1270
1270
|
const GIT_SUFFIX = /\.git$/u;
|
|
1271
|
-
const GITHUB$
|
|
1271
|
+
const GITHUB$5 = "https://github.com/";
|
|
1272
1272
|
const SELF_NAME = name;
|
|
1273
1273
|
const SELF_HOMEPAGE = homepage;
|
|
1274
1274
|
const SELF_DIRECTORY = repository.directory;
|
|
1275
|
-
const RENOVATE_PRESET = `github>${pipe(repository.url, String$1.replace(GIT_PREFIX, ""), String$1.replace(GIT_SUFFIX, ""), String$1.replace(GITHUB$
|
|
1275
|
+
const RENOVATE_PRESET = `github>${pipe(repository.url, String$1.replace(GIT_PREFIX, ""), String$1.replace(GIT_SUFFIX, ""), String$1.replace(GITHUB$5, ""))}//${SELF_DIRECTORY}/renovate`;
|
|
1276
1276
|
// src/features/check-overrides/model/removed-peers.ts
|
|
1277
1277
|
const RULE$77 = "removed-peer";
|
|
1278
1278
|
const WORKSPACE_FILE$5 = "pnpm-workspace.yaml";
|
|
@@ -14815,7 +14815,17 @@ const isSection = (value) => Predicate$1.isObject(value) && !Array$1.isArray(val
|
|
|
14815
14815
|
const sectionOf = (value) => pipe(Option.some(value), Option.filter(isSection), Option.getOrElse(() => ({})));
|
|
14816
14816
|
const listOf$2 = (value) => pipe(Option.some(value), Option.filter(isList), Option.getOrElse(() => []));
|
|
14817
14817
|
// src/app/section-weakenings.ts
|
|
14818
|
-
const
|
|
14818
|
+
const withoutOptedRules = (section, value) => {
|
|
14819
|
+
if (section !== "commitlint") return value;
|
|
14820
|
+
const commitlint = sectionOf(value);
|
|
14821
|
+
const rules = Struct.omit(sectionOf(commitlint["rules"]), [SUBJECT_SCRIPT]);
|
|
14822
|
+
if (Record.isEmptyRecord(rules)) return Struct.omit(commitlint, ["rules"]);
|
|
14823
|
+
return {
|
|
14824
|
+
...commitlint,
|
|
14825
|
+
rules
|
|
14826
|
+
};
|
|
14827
|
+
};
|
|
14828
|
+
const fixedWeakenings = (config, expected) => pipe(Record.toEntries(expected.fixed), Array$1.filter(([section, built]) => !Equal.equals(withoutOptedRules(section, config[section]), built)), Array$1.map(([section]) => ({
|
|
14819
14829
|
anchor: section,
|
|
14820
14830
|
message: `${section} differs from what repositoryConfig builds, so msch's ${section} settings do not apply. Leave the ${section} section as repositoryConfig builds it.`
|
|
14821
14831
|
})));
|
|
@@ -16040,7 +16050,7 @@ const checkSources = (root) => checkRepository(root, [passThroughWrappersIn, nam
|
|
|
16040
16050
|
const RULE$41 = "known-plugins";
|
|
16041
16051
|
const SETTINGS_FILE$3 = ".claude/settings.json";
|
|
16042
16052
|
const MARKETPLACE_FILE$2 = ".claude-plugin/marketplace.json";
|
|
16043
|
-
const GITHUB$
|
|
16053
|
+
const GITHUB$4 = "github";
|
|
16044
16054
|
const Source$1 = Schema.Struct({
|
|
16045
16055
|
source: Schema.String,
|
|
16046
16056
|
repo: Schema.optionalKey(Schema.String)
|
|
@@ -16059,7 +16069,7 @@ const MarketplaceSchema = Schema.Struct({
|
|
|
16059
16069
|
});
|
|
16060
16070
|
const decodeMarketplace = Schema.decodeUnknownOption(Schema.fromJsonString(MarketplaceSchema));
|
|
16061
16071
|
const problem$6 = problemInFile(RULE$41);
|
|
16062
|
-
const knownFrom = (repository, marketplace, settings) => pipe(Option.fromUndefinedOr(settings.extraKnownMarketplaces), Option.flatMap(Record.get(marketplace.name)), Option.exists(({ source }) => source.source === GITHUB$
|
|
16072
|
+
const knownFrom = (repository, marketplace, settings) => pipe(Option.fromUndefinedOr(settings.extraKnownMarketplaces), Option.flatMap(Record.get(marketplace.name)), Option.exists(({ source }) => source.source === GITHUB$4 && source.repo === repository));
|
|
16063
16073
|
const pluginEnabled = (settings) => (plugin) => pipe(Option.fromUndefinedOr(settings.enabledPlugins), Option.flatMap(Record.get(plugin)), Option.getOrElse(() => false));
|
|
16064
16074
|
const pluginProblems = (marketplace, file, settings) => {
|
|
16065
16075
|
const enabled = pluginEnabled(settings);
|
|
@@ -16477,10 +16487,10 @@ const checkStructure = checkSection({
|
|
|
16477
16487
|
const CONTINUATION = /\\\n/gu;
|
|
16478
16488
|
const QUOTED = /\$\{\{.*?\}\}|"(?:[^"\\]|\\.)*"|'[^']*'/gu;
|
|
16479
16489
|
const SEPARATOR$11 = /&&|\|\||[;|\n`]|\$\(/u;
|
|
16480
|
-
const BLANK
|
|
16490
|
+
const BLANK = /\s+/u;
|
|
16481
16491
|
const ASSIGNMENT = /^[A-Za-z_][A-Za-z0-9_]*=/u;
|
|
16482
16492
|
const QUOTE = "\"\"";
|
|
16483
|
-
const wordsOf = (segment) => pipe(String$1.split(String$1.trim(segment), BLANK
|
|
16493
|
+
const wordsOf = (segment) => pipe(String$1.split(String$1.trim(segment), BLANK), Array$1.filter(String$1.isNonEmpty), Array$1.dropWhile((word) => ASSIGNMENT.test(word)));
|
|
16484
16494
|
const simpleCommands = (text) => pipe(text, String$1.replaceAll(CONTINUATION, " "), String$1.replaceAll(QUOTED, QUOTE), String$1.split(SEPARATOR$11), Array$1.map(wordsOf), Array$1.filter(Array$1.isReadonlyArrayNonEmpty));
|
|
16485
16495
|
// src/features/check-vite-plus/model/command-problems.ts
|
|
16486
16496
|
const PACKAGE_MANAGERS = [
|
|
@@ -16495,7 +16505,7 @@ const PACKAGE_MANAGERS = [
|
|
|
16495
16505
|
const VITE_PLUS$1 = "vp";
|
|
16496
16506
|
const RUN = "run";
|
|
16497
16507
|
const GIT = "git";
|
|
16498
|
-
const GITHUB$
|
|
16508
|
+
const GITHUB$3 = "gh";
|
|
16499
16509
|
const MERGE = "merge";
|
|
16500
16510
|
const SKIP_HOOKS = "--no-verify";
|
|
16501
16511
|
const BYPASS_RULESET = "--admin";
|
|
@@ -16515,7 +16525,7 @@ const RULES = [
|
|
|
16515
16525
|
},
|
|
16516
16526
|
{
|
|
16517
16527
|
rule: "skipped-gate",
|
|
16518
|
-
applies: (_source, words) => programOf(words) === GIT && Array$1.contains(words, SKIP_HOOKS) || programOf(words) === GITHUB$
|
|
16528
|
+
applies: (_source, words) => programOf(words) === GIT && Array$1.contains(words, SKIP_HOOKS) || programOf(words) === GITHUB$3 && Array$1.contains(words, MERGE) && Array$1.contains(words, BYPASS_RULESET),
|
|
16519
16529
|
message: (command) => `\`${command}\` skips a gate: ${SKIP_HOOKS} skips the hooks that run verify, and ${BYPASS_RULESET} bypasses the ruleset. Remove the flag and fix what the gate reports.`
|
|
16520
16530
|
},
|
|
16521
16531
|
{
|
|
@@ -17378,13 +17388,13 @@ const checkSkillEntry = Effect.fn("checkSkillEntry")(function* checkSkillEntry(r
|
|
|
17378
17388
|
// src/features/check-skills/model/published-skills.ts
|
|
17379
17389
|
const RULE$29 = "published-skills";
|
|
17380
17390
|
const KEYWORD = "tanstack-intent";
|
|
17381
|
-
const SKILLS = "skills";
|
|
17391
|
+
const SKILLS$1 = "skills";
|
|
17382
17392
|
const SKILL_FILE$3 = "SKILL.md";
|
|
17383
17393
|
const SUCCEEDED = 0;
|
|
17384
17394
|
const INTENT_CLI = fileURLToPath(new URL("./cli.mjs", import.meta.resolve("@tanstack/intent")));
|
|
17385
17395
|
const problemAt$2 = problemInFile(RULE$29);
|
|
17386
|
-
const skillDirectoriesIn = (files, directory) => pipe(findSkillFiles(files.join(directory, SKILLS)), Array$1.filter((file) => files.basename(file) === SKILL_FILE$3), Array$1.map((file) => files.relative(directory, files.dirname(file))));
|
|
17387
|
-
const isShipped = (listed) => (skill) => Array$1.contains(listed, SKILLS) || Array$1.contains(listed, skill);
|
|
17396
|
+
const skillDirectoriesIn = (files, directory) => pipe(findSkillFiles(files.join(directory, SKILLS$1)), Array$1.filter((file) => files.basename(file) === SKILL_FILE$3), Array$1.map((file) => files.relative(directory, files.dirname(file))));
|
|
17397
|
+
const isShipped = (listed) => (skill) => Array$1.contains(listed, SKILLS$1) || Array$1.contains(listed, skill);
|
|
17388
17398
|
const packagingMessages = ({ keywords, files }, skills) => {
|
|
17389
17399
|
const keyword = pipe(Option.liftPredicate(keywords, (own) => !Array$1.contains(own, KEYWORD)), Option.map(() => `is published with skills but lacks the ${KEYWORD} keyword, so Intent does not find them. Add it to keywords.`));
|
|
17390
17400
|
const unshipped = pipe(files, Option.map((listed) => pipe(skills, Array$1.filter((skill) => !isShipped(listed)(skill)))), Option.filter((left) => Array$1.isReadonlyArrayNonEmpty(left)), Option.map((left) => `leaves ${Array$1.join(left, ", ")} out of files, so the published package does not ship them. List them in files.`));
|
|
@@ -17394,7 +17404,7 @@ const validationOf = Effect.fn("validationOf")(function* validationOf(directory)
|
|
|
17394
17404
|
const handle = yield* ChildProcess.make("node", [
|
|
17395
17405
|
INTENT_CLI,
|
|
17396
17406
|
"validate",
|
|
17397
|
-
SKILLS
|
|
17407
|
+
SKILLS$1
|
|
17398
17408
|
], {
|
|
17399
17409
|
cwd: directory,
|
|
17400
17410
|
extendEnv: true,
|
|
@@ -17408,9 +17418,9 @@ const problemsIn$10 = Effect.fn("problemsIn")(function* problemsIn(root, project
|
|
|
17408
17418
|
const directory = files.join(root, project.directory);
|
|
17409
17419
|
const manifest = files.join(directory, PACKAGE_JSON_FILE);
|
|
17410
17420
|
const skills = skillDirectoriesIn(files, directory);
|
|
17411
|
-
if (!Array$1.isReadonlyArrayNonEmpty(skills)) return [problemAt$2(manifest, `is published without agent skills. Write the tasks an agent needs for this package as ${SKILLS}/<task>/${SKILL_FILE$3}, so that repositories which approve them in the permissions of pnpm-workspace.yaml give their agents guidance for the installed version.`)];
|
|
17421
|
+
if (!Array$1.isReadonlyArrayNonEmpty(skills)) return [problemAt$2(manifest, `is published without agent skills. Write the tasks an agent needs for this package as ${SKILLS$1}/<task>/${SKILL_FILE$3}, so that repositories which approve them in the permissions of pnpm-workspace.yaml give their agents guidance for the installed version.`)];
|
|
17412
17422
|
const validation = yield* validationOf(directory).pipe(Effect.orElseSucceed(() => Option.none()));
|
|
17413
|
-
return [...pipe(packagingMessages(project, skills), Array$1.map((message) => problemAt$2(manifest, message))), ...pipe(validation, Option.map((output) => problemAt$2(files.join(directory, SKILLS), `fails intent validate:\n${output}`)), Option.toArray)];
|
|
17423
|
+
return [...pipe(packagingMessages(project, skills), Array$1.map((message) => problemAt$2(manifest, message))), ...pipe(validation, Option.map((output) => problemAt$2(files.join(directory, SKILLS$1), `fails intent validate:\n${output}`)), Option.toArray)];
|
|
17414
17424
|
});
|
|
17415
17425
|
/** @internal */
|
|
17416
17426
|
const checkPublishedSkills = Effect.fn("checkPublishedSkills")(function* checkPublishedSkills(root) {
|
|
@@ -17432,18 +17442,13 @@ const CODE = /```[\s\S]*?```|`[^`\n]*`/gu;
|
|
|
17432
17442
|
const LINK = /\]\((?<target>[^)\s]+)\)/gu;
|
|
17433
17443
|
const EXTERNAL = /^(?:[a-z][a-z0-9+.-]*:|#|\/)|[<>{}]/iu;
|
|
17434
17444
|
const FRAGMENT = /#.*$/u;
|
|
17435
|
-
const GITHUB$3 = "https://github.com/";
|
|
17436
|
-
const COMMIT_LINK = /\/(?:blob|tree)\/[0-9a-f]{40}(?:\/|$)/u;
|
|
17437
|
-
const BLANK = /\s+/u;
|
|
17438
17445
|
const SEPARATOR$10 = "/";
|
|
17439
17446
|
const START$17 = 0;
|
|
17440
17447
|
const FIRST$7 = 1;
|
|
17441
17448
|
const READ_CONCURRENCY$14 = 16;
|
|
17442
|
-
const Metadata = Schema.Struct({ "derived-from": Schema.optional(Schema.String) });
|
|
17443
17449
|
const Frontmatter = Schema.Struct({
|
|
17444
17450
|
name: Schema.optional(Schema.String),
|
|
17445
|
-
license: Schema.optional(Schema.Unknown)
|
|
17446
|
-
metadata: Schema.optional(Metadata)
|
|
17451
|
+
license: Schema.optional(Schema.Unknown)
|
|
17447
17452
|
});
|
|
17448
17453
|
const decodeFrontmatter = Schema.decodeUnknownOption(Frontmatter);
|
|
17449
17454
|
const offsetOf$1 = (source, pattern) => pipe(String$1.search(pattern)(source), Option.getOrElse(() => START$17));
|
|
@@ -17462,18 +17467,10 @@ const nameProblems = ({ source, directory }, name, folder) => {
|
|
|
17462
17467
|
message: `The first heading is ${headingText(found)}. Start the body with "# ${name}", the frontmatter name.`
|
|
17463
17468
|
})), Option.toArray)];
|
|
17464
17469
|
};
|
|
17465
|
-
const
|
|
17466
|
-
index: offsetOf$1(source,
|
|
17467
|
-
message:
|
|
17468
|
-
})))
|
|
17469
|
-
const frontmatterProblems = (skill, folder) => pipe(frontmatterOf(skill.source), Option.map((frontmatter) => [
|
|
17470
|
-
...pipe(Option.fromUndefinedOr(frontmatter.name), Option.map((name) => nameProblems(skill, name, folder)), Option.getOrElse(() => [])),
|
|
17471
|
-
...pipe(Option.fromUndefinedOr(frontmatter.license), Option.map(() => ({
|
|
17472
|
-
index: offsetOf$1(skill.source, LICENSE_KEY),
|
|
17473
|
-
message: "The frontmatter has license. Skills here carry neither a license field nor a LICENSE file. Remove it."
|
|
17474
|
-
})), Option.toArray),
|
|
17475
|
-
...pipe(Option.fromUndefinedOr(frontmatter.metadata), Option.flatMap((metadata) => Option.fromUndefinedOr(metadata["derived-from"])), Option.map((derived) => derivedProblems(skill.source, derived)), Option.getOrElse(() => []))
|
|
17476
|
-
]), Option.getOrElse(() => []), Array$1.map(({ index, message }) => ({
|
|
17470
|
+
const frontmatterProblems = (skill, folder) => pipe(frontmatterOf(skill.source), Option.map((frontmatter) => [...pipe(Option.fromUndefinedOr(frontmatter.name), Option.map((name) => nameProblems(skill, name, folder)), Option.getOrElse(() => [])), ...pipe(Option.fromUndefinedOr(frontmatter.license), Option.map(() => ({
|
|
17471
|
+
index: offsetOf$1(skill.source, LICENSE_KEY),
|
|
17472
|
+
message: "The frontmatter has license. Skills here carry neither a license field nor a LICENSE file. Remove it."
|
|
17473
|
+
})), Option.toArray)]), Option.getOrElse(() => []), Array$1.map(({ index, message }) => ({
|
|
17477
17474
|
file: skill.file,
|
|
17478
17475
|
...positionOf(skill.source)(index),
|
|
17479
17476
|
rule: RULE$28,
|
|
@@ -19150,7 +19147,7 @@ const checkSkillReferences = Effect.fn("checkSkillReferences")(function* checkSk
|
|
|
19150
19147
|
const skills = pipe(plugins, Array$1.flatMap(({ skills: own }) => own));
|
|
19151
19148
|
const qualified = new Set(pipe(skills, Array$1.map(({ plugin, name }) => `${plugin}${QUALIFIER}${name}`)));
|
|
19152
19149
|
const owners = pipe(skills, Array$1.flatMap((skill) => ownerProblems(skill, qualified)));
|
|
19153
|
-
const hub = Array$1.findFirst(skills, ({
|
|
19150
|
+
const hub = Array$1.findFirst(skills, ({ file }) => INDEX_SKILL.test(file));
|
|
19154
19151
|
const hubbed = yield* Option.match(hub, {
|
|
19155
19152
|
onNone: () => Effect.succeed([]),
|
|
19156
19153
|
onSome: (found) => referencesFrom(found, skills)
|
|
@@ -20575,7 +20572,7 @@ const summaryOf = ({ name, text }) => pipe(splitFrontmatter(text), Option.match(
|
|
|
20575
20572
|
onSome: (frontmatter) => ({
|
|
20576
20573
|
name,
|
|
20577
20574
|
description: descriptionOf(frontmatter.fields),
|
|
20578
|
-
index:
|
|
20575
|
+
index: INDEX_SKILL.test(name)
|
|
20579
20576
|
})
|
|
20580
20577
|
}));
|
|
20581
20578
|
const readAll = (root, names) => Effect.forEach(names, readDocument(root), { concurrency: READ_CONCURRENCY$4 }).pipe(Effect.map(Array$1.getSomes));
|
|
@@ -21393,7 +21390,7 @@ const loadsCleanly = ({ runtime, consumer, failure, args }) => mustSucceed({
|
|
|
21393
21390
|
});
|
|
21394
21391
|
// src/features/publish-workspace/model/plugin-lock.ts
|
|
21395
21392
|
const PLUGIN_FILE = ".claude-plugin/plugin.json";
|
|
21396
|
-
const PACKED_ROOT = "package";
|
|
21393
|
+
const PACKED_ROOT$1 = "package";
|
|
21397
21394
|
const NPM_LOCK$1 = "package-lock.json";
|
|
21398
21395
|
const MINIMUM_RELEASE_AGE_DAYS = 1;
|
|
21399
21396
|
const SCOPE = /^@[^/]+\//u;
|
|
@@ -21425,7 +21422,7 @@ const unpacked = Effect.fn("publish.unpacked")(function* unpacked(tarball, direc
|
|
|
21425
21422
|
directory
|
|
21426
21423
|
]
|
|
21427
21424
|
});
|
|
21428
|
-
return path.join(directory, PACKED_ROOT);
|
|
21425
|
+
return path.join(directory, PACKED_ROOT$1);
|
|
21429
21426
|
});
|
|
21430
21427
|
/** @internal */
|
|
21431
21428
|
const installsDependencies = Effect.fn("publish.installsDependencies")(function* installsDependencies(root) {
|
|
@@ -21475,7 +21472,7 @@ const lockPlugin = Effect.fn("publish.lockPlugin")(function* lockPlugin(tarball,
|
|
|
21475
21472
|
tarball,
|
|
21476
21473
|
"-C",
|
|
21477
21474
|
unpackedTo,
|
|
21478
|
-
PACKED_ROOT
|
|
21475
|
+
PACKED_ROOT$1
|
|
21479
21476
|
]
|
|
21480
21477
|
});
|
|
21481
21478
|
});
|
|
@@ -21641,6 +21638,37 @@ const packHookEnv = Effect.fn("publish.packHook")(function* packHookEnv(director
|
|
|
21641
21638
|
});
|
|
21642
21639
|
// src/features/publish-workspace/model/pack.ts
|
|
21643
21640
|
const TARBALL = "package.tgz";
|
|
21641
|
+
const PACKED_ROOT = "package";
|
|
21642
|
+
const SKILLS = "skills";
|
|
21643
|
+
const writeIntent = Effect.fn("publish.writeIntent")(function* writeIntent(tarball, temporary) {
|
|
21644
|
+
const fileSystem = yield* FileSystem.FileSystem;
|
|
21645
|
+
const path = yield* Path.Path;
|
|
21646
|
+
const unpackedTo = path.join(temporary, "intent");
|
|
21647
|
+
const root = yield* unpacked(tarball, unpackedTo);
|
|
21648
|
+
if (!(yield* fileSystem.exists(path.join(root, SKILLS)))) return;
|
|
21649
|
+
yield* mustSucceed({
|
|
21650
|
+
command: "node",
|
|
21651
|
+
args: [
|
|
21652
|
+
MDLCT_BIN,
|
|
21653
|
+
"intent",
|
|
21654
|
+
root
|
|
21655
|
+
]
|
|
21656
|
+
});
|
|
21657
|
+
yield* mustSucceed({
|
|
21658
|
+
command: "tar",
|
|
21659
|
+
args: [
|
|
21660
|
+
"-czf",
|
|
21661
|
+
tarball,
|
|
21662
|
+
"-C",
|
|
21663
|
+
unpackedTo,
|
|
21664
|
+
PACKED_ROOT
|
|
21665
|
+
]
|
|
21666
|
+
});
|
|
21667
|
+
});
|
|
21668
|
+
const finishTarball = Effect.fn("publish.finishTarball")(function* finishTarball(tarball, temporary, plugin) {
|
|
21669
|
+
if (plugin) yield* lockPlugin(tarball, temporary);
|
|
21670
|
+
yield* writeIntent(tarball, temporary);
|
|
21671
|
+
});
|
|
21644
21672
|
/** @internal */
|
|
21645
21673
|
const pack = Effect.fn("publish.pack")(function* pack(directory) {
|
|
21646
21674
|
const fileSystem = yield* FileSystem.FileSystem;
|
|
@@ -21660,7 +21688,7 @@ const pack = Effect.fn("publish.pack")(function* pack(directory) {
|
|
|
21660
21688
|
env,
|
|
21661
21689
|
cwd: directory
|
|
21662
21690
|
});
|
|
21663
|
-
|
|
21691
|
+
yield* finishTarball(tarball, temporary, plugin);
|
|
21664
21692
|
return tarball;
|
|
21665
21693
|
});
|
|
21666
21694
|
// src/features/publish-workspace/model/compat-native.ts
|