@r_masseater/msch 0.57.1 → 0.57.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/changed.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as ProblemsFound, t as runCli } from "./runtime-LT40e_l3.mjs";
2
+ import { n as ProblemsFound, t as runCli } from "./runtime-A2p57njU.mjs";
3
3
  import { i as installedPackages, n as keepOnly, r as recordsIn, s as workspaceClosure } from "./pass-records-BCT1Ls9c.mjs";
4
4
  import { n as RepositoryFiles, t as NODE_MODULES } from "./repository-files-B5sRbxlz.mjs";
5
5
  import { o as workspaceDirectories } from "./dependencies-B6p7x90y.mjs";
package/dist/cli.mjs CHANGED
@@ -9,7 +9,7 @@ import { a as problemAtPosition, i as problemAt$8, o as problemInFile, r as form
9
9
  import { n as JAPANESE, t as COMMENT_DIRECTIVES } from "./comment-directives-CXgB6xpE.mjs";
10
10
  import { t as startedOnce } from "./started-once-muJbvD_I.mjs";
11
11
  import { $ as isPropertyAssignment, A as getTextOfJSDocComment, B as isExpressionStatement, D as getJSDocTags, E as SyntaxKind, F as isCallExpression, G as isInterfaceDeclaration, H as isFunctionExpression, I as isClassDeclaration, J as isNewExpression, K as isModuleBlock, L as isElementAccessExpression, M as isArrowFunction, N as isBinaryExpression, P as isBlock, Q as isPropertyAccessExpression, R as isEnumDeclaration, T as SymbolFlags, U as isIdentifier, V as isFunctionDeclaration, W as isImportDeclaration, X as isObjectLiteralExpression, Y as isNumericLiteral, Z as isParenthesizedExpression, _ as referencedSymbols, a as declarationsOf, at as isStringLiteral, b as uniqueByReference, c as importedModulesOf, ct as isTypeReferenceNode, d as isInsideAny, dt as isVariableDeclarationList, et as isReturnStatement, f as isOutsideDeclaration, ft as isVariableStatement, g as propertyNamesOf, h as packageOf$1, i as contains, it as isSpreadElement, j as isArrayLiteralExpression, k as getNameOfDeclaration, l as isExternalDeclaration, lt as isUnionTypeNode, m as lineOf$3, n as childrenOf$2, nt as isSignatureDeclaration, o as declaresAType, ot as isTypeAliasDeclaration, p as isTypeDeclaration, q as isModuleDeclaration, r as columnOf, rt as isSourceFile, s as descendantsOf, st as isTypeLiteralNode, t as carriesTag, tt as isSatisfiesExpression, u as isGenericDeclaration, ut as isVariableDeclaration, w as SignatureKind, y as symbolAt, z as isExportDeclaration } from "./syntax-CTiXR0EJ.mjs";
12
- import { n as ProblemsFound, r as writeStdout, t as runCli } from "./runtime-LT40e_l3.mjs";
12
+ import { n as ProblemsFound, r as writeStdout, t as runCli } from "./runtime-A2p57njU.mjs";
13
13
  import "./cli-contract-D7btWrEu.mjs";
14
14
  import { builtinModules } from "node:module";
15
15
  import { VpToolsError, runVpa } from "@r_masseater/vite-plus-adopt";
package/dist/exits.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as ProblemsFound, r as writeStdout, t as runCli } from "./runtime-LT40e_l3.mjs";
2
+ import { n as ProblemsFound, r as writeStdout, t as runCli } from "./runtime-A2p57njU.mjs";
3
3
  import { n as upstreamExitsMet } from "./upstream-exits-DitN-yYH.mjs";
4
4
  import { t as JSON_FLAG } from "./cli-contract-D7btWrEu.mjs";
5
5
  import { n as RepositoryFiles } from "./repository-files-B5sRbxlz.mjs";
package/dist/publish.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as runCli } from "./runtime-LT40e_l3.mjs";
2
+ import { t as runCli } from "./runtime-A2p57njU.mjs";
3
3
  import { i as writeOutputs, n as actionsOidcToken, r as mask, t as BROKER } from "./credential-broker-9FMyTp1H.mjs";
