@r_masseater/vite-plus-adopt 0.0.0-stage → 0.2.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/LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 masseater
4
+ Copyright (c) 2026 Robert Soriano
5
+ Copyright (c) 2026 mizchi<Kotaro Chikuba>
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,146 @@
1
- # Temporary Holding Version
1
+ # vite-plus-adopt
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Betterleaks・actionlint・zizmor・commitlint・textlint・Steiger を Vite+ に取り込み、設定と依存の規則を `vite.config.ts` に書いて、そこから読んで動かす CLI `vpa` である。
4
+ TypeScript 7 だけで動く Feature-Sliced Design の Steiger プラグインと @arethetypeswrong/core も同梱する。
5
+ 各ツールのために `.betterleaks.toml`・`.betterleaksignore`・`.textlintrc`・`.textlintignore`・`steiger.config.ts`・syncpack の設定・`package.json` の `commitlint` を置かずに済む。
6
+ Betterleaks・actionlint・zizmor のバイナリは、postinstall が固定した版を GitHub のリリースから取り、SHA-256 を照合してパッケージの `vendor/` に置く。実行時には取りに行かない。
7
+ 設定は Vite+ の `resolveConfigFromFile` で読み、型は `vite` の `UserConfig` を拡張して付ける。
8
+
9
+ ## 公開先
10
+
11
+ - npm: [@r_masseater/vite-plus-adopt](https://www.npmjs.com/package/@r_masseater/vite-plus-adopt)
12
+
13
+ ## 使い方
14
+
15
+ ```sh
16
+ vp add -D @r_masseater/vite-plus-adopt
17
+ ```
18
+
19
+ postinstall を許すため、`pnpm-workspace.yaml` の `allowBuilds` に足す。
20
+
21
+ ```yaml
22
+ allowBuilds:
23
+ "@r_masseater/vite-plus-adopt": true
24
+ ```
25
+
26
+ ```ts
27
+ import type {} from "@r_masseater/vite-plus-adopt";
28
+ import fsd from "@r_masseater/vite-plus-adopt/fsd";
29
+ import { defineConfig } from "vite-plus";
30
+
31
+ export default defineConfig({
32
+ commitlint: { extends: ["@commitlint/config-conventional"] },
33
+ dependencyRules: {
34
+ banned: { "テストは vite-plus/test から読む": ["vitest", "@vitest/*"] },
35
+ peerRanges: "intersect",
36
+ },
37
+ betterleaks: {
38
+ extend: { useDefault: true },
39
+ filter: 'matchesAny(finding.line, [`\\bCF_BEACON_TOKEN = "[0-9a-f]{32}"`])',
40
+ ignoredSecrets: ["<秘密の SHA-256>"],
41
+ },
42
+ steiger: [...fsd.configs.recommended],
43
+ textlint: {
44
+ ignores: ["CHANGELOG.md"],
45
+ rules: { "preset-ja-technical-writing": true },
46
+ },
47
+ run: {
48
+ tasks: {
49
+ actions: "vpa actionlint && vpa zizmor .github",
50
+ betterleaks: "vpa betterleaks git . --redact --no-banner",
51
+ dependencies: "vpa dependencies",
52
+ steiger: "vpa steiger apps/*/src",
53
+ textlint: "vpa textlint '*.md'",
54
+ },
55
+ },
56
+ });
57
+ ```
58
+
59
+ `import type {} from "@r_masseater/vite-plus-adopt"` で、`defineConfig` に上の 5 つのキーの型が付く。
60
+
61
+ ## Feature-Sliced Design のプラグイン
62
+
63
+ `@r_masseater/vite-plus-adopt/fsd` は [@feature-sliced/steiger-plugin][fsd-plugin] 0.8.2 を同梱したもので、ルールと `configs.recommended` は元と同じである。
64
+ 元のプラグインが使う [@feature-sliced/filesystem][fsd-filesystem] は、import の解決に TypeScript 5 の `ts.resolveModuleName` を使い、TypeScript 7 だけの環境では読み込めない。
65
+ 同梱した版では、その解決を TypeScript 7.1 の `typescript/sync` の `createModuleResolver` で行う。
66
+ そのため `typescript` 7.1 を依存に持つ。使う側のほかの依存が TypeScript 5 を引き込んでいても、こちらは 7.1 を読む。
67
+
68
+ steiger 本体も `@feature-sliced/steiger-plugin` に依存し、それが TypeScript 5 を引き込む。
69
+ vpa は steiger の CLI を使わないので、`pnpm-workspace.yaml` の `overrides` で外せる。
70
+
71
+ ```yaml
72
+ overrides:
73
+ "steiger>@feature-sliced/steiger-plugin": "-"
74
+ ```
75
+
76
+ [fsd-plugin]: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd
77
+ [fsd-filesystem]: https://github.com/feature-sliced/filesystem
78
+
79
+ ## @arethetypeswrong/core の置き換え
80
+
81
+ `@r_masseater/vite-plus-adopt/attw` は [@arethetypeswrong/core][attw] 0.18.5 と同じ API を、TypeScript 7.1 だけで出す。
82
+ 元のパッケージは TypeScript 5.6.1-rc を依存に持つので、Vite+ の `pack.attw` をそのまま使うと TypeScript 5 が入る。
83
+ `pack.attw.module` にこれを渡せば、`@arethetypeswrong/core` を入れずに同じ検査が動く。
84
+
85
+ ```ts
86
+ import * as attw from "@r_masseater/vite-plus-adopt/attw";
87
+ import { defineConfig } from "vite-plus";
88
+
89
+ export default defineConfig({
90
+ pack: {
91
+ attw: { module: attw, profile: "esm-only", level: "error" },
92
+ },
93
+ });
94
+ ```
95
+
96
+ - 元のパッケージの `dist/` を `upstream/attw-core/lib` に置いて同梱し、その中の `typescript` の import を `src/attw/typescript.ts` に向ける。
97
+ - `src/attw/typescript.ts` は、元のパッケージが呼ぶ `ts.*` だけを持つ。
98
+ モジュールの解決、プログラムの組み立て、シンボルの束縛は、TypeScript 5.6.1-rc の処理を TypeScript 7.1 の構文木の上で書き直してある。
99
+ - 型の問い合わせは、パッケージのファイルを仮想のファイルシステムとして TypeScript 7.1 の型検査器に見せて答える。
100
+ - 元のパッケージの `internal/multiCompilerHost.js` は、`src/attw/compiler-hosts.ts` に差し替える。
101
+ - `upstream/attw-core/lib` には `upstream/attw-core/lib.patch` を当ててある。
102
+ TypeScript 7 の構文木に無い `escapedText` を `text` に読み替え、型定義の `typescript` の import を `typescript/sync` に向ける。
103
+ - `typesVersions` は TypeScript 5.6.1-rc として照合し、`ts.version` も `5.6.1-rc` を返す。結果を元のパッケージと揃えるためである。
104
+
105
+ ### テスト
106
+
107
+ - `upstream/attw-core/test` は元のリポのテストを手を入れずに置いたものである。
108
+ テストが読む `fixtures` と `snapshots` は `upstream/attw-core/` の直下に、元のパッケージの `src/` は `upstream/attw-core/src` に置く。
109
+ - `tests/attw` は、本物の @arethetypeswrong/core 0.18.5 と TypeScript 5.6.1-rc の結果と突き合わせる。
110
+ 入力は `tests/attw/fixtures.json`、期待する結果は `tests/attw/expected.json` にある。
111
+ - `tests/attw/expected.json` は、このリポの外の空のディレクトリに `@arethetypeswrong/core@0.18.5` を入れて作る。
112
+ `fixtures.json` の `fixtures` を `checkPackage` に、`hostLookups` を `internal/multiCompilerHost.js` の `CompilerHostWrapper` の `resolveModuleName` に渡す。
113
+ `paths` は TypeScript 5.6.1-rc の `getRootLength`・`normalizePath`・`getNormalizedAbsolutePath`・`getDirectoryPath`・`combinePaths`・`getPathComponents` に、`packageNames` は `mangleScopedPackageName`・`unmangleScopedPackageName`・`getTypesPackageName` に渡す。
114
+ 返った値を `JSON.stringify` して書き出す。
115
+ TypeScript 5 をこのリポの依存に入れないため、作る仕組みはリポに置かない。
116
+
117
+ [attw]: https://github.com/arethetypeswrong/arethetypeswrong.github.io/tree/main/packages/core
118
+
119
+ ## コマンド
120
+
121
+ | コマンド | 動き |
122
+ | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
123
+ | `vpa betterleaks <引数...>` | `betterleaks` セクションを TOML にして `BETTERLEAKS_CONFIG_TOML` に入れ、`ignoredSecrets` があれば一時ファイルに書いて `--ignore-file` を足し、postinstall が置いた Betterleaks を引数のまま動かす |
124
+ | `vpa actionlint [引数...]` | postinstall が置いた actionlint を引数のまま動かす |
125
+ | `vpa zizmor [引数...]` | postinstall が置いた zizmor を引数のまま動かす |
126
+ | `vpa commitlint <メッセージのファイル>` | `commitlint` セクションでコミットメッセージを検査する。`#` で始まる行は読まない。commit-msg フックで `vpa commitlint "$1"` と書く |
127
+ | `vpa commitlint --range <範囲>` | `git log --first-parent` で範囲のコミットを並べ、各メッセージを検査する。CI で push された範囲を `vpa commitlint --range "$BEFORE..$HEAD"` と検査する |
128
+ | `vpa textlint [--print-files] <pathspec...>` | git が追跡するファイルと未追跡で無視されていないファイルのうち、pathspec に合い `ignores` に合わないものを textlint で検査する。`--print-files` は検査せず、そのファイルを NUL 区切りで出す |
129
+ | `vpa steiger <ディレクトリ...>` | `steiger` セクションで各ディレクトリを検査し、error の指摘があれば失敗する |
130
+ | `vpa dependencies` | `pnpm-workspace.yaml` の各パッケージの `package.json` を読み、禁止した依存と、同じ依存の指定の食い違いを報告する |
131
+
132
+ postinstall が動いていないと、Betterleaks・actionlint・zizmor のコマンドは `allowBuilds` に足すよう告げて失敗する。
133
+ バイナリの版は `src/binaries.ts` で固定し、vite-plus-adopt の版を上げて変える。
134
+
135
+ ## 設定
136
+
137
+ - `betterleaks.ignoredSecrets` は `.betterleaksignore` と同じく秘密の SHA-256 を並べる。それ以外のキーは `.betterleaks.toml` と同じで、通す指摘は `filter` と `prefilter` の式で書く。
138
+ - `dependencyRules.banned` は、理由ごとに禁止する依存名の glob を並べる。`*` は任意の文字列に合う。
139
+ - `dependencyRules.allowed` は、理由ごとに `banned` の例外を書く。`workspaces` のワークスペースの、`dependencies` の名前の glob に合う依存を禁止しない。`fields` を書くと、その欄(`devDependencies` など)の依存だけを例外にする。
140
+ - `dependencyRules.exactDependencies` は、理由ごとにワークスペースのディレクトリの glob を並べる。合うワークスペースの `dependencies` は正確な版でなければならず、ほかのワークスペースとの指定の一致は求めない。git の依存として読まれるパッケージのように、カタログを使えないものに使う。
141
+ - `dependencyRules.peerRanges` を `"intersect"` にすると、`peerDependencies` の範囲は重なれば通る。省くと、ほかの依存と同じく指定の一致を求める。`workspace:` の指定は比べない。
142
+ - `textlint.ignores` は git の glob で、それ以外のキーは `.textlintrc` と同じである。規則のパッケージは、リポのルートの `node_modules` から読む。
143
+
144
+ ## ライセンス
145
+
146
+ MIT。`dist/fsd.mjs`・`dist/parsers`・`dist/attw.mjs` に同梱した元のパッケージのライセンスは `THIRD-PARTY-NOTICES` にある。
@@ -0,0 +1,279 @@
1
+ dist/fsd.mjs bundles @feature-sliced/steiger-plugin and @feature-sliced/filesystem,
2
+ and dist/parsers holds the tree-sitter grammars that @feature-sliced/steiger-plugin ships.
3
+ dist/attw.mjs bundles the dist of @arethetypeswrong/core 0.18.5 from upstream/attw-core/lib,
4
+ with upstream/attw-core/lib.patch applied, and the module resolution, program construction
5
+ and binding in src/attw follow TypeScript 5.6.1-rc.
6
+
7
+ Their licenses follow.
8
+
9
+ ================================================================================
10
+
11
+ @feature-sliced/steiger-plugin 0.8.2
12
+ Source: https://github.com/feature-sliced/steiger
13
+
14
+ MIT License
15
+
16
+ Copyright (c) 2026 [Feature-Sliced Design core team and contributors](https://github.com/feature-sliced)
17
+
18
+ Permission is hereby granted, free of charge, to any person obtaining a copy
19
+ of this software and associated documentation files (the "Software"), to deal
20
+ in the Software without restriction, including without limitation the rights
21
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
22
+ copies of the Software, and to permit persons to whom the Software is
23
+ furnished to do so, subject to the following conditions:
24
+
25
+ The above copyright notice and this permission notice shall be included in all
26
+ copies or substantial portions of the Software.
27
+
28
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
31
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
34
+ SOFTWARE.
35
+
36
+ ================================================================================
37
+
38
+ @feature-sliced/filesystem 3.1.1
39
+ Source: https://github.com/feature-sliced/filesystem
40
+
41
+ ISC License
42
+
43
+ Copyright (c) 2024 Feature-Sliced Design core team
44
+
45
+ Permission to use, copy, modify, and/or distribute this software for any
46
+ purpose with or without fee is hereby granted, provided that the above
47
+ copyright notice and this permission notice appear in all copies.
48
+
49
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
50
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
51
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
52
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
53
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
54
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
55
+ PERFORMANCE OF THIS SOFTWARE.
56
+
57
+ ================================================================================
58
+
59
+ magic-string 0.30.17 (bundled in @feature-sliced/steiger-plugin)
60
+ Source: https://github.com/Rich-Harris/magic-string
61
+
62
+ Copyright 2018 Rich Harris
63
+
64
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
65
+
66
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
67
+
68
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
69
+
70
+ ================================================================================
71
+
72
+ @jridgewell/sourcemap-codec (bundled in @feature-sliced/steiger-plugin)
73
+ Source: https://github.com/jridgewell/sourcemaps
74
+
75
+ Copyright 2024 Justin Ridgewell <justin@ridgewell.name>
76
+
77
+ Permission is hereby granted, free of charge, to any person obtaining a copy
78
+ of this software and associated documentation files (the "Software"), to deal
79
+ in the Software without restriction, including without limitation the rights
80
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
81
+ copies of the Software, and to permit persons to whom the Software is
82
+ furnished to do so, subject to the following conditions:
83
+
84
+ The above copyright notice and this permission notice shall be included in
85
+ all copies or substantial portions of the Software.
86
+
87
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
88
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
89
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
90
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
91
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
92
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
93
+ SOFTWARE.
94
+
95
+ ================================================================================
96
+
97
+ This package contains compiled WebAssembly modules of tree-sitter grammars.
98
+ These grammars are MIT-licensed by their respective authors.
99
+
100
+ ================================================================================
101
+
102
+ tree-sitter-tsx.wasm
103
+ Source: https://github.com/tree-sitter/tree-sitter-typescript
104
+
105
+ The MIT License (MIT)
106
+ Copyright (c) 2017 Max Brunsfeld
107
+
108
+ Permission is hereby granted, free of charge, to any person obtaining a copy
109
+ of this software and associated documentation files (the "Software"), to deal
110
+ in the Software without restriction, including without limitation the rights
111
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
112
+ copies of the Software, and to permit persons to whom the Software is
113
+ furnished to do so, subject to the following conditions:
114
+
115
+ The above copyright notice and this permission notice shall be included in all
116
+ copies or substantial portions of the Software.
117
+
118
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
119
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
120
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
121
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
122
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
123
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
124
+ SOFTWARE.
125
+
126
+ ================================================================================
127
+
128
+ tree-sitter-svelte.wasm
129
+ Source: https://github.com/Himujjal/tree-sitter-svelte
130
+
131
+ Copyright © Himujjal Upadhyaya <himu@tuta.io>
132
+
133
+ Permission is hereby granted, free of charge, to any person obtaining a copy
134
+ of this software and associated documentation files (the "Software"), to deal
135
+ in the Software without restriction, including without limitation the rights
136
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
137
+ copies of the Software, and to permit persons to whom the Software is
138
+ furnished to do so, subject to the following conditions:
139
+
140
+ The above copyright notice and this permission notice shall be included in all
141
+ copies or substantial portions of the Software.
142
+
143
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
144
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
145
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
146
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
147
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
148
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
149
+ SOFTWARE.
150
+
151
+ ================================================================================
152
+
153
+ tree-sitter-astro.wasm
154
+ Source: https://github.com/virchau13/tree-sitter-astro
155
+
156
+ MIT License
157
+ Copyright (c) 2022 Vir Chaudhury
158
+
159
+ Permission is hereby granted, free of charge, to any person obtaining a copy
160
+ of this software and associated documentation files (the "Software"), to deal
161
+ in the Software without restriction, including without limitation the rights
162
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
163
+ copies of the Software, and to permit persons to whom the Software is
164
+ furnished to do so, subject to the following conditions:
165
+
166
+ The above copyright notice and this permission notice shall be included in all
167
+ copies or substantial portions of the Software.
168
+
169
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
170
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
171
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
172
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
173
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
174
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
175
+ SOFTWARE.
176
+
177
+ ================================================================================
178
+
179
+ tree-sitter-vue.wasm
180
+ Source: https://github.com/tree-sitter-grammars/tree-sitter-vue
181
+
182
+ The MIT License (MIT)
183
+ Copyright (c) 2024 Amaan Qureshi <amaanq12@gmail.com>
184
+
185
+ Permission is hereby granted, free of charge, to any person obtaining a copy
186
+ of this software and associated documentation files (the "Software"), to deal
187
+ in the Software without restriction, including without limitation the rights
188
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
189
+ copies of the Software, and to permit persons to whom the Software is
190
+ furnished to do so, subject to the following conditions:
191
+
192
+ The above copyright notice and this permission notice shall be included in all
193
+ copies or substantial portions of the Software.
194
+
195
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
196
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
197
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
198
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
199
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
200
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
201
+ SOFTWARE.
202
+
203
+ ================================================================================
204
+
205
+ @arethetypeswrong/core 0.18.5
206
+ Source: https://github.com/arethetypeswrong/arethetypeswrong.github.io/tree/main/packages/core
207
+
208
+ MIT License
209
+
210
+ Copyright 2023 Andrew Branch
211
+
212
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
213
+
214
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
215
+
216
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
217
+
218
+ ================================================================================
219
+
220
+ TypeScript 5.6.1-rc
221
+ Source: https://github.com/microsoft/TypeScript
222
+
223
+ Copyright (c) Microsoft Corporation. All rights reserved.
224
+
225
+ Apache License
226
+
227
+ Version 2.0, January 2004
228
+
229
+ http://www.apache.org/licenses/
230
+
231
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
232
+
233
+ 1. Definitions.
234
+
235
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
236
+
237
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
238
+
239
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
240
+
241
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
242
+
243
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
244
+
245
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
246
+
247
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
248
+
249
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
250
+
251
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
252
+
253
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
254
+
255
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
256
+
257
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
258
+
259
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
260
+
261
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
262
+
263
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
264
+
265
+ You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
266
+
267
+ If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
268
+
269
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
270
+
271
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
272
+
273
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
274
+
275
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
276
+
277
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
278
+
279
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,28 @@
1
+ import { Effect, Schema } from "effect";
2
+ // src/errors.ts
3
+ const taggedError = Schema.TaggedError;
4
+ var VpToolsError = class extends taggedError()("VpToolsError", {
5
+ kind: Schema.Literals([
6
+ "config-missing",
7
+ "tool-failed",
8
+ "checks-failed"
9
+ ]),
10
+ message: Schema.String
11
+ }) {};
12
+ const configMissing = (message) => VpToolsError.make({
13
+ kind: "config-missing",
14
+ message
15
+ });
16
+ const checksFailed = (message) => VpToolsError.make({
17
+ kind: "checks-failed",
18
+ message
19
+ });
20
+ const toolFailed = (tool) => (cause) => VpToolsError.make({
21
+ kind: "tool-failed",
22
+ message: `${tool} failed: ${String(cause)}`
23
+ });
24
+ // src/attempt.ts
25
+ const attempt = (tool) => (run) => Effect.tryPromise(run).pipe(Effect.mapError(toolFailed(tool)));
26
+ export { toolFailed as a, configMissing as i, VpToolsError as n, checksFailed as r, attempt as t };
27
+
28
+ //# sourceMappingURL=attempt-5nU57gc3.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attempt-5nU57gc3.mjs","names":[],"sources":["../src/errors.ts","../src/attempt.ts"],"sourcesContent":["import { Schema } from \"effect\";\n\nconst taggedError = Schema.TaggedError;\n\nclass VpToolsError extends taggedError<VpToolsError, { readonly brand: unique symbol }>()(\n \"VpToolsError\",\n {\n kind: Schema.Literals([\"config-missing\", \"tool-failed\", \"checks-failed\"]),\n message: Schema.String,\n },\n) {}\n\nconst configMissing = (message: string): VpToolsError =>\n VpToolsError.make({ kind: \"config-missing\", message });\n\nconst checksFailed = (message: string): VpToolsError =>\n VpToolsError.make({ kind: \"checks-failed\", message });\n\nconst toolFailed =\n (tool: string) =>\n (cause: unknown): VpToolsError =>\n VpToolsError.make({ kind: \"tool-failed\", message: `${tool} failed: ${String(cause)}` });\n\nexport { VpToolsError, checksFailed, configMissing, toolFailed };\n","import { Effect } from \"effect\";\n\nimport { toolFailed } from \"./errors.ts\";\nimport type { VpToolsError } from \"./errors.ts\";\n\nconst attempt =\n (tool: string) =>\n <Value>(run: () => PromiseLike<Value>): Effect.Effect<Value, VpToolsError> =>\n Effect.tryPromise(run).pipe(Effect.mapError(toolFailed(tool)));\n\nexport { attempt };\n"],"mappings":";;AAEA,MAAM,cAAc,OAAO;AAE3B,IAAM,eAAN,cAA2B,YAA6D,CAAC,CACvF,gBACA;CACE,MAAM,OAAO,SAAS;EAAC;EAAkB;EAAe;CAAe,CAAC;CACxE,SAAS,OAAO;AAClB,CACF,CAAC,CAAC,CAAC;AAEH,MAAM,iBAAiB,YACrB,aAAa,KAAK;CAAE,MAAM;CAAkB;AAAQ,CAAC;AAEvD,MAAM,gBAAgB,YACpB,aAAa,KAAK;CAAE,MAAM;CAAiB;AAAQ,CAAC;AAEtD,MAAM,cACH,UACA,UACC,aAAa,KAAK;CAAE,MAAM;CAAe,SAAS,GAAG,KAAK,WAAW,OAAO,KAAK;AAAI,CAAC;;AChB1F,MAAM,WACH,UACO,QACN,OAAO,WAAW,GAAG,CAAC,CAAC,KAAK,OAAO,SAAS,WAAW,IAAI,CAAC,CAAC"}