@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 CHANGED
@@ -1,20 +1,20 @@
1
1
  # vite-plus-adopt
2
2
 
3
- `vpa` は、Betterleaks・actionlint・zizmor・commitlint・textlint・markdownlint・Steiger・fallow とエージェントスキルの導入を Vite+ に取り込む CLI である。設定と依存の規則を `vite.config.ts` に書くと、そこから読んで動かす。
4
- 引数なしの `vpa` を 1 回実行すると、設定のある検査をすべて並行して動かし、結果をまとめて出す。
5
- TypeScript 7 だけで動く Feature-Sliced Design の Steiger プラグインと @arethetypeswrong/core も同梱する。
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 を許すため、`pnpm-workspace.yaml` の `allowBuilds` に足す。
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: { "テストは vite-plus/test から読む": ["vitest", "@vitest/*"] },
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: ["<秘密の SHA-256>"],
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"` で、`defineConfig` に上の 8 つのキーの型が付く。
52
- textlint は Git が追跡する Markdown を検査する。ほかのファイルも検査するときは、`textlint.sources` に対象の glob(`files`)とそのファイルに当てる設定を並べる。`presets` はそこでも使える。
53
- Steiger は `steiger.paths` に合うディレクトリのうち、直下に FSD のレイヤー(`app`・`pages`・`widgets`・`features`・`entities`・`shared` など)のフォルダを持つものだけを検査する。
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` に GitHub のリポジトリとコミットを書くと、`vpa --prepare` がそのスキルを `.agents/skills/` に置く。スキルは `SKILL.md` の `name` で選び、`"all"` は `root` の下のすべてを選ぶ。
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
- 取得したスキルは `~/.cache/vpa/skills/`(`XDG_CACHE_HOME`、Windows では `LOCALAPPDATA` の下)に読み取り専用で置く。`.agents/skills/` からはシンボリックリンク(Windows ではジャンクション)で指す。同じコミットはマシンのどのワークツリーでも取り直さない。非公開のリポジトリは `GITHUB_TOKEN` で取る。
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
- `./` で始まるキーは、このリポジトリのフォルダである。コミットは書かず、`SKILL.md` を持つ直下のフォルダをそのまま指す。
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
- `prepare` には `vpa --prepare` を書く。Renovate がコミットを更新できるように、`renovate.json` で次のプリセットを読む。
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` は [@feature-sliced/steiger-plugin][fsd-plugin] 0.8.2 を同梱したもので、ルールと `configs.recommended` は元と同じである。
95
- steiger 本体も `@feature-sliced/steiger-plugin` に依存し、それが TypeScript 5 を引き込む。
96
- vpa は steiger の CLI を使わないので、`pnpm-workspace.yaml` の `overrides` で外せる。
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` は [@arethetypeswrong/core][attw] 0.18.5 と同じ API を、TypeScript 7.1 だけで出す。
108
- `pack.attw.module` にこれを渡せば、`@arethetypeswrong/core` を入れずに同じ検査が動く。
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。`dist/fsd.mjs`・`dist/parsers`・`dist/attw.mjs` に同梱した元のパッケージのライセンスは `THIRD-PARTY-NOTICES` にある。
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-B2qvWn3Q.mjs";
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 { s as SteigerConfig } from "./index-vq2Re-JL.mjs";
1
+ import { s as SteigerConfig } from "./index-DiN12XmL.mjs";
2
2
  export interface FsdPlugin {
3
3
  readonly plugin: SteigerConfig[number];
4
4
  readonly configs: {
@@ -1,4 +1,4 @@
1
- import { t as defineConfig } from "./steiger-Bi33gRXU.mjs";
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-vq2Re-JL.d.mts.map
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-vq2Re-JL.mjs";
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
@@ -1,3 +1,3 @@
1
- import { n as loadViteConfig, t as runVpa } from "./vpa-B2qvWn3Q.mjs";
1
+ import { n as loadViteConfig, t as runVpa } from "./vpa-DHB6y2A5.mjs";
2
2
  import { d as VpToolsError } from "./output-BdvTIQ-k.mjs";
3
3
  export { VpToolsError, loadViteConfig, runVpa };
@@ -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
- 26,
5944
+ 72,
5945
5945
  () => [],
5946
5946
  ["", ""]
5947
5947
  ];
5948
5948
  var [Folder] = [
5949
- 27,
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
- 28,
5965
+ 74,
5966
5966
  () => [Record],
5967
5967
  [""]
5968
5968
  ];
5969
5969
  var [Rule] = [
5970
- 29,
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
- 30,
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
- 31,
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
- 32,
6030
+ 78,
6031
6031
  () => [],
6032
6032
  [
6033
6033
  "",
@@ -6046,7 +6046,7 @@ var [Fix] = [
6046
6046
  ]
6047
6047
  ];
6048
6048
  var [Config] = [
6049
- 33,
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
- 34,
6073
+ 80,
6074
6074
  () => [],
6075
6075
  []
6076
6076
  ];
6077
6077
  var [RuleNames] = [
6078
- 35,
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
- 36,
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
- 37,
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
- 38,
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
- 39,
6169
+ 85,
6170
6170
  () => [Array],
6171
6171
  ["", ""]
6172
6172
  ];
6173
6173
  var [Plugin] = [
6174
- 40,
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
- 50,
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-Bi33gRXU.mjs.map
6225
+ //# sourceMappingURL=steiger-BX9S5pik.mjs.map