4
4
  import { Array, Config, Console, Effect, FileSystem, Option, Order, Path, Predicate, Record, Schema, Stdio, Stream, String as String$1, pipe } from "effect";
5
5
  import { ChildProcess, ChildProcessSpawner } from "effect/process";
@@ -0,0 +1,45 @@
1
+ import { r as nodeRepositoryFiles } from "./repository-files-B5sRbxlz.mjs";
2
+ import { Cause, Effect, Layer, Option, Schema, Stdio, Stream } from "effect";
3
+ import { FetchHttpClient } from "effect/http";
4
+ import { runMain } from "@effect/platform-node/NodeRuntime";
5
+ import { layer } from "@effect/platform-node/NodeServices";
6
+ import { Otlp, OtlpSerialization } from "effect/observability";
7
+ // src/app/output.ts
8
+ const taggedError = Schema.TaggedError;
9
+ var ProblemsFound = class extends taggedError()("ProblemsFound", { count: Schema.Finite }) {};
10
+ /** @internal */
11
+ const writeStdout = Effect.fn("writeStdout")(function* writeStdout(text) {
12
+ const stdio = yield* Stdio.Stdio;
13
+ yield* Stream.make(text).pipe(Stream.run(stdio.stdout()), Effect.orDie);
14
+ });
15
+ // ../node-main/src/features/run-main/model/run-main.ts
16
+ const platform = Layer.mergeAll(layer, FetchHttpClient.layer);
17
+ const runWithTracingAnd = ({ serviceName, services, onFailure }) => (program) => {
18
+ const tracing = Otlp.layerFromConfig({ resource: { serviceName } }).pipe(Layer.provide(OtlpSerialization.layerJson), Layer.provide(FetchHttpClient.layer));
19
+ const provided = Layer.provideMerge(services, platform);
20
+ const report = Option.fromNullishOr(onFailure);
21
+ const reported = Option.match(report, {
22
+ onNone: () => program,
23
+ onSome: (handler) => Effect.tapCause(program, handler)
24
+ });
25
+ runMain(Layer.mergeAll(tracing, provided).pipe(Layer.build, Effect.flatMap((context) => Effect.provideContext(reported, context)), Effect.scoped), { disableErrorReporting: Option.isSome(report) });
26
+ };
27
+ /** @internal */
28
+ const runMainWith = runWithTracingAnd;
29
+ // src/app/runtime.ts
30
+ const reportFailure = (cause) => Effect.gen(function* report() {
31
+ const stdio = yield* Stdio.Stdio;
32
+ if (Cause.findErrorOption(cause).pipe(Option.exists(Schema.is(ProblemsFound)))) return;
33
+ yield* Stream.make(`${Cause.pretty(cause)}\n`).pipe(Stream.run(stdio.stderr()), Effect.orDie);
34
+ });
35
+ /** @internal */
36
+ const runCli = (program) => {
37
+ runMainWith({
38
+ serviceName: "msch",
39
+ services: nodeRepositoryFiles,
40
+ onFailure: reportFailure
41
+ })(program);
42
+ };
43
+ export { ProblemsFound as n, writeStdout as r, runCli as t };
44
+
45
+ //# sourceMappingURL=runtime-A2p57njU.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-A2p57njU.mjs","names":["nodeServices"],"sources":["../src/app/output.ts","../../node-main/src/features/run-main/model/run-main.ts","../src/app/runtime.ts"],"sourcesContent":["import { Effect, Schema, Stdio, Stream } from \"effect\";\n\nconst taggedError = Schema.TaggedError;\n\nexport class ProblemsFound extends taggedError<ProblemsFound, { readonly brand: unique symbol }>()(\n \"ProblemsFound\",\n {\n count: Schema.Finite,\n },\n) {}\n\n/** @internal */\nexport const writeStdout = Effect.fn(\"writeStdout\")(function* writeStdout(text: string) {\n const stdio = yield* Stdio.Stdio;\n yield* Stream.make(text).pipe(Stream.run(stdio.stdout()), Effect.orDie);\n});\n","import { runMain as nodeRuntimeRunMain } from \"@effect/platform-node/NodeRuntime\";\nimport { layer as nodeServices } from \"@effect/platform-node/NodeServices\";\nimport type { NodeServices } from \"@effect/platform-node/NodeServices\";\nimport { Effect, Layer, Option } from \"effect\";\nimport type { Cause } from \"effect\";\nimport { FetchHttpClient } from \"effect/http\";\nimport type { HttpClient } from \"effect/http\";\nimport { Otlp, OtlpSerialization } from \"effect/observability\";\n\n/** @internal */\nexport type Platform = NodeServices | HttpClient.HttpClient;\n\n/** @internal */\nexport type Run<Provided> = <Success, Failure>(\n program: Effect.Effect<Success, Failure, Platform | Provided>,\n) => void;\n\n/** @internal */\nexport type Report<Provided> = <Failure>(\n cause: Cause.Cause<Failure>,\n) => Effect.Effect<void, never, Platform | Provided>;\n\nconst platform = Layer.mergeAll(nodeServices, FetchHttpClient.layer);\n\nconst runWithTracingAnd =\n <Provided, LayerFailure>({\n serviceName,\n services,\n onFailure,\n }: Readonly<{\n serviceName: string;\n services: Layer.Layer<Provided, LayerFailure, Platform>;\n onFailure?: Report<Provided>;\n }>): Run<Provided> =>\n (program) => {\n const tracing = Otlp.layerFromConfig({ resource: { serviceName } }).pipe(\n Layer.provide(OtlpSerialization.layerJson),\n Layer.provide(FetchHttpClient.layer),\n );\n const provided = Layer.provideMerge(services, platform);\n const report = Option.fromNullishOr(onFailure);\n const reported = Option.match(report, {\n onNone: () => program,\n onSome: (handler) => Effect.tapCause(program, handler),\n });\n nodeRuntimeRunMain(\n Layer.mergeAll(tracing, provided).pipe(\n Layer.build,\n Effect.flatMap((context) => Effect.provideContext(reported, context)),\n Effect.scoped,\n ),\n { disableErrorReporting: Option.isSome(report) },\n );\n };\n\nconst runWithTracing = (serviceName: string): Run<never> =>\n runWithTracingAnd({ serviceName, services: Layer.empty });\n\n/** @internal */\nexport const runMainWith = runWithTracingAnd;\n\n/** @internal */\nexport const runMain = runWithTracing;\n","import { runMainWith } from \"@r_masseater/node-main\";\nimport { Cause, Effect, Option, Schema, Stdio, Stream } from \"effect\";\nimport type { FileSystem, Path } from \"effect\";\nimport type { HttpClient } from \"effect/http\";\nimport type { ChildProcessSpawner } from \"effect/process\";\n\nimport { nodeRepositoryFiles } from \"#/shared/lib/repository-files.ts\";\nimport type { RepositoryFiles } from \"#/shared/lib/repository-files.ts\";\n\nimport { ProblemsFound } from \"./output.ts\";\n\nconst reportFailure = <Failure>(\n cause: Cause.Cause<Failure>,\n): Effect.Effect<void, never, Stdio.Stdio> =>\n Effect.gen(function* report() {\n const stdio = yield* Stdio.Stdio;\n const failed = Cause.findErrorOption(cause).pipe(Option.exists(Schema.is(ProblemsFound)));\n if (failed) {\n return;\n }\n yield* Stream.make(`${Cause.pretty(cause)}\\n`).pipe(Stream.run(stdio.stderr()), Effect.orDie);\n });\n\n/** @internal */\nexport const runCli = <Value, Failure>(\n program: Effect.Effect<\n Value,\n Failure,\n | RepositoryFiles\n | Stdio.Stdio\n | FileSystem.FileSystem\n | Path.Path\n | ChildProcessSpawner.ChildProcessSpawner\n | HttpClient.HttpClient\n >,\n): void => {\n runMainWith({\n serviceName: \"msch\",\n services: nodeRepositoryFiles,\n onFailure: reportFailure,\n })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GAAG,CAAC,CAAC,KAAK,OAAO,IAAI,MAAM,OAAO,CAAC,GAAG,OAAO,KAAK;AAC9F,CAAC;;AAGH,MAAa,UACX,YAUS;CACT,YAAY;EACV,aAAa;EACb,UAAU;EACV,WAAW;CACb,CAAC,CAAC,CAAC,OAAO;AACZ"}
package/dist/wake.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as runCli } from "./runtime-LT40e_l3.mjs";
2
+ import { t as runCli } from "./runtime-A2p57njU.mjs";
3
3
  import { n as actionsOidcToken, t as BROKER } from "./credential-broker-9FMyTp1H.mjs";
