@milkenjoyer/toolchain 0.14.1 → 0.16.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/README.md +17 -17
- package/STARTS.md +11 -0
- package/dist/effect-plugin-BsrW5_nI.mjs +79 -0
- package/dist/effect-plugin.d.mts +2 -3966
- package/dist/effect-plugin.mjs +1 -1
- package/dist/fmt-BaECz64m.mjs +8 -0
- package/dist/fmt.mjs +1 -8
- package/dist/formal.mjs +1 -1
- package/dist/guard-Doqk4Fju.mjs +143 -0
- package/dist/guard.mjs +1 -96
- package/dist/{lint-IhmtnBbx.mjs → lint-CfztB4u8.mjs} +1 -1
- package/dist/lint.mjs +1 -1
- package/dist/standard.mjs +557 -4
- package/dist/starts.d.mts +100 -0
- package/dist/starts.mjs +385 -0
- package/package.json +11 -9
- package/src/arithmetic.ts +60 -0
- package/src/compatible.ts +512 -0
- package/src/conformance.ts +56 -0
- package/src/effect-plugin.ts +24 -0
- package/src/effect-tsgo.ts +44 -0
- package/src/exceptions.ts +17 -0
- package/src/fmt.ts +13 -0
- package/src/foldkit-plugin.ts +51 -0
- package/src/guard.ts +307 -0
- package/src/hooks.ts +205 -0
- package/src/index.ts +1 -0
- package/src/knip.ts +25 -0
- package/src/lint.ts +170 -0
- package/src/plugin.ts +21 -0
- package/src/rules/no-comments.ts +36 -0
- package/src/rules/no-process-env.ts +68 -0
- package/src/rules/prefer-accessible-scene-locators.ts +227 -0
- package/src/rules/require-command-answer-names.ts +144 -0
- package/src/rules/require-past-tense-messages.ts +201 -0
- package/src/rules/use-temp-file-scoped.ts +132 -0
- package/src/rules.ts +121 -0
- package/src/shared/foldkit-api.ts +51 -0
- package/src/shared/member-path.ts +106 -0
- package/src/shared/syntax.ts +47 -0
- package/src/standard/alchemy.ts +70 -0
- package/src/standard/checks.ts +10 -1
- package/src/standard/config.ts +84 -0
- package/src/standard/domain-rules.ts +204 -0
- package/src/standard/domain.ts +296 -0
- package/src/standard/infra.ts +486 -0
- package/src/starts/boat.ts +140 -0
- package/src/starts/budget.ts +151 -0
- package/src/starts/policy.ts +171 -0
- package/src/starts.ts +84 -0
- package/src/versions.ts +221 -0
- package/dist/effect-plugin-BXUx9PPu.mjs +0 -3561
- package/dist/manifest-xQwgnYI1.mjs +0 -53
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as Arr from "effect/Array";
|
|
2
|
-
import { dual } from "effect/Function";
|
|
3
|
-
import * as R from "effect/Record";
|
|
4
|
-
import * as Schema from "effect/Schema";
|
|
5
|
-
import * as Effect from "effect/Effect";
|
|
6
|
-
import * as Result from "effect/Result";
|
|
7
|
-
// src/standard/manifest.ts
|
|
8
|
-
const Versions = Schema.Record(Schema.String, Schema.String).pipe(Schema.withDecodingDefaultKey(Effect.succeed({})));
|
|
9
|
-
const Catalogs = Schema.Record(Schema.String, Schema.Record(Schema.String, Schema.String)).pipe(Schema.withDecodingDefaultKey(Effect.succeed({})));
|
|
10
|
-
const WorkspaceList = Schema.Array(Schema.String);
|
|
11
|
-
const WorkspaceCatalogs = Schema.Struct({
|
|
12
|
-
catalog: Versions,
|
|
13
|
-
catalogs: Catalogs
|
|
14
|
-
});
|
|
15
|
-
const Manifest = Schema.fromJsonString(Schema.Struct({
|
|
16
|
-
dependencies: Versions,
|
|
17
|
-
devDependencies: Versions,
|
|
18
|
-
peerDependencies: Versions,
|
|
19
|
-
optionalDependencies: Versions,
|
|
20
|
-
overrides: Versions,
|
|
21
|
-
resolutions: Versions,
|
|
22
|
-
catalog: Versions,
|
|
23
|
-
catalogs: Catalogs,
|
|
24
|
-
workspaces: Schema.optionalKey(Schema.Union([WorkspaceList, WorkspaceCatalogs]))
|
|
25
|
-
}));
|
|
26
|
-
const named = (prefix, catalogs) => Arr.map(R.toEntries(catalogs), ([name, ranges]) => [`${prefix}.${name}`, ranges]);
|
|
27
|
-
const manifestRanges = (text) => {
|
|
28
|
-
const decoded = Schema.decodeResult(Manifest)(text);
|
|
29
|
-
if (Result.isFailure(decoded)) throw decoded.failure;
|
|
30
|
-
const manifest = decoded.success;
|
|
31
|
-
const workspaces = Schema.is(WorkspaceCatalogs)(manifest.workspaces) ? manifest.workspaces : {
|
|
32
|
-
catalog: {},
|
|
33
|
-
catalogs: {}
|
|
34
|
-
};
|
|
35
|
-
return [
|
|
36
|
-
["dependencies", manifest.dependencies],
|
|
37
|
-
["devDependencies", manifest.devDependencies],
|
|
38
|
-
["peerDependencies", manifest.peerDependencies],
|
|
39
|
-
["optionalDependencies", manifest.optionalDependencies],
|
|
40
|
-
["overrides", manifest.overrides],
|
|
41
|
-
["resolutions", manifest.resolutions],
|
|
42
|
-
["catalog", manifest.catalog],
|
|
43
|
-
["workspaces.catalog", workspaces.catalog],
|
|
44
|
-
...named("catalogs", manifest.catalogs),
|
|
45
|
-
...named("workspaces.catalogs", workspaces.catalogs)
|
|
46
|
-
];
|
|
47
|
-
};
|
|
48
|
-
const SEMVER = String.raw`\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?`;
|
|
49
|
-
const PLAIN = new RegExp(`^${SEMVER}$`, "u");
|
|
50
|
-
const EXACT = new RegExp(String.raw`^(?:npm:(?:@[\w.-]+\/)?[\w.-]+@)?${SEMVER}$`, "u");
|
|
51
|
-
const REFERENCE = /^(?:catalog:[\w.-]*|workspace:\*)$/u;
|
|
52
|
-
const exactFindings = dual(2, (file, text) => Arr.flatMap(manifestRanges(text), ([field, ranges]) => Arr.flatMap(R.toEntries(ranges), ([name, version]) => EXACT.test(version) || REFERENCE.test(version) ? [] : [`${file} ${field} ${name}: ${version} is not an exact version`])));
|
|
53
|
-
export { exactFindings as n, manifestRanges as r, PLAIN as t };
|