@r_masseater/msch 0.11.0 → 0.13.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 +1426 -895
- package/dist/cli.mjs.map +1 -1
- package/dist/{comment-directives-DApQXgQf.mjs → comment-directives-TN0dNEbg.mjs} +2 -2
- package/dist/comment-directives-TN0dNEbg.mjs.map +1 -0
- package/dist/decision-rules.mjs +1 -1
- package/dist/decision-rules.mjs.map +1 -1
- package/dist/inline-exports.d.mts +2 -2
- package/dist/inline-exports.mjs +7 -7
- package/dist/inline-exports.mjs.map +1 -1
- package/dist/lint.mjs +9 -9
- package/dist/lint.mjs.map +1 -1
- package/dist/oxlint.mjs +3 -3
- package/dist/oxlint.mjs.map +1 -1
- package/dist/{cli-contract-c3l4AjvJ.mjs → problem-B5LCnsRC.mjs} +15 -7
- package/dist/problem-B5LCnsRC.mjs.map +1 -0
- package/dist/repository-files-DcTnXciI.mjs +61 -0
- package/dist/repository-files-DcTnXciI.mjs.map +1 -0
- package/dist/{workspace-tasks-DqSpU9ij.mjs → workspace-B1-fCPnh.mjs} +236 -43
- package/dist/workspace-B1-fCPnh.mjs.map +1 -0
- package/dist/workspace-settings.d.mts +8 -8
- package/dist/workspace-settings.mjs +5 -17
- package/dist/workspace-settings.mjs.map +1 -1
- package/package.json +6 -3
- package/dist/cli-contract-c3l4AjvJ.mjs.map +0 -1
- package/dist/comment-directives-DApQXgQf.mjs.map +0 -1
- package/dist/dependencies-CVEeDVp2.mjs +0 -187
- package/dist/dependencies-CVEeDVp2.mjs.map +0 -1
- package/dist/workspace-tasks-DqSpU9ij.mjs.map +0 -1
- /package/src/{vite.d.ts → app/vite.d.ts} +0 -0
package/dist/oxlint.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oxlint.mjs","names":["Arr"],"sources":["../src/oxlint-rule.ts","../src/oxlint.ts"],"sourcesContent":["import { Array as Arr, pipe } from \"effect\";\nimport type { Diagnostic, Plugin, Rule } from \"vite-plus/lint/plugins\";\n\nimport { describeFinding } from \"
|
|
1
|
+
{"version":3,"file":"oxlint.mjs","names":["Arr"],"sources":["../src/features/oxlint-plugin/model/oxlint-rule.ts","../src/app/oxlint.ts"],"sourcesContent":["import { Array as Arr, pipe } from \"effect\";\nimport type { Diagnostic, Plugin, Rule } from \"vite-plus/lint/plugins\";\n\nimport { describeFinding } from \"#/shared/lib/problem.ts\";\nimport type { Problem } from \"#/shared/lib/problem.ts\";\nimport { POSITION_BASE } from \"#/shared/lib/syntax.ts\";\n\nexport type ProblemLoader = (cwd: string) => readonly Problem[];\n\nconst diagnosticOf = (problem: Problem): Diagnostic => ({\n message: describeFinding(problem),\n loc: { start: { line: problem.line, column: problem.column - POSITION_BASE } },\n});\n\nconst vocabularyRule = (load: ProblemLoader): Rule => ({\n create: (context) => ({\n Program: () => {\n const problems = pipe(\n load(context.cwd),\n Arr.filter((problem) => problem.file === context.filename),\n );\n for (const problem of problems) {\n context.report(diagnosticOf(problem));\n }\n },\n }),\n});\n\nexport const mschPlugin = (load: ProblemLoader): Plugin & { rules: { vocabulary: Rule } } => ({\n meta: { name: \"msch\" },\n rules: { vocabulary: vocabularyRule(load) },\n});\n","import { execFileSync } from \"node:child_process\";\nimport { fileURLToPath } from \"node:url\";\n\nimport { Option, Schema } from \"effect\";\n\nimport { mschPlugin } from \"#/features/oxlint-plugin/index.ts\";\nimport { JSON_FLAG } from \"#/shared/lib/cli-contract.ts\";\nimport { ProblemList } from \"#/shared/lib/problem.ts\";\nimport type { Problem } from \"#/shared/lib/problem.ts\";\n\nconst CLI_PATH = fileURLToPath(import.meta.resolve(\"@r_masseater/msch/cli\"));\nconst decodeProblems = Schema.decodeUnknownSync(Schema.fromJsonString(ProblemList));\nconst loaded = new Map<string, readonly Problem[]>();\n\nconst runCli = (cwd: string): readonly Problem[] =>\n decodeProblems(\n execFileSync(process.execPath, [CLI_PATH, JSON_FLAG], {\n cwd,\n encoding: \"utf8\",\n maxBuffer: Number.MAX_SAFE_INTEGER,\n }),\n );\n\nconst loadProblems = (cwd: string): readonly Problem[] =>\n Option.fromUndefinedOr(loaded.get(cwd)).pipe(\n Option.getOrElse(() => {\n const problems = runCli(cwd);\n loaded.set(cwd, problems);\n return problems;\n }),\n );\n\nexport default mschPlugin(loadProblems);\n"],"mappings":";;;;;AASA,MAAM,gBAAgB,aAAkC;CACtD,SAAS,gBAAgB,OAAO;CAChC,KAAK,EAAE,OAAO;EAAE,MAAM,QAAQ;EAAM,QAAQ,QAAQ,SAAA;CAAuB,EAAE;AAC/E;AAEA,MAAM,kBAAkB,UAA+B,EACrD,SAAS,aAAa,EACpB,eAAe;CACb,MAAM,WAAW,KACf,KAAK,QAAQ,GAAG,GAChBA,MAAI,QAAQ,YAAY,QAAQ,SAAS,QAAQ,QAAQ,CAC3D;CACA,KAAK,MAAM,WAAW,UACpB,QAAQ,OAAO,aAAa,OAAO,CAAC;AAExC,EACF,GACF;AAEA,MAAa,cAAc,UAAmE;CAC5F,MAAM,EAAE,MAAM,OAAO;CACrB,OAAO,EAAE,YAAY,eAAe,IAAI,EAAE;AAC5C;;ACrBA,MAAM,WAAW,cAAc,YAAY,QAAQ,uBAAuB,CAAC;AAC3E,MAAM,iBAAiB,OAAO,kBAAkB,OAAO,eAAe,WAAW,CAAC;AAClF,MAAM,yBAAS,IAAI,IAAgC;AAEnD,MAAM,UAAU,QACd,eACE,aAAa,QAAQ,UAAU,CAAC,UAAU,SAAS,GAAG;CACpD;CACA,UAAU;CACV,WAAW,OAAO;AACpB,CAAC,CACH;AAEF,MAAM,gBAAgB,QACpB,OAAO,gBAAgB,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,KACtC,OAAO,gBAAgB;CACrB,MAAM,WAAW,OAAO,GAAG;CAC3B,OAAO,IAAI,KAAK,QAAQ;CACxB,OAAO;AACT,CAAC,CACH;AAEF,IAAA,iBAAe,WAAW,YAAY"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as NODE_MODULES } from "./repository-files-DcTnXciI.mjs";
|
|
2
2
|
import { Array, Option, Order, Schema, String as String$1, pipe } from "effect";
|
|
3
3
|
import { InternalSymbolName, SyntaxKind, getJSDocTags, getLeadingCommentRanges, getNameOfDeclaration, getTextOfJSDocComment } from "typescript/ast";
|
|
4
4
|
import { isArrayLiteralExpression, isBinaryExpression, isCallExpression, isClassDeclaration, isElementAccessExpression, isEnumDeclaration, isExportDeclaration, isIdentifier, isImportDeclaration, isInterfaceDeclaration, isModuleBlock, isModuleDeclaration, isNewExpression, isNumericLiteral, isObjectLiteralExpression, isPropertyAccessExpression, isPropertyAssignment, isSatisfiesExpression, isSignatureDeclaration, isSourceFile, isSpreadElement, isStringLiteral, isTypeAliasDeclaration, isTypeLiteralNode, isTypeReferenceNode, isUnionTypeNode, isVariableDeclaration, isVariableDeclarationList, isVariableStatement } from "typescript/ast/is";
|
|
5
5
|
import { API, IndexKind } from "typescript/sync";
|
|
6
|
-
// src/
|
|
6
|
+
// src/shared/lib/cli-contract.ts
|
|
7
|
+
const JSON_FLAG = "--json";
|
|
8
|
+
// src/shared/lib/syntax.ts
|
|
7
9
|
const NODE_MODULES_SEGMENT = `/${NODE_MODULES}/`;
|
|
8
10
|
const uniqueByReference = (items) => Array.dedupeWith(items, (left, right) => left === right);
|
|
9
11
|
const childrenOf = (node) => {
|
|
@@ -53,7 +55,7 @@ const moduleSpecifierOf = (statement) => {
|
|
|
53
55
|
return Option.fromUndefinedOr(statement.moduleSpecifier).pipe(Option.filter((specifier) => isStringLiteral(specifier)), Option.map((specifier) => specifier.text));
|
|
54
56
|
};
|
|
55
57
|
const importedModulesOf = (sourceFile) => pipe(sourceFile.statements, Array.map((statement) => moduleSpecifierOf(statement)), Array.getSomes);
|
|
56
|
-
// src/problem.ts
|
|
58
|
+
// src/shared/lib/problem.ts
|
|
57
59
|
const RuleNameSchema = Schema.Literals([
|
|
58
60
|
"owner-annotation",
|
|
59
61
|
"duplicate-value-set",
|
|
@@ -67,13 +69,21 @@ const RuleNameSchema = Schema.Literals([
|
|
|
67
69
|
"hidden-unicode",
|
|
68
70
|
"python-file",
|
|
69
71
|
"python-command",
|
|
72
|
+
"unneeded-file",
|
|
73
|
+
"unneeded-setup",
|
|
74
|
+
"cargo-outside-pnpm",
|
|
70
75
|
"nested-docs",
|
|
71
76
|
"root-readme",
|
|
77
|
+
"agent-docs-length",
|
|
78
|
+
"shell-script",
|
|
79
|
+
"workflow-script",
|
|
72
80
|
"stack-dependency",
|
|
73
81
|
"install-size",
|
|
74
82
|
"unverified-crate",
|
|
75
83
|
"hidden-verify",
|
|
76
84
|
"root-workspace-path",
|
|
85
|
+
"shared-uncached-task",
|
|
86
|
+
"workflow-path",
|
|
77
87
|
"colocated-test",
|
|
78
88
|
"comment"
|
|
79
89
|
]);
|
|
@@ -109,8 +119,6 @@ const problemKey = (problem) => pipe([
|
|
|
109
119
|
const sortProblems = (problems) => Array.sort(Array.dedupeWith(problems, (left, right) => problemKey(left) === problemKey(right)), problemOrder);
|
|
110
120
|
const describeFinding = (problem) => `[${problem.rule}] ${problem.message}`;
|
|
111
121
|
const formatProblem = (relative) => (problem) => `${relative(problem.file)}:${String(problem.line)}:${String(problem.column)} ${describeFinding(problem)}`;
|
|
112
|
-
|
|
113
|
-
const JSON_FLAG = "--json";
|
|
114
|
-
export { isTypeAliasDeclaration as $, getTextOfJSDocComment as A, isInterfaceDeclaration as B, API as C, getJSDocTags as D, SyntaxKind as E, isElementAccessExpression as F, isObjectLiteralExpression as G, isModuleDeclaration as H, isEnumDeclaration as I, isSatisfiesExpression as J, isPropertyAccessExpression as K, isExportDeclaration as L, isBinaryExpression as M, isCallExpression as N, getLeadingCommentRanges as O, isClassDeclaration as P, isStringLiteral as Q, isIdentifier as R, uniqueByReference as S, InternalSymbolName as T, isNewExpression as U, isModuleBlock as V, isNumericLiteral as W, isSourceFile as X, isSignatureDeclaration as Y, isSpreadElement as Z, lineOf as _, problemAt as a, isVariableStatement as at, resolvedSymbol as b, childrenOf as c, declarationsOf as d, isTypeLiteralNode as et, descendantsOf as f, isTypeDeclaration as g, isGenericDeclaration as h, formatProblem as i, isVariableDeclarationList as it, isArrayLiteralExpression as j, getNameOfDeclaration as k, columnOf as l, isExternalDeclaration as m, ProblemList as n, isUnionTypeNode as nt, sortProblems as o, importedModulesOf as p, isPropertyAssignment as q, describeFinding as r, isVariableDeclaration as rt, NODE_MODULES_SEGMENT as s, JSON_FLAG as t, isTypeReferenceNode as tt, contains as u, propertyNamesOf as v, IndexKind as w, symbolAt as x, referencedSymbols as y, isImportDeclaration as z };
|
|
122
|
+
export { isTypeLiteralNode as $, isArrayLiteralExpression as A, isModuleBlock as B, IndexKind as C, getLeadingCommentRanges as D, getJSDocTags as E, isEnumDeclaration as F, isPropertyAccessExpression as G, isNewExpression as H, isExportDeclaration as I, isSignatureDeclaration as J, isPropertyAssignment as K, isIdentifier as L, isCallExpression as M, isClassDeclaration as N, getNameOfDeclaration as O, isElementAccessExpression as P, isTypeAliasDeclaration as Q, isImportDeclaration as R, API as S, SyntaxKind as T, isNumericLiteral as U, isModuleDeclaration as V, isObjectLiteralExpression as W, isSpreadElement as X, isSourceFile as Y, isStringLiteral as Z, propertyNamesOf as _, sortProblems as a, JSON_FLAG as at, symbolAt as b, columnOf as c, descendantsOf as d, isTypeReferenceNode as et, importedModulesOf as f, lineOf as g, isTypeDeclaration as h, problemAt as i, isVariableStatement as it, isBinaryExpression as j, getTextOfJSDocComment as k, contains as l, isGenericDeclaration as m, describeFinding as n, isVariableDeclaration as nt, NODE_MODULES_SEGMENT as o, isExternalDeclaration as p, isSatisfiesExpression as q, formatProblem as r, isVariableDeclarationList as rt, childrenOf as s, ProblemList as t, isUnionTypeNode as tt, declarationsOf as u, referencedSymbols as v, InternalSymbolName as w, uniqueByReference as x, resolvedSymbol as y, isInterfaceDeclaration as z };
|
|
115
123
|
|
|
116
|
-
//# sourceMappingURL=
|
|
124
|
+
//# sourceMappingURL=problem-B5LCnsRC.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"problem-B5LCnsRC.mjs","names":["Arr","Str","Arr"],"sources":["../src/shared/lib/cli-contract.ts","../src/shared/lib/syntax.ts","../src/shared/lib/problem.ts"],"sourcesContent":["export const JSON_FLAG = \"--json\";\n","import { Array as Arr, Option, String as Str, pipe } from \"effect\";\n\nimport {\n isEnumDeclaration,\n isExportDeclaration,\n isIdentifier,\n isImportDeclaration,\n isInterfaceDeclaration,\n isStringLiteral,\n isTypeAliasDeclaration,\n SyntaxKind,\n} from \"./compiler.ts\";\nimport type {\n Checker,\n Declaration,\n EnumDeclaration,\n InterfaceDeclaration,\n Node,\n Program,\n SourceFile,\n TypeSymbol,\n Type,\n TypeAliasDeclaration,\n} from \"./compiler.ts\";\nimport { NODE_MODULES } from \"./repository-files.ts\";\n\nexport const NODE_MODULES_SEGMENT = `/${NODE_MODULES}/`;\n\nexport const POSITION_BASE = 1;\n\nexport const uniqueByReference = <Item>(items: readonly Item[]): readonly Item[] =>\n Arr.dedupeWith(items, (left, right) => left === right);\n\nexport const childrenOf = (node: Node): readonly Node[] => {\n const children: Node[] = [];\n node.forEachChild((child) => {\n children.push(child);\n });\n return children;\n};\n\nexport const descendantsOf = (node: Node): readonly Node[] =>\n pipe(\n childrenOf(node),\n Arr.flatMap((child) => Arr.prepend(descendantsOf(child), child)),\n );\n\nconst isExternalFile =\n (program: Program) =>\n (sourceFile: SourceFile): boolean =>\n Str.includes(NODE_MODULES_SEGMENT)(sourceFile.fileName) ||\n program.isSourceFileFromExternalLibrary(sourceFile);\n\nexport const isExternalDeclaration =\n (program: Program) =>\n (declaration: Node): boolean =>\n isExternalFile(program)(declaration.getSourceFile());\n\nconst ALIAS_KINDS: ReadonlySet<SyntaxKind> = new Set([\n SyntaxKind.ImportSpecifier,\n SyntaxKind.ImportClause,\n SyntaxKind.NamespaceImport,\n SyntaxKind.ExportSpecifier,\n SyntaxKind.ImportEqualsDeclaration,\n SyntaxKind.ExportAssignment,\n]);\n\nexport const declarationsOf = (symbol: TypeSymbol): readonly Declaration[] =>\n pipe(\n symbol.declarations,\n Arr.flatMap((handle) => Option.toArray(Option.fromUndefinedOr(handle.resolve()))),\n );\n\nconst isAliasDeclaration = (declaration: Node): boolean => ALIAS_KINDS.has(declaration.kind);\n\nexport const resolvedSymbol =\n (checker: Checker) =>\n (symbol: TypeSymbol): TypeSymbol => {\n if (\n !pipe(\n declarationsOf(symbol),\n Arr.some((declaration) => isAliasDeclaration(declaration)),\n )\n ) {\n return symbol;\n }\n return checker.getAliasedSymbol(symbol);\n };\n\nexport const symbolAt =\n (checker: Checker) =>\n (node: Node): Option.Option<TypeSymbol> =>\n Option.fromUndefinedOr(checker.getSymbolAtLocation(node)).pipe(\n Option.map(resolvedSymbol(checker)),\n );\n\nexport const referencedSymbols =\n (checker: Checker) =>\n (node: Node): readonly TypeSymbol[] => {\n const identifiers = pipe(\n Arr.prepend(descendantsOf(node), node),\n Arr.filter((candidate) => isIdentifier(candidate)),\n );\n const symbols = pipe(\n checker.getSymbolAtLocation(identifiers),\n Arr.flatMap((symbol) => Option.toArray(Option.fromUndefinedOr(symbol))),\n Arr.map(resolvedSymbol(checker)),\n );\n return uniqueByReference(symbols);\n };\n\nexport const lineOf = (node: Node): number => {\n const sourceFile = node.getSourceFile();\n return sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line + POSITION_BASE;\n};\n\nexport const columnOf = (node: Node): number => {\n const sourceFile = node.getSourceFile();\n return (\n sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).character + POSITION_BASE\n );\n};\n\nexport const contains =\n (outer: Node) =>\n (inner: Node): boolean =>\n outer.getSourceFile().fileName === inner.getSourceFile().fileName &&\n outer.getStart() <= inner.getStart() &&\n inner.getEnd() <= outer.getEnd();\n\nexport const isTypeDeclaration = (\n declaration: Node,\n): declaration is TypeAliasDeclaration | InterfaceDeclaration | EnumDeclaration =>\n isTypeAliasDeclaration(declaration) ||\n isInterfaceDeclaration(declaration) ||\n isEnumDeclaration(declaration);\n\nexport const isGenericDeclaration = (declaration: Node): boolean =>\n (isTypeAliasDeclaration(declaration) || isInterfaceDeclaration(declaration)) &&\n Arr.isReadonlyArrayNonEmpty(declaration.typeParameters ?? []);\n\nexport const propertyNamesOf =\n (checker: Checker) =>\n (type: Type): readonly string[] =>\n pipe(\n checker.getPropertiesOfType(type),\n Arr.map((property) => property.name),\n );\n\nconst moduleSpecifierOf = (statement: Node): Option.Option<string> => {\n if (!isImportDeclaration(statement) && !isExportDeclaration(statement)) {\n return Option.none();\n }\n return Option.fromUndefinedOr(statement.moduleSpecifier).pipe(\n Option.filter((specifier) => isStringLiteral(specifier)),\n Option.map((specifier) => specifier.text),\n );\n};\n\nexport const importedModulesOf = (sourceFile: SourceFile): readonly string[] =>\n pipe(\n sourceFile.statements,\n Arr.map((statement) => moduleSpecifierOf(statement)),\n Arr.getSomes,\n );\n","import { Array as Arr, Order, Schema, pipe } from \"effect\";\n\nimport type { Node } from \"./compiler.ts\";\nimport { columnOf, lineOf } from \"./syntax.ts\";\n\nconst RuleNameSchema = Schema.Literals([\n \"owner-annotation\",\n \"duplicate-value-set\",\n \"owner-value-set\",\n \"owner-extension\",\n \"owned-literal\",\n \"library-value-set\",\n \"library-shape\",\n \"unused-override\",\n \"removable-override\",\n \"hidden-unicode\",\n \"python-file\",\n \"python-command\",\n \"unneeded-file\",\n \"unneeded-setup\",\n \"cargo-outside-pnpm\",\n \"nested-docs\",\n \"root-readme\",\n \"agent-docs-length\",\n \"shell-script\",\n \"workflow-script\",\n \"stack-dependency\",\n \"install-size\",\n \"unverified-crate\",\n \"hidden-verify\",\n \"root-workspace-path\",\n \"shared-uncached-task\",\n \"workflow-path\",\n \"colocated-test\",\n \"comment\",\n]);\n\nexport type RuleName = typeof RuleNameSchema.Type;\n\nconst ProblemSchema = Schema.Struct({\n file: Schema.String,\n line: Schema.Int,\n column: Schema.Int,\n rule: RuleNameSchema,\n message: Schema.String,\n});\n\nexport type Problem = typeof ProblemSchema.Type;\n\nexport const ProblemList = Schema.Array(ProblemSchema);\n\nexport const CANDIDATE_LIMIT = 3;\n\nexport interface Finding {\n readonly rule: RuleName;\n readonly message: string;\n}\n\nexport const problemAt =\n ({ rule, message }: Finding) =>\n (node: Node): Problem => ({\n file: node.getSourceFile().fileName,\n line: lineOf(node),\n column: columnOf(node),\n rule,\n message,\n });\n\nconst problemOrder: Order.Order<Problem> = Order.combineAll([\n Order.mapInput(Order.String, (problem: Problem) => problem.file),\n Order.mapInput(Order.Number, (problem: Problem) => problem.line),\n Order.mapInput(Order.Number, (problem: Problem) => problem.column),\n Order.mapInput(Order.String, (problem: Problem) => problem.rule),\n Order.mapInput(Order.String, (problem: Problem) => problem.message),\n]);\n\nconst problemKey = (problem: Problem): string =>\n pipe(\n [problem.file, String(problem.line), String(problem.column), problem.rule, problem.message],\n Arr.join(\"\\0\"),\n );\n\nexport const sortProblems = (problems: readonly Problem[]): readonly Problem[] =>\n Arr.sort(\n Arr.dedupeWith(problems, (left, right) => problemKey(left) === problemKey(right)),\n problemOrder,\n );\n\nexport const describeFinding = (problem: Problem): string => `[${problem.rule}] ${problem.message}`;\n\nexport const formatProblem =\n (relative: (file: string) => string) =>\n (problem: Problem): string =>\n `${relative(problem.file)}:${String(problem.line)}:${String(problem.column)} ${describeFinding(problem)}`;\n"],"mappings":"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"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Array, Context, Effect, FileSystem, Layer, Path, Stream, String, pipe } from "effect";
|
|
2
|
+
import { ChildProcess, ChildProcessSpawner } from "effect/process";
|
|
3
|
+
import { NodeChildProcessSpawner, NodeFileSystem, NodePath, NodeStdio } from "@effect/platform-node-shared";
|
|
4
|
+
// src/shared/lib/node-services.ts
|
|
5
|
+
/** @internal */
|
|
6
|
+
const nodeServicesLayer = Layer.provideMerge(NodeChildProcessSpawner.layer, Layer.mergeAll(NodeFileSystem.layer, NodePath.layer, NodeStdio.layer));
|
|
7
|
+
// src/shared/lib/repository-files.ts
|
|
8
|
+
const MISSING_SIZE = 0;
|
|
9
|
+
const GENERATED_PATHSPEC = ":(attr:linguist-generated)";
|
|
10
|
+
const LISTED_ARGS = [
|
|
11
|
+
"--cached",
|
|
12
|
+
"--others",
|
|
13
|
+
"--exclude-standard"
|
|
14
|
+
];
|
|
15
|
+
const NODE_MODULES = "node_modules";
|
|
16
|
+
var RepositoryFiles = class extends Context.Service()("@r_masseater/msch/shared/lib/repository-files/RepositoryFiles") {};
|
|
17
|
+
const nodeRepositoryFiles = Layer.effect(RepositoryFiles, Effect.gen(function* nodeRepositoryFiles() {
|
|
18
|
+
const fs = yield* FileSystem.FileSystem;
|
|
19
|
+
const path = yield* Path.Path;
|
|
20
|
+
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
|
|
21
|
+
const gitPaths = (root, args, separator) => Effect.gen(function* listPaths() {
|
|
22
|
+
const listed = yield* (yield* ChildProcess.make("git", args, {
|
|
23
|
+
cwd: root,
|
|
24
|
+
stdin: "ignore"
|
|
25
|
+
})).stdout.pipe(Stream.decodeText(), Stream.mkString);
|
|
26
|
+
return pipe(String.split(listed, separator), Array.filter(String.isNonEmpty));
|
|
27
|
+
}).pipe(Effect.scoped, Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner), Effect.orElseSucceed(() => []));
|
|
28
|
+
const gitFiles = (root, args) => gitPaths(root, [
|
|
29
|
+
"ls-files",
|
|
30
|
+
"-z",
|
|
31
|
+
...args
|
|
32
|
+
], "\0");
|
|
33
|
+
return RepositoryFiles.of({
|
|
34
|
+
generatedFiles: (root) => gitFiles(root, ["--", GENERATED_PATHSPEC]).pipe(Effect.map(Array.map((file) => path.join(root, file)))),
|
|
35
|
+
listedFiles: (root) => gitFiles(root, LISTED_ARGS),
|
|
36
|
+
matchingFiles: (root, pathspecs) => gitFiles(root, [
|
|
37
|
+
...LISTED_ARGS,
|
|
38
|
+
"--",
|
|
39
|
+
...pathspecs
|
|
40
|
+
]),
|
|
41
|
+
ignoredPaths: (root, paths) => gitPaths(root, [
|
|
42
|
+
"check-ignore",
|
|
43
|
+
"--",
|
|
44
|
+
...paths
|
|
45
|
+
], "\n"),
|
|
46
|
+
readFile: (file) => fs.readFileString(file).pipe(Effect.option),
|
|
47
|
+
exists: (file) => fs.exists(file).pipe(Effect.orElseSucceed(() => false)),
|
|
48
|
+
realPath: (file) => fs.realPath(file).pipe(Effect.orElseSucceed(() => file)),
|
|
49
|
+
readDirectory: (directory) => fs.readDirectory(directory).pipe(Effect.orElseSucceed(() => [])),
|
|
50
|
+
isDirectory: (file) => fs.stat(file).pipe(Effect.map((info) => info.type === "Directory"), Effect.option),
|
|
51
|
+
fileSize: (file) => fs.stat(file).pipe(Effect.map((info) => Number(info.size)), Effect.orElseSucceed(() => MISSING_SIZE)),
|
|
52
|
+
join: (...segments) => path.join(...segments),
|
|
53
|
+
resolve: (...segments) => path.resolve(...segments),
|
|
54
|
+
relative: (from, to) => path.relative(from, to),
|
|
55
|
+
dirname: (file) => path.dirname(file),
|
|
56
|
+
basename: (file) => path.basename(file)
|
|
57
|
+
});
|
|
58
|
+
})).pipe(Layer.provide(nodeServicesLayer));
|
|
59
|
+
export { nodeServicesLayer as i, RepositoryFiles as n, nodeRepositoryFiles as r, NODE_MODULES as t };
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=repository-files-DcTnXciI.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository-files-DcTnXciI.mjs","names":["Str","Arr"],"sources":["../src/shared/lib/node-services.ts","../src/shared/lib/repository-files.ts"],"sourcesContent":["import {\n NodeChildProcessSpawner,\n NodeFileSystem,\n NodePath,\n NodeStdio,\n} from \"@effect/platform-node-shared\";\nimport { Layer } from \"effect\";\n\n/** @internal */\nexport const nodeServicesLayer = Layer.provideMerge(\n NodeChildProcessSpawner.layer,\n Layer.mergeAll(NodeFileSystem.layer, NodePath.layer, NodeStdio.layer),\n);\n","import {\n Array as Arr,\n Context,\n Effect,\n FileSystem,\n Layer,\n Path,\n Stream,\n String as Str,\n pipe,\n} from \"effect\";\nimport type { Option } from \"effect\";\nimport { ChildProcess, ChildProcessSpawner } from \"effect/process\";\n\nimport { nodeServicesLayer } from \"./node-services.ts\";\n\nconst MISSING_SIZE = 0;\nconst GENERATED_PATHSPEC = \":(attr:linguist-generated)\";\nconst LISTED_ARGS = [\"--cached\", \"--others\", \"--exclude-standard\"];\n\nexport const NODE_MODULES = \"node_modules\";\n\nexport class RepositoryFiles extends Context.Service<\n RepositoryFiles,\n {\n readonly readFile: (file: string) => Effect.Effect<Option.Option<string>>;\n readonly exists: (file: string) => Effect.Effect<boolean>;\n readonly realPath: (file: string) => Effect.Effect<string>;\n readonly readDirectory: (directory: string) => Effect.Effect<readonly string[]>;\n readonly generatedFiles: (root: string) => Effect.Effect<readonly string[]>;\n readonly listedFiles: (root: string) => Effect.Effect<readonly string[]>;\n readonly matchingFiles: (\n root: string,\n pathspecs: readonly string[],\n ) => Effect.Effect<readonly string[]>;\n readonly ignoredPaths: (\n root: string,\n paths: readonly string[],\n ) => Effect.Effect<readonly string[]>;\n readonly isDirectory: (file: string) => Effect.Effect<Option.Option<boolean>>;\n readonly fileSize: (file: string) => Effect.Effect<number>;\n readonly join: (...segments: readonly string[]) => string;\n readonly resolve: (...segments: readonly string[]) => string;\n readonly relative: (from: string, to: string) => string;\n readonly dirname: (file: string) => string;\n readonly basename: (file: string) => string;\n }\n>()(\"@r_masseater/msch/shared/lib/repository-files/RepositoryFiles\") {}\n\ntype GitPaths = (\n root: string,\n args: readonly string[],\n separator: string,\n) => Effect.Effect<readonly string[]>;\n\nexport const nodeRepositoryFiles = Layer.effect(\n RepositoryFiles,\n Effect.gen(function* nodeRepositoryFiles() {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;\n const gitPaths: GitPaths = (root, args, separator) =>\n Effect.gen(function* listPaths() {\n const handle = yield* ChildProcess.make(\"git\", args, {\n cwd: root,\n stdin: \"ignore\",\n });\n const listed = yield* handle.stdout.pipe(Stream.decodeText(), Stream.mkString);\n return pipe(Str.split(listed, separator), Arr.filter(Str.isNonEmpty));\n }).pipe(\n Effect.scoped,\n Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),\n Effect.orElseSucceed((): readonly string[] => []),\n );\n const gitFiles = (root: string, args: readonly string[]): Effect.Effect<readonly string[]> =>\n gitPaths(root, [\"ls-files\", \"-z\", ...args], \"\\0\");\n return RepositoryFiles.of({\n generatedFiles: (root) =>\n gitFiles(root, [\"--\", GENERATED_PATHSPEC]).pipe(\n Effect.map(Arr.map((file) => path.join(root, file))),\n ),\n listedFiles: (root) => gitFiles(root, LISTED_ARGS),\n matchingFiles: (root, pathspecs) => gitFiles(root, [...LISTED_ARGS, \"--\", ...pathspecs]),\n ignoredPaths: (root, paths) => gitPaths(root, [\"check-ignore\", \"--\", ...paths], \"\\n\"),\n readFile: (file) => fs.readFileString(file).pipe(Effect.option),\n exists: (file) => fs.exists(file).pipe(Effect.orElseSucceed(() => false)),\n realPath: (file) => fs.realPath(file).pipe(Effect.orElseSucceed(() => file)),\n readDirectory: (directory) =>\n fs.readDirectory(directory).pipe(Effect.orElseSucceed((): readonly string[] => [])),\n isDirectory: (file) =>\n fs.stat(file).pipe(\n Effect.map((info) => info.type === \"Directory\"),\n Effect.option,\n ),\n fileSize: (file) =>\n fs.stat(file).pipe(\n Effect.map((info) => Number(info.size)),\n Effect.orElseSucceed(() => MISSING_SIZE),\n ),\n join: (...segments) => path.join(...segments),\n resolve: (...segments) => path.resolve(...segments),\n relative: (from, to) => path.relative(from, to),\n dirname: (file) => path.dirname(file),\n basename: (file) => path.basename(file),\n });\n }),\n).pipe(Layer.provide(nodeServicesLayer));\n"],"mappings":";;;;;AASA,MAAa,oBAAoB,MAAM,aACrC,wBAAwB,OACxB,MAAM,SAAS,eAAe,OAAO,SAAS,OAAO,UAAU,KAAK,CACtE;;ACIA,MAAM,eAAe;AACrB,MAAM,qBAAqB;AAC3B,MAAM,cAAc;CAAC;CAAY;CAAY;AAAoB;AAEjE,MAAa,eAAe;AAE5B,IAAa,kBAAb,cAAqC,QAAQ,QAyB3C,CAAC,CAAC,+DAA+D,CAAC,CAAC,CAAC;AAQtE,MAAa,sBAAsB,MAAM,OACvC,iBACA,OAAO,IAAI,UAAU,sBAAsB;CACzC,MAAM,KAAK,OAAO,WAAW;CAC7B,MAAM,OAAO,OAAO,KAAK;CACzB,MAAM,UAAU,OAAO,oBAAoB;CAC3C,MAAM,YAAsB,MAAM,MAAM,cACtC,OAAO,IAAI,UAAU,YAAY;EAK/B,MAAM,SAAS,QAAO,OAJA,aAAa,KAAK,OAAO,MAAM;GACnD,KAAK;GACL,OAAO;EACT,CAAC,EAAA,CAC4B,OAAO,KAAK,OAAO,WAAW,GAAG,OAAO,QAAQ;EAC7E,OAAO,KAAKA,OAAI,MAAM,QAAQ,SAAS,GAAGC,MAAI,OAAOD,OAAI,UAAU,CAAC;CACtE,CAAC,CAAC,CAAC,KACD,OAAO,QACP,OAAO,eAAe,oBAAoB,qBAAqB,OAAO,GACtE,OAAO,oBAAuC,CAAC,CAAC,CAClD;CACF,MAAM,YAAY,MAAc,SAC9B,SAAS,MAAM;EAAC;EAAY;EAAM,GAAG;CAAI,GAAG,IAAI;CAClD,OAAO,gBAAgB,GAAG;EACxB,iBAAiB,SACf,SAAS,MAAM,CAAC,MAAM,kBAAkB,CAAC,CAAC,CAAC,KACzC,OAAO,IAAIC,MAAI,KAAK,SAAS,KAAK,KAAK,MAAM,IAAI,CAAC,CAAC,CACrD;EACF,cAAc,SAAS,SAAS,MAAM,WAAW;EACjD,gBAAgB,MAAM,cAAc,SAAS,MAAM;GAAC,GAAG;GAAa;GAAM,GAAG;EAAS,CAAC;EACvF,eAAe,MAAM,UAAU,SAAS,MAAM;GAAC;GAAgB;GAAM,GAAG;EAAK,GAAG,IAAI;EACpF,WAAW,SAAS,GAAG,eAAe,IAAI,CAAC,CAAC,KAAK,OAAO,MAAM;EAC9D,SAAS,SAAS,GAAG,OAAO,IAAI,CAAC,CAAC,KAAK,OAAO,oBAAoB,KAAK,CAAC;EACxE,WAAW,SAAS,GAAG,SAAS,IAAI,CAAC,CAAC,KAAK,OAAO,oBAAoB,IAAI,CAAC;EAC3E,gBAAgB,cACd,GAAG,cAAc,SAAS,CAAC,CAAC,KAAK,OAAO,oBAAuC,CAAC,CAAC,CAAC;EACpF,cAAc,SACZ,GAAG,KAAK,IAAI,CAAC,CAAC,KACZ,OAAO,KAAK,SAAS,KAAK,SAAS,WAAW,GAC9C,OAAO,MACT;EACF,WAAW,SACT,GAAG,KAAK,IAAI,CAAC,CAAC,KACZ,OAAO,KAAK,SAAS,OAAO,KAAK,IAAI,CAAC,GACtC,OAAO,oBAAoB,YAAY,CACzC;EACF,OAAO,GAAG,aAAa,KAAK,KAAK,GAAG,QAAQ;EAC5C,UAAU,GAAG,aAAa,KAAK,QAAQ,GAAG,QAAQ;EAClD,WAAW,MAAM,OAAO,KAAK,SAAS,MAAM,EAAE;EAC9C,UAAU,SAAS,KAAK,QAAQ,IAAI;EACpC,WAAW,SAAS,KAAK,SAAS,IAAI;CACxC,CAAC;AACH,CAAC,CACH,CAAC,CAAC,KAAK,MAAM,QAAQ,iBAAiB,CAAC"}
|
|
@@ -1,12 +1,144 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Array, Effect, Match, Option, Predicate, Record, Schema, String, pipe } from "effect";
|
|
1
|
+
import { n as RepositoryFiles, t as NODE_MODULES } from "./repository-files-DcTnXciI.mjs";
|
|
2
|
+
import { Array, Effect, Match, Option, Order, Predicate, Record, Schema, String as String$1, pipe } from "effect";
|
|
3
3
|
import { parse, resolveConfigFromFile } from "vite-plus";
|
|
4
4
|
import { parse as parse$1 } from "yaml";
|
|
5
|
-
// src/
|
|
5
|
+
// src/entities/package/model/dependencies.ts
|
|
6
|
+
const DependencyMap = Schema.optional(Schema.Record(Schema.String, Schema.String));
|
|
7
|
+
const PackageManifest = Schema.Struct({
|
|
8
|
+
name: Schema.optional(Schema.String),
|
|
9
|
+
dependencies: DependencyMap,
|
|
10
|
+
devDependencies: DependencyMap,
|
|
11
|
+
peerDependencies: DependencyMap,
|
|
12
|
+
exports: Schema.optional(Schema.Unknown),
|
|
13
|
+
types: Schema.optional(Schema.String),
|
|
14
|
+
typings: Schema.optional(Schema.String),
|
|
15
|
+
main: Schema.optional(Schema.String)
|
|
16
|
+
});
|
|
17
|
+
const MANIFEST_FILE$1 = "package.json";
|
|
18
|
+
const WORKSPACE_PROTOCOL = "workspace:";
|
|
19
|
+
const ROOT_SUBPATH$1 = ".";
|
|
20
|
+
const SUBPATH_PREFIX = "./";
|
|
21
|
+
const WILDCARD = "*";
|
|
22
|
+
const TYPES_CONDITION = "types";
|
|
23
|
+
const TYPES_SCOPE = "@types/";
|
|
24
|
+
const TYPES_SCOPE_SEPARATOR = "__";
|
|
25
|
+
const CONDITION_DEPTH_LIMIT = 8;
|
|
26
|
+
const ROOT_DEPTH = 0;
|
|
27
|
+
const DEPTH_STEP = 1;
|
|
28
|
+
const DECLARATIONS_SUFFIX = /\.d\.[cm]?ts$|\.[cm]?tsx?$/u;
|
|
29
|
+
const SCRIPT_SUFFIX = /\.(?<module>[cm]?)js$/u;
|
|
30
|
+
const readManifest = Effect.fn("readManifest")(function* readManifest(directory) {
|
|
31
|
+
const files = yield* RepositoryFiles;
|
|
32
|
+
const manifestText = yield* files.readFile(files.join(directory, MANIFEST_FILE$1));
|
|
33
|
+
const text = yield* Effect.fromOption(manifestText);
|
|
34
|
+
return yield* Schema.decodeEffect(Schema.fromJsonString(PackageManifest))(text);
|
|
35
|
+
}, Effect.option);
|
|
36
|
+
const conditionsOf = (held) => {
|
|
37
|
+
if (!Predicate.isObject(held)) return [];
|
|
38
|
+
return Record.toEntries(held);
|
|
39
|
+
};
|
|
40
|
+
const typesConditionIn = (held, depth) => {
|
|
41
|
+
if (depth > CONDITION_DEPTH_LIMIT) return Option.none();
|
|
42
|
+
const entries = conditionsOf(held);
|
|
43
|
+
const declared = Array.findFirst(entries, ([condition, target]) => Option.liftPredicate(target, (candidate) => condition === TYPES_CONDITION && Predicate.isString(candidate))).pipe(Option.filter(Predicate.isString));
|
|
44
|
+
return Option.orElse(declared, () => Array.findFirst(entries, ([, nested]) => typesConditionIn(nested, depth + DEPTH_STEP)));
|
|
45
|
+
};
|
|
46
|
+
const anyConditionIn = (held, depth) => {
|
|
47
|
+
if (Predicate.isString(held)) return Option.some(held);
|
|
48
|
+
if (depth > CONDITION_DEPTH_LIMIT) return Option.none();
|
|
49
|
+
return Array.findFirst(conditionsOf(held), ([, nested]) => anyConditionIn(nested, depth + DEPTH_STEP));
|
|
50
|
+
};
|
|
51
|
+
const targetPathsOf = (target) => Array.getSomes([typesConditionIn(target, ROOT_DEPTH), anyConditionIn(target, ROOT_DEPTH)]);
|
|
52
|
+
const subpathTargetsOf = (exportsField) => {
|
|
53
|
+
if (Predicate.isString(exportsField)) return [{
|
|
54
|
+
subpath: ROOT_SUBPATH$1,
|
|
55
|
+
target: exportsField
|
|
56
|
+
}];
|
|
57
|
+
const entries = conditionsOf(exportsField);
|
|
58
|
+
if (!pipe(entries, Array.some(([subpath]) => String$1.startsWith(ROOT_SUBPATH$1)(subpath)))) return Array.match(entries, {
|
|
59
|
+
onEmpty: () => [],
|
|
60
|
+
onNonEmpty: () => [{
|
|
61
|
+
subpath: ROOT_SUBPATH$1,
|
|
62
|
+
target: exportsField
|
|
63
|
+
}]
|
|
64
|
+
});
|
|
65
|
+
return pipe(entries, Array.filter(([subpath]) => subpath === ROOT_SUBPATH$1 || String$1.startsWith(SUBPATH_PREFIX)(subpath)), Array.filter(([subpath]) => !String$1.includes(WILDCARD)(subpath)), Array.map(([subpath, target]) => ({
|
|
66
|
+
subpath,
|
|
67
|
+
target
|
|
68
|
+
})));
|
|
69
|
+
};
|
|
70
|
+
const declarationsCandidateFor = (entryPath) => {
|
|
71
|
+
if (DECLARATIONS_SUFFIX.test(entryPath)) return Option.some(entryPath);
|
|
72
|
+
if (!SCRIPT_SUFFIX.test(entryPath)) return Option.none();
|
|
73
|
+
return Option.some(String$1.replace(SCRIPT_SUFFIX, ".d.$<module>ts")(entryPath));
|
|
74
|
+
};
|
|
75
|
+
const firstDeclarationsAmong = Effect.fn("firstDeclarationsAmong")(function* firstDeclarations(directory, entryPaths) {
|
|
76
|
+
const files = yield* RepositoryFiles;
|
|
77
|
+
const candidates = Array.getSomes(pipe(entryPaths, Array.map((entryPath) => declarationsCandidateFor(entryPath))));
|
|
78
|
+
const existing = yield* Effect.filter(pipe(candidates, Array.map((candidate) => files.join(directory, candidate))), (candidate) => files.exists(candidate));
|
|
79
|
+
return yield* Option.match(Array.head(existing), {
|
|
80
|
+
onNone: () => Effect.succeedNone,
|
|
81
|
+
onSome: (candidate) => files.realPath(candidate).pipe(Effect.asSome)
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
const importNameOf = (packageName) => {
|
|
85
|
+
if (!String$1.startsWith(TYPES_SCOPE)(packageName)) return packageName;
|
|
86
|
+
const unscoped = String$1.slice(7)(packageName);
|
|
87
|
+
if (!String$1.includes(TYPES_SCOPE_SEPARATOR)(unscoped)) return unscoped;
|
|
88
|
+
return `@${String$1.replace(TYPES_SCOPE_SEPARATOR, "/")(unscoped)}`;
|
|
89
|
+
};
|
|
90
|
+
const specifierFor = (packageName, subpath) => {
|
|
91
|
+
const importName = importNameOf(packageName);
|
|
92
|
+
if (subpath === ROOT_SUBPATH$1) return importName;
|
|
93
|
+
return `${importName}/${String$1.slice(2)(subpath)}`;
|
|
94
|
+
};
|
|
95
|
+
const rootEntryPaths = (manifest) => Array.getSomes([
|
|
96
|
+
Option.fromUndefinedOr(manifest.types),
|
|
97
|
+
Option.fromUndefinedOr(manifest.typings),
|
|
98
|
+
Option.fromUndefinedOr(manifest.main)
|
|
99
|
+
]);
|
|
100
|
+
const subpathEntriesOf = Effect.fn("subpathEntriesOf")(function* subpathEntriesOf(packageName, directory, manifest) {
|
|
101
|
+
const found = yield* Effect.forEach(subpathTargetsOf(manifest.exports), ({ subpath, target }) => firstDeclarationsAmong(directory, targetPathsOf(target)).pipe(Effect.map(Option.map((declarationsPath) => ({
|
|
102
|
+
packageName,
|
|
103
|
+
specifier: specifierFor(packageName, subpath),
|
|
104
|
+
declarationsPath
|
|
105
|
+
})))));
|
|
106
|
+
return Array.getSomes(found);
|
|
107
|
+
});
|
|
108
|
+
const entriesOfDependency = Effect.fn("entriesOfDependency")(function* entriesOfDependency(packageName, directory) {
|
|
109
|
+
const manifest = yield* readManifest(directory);
|
|
110
|
+
if (Option.isNone(manifest)) return [];
|
|
111
|
+
const subpathEntries = yield* subpathEntriesOf(packageName, directory, manifest.value);
|
|
112
|
+
const rootSpecifier = specifierFor(packageName, ROOT_SUBPATH$1);
|
|
113
|
+
if (pipe(subpathEntries, Array.some((entry) => entry.specifier === rootSpecifier))) return subpathEntries;
|
|
114
|
+
return [...(yield* firstDeclarationsAmong(directory, rootEntryPaths(manifest.value))).pipe(Option.map((declarationsPath) => ({
|
|
115
|
+
packageName,
|
|
116
|
+
specifier: rootSpecifier,
|
|
117
|
+
declarationsPath
|
|
118
|
+
})), Option.toArray), ...subpathEntries];
|
|
119
|
+
});
|
|
120
|
+
const declaredDependencies = (manifest) => pipe(Record.toEntries({
|
|
121
|
+
...manifest.dependencies,
|
|
122
|
+
...manifest.devDependencies,
|
|
123
|
+
...manifest.peerDependencies
|
|
124
|
+
}), Array.filter(([, range]) => !String$1.startsWith(WORKSPACE_PROTOCOL)(range)), Array.map(([packageName]) => packageName));
|
|
125
|
+
const workspaceDependencies = (manifest) => pipe(Record.toEntries({
|
|
126
|
+
...manifest.dependencies,
|
|
127
|
+
...manifest.devDependencies
|
|
128
|
+
}), Array.filter(([, range]) => String$1.startsWith(WORKSPACE_PROTOCOL)(range)), Array.map(([packageName]) => packageName));
|
|
129
|
+
const entryOrder = Order.mapInput(Order.String, (entry) => entry.specifier);
|
|
130
|
+
const dependencyEntries = Effect.fn("dependencyEntries")(function* dependencyEntries(packageDirectory) {
|
|
131
|
+
const files = yield* RepositoryFiles;
|
|
132
|
+
const manifest = yield* readManifest(packageDirectory);
|
|
133
|
+
if (Option.isNone(manifest)) return [];
|
|
134
|
+
const entries = yield* Effect.forEach(declaredDependencies(manifest.value), (packageName) => entriesOfDependency(packageName, files.join(packageDirectory, NODE_MODULES, packageName)));
|
|
135
|
+
return Array.sort(Array.dedupeWith(entries.flat(), (left, right) => left.specifier === right.specifier), entryOrder);
|
|
136
|
+
});
|
|
137
|
+
// src/entities/package/model/public-entries.ts
|
|
6
138
|
const SOURCE = /\.[cm]?tsx?$/u;
|
|
7
139
|
const BUILT = /\.(?:d\.)?[cm]?[jt]s$/u;
|
|
8
140
|
const DECLARATION = ".d.";
|
|
9
|
-
const SEPARATOR$
|
|
141
|
+
const SEPARATOR$3 = "/";
|
|
10
142
|
const ROOT_SUBPATH = ".";
|
|
11
143
|
const BIN_LABEL = "bin";
|
|
12
144
|
const targetsIn = (held) => {
|
|
@@ -17,7 +149,7 @@ const targetsIn = (held) => {
|
|
|
17
149
|
const subpathsOf = (exportsField) => {
|
|
18
150
|
if (!Predicate.isObject(exportsField)) return [[ROOT_SUBPATH, exportsField]];
|
|
19
151
|
const entries = Record.toEntries(exportsField);
|
|
20
|
-
if (pipe(entries, Array.some(([key]) => String.startsWith(ROOT_SUBPATH)(key)))) return entries;
|
|
152
|
+
if (pipe(entries, Array.some(([key]) => String$1.startsWith(ROOT_SUBPATH)(key)))) return entries;
|
|
21
153
|
return [[ROOT_SUBPATH, exportsField]];
|
|
22
154
|
};
|
|
23
155
|
const binsOf = (manifest) => {
|
|
@@ -28,9 +160,9 @@ const binsOf = (manifest) => {
|
|
|
28
160
|
if (!Predicate.isObject(manifest.bin)) return [];
|
|
29
161
|
return pipe(Record.toEntries(manifest.bin), Array.map(([name, target]) => [`${BIN_LABEL} ${name}`, target]));
|
|
30
162
|
};
|
|
31
|
-
const baseNameOf = (target) => pipe(String.split(target, SEPARATOR$
|
|
163
|
+
const baseNameOf = (target) => pipe(String$1.split(target, SEPARATOR$3), Array.last, Option.getOrElse(() => target), String$1.replace(BUILT, ""));
|
|
32
164
|
const sourceOf = ({ join, packEntries }) => (target) => {
|
|
33
|
-
if (SOURCE.test(target) && !String.includes(DECLARATION)(target)) return Option.some(join(target));
|
|
165
|
+
if (SOURCE.test(target) && !String$1.includes(DECLARATION)(target)) return Option.some(join(target));
|
|
34
166
|
const name = baseNameOf(target);
|
|
35
167
|
return pipe(packEntries, Array.findFirst((entry) => entry.name === name), Option.map((entry) => entry.source));
|
|
36
168
|
};
|
|
@@ -38,10 +170,10 @@ const publicEntriesOf = (lookup) => pipe([...subpathsOf(lookup.manifest.exports)
|
|
|
38
170
|
label,
|
|
39
171
|
source
|
|
40
172
|
})))), Array.dedupeWith((left, right) => left.label === right.label && left.source === right.source));
|
|
41
|
-
// src/published.ts
|
|
42
|
-
const CONFIG_FILE = "vite.config.ts";
|
|
43
|
-
const SEPARATOR = "/";
|
|
44
|
-
const READ_CONCURRENCY = 16;
|
|
173
|
+
// src/entities/package/model/published.ts
|
|
174
|
+
const CONFIG_FILE$1 = "vite.config.ts";
|
|
175
|
+
const SEPARATOR$2 = "/";
|
|
176
|
+
const READ_CONCURRENCY$1 = 16;
|
|
45
177
|
const SOURCE_EXTENSION = /\.[cm]?tsx?$/u;
|
|
46
178
|
const UNIT_BYTES = [
|
|
47
179
|
["B", 1],
|
|
@@ -73,7 +205,7 @@ const PublicManifest = Schema.Struct({ private: Schema.optional(Schema.Literal(f
|
|
|
73
205
|
const taggedError$1 = Schema.TaggedError;
|
|
74
206
|
var WorkspaceConfigUnreadable = class extends taggedError$1()("WorkspaceConfigUnreadable", { file: Schema.String }) {};
|
|
75
207
|
const bytesPer = (unit) => pipe(UNIT_BYTES, Array.findFirst(([name]) => name === unit), Option.map(([, bytes]) => bytes), Option.getOrElse(() => NaN));
|
|
76
|
-
const nameOf = (source) => pipe(String.split(source, SEPARATOR), Array.last, Option.getOrElse(() => source), String.replace(SOURCE_EXTENSION, ""));
|
|
208
|
+
const nameOf = (source) => pipe(String$1.split(source, SEPARATOR$2), Array.last, Option.getOrElse(() => source), String$1.replace(SOURCE_EXTENSION, ""));
|
|
77
209
|
const entriesOf = (entry) => {
|
|
78
210
|
if (Predicate.isString(entry)) return [{
|
|
79
211
|
name: nameOf(entry),
|
|
@@ -129,35 +261,11 @@ const publishedIn = Effect.fn("publishedIn")(function* publishedIn(root, configN
|
|
|
129
261
|
const publishedWorkspaces = Effect.fn("publishedWorkspaces")(function* publishedWorkspaces(root) {
|
|
130
262
|
const files = yield* RepositoryFiles;
|
|
131
263
|
const names = yield* files.listedFiles(root);
|
|
132
|
-
const configs = pipe(names, Array.filter((name) => files.basename(name) === CONFIG_FILE && String.includes(SEPARATOR)(name)));
|
|
133
|
-
const found = yield* Effect.forEach(configs, (name) => publishedIn(root, name), { concurrency: READ_CONCURRENCY });
|
|
264
|
+
const configs = pipe(names, Array.filter((name) => files.basename(name) === CONFIG_FILE$1 && String$1.includes(SEPARATOR$2)(name)));
|
|
265
|
+
const found = yield* Effect.forEach(configs, (name) => publishedIn(root, name), { concurrency: READ_CONCURRENCY$1 });
|
|
134
266
|
return Array.getSomes(found);
|
|
135
267
|
});
|
|
136
|
-
// src/workspace-
|
|
137
|
-
const WORKSPACE_FILE = "pnpm-workspace.yaml";
|
|
138
|
-
const MANIFEST_FILE = "package.json";
|
|
139
|
-
const NEGATION = "!";
|
|
140
|
-
const WorkspaceFile = Schema.Struct({ packages: Schema.optionalKey(Schema.Array(Schema.String)) });
|
|
141
|
-
const decodeWorkspaceFile = Schema.decodeUnknownOption(WorkspaceFile);
|
|
142
|
-
const manifestPathspec = (pattern) => {
|
|
143
|
-
if (String.startsWith(NEGATION)(pattern)) return `:(glob,exclude)${String.slice(1)(pattern)}/${MANIFEST_FILE}`;
|
|
144
|
-
return `:(glob)${pattern}/${MANIFEST_FILE}`;
|
|
145
|
-
};
|
|
146
|
-
const packagesOf = (text) => {
|
|
147
|
-
const raw = parse$1(text);
|
|
148
|
-
return pipe(decodeWorkspaceFile(raw), Option.flatMap(({ packages }) => Option.fromUndefinedOr(packages)), Option.getOrElse(() => []));
|
|
149
|
-
};
|
|
150
|
-
/** @internal */
|
|
151
|
-
const workspaceDirectories = Effect.fn("workspaceDirectories")(function* workspaceDirectories(root) {
|
|
152
|
-
const files = yield* RepositoryFiles;
|
|
153
|
-
const text = yield* files.readFile(files.join(root, WORKSPACE_FILE));
|
|
154
|
-
const patterns = pipe(text, Option.map(packagesOf), Option.getOrElse(() => []));
|
|
155
|
-
if (!Array.isReadonlyArrayNonEmpty(patterns)) return [];
|
|
156
|
-
const manifests = yield* files.matchingFiles(root, pipe(patterns, Array.map(manifestPathspec)));
|
|
157
|
-
const directories = pipe(manifests, Array.map((manifest) => files.dirname(manifest)));
|
|
158
|
-
return Array.sort(directories, String.Order);
|
|
159
|
-
});
|
|
160
|
-
// src/config-literal.ts
|
|
268
|
+
// src/entities/workspace/model/config-literal.ts
|
|
161
269
|
const WRAPPERS = [
|
|
162
270
|
"TSAsExpression",
|
|
163
271
|
"TSSatisfiesExpression",
|
|
@@ -240,8 +348,9 @@ const nestedValues = (path) => (node) => {
|
|
|
240
348
|
const [outer, inner] = path;
|
|
241
349
|
return [...pipe(Option.some(node), Option.flatMap(propertyValue(outer)), Option.flatMap(propertyValue(inner)), Option.toArray), ...pipe(childrenOf(node), Array.flatMap(nestedValues(path)))];
|
|
242
350
|
};
|
|
243
|
-
// src/workspace-config-source.ts
|
|
351
|
+
// src/entities/workspace/model/workspace-config-source.ts
|
|
244
352
|
const SINGLE = 1;
|
|
353
|
+
const CONFIG_FILE = "vite.config.ts";
|
|
245
354
|
const taggedError = Schema.TaggedError;
|
|
246
355
|
var WorkspaceSettingsInvalid = class extends taggedError()("WorkspaceSettingsInvalid", {
|
|
247
356
|
file: Schema.String,
|
|
@@ -276,7 +385,55 @@ const programOf = Effect.fn("programOf")(function* programOf(file, text) {
|
|
|
276
385
|
if (Array.isReadonlyArrayNonEmpty(parsed.errors)) return yield* settingsInvalid(file)("vite.config.ts does not parse.");
|
|
277
386
|
return parsed.program;
|
|
278
387
|
});
|
|
279
|
-
|
|
388
|
+
const workspaceConfigOf = Effect.fn("workspaceConfigOf")(function* workspaceConfigOf(root, directory) {
|
|
389
|
+
const files = yield* RepositoryFiles;
|
|
390
|
+
const file = files.join(root, directory, CONFIG_FILE);
|
|
391
|
+
const text = yield* files.readFile(file);
|
|
392
|
+
if (Option.isNone(text)) return Option.none();
|
|
393
|
+
const program = yield* programOf(file, text.value);
|
|
394
|
+
return Option.some({
|
|
395
|
+
file,
|
|
396
|
+
source: text.value,
|
|
397
|
+
program
|
|
398
|
+
});
|
|
399
|
+
});
|
|
400
|
+
// src/entities/workspace/model/workspace-directories.ts
|
|
401
|
+
const WORKSPACE_FILE = "pnpm-workspace.yaml";
|
|
402
|
+
const MANIFEST_FILE = "package.json";
|
|
403
|
+
const NEGATION$1 = "!";
|
|
404
|
+
const WorkspaceFile = Schema.Struct({ packages: Schema.optionalKey(Schema.Array(Schema.String)) });
|
|
405
|
+
const decodeWorkspaceFile = Schema.decodeUnknownOption(WorkspaceFile);
|
|
406
|
+
const manifestPathspec = (pattern) => {
|
|
407
|
+
if (String$1.startsWith(NEGATION$1)(pattern)) return `:(glob,exclude)${String$1.slice(1)(pattern)}/${MANIFEST_FILE}`;
|
|
408
|
+
return `:(glob)${pattern}/${MANIFEST_FILE}`;
|
|
409
|
+
};
|
|
410
|
+
const packagesOf = (text) => {
|
|
411
|
+
const raw = parse$1(text);
|
|
412
|
+
return pipe(decodeWorkspaceFile(raw), Option.flatMap(({ packages }) => Option.fromUndefinedOr(packages)), Option.getOrElse(() => []));
|
|
413
|
+
};
|
|
414
|
+
/** @internal */
|
|
415
|
+
const workspaceDirectories = Effect.fn("workspaceDirectories")(function* workspaceDirectories(root) {
|
|
416
|
+
const files = yield* RepositoryFiles;
|
|
417
|
+
const text = yield* files.readFile(files.join(root, WORKSPACE_FILE));
|
|
418
|
+
const patterns = pipe(text, Option.map(packagesOf), Option.getOrElse(() => []));
|
|
419
|
+
if (!Array.isReadonlyArrayNonEmpty(patterns)) return [];
|
|
420
|
+
const manifests = yield* files.matchingFiles(root, pipe(patterns, Array.map(manifestPathspec)));
|
|
421
|
+
const directories = pipe(manifests, Array.map((manifest) => files.dirname(manifest)));
|
|
422
|
+
return Array.sort(directories, String$1.Order);
|
|
423
|
+
});
|
|
424
|
+
// src/entities/workspace/model/workspace-patterns.ts
|
|
425
|
+
const SEPARATOR$1 = "/";
|
|
426
|
+
const NEGATION = "!";
|
|
427
|
+
const RELATIVE = "./";
|
|
428
|
+
const withoutRelative = (target) => {
|
|
429
|
+
if (String$1.startsWith(RELATIVE)(target)) return String$1.slice(2)(target);
|
|
430
|
+
return target;
|
|
431
|
+
};
|
|
432
|
+
const prefixed = (directory) => (pattern) => {
|
|
433
|
+
if (String$1.startsWith(NEGATION)(pattern)) return `${NEGATION}${directory}${SEPARATOR$1}${String$1.slice(1)(pattern)}`;
|
|
434
|
+
return `${directory}${SEPARATOR$1}${withoutRelative(pattern)}`;
|
|
435
|
+
};
|
|
436
|
+
// src/entities/workspace/model/workspace-tasks.ts
|
|
280
437
|
const VERIFY_TASK = ["tasks", "verify"];
|
|
281
438
|
const NO_TASKS = { verify: [] };
|
|
282
439
|
const Tasks = Schema.Struct({ verify: Schema.Unknown });
|
|
@@ -293,6 +450,42 @@ const tasksOf = (manifest) => (program) => pipe(manifest, Option.flatMap((found)
|
|
|
293
450
|
onNone: () => NO_TASKS,
|
|
294
451
|
onSome: (name) => ({ verify: Array.filter([`${name}#verify`], () => definesTask(VERIFY_TASK)(program)) })
|
|
295
452
|
}));
|
|
296
|
-
|
|
453
|
+
// src/entities/workspace/model/workspace-names.ts
|
|
454
|
+
const SEPARATOR = "/";
|
|
455
|
+
const ALTERNATIVE = "|";
|
|
456
|
+
const SCOPE = /^@[^/]+\//u;
|
|
457
|
+
const SPECIAL = /[$()*+.?[\\\]^{|}]/gu;
|
|
458
|
+
const READ_CONCURRENCY = 16;
|
|
459
|
+
const NamedManifest = Schema.fromJsonString(Schema.Struct({ name: Schema.optional(Schema.String) }));
|
|
460
|
+
const patternOf = (names) => {
|
|
461
|
+
const alternatives = pipe(names, Array.map(String$1.replaceAll(SPECIAL, String.raw`\$&`)));
|
|
462
|
+
return new RegExp(`(?<![\\p{L}\\p{N}_-])(?:${Array.join(alternatives, ALTERNATIVE)})(?![\\p{L}\\p{N}_-])`, "gu");
|
|
463
|
+
};
|
|
464
|
+
const packageNameIn = (text) => pipe(text, Option.flatMap(Schema.decodeOption(NamedManifest)), Option.flatMap((manifest) => Option.fromUndefinedOr(manifest.name)));
|
|
465
|
+
const workspaceIn = Effect.fn("workspaceIn")(function* workspaceIn(root, name) {
|
|
466
|
+
const files = yield* RepositoryFiles;
|
|
467
|
+
const directory = files.dirname(name);
|
|
468
|
+
const text = yield* files.readFile(files.join(root, name));
|
|
469
|
+
const packageName = packageNameIn(text);
|
|
470
|
+
const unscoped = pipe(packageName, Option.map(String$1.replace(SCOPE, "")));
|
|
471
|
+
const names = pipe([
|
|
472
|
+
Option.some(directory),
|
|
473
|
+
Option.some(files.basename(directory)),
|
|
474
|
+
packageName,
|
|
475
|
+
unscoped
|
|
476
|
+
], Array.getSomes, Array.dedupe);
|
|
477
|
+
return {
|
|
478
|
+
directory,
|
|
479
|
+
pattern: patternOf(names)
|
|
480
|
+
};
|
|
481
|
+
});
|
|
482
|
+
/** @internal */
|
|
483
|
+
const namedWorkspaces = Effect.fn("namedWorkspaces")(function* namedWorkspaces(root) {
|
|
484
|
+
const files = yield* RepositoryFiles;
|
|
485
|
+
const listed = yield* files.listedFiles(root);
|
|
486
|
+
const manifests = pipe(listed, Array.filter((name) => String$1.includes(SEPARATOR)(name) && files.basename(name) === "package.json"));
|
|
487
|
+
return yield* Effect.forEach(manifests, (name) => workspaceIn(root, name), { concurrency: READ_CONCURRENCY });
|
|
488
|
+
});
|
|
489
|
+
export { publishedWorkspaces as C, readManifest as D, dependencyEntries as E, workspaceDependencies as O, entriesOf as S, MANIFEST_FILE$1 as T, childrenOf as _, hasVerifyTask as a, nestedValues as b, withoutRelative as c, merged as d, programOf as f, KeySchema as g, workspaceConfigOf as h, definesTask as i, workspaceDirectories as l, usedFrom as m, NO_TASKS as n, tasksOf as o, settingsInvalid as p, VERIFY_TASK as r, prefixed as s, namedWorkspaces as t, literalSettings as u, keyName as v, publicEntriesOf as w, PackEntry as x, literalOf as y };
|
|
297
490
|
|
|
298
|
-
//# sourceMappingURL=workspace-
|
|
491
|
+
//# sourceMappingURL=workspace-B1-fCPnh.mjs.map
|