4
4
  import { Boolean, Console, Effect, Option, Schema } from "effect";
5
5
  import { HttpClient, HttpClientRequest, HttpClientResponse } from "effect/http";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r_masseater/msch",
3
- "version": "0.57.1",
3
+ "version": "0.57.2",
4
4
  "description": "masseater's check policy: points every finite value set and object shape at its one owner, and ships the oxlint preset of plugins and rules.",
5
5
  "keywords": [
6
6
  "lint",
@@ -88,6 +88,7 @@
88
88
  },
89
89
  "dependencies": {
90
90
  "@commitlint/config-conventional": "^21.2.4",
91
+ "@effect/platform-node": "^4.1.5",
91
92
  "@effect/platform-node-shared": "^4.1.5",
92
93
  "@html-eslint/eslint-plugin-react": "^0.68.0",
93
94
  "@pnpm/deps.path": "^1101.0.11",
@@ -100,7 +101,6 @@
100
101
  "@r_masseater/fu4-presets": "^0.1.2",
101
102
  "@r_masseater/h56m": "^0.2.0",
102
103
  "@r_masseater/h56m-presets": "^0.2.1",
103
- "@r_masseater/node-main": "^0.1.0",
104
104
  "@r_masseater/oxlint-plugin-decision": "^0.8.0",
105
105
  "@r_masseater/oxlint-typed-rules": "^0.5.0",
106
106
  "@r_masseater/textlint-rule-preset-ja": "^0.2.0",
@@ -129,11 +129,11 @@
129
129
  "yaml": "^2.9.1"
130
130
  },
