@r_masseater/msch 0.120.12 → 0.121.1
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/addon-tasks.d.mts +2 -3
- package/dist/addon-tasks.mjs +2 -2
- package/dist/baseline-rules.d.mts +1 -2
- package/dist/baseline-rules.mjs.map +1 -1
- package/dist/cargo-inputs.d.mts +1 -1
- package/dist/cargo-inputs.mjs +1 -1
- package/dist/cli.mjs +129 -121
- package/dist/cli.mjs.map +1 -1
- package/dist/{config-W6Uy7bV8.mjs → config-B3SYjao5.mjs} +1 -1
- package/dist/{config-W6Uy7bV8.mjs.map → config-B3SYjao5.mjs.map} +1 -1
- package/dist/config.d.mts +15 -7
- package/dist/config.mjs +11 -10
- package/dist/config.mjs.map +1 -1
- package/dist/decision-rules.d.mts +1 -1
- package/dist/decision-rules.mjs +1 -1
- package/dist/{define-lint-preset-Bh9gBpeZ.mjs → define-lint-preset-eBFx8MIW.mjs} +2 -2
- package/dist/{define-lint-preset-Bh9gBpeZ.mjs.map → define-lint-preset-eBFx8MIW.mjs.map} +1 -1
- package/dist/{dependencies-OrBsaeID.mjs → dependencies-Bjn3xWkq.mjs} +3 -3
- package/dist/{dependencies-OrBsaeID.mjs.map → dependencies-Bjn3xWkq.mjs.map} +1 -1
- package/dist/{derive-cargo-inputs-Btc2ojuD.mjs → derive-cargo-inputs-BLMqkRS3.mjs} +5 -5
- package/dist/{derive-cargo-inputs-Btc2ojuD.mjs.map → derive-cargo-inputs-BLMqkRS3.mjs.map} +1 -1
- package/dist/{ignored-directories-wh-dhKsl.mjs → ignored-directories-CaTFIbjo.mjs} +2 -2
- package/dist/{ignored-directories-wh-dhKsl.mjs.map → ignored-directories-CaTFIbjo.mjs.map} +1 -1
- package/dist/{index-DIMbx_hx.d.mts → index-B15MNLWU.d.mts} +4 -5
- package/dist/{index-tcHDX7ae.d.mts → index-BY9hL-AJ.d.mts} +2 -3
- package/dist/{index-LIff_AUC.d.mts → index-CJ-DPimM.d.mts} +6 -7
- package/dist/library.d.mts +1 -2
- package/dist/library.mjs +3 -3
- package/dist/library.mjs.map +1 -1
- package/dist/lint-rules.d.mts +1 -2
- package/dist/lint-rules.mjs +4 -4
- package/dist/lint-rules.mjs.map +1 -1
- package/dist/lint.d.mts +1 -1
- package/dist/lint.mjs +1 -1
- package/dist/{locked-closure-paths-Dtqs8uBU.mjs → locked-closure-paths-_N_97Dbp.mjs} +1 -1
- package/dist/{locked-closure-paths-Dtqs8uBU.mjs.map → locked-closure-paths-_N_97Dbp.mjs.map} +1 -1
- package/dist/{locked-inputs-DMSoGCa-.mjs → locked-inputs-CP2lVRLR.mjs} +2 -2
- package/dist/{locked-inputs-DMSoGCa-.mjs.map → locked-inputs-CP2lVRLR.mjs.map} +1 -1
- package/dist/locked-inputs.d.mts +1 -2
- package/dist/locked-inputs.mjs +1 -1
- package/dist/oxlint.d.mts +1 -2
- package/dist/oxlint.mjs +2 -2
- package/dist/{path-DUttmo2s.mjs → path-BhBnc3Sn.mjs} +1 -1
- package/dist/{path-DUttmo2s.mjs.map → path-BhBnc3Sn.mjs.map} +1 -1
- package/dist/{problem-D0e14vkQ.mjs → problem-Dk1svgmC.mjs} +4 -4
- package/dist/{problem-D0e14vkQ.mjs.map → problem-Dk1svgmC.mjs.map} +1 -1
- package/dist/{published-u44g9ha6.mjs → published-DkH6B-Gr.mjs} +3 -3
- package/dist/{published-u44g9ha6.mjs.map → published-DkH6B-Gr.mjs.map} +1 -1
- package/dist/{repository-files-C8B7lrka.mjs → repository-files-C_GzAnYp.mjs} +2 -2
- package/dist/{repository-files-C8B7lrka.mjs.map → repository-files-C_GzAnYp.mjs.map} +1 -1
- package/dist/{repository-text-fyVQrhAd.mjs → repository-text-UR3E4wjS.mjs} +19 -6
- package/dist/repository-text-UR3E4wjS.mjs.map +1 -0
- package/dist/{started-once-muJbvD_I.mjs → started-once-BN_hLlmU.mjs} +1 -1
- package/dist/{started-once-muJbvD_I.mjs.map → started-once-BN_hLlmU.mjs.map} +1 -1
- package/dist/{workspace-projects-wllEd2HL.mjs → workspace-projects-eapoa0az.mjs} +2 -2
- package/dist/{workspace-projects-wllEd2HL.mjs.map → workspace-projects-eapoa0az.mjs.map} +1 -1
- package/dist/workspace-settings.d.mts +1 -1
- package/dist/workspace-settings.mjs +6 -6
- package/package.json +14 -14
- package/skills/msch-repository-config/SKILL.md +4 -0
- package/dist/repository-text-fyVQrhAd.mjs.map +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { $ as isIdentifier, A as uniqueByReference, B as getTextOfJSDocComment, C as moduleSpecifierOf, D as resolvedSymbol, E as referencedSymbols, F as SymbolFlags, G as isCallExpression, H as isArrowFunction, I as SyntaxKind, J as isEnumDeclaration, K as isClassDeclaration, L as getJSDocTags, M as IndexKind, N as InternalSymbolName, O as symbolAt, P as SignatureKind, Q as isFunctionExpression, R as getLeadingCommentRanges, S as moduleSpecifierLiteralOf, St as isVariableStatement, T as propertyNamesOf, U as isBinaryExpression, V as isArrayLiteralExpression, W as isBlock, X as isExpressionStatement, Y as isExportDeclaration, Z as isFunctionDeclaration, _ as isGenericDeclaration, _t as isTypeLiteralNode, a as problemAtPosition, at as isNumericLiteral, b as isTypeDeclaration, bt as isVariableDeclaration, c as carriesTag, ct as isPropertyAccessExpression, d as contains, dt as isSatisfiesExpression, et as isImportDeclaration, f as declarationsOf, ft as isSignatureDeclaration, g as isExternalDeclaration, gt as isTypeAliasDeclaration, h as importedModulesOf, ht as isStringLiteral, i as problemAt$6, it as isNewExpression, j as API, k as symbolAtLocation, l as childrenOf$3, lt as isPropertyAssignment, m as descendantsOf, mt as isSpreadElement, nt as isModuleBlock, o as problemInFile, ot as isObjectLiteralExpression, p as declaresAType, pt as isSourceFile, q as isElementAccessExpression, r as formatProblem, rt as isModuleDeclaration, s as sortProblems, st as isParenthesizedExpression, t as ProblemList, tt as isInterfaceDeclaration, u as columnOf, ut as isReturnStatement, v as isInsideAny, vt as isTypeReferenceNode, w as packageOf$1, x as lineOf$5, xt as isVariableDeclarationList, y as isOutsideDeclaration, yt as isUnionTypeNode, z as getNameOfDeclaration } from "./problem-D0e14vkQ.mjs";
|
|
4
|
-
import { i as workspaceDependencies$1, n as installedManifest, r as readManifest, t as dependencyEntries } from "./dependencies-OrBsaeID.mjs";
|
|
5
|
-
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-wllEd2HL.mjs";
|
|
6
|
-
import { a as parent, i as join, n as isInside, t as baseName$1 } from "./path-DUttmo2s.mjs";
|
|
7
|
-
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 isIndexSkill, v as shadcnUiOf } from "./published-u44g9ha6.mjs";
|
|
8
|
-
import { i as USAGE_SPOOL, n as DECISION_TIMEOUT_MS, r as JAPANESE, t as DECISION_MODEL } from "./config-W6Uy7bV8.mjs";
|
|
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-fyVQrhAd.mjs";
|
|
10
|
-
import { t as startedOnce } from "./started-once-muJbvD_I.mjs";
|
|
11
|
-
import { g as decisionTestRules, n as MARKDOWN_RULES, p as lint$3, t as MARKDOWN_IGNORES, x as exempt } from "./define-lint-preset-Bh9gBpeZ.mjs";
|
|
12
|
-
import { builtinModules, isBuiltin } from "node:module";
|
|
13
|
-
import { Array as Array$1, Boolean as Boolean$1, Clock, Config, Console, Context, Effect, Equal, FileSystem, Function, HashMap, HashSet, Match, Metric, Number as Number$1, Option, Order, Path, Predicate, 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, pipe } from "effect";
|
|
14
3
|
import { Argument, Command, Flag } from "effect/cli";
|
|
15
|
-
import {
|
|
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";
|
|
16
5
|
import { hookFlags } from "@r_masseater/masseater-utils/hook-flags";
|
|
6
|
+
import { $ as isIdentifier, A as uniqueByReference, B as getTextOfJSDocComment, C as moduleSpecifierOf, D as resolvedSymbol, E as referencedSymbols, F as SymbolFlags, G as isCallExpression, H as isArrowFunction, I as SyntaxKind, J as isEnumDeclaration, K as isClassDeclaration, L as getJSDocTags, M as IndexKind, N as InternalSymbolName, O as symbolAt, P as SignatureKind, Q as isFunctionExpression, R as getLeadingCommentRanges, S as moduleSpecifierLiteralOf, St as isVariableStatement, T as propertyNamesOf, U as isBinaryExpression, V as isArrayLiteralExpression, W as isBlock, X as isExpressionStatement, Y as isExportDeclaration, Z as isFunctionDeclaration, _ as isGenericDeclaration, _t as isTypeLiteralNode, a as problemAtPosition, at as isNumericLiteral, b as isTypeDeclaration, bt as isVariableDeclaration, c as carriesTag, ct as isPropertyAccessExpression, d as contains, dt as isSatisfiesExpression, et as isImportDeclaration, f as declarationsOf, ft as isSignatureDeclaration, g as isExternalDeclaration, gt as isTypeAliasDeclaration, h as importedModulesOf, ht as isStringLiteral, i as problemAt$6, it as isNewExpression, j as API, k as symbolAtLocation, l as childrenOf$3, lt as isPropertyAssignment, m as descendantsOf, mt as isSpreadElement, nt as isModuleBlock, o as problemInFile, ot as isObjectLiteralExpression, p as declaresAType, pt as isSourceFile, q as isElementAccessExpression, r as formatProblem, rt as isModuleDeclaration, s as sortProblems, st as isParenthesizedExpression, t as ProblemList, tt as isInterfaceDeclaration, u as columnOf, ut as isReturnStatement, v as isInsideAny, vt as isTypeReferenceNode, w as packageOf$1, x as lineOf$5, xt as isVariableDeclarationList, y as isOutsideDeclaration, yt as isUnionTypeNode, z as getNameOfDeclaration } from "./problem-Dk1svgmC.mjs";
|
|
17
7
|
import { lockedGraph, lockedPackageIds, parseDependencyPath, updateWorkspaceManifest } from "@r_masseater/masseater-utils/kestrion/pnpm";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
8
|
+
import { ChildProcess, ChildProcessSpawner } from "effect/process";
|
|
9
|
+
import { DEPENDENCY_SECTIONS, PACKAGE_JSON_FILE, ROOT_SUBPATH as ROOT_SUBPATH$2, RUNTIME_SECTIONS, binEntriesOf, exportEntriesOf, importSpecifierOf, namesIn as namesIn$1, optionalPeerNames, runtimeDependencyNames, targetsIn, unscopedNameOf } from "@r_masseater/masseater-utils/kestrion";
|
|
10
|
+
import { i as workspaceDependencies$1, n as installedManifest, r as readManifest, t as dependencyEntries } from "./dependencies-Bjn3xWkq.mjs";
|
|
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
|
+
import { a as parent, i as join, n as isInside, t as baseName$1 } from "./path-BhBnc3Sn.mjs";
|
|
20
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 isIndexSkill, v as shadcnUiOf } from "./published-DkH6B-Gr.mjs";
|
|
21
15
|
import { parse, resolveConfigFromFile } from "vite-plus";
|
|
22
|
-
import {
|
|
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 patternOf$1, a as CI_TASKS, c as MSCH_VERIFY_COMMANDS, f as existsAt, g as namedWorkspaces, m as isIgnored, n as builtTextRuleNames, r as secretsOf, s as MSCH_TASK_COMMANDS, t as TEXT_IGNORES, u as meteredCommand } from "./repository-text-UR3E4wjS.mjs";
|
|
23
18
|
import { fileURLToPath } from "node:url";
|
|
24
19
|
import treeSitter from "@vscode/tree-sitter-wasm";
|
|
20
|
+
import { t as startedOnce } from "./started-once-BN_hLlmU.mjs";
|
|
25
21
|
import { getStaticTOMLValue, parseTOML } from "toml-eslint-parser";
|
|
26
22
|
import { rolldown } from "rolldown";
|
|
27
23
|
import { stripVTControlCharacters } from "node:util";
|
|
24
|
+
import { builtinModules, isBuiltin as isBuiltin$1 } from "node:module";
|
|
28
25
|
import semver from "semver";
|
|
29
|
-
import {
|
|
30
|
-
import { NO_PATH, describeReference, diagnosticDetail, linksIn, lint, markdownPathspecs, referenceOf, y8Section } from "@r_masseater/y8";
|
|
26
|
+
import { g as decisionTestRules, n as MARKDOWN_RULES, p as lint$3, t as MARKDOWN_IGNORES, x as exempt } from "./define-lint-preset-eBFx8MIW.mjs";
|
|
27
|
+
import { NO_PATH, describeReference, diagnosticDetail, linksIn as linksIn$1, lint, markdownPathspecs, referenceOf as referenceOf$2, y8Section } from "@r_masseater/y8";
|
|
31
28
|
import { lint as lint$1, wismPathspecs, wismSection } from "@r_masseater/wism";
|
|
29
|
+
import { Parser, isPair, isScalar, parse as parse$1, parseDocument, visit as visit$1 } from "yaml";
|
|
32
30
|
import { VpToolsError, findCiDrift, runVpa } from "@r_masseater/vite-plus-adopt";
|
|
33
31
|
import { fu4Section, lint as lint$2, workflowPathspecs } from "@r_masseater/fu4";
|
|
34
32
|
import { isComment, isTag, isText } from "domhandler";
|
|
35
33
|
import { DomUtils, parseDocument as parseDocument$1 } from "htmlparser2";
|
|
36
34
|
import { DockerfileParser } from "dockerfile-ast";
|
|
37
35
|
import { parse as parse$2 } from "sql-parser-cst";
|
|
36
|
+
import { findPackageJson } from "@r_masseater/masseater-utils/kestrion/node";
|
|
38
37
|
import { findSkillFiles } from "@tanstack/intent";
|
|
39
38
|
import { HttpClient, HttpClientRequest, HttpClientResponse } from "effect/http";
|
|
40
39
|
import { runMainWith } from "@r_masseater/masseater-utils/node-main";
|
|
41
40
|
import { dual } from "effect/Function";
|
|
41
|
+
import { judgeText } from "@r_masseater/oxlint-plugin-decision";
|
|
42
42
|
import { finished, mustSucceed, outputOf, succeeds, writeOutputs } from "@r_masseater/masseater-utils/github-workflow";
|
|
43
|
-
import { arch, platform } from "node:os";
|
|
44
|
-
import { Base64 } from "effect/encoding";
|
|
45
43
|
import { CALLS_METRIC, mergeTallies, talliesIn, usageMetricsOf } from "@r_masseater/masseater-utils/usage-meter/report";
|
|
44
|
+
import { Base64 } from "effect/encoding";
|
|
45
|
+
import { arch, platform } from "node:os";
|
|
46
46
|
import { Buffer } from "node:buffer";
|
|
47
47
|
import { createZstdDecompress } from "node:zlib";
|
|
48
48
|
// package.json
|
|
49
49
|
var name = "@r_masseater/msch";
|
|
50
|
-
var version = "0.
|
|
50
|
+
var version = "0.121.1";
|
|
51
51
|
var homepage = "https://github.com/masseater/ecosystems/tree/main/libs/msch#readme";
|
|
52
52
|
var repository = {
|
|
53
53
|
"type": "git",
|
|
@@ -1224,7 +1224,7 @@ const SECTIONS$1 = [
|
|
|
1224
1224
|
const manifestSpecifiers = (source) => pipe(decodePackageJson(source), Option.map((manifest) => pipe(SECTIONS$1, Array$1.flatMap((section) => specifiedIn(manifest[section])))), Option.getOrElse(() => []));
|
|
1225
1225
|
// src/entities/package/model/published-manifest.ts
|
|
1226
1226
|
const EXCLUDED$9 = [":(exclude,attr:linguist-vendored)", ":(exclude,attr:linguist-generated)"];
|
|
1227
|
-
const isPublished$1 = (manifest) => manifest.private !== true && Predicate.isNotUndefined(manifest.publishConfig);
|
|
1227
|
+
const isPublished$1 = (manifest) => manifest.private !== true && Predicate$1.isNotUndefined(manifest.publishConfig);
|
|
1228
1228
|
const publishedManifestOf = (source) => pipe(source, Option.flatMap(decodePackageJson), Option.filter(isPublished$1));
|
|
1229
1229
|
/** @internal */
|
|
1230
1230
|
const scanPublishedManifests = Effect.fn("scanPublishedManifests")(function* scanPublishedManifests(root, problemsIn) {
|
|
@@ -2160,13 +2160,13 @@ const lengths = (items) => {
|
|
|
2160
2160
|
return [min, max];
|
|
2161
2161
|
};
|
|
2162
2162
|
const itemLengths = (it) => {
|
|
2163
|
-
if (it.t === "star") return [0,
|
|
2163
|
+
if (it.t === "star") return [0, 1e400];
|
|
2164
2164
|
if (it.t !== "ext") return [1, 1];
|
|
2165
|
-
if (it.type === "!") return [0,
|
|
2165
|
+
if (it.type === "!") return [0, 1e400];
|
|
2166
2166
|
const alts = it.alts.map(lengths);
|
|
2167
2167
|
const min = Math.min(...alts.map((a) => a[0]));
|
|
2168
2168
|
const max = Math.max(...alts.map((a) => a[1]));
|
|
2169
|
-
const loop = max === 0 ? 0 :
|
|
2169
|
+
const loop = max === 0 ? 0 : 1e400;
|
|
2170
2170
|
return it.type === "@" ? [min, max] : it.type === "?" ? [0, max] : it.type === "*" ? [0, loop] : [min, loop];
|
|
2171
2171
|
};
|
|
2172
2172
|
const hasAffix = (lits, chars, start) => {
|
|
@@ -2192,7 +2192,7 @@ var Matcher = class {
|
|
|
2192
2192
|
#linear;
|
|
2193
2193
|
#wild = false;
|
|
2194
2194
|
#min = 0;
|
|
2195
|
-
#max =
|
|
2195
|
+
#max = 1e400;
|
|
2196
2196
|
#prefix = [];
|
|
2197
2197
|
#suffix = [];
|
|
2198
2198
|
#prefixStr;
|
|
@@ -3529,7 +3529,7 @@ const checkColocatedGitPatterns = Effect.fn("checkColocatedGitPatterns")(functio
|
|
|
3529
3529
|
const RULE$74 = "colocated-test";
|
|
3530
3530
|
const FIRST$25 = 1;
|
|
3531
3531
|
const READ_CONCURRENCY$39 = 64;
|
|
3532
|
-
const ROOT_SUBPATH$
|
|
3532
|
+
const ROOT_SUBPATH$1 = ".";
|
|
3533
3533
|
const NAME_GROUP$2 = "name";
|
|
3534
3534
|
const SPECIFIER_GROUP = "specifier";
|
|
3535
3535
|
const SCRIPT$1 = /\.[cm]?[jt]sx?$/u;
|
|
@@ -3562,7 +3562,7 @@ const specifiersBeside = ({ join, dirname, directory }) => (manifest) => pipe(Op
|
|
|
3562
3562
|
manifest,
|
|
3563
3563
|
join,
|
|
3564
3564
|
packEntries: []
|
|
3565
|
-
}), Array$1.filter(({ source }) => dirname(source) === directory), Array$1.map(({ label }) => String$1.replace(ROOT_SUBPATH$
|
|
3565
|
+
}), Array$1.filter(({ source }) => dirname(source) === directory), Array$1.map(({ label }) => String$1.replace(ROOT_SUBPATH$1, name)(label)))), Option.getOrElse(() => []));
|
|
3566
3566
|
const ownSpecifiers = Effect.fn("ownSpecifiers")(function* ownSpecifiers(context, test) {
|
|
3567
3567
|
const files = yield* RepositoryFiles;
|
|
3568
3568
|
const owner = ownerOf$5(context.packages, test.name);
|
|
@@ -3765,7 +3765,7 @@ const STACK_FILE = /(?:^|\/)alchemy\.(?![^/]*\.test\.)[^/]+\.[cm]?ts$/u;
|
|
|
3765
3765
|
const ALCHEMY_IMPORT = /from\s+["'](?:alchemy|@alchemy\.run)(?:\/[^"']*)?["']/u;
|
|
3766
3766
|
const URL_PATTERN = /https:\/\/[^\s)>\]]+/u;
|
|
3767
3767
|
const decodeKey$2 = Schema.decodeUnknownOption(KeySchema);
|
|
3768
|
-
const propertyNamed = (names) => (node) => Predicate.isReadonlyObject(node) && node["type"] === "Property" && pipe(decodeKey$2(node["key"]), Option.exists((key) => Array$1.contains(names, keyName(key))));
|
|
3768
|
+
const propertyNamed = (names) => (node) => Predicate$1.isReadonlyObject(node) && node["type"] === "Property" && pipe(decodeKey$2(node["key"]), Option.exists((key) => Array$1.contains(names, keyName(key))));
|
|
3769
3769
|
const isAddressProperty = propertyNamed(ADDRESS_KEYS);
|
|
3770
3770
|
const isUrlProperty = propertyNamed([URL_KEY]);
|
|
3771
3771
|
const ReturnedObject = Schema.Struct({
|
|
@@ -3981,11 +3981,11 @@ const NO_PLUGINS = {
|
|
|
3981
3981
|
const isCheckPolicy = ({ packageName }) => Option.contains(packageName, SELF_NAME);
|
|
3982
3982
|
const messageFor$5 = (directory) => `names the workspace ${directory}. The root README, AGENTS.md and CLAUDE.md describe the repository as a whole. Write what belongs to the workspace in ${directory}/README.md, or for agents in ${directory}/AGENTS.md.`;
|
|
3983
3983
|
const pluginsOf = (plugins) => {
|
|
3984
|
-
const directories = pipe(plugins, Array$1.map(({ source }) => source), Array$1.filter(Predicate.isString), Array$1.map(String$1.replace(RELATIVE$4, "")));
|
|
3984
|
+
const directories = pipe(plugins, Array$1.map(({ source }) => source), Array$1.filter(Predicate$1.isString), Array$1.map(String$1.replace(RELATIVE$4, "")));
|
|
3985
3985
|
const segments = pipe(directories, Array$1.map(baseName$1));
|
|
3986
3986
|
return {
|
|
3987
3987
|
directories,
|
|
3988
|
-
names: pipe(plugins, Array$1.map(({ name }) => name), Array$1.filter(Predicate.isString), Array$1.appendAll(segments), Array$1.dedupe)
|
|
3988
|
+
names: pipe(plugins, Array$1.map(({ name }) => name), Array$1.filter(Predicate$1.isString), Array$1.appendAll(segments), Array$1.dedupe)
|
|
3989
3989
|
};
|
|
3990
3990
|
};
|
|
3991
3991
|
const marketplacePlugins = Effect.fn("marketplacePlugins")(function* marketplacePlugins(root) {
|
|
@@ -3995,7 +3995,7 @@ const marketplacePlugins = Effect.fn("marketplacePlugins")(function* marketplace
|
|
|
3995
3995
|
});
|
|
3996
3996
|
const isPluginName = (plugins) => (name) => Array$1.contains(plugins.names, name);
|
|
3997
3997
|
const ownNames = (plugins, names) => {
|
|
3998
|
-
const ownName = Predicate.not(isPluginName(plugins));
|
|
3998
|
+
const ownName = Predicate$1.not(isPluginName(plugins));
|
|
3999
3999
|
return pipe(names, Array$1.filter(ownName));
|
|
4000
4000
|
};
|
|
4001
4001
|
const patternFor = (plugins) => ({ directory, names }) => patternOf$1(Option.match(Array$1.findFirst(plugins.directories, (plugin) => plugin === directory), {
|
|
@@ -12896,8 +12896,8 @@ const SOURCE_TARGET = "./src/*";
|
|
|
12896
12896
|
const SOURCE_PREFIX = /^\.\/src(?:\/|$)/u;
|
|
12897
12897
|
const ALIAS_MESSAGE = `points into src/ under its own name. Import source through "${SOURCE_ALIAS}": "${SOURCE_TARGET}" only, so an import names the layer and slice it uses instead of a folder alias.`;
|
|
12898
12898
|
const targetsOf = (target) => {
|
|
12899
|
-
if (Predicate.isString(target)) return [target];
|
|
12900
|
-
if (Predicate.isObject(target)) return pipe(Record.values(target), Array$1.flatMap(targetsOf));
|
|
12899
|
+
if (Predicate$1.isString(target)) return [target];
|
|
12900
|
+
if (Predicate$1.isObject(target)) return pipe(Record.values(target), Array$1.flatMap(targetsOf));
|
|
12901
12901
|
return [];
|
|
12902
12902
|
};
|
|
12903
12903
|
const intoSource = ([key, target]) => !(key === SOURCE_ALIAS && pipe(targetsOf(target), Array$1.every((path) => path === SOURCE_TARGET))) && pipe(targetsOf(target), Array$1.some((path) => SOURCE_PREFIX.test(path)));
|
|
@@ -12905,7 +12905,7 @@ const aliasProblems = Effect.fn("aliasProblems")(function* aliasProblems(root, w
|
|
|
12905
12905
|
const files = yield* RepositoryFiles;
|
|
12906
12906
|
const manifest = files.join(root, workspace, PACKAGE_JSON_FILE);
|
|
12907
12907
|
const text = yield* files.readFile(manifest);
|
|
12908
|
-
return pipe(text, Option.flatMap(decodePackageJson), Option.flatMap(({ imports }) => Option.liftPredicate(imports, Predicate.isObject)), Option.map((imports) => Record.toEntries(imports)), Option.getOrElse(() => Array$1.empty()), Array$1.filter(intoSource), Array$1.map(([key]) => problemInFile(ALIAS_RULE)(manifest, `"${key}" ${ALIAS_MESSAGE}`)));
|
|
12908
|
+
return pipe(text, Option.flatMap(decodePackageJson), Option.flatMap(({ imports }) => Option.liftPredicate(imports, Predicate$1.isObject)), Option.map((imports) => Record.toEntries(imports)), Option.getOrElse(() => Array$1.empty()), Array$1.filter(intoSource), Array$1.map(([key]) => problemInFile(ALIAS_RULE)(manifest, `"${key}" ${ALIAS_MESSAGE}`)));
|
|
12909
12909
|
});
|
|
12910
12910
|
/** @internal */
|
|
12911
12911
|
const checkSourceAliases = Effect.fn("checkSourceAliases")(function* checkSourceAliases(root) {
|
|
@@ -13111,7 +13111,7 @@ const WILDCARD$3 = /[*?[{]/u;
|
|
|
13111
13111
|
const SEPARATOR$19 = "/";
|
|
13112
13112
|
const RELATIVE$3 = ".";
|
|
13113
13113
|
const JSON_EXTENSION = ".json";
|
|
13114
|
-
const isObject = (node) => Predicate.isReadonlyObject(node) && node["type"] === "ObjectExpression";
|
|
13114
|
+
const isObject = (node) => Predicate$1.isReadonlyObject(node) && node["type"] === "ObjectExpression";
|
|
13115
13115
|
const firstObject = (node) => {
|
|
13116
13116
|
if (isObject(node)) return Option.some(node);
|
|
13117
13117
|
return pipe(childrenOf$4(node), Array$1.findFirst(firstObject));
|
|
@@ -13285,7 +13285,7 @@ const VITE$1 = {
|
|
|
13285
13285
|
};
|
|
13286
13286
|
const isPatternProperty = (keys) => (node) => node["type"] === "Property" && pipe(decodeKey$1(node["key"]), Option.exists((key) => Array$1.contains(keys, keyName(key))));
|
|
13287
13287
|
const patternsIn = (keys) => (node) => {
|
|
13288
|
-
if (Predicate.isReadonlyObject(node) && isPatternProperty(keys)(node)) return stringsIn(node["value"]);
|
|
13288
|
+
if (Predicate$1.isReadonlyObject(node) && isPatternProperty(keys)(node)) return stringsIn(node["value"]);
|
|
13289
13289
|
return pipe(childrenOf$4(node), Array$1.flatMap(patternsIn(keys)));
|
|
13290
13290
|
};
|
|
13291
13291
|
const choicesOf = ([literal = "", options]) => pipe(Option.fromUndefinedOr(options), Option.map(String$1.split(OPTION_SEPARATOR)), Option.getOrElse(() => [""]), Array$1.map((option) => `${literal}${option}`));
|
|
@@ -13368,7 +13368,7 @@ const READ_CONCURRENCY$25 = 8;
|
|
|
13368
13368
|
const decodeKey = Schema.decodeUnknownOption(KeySchema);
|
|
13369
13369
|
const isEntryProperty = (node) => node["type"] === "Property" && pipe(decodeKey(node["key"]), Option.exists((key) => Array$1.contains(ENTRY_KEYS, keyName(key))));
|
|
13370
13370
|
const entryPatternsIn = (node) => {
|
|
13371
|
-
if (Predicate.isReadonlyObject(node) && isEntryProperty(node)) return pipe(stringsIn(node["value"]), Array$1.map(({ text, start }) => ({
|
|
13371
|
+
if (Predicate$1.isReadonlyObject(node) && isEntryProperty(node)) return pipe(stringsIn(node["value"]), Array$1.map(({ text, start }) => ({
|
|
13372
13372
|
text,
|
|
13373
13373
|
start: start - WRAP_OFFSET
|
|
13374
13374
|
})));
|
|
@@ -13646,7 +13646,7 @@ const localFile = Effect.fn("localFile")(function* localFile({ directory, import
|
|
|
13646
13646
|
if (Option.isNone(target)) return Option.none();
|
|
13647
13647
|
return yield* existingSource(files.resolve(directory, target.value));
|
|
13648
13648
|
});
|
|
13649
|
-
const referenceOf$
|
|
13649
|
+
const referenceOf$1 = (graph, from, specifier) => {
|
|
13650
13650
|
if (RELATIVE$2.test(specifier) || String$1.startsWith(SUBPATH_IMPORT$1)(specifier)) return localFile(graph, from, specifier).pipe(Effect.map(Option.map(Result.succeed)));
|
|
13651
13651
|
const name = packageNameOf(specifier);
|
|
13652
13652
|
return Effect.succeedSome(Result.fail(name));
|
|
@@ -13657,7 +13657,7 @@ const referencesIn$1 = Effect.fn("referencesIn")(function* referencesIn(graph, f
|
|
|
13657
13657
|
onNone: () => [],
|
|
13658
13658
|
onSome: (source) => specifiersIn(graph.api, file, source)
|
|
13659
13659
|
});
|
|
13660
|
-
const references = yield* Effect.forEach(specifiers, (specifier) => referenceOf$
|
|
13660
|
+
const references = yield* Effect.forEach(specifiers, (specifier) => referenceOf$1(graph, file, specifier), { concurrency: 1 });
|
|
13661
13661
|
const found = Array$1.getSomes(references);
|
|
13662
13662
|
return {
|
|
13663
13663
|
packages: Array$1.getFailures(found),
|
|
@@ -13695,7 +13695,7 @@ const packagesByEntry = Effect.fn("packagesByEntry")(function* packagesByEntry(a
|
|
|
13695
13695
|
});
|
|
13696
13696
|
// src/features/measure-install-size/model/installed-closure.ts
|
|
13697
13697
|
const EMPTY$4 = 0;
|
|
13698
|
-
const installedNames = (manifest) => [...namesIn(manifest, ["dependencies", "optionalDependencies"]), ...pipe(namesIn(manifest, ["peerDependencies"]), Array$1.difference(optionalPeerNames(manifest)))];
|
|
13698
|
+
const installedNames = (manifest) => [...namesIn$1(manifest, ["dependencies", "optionalDependencies"]), ...pipe(namesIn$1(manifest, ["peerDependencies"]), Array$1.difference(optionalPeerNames(manifest)))];
|
|
13699
13699
|
const childrenOf$2 = Effect.fn("childrenOf")(function* childrenOf(directory) {
|
|
13700
13700
|
const files = yield* RepositoryFiles;
|
|
13701
13701
|
const text = yield* files.readFile(files.join(directory, PACKAGE_JSON_FILE));
|
|
@@ -13842,7 +13842,7 @@ const problemsOf$1 = Effect.fn("problemsOf")(function* problemsOf(workspace, fil
|
|
|
13842
13842
|
join: (target) => files.join(workspace.directory, target),
|
|
13843
13843
|
packEntries: workspace.packEntries
|
|
13844
13844
|
});
|
|
13845
|
-
const provided = HashSet.fromIterable(namesIn(manifest.value, ["peerDependencies"]));
|
|
13845
|
+
const provided = HashSet.fromIterable(namesIn$1(manifest.value, ["peerDependencies"]));
|
|
13846
13846
|
const sized = yield* sizeProblems$1({
|
|
13847
13847
|
workspace,
|
|
13848
13848
|
entries,
|
|
@@ -13868,7 +13868,7 @@ const checkPublishedPackages = Effect.fn("checkPublishedPackages")(function* che
|
|
|
13868
13868
|
// src/shared/lib/base-revision.ts
|
|
13869
13869
|
const DEFAULT_BASE = "origin/main";
|
|
13870
13870
|
/** @internal */
|
|
13871
|
-
const baseName = Config.option(Config.String("VPA_BASE")).pipe(Effect.orDie, Effect.map(Option.getOrElse(() => DEFAULT_BASE)));
|
|
13871
|
+
const baseName = Config$1.option(Config$1.String("VPA_BASE")).pipe(Effect.orDie, Effect.map(Option.getOrElse(() => DEFAULT_BASE)));
|
|
13872
13872
|
/** @internal */
|
|
13873
13873
|
const baseRevision = Effect.fn("baseRevision")(function* baseRevision(root) {
|
|
13874
13874
|
const files = yield* RepositoryFiles;
|
|
@@ -13929,7 +13929,7 @@ const ERROR_LINE = /\[[A-Z_]+\]/u;
|
|
|
13929
13929
|
const SHOWN_ERRORS = 3;
|
|
13930
13930
|
const HEADER = "Build failed";
|
|
13931
13931
|
const NO_DETAIL = "Run the bundle to see the error.";
|
|
13932
|
-
const linesOf$1 = (error) => pipe(Option.liftPredicate(error, Predicate.isError), Option.map(({ message }) => message), Option.getOrElse(() => String(error)), stripVTControlCharacters, String$1.split("\n"), Array$1.map(String$1.trim), Array$1.filter(String$1.isNonEmpty));
|
|
13932
|
+
const linesOf$1 = (error) => pipe(Option.liftPredicate(error, Predicate$1.isError), Option.map(({ message }) => message), Option.getOrElse(() => String(error)), stripVTControlCharacters, String$1.split("\n"), Array$1.map(String$1.trim), Array$1.filter(String$1.isNonEmpty));
|
|
13933
13933
|
const bundleErrorDetail = (error) => {
|
|
13934
13934
|
const lines = linesOf$1(error);
|
|
13935
13935
|
return pipe(lines, Array$1.filter((line) => ERROR_LINE.test(line)), Array$1.take(SHOWN_ERRORS), Array$1.match({
|
|
@@ -13944,7 +13944,7 @@ const ALIAS$1 = /\s+as\s+\S+$/u;
|
|
|
13944
13944
|
const VENDOR_FILE = /^(?<name>[\w.-]+)\.js$/u;
|
|
13945
13945
|
const SEPARATOR$15 = "/";
|
|
13946
13946
|
const valueNames = (list) => pipe(String$1.split(list, ","), Array$1.map(String$1.trim), Array$1.filter((name) => String$1.isNonEmpty(name) && !TYPE_PREFIX.test(name)), Array$1.map(String$1.replace(ALIAS$1, "")));
|
|
13947
|
-
const declarationOf = (match) => pipe(Option.fromNullishOr(match.groups), Option.filter((groups) => !Predicate.isString(groups["kind"])), Option.flatMap((groups) => Option.all({
|
|
13947
|
+
const declarationOf = (match) => pipe(Option.fromNullishOr(match.groups), Option.filter((groups) => !Predicate$1.isString(groups["kind"])), Option.flatMap((groups) => Option.all({
|
|
13948
13948
|
specifier: Option.fromNullishOr(groups["specifier"]),
|
|
13949
13949
|
list: Option.fromNullishOr(groups["names"])
|
|
13950
13950
|
})), Option.map(({ specifier, list }) => ({
|
|
@@ -14108,7 +14108,7 @@ const NOT_A_PACKAGE = /^(?:\.|\/|[A-Za-z]:[\\/])/u;
|
|
|
14108
14108
|
/** @internal */
|
|
14109
14109
|
const unresolvedIn = (chunks) => {
|
|
14110
14110
|
const emitted = pipe(chunks, Array$1.map(({ fileName }) => fileName));
|
|
14111
|
-
return pipe(chunks, Array$1.flatMap((chunk) => chunk.imports), Array$1.filter((specifier) => !NOT_A_PACKAGE.test(specifier) && !isBuiltin(specifier) && !Array$1.contains(emitted, specifier)), Array$1.map(packageNameOf), Array$1.dedupe, Array$1.sortBy(Order.String));
|
|
14111
|
+
return pipe(chunks, Array$1.flatMap((chunk) => chunk.imports), Array$1.filter((specifier) => !NOT_A_PACKAGE.test(specifier) && !isBuiltin$1(specifier) && !Array$1.contains(emitted, specifier)), Array$1.map(packageNameOf), Array$1.dedupe, Array$1.sortBy(Order.String));
|
|
14112
14112
|
};
|
|
14113
14113
|
const isChunk$1 = (item) => item.type === "chunk";
|
|
14114
14114
|
const optionsFor$1 = (entries) => ({
|
|
@@ -14116,7 +14116,7 @@ const optionsFor$1 = (entries) => ({
|
|
|
14116
14116
|
platform: "node",
|
|
14117
14117
|
logLevel: "silent",
|
|
14118
14118
|
treeshake: false,
|
|
14119
|
-
external: (specifier) => isBuiltin(specifier)
|
|
14119
|
+
external: (specifier) => isBuiltin$1(specifier)
|
|
14120
14120
|
});
|
|
14121
14121
|
/** @internal */
|
|
14122
14122
|
const unresolvedFrom = (entries) => Effect.acquireUseRelease(Effect.tryPromise({
|
|
@@ -14245,13 +14245,13 @@ const taggedError$11 = Schema.TaggedError;
|
|
|
14245
14245
|
var BundleFailed = class extends taggedError$11()("BundleFailed", { detail: Schema.String }) {};
|
|
14246
14246
|
const failed = (error) => BundleFailed.make({ detail: bundleErrorDetail(error) });
|
|
14247
14247
|
const isBare = (specifier) => !String$1.startsWith(RELATIVE_PREFIX)(specifier) && !String$1.startsWith(SUBPATH_IMPORT)(specifier) && !ABSOLUTE.test(specifier) && !String$1.startsWith(VIRTUAL_PREFIX)(specifier);
|
|
14248
|
-
const isBuiltin
|
|
14248
|
+
const isBuiltin = (specifier) => String$1.startsWith(NODE_PROTOCOL)(specifier) || builtins.has(packageNameOf(specifier));
|
|
14249
14249
|
const matchesPattern = (name) => (pattern) => {
|
|
14250
|
-
if (Predicate.isString(pattern)) return pattern === name;
|
|
14250
|
+
if (Predicate$1.isString(pattern)) return pattern === name;
|
|
14251
14251
|
return pattern.test(name);
|
|
14252
14252
|
};
|
|
14253
14253
|
const isBundledBy = (bundled, name) => pipe(bundled, Array$1.some(matchesPattern(name)));
|
|
14254
|
-
const isExternal = ({ declared, bundled }) => (specifier, importer) => Predicate.isNotUndefined(importer) && isBare(specifier) && (isBuiltin
|
|
14254
|
+
const isExternal = ({ declared, bundled }) => (specifier, importer) => Predicate$1.isNotUndefined(importer) && isBare(specifier) && (isBuiltin(specifier) || Array$1.contains(declared, packageNameOf(specifier)) && !isBundledBy(bundled, packageNameOf(specifier)));
|
|
14255
14255
|
const consumerSource = ({ entry, member }) => Option.match(member, {
|
|
14256
14256
|
onNone: () => `export * from ${quote(entry)};\n`,
|
|
14257
14257
|
onSome: (name) => `import * as ${NAMESPACE} from ${quote(entry)};\nglobalThis.used = ${NAMESPACE}[${quote(name)}];\n`
|
|
@@ -14286,7 +14286,7 @@ const optionsFor = (scope, input, effectful) => {
|
|
|
14286
14286
|
};
|
|
14287
14287
|
};
|
|
14288
14288
|
const isChunk = (item) => item.type === "chunk";
|
|
14289
|
-
const packagesIn = (specifiers) => pipe(specifiers, Array$1.filter((specifier) => isBare(specifier) && !isBuiltin
|
|
14289
|
+
const packagesIn = (specifiers) => pipe(specifiers, Array$1.filter((specifier) => isBare(specifier) && !isBuiltin(specifier)), Array$1.map(packageNameOf), Array$1.dedupe, Array$1.sortBy(Order.String));
|
|
14290
14290
|
const importsOf$2 = (byFile) => (file) => Option.match(Record.get(byFile, file), {
|
|
14291
14291
|
onNone: () => [],
|
|
14292
14292
|
onSome: (chunk) => chunk.imports
|
|
@@ -14481,7 +14481,7 @@ const IMPORT_MESSAGE = "imports a module only for its effect, but sideEffects in
|
|
|
14481
14481
|
const STATEMENT_MESSAGE = "runs a statement at the top level for its effect, but sideEffects in package.json does not list this file, so a bundler drops the module when nothing it exports is used. Move the statement into a function that the caller runs, or list the entry that exists for its effect in sideEffects.";
|
|
14482
14482
|
const isEffect = (statement) => {
|
|
14483
14483
|
if (isExpressionStatement(statement)) return !isStringLiteral(statement.expression);
|
|
14484
|
-
return isImportDeclaration(statement) && Predicate.isUndefined(statement.importClause);
|
|
14484
|
+
return isImportDeclaration(statement) && Predicate$1.isUndefined(statement.importClause);
|
|
14485
14485
|
};
|
|
14486
14486
|
const messageOf$4 = (statement) => {
|
|
14487
14487
|
if (isImportDeclaration(statement)) return IMPORT_MESSAGE;
|
|
@@ -14518,7 +14518,7 @@ const packageDirectoryOf = (manifests, files) => (module) => {
|
|
|
14518
14518
|
const undeclaredAt = Effect.fn("undeclaredAt")(function* undeclaredAt(directory) {
|
|
14519
14519
|
const files = yield* RepositoryFiles;
|
|
14520
14520
|
const text = yield* files.readFile(files.join(directory, PACKAGE_JSON_FILE));
|
|
14521
|
-
return pipe(text, Option.flatMap(decodePackageJson), Option.filter(({ sideEffects }) => Predicate.isUndefined(sideEffects) || sideEffects === true), Option.map(({ name }) => ({
|
|
14521
|
+
return pipe(text, Option.flatMap(decodePackageJson), Option.filter(({ sideEffects }) => Predicate$1.isUndefined(sideEffects) || sideEffects === true), Option.map(({ name }) => ({
|
|
14522
14522
|
directory,
|
|
14523
14523
|
name: name ?? directory
|
|
14524
14524
|
})));
|
|
@@ -14793,7 +14793,7 @@ const MSCH_RELAXATIONS = [
|
|
|
14793
14793
|
decisionTestRules
|
|
14794
14794
|
];
|
|
14795
14795
|
const isList = (value) => Array$1.isArray(value);
|
|
14796
|
-
const isSection = (value) => Predicate.isObject(value) && !Array$1.isArray(value);
|
|
14796
|
+
const isSection = (value) => Predicate$1.isObject(value) && !Array$1.isArray(value);
|
|
14797
14797
|
const sectionOf = (value) => pipe(Option.some(value), Option.filter(isSection), Option.getOrElse(() => ({})));
|
|
14798
14798
|
const listOf$2 = (value) => pipe(Option.some(value), Option.filter(isList), Option.getOrElse(() => []));
|
|
14799
14799
|
const severityOf = (value) => pipe(listOf$2(value), Array$1.head, Option.getOrElse(() => value));
|
|
@@ -14873,7 +14873,7 @@ const taskWeakenings = (run, expected) => {
|
|
|
14873
14873
|
return [
|
|
14874
14874
|
...pipe(Record.toEntries(expected.tasks), Array$1.filter(([name, command]) => {
|
|
14875
14875
|
const actual = sectionOf(tasks[name])["command"];
|
|
14876
|
-
return !Equal.equals(actual, command) && !(Predicate.isString(command) && Equal.equals(actual, meteredCommand(command)));
|
|
14876
|
+
return !Equal.equals(actual, command) && !(Predicate$1.isString(command) && Equal.equals(actual, meteredCommand(command)));
|
|
14877
14877
|
}), Array$1.map(([name]) => ({
|
|
14878
14878
|
anchor: "run",
|
|
14879
14879
|
message: `The ${name} task does not run what msch builds for it. Leave msch's tasks as repositoryConfig builds them; add other work under another task name.`
|
|
@@ -15034,7 +15034,7 @@ const RULE$43 = "hand-written-names";
|
|
|
15034
15034
|
const TEST_FILE$1 = /\.test(?:\.[\w-]+)?\.[cm]?tsx?$/u;
|
|
15035
15035
|
const nameListOf = (site) => {
|
|
15036
15036
|
if (TEST_FILE$1.test(site.file) || site.values.length < 2) return Option.none();
|
|
15037
|
-
const names = pipe(site.values, Array$1.filter(Predicate.isString));
|
|
15037
|
+
const names = pipe(site.values, Array$1.filter(Predicate$1.isString));
|
|
15038
15038
|
return Option.liftPredicate({
|
|
15039
15039
|
site,
|
|
15040
15040
|
names
|
|
@@ -15066,9 +15066,9 @@ const outsideTypeIn = (project) => {
|
|
|
15066
15066
|
const isGlobalType = (name) => pipe(Option.fromNullishOr(project.checker.resolveName(name, SymbolFlags.Type)), Option.map(declarationsOf), Option.exists((declarations) => declaresAType(declarations) && !carriesTag(name)(declarations) && pipe(declarations, Array$1.every(isOutside))));
|
|
15067
15067
|
return (name) => known.getOrInsertComputed(name, () => IDENTIFIER.test(name) && !HashSet.has(values, name) && (HashSet.has(exported, name) || isGlobalType(name)));
|
|
15068
15068
|
};
|
|
15069
|
-
const namesIn
|
|
15069
|
+
const namesIn = (list) => pipe(list.elements, Array$1.filter(isStringLiteral), Array$1.map((element) => element.text));
|
|
15070
15070
|
const problemIn$1 = (isOutsideType) => (list) => {
|
|
15071
|
-
const names = namesIn
|
|
15071
|
+
const names = namesIn(list);
|
|
15072
15072
|
const outside = pipe(names, Array$1.filter(isOutsideType));
|
|
15073
15073
|
if (outside.length < Math.max(2, names.length / HALF)) return Option.none();
|
|
15074
15074
|
return Option.some(listedProblem({
|
|
@@ -15883,10 +15883,10 @@ const candidateOf = (node) => {
|
|
|
15883
15883
|
wrapper
|
|
15884
15884
|
})));
|
|
15885
15885
|
};
|
|
15886
|
-
const changesTheCall = (wrapper) => Predicate.isNotUndefined(wrapper.asteriskToken) || Option.exists(Option.fromUndefinedOr(wrapper.type), (type) => type.kind === SyntaxKind.TypePredicate) || pipe(wrapper.modifiers ?? [], Array$1.some((modifier) => modifier.kind === SyntaxKind.AsyncKeyword));
|
|
15886
|
+
const changesTheCall = (wrapper) => Predicate$1.isNotUndefined(wrapper.asteriskToken) || Option.exists(Option.fromUndefinedOr(wrapper.type), (type) => type.kind === SyntaxKind.TypePredicate) || pipe(wrapper.modifiers ?? [], Array$1.some((modifier) => modifier.kind === SyntaxKind.AsyncKeyword));
|
|
15887
15887
|
const returnedExpression = (wrapper) => {
|
|
15888
15888
|
const { body } = wrapper;
|
|
15889
|
-
if (Predicate.isUndefined(body)) return Option.none();
|
|
15889
|
+
if (Predicate$1.isUndefined(body)) return Option.none();
|
|
15890
15890
|
if (!isBlock(body)) return Option.some(body);
|
|
15891
15891
|
if (body.statements.length !== SINGLE_STATEMENT) return Option.none();
|
|
15892
15892
|
return pipe(Array$1.head(body.statements), Option.filter((statement) => isReturnStatement(statement)), Option.flatMap((statement) => Option.fromUndefinedOr(statement.expression)));
|
|
@@ -15896,8 +15896,8 @@ const callForward = (call) => ({
|
|
|
15896
15896
|
callee: call.expression,
|
|
15897
15897
|
kind: SignatureKind.Call,
|
|
15898
15898
|
arguments: call.arguments,
|
|
15899
|
-
typed: Predicate.isNotUndefined(call.typeArguments),
|
|
15900
|
-
optional: Predicate.isNotUndefined(call.questionDotToken)
|
|
15899
|
+
typed: Predicate$1.isNotUndefined(call.typeArguments),
|
|
15900
|
+
optional: Predicate$1.isNotUndefined(call.questionDotToken)
|
|
15901
15901
|
});
|
|
15902
15902
|
const forwardOf = (expression) => {
|
|
15903
15903
|
const inner = unwrapped(expression);
|
|
@@ -15907,22 +15907,22 @@ const forwardOf = (expression) => {
|
|
|
15907
15907
|
callee: inner.expression,
|
|
15908
15908
|
kind: SignatureKind.Construct,
|
|
15909
15909
|
arguments: inner.arguments ?? NO_ARGUMENTS,
|
|
15910
|
-
typed: Predicate.isNotUndefined(inner.typeArguments),
|
|
15910
|
+
typed: Predicate$1.isNotUndefined(inner.typeArguments),
|
|
15911
15911
|
optional: false
|
|
15912
15912
|
});
|
|
15913
15913
|
return Option.none();
|
|
15914
15914
|
};
|
|
15915
15915
|
const rootOf = (callee) => {
|
|
15916
15916
|
if (isIdentifier(callee)) return Option.some(callee);
|
|
15917
|
-
if (isPropertyAccessExpression(callee) && Predicate.isUndefined(callee.questionDotToken) && isIdentifier(callee.name)) return rootOf(callee.expression);
|
|
15917
|
+
if (isPropertyAccessExpression(callee) && Predicate$1.isUndefined(callee.questionDotToken) && isIdentifier(callee.name)) return rootOf(callee.expression);
|
|
15918
15918
|
return Option.none();
|
|
15919
15919
|
};
|
|
15920
15920
|
const parameterName = (parameter) => {
|
|
15921
15921
|
const { name } = parameter;
|
|
15922
|
-
if (!isIdentifier(name) || Predicate.isNotUndefined(parameter.initializer) || name.text === THIS_PARAMETER) return Option.none();
|
|
15922
|
+
if (!isIdentifier(name) || Predicate$1.isNotUndefined(parameter.initializer) || name.text === THIS_PARAMETER) return Option.none();
|
|
15923
15923
|
return Option.some(name.text);
|
|
15924
15924
|
};
|
|
15925
|
-
const isRest = (parameter) => Predicate.isNotUndefined(parameter.dotDotDotToken);
|
|
15925
|
+
const isRest = (parameter) => Predicate$1.isNotUndefined(parameter.dotDotDotToken);
|
|
15926
15926
|
const forwardsParameter = ([parameter, name, argument]) => {
|
|
15927
15927
|
if (!isRest(parameter)) return isIdentifier(argument) && argument.text === name;
|
|
15928
15928
|
return isSpreadElement(argument) && isIdentifier(argument.expression) && argument.expression.text === name;
|
|
@@ -16034,11 +16034,11 @@ const PLUGIN_PATH = /(?<optional>--env-file-if-exists=)?\$\{?CLAUDE_PLUGIN_ROOT\
|
|
|
16034
16034
|
const PLUGIN_ROOT = "..";
|
|
16035
16035
|
const READ_CONCURRENCY$18 = 16;
|
|
16036
16036
|
const START$24 = 0;
|
|
16037
|
-
const referenceOf
|
|
16037
|
+
const referenceOf = (found) => pipe(groupOf("path")(found), Option.filter(() => Option.isNone(groupOf("optional")(found))), Option.map((path) => ({
|
|
16038
16038
|
path,
|
|
16039
16039
|
index: found.index ?? START$24
|
|
16040
16040
|
})), Option.toArray);
|
|
16041
|
-
const referencesIn = (pattern, source) => pipe(Array$1.fromIterable(String$1.matchAll(pattern)(source)), Array$1.flatMap(referenceOf
|
|
16041
|
+
const referencesIn = (pattern, source) => pipe(Array$1.fromIterable(String$1.matchAll(pattern)(source)), Array$1.flatMap(referenceOf));
|
|
16042
16042
|
const problemsIn$13 = Effect.fn("problemsIn")(function* problemsIn({ root, file, base, pattern }) {
|
|
16043
16043
|
const files = yield* RepositoryFiles;
|
|
16044
16044
|
const text = yield* files.readFile(file);
|
|
@@ -16469,7 +16469,7 @@ const START$22 = 0;
|
|
|
16469
16469
|
const startOf$1 = (range) => pipe(Option.fromNullishOr(range), Option.map(([start]) => start), Option.getOrElse(() => START$22));
|
|
16470
16470
|
const runScriptsOf = (source) => {
|
|
16471
16471
|
const found = [];
|
|
16472
|
-
visit(parseDocument(source), { Pair: (_key, pair) => {
|
|
16472
|
+
visit$1(parseDocument(source), { Pair: (_key, pair) => {
|
|
16473
16473
|
if (isPair(pair) && isScalar(pair.key) && pair.key.value === RUN_KEY && isScalar(pair.value) && typeof pair.value.value === "string") found.push({
|
|
16474
16474
|
text: pair.value.value,
|
|
16475
16475
|
start: startOf$1(pair.value.range)
|
|
@@ -16560,9 +16560,9 @@ const hookSources = (file, name) => (source) => pipe(String$1.split(source, LINE
|
|
|
16560
16560
|
text
|
|
16561
16561
|
})));
|
|
16562
16562
|
const commandIn = (node) => {
|
|
16563
|
-
if (!Predicate.isReadonlyObject(node)) return Option.none();
|
|
16563
|
+
if (!Predicate$1.isReadonlyObject(node)) return Option.none();
|
|
16564
16564
|
const record = node;
|
|
16565
|
-
return pipe(Option.fromUndefinedOr(record[COMMAND_KEY]), Option.filter(Predicate.isString), Option.map((command) => pipe(decodeArguments(record[ARGUMENTS_KEY]), Option.getOrElse(() => []), Array$1.prepend(command), Array$1.join(" "))));
|
|
16565
|
+
return pipe(Option.fromUndefinedOr(record[COMMAND_KEY]), Option.filter(Predicate$1.isString), Option.map((command) => pipe(decodeArguments(record[ARGUMENTS_KEY]), Option.getOrElse(() => []), Array$1.prepend(command), Array$1.join(" "))));
|
|
16566
16566
|
};
|
|
16567
16567
|
const commandsIn = (node) => [...Option.toArray(commandIn(node)), ...pipe(childrenOf$4(node), Array$1.flatMap(commandsIn))];
|
|
16568
16568
|
const agentSources = (file) => (source) => pipe(decodeJson$1(source), Option.map(commandsIn), Option.getOrElse(() => []), Array$1.map((text) => {
|
|
@@ -16888,7 +16888,7 @@ const loadGrammars = Effect.fn("loadGrammars")(function* loadGrammars() {
|
|
|
16888
16888
|
const commentNodesIn = (language, source) => pipe(readTree({
|
|
16889
16889
|
language,
|
|
16890
16890
|
source,
|
|
16891
|
-
read: (root) => pipe(root.descendantsOfType(COMMENT_NODES), Array$1.filter(Predicate.isNotNullish), Array$1.map((node) => ({
|
|
16891
|
+
read: (root) => pipe(root.descendantsOfType(COMMENT_NODES), Array$1.filter(Predicate$1.isNotNullish), Array$1.map((node) => ({
|
|
16892
16892
|
index: node.startIndex,
|
|
16893
16893
|
text: node.text
|
|
16894
16894
|
})))
|
|
@@ -17063,7 +17063,7 @@ const unusedAllowances = Effect.fn("unusedAllowances")(function* unusedAllowance
|
|
|
17063
17063
|
return pipe(settings.allow, Array$1.filter((_entry, index) => !HashSet.has(used, index)), Array$1.map((entry) => problemAtIndex(UNUSED_RULE)(file, source)(entryOffset(source, entry), unusedMessage(entry))));
|
|
17064
17064
|
});
|
|
17065
17065
|
const scanFile = ({ directives, allowances, comments }) => ({ name, file }, source) => {
|
|
17066
|
-
const kept = Predicate.not(isAllowed(source, directives));
|
|
17066
|
+
const kept = Predicate$1.not(isAllowed(source, directives));
|
|
17067
17067
|
const toProblem = problemOf$4(file, source);
|
|
17068
17068
|
return Option.match(readerOf(name)(source), {
|
|
17069
17069
|
onNone: () => Effect.succeed(NOTHING),
|
|
@@ -17439,7 +17439,7 @@ const rangeOf$2 = (found) => {
|
|
|
17439
17439
|
return [start, start + found[START$17].length];
|
|
17440
17440
|
};
|
|
17441
17441
|
const isOutside = (ranges) => ({ index }) => !pipe(ranges, Array$1.some(([start, end]) => index >= start && index < end));
|
|
17442
|
-
const linksIn
|
|
17442
|
+
const linksIn = (source) => {
|
|
17443
17443
|
const code = pipe(Array$1.fromIterable(String$1.matchAll(CODE)(source)), Array$1.map(rangeOf$2));
|
|
17444
17444
|
return pipe(Array$1.fromIterable(String$1.matchAll(LINK)(source)), Array$1.flatMap(linkOf), Array$1.filter(isOutside(code)));
|
|
17445
17445
|
};
|
|
@@ -17450,7 +17450,7 @@ const linkProblems = Effect.fn("linkProblems")(function* linkProblems(file) {
|
|
|
17450
17450
|
const source = text.value;
|
|
17451
17451
|
const directory = files.dirname(file);
|
|
17452
17452
|
const isMissing = ({ target }) => files.exists(files.join(directory, target)).pipe(Effect.map((exists) => !exists));
|
|
17453
|
-
const missing = yield* Effect.filter(linksIn
|
|
17453
|
+
const missing = yield* Effect.filter(linksIn(source), isMissing);
|
|
17454
17454
|
return pipe(missing, Array$1.map(({ target, index }) => ({
|
|
17455
17455
|
file,
|
|
17456
17456
|
...positionOf(source)(index),
|
|
@@ -17670,23 +17670,23 @@ const packageAt$1 = (file, text) => pipe(decodeVersionedPackageJson(text), Optio
|
|
|
17670
17670
|
name: manifest.name,
|
|
17671
17671
|
version: manifest.version,
|
|
17672
17672
|
text,
|
|
17673
|
-
depends: namesIn(manifest, DEPENDENCY_SECTIONS)
|
|
17673
|
+
depends: namesIn$1(manifest, DEPENDENCY_SECTIONS)
|
|
17674
17674
|
})));
|
|
17675
17675
|
const hiddenAt = (file, text) => pipe(decodePackageJson(text), Option.filter((manifest) => manifest.private === true), Option.flatMap((manifest) => Option.map(Option.fromUndefinedOr(manifest.name), (name) => [name, {
|
|
17676
17676
|
directory: directoryOf$1(file),
|
|
17677
|
-
depends: namesIn(manifest, DEPENDENCY_SECTIONS)
|
|
17677
|
+
depends: namesIn$1(manifest, DEPENDENCY_SECTIONS)
|
|
17678
17678
|
}])));
|
|
17679
|
-
const visit
|
|
17679
|
+
const visit = (hidden, seen, name) => {
|
|
17680
17680
|
if (seen.has(name)) return seen;
|
|
17681
17681
|
return Option.match(Option.fromUndefinedOr(hidden.get(name)), {
|
|
17682
17682
|
onNone: () => seen,
|
|
17683
17683
|
onSome: (found) => {
|
|
17684
17684
|
const added = /* @__PURE__ */ new Set([...seen, name]);
|
|
17685
|
-
return Array$1.reduce(found.depends, added, (next, dependency) => visit
|
|
17685
|
+
return Array$1.reduce(found.depends, added, (next, dependency) => visit(hidden, next, dependency));
|
|
17686
17686
|
}
|
|
17687
17687
|
});
|
|
17688
17688
|
};
|
|
17689
|
-
const bundledBy = (hidden, depends) => [...Array$1.reduce(depends, /* @__PURE__ */ new Set(), (seen, name) => visit
|
|
17689
|
+
const bundledBy = (hidden, depends) => [...Array$1.reduce(depends, /* @__PURE__ */ new Set(), (seen, name) => visit(hidden, seen, name))];
|
|
17690
17690
|
const hiddenPackagesIn = (manifests) => new Map(pipe(manifests, Array$1.flatMap(({ file, text }) => Option.toArray(hiddenAt(file, text)))));
|
|
17691
17691
|
const versionAt$1 = (name, text) => pipe(text, Option.flatMap(decodeVersionedPackageJson), Option.filter((manifest) => manifest.name === name), Option.map(({ version }) => version), Option.filter((version) => semver.valid(version) !== null));
|
|
17692
17692
|
const versionLine = (text) => pipe(String$1.split(text, "\n"), Array$1.findFirstIndex((line) => String$1.includes("\"version\"")(line)), Option.match({
|
|
@@ -17748,7 +17748,7 @@ const SEPARATOR$9 = "/";
|
|
|
17748
17748
|
const isApplied = ({ bins, keywords }) => Array$1.isReadonlyArrayNonEmpty(bins) || pipe(keywords, Array$1.some((keyword) => Array$1.contains(PLUGIN_KEYWORDS, keyword)));
|
|
17749
17749
|
const BY_LENGTH = Order.mapInput(Order.Number, (text) => text.length);
|
|
17750
17750
|
const escaped$1 = (text) => String$1.replaceAll(/[.*+?^${}()|[\]\\]/gu, String.raw`\$&`)(text);
|
|
17751
|
-
const declaredNames = (manifest) => namesIn(manifest, [
|
|
17751
|
+
const declaredNames = (manifest) => namesIn$1(manifest, [
|
|
17752
17752
|
"dependencies",
|
|
17753
17753
|
"devDependencies",
|
|
17754
17754
|
"peerDependencies"
|
|
@@ -18122,7 +18122,7 @@ const ownerOffsets = ({ owner, scopes, source }) => {
|
|
|
18122
18122
|
const isAllowed = (start) => pipe(allowed, Array$1.some((span) => span.start <= start && start < span.end));
|
|
18123
18123
|
return pipe(spansOf(named, source), Array$1.filter(({ start }) => !isAllowed(start)), Array$1.map(({ start }) => start));
|
|
18124
18124
|
};
|
|
18125
|
-
const scopesOf = (manifest) => pipe([...Option.toArray(Option.fromUndefinedOr(manifest.name)), ...namesIn(manifest, DECLARED)], Array$1.flatMap((name) => Option.toArray(scopeOfName(name))), Array$1.dedupe);
|
|
18125
|
+
const scopesOf = (manifest) => pipe([...Option.toArray(Option.fromUndefinedOr(manifest.name)), ...namesIn$1(manifest, DECLARED)], Array$1.flatMap((name) => Option.toArray(scopeOfName(name))), Array$1.dedupe);
|
|
18126
18126
|
const describedText = (manifest) => pipe([manifest.description ?? "", ...manifest.keywords ?? []], Array$1.join("\n"));
|
|
18127
18127
|
const manifestProblems$3 = ({ owner, file, manifest }) => pipe(ownerOffsets({
|
|
18128
18128
|
owner,
|
|
@@ -18257,8 +18257,8 @@ const Plugin = Schema.Struct({
|
|
|
18257
18257
|
});
|
|
18258
18258
|
const Plugins = Schema.Array(Plugin);
|
|
18259
18259
|
const CompilerOptions = Schema.Struct({ plugins: Schema.optional(Plugins) });
|
|
18260
|
-
const Config
|
|
18261
|
-
const decodeConfig = Schema.decodeUnknownOption(Schema.fromJsonString(Config
|
|
18260
|
+
const Config = Schema.Struct({ compilerOptions: Schema.optional(CompilerOptions) });
|
|
18261
|
+
const decodeConfig = Schema.decodeUnknownOption(Schema.fromJsonString(Config));
|
|
18262
18262
|
const MESSAGE$2 = `The \`${PLUGIN}\` plugin reports the Effect diagnostics during the type check, and the \`effecttsgo\` lint rules that msch enables report the same ones again. Set \`"diagnostics": false\` on the plugin so that each finding is reported once, by the lint rules, with the severity msch sets.`;
|
|
18263
18263
|
const reportsDiagnostics = (plugin) => plugin.name === PLUGIN && plugin.diagnostics !== false;
|
|
18264
18264
|
const problemsIn$5 = (entry, source) => pipe(decodeConfig(source), Option.flatMap(({ compilerOptions }) => Option.fromUndefinedOr(compilerOptions)), Option.flatMap(({ plugins }) => Option.fromUndefinedOr(plugins)), Option.filter(Array$1.some(reportsDiagnostics)), Option.map(() => ({
|
|
@@ -18561,7 +18561,7 @@ const rangeProblem = (entry, source) => (range) => problemAt({
|
|
|
18561
18561
|
source,
|
|
18562
18562
|
index: offsetOf(source, ENGINES_KEY)
|
|
18563
18563
|
}, `${SUPPORTED} engines.node is "${range}", which admits an older one. Set it to ">=${String(MINIMUM)}".`);
|
|
18564
|
-
const isPublished = (manifest) => manifest.private !== true && Predicate.isNotUndefined(manifest.publishConfig);
|
|
18564
|
+
const isPublished = (manifest) => manifest.private !== true && Predicate$1.isNotUndefined(manifest.publishConfig);
|
|
18565
18565
|
const rangeOf$1 = (manifest) => pipe(Option.fromUndefinedOr(manifest.engines), Option.flatMap(({ node }) => Option.fromUndefinedOr(node)));
|
|
18566
18566
|
const manifestProblems$1 = (entry, source) => {
|
|
18567
18567
|
const manifest = decodePackageJson(source);
|
|
@@ -18767,7 +18767,7 @@ const decodePlugin = Schema.decodeUnknownOption(PluginManifest);
|
|
|
18767
18767
|
const encodeMarketplace = Schema.encodeEffect(Marketplace);
|
|
18768
18768
|
const marketplaceName = (packageName) => pipe(String$1.toLowerCase(packageName), String$1.replace(/^@/u, ""), String$1.replaceAll(/[^a-z0-9]+/gu, "-"), String$1.replaceAll(/^-+|-+$/gu, ""));
|
|
18769
18769
|
const ownerOf = (author) => {
|
|
18770
|
-
if (Predicate.isString(author)) return { name: author };
|
|
18770
|
+
if (Predicate$1.isString(author)) return { name: author };
|
|
18771
18771
|
return author;
|
|
18772
18772
|
};
|
|
18773
18773
|
const sourceOf = (project) => pipe(project.packageName, Option.filter(() => project.published), Option.match({
|
|
@@ -19335,7 +19335,7 @@ const publicLookup = (url) => jsonLookup({
|
|
|
19335
19335
|
token: Option.none()
|
|
19336
19336
|
});
|
|
19337
19337
|
/** @internal */
|
|
19338
|
-
const githubToken = Config.option(Config.String("GH_TOKEN").pipe(Config.orElse(() => Config.String("GITHUB_TOKEN")))).pipe(Effect.orElseSucceed(() => Option.none()));
|
|
19338
|
+
const githubToken = Config$1.option(Config$1.String("GH_TOKEN").pipe(Config$1.orElse(() => Config$1.String("GITHUB_TOKEN")))).pipe(Effect.orElseSucceed(() => Option.none()));
|
|
19339
19339
|
// src/shared/lib/package-routes.ts
|
|
19340
19340
|
/** @internal */
|
|
19341
19341
|
const packageRoutes = Effect.fn("packageRoutes")(function* packageRoutes(root) {
|
|
@@ -19793,7 +19793,7 @@ const textsUnder = Effect.fn("textsUnder")(function* textsUnder(directory, label
|
|
|
19793
19793
|
const EXPORT_RULE = "uncalled-export";
|
|
19794
19794
|
const SEPARATOR$4 = "/";
|
|
19795
19795
|
const NAME_GROUP$1 = "name";
|
|
19796
|
-
const ROOT_SUBPATH
|
|
19796
|
+
const ROOT_SUBPATH = ".";
|
|
19797
19797
|
const MANIFEST_SUBPATH = "./package.json";
|
|
19798
19798
|
const WILDCARD = "*";
|
|
19799
19799
|
const SPECIFIER_ENDS = [
|
|
@@ -19809,8 +19809,8 @@ const JSX_IMPORT_SOURCE = "jsxImportSource";
|
|
|
19809
19809
|
const RELATIVE = /^\.\//u;
|
|
19810
19810
|
const DOCUMENT = /\.mdx?$/u;
|
|
19811
19811
|
const EXPORT_MESSAGE = "is exported, and nothing imports it. Every name that code outside a package can use exists only while something uses it, and fallow never reports what an entry exports as unused. Delete the subpath, or import it from the code that needs it.";
|
|
19812
|
-
const entriesOf = ({ name, exports }) => pipe(Option.fromUndefinedOr(name), Option.filter(() => Predicate.isNotUndefined(exports)), Option.map((own) => pipe(exportEntriesOf(exports), Array$1.filter(([subpath]) => subpath !== MANIFEST_SUBPATH && !String$1.includes(WILDCARD)(subpath)), Array$1.map(([subpath, held]) => ({
|
|
19813
|
-
specifier: String$1.replace(ROOT_SUBPATH
|
|
19812
|
+
const entriesOf = ({ name, exports }) => pipe(Option.fromUndefinedOr(name), Option.filter(() => Predicate$1.isNotUndefined(exports)), Option.map((own) => pipe(exportEntriesOf(exports), Array$1.filter(([subpath]) => subpath !== MANIFEST_SUBPATH && !String$1.includes(WILDCARD)(subpath)), Array$1.map(([subpath, held]) => ({
|
|
19813
|
+
specifier: String$1.replace(ROOT_SUBPATH, own)(subpath),
|
|
19814
19814
|
targets: pipe(targetsIn(held), Array$1.map(String$1.replace(RELATIVE, "")))
|
|
19815
19815
|
})))), Option.getOrElse(() => []));
|
|
19816
19816
|
const names = (specifier) => ({ text }) => pipe(SPECIFIER_ENDS, Array$1.some((end) => String$1.includes(`${specifier}${end}`)(text)));
|
|
@@ -19975,8 +19975,8 @@ const memberOf$1 = Effect.fn("memberOf")(function* memberOf(request) {
|
|
|
19975
19975
|
return pipe(read, Option.map((manifest) => ({
|
|
19976
19976
|
directory,
|
|
19977
19977
|
name: Option.fromUndefinedOr(manifest.name),
|
|
19978
|
-
library: Predicate.isNotUndefined(manifest.exports) || Predicate.isNotUndefined(manifest.main) || Array$1.contains(crateLibraries, directory),
|
|
19979
|
-
entry: manifest.private !== true || Predicate.isNotUndefined(manifest.bin) || pipe(deployed, Array$1.some(isInside(directory)))
|
|
19978
|
+
library: Predicate$1.isNotUndefined(manifest.exports) || Predicate$1.isNotUndefined(manifest.main) || Array$1.contains(crateLibraries, directory),
|
|
19979
|
+
entry: manifest.private !== true || Predicate$1.isNotUndefined(manifest.bin) || pipe(deployed, Array$1.some(isInside(directory)))
|
|
19980
19980
|
})));
|
|
19981
19981
|
});
|
|
19982
19982
|
const linksTo = (members, from) => (name) => pipe(members, Array$1.filter((member) => Option.contains(member.name, name)), Array$1.map(({ directory }) => ({
|
|
@@ -20437,7 +20437,7 @@ const readDocument = (root) => (name) => Effect.gen(function* reading() {
|
|
|
20437
20437
|
text: found
|
|
20438
20438
|
})));
|
|
20439
20439
|
});
|
|
20440
|
-
const descriptionOf = (fields) => pipe(Option.fromUndefinedOr(fields["description"]), Option.filter(Predicate.isString), Option.getOrElse(() => ""));
|
|
20440
|
+
const descriptionOf = (fields) => pipe(Option.fromUndefinedOr(fields["description"]), Option.filter(Predicate$1.isString), Option.getOrElse(() => ""));
|
|
20441
20441
|
const summaryOf = ({ name, text }) => pipe(splitFrontmatter(text), Option.match({
|
|
20442
20442
|
onNone: () => ({
|
|
20443
20443
|
name,
|
|
@@ -20995,6 +20995,14 @@ const JUDGE_RULES = [
|
|
|
20995
20995
|
message: "Do not copy what the code shows into the README. Say what it is, how to start using it and where it is published, and leave parameters, options and file lists to the types and the code.",
|
|
20996
20996
|
cutoff: DECISION_CUTOFF
|
|
20997
20997
|
},
|
|
20998
|
+
{
|
|
20999
|
+
kind: "decision",
|
|
21000
|
+
id: "public-no-personal-email",
|
|
21001
|
+
files: ["**/*.md"],
|
|
21002
|
+
question: "Does this document write out the email address of a real person? Answer no for placeholder domains such as example.com, for noreply and support addresses of a service, and for addresses inside a code sample that only shows a format.",
|
|
21003
|
+
message: "Do not write a person's email address in a public repository. Point to where the address is kept, such as a secret, a policy or the git configuration.",
|
|
21004
|
+
cutoff: DECISION_CUTOFF
|
|
21005
|
+
},
|
|
20998
21006
|
{
|
|
20999
21007
|
kind: "agent",
|
|
21000
21008
|
id: "skill-restates-skill",
|
|
@@ -21175,9 +21183,9 @@ const singleTarget = (target) => {
|
|
|
21175
21183
|
};
|
|
21176
21184
|
/** @internal */
|
|
21177
21185
|
const foldExports = (cases) => (exports) => {
|
|
21178
|
-
if (Predicate.isString(exports)) return cases.string(exports);
|
|
21186
|
+
if (Predicate$1.isString(exports)) return cases.string(exports);
|
|
21179
21187
|
if (Array$1.isArray(exports)) return cases.array(exports);
|
|
21180
|
-
if (Predicate.isReadonlyObject(exports)) return cases.object(exports);
|
|
21188
|
+
if (Predicate$1.isReadonlyObject(exports)) return cases.object(exports);
|
|
21181
21189
|
return cases.other();
|
|
21182
21190
|
};
|
|
21183
21191
|
/** @internal */
|
|
@@ -21262,14 +21270,14 @@ const compatCasesOf = (manifest) => pipe(nodeFloorOf(manifest), Option.match({
|
|
|
21262
21270
|
const loadsAModule = (target) => pipe(exportTargetsOf(target), Array$1.some((file) => pipe(MODULE_EXTENSIONS, Array$1.some((extension) => String$1.endsWith(extension)(file)))));
|
|
21263
21271
|
const exportedSubpaths = (exports) => pipe(exportEntriesOf(exports), Array$1.filter(([, target]) => loadsAModule(target)), Array$1.map(([subpath]) => subpath));
|
|
21264
21272
|
const subpathsOf = foldExports({
|
|
21265
|
-
string: () => [ROOT_SUBPATH],
|
|
21266
|
-
array: () => [ROOT_SUBPATH],
|
|
21273
|
+
string: () => [ROOT_SUBPATH$2],
|
|
21274
|
+
array: () => [ROOT_SUBPATH$2],
|
|
21267
21275
|
object: exportedSubpaths,
|
|
21268
21276
|
other: () => []
|
|
21269
21277
|
});
|
|
21270
21278
|
const binFilesOf = (bin) => {
|
|
21271
|
-
if (Predicate.isUndefined(bin)) return [];
|
|
21272
|
-
if (Predicate.isString(bin)) return [bin];
|
|
21279
|
+
if (Predicate$1.isUndefined(bin)) return [];
|
|
21280
|
+
if (Predicate$1.isString(bin)) return [bin];
|
|
21273
21281
|
return Record.values(bin);
|
|
21274
21282
|
};
|
|
21275
21283
|
/** @internal */
|
|
@@ -21609,7 +21617,7 @@ const nativeTarballs = Effect.fn("compat.native")(function* nativeTarballs(direc
|
|
|
21609
21617
|
// src/features/publish-workspace/model/compat-workspace.ts
|
|
21610
21618
|
const closureOf = (known, names, seen) => {
|
|
21611
21619
|
const [name, ...rest] = names;
|
|
21612
|
-
if (Predicate.isUndefined(name)) return seen;
|
|
21620
|
+
if (Predicate$1.isUndefined(name)) return seen;
|
|
21613
21621
|
const found = Record.get(known, name);
|
|
21614
21622
|
const reached = pipe(seen, Array$1.some((item) => item.manifest.name === name));
|
|
21615
21623
|
if (Option.isNone(found) || reached) return closureOf(known, rest, seen);
|
|
@@ -22043,9 +22051,9 @@ const dependentsOf = (known) => (names) => {
|
|
|
22043
22051
|
if (Array$1.isReadonlyArrayEmpty(added)) return names;
|
|
22044
22052
|
return dependentsOf(known)([...names, ...added]);
|
|
22045
22053
|
};
|
|
22046
|
-
const tokenOf = Config.option(Config.String("GITHUB_APP_TOKEN"));
|
|
22054
|
+
const tokenOf = Config$1.option(Config$1.String("GITHUB_APP_TOKEN"));
|
|
22047
22055
|
const selfOf = Effect.fn("consumers.self")(function* selfOf() {
|
|
22048
|
-
const given = yield* Config.option(Config.String("GITHUB_REPOSITORY"));
|
|
22056
|
+
const given = yield* Config$1.option(Config$1.String("GITHUB_REPOSITORY"));
|
|
22049
22057
|
if (Option.isSome(given)) return given.value;
|
|
22050
22058
|
const url = yield* outputOf({
|
|
22051
22059
|
command: "git",
|
|
@@ -22076,7 +22084,7 @@ const namesAffected = Effect.fn("consumers.affected")(function* namesAffected(di
|
|
|
22076
22084
|
return dependentsOf(known)(own);
|
|
22077
22085
|
});
|
|
22078
22086
|
const unlisted = Effect.fn("consumers.unlisted")(function* unlisted() {
|
|
22079
|
-
if (yield* Config.Boolean("GITHUB_ACTIONS").pipe(Config.withDefault(false))) return yield* IncompatiblePackage.make({ message: "The consumers of the new build could not be listed, so none of them was checked" });
|
|
22087
|
+
if (yield* Config$1.Boolean("GITHUB_ACTIONS").pipe(Config$1.withDefault(false))) return yield* IncompatiblePackage.make({ message: "The consumers of the new build could not be listed, so none of them was checked" });
|
|
22080
22088
|
return yield* Console.log("consumers skipped: no GitHub access to list them");
|
|
22081
22089
|
});
|
|
22082
22090
|
const failing = Effect.fn("consumers.failing")(function* failing(found, build, token) {
|
|
@@ -22190,8 +22198,8 @@ const Dependency = Schema.Struct({
|
|
|
22190
22198
|
digest: Digest
|
|
22191
22199
|
});
|
|
22192
22200
|
const BuildDefinition = Schema.Struct({ resolvedDependencies: Schema.Array(Dependency) });
|
|
22193
|
-
const Predicate
|
|
22194
|
-
const Statement = Schema.fromJsonString(Schema.Struct({ predicate: Predicate
|
|
22201
|
+
const Predicate = Schema.Struct({ buildDefinition: BuildDefinition });
|
|
22202
|
+
const Statement = Schema.fromJsonString(Schema.Struct({ predicate: Predicate }));
|
|
22195
22203
|
const Envelope = Schema.Struct({ payload: Schema.String });
|
|
22196
22204
|
const Bundle = Schema.Struct({ dsseEnvelope: Envelope });
|
|
22197
22205
|
const Attestation = Schema.Struct({
|
|
@@ -22204,7 +22212,7 @@ const commitOf = (repository) => (payload) => pipe(Base64.decodeString(payload),
|
|
|
22204
22212
|
/** @internal */
|
|
22205
22213
|
const provenanceCommit = Effect.fn("publish.provenanceCommit")(function* provenanceCommit({ name, version }) {
|
|
22206
22214
|
const client = yield* HttpClient.HttpClient;
|
|
22207
|
-
const repository = yield* Config.String("GITHUB_REPOSITORY");
|
|
22215
|
+
const repository = yield* Config$1.String("GITHUB_REPOSITORY");
|
|
22208
22216
|
const url = `${ATTESTATIONS}${String$1.replace("/", "%2f")(name)}@${version}`;
|
|
22209
22217
|
const found = yield* HttpClient.filterStatusOk(client).get(url).pipe(Effect.flatMap(HttpClientResponse.schemaBodyJson(Attestations)), Effect.map(({ attestations }) => Array$1.findFirst(attestations, ({ predicateType }) => SLSA.test(predicateType))), Effect.orElseSucceed(() => Option.none()));
|
|
22210
22218
|
if (Option.isNone(found)) return Option.none();
|
|
@@ -22216,19 +22224,19 @@ const LOOKUP_CONCURRENCY$2 = 4;
|
|
|
22216
22224
|
const Versions = Schema.String.pipe(Schema.Array, Schema.fromJsonString);
|
|
22217
22225
|
/** @internal */
|
|
22218
22226
|
const tagged = Effect.fn("publish.tagged")(function* tagged(tag) {
|
|
22219
|
-
const repository = yield* Config.String("GITHUB_REPOSITORY");
|
|
22227
|
+
const repository = yield* Config$1.String("GITHUB_REPOSITORY");
|
|
22220
22228
|
return yield* succeeds({
|
|
22221
22229
|
command: "gh",
|
|
22222
22230
|
args: ["api", `repos/${repository}/git/ref/tags/${tag}`]
|
|
22223
22231
|
});
|
|
22224
22232
|
});
|
|
22225
|
-
const tokenEnv = Config.option(Config.String("GITHUB_APP_TOKEN")).pipe(Effect.map(Option.match({
|
|
22233
|
+
const tokenEnv = Config$1.option(Config$1.String("GITHUB_APP_TOKEN")).pipe(Effect.map(Option.match({
|
|
22226
22234
|
onNone: () => ({}),
|
|
22227
22235
|
onSome: (value) => ({ GH_TOKEN: value })
|
|
22228
22236
|
})));
|
|
22229
22237
|
/** @internal */
|
|
22230
22238
|
const createTag = Effect.fn("publish.createTag")(function* createTag({ tag, sha }) {
|
|
22231
|
-
const repository = yield* Config.String("GITHUB_REPOSITORY");
|
|
22239
|
+
const repository = yield* Config$1.String("GITHUB_REPOSITORY");
|
|
22232
22240
|
const env = yield* tokenEnv;
|
|
22233
22241
|
yield* Effect.logInfo(`tagging ${tag} at ${sha}`);
|
|
22234
22242
|
yield* mustSucceed({
|
|
@@ -22360,7 +22368,7 @@ const allTagged = Effect.fn("publish.allTagged")(function* allTagged(directory,
|
|
|
22360
22368
|
const workspaceOf = (directory) => Path.Path.pipe(Effect.map((path) => String$1.replace(TRAILING_SLASH, "")(path.normalize(directory))));
|
|
22361
22369
|
/** @internal */
|
|
22362
22370
|
const released = Effect.fn("publish.released")(function* released(tag) {
|
|
22363
|
-
const repository = yield* Config.String("GITHUB_REPOSITORY");
|
|
22371
|
+
const repository = yield* Config$1.String("GITHUB_REPOSITORY");
|
|
22364
22372
|
return yield* succeeds({
|
|
22365
22373
|
command: "gh",
|
|
22366
22374
|
args: [
|
|
@@ -22379,7 +22387,7 @@ const releasedWithAssets = Effect.fn("publish.releasedWithAssets")(function* rel
|
|
|
22379
22387
|
"view",
|
|
22380
22388
|
tag,
|
|
22381
22389
|
"--repo",
|
|
22382
|
-
yield* Config.String("GITHUB_REPOSITORY")
|
|
22390
|
+
yield* Config$1.String("GITHUB_REPOSITORY")
|
|
22383
22391
|
];
|
|
22384
22392
|
if (!(yield* released(tag))) return false;
|
|
22385
22393
|
return (yield* outputOf({
|
|
@@ -22467,7 +22475,7 @@ const pending = Effect.fn("publish.pending")(function* pending(graph, directory)
|
|
|
22467
22475
|
});
|
|
22468
22476
|
/** @internal */
|
|
22469
22477
|
const dispatchPending = Effect.fn("publish.dispatchPending")(function* dispatchPending(ref) {
|
|
22470
|
-
const repository = yield* Config.String("GITHUB_REPOSITORY");
|
|
22478
|
+
const repository = yield* Config$1.String("GITHUB_REPOSITORY");
|
|
22471
22479
|
const graph = yield* graphTasks;
|
|
22472
22480
|
const directories = yield* Effect.filter(workspacesOf(graph), (directory) => pending(graph, directory), { concurrency: PLAN_CONCURRENCY });
|
|
22473
22481
|
yield* Effect.forEach(directories, (directory) => Effect.logInfo(`publishing ${directory}`).pipe(Effect.andThen(mustSucceed({
|
|
@@ -22523,7 +22531,7 @@ const selected = (workspaces, directories) => {
|
|
|
22523
22531
|
const selectedWorkspaces = dual(ARITY, selected);
|
|
22524
22532
|
/** @internal */
|
|
22525
22533
|
const checkChangedCompat = Effect.fn("publish.compatChanged")(function* checkChangedCompat(directories) {
|
|
22526
|
-
if (yield* Config.Boolean("GITHUB_ACTIONS").pipe(Config.withDefault(false))) return yield* Console.log(`compat skipped: ${LOCAL_ONLY}`);
|
|
22534
|
+
if (yield* Config$1.Boolean("GITHUB_ACTIONS").pipe(Config$1.withDefault(false))) return yield* Console.log(`compat skipped: ${LOCAL_ONLY}`);
|
|
22527
22535
|
const graph = yield* graphTasks;
|
|
22528
22536
|
const chosen = selectedWorkspaces(workspacesOf(graph), directories);
|
|
22529
22537
|
const checked = yield* Effect.filter(chosen, isChecked, { concurrency: 1 });
|
|
@@ -22575,7 +22583,7 @@ const publishNative = Effect.fn("publish.publishNative")(function* publishNative
|
|
|
22575
22583
|
});
|
|
22576
22584
|
const addOptionalDependencies = (directory, names, version) => updatePackageJson(directory, { optionalDependencies: pipe(names, Array$1.map((name) => [name, version]), Record.fromEntries) }).pipe(Effect.withSpan("publish.optionalDependencies"));
|
|
22577
22585
|
const publishNatives = Effect.fn("publish.publishNatives")(function* publishNatives(directory, manifest) {
|
|
22578
|
-
if (Predicate.isUndefined(manifest.native)) return;
|
|
22586
|
+
if (Predicate$1.isUndefined(manifest.native)) return;
|
|
22579
22587
|
const { binary, targets } = manifest.native;
|
|
22580
22588
|
const written = yield* Effect.forEach(targets, (target) => writeNative(directory, {
|
|
22581
22589
|
name: manifest.name,
|
|
@@ -22609,7 +22617,7 @@ const publishToNpm = Effect.fn("publish.npm")(function* publishToNpm(directory)
|
|
|
22609
22617
|
// src/features/publish-workspace/model/release.ts
|
|
22610
22618
|
const ASSETS = "release-assets";
|
|
22611
22619
|
const revisionOf = Effect.fn("publish.revision")(function* revisionOf(manifest) {
|
|
22612
|
-
const head = yield* Config.String("GITHUB_SHA");
|
|
22620
|
+
const head = yield* Config$1.String("GITHUB_SHA");
|
|
22613
22621
|
if (!goesToNpm(manifest)) return head;
|
|
22614
22622
|
const published = yield* provenanceCommit(manifest);
|
|
22615
22623
|
return Option.getOrElse(published, () => head);
|
|
@@ -22647,7 +22655,7 @@ const createRelease = Effect.fn("publish.createRelease")(function* createRelease
|
|
|
22647
22655
|
...manifest
|
|
22648
22656
|
});
|
|
22649
22657
|
const notes = notesOf(directory);
|
|
22650
|
-
const repository = yield* Config.String("GITHUB_REPOSITORY");
|
|
22658
|
+
const repository = yield* Config$1.String("GITHUB_REPOSITORY");
|
|
22651
22659
|
if (yield* succeeds({
|
|
22652
22660
|
command: "gh",
|
|
22653
22661
|
args: [
|
|
@@ -22680,7 +22688,7 @@ const uploadAssets = Effect.fn("publish.uploadAssets")(function* uploadAssets({
|
|
|
22680
22688
|
});
|
|
22681
22689
|
const files = yield* assetsIn(directory);
|
|
22682
22690
|
if (Array$1.isReadonlyArrayEmpty(files) || (yield* releasedWithAssets(tag))) return;
|
|
22683
|
-
const repository = yield* Config.String("GITHUB_REPOSITORY");
|
|
22691
|
+
const repository = yield* Config$1.String("GITHUB_REPOSITORY");
|
|
22684
22692
|
yield* createRelease({
|
|
22685
22693
|
directory,
|
|
22686
22694
|
manifest
|
|
@@ -22736,7 +22744,7 @@ const taggedError = Schema.TaggedError;
|
|
|
22736
22744
|
var RepositoriesUnlisted = class extends taggedError()("RepositoriesUnlisted", { message: Schema.String }) {};
|
|
22737
22745
|
/** @internal */
|
|
22738
22746
|
const ownRepository = Effect.fn("ownRepository")(function* ownRepository() {
|
|
22739
|
-
const given = yield* Config.option(Config.String("GITHUB_REPOSITORY"));
|
|
22747
|
+
const given = yield* Config$1.option(Config$1.String("GITHUB_REPOSITORY"));
|
|
22740
22748
|
if (Option.isSome(given)) return given;
|
|
22741
22749
|
const remote = yield* finished({
|
|
22742
22750
|
command: REMOTE,
|
|
@@ -22949,7 +22957,7 @@ const resolveReference = (reference) => Match.value(reference).pipe(Match.discri
|
|
|
22949
22957
|
}));
|
|
22950
22958
|
// src/features/check-references/model/unresolved-references.ts
|
|
22951
22959
|
const LOOKUP_CONCURRENCY$1 = 4;
|
|
22952
|
-
const occurrencesIn = (links) => pipe(links, Array$1.flatMap(({ path, line, destination }) => pipe(referenceOf(destination), Option.map((reference) => ({
|
|
22960
|
+
const occurrencesIn = (links) => pipe(links, Array$1.flatMap(({ path, line, destination }) => pipe(referenceOf$2(destination), Option.map((reference) => ({
|
|
22953
22961
|
file: path,
|
|
22954
22962
|
line,
|
|
22955
22963
|
reference
|
|
@@ -22974,7 +22982,7 @@ const unresolvedOf = (outcomes) => ({ file, line, reference }) => {
|
|
|
22974
22982
|
const unresolvedReferences = Effect.fn("unresolvedReferences")(function* unresolvedReferences(root) {
|
|
22975
22983
|
const files = yield* RepositoryFiles;
|
|
22976
22984
|
const texts = yield* markdownTexts(root);
|
|
22977
|
-
const links = yield* linksIn(pipe(texts, Array$1.map(({ file, source }) => ({
|
|
22985
|
+
const links = yield* linksIn$1(pipe(texts, Array$1.map(({ file, source }) => ({
|
|
22978
22986
|
path: files.relative(root, file),
|
|
22979
22987
|
text: source
|
|
22980
22988
|
}))));
|
|
@@ -23081,7 +23089,7 @@ const answered = (target, files, status) => {
|
|
|
23081
23089
|
const sentOrKept = Effect.fn("sentOrKept")(function* sentOrKept(target, files, tallies) {
|
|
23082
23090
|
const key = yield* Option.match(target.apiKeyEnv, {
|
|
23083
23091
|
onNone: () => Effect.succeed(Option.none()),
|
|
23084
|
-
onSome: (name) => Config.option(Config.Redacted(name)).pipe(Effect.orElseSucceed(() => Option.none()))
|
|
23092
|
+
onSome: (name) => Config$1.option(Config$1.Redacted(name)).pipe(Effect.orElseSucceed(() => Option.none()))
|
|
23085
23093
|
});
|
|
23086
23094
|
const body = yield* bodyOf(tallies);
|
|
23087
23095
|
const sent = yield* posted({
|