@r_masseater/msch 0.117.0 → 0.117.2

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 CHANGED
@@ -4,7 +4,7 @@ import { $ as isIdentifier, A as uniqueByReference, B as getTextOfJSDocComment,
4
4
  import { i as workspaceDependencies$1, n as installedManifest, r as readManifest, t as dependencyEntries } from "./dependencies-CgIp-gS1.mjs";
5
5
  import { C as keyName, D as stringsIn, E as propertyValue, S as childrenOf$4, T as nestedValues, a as workspaceManifest, b as workspaceConfigOf, c as TASK_NAMES, d as definesTask, f as hasVerifyTask, i as workspaceProjects, l as TEST_TASK_NAMES, n as unmatchedWorkspacePatterns, r as workspaceDirectories, s as RUN_TASKS, t as publishedProjects, u as VERIFY_TASK, w as literalOf, x as KeySchema } from "./workspace-projects-DYfp6Tpn.mjs";
6
6
  import { a as parent, i as join, n as isInside, t as baseName$1 } from "./path-DUttmo2s.mjs";
7
- import { _ as shadcnUiOf, a as workspaceConfigs, c as publicEntriesOf, d as splitFrontmatter, h as deployEntries, i as publishedWorkspaces, l as isIndexSkill, m as bundledEntries, o as entryNameOf, p as workspaceLinks, r as packedWorkspaces, s as isBinEntry, u as FRONTMATTER } from "./published-BITU3twH.mjs";
7
+ import { _ as shadcnUiOf, a as workspaceConfigs, c as publicEntriesOf, d as splitFrontmatter, h as deployEntries, i as publishedWorkspaces, l as isIndexSkill, m as bundledEntries$1, o as entryNameOf, p as workspaceLinks, r as packedWorkspaces, s as isBinEntry, u as FRONTMATTER } from "./published-BITU3twH.mjs";
8
8
  import { i as USAGE_SPOOL, n as DECISION_TIMEOUT_MS, r as JAPANESE, t as DECISION_MODEL } from "./config-W6Uy7bV8.mjs";
9
9
  import { a as CI_TASKS, c as meteredCommand, f as isIgnored, h as patternOf$1, m as namedWorkspaces, n as builtTextRuleNames, o as MSCH_TASK_COMMANDS, r as secretsOf, s as MSCH_VERIFY_COMMANDS, t as TEXT_IGNORES, u as existsAt } from "./repository-text-Cl6JiEYE.mjs";
10
10
  import { t as startedOnce } from "./started-once-muJbvD_I.mjs";
@@ -45,7 +45,7 @@ import { Base64 } from "effect/encoding";
45
45
  import { CALLS_METRIC, mergeTallies, talliesIn, usageMetricsOf } from "@r_masseater/masseater-utils/usage-meter/report";
46
46
  // package.json
47
47
  var name = "@r_masseater/msch";
48
- var version = "0.117.0";
48
+ var version = "0.117.2";
49
49
  var homepage = "https://github.com/masseater/ecosystems/tree/main/libs/msch#readme";
50
50
  var repository = {
51
51
  "type": "git",
@@ -13959,7 +13959,8 @@ const RULE$50 = "plugin-dependencies";
13959
13959
  const PLUGIN_FILE$3 = ".claude-plugin/plugin.json";
13960
13960
  const LOCK_FILE = "bun.lock";
13961
13961
  const SOURCE_FILE$1 = /\.[cm]?[jt]sx?$/u;
13962
- const TEST_FILE$2 = /\.test(?:\.support)?\.[cm]?[jt]sx?$/u;
13962
+ const TEST_FILE$2 = /\.(?:test|spec)(?:\.support)?\.[cm]?[jt]sx?$/u;
13963
+ const HOOKS_FILE = "hooks/hooks.json";
13963
13964
  const SUCCESS$6 = 0;
13964
13965
  const NOT_STARTED = -1;
13965
13966
  const DETAIL_LINES = 3;
@@ -13981,6 +13982,27 @@ const needed = (project) => (file) => {
13981
13982
  const prefix = `${project.directory}/`;
13982
13983
  return String$1.startsWith(prefix)(file) && (SOURCE_FILE$1.test(file) || file === `${prefix}${PACKAGE_JSON_FILE}` || file === `${prefix}${LOCK_FILE}`);
13983
13984
  };
13985
+ const Modules = Schema.String.pipe(Schema.Array, Schema.optional);
13986
+ const HooksFile = Schema.fromJsonString(Schema.Struct({ modules: Modules }));
13987
+ const decodeHooks = Schema.decodeUnknownOption(HooksFile);
13988
+ const PARENT = 1;
13989
+ const directoryOf$2 = (module) => {
13990
+ const parts = pipe(String$1.split(`hooks/${module}`, "/"), Array$1.filter((part) => part !== "" && part !== "."));
13991
+ return `${Array$1.join(Array$1.dropRight(parts, PARENT), "/")}/`;
13992
+ };
13993
+ /** @internal */
13994
+ const modDirectoriesOf = (hooks) => pipe(decodeHooks(hooks), Option.flatMap(({ modules }) => Option.fromNullishOr(modules)), Option.getOrElse(() => []), Array$1.map(directoryOf$2), Array$1.dedupe);
13995
+ const underAny = (directories) => (name) => pipe(directories, Array$1.some((directory) => String$1.startsWith(directory)(name)));
13996
+ /** @internal */
13997
+ const bundledEntries = (names, modDirectories) => pipe(names, Array$1.filter((name) => SOURCE_FILE$1.test(name) && !TEST_FILE$2.test(name) && !underAny(modDirectories)(name)));
13998
+ const modDirectories = Effect.fn("modDirectories")(function* modDirectories(directory) {
13999
+ const files = yield* RepositoryFiles;
14000
+ const hooks = yield* files.readFile(files.join(directory, HOOKS_FILE));
14001
+ return Option.match(hooks, {
14002
+ onNone: () => [],
14003
+ onSome: modDirectoriesOf
14004
+ });
14005
+ });
13984
14006
  const copied = Effect.fn("copied")(function* copied(root, project, sandbox) {
13985
14007
  const files = yield* RepositoryFiles;
13986
14008
  const listed = yield* files.listedFiles(root);
@@ -13995,7 +14017,9 @@ const copied = Effect.fn("copied")(function* copied(root, project, sandbox) {
13995
14017
  concurrency: 1,
13996
14018
  discard: true
13997
14019
  });
13998
- return pipe(copies, Array$1.map(({ name }) => name), Array$1.filter((name) => SOURCE_FILE$1.test(name) && !TEST_FILE$2.test(name)), Array$1.map((name) => files.join(sandbox, name)));
14020
+ const mods = yield* modDirectories(files.join(root, project.directory));
14021
+ const names = pipe(copies, Array$1.map(({ name }) => name));
14022
+ return pipe(bundledEntries(names, mods), Array$1.map((name) => files.join(sandbox, name)));
13999
14023
  });
14000
14024
  const installed$1 = Effect.fn("installed")(function* installed(sandbox) {
14001
14025
  const handle = yield* ChildProcess.make("bun", ["install", "--frozen-lockfile"], {
@@ -14554,7 +14578,7 @@ const bundleProblem = (file) => Effect.gen(function* bundle() {
14554
14578
  /** @internal */
14555
14579
  const checkWorkerBundles = Effect.fn("checkWorkerBundles")(function* checkWorkerBundles(root) {
14556
14580
  const files = yield* RepositoryFiles;
14557
- const entries = yield* bundledEntries(root);
14581
+ const entries = yield* bundledEntries$1(root);
14558
14582
  const found = yield* Effect.forEach(entries, (entry) => bundleProblem(files.join(root, entry)), { concurrency: BUNDLE_CONCURRENCY });
14559
14583
  return Array$1.getSomes(found);
14560
14584
  });