131
131
  "devDependencies": {
132
- "@effect/platform-node": "4.1.5",
133
132
  "@effect/tsgo": "0.73.7",
134
133
  "@effect/vitest": "4.1.5",
135
134
  "@masseater.dev/path-kit": "0.0.0",
136
135
  "@r_masseater/github-workflow": "0.1.0",
136
+ "@r_masseater/node-main": "0.1.0",
137
137
  "@r_masseater/vitest-otlp": "0.2.2",
138
138
  "@types/node": "26.6.6",
139
139
  "@types/semver": "7.8.0",
@@ -1,28 +0,0 @@
1
- import { r as nodeRepositoryFiles } from "./repository-files-B5sRbxlz.mjs";
2
- import { Cause, Effect, Option, Schema, Stdio, Stream } from "effect";
3
- import { runMainWith } from "@r_masseater/node-main";
4
- // src/app/output.ts
5
- const taggedError = Schema.TaggedError;
6
- var ProblemsFound = class extends taggedError()("ProblemsFound", { count: Schema.Finite }) {};
7
- /** @internal */
8
- const writeStdout = Effect.fn("writeStdout")(function* writeStdout(text) {
9
- const stdio = yield* Stdio.Stdio;
10
- yield* Stream.make(text).pipe(Stream.run(stdio.stdout()), Effect.orDie);
11
- });
12
- // src/app/runtime.ts
13
- const reportFailure = (cause) => Effect.gen(function* report() {
14
- const stdio = yield* Stdio.Stdio;
15
- if (Cause.findErrorOption(cause).pipe(Option.exists(Schema.is(ProblemsFound)))) return;
16
- yield* Stream.make(`${Cause.pretty(cause)}\n`).pipe(Stream.run(stdio.stderr()), Effect.orDie);
17
- });
18
- /** @internal */
19
- const runCli = (program) => {
20
- runMainWith({
21
- serviceName: "msch",
22
- services: nodeRepositoryFiles,
23
- onFailure: reportFailure
24
- })(program);
25
- };
26
- export { ProblemsFound as n, writeStdout as r, runCli as t };
27
-
28
- //# sourceMappingURL=runtime-LT40e_l3.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-LT40e_l3.mjs","names":[],"sources":["../src/app/output.ts","../src/app/runtime.ts"],"sourcesContent":["import { Effect, Schema, Stdio, Stream } from \"effect\";\n\nconst taggedError = Schema.TaggedError;\n\nexport class ProblemsFound extends taggedError<ProblemsFound, { readonly brand: unique symbol }>()(\n \"ProblemsFound\",\n {\n count: Schema.Finite,\n },\n) {}\n\n/** @internal */\nexport const writeStdout = Effect.fn(\"writeStdout\")(function* writeStdout(text: string) {\n const stdio = yield* Stdio.Stdio;\n yield* Stream.make(text).pipe(Stream.run(stdio.stdout()), Effect.orDie);\n});\n","import { runMainWith } from \"@r_masseater/node-main\";\nimport { Cause, Effect, Option, Schema, Stdio, Stream } from \"effect\";\nimport type { FileSystem, Path } from \"effect\";\nimport type { HttpClient } from \"effect/http\";\nimport type { ChildProcessSpawner } from \"effect/process\";\n\nimport { nodeRepositoryFiles } from \"#/shared/lib/repository-files.ts\";\nimport type { RepositoryFiles } from \"#/shared/lib/repository-files.ts\";\n\nimport { ProblemsFound } from \"./output.ts\";\n\nconst reportFailure = <Failure>(\n cause: Cause.Cause<Failure>,\n): Effect.Effect<void, never, Stdio.Stdio> =>\n Effect.gen(function* report() {\n const stdio = yield* Stdio.Stdio;\n const failed = Cause.findErrorOption(cause).pipe(Option.exists(Schema.is(ProblemsFound)));\n if (failed) {\n return;\n }\n yield* Stream.make(`${Cause.pretty(cause)}\\n`).pipe(Stream.run(stdio.stderr()), Effect.orDie);\n });\n\n/** @internal */\nexport const runCli = <Value, Failure>(\n program: Effect.Effect<\n Value,\n Failure,\n | RepositoryFiles\n | Stdio.Stdio\n | FileSystem.FileSystem\n | Path.Path\n | ChildProcessSpawner.ChildProcessSpawner\n | HttpClient.HttpClient\n >,\n): void => {\n runMainWith({\n serviceName: \"msch\",\n services: nodeRepositoryFiles,\n onFailure: reportFailure,\n })(program);\n};\n"],"mappings":";;;;AAEA,MAAM,cAAc,OAAO;AAE3B,IAAa,gBAAb,cAAmC,YAA8D,CAAC,CAChG,iBACA,EACE,OAAO,OAAO,OAChB,CACF,CAAC,CAAC,CAAC;;AAGH,MAAa,cAAc,OAAO,GAAG,aAAa,CAAC,CAAC,UAAU,YAAY,MAAc;CACtF,MAAM,QAAQ,OAAO,MAAM;CAC3B,OAAO,OAAO,KAAK,IAAI,CAAC,CAAC,KAAK,OAAO,IAAI,MAAM,OAAO,CAAC,GAAG,OAAO,KAAK;AACxE,CAAC;;ACJD,MAAM,iBACJ,UAEA,OAAO,IAAI,UAAU,SAAS;CAC5B,MAAM,QAAQ,OAAO,MAAM;CAE3B,IADe,MAAM,gBAAgB,KAAK,CAAC,CAAC,KAAK,OAAO,OAAO,OAAO,GAAG,aAAa,CAAC,CAC9E,GACP;CAEF,OAAO,OAAO,KAAK,GAAG,MAAM,OAAO,KAAK,EAAE,GAAG,CAAC,CAAC,KAAK,OAAO,IAAI,MAAM,OAAO,CAAC,GAAG,OAAO,KAAK;AAC9F,CAAC;;AAGH,MAAa,UACX,YAUS;CACT,YAAY;EACV,aAAa;EACb,UAAU;EACV,WAAW;CACb,CAAC,CAAC,CAAC,OAAO;AACZ"}