@wix/validation-rules 0.0.0-stage → 0.5.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 +74 -2
- package/dist/constants.d.ts +2 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +9906 -0
- package/dist/types.d.ts +7 -0
- package/dist/validate.d.ts +5 -0
- package/package.json +63 -3
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ValidateInput as InfraValidateInput } from '@wix/validation-infra';
|
|
2
|
+
/** The combined validator selects its rules; the caller supplies the site and run options. */
|
|
3
|
+
export interface ValidateInput extends Omit<InfraValidateInput, 'rules'> {
|
|
4
|
+
/** Only the rules of one kind: 'project' (defineProjectRule), 'site-code' (defineSiteCodeRule) or 'page' (every other rule, defineRule's), for a
|
|
5
|
+
* caller that runs them in passes (origami-lint: the project rules on the whole site, then the page rules on the changed pages). Default: all three. */
|
|
6
|
+
scope?: 'project' | 'page' | 'site-code';
|
|
7
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Problem } from '@wix/validation-infra';
|
|
2
|
+
import type { ValidateInput } from './types.ts';
|
|
3
|
+
/** Every problem RULES find on the site: project rules first, then site-code rules, then each page. The input is validate()'s, without `rules`;
|
|
4
|
+
* `scope` keeps one kind of RULES, in its order. */
|
|
5
|
+
export declare function validate({ scope, ...input }: ValidateInput): Problem[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,66 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/validation-rules",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.5.1",
|
|
4
|
+
"description": "Every rule an Origami site is validated with, from the DM, Origami, Studio and Thunderbolt rule packages, run by @wix/validation-infra: every site file in memory in, every problem out",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"default": "./dist/index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": "^20.19.0 || ^22.13.0 || >=24"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "rm -rf dist && tsc -p . && tsc -p tsconfig.build.json --emitDeclarationOnly && esbuild src/index.ts --bundle --platform=node --format=esm --target=node20 --outfile=dist/index.js --external:@wix/validation-infra --external:@wix/origami-types --external:@typescript-eslint/parser --external:postcss --external:@eslint/css-tree",
|
|
21
|
+
"lint": "oxlint .",
|
|
22
|
+
"typecheck": "tsc -p .",
|
|
23
|
+
"test": "node --test 'test/*.test.ts'",
|
|
24
|
+
"test:agents": "npm run test:agents:built --prefix ../..",
|
|
25
|
+
"test:package": "npm run test:package:built --prefix ../.."
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@eslint/css-tree": "^3.6.6",
|
|
29
|
+
"@typescript-eslint/parser": "^8.71.2",
|
|
30
|
+
"@wix/origami-types": "^2.0.0",
|
|
31
|
+
"@wix/validation-infra": "^0.5.1",
|
|
32
|
+
"postcss": "^8.5.28"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/node": "^22.0.0",
|
|
36
|
+
"@wix/lint-dm": "^0.1.0",
|
|
37
|
+
"@wix/lint-origami": "^0.1.0",
|
|
38
|
+
"@wix/lint-studio": "^0.1.0",
|
|
39
|
+
"@wix/lint-thunderbolt": "^0.1.0",
|
|
40
|
+
"esbuild": "^0.25.0",
|
|
41
|
+
"typescript": "^5.8.3 || ~6.0.3"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"registry": "https://registry.npmjs.org/",
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"wix": {
|
|
48
|
+
"artifact": {
|
|
49
|
+
"groupId": "com.wixpress.npm",
|
|
50
|
+
"artifactId": "validation-rules",
|
|
51
|
+
"targets": {
|
|
52
|
+
"docker": false
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"validations": {
|
|
56
|
+
"postBuild": [
|
|
57
|
+
"typecheck",
|
|
58
|
+
"test",
|
|
59
|
+
"test:agents",
|
|
60
|
+
"test:package",
|
|
61
|
+
"lint"
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"falconPackageHash": "cf0005a2cf1562a7a2553c5108ed5aaa26fd35dd9692846fed59e3e1"
|
|
6
66
|
}
|