@r_masseater/vite-plus-adopt 0.10.2 → 0.11.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 +6 -13
- package/dist/attw.mjs +5 -11
- package/dist/attw.mjs.map +1 -1
- package/dist/cli.mjs +21 -3
- package/dist/cli.mjs.map +1 -1
- package/dist/fsd.d.mts +1 -1
- package/dist/fsd.mjs +3 -5
- package/dist/fsd.mjs.map +1 -1
- package/dist/{index-HO_uRepr.d.mts → index-DyvYt7R0.d.mts} +11 -47
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -3
- package/dist/{vpa-B3VOYbg1.mjs → vpa-MRYbih3E.mjs} +168 -205
- package/dist/vpa-MRYbih3E.mjs.map +1 -0
- package/package.json +45 -44
- package/skills/configure-checks/SKILL.md +13 -18
- package/dist/output-BdvTIQ-k.mjs +0 -223
- package/dist/output-BdvTIQ-k.mjs.map +0 -1
- package/dist/postinstall.d.mts +0 -1
- package/dist/postinstall.mjs +0 -19
- package/dist/postinstall.mjs.map +0 -1
- package/dist/run-cli-BiPFbX9J.mjs +0 -24
- package/dist/run-cli-BiPFbX9J.mjs.map +0 -1
- package/dist/vpa-B3VOYbg1.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# vite-plus-adopt
|
|
1
|
+
# @r_masseater/vite-plus-adopt
|
|
2
2
|
|
|
3
|
-
`vpa` is a CLI that brings
|
|
3
|
+
`vpa` is a CLI that brings secret scanning with h56m, commitlint, textlint, 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
4
|
Running `vpa` once with no arguments runs every configured check in parallel and prints the results together.
|
|
5
5
|
It also bundles a Feature-Sliced Design plugin for Steiger and @arethetypeswrong/core, both running on TypeScript 7 alone.
|
|
6
6
|
|
|
@@ -11,17 +11,11 @@ It also bundles a Feature-Sliced Design plugin for Steiger and @arethetypeswrong
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
|
-
vp add -D @r_masseater/vite-plus-adopt
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Allow its postinstall by adding it to `allowBuilds` in `pnpm-workspace.yaml`.
|
|
18
|
-
|
|
19
|
-
```yaml
|
|
20
|
-
allowBuilds:
|
|
21
|
-
"@r_masseater/vite-plus-adopt": true
|
|
14
|
+
vp add -D @r_masseater/vite-plus-adopt @r_masseater/h56m-presets
|
|
22
15
|
```
|
|
23
16
|
|
|
24
17
|
```ts
|
|
18
|
+
import { betterleaks } from "@r_masseater/h56m-presets";
|
|
25
19
|
import type {} from "@r_masseater/vite-plus-adopt";
|
|
26
20
|
import fsd from "@r_masseater/vite-plus-adopt/fsd";
|
|
27
21
|
import { defineConfig } from "vite-plus";
|
|
@@ -32,8 +26,8 @@ export default defineConfig({
|
|
|
32
26
|
banned: { "Import tests from vite-plus/test": ["vitest", "@vitest/*"] },
|
|
33
27
|
peerRanges: "intersect",
|
|
34
28
|
},
|
|
35
|
-
|
|
36
|
-
extend: {
|
|
29
|
+
h56m: {
|
|
30
|
+
extend: { path: betterleaks },
|
|
37
31
|
filter: 'matchesAny(finding.line, [`\\bCF_BEACON_TOKEN = "[0-9a-f]{32}"`])',
|
|
38
32
|
ignoredSecrets: ["<SHA-256 of the secret>"],
|
|
39
33
|
},
|
|
@@ -42,7 +36,6 @@ export default defineConfig({
|
|
|
42
36
|
ignores: ["CHANGELOG.md"],
|
|
43
37
|
rules: { "preset-ja-technical-writing": true },
|
|
44
38
|
},
|
|
45
|
-
markdownlint: { ignores: ["CHANGELOG.md"] },
|
|
46
39
|
fallow: { production: true, rules: { "unused-files": "error" } },
|
|
47
40
|
run: { tasks: { vpa: { command: "vpa", cache: false } } },
|
|
48
41
|
});
|
package/dist/attw.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { t as parseJson } from "./json-QtVKpodH.mjs";
|
|
2
2
|
import { Array as Array$1, Function, MutableRef, Option, Order, Predicate, Record, String as String$1, pipe } from "effect";
|
|
3
|
-
import { FlateErrorCode, Gunzip } from "fflate";
|
|
4
3
|
import semver, { major, maxSatisfying, minor, valid, validRange } from "semver";
|
|
5
4
|
import { serverFS } from "typescript/fs";
|
|
6
5
|
import { API, ModuleKind, ModuleResolutionKind, ObjectFlags, SignatureKind, SymbolFlags, TypeFlags, isObjectType } from "typescript/sync";
|
|
@@ -8,6 +7,7 @@ import { init, parse } from "cjs-module-lexer";
|
|
|
8
7
|
import { InternalSymbolName, ModifierFlags, NodeFlags, ScriptKind, ScriptTarget, SyntaxKind, escapeLeadingUnderscores, getNameOfDeclaration } from "typescript/ast";
|
|
9
8
|
import { isArrayBindingPattern, isArrayLiteralExpression, isArrowFunction, isBinaryExpression, isBindingElement, isBlock, isCallExpression, isCatchClause, isClassDeclaration, isClassExpression, isElementAccessExpression, isEnumDeclaration, isExportAssignment, isExportDeclaration, isExportSpecifier, isExpression, isExpressionStatement, isForInStatement, isFunctionDeclaration, isFunctionExpression, isIdentifier, isImportAttributes, isImportClause, isImportDeclaration, isImportEqualsDeclaration, isImportSpecifier, isImportTypeNode, isInterfaceDeclaration, isJSDoc, isJSDocCallbackTag, isJSDocImportTag, isJSDocTypedefTag, isModuleBlock, isModuleDeclaration, isNamedExports, isNamespaceExport, isNamespaceImport, isNumericLiteral, isObjectBindingPattern, isObjectLiteralExpression, isParameterDeclaration, isParenthesizedExpression, isPrefixUnaryExpression, isPropertyAccessExpression, isPropertyAssignment, isReturnStatement, isShorthandPropertyAssignment, isSourceFile, isStringLiteral, isStringLiteralLikeNode, isTypeAliasDeclaration, isVariableDeclaration, isVariableDeclarationList, isVariableStatement, isVoidExpression } from "typescript/ast/is";
|
|
10
9
|
import { untar } from "@andrewbranch/untar.js";
|
|
10
|
+
import { FlateErrorCode, Gunzip } from "fflate";
|
|
11
11
|
import validatePackgeName from "validate-npm-package-name";
|
|
12
12
|
import * as cjs from "@loaderkit/resolve/cjs";
|
|
13
13
|
import * as esm from "@loaderkit/resolve/esm";
|
|
@@ -4418,8 +4418,7 @@ const createFlagStore = () => {
|
|
|
4418
4418
|
hasFlag: (fileName, flag) => Option.fromNullishOr(flags.get(toPath(fileName))).pipe(Option.exists((own) => own.has(flag))),
|
|
4419
4419
|
setFlag: (fileName, flag, value) => {
|
|
4420
4420
|
const path = toPath(fileName);
|
|
4421
|
-
const own = flags.
|
|
4422
|
-
flags.set(path, own);
|
|
4421
|
+
const own = flags.getOrInsertComputed(path, () => /* @__PURE__ */ new Set());
|
|
4423
4422
|
if (value) {
|
|
4424
4423
|
own.add(flag);
|
|
4425
4424
|
return;
|
|
@@ -4786,9 +4785,7 @@ const createResultTables = () => {
|
|
|
4786
4785
|
return {
|
|
4787
4786
|
get: (outer, inner) => Option.fromNullishOr(tables.get(outer)).pipe(Option.flatMap((table) => Option.fromNullishOr(table.get(inner)))),
|
|
4788
4787
|
tableFor: (outer) => {
|
|
4789
|
-
|
|
4790
|
-
tables.set(outer, table);
|
|
4791
|
-
return table;
|
|
4788
|
+
return tables.getOrInsertComputed(outer, () => /* @__PURE__ */ new Map());
|
|
4792
4789
|
}
|
|
4793
4790
|
};
|
|
4794
4791
|
};
|
|
@@ -4858,9 +4855,7 @@ const createResolutionStore = (source) => {
|
|
|
4858
4855
|
const noDtsCache = createModuleResolutionCache();
|
|
4859
4856
|
const byFile = /* @__PURE__ */ new Map();
|
|
4860
4857
|
const tableFor = (containingFile) => {
|
|
4861
|
-
|
|
4862
|
-
byFile.set(containingFile, table);
|
|
4863
|
-
return table;
|
|
4858
|
+
return byFile.getOrInsertComputed(containingFile, () => /* @__PURE__ */ new Map());
|
|
4864
4859
|
};
|
|
4865
4860
|
const cacheFor = (request) => {
|
|
4866
4861
|
if (request.noDtsResolution) return noDtsCache;
|
|
@@ -4910,8 +4905,7 @@ const createResolvedModuleTable = () => {
|
|
|
4910
4905
|
return {
|
|
4911
4906
|
record: (fileName, entries) => {
|
|
4912
4907
|
const path = toPath(fileName);
|
|
4913
|
-
const own = byFile.
|
|
4914
|
-
byFile.set(path, own);
|
|
4908
|
+
const own = byFile.getOrInsertComputed(path, () => /* @__PURE__ */ new Map());
|
|
4915
4909
|
for (const entry of entries) own.set(modeKey(entry.moduleName, entry.mode), toTsResolution(entry.resolution));
|
|
4916
4910
|
},
|
|
4917
4911
|
lookup: (fileName, moduleName, mode) => Option.fromNullishOr(byFile.get(toPath(fileName))).pipe(Option.flatMap((own) => Option.fromNullishOr(own.get(modeKey(moduleName, mode)))))
|