@r_masseater/vite-plus-adopt 0.10.0 → 0.10.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/README.md +26 -26
- package/dist/cli.mjs +1 -1
- package/dist/fsd.d.mts +1 -1
- package/dist/{index-vq2Re-JL.d.mts → index-DiN12XmL.d.mts} +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{steiger-Bi33gRXU.mjs → steiger-BX9S5pik.mjs} +17 -17
- package/dist/{steiger-Bi33gRXU.mjs.map → steiger-BX9S5pik.mjs.map} +1 -1
- package/dist/{vpa-B2qvWn3Q.mjs → vpa-DHB6y2A5.mjs} +2 -2
- package/dist/{vpa-B2qvWn3Q.mjs.map → vpa-DHB6y2A5.mjs.map} +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
# vite-plus-adopt
|
|
2
2
|
|
|
3
|
-
`vpa`
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
`vpa` is a CLI that brings Betterleaks, actionlint, zizmor, commitlint, textlint, markdownlint, Steiger, fallow and agent skill installation into Vite+. Write their settings and your dependency rules in `vite.config.ts`, and `vpa` reads them from there.
|
|
4
|
+
Running `vpa` once with no arguments runs every configured check in parallel and prints the results together.
|
|
5
|
+
It also bundles a Feature-Sliced Design plugin for Steiger and @arethetypeswrong/core, both running on TypeScript 7 alone.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Published to
|
|
8
8
|
|
|
9
9
|
- npm: [@r_masseater/vite-plus-adopt](https://www.npmjs.com/package/@r_masseater/vite-plus-adopt)
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Usage
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
14
|
vp add -D @r_masseater/vite-plus-adopt
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
postinstall
|
|
17
|
+
Allow its postinstall by adding it to `allowBuilds` in `pnpm-workspace.yaml`.
|
|
18
18
|
|
|
19
19
|
```yaml
|
|
20
20
|
allowBuilds:
|
|
@@ -29,13 +29,13 @@ import { defineConfig } from "vite-plus";
|
|
|
29
29
|
export default defineConfig({
|
|
30
30
|
commitlint: { extends: ["@commitlint/config-conventional"] },
|
|
31
31
|
dependencyRules: {
|
|
32
|
-
banned: { "
|
|
32
|
+
banned: { "Import tests from vite-plus/test": ["vitest", "@vitest/*"] },
|
|
33
33
|
peerRanges: "intersect",
|
|
34
34
|
},
|
|
35
35
|
betterleaks: {
|
|
36
36
|
extend: { useDefault: true },
|
|
37
37
|
filter: 'matchesAny(finding.line, [`\\bCF_BEACON_TOKEN = "[0-9a-f]{32}"`])',
|
|
38
|
-
ignoredSecrets: ["
|
|
38
|
+
ignoredSecrets: ["<SHA-256 of the secret>"],
|
|
39
39
|
},
|
|
40
40
|
steiger: { paths: ["apps/*/src"], rules: [...fsd.configs.recommended] },
|
|
41
41
|
textlint: {
|
|
@@ -48,11 +48,11 @@ export default defineConfig({
|
|
|
48
48
|
});
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
`import type {} from "@r_masseater/vite-plus-adopt"`
|
|
52
|
-
textlint
|
|
53
|
-
Steiger
|
|
51
|
+
`import type {} from "@r_masseater/vite-plus-adopt"` types the 8 keys above on `defineConfig`.
|
|
52
|
+
textlint checks the Markdown files Git tracks. To check other files too, list their globs (`files`) and the settings for them in `textlint.sources`. `presets` work there as well.
|
|
53
|
+
Steiger checks only the directories matching `steiger.paths` that directly contain FSD layer folders (`app`, `pages`, `widgets`, `features`, `entities`, `shared` and so on).
|
|
54
54
|
|
|
55
|
-
Git
|
|
55
|
+
Write the Git hooks like this.
|
|
56
56
|
|
|
57
57
|
```sh
|
|
58
58
|
# .vite-hooks/pre-commit
|
|
@@ -61,9 +61,9 @@ vpa --staged
|
|
|
61
61
|
vpa --commit-msg "$1"
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
##
|
|
64
|
+
## Agent skills
|
|
65
65
|
|
|
66
|
-
`skills
|
|
66
|
+
List GitHub repositories and commits in `skills`, and `vpa --prepare` puts their skills in `.agents/skills/`. Skills are picked by the `name` in `SKILL.md`, and `"all"` picks every skill under `root`.
|
|
67
67
|
|
|
68
68
|
```ts
|
|
69
69
|
export default defineConfig({
|
|
@@ -79,21 +79,21 @@ export default defineConfig({
|
|
|
79
79
|
});
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
Fetched skills are stored read-only in `~/.cache/vpa/skills/` (under `XDG_CACHE_HOME`, or `LOCALAPPDATA` on Windows), and `.agents/skills/` points to them with symbolic links (junctions on Windows). A commit is fetched once per machine and shared by every worktree. Private repositories are fetched with `GITHUB_TOKEN`.
|
|
83
83
|
|
|
84
|
-
`./`
|
|
84
|
+
A key starting with `./` is a folder in this repository. It takes no commit and points directly to the folders under it that contain `SKILL.md`.
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
Put `vpa --prepare` in `prepare`. To let Renovate update the commits, extend this preset in `renovate.json`.
|
|
87
87
|
|
|
88
88
|
```json
|
|
89
89
|
{ "extends": ["github>masseater/masseater.dev//libs/vite-plus-adopt/renovate"] }
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
## Feature-Sliced Design
|
|
92
|
+
## Feature-Sliced Design plugin
|
|
93
93
|
|
|
94
|
-
`@r_masseater/vite-plus-adopt/fsd`
|
|
95
|
-
steiger
|
|
96
|
-
vpa
|
|
94
|
+
`@r_masseater/vite-plus-adopt/fsd` bundles [@feature-sliced/steiger-plugin][fsd-plugin] 0.8.2, with the same rules and `configs.recommended` as the original.
|
|
95
|
+
steiger itself also depends on `@feature-sliced/steiger-plugin`, which pulls in TypeScript 5.
|
|
96
|
+
vpa does not use the steiger CLI, so you can drop it with `overrides` in `pnpm-workspace.yaml`.
|
|
97
97
|
|
|
98
98
|
```yaml
|
|
99
99
|
overrides:
|
|
@@ -102,10 +102,10 @@ overrides:
|
|
|
102
102
|
|
|
103
103
|
[fsd-plugin]: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd
|
|
104
104
|
|
|
105
|
-
## @arethetypeswrong/core
|
|
105
|
+
## Replacement for @arethetypeswrong/core
|
|
106
106
|
|
|
107
|
-
`@r_masseater/vite-plus-adopt/attw`
|
|
108
|
-
`pack.attw.module
|
|
107
|
+
`@r_masseater/vite-plus-adopt/attw` provides the same API as [@arethetypeswrong/core][attw] 0.18.5, on TypeScript 7.1 alone.
|
|
108
|
+
Pass it to `pack.attw.module`, and the same checks run without installing `@arethetypeswrong/core`.
|
|
109
109
|
|
|
110
110
|
```ts
|
|
111
111
|
import * as attw from "@r_masseater/vite-plus-adopt/attw";
|
|
@@ -120,6 +120,6 @@ export default defineConfig({
|
|
|
120
120
|
|
|
121
121
|
[attw]: https://github.com/arethetypeswrong/arethetypeswrong.github.io/tree/main/packages/core
|
|
122
122
|
|
|
123
|
-
##
|
|
123
|
+
## License
|
|
124
124
|
|
|
125
|
-
MIT
|
|
125
|
+
MIT. The licenses of the original packages bundled in `dist/fsd.mjs`, `dist/parsers` and `dist/attw.mjs` are in `THIRD-PARTY-NOTICES`.
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { t as runCli } from "./run-cli-BiPFbX9J.mjs";
|
|
3
|
-
import { t as runVpa } from "./vpa-
|
|
3
|
+
import { t as runVpa } from "./vpa-DHB6y2A5.mjs";
|
|
4
4
|
import { Effect, Path, Stdio } from "effect";
|
|
5
5
|
// src/app/cli.ts
|
|
6
6
|
runCli(Effect.gen(function* main() {
|
package/dist/fsd.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as defineConfig } from "./steiger-
|
|
1
|
+
import { t as defineConfig } from "./steiger-BX9S5pik.mjs";
|
|
2
2
|
import { Effect, Path, Schema } from "effect";
|
|
3
3
|
import { TextlintRcConfig } from "@textlint/config-loader";
|
|
4
4
|
import { TextlintKernelRule } from "@textlint/kernel";
|
|
@@ -103,4 +103,4 @@ declare module "vite" {
|
|
|
103
103
|
interface UserConfig extends ToolSections {}
|
|
104
104
|
}
|
|
105
105
|
export { FallowConfig as a, SteigerSection as c, SkillsSection as d, VpToolsError as f, DependencyRules as i, TextlintConfig as l, BetterleaksRule as n, MarkdownlintConfig as o, CommitlintConfig as r, SteigerConfig as s, BetterleaksConfig as t, ToolSections as u };
|
|
106
|
-
//# sourceMappingURL=index-
|
|
106
|
+
//# sourceMappingURL=index-DiN12XmL.d.mts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as FallowConfig, c as SteigerSection, d as SkillsSection, f as VpToolsError, i as DependencyRules, l as TextlintConfig, n as BetterleaksRule, o as MarkdownlintConfig, r as CommitlintConfig, s as SteigerConfig, t as BetterleaksConfig, u as ToolSections } from "./index-
|
|
1
|
+
import { a as FallowConfig, c as SteigerSection, d as SkillsSection, f as VpToolsError, i as DependencyRules, l as TextlintConfig, n as BetterleaksRule, o as MarkdownlintConfig, r as CommitlintConfig, s as SteigerConfig, t as BetterleaksConfig, u as ToolSections } from "./index-DiN12XmL.mjs";
|
|
2
2
|
import { Effect, FileSystem, Path, PlatformError, Schema, Stdio } from "effect";
|
|
3
3
|
import { ChildProcessSpawner } from "effect/process";
|
|
4
4
|
/** @internal */
|
package/dist/index.mjs
CHANGED
|
@@ -5941,12 +5941,12 @@ var linter = {
|
|
|
5941
5941
|
};
|
|
5942
5942
|
// ../../node_modules/.pnpm/steiger@0.10.0_typescript@7.1.0-beta/node_modules/steiger/dist/app.d.ts
|
|
5943
5943
|
var [File$1] = [
|
|
5944
|
-
|
|
5944
|
+
72,
|
|
5945
5945
|
() => [],
|
|
5946
5946
|
["", ""]
|
|
5947
5947
|
];
|
|
5948
5948
|
var [Folder] = [
|
|
5949
|
-
|
|
5949
|
+
73,
|
|
5950
5950
|
() => [
|
|
5951
5951
|
File$1,
|
|
5952
5952
|
Folder,
|
|
@@ -5962,12 +5962,12 @@ var [Folder] = [
|
|
|
5962
5962
|
]
|
|
5963
5963
|
];
|
|
5964
5964
|
var [BaseRuleOptions] = [
|
|
5965
|
-
|
|
5965
|
+
74,
|
|
5966
5966
|
() => [Record],
|
|
5967
5967
|
[""]
|
|
5968
5968
|
];
|
|
5969
5969
|
var [Rule] = [
|
|
5970
|
-
|
|
5970
|
+
75,
|
|
5971
5971
|
(Context, RuleOptions, RuleName) => [
|
|
5972
5972
|
BaseRuleOptions,
|
|
5973
5973
|
BaseRuleOptions,
|
|
@@ -6000,7 +6000,7 @@ var [Rule] = [
|
|
|
6000
6000
|
]
|
|
6001
6001
|
];
|
|
6002
6002
|
var [RuleResult] = [
|
|
6003
|
-
|
|
6003
|
+
76,
|
|
6004
6004
|
() => [PartialDiagnostic, Array],
|
|
6005
6005
|
[
|
|
6006
6006
|
"",
|
|
@@ -6009,7 +6009,7 @@ var [RuleResult] = [
|
|
|
6009
6009
|
]
|
|
6010
6010
|
];
|
|
6011
6011
|
var [PartialDiagnostic] = [
|
|
6012
|
-
|
|
6012
|
+
77,
|
|
6013
6013
|
() => [Fix, Array],
|
|
6014
6014
|
[
|
|
6015
6015
|
"",
|
|
@@ -6027,7 +6027,7 @@ var [PartialDiagnostic] = [
|
|
|
6027
6027
|
]
|
|
6028
6028
|
];
|
|
6029
6029
|
var [Fix] = [
|
|
6030
|
-
|
|
6030
|
+
78,
|
|
6031
6031
|
() => [],
|
|
6032
6032
|
[
|
|
6033
6033
|
"",
|
|
@@ -6046,7 +6046,7 @@ var [Fix] = [
|
|
|
6046
6046
|
]
|
|
6047
6047
|
];
|
|
6048
6048
|
var [Config] = [
|
|
6049
|
-
|
|
6049
|
+
79,
|
|
6050
6050
|
(Rules) => [
|
|
6051
6051
|
Rule,
|
|
6052
6052
|
Array,
|
|
@@ -6070,12 +6070,12 @@ var [Config] = [
|
|
|
6070
6070
|
]
|
|
6071
6071
|
];
|
|
6072
6072
|
var [Severity] = [
|
|
6073
|
-
|
|
6073
|
+
80,
|
|
6074
6074
|
() => [],
|
|
6075
6075
|
[]
|
|
6076
6076
|
];
|
|
6077
6077
|
var [RuleNames] = [
|
|
6078
|
-
|
|
6078
|
+
81,
|
|
6079
6079
|
(Rules) => [
|
|
6080
6080
|
Rule,
|
|
6081
6081
|
Array,
|
|
@@ -6089,7 +6089,7 @@ var [RuleNames] = [
|
|
|
6089
6089
|
]
|
|
6090
6090
|
];
|
|
6091
6091
|
var [LookUpByName] = [
|
|
6092
|
-
|
|
6092
|
+
82,
|
|
6093
6093
|
(Union, Name) => [
|
|
6094
6094
|
Union,
|
|
6095
6095
|
Name,
|
|
@@ -6105,7 +6105,7 @@ var [LookUpByName] = [
|
|
|
6105
6105
|
]
|
|
6106
6106
|
];
|
|
6107
6107
|
var [OptionsForRule] = [
|
|
6108
|
-
|
|
6108
|
+
83,
|
|
6109
6109
|
(Rules, RuleName) => [
|
|
6110
6110
|
Rule,
|
|
6111
6111
|
Array,
|
|
@@ -6132,7 +6132,7 @@ var [OptionsForRule] = [
|
|
|
6132
6132
|
]
|
|
6133
6133
|
];
|
|
6134
6134
|
var [ConfigObject] = [
|
|
6135
|
-
|
|
6135
|
+
84,
|
|
6136
6136
|
(Rules) => [
|
|
6137
6137
|
Rule,
|
|
6138
6138
|
Array,
|
|
@@ -6166,12 +6166,12 @@ var [ConfigObject] = [
|
|
|
6166
6166
|
]
|
|
6167
6167
|
];
|
|
6168
6168
|
var [GlobalIgnore] = [
|
|
6169
|
-
|
|
6169
|
+
85,
|
|
6170
6170
|
() => [Array],
|
|
6171
6171
|
["", ""]
|
|
6172
6172
|
];
|
|
6173
6173
|
var [Plugin] = [
|
|
6174
|
-
|
|
6174
|
+
86,
|
|
6175
6175
|
(Context, Rules) => [
|
|
6176
6176
|
Context,
|
|
6177
6177
|
Rule,
|
|
@@ -6196,7 +6196,7 @@ var [Plugin] = [
|
|
|
6196
6196
|
]
|
|
6197
6197
|
];
|
|
6198
6198
|
var [defineConfig] = [
|
|
6199
|
-
|
|
6199
|
+
96,
|
|
6200
6200
|
(Rules) => [
|
|
6201
6201
|
Rule,
|
|
6202
6202
|
Array,
|
|
@@ -6222,4 +6222,4 @@ var [defineConfig] = [
|
|
|
6222
6222
|
];
|
|
6223
6223
|
export { linter as n, processConfiguration as r, defineConfig as t };
|
|
6224
6224
|
|
|
6225
|
-
//# sourceMappingURL=steiger-
|
|
6225
|
+
//# sourceMappingURL=steiger-BX9S5pik.mjs.map
|