Beifengdo commited on
Commit
a578652
·
verified ·
1 Parent(s): 22bf27d

Upload original JAVA语言程序设计 course files (part 18)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/LICENSE +22 -3
  2. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/README.md +207 -3
  3. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/core/id.ts +10 -3
  4. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/core/index.ts +16 -3
  5. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/core/ref.ts +129 -3
  6. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/discriminator/index.ts +113 -3
  7. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/discriminator/types.ts +12 -3
  8. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/draft2020.ts +23 -3
  9. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/draft7.ts +17 -3
  10. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +31 -3
  11. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +51 -3
  12. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/dynamic/index.ts +9 -3
  13. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +14 -3
  14. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +10 -3
  15. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/errors.ts +18 -3
  16. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/format/format.ts +120 -3
  17. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/format/index.ts +6 -3
  18. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +89 -3
  19. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/elements.ts +32 -3
  20. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/enum.ts +45 -3
  21. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/error.ts +23 -3
  22. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/index.ts +37 -3
  23. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +24 -3
  24. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +21 -3
  25. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +15 -3
  26. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/properties.ts +184 -3
  27. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/ref.ts +76 -3
  28. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/type.ts +75 -3
  29. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/union.ts +12 -3
  30. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/values.ts +58 -3
  31. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/metadata.ts +17 -3
  32. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/next.ts +8 -3
  33. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +7 -3
  34. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +47 -3
  35. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +85 -3
  36. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/const.ts +28 -3
  37. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +23 -3
  38. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/enum.ts +54 -3
  39. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/index.ts +49 -3
  40. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +16 -3
  41. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +26 -3
  42. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +30 -3
  43. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +42 -3
  44. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +26 -3
  45. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +34 -3
  46. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/pattern.ts +28 -3
  47. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/required.ts +98 -3
  48. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +79 -3
  49. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/package.json +126 -3
  50. Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/anymatch/LICENSE +15 -3
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/LICENSE CHANGED
@@ -1,3 +1,22 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:a05350a88e318e4f5f2c2a1ff1e2e88daa4dd38e6e78b71cccae422bdc762cc3
3
- size 1090
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015-2021 Evgeny Poberezkin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/README.md CHANGED
@@ -1,3 +1,207 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:57d9f5c9d12d019ee1c42fcd7be6a1c5b2944608b011714146ecdd20972374ed
3
- size 13781
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <img align="right" alt="Ajv logo" width="160" src="https://ajv.js.org/img/ajv.svg">
2
+
3
+ &nbsp;
4
+
5
+ # Ajv JSON schema validator
6
+
7
+ The fastest JSON validator for Node.js and browser.
8
+
9
+ Supports JSON Schema draft-04/06/07/2019-09/2020-12 ([draft-04 support](https://ajv.js.org/json-schema.html#draft-04) requires ajv-draft-04 package) and JSON Type Definition [RFC8927](https://datatracker.ietf.org/doc/rfc8927/).
10
+
11
+ [![build](https://github.com/ajv-validator/ajv/actions/workflows/build.yml/badge.svg)](https://github.com/ajv-validator/ajv/actions?query=workflow%3Abuild)
12
+ [![npm](https://img.shields.io/npm/v/ajv.svg)](https://www.npmjs.com/package/ajv)
13
+ [![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv)
14
+ [![Coverage Status](https://coveralls.io/repos/github/ajv-validator/ajv/badge.svg?branch=master)](https://coveralls.io/github/ajv-validator/ajv?branch=master)
15
+ [![SimpleX](https://img.shields.io/badge/chat-on%20SimpleX-70F0F9)](https://simplex.chat/contact#/?v=1-2&smp=smp%3A%2F%2Fu2dS9sG8nMNURyZwqASV4yROM28Er0luVTx5X1CsMrU%3D%40smp4.simplex.im%2F8KvvURM6J38Gdq9dCuPswMOkMny0xCOJ%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEAr8rPVRuMOXv6kwF2yUAap-eoVg-9ssOFCi1fIrxTUw0%253D%26srv%3Do5vmywmrnaxalvz6wi3zicyftgio6psuvyniis6gco6bp6ekl4cqj4id.onion&data=%7B%22type%22%3A%22group%22%2C%22groupLinkId%22%3A%224pwLRgWHU9tlroMWHz0uOg%3D%3D%22%7D)
16
+ [![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv)
17
+ [![GitHub Sponsors](https://img.shields.io/badge/$-sponsors-brightgreen)](https://github.com/sponsors/epoberezkin)
18
+
19
+ ## Ajv sponsors
20
+
21
+ [<img src="https://ajv.js.org/img/mozilla.svg" width="45%" alt="Mozilla">](https://www.mozilla.org)<img src="https://ajv.js.org/img/gap.svg" width="9%">[<img src="https://ajv.js.org/img/reserved.svg" width="45%">](https://opencollective.com/ajv)
22
+
23
+ [<img src="https://ajv.js.org/img/microsoft.png" width="31%" alt="Microsoft">](https://opensource.microsoft.com)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/reserved.svg" width="31%">](https://opencollective.com/ajv)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/reserved.svg" width="31%">](https://opencollective.com/ajv)
24
+
25
+ [<img src="https://ajv.js.org/img/retool.svg" width="22.5%" alt="Retool">](https://retool.com/?utm_source=sponsor&utm_campaign=ajv)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/tidelift.svg" width="22.5%" alt="Tidelift">](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=enterprise)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/simplex.svg" width="22.5%" alt="SimpleX">](https://github.com/simplex-chat/simplex-chat)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/reserved.svg" width="22.5%">](https://opencollective.com/ajv)
26
+
27
+ ## Contributing
28
+
29
+ More than 100 people contributed to Ajv, and we would love to have you join the development. We welcome implementing new features that will benefit many users and ideas to improve our documentation.
30
+
31
+ Please review [Contributing guidelines](./CONTRIBUTING.md) and [Code components](https://ajv.js.org/components.html).
32
+
33
+ ## Documentation
34
+
35
+ All documentation is available on the [Ajv website](https://ajv.js.org).
36
+
37
+ Some useful site links:
38
+
39
+ - [Getting started](https://ajv.js.org/guide/getting-started.html)
40
+ - [JSON Schema vs JSON Type Definition](https://ajv.js.org/guide/schema-language.html)
41
+ - [API reference](https://ajv.js.org/api.html)
42
+ - [Strict mode](https://ajv.js.org/strict-mode.html)
43
+ - [Standalone validation code](https://ajv.js.org/standalone.html)
44
+ - [Security considerations](https://ajv.js.org/security.html)
45
+ - [Command line interface](https://ajv.js.org/packages/ajv-cli.html)
46
+ - [Frequently Asked Questions](https://ajv.js.org/faq.html)
47
+
48
+ ## <a name="sponsors"></a>Please [sponsor Ajv development](https://github.com/sponsors/epoberezkin)
49
+
50
+ Since I asked to support Ajv development 40 people and 6 organizations contributed via GitHub and OpenCollective - this support helped receiving the MOSS grant!
51
+
52
+ Your continuing support is very important - the funds will be used to develop and maintain Ajv once the next major version is released.
53
+
54
+ Please sponsor Ajv via:
55
+
56
+ - [GitHub sponsors page](https://github.com/sponsors/epoberezkin) (GitHub will match it)
57
+ - [Ajv Open Collective](https://opencollective.com/ajv)
58
+
59
+ Thank you.
60
+
61
+ #### Open Collective sponsors
62
+
63
+ <a href="https://opencollective.com/ajv"><img src="https://opencollective.com/ajv/individuals.svg?width=890"></a>
64
+
65
+ <a href="https://opencollective.com/ajv/organization/0/website"><img src="https://opencollective.com/ajv/organization/0/avatar.svg"></a>
66
+ <a href="https://opencollective.com/ajv/organization/1/website"><img src="https://opencollective.com/ajv/organization/1/avatar.svg"></a>
67
+ <a href="https://opencollective.com/ajv/organization/2/website"><img src="https://opencollective.com/ajv/organization/2/avatar.svg"></a>
68
+ <a href="https://opencollective.com/ajv/organization/3/website"><img src="https://opencollective.com/ajv/organization/3/avatar.svg"></a>
69
+ <a href="https://opencollective.com/ajv/organization/4/website"><img src="https://opencollective.com/ajv/organization/4/avatar.svg"></a>
70
+ <a href="https://opencollective.com/ajv/organization/5/website"><img src="https://opencollective.com/ajv/organization/5/avatar.svg"></a>
71
+ <a href="https://opencollective.com/ajv/organization/6/website"><img src="https://opencollective.com/ajv/organization/6/avatar.svg"></a>
72
+ <a href="https://opencollective.com/ajv/organization/7/website"><img src="https://opencollective.com/ajv/organization/7/avatar.svg"></a>
73
+ <a href="https://opencollective.com/ajv/organization/8/website"><img src="https://opencollective.com/ajv/organization/8/avatar.svg"></a>
74
+ <a href="https://opencollective.com/ajv/organization/9/website"><img src="https://opencollective.com/ajv/organization/9/avatar.svg"></a>
75
+ <a href="https://opencollective.com/ajv/organization/10/website"><img src="https://opencollective.com/ajv/organization/10/avatar.svg"></a>
76
+ <a href="https://opencollective.com/ajv/organization/11/website"><img src="https://opencollective.com/ajv/organization/11/avatar.svg"></a>
77
+ <a href="https://opencollective.com/ajv/organization/12/website"><img src="https://opencollective.com/ajv/organization/12/avatar.svg"></a>
78
+ <a href="https://opencollective.com/ajv/organization/13/website"><img src="https://opencollective.com/ajv/organization/13/avatar.svg"></a>
79
+ <a href="https://opencollective.com/ajv/organization/14/website"><img src="https://opencollective.com/ajv/organization/14/avatar.svg"></a>
80
+ <a href="https://opencollective.com/ajv/organization/15/website"><img src="https://opencollective.com/ajv/organization/15/avatar.svg"></a>
81
+ <a href="https://opencollective.com/ajv/organization/16/website"><img src="https://opencollective.com/ajv/organization/16/avatar.svg"></a>
82
+ <a href="https://opencollective.com/ajv/organization/17/website"><img src="https://opencollective.com/ajv/organization/17/avatar.svg"></a>
83
+ <a href="https://opencollective.com/ajv/organization/18/website"><img src="https://opencollective.com/ajv/organization/18/avatar.svg"></a>
84
+ <a href="https://opencollective.com/ajv/organization/19/website"><img src="https://opencollective.com/ajv/organization/19/avatar.svg"></a>
85
+ <a href="https://opencollective.com/ajv/organization/20/website"><img src="https://opencollective.com/ajv/organization/20/avatar.svg"></a>
86
+ <a href="https://opencollective.com/ajv/organization/21/website"><img src="https://opencollective.com/ajv/organization/21/avatar.svg"></a>
87
+ <a href="https://opencollective.com/ajv/organization/22/website"><img src="https://opencollective.com/ajv/organization/22/avatar.svg"></a>
88
+ <a href="https://opencollective.com/ajv/organization/23/website"><img src="https://opencollective.com/ajv/organization/23/avatar.svg"></a>
89
+ <a href="https://opencollective.com/ajv/organization/24/website"><img src="https://opencollective.com/ajv/organization/24/avatar.svg"></a>
90
+
91
+ ## Performance
92
+
93
+ Ajv generates code to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization.
94
+
95
+ Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks:
96
+
97
+ - [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place
98
+ - [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster
99
+ - [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html)
100
+ - [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html)
101
+
102
+ Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark):
103
+
104
+ [![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=62,4,1&chs=600x416&chxl=-1:|ajv|@exodus/schemasafe|is-my-json-valid|djv|@cfworker/json-schema|jsonschema/=t:100,69.2,51.5,13.1,5.1,1.2)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance)
105
+
106
+ ## Features
107
+
108
+ - Ajv implements JSON Schema [draft-06/07/2019-09/2020-12](http://json-schema.org/) standards (draft-04 is supported in v6):
109
+ - all validation keywords (see [JSON Schema validation keywords](https://ajv.js.org/json-schema.html))
110
+ - [OpenAPI](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md) extensions:
111
+ - NEW: keyword [discriminator](https://ajv.js.org/json-schema.html#discriminator).
112
+ - keyword [nullable](https://ajv.js.org/json-schema.html#nullable).
113
+ - full support of remote references (remote schemas have to be added with `addSchema` or compiled to be available)
114
+ - support of recursive references between schemas
115
+ - correct string lengths for strings with unicode pairs
116
+ - JSON Schema [formats](https://ajv.js.org/guide/formats.html) (with [ajv-formats](https://github.com/ajv-validator/ajv-formats) plugin).
117
+ - [validates schemas against meta-schema](https://ajv.js.org/api.html#api-validateschema)
118
+ - NEW: supports [JSON Type Definition](https://datatracker.ietf.org/doc/rfc8927/):
119
+ - all keywords (see [JSON Type Definition schema forms](https://ajv.js.org/json-type-definition.html))
120
+ - meta-schema for JTD schemas
121
+ - "union" keyword and user-defined keywords (can be used inside "metadata" member of the schema)
122
+ - supports [browsers](https://ajv.js.org/guide/environments.html#browsers) and Node.js 10.x - current
123
+ - [asynchronous loading](https://ajv.js.org/guide/managing-schemas.html#asynchronous-schema-loading) of referenced schemas during compilation
124
+ - "All errors" validation mode with [option allErrors](https://ajv.js.org/options.html#allerrors)
125
+ - [error messages with parameters](https://ajv.js.org/api.html#validation-errors) describing error reasons to allow error message generation
126
+ - i18n error messages support with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package
127
+ - [removing-additional-properties](https://ajv.js.org/guide/modifying-data.html#removing-additional-properties)
128
+ - [assigning defaults](https://ajv.js.org/guide/modifying-data.html#assigning-defaults) to missing properties and items
129
+ - [coercing data](https://ajv.js.org/guide/modifying-data.html#coercing-data-types) to the types specified in `type` keywords
130
+ - [user-defined keywords](https://ajv.js.org/guide/user-keywords.html)
131
+ - additional extension keywords with [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package
132
+ - [\$data reference](https://ajv.js.org/guide/combining-schemas.html#data-reference) to use values from the validated data as values for the schema keywords
133
+ - [asynchronous validation](https://ajv.js.org/guide/async-validation.html) of user-defined formats and keywords
134
+
135
+ ## Install
136
+
137
+ To install version 8:
138
+
139
+ ```
140
+ npm install ajv
141
+ ```
142
+
143
+ ## <a name="usage"></a>Getting started
144
+
145
+ Try it in the Node.js REPL: https://runkit.com/npm/ajv
146
+
147
+ In JavaScript:
148
+
149
+ ```javascript
150
+ // or ESM/TypeScript import
151
+ import Ajv from "ajv"
152
+ // Node.js require:
153
+ const Ajv = require("ajv")
154
+
155
+ const ajv = new Ajv() // options can be passed, e.g. {allErrors: true}
156
+
157
+ const schema = {
158
+ type: "object",
159
+ properties: {
160
+ foo: {type: "integer"},
161
+ bar: {type: "string"},
162
+ },
163
+ required: ["foo"],
164
+ additionalProperties: false,
165
+ }
166
+
167
+ const data = {
168
+ foo: 1,
169
+ bar: "abc",
170
+ }
171
+
172
+ const validate = ajv.compile(schema)
173
+ const valid = validate(data)
174
+ if (!valid) console.log(validate.errors)
175
+ ```
176
+
177
+ Learn how to use Ajv and see more examples in the [Guide: getting started](https://ajv.js.org/guide/getting-started.html)
178
+
179
+ ## Changes history
180
+
181
+ See [https://github.com/ajv-validator/ajv/releases](https://github.com/ajv-validator/ajv/releases)
182
+
183
+ **Please note**: [Changes in version 8.0.0](https://github.com/ajv-validator/ajv/releases/tag/v8.0.0)
184
+
185
+ [Version 7.0.0](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0)
186
+
187
+ [Version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0).
188
+
189
+ ## Code of conduct
190
+
191
+ Please review and follow the [Code of conduct](./CODE_OF_CONDUCT.md).
192
+
193
+ Please report any unacceptable behaviour to ajv.validator@gmail.com - it will be reviewed by the project team.
194
+
195
+ ## Security contact
196
+
197
+ To report a security vulnerability, please use the
198
+ [Tidelift security contact](https://tidelift.com/security).
199
+ Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues.
200
+
201
+ ## Open-source software support
202
+
203
+ Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=readme) - it provides a centralised support to open-source software users, in addition to the support provided by software maintainers.
204
+
205
+ ## License
206
+
207
+ [MIT](./LICENSE)
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/core/id.ts CHANGED
@@ -1,3 +1,10 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:241606f9c18746cb35cb74c728c6d972bd6100edad70692bb27f841ac8b1b4b1
3
- size 224
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition} from "../../types"
2
+
3
+ const def: CodeKeywordDefinition = {
4
+ keyword: "id",
5
+ code() {
6
+ throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')
7
+ },
8
+ }
9
+
10
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/core/index.ts CHANGED
@@ -1,3 +1,16 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:43e089e25baac37f7665f0451e51956ec154f60a058b83f86cc3e577ab800f62
3
- size 274
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {Vocabulary} from "../../types"
2
+ import idKeyword from "./id"
3
+ import refKeyword from "./ref"
4
+
5
+ const core: Vocabulary = [
6
+ "$schema",
7
+ "$id",
8
+ "$defs",
9
+ "$vocabulary",
10
+ {keyword: "$comment"},
11
+ "definitions",
12
+ idKeyword,
13
+ refKeyword,
14
+ ]
15
+
16
+ export default core
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/core/ref.ts CHANGED
@@ -1,3 +1,129 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:0d932d49ef57d32449923e5687e57715f4d08252f749d34d1d9410e8f88711f8
3
- size 4384
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, AnySchema} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import MissingRefError from "../../compile/ref_error"
4
+ import {callValidateCode} from "../code"
5
+ import {_, nil, stringify, Code, Name} from "../../compile/codegen"
6
+ import N from "../../compile/names"
7
+ import {SchemaEnv, resolveRef} from "../../compile"
8
+ import {mergeEvaluated} from "../../compile/util"
9
+
10
+ const def: CodeKeywordDefinition = {
11
+ keyword: "$ref",
12
+ schemaType: "string",
13
+ code(cxt: KeywordCxt): void {
14
+ const {gen, schema: $ref, it} = cxt
15
+ const {baseId, schemaEnv: env, validateName, opts, self} = it
16
+ const {root} = env
17
+ if (($ref === "#" || $ref === "#/") && baseId === root.baseId) return callRootRef()
18
+ const schOrEnv = resolveRef.call(self, root, baseId, $ref)
19
+ if (schOrEnv === undefined) throw new MissingRefError(it.opts.uriResolver, baseId, $ref)
20
+ if (schOrEnv instanceof SchemaEnv) return callValidate(schOrEnv)
21
+ return inlineRefSchema(schOrEnv)
22
+
23
+ function callRootRef(): void {
24
+ if (env === root) return callRef(cxt, validateName, env, env.$async)
25
+ const rootName = gen.scopeValue("root", {ref: root})
26
+ return callRef(cxt, _`${rootName}.validate`, root, root.$async)
27
+ }
28
+
29
+ function callValidate(sch: SchemaEnv): void {
30
+ const v = getValidate(cxt, sch)
31
+ callRef(cxt, v, sch, sch.$async)
32
+ }
33
+
34
+ function inlineRefSchema(sch: AnySchema): void {
35
+ const schName = gen.scopeValue(
36
+ "schema",
37
+ opts.code.source === true ? {ref: sch, code: stringify(sch)} : {ref: sch}
38
+ )
39
+ const valid = gen.name("valid")
40
+ const schCxt = cxt.subschema(
41
+ {
42
+ schema: sch,
43
+ dataTypes: [],
44
+ schemaPath: nil,
45
+ topSchemaRef: schName,
46
+ errSchemaPath: $ref,
47
+ },
48
+ valid
49
+ )
50
+ cxt.mergeEvaluated(schCxt)
51
+ cxt.ok(valid)
52
+ }
53
+ },
54
+ }
55
+
56
+ export function getValidate(cxt: KeywordCxt, sch: SchemaEnv): Code {
57
+ const {gen} = cxt
58
+ return sch.validate
59
+ ? gen.scopeValue("validate", {ref: sch.validate})
60
+ : _`${gen.scopeValue("wrapper", {ref: sch})}.validate`
61
+ }
62
+
63
+ export function callRef(cxt: KeywordCxt, v: Code, sch?: SchemaEnv, $async?: boolean): void {
64
+ const {gen, it} = cxt
65
+ const {allErrors, schemaEnv: env, opts} = it
66
+ const passCxt = opts.passContext ? N.this : nil
67
+ if ($async) callAsyncRef()
68
+ else callSyncRef()
69
+
70
+ function callAsyncRef(): void {
71
+ if (!env.$async) throw new Error("async schema referenced by sync schema")
72
+ const valid = gen.let("valid")
73
+ gen.try(
74
+ () => {
75
+ gen.code(_`await ${callValidateCode(cxt, v, passCxt)}`)
76
+ addEvaluatedFrom(v) // TODO will not work with async, it has to be returned with the result
77
+ if (!allErrors) gen.assign(valid, true)
78
+ },
79
+ (e) => {
80
+ gen.if(_`!(${e} instanceof ${it.ValidationError as Name})`, () => gen.throw(e))
81
+ addErrorsFrom(e)
82
+ if (!allErrors) gen.assign(valid, false)
83
+ }
84
+ )
85
+ cxt.ok(valid)
86
+ }
87
+
88
+ function callSyncRef(): void {
89
+ cxt.result(
90
+ callValidateCode(cxt, v, passCxt),
91
+ () => addEvaluatedFrom(v),
92
+ () => addErrorsFrom(v)
93
+ )
94
+ }
95
+
96
+ function addErrorsFrom(source: Code): void {
97
+ const errs = _`${source}.errors`
98
+ gen.assign(N.vErrors, _`${N.vErrors} === null ? ${errs} : ${N.vErrors}.concat(${errs})`) // TODO tagged
99
+ gen.assign(N.errors, _`${N.vErrors}.length`)
100
+ }
101
+
102
+ function addEvaluatedFrom(source: Code): void {
103
+ if (!it.opts.unevaluated) return
104
+ const schEvaluated = sch?.validate?.evaluated
105
+ // TODO refactor
106
+ if (it.props !== true) {
107
+ if (schEvaluated && !schEvaluated.dynamicProps) {
108
+ if (schEvaluated.props !== undefined) {
109
+ it.props = mergeEvaluated.props(gen, schEvaluated.props, it.props)
110
+ }
111
+ } else {
112
+ const props = gen.var("props", _`${source}.evaluated.props`)
113
+ it.props = mergeEvaluated.props(gen, props, it.props, Name)
114
+ }
115
+ }
116
+ if (it.items !== true) {
117
+ if (schEvaluated && !schEvaluated.dynamicItems) {
118
+ if (schEvaluated.items !== undefined) {
119
+ it.items = mergeEvaluated.items(gen, schEvaluated.items, it.items)
120
+ }
121
+ } else {
122
+ const items = gen.var("items", _`${source}.evaluated.items`)
123
+ it.items = mergeEvaluated.items(gen, items, it.items, Name)
124
+ }
125
+ }
126
+ }
127
+ }
128
+
129
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/discriminator/index.ts CHANGED
@@ -1,3 +1,113 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9b89f8b9ab15e49b326bb3505424a1c0cd234397bf7db13a80e74e627fc381a3
3
- size 4304
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, AnySchemaObject, KeywordErrorDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {_, getProperty, Name} from "../../compile/codegen"
4
+ import {DiscrError, DiscrErrorObj} from "../discriminator/types"
5
+ import {resolveRef, SchemaEnv} from "../../compile"
6
+ import MissingRefError from "../../compile/ref_error"
7
+ import {schemaHasRulesButRef} from "../../compile/util"
8
+
9
+ export type DiscriminatorError = DiscrErrorObj<DiscrError.Tag> | DiscrErrorObj<DiscrError.Mapping>
10
+
11
+ const error: KeywordErrorDefinition = {
12
+ message: ({params: {discrError, tagName}}) =>
13
+ discrError === DiscrError.Tag
14
+ ? `tag "${tagName}" must be string`
15
+ : `value of tag "${tagName}" must be in oneOf`,
16
+ params: ({params: {discrError, tag, tagName}}) =>
17
+ _`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`,
18
+ }
19
+
20
+ const def: CodeKeywordDefinition = {
21
+ keyword: "discriminator",
22
+ type: "object",
23
+ schemaType: "object",
24
+ error,
25
+ code(cxt: KeywordCxt) {
26
+ const {gen, data, schema, parentSchema, it} = cxt
27
+ const {oneOf} = parentSchema
28
+ if (!it.opts.discriminator) {
29
+ throw new Error("discriminator: requires discriminator option")
30
+ }
31
+ const tagName = schema.propertyName
32
+ if (typeof tagName != "string") throw new Error("discriminator: requires propertyName")
33
+ if (schema.mapping) throw new Error("discriminator: mapping is not supported")
34
+ if (!oneOf) throw new Error("discriminator: requires oneOf keyword")
35
+ const valid = gen.let("valid", false)
36
+ const tag = gen.const("tag", _`${data}${getProperty(tagName)}`)
37
+ gen.if(
38
+ _`typeof ${tag} == "string"`,
39
+ () => validateMapping(),
40
+ () => cxt.error(false, {discrError: DiscrError.Tag, tag, tagName})
41
+ )
42
+ cxt.ok(valid)
43
+
44
+ function validateMapping(): void {
45
+ const mapping = getMapping()
46
+ gen.if(false)
47
+ for (const tagValue in mapping) {
48
+ gen.elseIf(_`${tag} === ${tagValue}`)
49
+ gen.assign(valid, applyTagSchema(mapping[tagValue]))
50
+ }
51
+ gen.else()
52
+ cxt.error(false, {discrError: DiscrError.Mapping, tag, tagName})
53
+ gen.endIf()
54
+ }
55
+
56
+ function applyTagSchema(schemaProp?: number): Name {
57
+ const _valid = gen.name("valid")
58
+ const schCxt = cxt.subschema({keyword: "oneOf", schemaProp}, _valid)
59
+ cxt.mergeEvaluated(schCxt, Name)
60
+ return _valid
61
+ }
62
+
63
+ function getMapping(): {[T in string]?: number} {
64
+ const oneOfMapping: {[T in string]?: number} = {}
65
+ const topRequired = hasRequired(parentSchema)
66
+ let tagRequired = true
67
+ for (let i = 0; i < oneOf.length; i++) {
68
+ let sch = oneOf[i]
69
+ if (sch?.$ref && !schemaHasRulesButRef(sch, it.self.RULES)) {
70
+ const ref = sch.$ref
71
+ sch = resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref)
72
+ if (sch instanceof SchemaEnv) sch = sch.schema
73
+ if (sch === undefined) throw new MissingRefError(it.opts.uriResolver, it.baseId, ref)
74
+ }
75
+ const propSch = sch?.properties?.[tagName]
76
+ if (typeof propSch != "object") {
77
+ throw new Error(
78
+ `discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`
79
+ )
80
+ }
81
+ tagRequired = tagRequired && (topRequired || hasRequired(sch))
82
+ addMappings(propSch, i)
83
+ }
84
+ if (!tagRequired) throw new Error(`discriminator: "${tagName}" must be required`)
85
+ return oneOfMapping
86
+
87
+ function hasRequired({required}: AnySchemaObject): boolean {
88
+ return Array.isArray(required) && required.includes(tagName)
89
+ }
90
+
91
+ function addMappings(sch: AnySchemaObject, i: number): void {
92
+ if (sch.const) {
93
+ addMapping(sch.const, i)
94
+ } else if (sch.enum) {
95
+ for (const tagValue of sch.enum) {
96
+ addMapping(tagValue, i)
97
+ }
98
+ } else {
99
+ throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`)
100
+ }
101
+ }
102
+
103
+ function addMapping(tagValue: unknown, i: number): void {
104
+ if (typeof tagValue != "string" || tagValue in oneOfMapping) {
105
+ throw new Error(`discriminator: "${tagName}" values must be unique strings`)
106
+ }
107
+ oneOfMapping[tagValue] = i
108
+ }
109
+ }
110
+ },
111
+ }
112
+
113
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/discriminator/types.ts CHANGED
@@ -1,3 +1,12 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:537bcd41ac270d1a43417d742a1f9f55b319e6f213323f6b00edfbe38e88e7da
3
- size 251
 
 
 
 
 
 
 
 
 
 
1
+ import type {ErrorObject} from "../../types"
2
+
3
+ export enum DiscrError {
4
+ Tag = "tag",
5
+ Mapping = "mapping",
6
+ }
7
+
8
+ export type DiscrErrorObj<E extends DiscrError> = ErrorObject<
9
+ "discriminator",
10
+ {error: E; tag: string; tagValue: unknown},
11
+ string
12
+ >
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/draft2020.ts CHANGED
@@ -1,3 +1,23 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:840c49657713cbbd6467274f270c77bf16a7ed8b3aedbee6bb5c587550282aea
3
- size 698
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {Vocabulary} from "../types"
2
+ import coreVocabulary from "./core"
3
+ import validationVocabulary from "./validation"
4
+ import getApplicatorVocabulary from "./applicator"
5
+ import dynamicVocabulary from "./dynamic"
6
+ import nextVocabulary from "./next"
7
+ import unevaluatedVocabulary from "./unevaluated"
8
+ import formatVocabulary from "./format"
9
+ import {metadataVocabulary, contentVocabulary} from "./metadata"
10
+
11
+ const draft2020Vocabularies: Vocabulary[] = [
12
+ dynamicVocabulary,
13
+ coreVocabulary,
14
+ validationVocabulary,
15
+ getApplicatorVocabulary(true),
16
+ formatVocabulary,
17
+ metadataVocabulary,
18
+ contentVocabulary,
19
+ nextVocabulary,
20
+ unevaluatedVocabulary,
21
+ ]
22
+
23
+ export default draft2020Vocabularies
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/draft7.ts CHANGED
@@ -1,3 +1,17 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9f8fd4fa8b2084b4cae951badc68de3a361e01eea06a158d530c4d55e92b5fb4
3
- size 496
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {Vocabulary} from "../types"
2
+ import coreVocabulary from "./core"
3
+ import validationVocabulary from "./validation"
4
+ import getApplicatorVocabulary from "./applicator"
5
+ import formatVocabulary from "./format"
6
+ import {metadataVocabulary, contentVocabulary} from "./metadata"
7
+
8
+ const draft7Vocabularies: Vocabulary[] = [
9
+ coreVocabulary,
10
+ validationVocabulary,
11
+ getApplicatorVocabulary(),
12
+ formatVocabulary,
13
+ metadataVocabulary,
14
+ contentVocabulary,
15
+ ]
16
+
17
+ export default draft7Vocabularies
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts CHANGED
@@ -1,3 +1,31 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:bc8bb7636e8fff1add5d8c36577978f357731c2877fd4d4c59b620d6a8af1d8f
3
- size 1122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {_, getProperty, Code} from "../../compile/codegen"
4
+ import N from "../../compile/names"
5
+ import {SchemaEnv, compileSchema} from "../../compile"
6
+ import {getValidate} from "../core/ref"
7
+
8
+ const def: CodeKeywordDefinition = {
9
+ keyword: "$dynamicAnchor",
10
+ schemaType: "string",
11
+ code: (cxt) => dynamicAnchor(cxt, cxt.schema),
12
+ }
13
+
14
+ export function dynamicAnchor(cxt: KeywordCxt, anchor: string): void {
15
+ const {gen, it} = cxt
16
+ it.schemaEnv.root.dynamicAnchors[anchor] = true
17
+ const v = _`${N.dynamicAnchors}${getProperty(anchor)}`
18
+ const validate = it.errSchemaPath === "#" ? it.validateName : _getValidate(cxt)
19
+ gen.if(_`!${v}`, () => gen.assign(v, validate))
20
+ }
21
+
22
+ function _getValidate(cxt: KeywordCxt): Code {
23
+ const {schemaEnv, schema, self} = cxt.it
24
+ const {root, baseId, localRefs, meta} = schemaEnv.root
25
+ const {schemaId} = self.opts
26
+ const sch = new SchemaEnv({schema, schemaId, root, baseId, localRefs, meta})
27
+ compileSchema.call(self, sch)
28
+ return getValidate(cxt, sch)
29
+ }
30
+
31
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts CHANGED
@@ -1,3 +1,51 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:92884e9923f4053155e5c1f13d5e176c17b47f0db65616bf031a4bb93faf969d
3
- size 1797
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {_, getProperty, Code, Name} from "../../compile/codegen"
4
+ import N from "../../compile/names"
5
+ import {callRef} from "../core/ref"
6
+
7
+ const def: CodeKeywordDefinition = {
8
+ keyword: "$dynamicRef",
9
+ schemaType: "string",
10
+ code: (cxt) => dynamicRef(cxt, cxt.schema),
11
+ }
12
+
13
+ export function dynamicRef(cxt: KeywordCxt, ref: string): void {
14
+ const {gen, keyword, it} = cxt
15
+ if (ref[0] !== "#") throw new Error(`"${keyword}" only supports hash fragment reference`)
16
+ const anchor = ref.slice(1)
17
+ if (it.allErrors) {
18
+ _dynamicRef()
19
+ } else {
20
+ const valid = gen.let("valid", false)
21
+ _dynamicRef(valid)
22
+ cxt.ok(valid)
23
+ }
24
+
25
+ function _dynamicRef(valid?: Name): void {
26
+ // TODO the assumption here is that `recursiveRef: #` always points to the root
27
+ // of the schema object, which is not correct, because there may be $id that
28
+ // makes # point to it, and the target schema may not contain dynamic/recursiveAnchor.
29
+ // Because of that 2 tests in recursiveRef.json fail.
30
+ // This is a similar problem to #815 (`$id` doesn't alter resolution scope for `{ "$ref": "#" }`).
31
+ // (This problem is not tested in JSON-Schema-Test-Suite)
32
+ if (it.schemaEnv.root.dynamicAnchors[anchor]) {
33
+ const v = gen.let("_v", _`${N.dynamicAnchors}${getProperty(anchor)}`)
34
+ gen.if(v, _callRef(v, valid), _callRef(it.validateName, valid))
35
+ } else {
36
+ _callRef(it.validateName, valid)()
37
+ }
38
+ }
39
+
40
+ function _callRef(validate: Code, valid?: Name): () => void {
41
+ return valid
42
+ ? () =>
43
+ gen.block(() => {
44
+ callRef(cxt, validate)
45
+ gen.let(valid, true)
46
+ })
47
+ : () => callRef(cxt, validate)
48
+ }
49
+ }
50
+
51
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/dynamic/index.ts CHANGED
@@ -1,3 +1,9 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c5188cd455c45b486350ed74bb08b6fb47db13bea6f218cce9d2cbf88044352b
3
- size 328
 
 
 
 
 
 
 
1
+ import type {Vocabulary} from "../../types"
2
+ import dynamicAnchor from "./dynamicAnchor"
3
+ import dynamicRef from "./dynamicRef"
4
+ import recursiveAnchor from "./recursiveAnchor"
5
+ import recursiveRef from "./recursiveRef"
6
+
7
+ const dynamic: Vocabulary = [dynamicAnchor, dynamicRef, recursiveAnchor, recursiveRef]
8
+
9
+ export default dynamic
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts CHANGED
@@ -1,3 +1,14 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:7d9e31d581249212f5c831d30d5398c43b6d7ce4d3dcb735880524016b3e8d6a
3
- size 401
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition} from "../../types"
2
+ import {dynamicAnchor} from "./dynamicAnchor"
3
+ import {checkStrictMode} from "../../compile/util"
4
+
5
+ const def: CodeKeywordDefinition = {
6
+ keyword: "$recursiveAnchor",
7
+ schemaType: "boolean",
8
+ code(cxt) {
9
+ if (cxt.schema) dynamicAnchor(cxt, "")
10
+ else checkStrictMode(cxt.it, "$recursiveAnchor: false is ignored")
11
+ },
12
+ }
13
+
14
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts CHANGED
@@ -1,3 +1,10 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:6202321b7ce13fb3aec6d0180c3e78b6f91d768be57afef6b1693bd143577ee3
3
- size 253
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition} from "../../types"
2
+ import {dynamicRef} from "./dynamicRef"
3
+
4
+ const def: CodeKeywordDefinition = {
5
+ keyword: "$recursiveRef",
6
+ schemaType: "string",
7
+ code: (cxt) => dynamicRef(cxt, cxt.schema),
8
+ }
9
+
10
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/errors.ts CHANGED
@@ -1,3 +1,18 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:ccf58af574cd4a8475346998967fa6229b163b6b52af2e9b0b30fa37338b8e2b
3
- size 731
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {TypeError} from "../compile/validate/dataType"
2
+ import type {ApplicatorKeywordError} from "./applicator"
3
+ import type {ValidationKeywordError} from "./validation"
4
+ import type {FormatError} from "./format/format"
5
+ import type {UnevaluatedPropertiesError} from "./unevaluated/unevaluatedProperties"
6
+ import type {UnevaluatedItemsError} from "./unevaluated/unevaluatedItems"
7
+ import type {DependentRequiredError} from "./validation/dependentRequired"
8
+ import type {DiscriminatorError} from "./discriminator"
9
+
10
+ export type DefinedError =
11
+ | TypeError
12
+ | ApplicatorKeywordError
13
+ | ValidationKeywordError
14
+ | FormatError
15
+ | UnevaluatedPropertiesError
16
+ | UnevaluatedItemsError
17
+ | DependentRequiredError
18
+ | DiscriminatorError
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/format/format.ts CHANGED
@@ -1,3 +1,120 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:5cd796fed502ebe7f2c650b47daae97c28967dd17fa020df56ec861986d30148
3
- size 3987
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {
2
+ AddedFormat,
3
+ FormatValidator,
4
+ AsyncFormatValidator,
5
+ CodeKeywordDefinition,
6
+ KeywordErrorDefinition,
7
+ ErrorObject,
8
+ } from "../../types"
9
+ import type {KeywordCxt} from "../../compile/validate"
10
+ import {_, str, nil, or, Code, getProperty, regexpCode} from "../../compile/codegen"
11
+
12
+ type FormatValidate =
13
+ | FormatValidator<string>
14
+ | FormatValidator<number>
15
+ | AsyncFormatValidator<string>
16
+ | AsyncFormatValidator<number>
17
+ | RegExp
18
+ | string
19
+ | true
20
+
21
+ export type FormatError = ErrorObject<"format", {format: string}, string | {$data: string}>
22
+
23
+ const error: KeywordErrorDefinition = {
24
+ message: ({schemaCode}) => str`must match format "${schemaCode}"`,
25
+ params: ({schemaCode}) => _`{format: ${schemaCode}}`,
26
+ }
27
+
28
+ const def: CodeKeywordDefinition = {
29
+ keyword: "format",
30
+ type: ["number", "string"],
31
+ schemaType: "string",
32
+ $data: true,
33
+ error,
34
+ code(cxt: KeywordCxt, ruleType?: string) {
35
+ const {gen, data, $data, schema, schemaCode, it} = cxt
36
+ const {opts, errSchemaPath, schemaEnv, self} = it
37
+ if (!opts.validateFormats) return
38
+
39
+ if ($data) validate$DataFormat()
40
+ else validateFormat()
41
+
42
+ function validate$DataFormat(): void {
43
+ const fmts = gen.scopeValue("formats", {
44
+ ref: self.formats,
45
+ code: opts.code.formats,
46
+ })
47
+ const fDef = gen.const("fDef", _`${fmts}[${schemaCode}]`)
48
+ const fType = gen.let("fType")
49
+ const format = gen.let("format")
50
+ // TODO simplify
51
+ gen.if(
52
+ _`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`,
53
+ () => gen.assign(fType, _`${fDef}.type || "string"`).assign(format, _`${fDef}.validate`),
54
+ () => gen.assign(fType, _`"string"`).assign(format, fDef)
55
+ )
56
+ cxt.fail$data(or(unknownFmt(), invalidFmt()))
57
+
58
+ function unknownFmt(): Code {
59
+ if (opts.strictSchema === false) return nil
60
+ return _`${schemaCode} && !${format}`
61
+ }
62
+
63
+ function invalidFmt(): Code {
64
+ const callFormat = schemaEnv.$async
65
+ ? _`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))`
66
+ : _`${format}(${data})`
67
+ const validData = _`(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))`
68
+ return _`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`
69
+ }
70
+ }
71
+
72
+ function validateFormat(): void {
73
+ const formatDef: AddedFormat | undefined = self.formats[schema]
74
+ if (!formatDef) {
75
+ unknownFormat()
76
+ return
77
+ }
78
+ if (formatDef === true) return
79
+ const [fmtType, format, fmtRef] = getFormat(formatDef)
80
+ if (fmtType === ruleType) cxt.pass(validCondition())
81
+
82
+ function unknownFormat(): void {
83
+ if (opts.strictSchema === false) {
84
+ self.logger.warn(unknownMsg())
85
+ return
86
+ }
87
+ throw new Error(unknownMsg())
88
+
89
+ function unknownMsg(): string {
90
+ return `unknown format "${schema as string}" ignored in schema at path "${errSchemaPath}"`
91
+ }
92
+ }
93
+
94
+ function getFormat(fmtDef: AddedFormat): [string, FormatValidate, Code] {
95
+ const code =
96
+ fmtDef instanceof RegExp
97
+ ? regexpCode(fmtDef)
98
+ : opts.code.formats
99
+ ? _`${opts.code.formats}${getProperty(schema)}`
100
+ : undefined
101
+ const fmt = gen.scopeValue("formats", {key: schema, ref: fmtDef, code})
102
+ if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) {
103
+ return [fmtDef.type || "string", fmtDef.validate, _`${fmt}.validate`]
104
+ }
105
+
106
+ return ["string", fmtDef, fmt]
107
+ }
108
+
109
+ function validCondition(): Code {
110
+ if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) {
111
+ if (!schemaEnv.$async) throw new Error("async format in sync schema")
112
+ return _`await ${fmtRef}(${data})`
113
+ }
114
+ return typeof format == "function" ? _`${fmtRef}(${data})` : _`${fmtRef}.test(${data})`
115
+ }
116
+ }
117
+ },
118
+ }
119
+
120
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/format/index.ts CHANGED
@@ -1,3 +1,6 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:804a833df34f93e7cd1a1809782f65c1ac89610ac736045308d27b659264a40a
3
- size 148
 
 
 
 
1
+ import type {Vocabulary} from "../../types"
2
+ import formatKeyword from "./format"
3
+
4
+ const format: Vocabulary = [formatKeyword]
5
+
6
+ export default format
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts CHANGED
@@ -1,3 +1,89 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9dd6dd40e98239c10d6771c0a0d107e238c12af4b3c5932fe623de649588de1d
3
- size 2656
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, KeywordErrorDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {_, not, getProperty, Name} from "../../compile/codegen"
4
+ import {checkMetadata} from "./metadata"
5
+ import {checkNullableObject} from "./nullable"
6
+ import {typeErrorMessage, typeErrorParams, _JTDTypeError} from "./error"
7
+ import {DiscrError, DiscrErrorObj} from "../discriminator/types"
8
+
9
+ export type JTDDiscriminatorError =
10
+ | _JTDTypeError<"discriminator", "object", string>
11
+ | DiscrErrorObj<DiscrError.Tag>
12
+ | DiscrErrorObj<DiscrError.Mapping>
13
+
14
+ const error: KeywordErrorDefinition = {
15
+ message: (cxt) => {
16
+ const {schema, params} = cxt
17
+ return params.discrError
18
+ ? params.discrError === DiscrError.Tag
19
+ ? `tag "${schema}" must be string`
20
+ : `value of tag "${schema}" must be in mapping`
21
+ : typeErrorMessage(cxt, "object")
22
+ },
23
+ params: (cxt) => {
24
+ const {schema, params} = cxt
25
+ return params.discrError
26
+ ? _`{error: ${params.discrError}, tag: ${schema}, tagValue: ${params.tag}}`
27
+ : typeErrorParams(cxt, "object")
28
+ },
29
+ }
30
+
31
+ const def: CodeKeywordDefinition = {
32
+ keyword: "discriminator",
33
+ schemaType: "string",
34
+ implements: ["mapping"],
35
+ error,
36
+ code(cxt: KeywordCxt) {
37
+ checkMetadata(cxt)
38
+ const {gen, data, schema, parentSchema} = cxt
39
+ const [valid, cond] = checkNullableObject(cxt, data)
40
+
41
+ gen.if(cond)
42
+ validateDiscriminator()
43
+ gen.elseIf(not(valid))
44
+ cxt.error()
45
+ gen.endIf()
46
+ cxt.ok(valid)
47
+
48
+ function validateDiscriminator(): void {
49
+ const tag = gen.const("tag", _`${data}${getProperty(schema)}`)
50
+ gen.if(_`${tag} === undefined`)
51
+ cxt.error(false, {discrError: DiscrError.Tag, tag})
52
+ gen.elseIf(_`typeof ${tag} == "string"`)
53
+ validateMapping(tag)
54
+ gen.else()
55
+ cxt.error(false, {discrError: DiscrError.Tag, tag}, {instancePath: schema})
56
+ gen.endIf()
57
+ }
58
+
59
+ function validateMapping(tag: Name): void {
60
+ gen.if(false)
61
+ for (const tagValue in parentSchema.mapping) {
62
+ gen.elseIf(_`${tag} === ${tagValue}`)
63
+ gen.assign(valid, applyTagSchema(tagValue))
64
+ }
65
+ gen.else()
66
+ cxt.error(
67
+ false,
68
+ {discrError: DiscrError.Mapping, tag},
69
+ {instancePath: schema, schemaPath: "mapping", parentSchema: true}
70
+ )
71
+ gen.endIf()
72
+ }
73
+
74
+ function applyTagSchema(schemaProp: string): Name {
75
+ const _valid = gen.name("valid")
76
+ cxt.subschema(
77
+ {
78
+ keyword: "mapping",
79
+ schemaProp,
80
+ jtdDiscriminator: schema,
81
+ },
82
+ _valid
83
+ )
84
+ return _valid
85
+ }
86
+ },
87
+ }
88
+
89
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/elements.ts CHANGED
@@ -1,3 +1,32 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:54c00bc71c6bc0f5055c49fa0b6803db07832e5f77aadb1e55e5e045b3a4ad33
3
- size 976
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, SchemaObject} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {alwaysValidSchema} from "../../compile/util"
4
+ import {validateArray} from "../code"
5
+ import {_, not} from "../../compile/codegen"
6
+ import {checkMetadata} from "./metadata"
7
+ import {checkNullable} from "./nullable"
8
+ import {typeError, _JTDTypeError} from "./error"
9
+
10
+ export type JTDElementsError = _JTDTypeError<"elements", "array", SchemaObject>
11
+
12
+ const def: CodeKeywordDefinition = {
13
+ keyword: "elements",
14
+ schemaType: "object",
15
+ error: typeError("array"),
16
+ code(cxt: KeywordCxt) {
17
+ checkMetadata(cxt)
18
+ const {gen, data, schema, it} = cxt
19
+ if (alwaysValidSchema(it, schema)) return
20
+ const [valid] = checkNullable(cxt)
21
+ gen.if(not(valid), () =>
22
+ gen.if(
23
+ _`Array.isArray(${data})`,
24
+ () => gen.assign(valid, validateArray(cxt)),
25
+ () => cxt.error()
26
+ )
27
+ )
28
+ cxt.ok(valid)
29
+ },
30
+ }
31
+
32
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/enum.ts CHANGED
@@ -1,3 +1,45 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:a55ae1c6b7d9ac0e9053e71da407efe41b3156cc0db7091bcd20a9d8897844dd
3
- size 1627
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, KeywordErrorDefinition, ErrorObject} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {_, or, and, Code} from "../../compile/codegen"
4
+ import {checkMetadata} from "./metadata"
5
+ import {checkNullable} from "./nullable"
6
+
7
+ export type JTDEnumError = ErrorObject<"enum", {allowedValues: string[]}, string[]>
8
+
9
+ const error: KeywordErrorDefinition = {
10
+ message: "must be equal to one of the allowed values",
11
+ params: ({schemaCode}) => _`{allowedValues: ${schemaCode}}`,
12
+ }
13
+
14
+ const def: CodeKeywordDefinition = {
15
+ keyword: "enum",
16
+ schemaType: "array",
17
+ error,
18
+ code(cxt: KeywordCxt) {
19
+ checkMetadata(cxt)
20
+ const {gen, data, schema, schemaValue, parentSchema, it} = cxt
21
+ if (schema.length === 0) throw new Error("enum must have non-empty array")
22
+ if (schema.length !== new Set(schema).size) throw new Error("enum items must be unique")
23
+ let valid: Code
24
+ const isString = _`typeof ${data} == "string"`
25
+ if (schema.length >= it.opts.loopEnum) {
26
+ let cond: Code
27
+ ;[valid, cond] = checkNullable(cxt, isString)
28
+ gen.if(cond, loopEnum)
29
+ } else {
30
+ /* istanbul ignore if */
31
+ if (!Array.isArray(schema)) throw new Error("ajv implementation error")
32
+ valid = and(isString, or(...schema.map((value: string) => _`${data} === ${value}`)))
33
+ if (parentSchema.nullable) valid = or(_`${data} === null`, valid)
34
+ }
35
+ cxt.pass(valid)
36
+
37
+ function loopEnum(): void {
38
+ gen.forOf("v", schemaValue as Code, (v) =>
39
+ gen.if(_`${valid} = ${data} === ${v}`, () => gen.break())
40
+ )
41
+ }
42
+ },
43
+ }
44
+
45
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/error.ts CHANGED
@@ -1,3 +1,23 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:e1bdb9dfada76ee42308e134f2e74027ea8398997961a3bae08cd10c792272c5
3
- size 746
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {KeywordErrorDefinition, KeywordErrorCxt, ErrorObject} from "../../types"
2
+ import {_, Code} from "../../compile/codegen"
3
+
4
+ export type _JTDTypeError<K extends string, T extends string, S> = ErrorObject<
5
+ K,
6
+ {type: T; nullable: boolean},
7
+ S
8
+ >
9
+
10
+ export function typeError(t: string): KeywordErrorDefinition {
11
+ return {
12
+ message: (cxt) => typeErrorMessage(cxt, t),
13
+ params: (cxt) => typeErrorParams(cxt, t),
14
+ }
15
+ }
16
+
17
+ export function typeErrorMessage({parentSchema}: KeywordErrorCxt, t: string): string {
18
+ return parentSchema?.nullable ? `must be ${t} or null` : `must be ${t}`
19
+ }
20
+
21
+ export function typeErrorParams({parentSchema}: KeywordErrorCxt, t: string): Code {
22
+ return _`{type: ${t}, nullable: ${!!parentSchema?.nullable}}`
23
+ }
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/index.ts CHANGED
@@ -1,3 +1,37 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4ca3295374abddb3c03ada3fdc52b9b7cb175046769a3eef60605bef8a6ef85a
3
- size 1007
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {Vocabulary} from "../../types"
2
+ import refKeyword from "./ref"
3
+ import typeKeyword, {JTDTypeError} from "./type"
4
+ import enumKeyword, {JTDEnumError} from "./enum"
5
+ import elements, {JTDElementsError} from "./elements"
6
+ import properties, {JTDPropertiesError} from "./properties"
7
+ import optionalProperties from "./optionalProperties"
8
+ import discriminator, {JTDDiscriminatorError} from "./discriminator"
9
+ import values, {JTDValuesError} from "./values"
10
+ import union from "./union"
11
+ import metadata from "./metadata"
12
+
13
+ const jtdVocabulary: Vocabulary = [
14
+ "definitions",
15
+ refKeyword,
16
+ typeKeyword,
17
+ enumKeyword,
18
+ elements,
19
+ properties,
20
+ optionalProperties,
21
+ discriminator,
22
+ values,
23
+ union,
24
+ metadata,
25
+ {keyword: "additionalProperties", schemaType: "boolean"},
26
+ {keyword: "nullable", schemaType: "boolean"},
27
+ ]
28
+
29
+ export default jtdVocabulary
30
+
31
+ export type JTDErrorObject =
32
+ | JTDTypeError
33
+ | JTDEnumError
34
+ | JTDElementsError
35
+ | JTDPropertiesError
36
+ | JTDDiscriminatorError
37
+ | JTDValuesError
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/metadata.ts CHANGED
@@ -1,3 +1,24 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:558fcb3d3b5e39a9a967326ea6a35160bd485755d587c5faafb644e25d0c0f01
3
- size 716
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {KeywordCxt} from "../../ajv"
2
+ import type {CodeKeywordDefinition} from "../../types"
3
+ import {alwaysValidSchema} from "../../compile/util"
4
+
5
+ const def: CodeKeywordDefinition = {
6
+ keyword: "metadata",
7
+ schemaType: "object",
8
+ code(cxt: KeywordCxt) {
9
+ checkMetadata(cxt)
10
+ const {gen, schema, it} = cxt
11
+ if (alwaysValidSchema(it, schema)) return
12
+ const valid = gen.name("valid")
13
+ cxt.subschema({keyword: "metadata", jtdMetadata: true}, valid)
14
+ cxt.ok(valid)
15
+ },
16
+ }
17
+
18
+ export function checkMetadata({it, keyword}: KeywordCxt, metadata?: boolean): void {
19
+ if (it.jtdMetadata !== metadata) {
20
+ throw new Error(`JTD: "${keyword}" cannot be used in this schema location`)
21
+ }
22
+ }
23
+
24
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/nullable.ts CHANGED
@@ -1,3 +1,21 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:75b370cb5ad4c36ff85a57fb9305a8018b5363666f0a5ac21c8de99d984b6bb8
3
- size 649
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {KeywordCxt} from "../../compile/validate"
2
+ import {_, not, nil, Code, Name} from "../../compile/codegen"
3
+
4
+ export function checkNullable(
5
+ {gen, data, parentSchema}: KeywordCxt,
6
+ cond: Code = nil
7
+ ): [Name, Code] {
8
+ const valid = gen.name("valid")
9
+ if (parentSchema.nullable) {
10
+ gen.let(valid, _`${data} === null`)
11
+ cond = not(valid)
12
+ } else {
13
+ gen.let(valid, false)
14
+ }
15
+ return [valid, cond]
16
+ }
17
+
18
+ export function checkNullableObject(cxt: KeywordCxt, cond: Code): [Name, Code] {
19
+ const [valid, cond_] = checkNullable(cxt, cond)
20
+ return [valid, _`${cond_} && typeof ${cxt.data} == "object" && !Array.isArray(${cxt.data})`]
21
+ }
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts CHANGED
@@ -1,3 +1,15 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:03fdaf041fd433857e78c3b867ad1e6c1f0a964c0292498981e238b40a2a4e77
3
- size 394
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {validateProperties, error} from "./properties"
4
+
5
+ const def: CodeKeywordDefinition = {
6
+ keyword: "optionalProperties",
7
+ schemaType: "object",
8
+ error,
9
+ code(cxt: KeywordCxt) {
10
+ if (cxt.parentSchema.properties) return
11
+ validateProperties(cxt)
12
+ },
13
+ }
14
+
15
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/properties.ts CHANGED
@@ -1,3 +1,184 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:930071681288045214e10af6065f5d6c7f6ea599d07c607f345b609bac4bf8e5
3
- size 6244
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {
2
+ CodeKeywordDefinition,
3
+ ErrorObject,
4
+ KeywordErrorDefinition,
5
+ SchemaObject,
6
+ } from "../../types"
7
+ import type {KeywordCxt} from "../../compile/validate"
8
+ import {propertyInData, allSchemaProperties, isOwnProperty} from "../code"
9
+ import {alwaysValidSchema, schemaRefOrVal} from "../../compile/util"
10
+ import {_, and, not, Code, Name} from "../../compile/codegen"
11
+ import {checkMetadata} from "./metadata"
12
+ import {checkNullableObject} from "./nullable"
13
+ import {typeErrorMessage, typeErrorParams, _JTDTypeError} from "./error"
14
+
15
+ enum PropError {
16
+ Additional = "additional",
17
+ Missing = "missing",
18
+ }
19
+
20
+ type PropKeyword = "properties" | "optionalProperties"
21
+
22
+ type PropSchema = {[P in string]?: SchemaObject}
23
+
24
+ export type JTDPropertiesError =
25
+ | _JTDTypeError<PropKeyword, "object", PropSchema>
26
+ | ErrorObject<PropKeyword, {error: PropError.Additional; additionalProperty: string}, PropSchema>
27
+ | ErrorObject<PropKeyword, {error: PropError.Missing; missingProperty: string}, PropSchema>
28
+
29
+ export const error: KeywordErrorDefinition = {
30
+ message: (cxt) => {
31
+ const {params} = cxt
32
+ return params.propError
33
+ ? params.propError === PropError.Additional
34
+ ? "must NOT have additional properties"
35
+ : `must have property '${params.missingProperty}'`
36
+ : typeErrorMessage(cxt, "object")
37
+ },
38
+ params: (cxt) => {
39
+ const {params} = cxt
40
+ return params.propError
41
+ ? params.propError === PropError.Additional
42
+ ? _`{error: ${params.propError}, additionalProperty: ${params.additionalProperty}}`
43
+ : _`{error: ${params.propError}, missingProperty: ${params.missingProperty}}`
44
+ : typeErrorParams(cxt, "object")
45
+ },
46
+ }
47
+
48
+ const def: CodeKeywordDefinition = {
49
+ keyword: "properties",
50
+ schemaType: "object",
51
+ error,
52
+ code: validateProperties,
53
+ }
54
+
55
+ // const error: KeywordErrorDefinition = {
56
+ // message: "should NOT have additional properties",
57
+ // params: ({params}) => _`{additionalProperty: ${params.additionalProperty}}`,
58
+ // }
59
+
60
+ export function validateProperties(cxt: KeywordCxt): void {
61
+ checkMetadata(cxt)
62
+ const {gen, data, parentSchema, it} = cxt
63
+ const {additionalProperties, nullable} = parentSchema
64
+ if (it.jtdDiscriminator && nullable) throw new Error("JTD: nullable inside discriminator mapping")
65
+ if (commonProperties()) {
66
+ throw new Error("JTD: properties and optionalProperties have common members")
67
+ }
68
+ const [allProps, properties] = schemaProperties("properties")
69
+ const [allOptProps, optProperties] = schemaProperties("optionalProperties")
70
+ if (properties.length === 0 && optProperties.length === 0 && additionalProperties) {
71
+ return
72
+ }
73
+
74
+ const [valid, cond] =
75
+ it.jtdDiscriminator === undefined
76
+ ? checkNullableObject(cxt, data)
77
+ : [gen.let("valid", false), true]
78
+ gen.if(cond, () =>
79
+ gen.assign(valid, true).block(() => {
80
+ validateProps(properties, "properties", true)
81
+ validateProps(optProperties, "optionalProperties")
82
+ if (!additionalProperties) validateAdditional()
83
+ })
84
+ )
85
+ cxt.pass(valid)
86
+
87
+ function commonProperties(): boolean {
88
+ const props = parentSchema.properties as Record<string, any> | undefined
89
+ const optProps = parentSchema.optionalProperties as Record<string, any> | undefined
90
+ if (!(props && optProps)) return false
91
+ for (const p in props) {
92
+ if (Object.prototype.hasOwnProperty.call(optProps, p)) return true
93
+ }
94
+ return false
95
+ }
96
+
97
+ function schemaProperties(keyword: string): [string[], string[]] {
98
+ const schema = parentSchema[keyword]
99
+ const allPs = schema ? allSchemaProperties(schema) : []
100
+ if (it.jtdDiscriminator && allPs.some((p) => p === it.jtdDiscriminator)) {
101
+ throw new Error(`JTD: discriminator tag used in ${keyword}`)
102
+ }
103
+ const ps = allPs.filter((p) => !alwaysValidSchema(it, schema[p]))
104
+ return [allPs, ps]
105
+ }
106
+
107
+ function validateProps(props: string[], keyword: string, required?: boolean): void {
108
+ const _valid = gen.var("valid")
109
+ for (const prop of props) {
110
+ gen.if(
111
+ propertyInData(gen, data, prop, it.opts.ownProperties),
112
+ () => applyPropertySchema(prop, keyword, _valid),
113
+ () => missingProperty(prop)
114
+ )
115
+ cxt.ok(_valid)
116
+ }
117
+
118
+ function missingProperty(prop: string): void {
119
+ if (required) {
120
+ gen.assign(_valid, false)
121
+ cxt.error(false, {propError: PropError.Missing, missingProperty: prop}, {schemaPath: prop})
122
+ } else {
123
+ gen.assign(_valid, true)
124
+ }
125
+ }
126
+ }
127
+
128
+ function applyPropertySchema(prop: string, keyword: string, _valid: Name): void {
129
+ cxt.subschema(
130
+ {
131
+ keyword,
132
+ schemaProp: prop,
133
+ dataProp: prop,
134
+ },
135
+ _valid
136
+ )
137
+ }
138
+
139
+ function validateAdditional(): void {
140
+ gen.forIn("key", data, (key: Name) => {
141
+ const addProp = isAdditional(key, allProps, "properties", it.jtdDiscriminator)
142
+ const addOptProp = isAdditional(key, allOptProps, "optionalProperties")
143
+ const extra =
144
+ addProp === true ? addOptProp : addOptProp === true ? addProp : and(addProp, addOptProp)
145
+ gen.if(extra, () => {
146
+ if (it.opts.removeAdditional) {
147
+ gen.code(_`delete ${data}[${key}]`)
148
+ } else {
149
+ cxt.error(
150
+ false,
151
+ {propError: PropError.Additional, additionalProperty: key},
152
+ {instancePath: key, parentSchema: true}
153
+ )
154
+ if (!it.opts.allErrors) gen.break()
155
+ }
156
+ })
157
+ })
158
+ }
159
+
160
+ function isAdditional(
161
+ key: Name,
162
+ props: string[],
163
+ keyword: string,
164
+ jtdDiscriminator?: string
165
+ ): Code | true {
166
+ let additional: Code | boolean
167
+ if (props.length > 8) {
168
+ // TODO maybe an option instead of hard-coded 8?
169
+ const propsSchema = schemaRefOrVal(it, parentSchema[keyword], keyword)
170
+ additional = not(isOwnProperty(gen, propsSchema as Code, key))
171
+ if (jtdDiscriminator !== undefined) {
172
+ additional = and(additional, _`${key} !== ${jtdDiscriminator}`)
173
+ }
174
+ } else if (props.length || jtdDiscriminator !== undefined) {
175
+ const ps = jtdDiscriminator === undefined ? props : [jtdDiscriminator].concat(props)
176
+ additional = and(...ps.map((p) => _`${key} !== ${p}`))
177
+ } else {
178
+ additional = true
179
+ }
180
+ return additional
181
+ }
182
+ }
183
+
184
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/ref.ts CHANGED
@@ -1,3 +1,76 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:f7dc8a31ad5764cc0c44725713130d5b656ead77483429226507da4dfd24ad2d
3
- size 2346
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, AnySchemaObject} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {compileSchema, SchemaEnv} from "../../compile"
4
+ import {_, not, nil, stringify} from "../../compile/codegen"
5
+ import MissingRefError from "../../compile/ref_error"
6
+ import N from "../../compile/names"
7
+ import {getValidate, callRef} from "../core/ref"
8
+ import {checkMetadata} from "./metadata"
9
+
10
+ const def: CodeKeywordDefinition = {
11
+ keyword: "ref",
12
+ schemaType: "string",
13
+ code(cxt: KeywordCxt) {
14
+ checkMetadata(cxt)
15
+ const {gen, data, schema: ref, parentSchema, it} = cxt
16
+ const {
17
+ schemaEnv: {root},
18
+ } = it
19
+ const valid = gen.name("valid")
20
+ if (parentSchema.nullable) {
21
+ gen.var(valid, _`${data} === null`)
22
+ gen.if(not(valid), validateJtdRef)
23
+ } else {
24
+ gen.var(valid, false)
25
+ validateJtdRef()
26
+ }
27
+ cxt.ok(valid)
28
+
29
+ function validateJtdRef(): void {
30
+ const refSchema = (root.schema as AnySchemaObject).definitions?.[ref]
31
+ if (!refSchema) {
32
+ throw new MissingRefError(it.opts.uriResolver, "", ref, `No definition ${ref}`)
33
+ }
34
+ if (hasRef(refSchema) || !it.opts.inlineRefs) callValidate(refSchema)
35
+ else inlineRefSchema(refSchema)
36
+ }
37
+
38
+ function callValidate(schema: AnySchemaObject): void {
39
+ const sch = compileSchema.call(
40
+ it.self,
41
+ new SchemaEnv({schema, root, schemaPath: `/definitions/${ref}`})
42
+ )
43
+ const v = getValidate(cxt, sch)
44
+ const errsCount = gen.const("_errs", N.errors)
45
+ callRef(cxt, v, sch, sch.$async)
46
+ gen.assign(valid, _`${errsCount} === ${N.errors}`)
47
+ }
48
+
49
+ function inlineRefSchema(schema: AnySchemaObject): void {
50
+ const schName = gen.scopeValue(
51
+ "schema",
52
+ it.opts.code.source === true ? {ref: schema, code: stringify(schema)} : {ref: schema}
53
+ )
54
+ cxt.subschema(
55
+ {
56
+ schema,
57
+ dataTypes: [],
58
+ schemaPath: nil,
59
+ topSchemaRef: schName,
60
+ errSchemaPath: `/definitions/${ref}`,
61
+ },
62
+ valid
63
+ )
64
+ }
65
+ },
66
+ }
67
+
68
+ export function hasRef(schema: AnySchemaObject): boolean {
69
+ for (const key in schema) {
70
+ let sch: AnySchemaObject
71
+ if (key === "ref" || (typeof (sch = schema[key]) == "object" && hasRef(sch))) return true
72
+ }
73
+ return false
74
+ }
75
+
76
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/type.ts CHANGED
@@ -1,3 +1,75 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:0e6c6bb43fa81bff1cb4ba3f4d6d73379f3e013efaa01b790768fa0a5095cd45
3
- size 2547
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, KeywordErrorDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {_, nil, or, Code} from "../../compile/codegen"
4
+ import validTimestamp from "../../runtime/timestamp"
5
+ import {useFunc} from "../../compile/util"
6
+ import {checkMetadata} from "./metadata"
7
+ import {typeErrorMessage, typeErrorParams, _JTDTypeError} from "./error"
8
+
9
+ export type JTDTypeError = _JTDTypeError<"type", JTDType, JTDType>
10
+
11
+ export type IntType = "int8" | "uint8" | "int16" | "uint16" | "int32" | "uint32"
12
+
13
+ export const intRange: {[T in IntType]: [number, number, number]} = {
14
+ int8: [-128, 127, 3],
15
+ uint8: [0, 255, 3],
16
+ int16: [-32768, 32767, 5],
17
+ uint16: [0, 65535, 5],
18
+ int32: [-2147483648, 2147483647, 10],
19
+ uint32: [0, 4294967295, 10],
20
+ }
21
+
22
+ export type JTDType = "boolean" | "string" | "timestamp" | "float32" | "float64" | IntType
23
+
24
+ const error: KeywordErrorDefinition = {
25
+ message: (cxt) => typeErrorMessage(cxt, cxt.schema),
26
+ params: (cxt) => typeErrorParams(cxt, cxt.schema),
27
+ }
28
+
29
+ function timestampCode(cxt: KeywordCxt): Code {
30
+ const {gen, data, it} = cxt
31
+ const {timestamp, allowDate} = it.opts
32
+ if (timestamp === "date") return _`${data} instanceof Date `
33
+ const vts = useFunc(gen, validTimestamp)
34
+ const allowDateArg = allowDate ? _`, true` : nil
35
+ const validString = _`typeof ${data} == "string" && ${vts}(${data}${allowDateArg})`
36
+ return timestamp === "string" ? validString : or(_`${data} instanceof Date`, validString)
37
+ }
38
+
39
+ const def: CodeKeywordDefinition = {
40
+ keyword: "type",
41
+ schemaType: "string",
42
+ error,
43
+ code(cxt: KeywordCxt) {
44
+ checkMetadata(cxt)
45
+ const {data, schema, parentSchema, it} = cxt
46
+ let cond: Code
47
+ switch (schema) {
48
+ case "boolean":
49
+ case "string":
50
+ cond = _`typeof ${data} == ${schema}`
51
+ break
52
+ case "timestamp": {
53
+ cond = timestampCode(cxt)
54
+ break
55
+ }
56
+ case "float32":
57
+ case "float64":
58
+ cond = _`typeof ${data} == "number"`
59
+ break
60
+ default: {
61
+ const sch = schema as IntType
62
+ cond = _`typeof ${data} == "number" && isFinite(${data}) && !(${data} % 1)`
63
+ if (!it.opts.int32range && (sch === "int32" || sch === "uint32")) {
64
+ if (sch === "uint32") cond = _`${cond} && ${data} >= 0`
65
+ } else {
66
+ const [min, max] = intRange[sch]
67
+ cond = _`${cond} && ${data} >= ${min} && ${data} <= ${max}`
68
+ }
69
+ }
70
+ }
71
+ cxt.pass(parentSchema.nullable ? or(_`${data} === null`, cond) : cond)
72
+ },
73
+ }
74
+
75
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/union.ts CHANGED
@@ -1,3 +1,12 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1dd265ce69eebbd46cd395b0b9d98ca22d8e681d0ab787e6409cb126450c9536
3
- size 292
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition} from "../../types"
2
+ import {validateUnion} from "../code"
3
+
4
+ const def: CodeKeywordDefinition = {
5
+ keyword: "union",
6
+ schemaType: "array",
7
+ trackErrors: true,
8
+ code: validateUnion,
9
+ error: {message: "must match a schema in union"},
10
+ }
11
+
12
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/jtd/values.ts CHANGED
@@ -1,3 +1,58 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:86236891ca9a9f77f7df5d399be026406d0f375c0a5d8f6d0749859dea245cdd
3
- size 1681
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, SchemaObject} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {alwaysValidSchema, Type} from "../../compile/util"
4
+ import {not, or, Name} from "../../compile/codegen"
5
+ import {checkMetadata} from "./metadata"
6
+ import {checkNullableObject} from "./nullable"
7
+ import {typeError, _JTDTypeError} from "./error"
8
+
9
+ export type JTDValuesError = _JTDTypeError<"values", "object", SchemaObject>
10
+
11
+ const def: CodeKeywordDefinition = {
12
+ keyword: "values",
13
+ schemaType: "object",
14
+ error: typeError("object"),
15
+ code(cxt: KeywordCxt) {
16
+ checkMetadata(cxt)
17
+ const {gen, data, schema, it} = cxt
18
+ const [valid, cond] = checkNullableObject(cxt, data)
19
+ if (alwaysValidSchema(it, schema)) {
20
+ gen.if(not(or(cond, valid)), () => cxt.error())
21
+ } else {
22
+ gen.if(cond)
23
+ gen.assign(valid, validateMap())
24
+ gen.elseIf(not(valid))
25
+ cxt.error()
26
+ gen.endIf()
27
+ }
28
+ cxt.ok(valid)
29
+
30
+ function validateMap(): Name | boolean {
31
+ const _valid = gen.name("valid")
32
+ if (it.allErrors) {
33
+ const validMap = gen.let("valid", true)
34
+ validateValues(() => gen.assign(validMap, false))
35
+ return validMap
36
+ }
37
+ gen.var(_valid, true)
38
+ validateValues(() => gen.break())
39
+ return _valid
40
+
41
+ function validateValues(notValid: () => void): void {
42
+ gen.forIn("key", data, (key) => {
43
+ cxt.subschema(
44
+ {
45
+ keyword: "values",
46
+ dataProp: key,
47
+ dataPropType: Type.Str,
48
+ },
49
+ _valid
50
+ )
51
+ gen.if(not(_valid), notValid)
52
+ })
53
+ }
54
+ }
55
+ },
56
+ }
57
+
58
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/metadata.ts CHANGED
@@ -1,3 +1,17 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:a0b32538e6d2c93c7fd10aef9963d990d24d9579d2494350a23f3501300817d1
3
- size 304
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {Vocabulary} from "../types"
2
+
3
+ export const metadataVocabulary: Vocabulary = [
4
+ "title",
5
+ "description",
6
+ "default",
7
+ "deprecated",
8
+ "readOnly",
9
+ "writeOnly",
10
+ "examples",
11
+ ]
12
+
13
+ export const contentVocabulary: Vocabulary = [
14
+ "contentMediaType",
15
+ "contentEncoding",
16
+ "contentSchema",
17
+ ]
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/next.ts CHANGED
@@ -1,3 +1,8 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b953c63e395e4e0c95e048ae8778473a744e1d7a7b5fa8c57733c1bfbf7ce443
3
- size 320
 
 
 
 
 
 
1
+ import type {Vocabulary} from "../types"
2
+ import dependentRequired from "./validation/dependentRequired"
3
+ import dependentSchemas from "./applicator/dependentSchemas"
4
+ import limitContains from "./validation/limitContains"
5
+
6
+ const next: Vocabulary = [dependentRequired, dependentSchemas, limitContains]
7
+
8
+ export default next
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/unevaluated/index.ts CHANGED
@@ -1,3 +1,7 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:0d44afd298469f01304d72a5cf7da11303367fa506200c46785cee4bd3350f40
3
- size 257
 
 
 
 
 
1
+ import type {Vocabulary} from "../../types"
2
+ import unevaluatedProperties from "./unevaluatedProperties"
3
+ import unevaluatedItems from "./unevaluatedItems"
4
+
5
+ const unevaluated: Vocabulary = [unevaluatedProperties, unevaluatedItems]
6
+
7
+ export default unevaluated
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts CHANGED
@@ -1,3 +1,47 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c19c3d3e0b290171f674d3dbacc52d946f9e4325f2223355a055e741c5dbbbb2
3
- size 1524
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {
2
+ CodeKeywordDefinition,
3
+ ErrorObject,
4
+ KeywordErrorDefinition,
5
+ AnySchema,
6
+ } from "../../types"
7
+ import type {KeywordCxt} from "../../compile/validate"
8
+ import {_, str, not, Name} from "../../compile/codegen"
9
+ import {alwaysValidSchema, Type} from "../../compile/util"
10
+
11
+ export type UnevaluatedItemsError = ErrorObject<"unevaluatedItems", {limit: number}, AnySchema>
12
+
13
+ const error: KeywordErrorDefinition = {
14
+ message: ({params: {len}}) => str`must NOT have more than ${len} items`,
15
+ params: ({params: {len}}) => _`{limit: ${len}}`,
16
+ }
17
+
18
+ const def: CodeKeywordDefinition = {
19
+ keyword: "unevaluatedItems",
20
+ type: "array",
21
+ schemaType: ["boolean", "object"],
22
+ error,
23
+ code(cxt: KeywordCxt) {
24
+ const {gen, schema, data, it} = cxt
25
+ const items = it.items || 0
26
+ if (items === true) return
27
+ const len = gen.const("len", _`${data}.length`)
28
+ if (schema === false) {
29
+ cxt.setParams({len: items})
30
+ cxt.fail(_`${len} > ${items}`)
31
+ } else if (typeof schema == "object" && !alwaysValidSchema(it, schema)) {
32
+ const valid = gen.var("valid", _`${len} <= ${items}`)
33
+ gen.if(not(valid), () => validateItems(valid, items))
34
+ cxt.ok(valid)
35
+ }
36
+ it.items = true
37
+
38
+ function validateItems(valid: Name, from: Name | number): void {
39
+ gen.forRange("i", from, len, (i) => {
40
+ cxt.subschema({keyword: "unevaluatedItems", dataProp: i, dataPropType: Type.Num}, valid)
41
+ if (!it.allErrors) gen.if(not(valid), () => gen.break())
42
+ })
43
+ }
44
+ },
45
+ }
46
+
47
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts CHANGED
@@ -1,3 +1,85 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:7d725ffb348774d31cc697cc6b632a43431b3d2d92edb819fd7341902340c6de
3
- size 2440
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {
2
+ CodeKeywordDefinition,
3
+ KeywordErrorDefinition,
4
+ ErrorObject,
5
+ AnySchema,
6
+ } from "../../types"
7
+ import {_, not, and, Name, Code} from "../../compile/codegen"
8
+ import {alwaysValidSchema, Type} from "../../compile/util"
9
+ import N from "../../compile/names"
10
+
11
+ export type UnevaluatedPropertiesError = ErrorObject<
12
+ "unevaluatedProperties",
13
+ {unevaluatedProperty: string},
14
+ AnySchema
15
+ >
16
+
17
+ const error: KeywordErrorDefinition = {
18
+ message: "must NOT have unevaluated properties",
19
+ params: ({params}) => _`{unevaluatedProperty: ${params.unevaluatedProperty}}`,
20
+ }
21
+
22
+ const def: CodeKeywordDefinition = {
23
+ keyword: "unevaluatedProperties",
24
+ type: "object",
25
+ schemaType: ["boolean", "object"],
26
+ trackErrors: true,
27
+ error,
28
+ code(cxt) {
29
+ const {gen, schema, data, errsCount, it} = cxt
30
+ /* istanbul ignore if */
31
+ if (!errsCount) throw new Error("ajv implementation error")
32
+ const {allErrors, props} = it
33
+ if (props instanceof Name) {
34
+ gen.if(_`${props} !== true`, () =>
35
+ gen.forIn("key", data, (key: Name) =>
36
+ gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))
37
+ )
38
+ )
39
+ } else if (props !== true) {
40
+ gen.forIn("key", data, (key: Name) =>
41
+ props === undefined
42
+ ? unevaluatedPropCode(key)
43
+ : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key))
44
+ )
45
+ }
46
+ it.props = true
47
+ cxt.ok(_`${errsCount} === ${N.errors}`)
48
+
49
+ function unevaluatedPropCode(key: Name): void {
50
+ if (schema === false) {
51
+ cxt.setParams({unevaluatedProperty: key})
52
+ cxt.error()
53
+ if (!allErrors) gen.break()
54
+ return
55
+ }
56
+
57
+ if (!alwaysValidSchema(it, schema)) {
58
+ const valid = gen.name("valid")
59
+ cxt.subschema(
60
+ {
61
+ keyword: "unevaluatedProperties",
62
+ dataProp: key,
63
+ dataPropType: Type.Str,
64
+ },
65
+ valid
66
+ )
67
+ if (!allErrors) gen.if(not(valid), () => gen.break())
68
+ }
69
+ }
70
+
71
+ function unevaluatedDynamic(evaluatedProps: Name, key: Name): Code {
72
+ return _`!${evaluatedProps} || !${evaluatedProps}[${key}]`
73
+ }
74
+
75
+ function unevaluatedStatic(evaluatedProps: {[K in string]?: true}, key: Name): Code {
76
+ const ps: Code[] = []
77
+ for (const p in evaluatedProps) {
78
+ if (evaluatedProps[p] === true) ps.push(_`${key} !== ${p}`)
79
+ }
80
+ return and(...ps)
81
+ }
82
+ },
83
+ }
84
+
85
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/const.ts CHANGED
@@ -1,3 +1,28 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9dc3c40d6260158b2ee34dadadbc0e738cad939fc725cc1d2f5120bd43768ed5
3
- size 863
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {_} from "../../compile/codegen"
4
+ import {useFunc} from "../../compile/util"
5
+ import equal from "../../runtime/equal"
6
+
7
+ export type ConstError = ErrorObject<"const", {allowedValue: any}>
8
+
9
+ const error: KeywordErrorDefinition = {
10
+ message: "must be equal to constant",
11
+ params: ({schemaCode}) => _`{allowedValue: ${schemaCode}}`,
12
+ }
13
+
14
+ const def: CodeKeywordDefinition = {
15
+ keyword: "const",
16
+ $data: true,
17
+ error,
18
+ code(cxt: KeywordCxt) {
19
+ const {gen, data, $data, schemaCode, schema} = cxt
20
+ if ($data || (schema && typeof schema == "object")) {
21
+ cxt.fail$data(_`!${useFunc(gen, equal)}(${data}, ${schemaCode})`)
22
+ } else {
23
+ cxt.fail(_`${schema} !== ${data}`)
24
+ }
25
+ },
26
+ }
27
+
28
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts CHANGED
@@ -1,3 +1,23 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:082d569e899aca88dbe28bdf6a0c6c2efa120e107fe4d1244ecf3a0b17fef45b
3
- size 510
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, ErrorObject} from "../../types"
2
+ import {
3
+ validatePropertyDeps,
4
+ error,
5
+ DependenciesErrorParams,
6
+ PropertyDependencies,
7
+ } from "../applicator/dependencies"
8
+
9
+ export type DependentRequiredError = ErrorObject<
10
+ "dependentRequired",
11
+ DependenciesErrorParams,
12
+ PropertyDependencies
13
+ >
14
+
15
+ const def: CodeKeywordDefinition = {
16
+ keyword: "dependentRequired",
17
+ type: "object",
18
+ schemaType: "object",
19
+ error,
20
+ code: (cxt) => validatePropertyDeps(cxt),
21
+ }
22
+
23
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/enum.ts CHANGED
@@ -1,3 +1,54 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:f62f760dda52c2dbc053ef7b7012aa9db10d3af65e8b1dc5defcaf2ba9c25911
3
- size 1837
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {_, or, Name, Code} from "../../compile/codegen"
4
+ import {useFunc} from "../../compile/util"
5
+ import equal from "../../runtime/equal"
6
+
7
+ export type EnumError = ErrorObject<"enum", {allowedValues: any[]}, any[] | {$data: string}>
8
+
9
+ const error: KeywordErrorDefinition = {
10
+ message: "must be equal to one of the allowed values",
11
+ params: ({schemaCode}) => _`{allowedValues: ${schemaCode}}`,
12
+ }
13
+
14
+ const def: CodeKeywordDefinition = {
15
+ keyword: "enum",
16
+ schemaType: "array",
17
+ $data: true,
18
+ error,
19
+ code(cxt: KeywordCxt) {
20
+ const {gen, data, $data, schema, schemaCode, it} = cxt
21
+ if (!$data && schema.length === 0) throw new Error("enum must have non-empty array")
22
+ const useLoop = schema.length >= it.opts.loopEnum
23
+ let eql: Name | undefined
24
+ const getEql = (): Name => (eql ??= useFunc(gen, equal))
25
+
26
+ let valid: Code
27
+ if (useLoop || $data) {
28
+ valid = gen.let("valid")
29
+ cxt.block$data(valid, loopEnum)
30
+ } else {
31
+ /* istanbul ignore if */
32
+ if (!Array.isArray(schema)) throw new Error("ajv implementation error")
33
+ const vSchema = gen.const("vSchema", schemaCode)
34
+ valid = or(...schema.map((_x: unknown, i: number) => equalCode(vSchema, i)))
35
+ }
36
+ cxt.pass(valid)
37
+
38
+ function loopEnum(): void {
39
+ gen.assign(valid, false)
40
+ gen.forOf("v", schemaCode as Code, (v) =>
41
+ gen.if(_`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break())
42
+ )
43
+ }
44
+
45
+ function equalCode(vSchema: Name, i: number): Code {
46
+ const sch = schema[i]
47
+ return typeof sch === "object" && sch !== null
48
+ ? _`${getEql()}(${data}, ${vSchema}[${i}])`
49
+ : _`${data} === ${sch}`
50
+ }
51
+ },
52
+ }
53
+
54
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/index.ts CHANGED
@@ -1,3 +1,49 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:72a7be83642b3da6317dc9661bfbc8a8f521773812ac6e5c58ddee1c4386a86c
3
- size 1271
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {ErrorObject, Vocabulary} from "../../types"
2
+ import limitNumber, {LimitNumberError} from "./limitNumber"
3
+ import multipleOf, {MultipleOfError} from "./multipleOf"
4
+ import limitLength from "./limitLength"
5
+ import pattern, {PatternError} from "./pattern"
6
+ import limitProperties from "./limitProperties"
7
+ import required, {RequiredError} from "./required"
8
+ import limitItems from "./limitItems"
9
+ import uniqueItems, {UniqueItemsError} from "./uniqueItems"
10
+ import constKeyword, {ConstError} from "./const"
11
+ import enumKeyword, {EnumError} from "./enum"
12
+
13
+ const validation: Vocabulary = [
14
+ // number
15
+ limitNumber,
16
+ multipleOf,
17
+ // string
18
+ limitLength,
19
+ pattern,
20
+ // object
21
+ limitProperties,
22
+ required,
23
+ // array
24
+ limitItems,
25
+ uniqueItems,
26
+ // any
27
+ {keyword: "type", schemaType: ["string", "array"]},
28
+ {keyword: "nullable", schemaType: "boolean"},
29
+ constKeyword,
30
+ enumKeyword,
31
+ ]
32
+
33
+ export default validation
34
+
35
+ type LimitError = ErrorObject<
36
+ "maxItems" | "minItems" | "minProperties" | "maxProperties" | "minLength" | "maxLength",
37
+ {limit: number},
38
+ number | {$data: string}
39
+ >
40
+
41
+ export type ValidationKeywordError =
42
+ | LimitError
43
+ | LimitNumberError
44
+ | MultipleOfError
45
+ | PatternError
46
+ | RequiredError
47
+ | UniqueItemsError
48
+ | ConstError
49
+ | EnumError
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/limitContains.ts CHANGED
@@ -1,3 +1,16 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:3097c6f451ff7a527cbce136a08817114ee615f1b29221195cee45dfc89675e5
3
- size 485
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {checkStrictMode} from "../../compile/util"
4
+
5
+ const def: CodeKeywordDefinition = {
6
+ keyword: ["maxContains", "minContains"],
7
+ type: "array",
8
+ schemaType: "number",
9
+ code({keyword, parentSchema, it}: KeywordCxt) {
10
+ if (parentSchema.contains === undefined) {
11
+ checkStrictMode(it, `"${keyword}" without "contains" is ignored`)
12
+ }
13
+ },
14
+ }
15
+
16
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/limitItems.ts CHANGED
@@ -1,3 +1,26 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:32098cc56bcd9ff44bfa83b1015a3bc2bb7d2f8f7eecb3113929df732faa8176
3
- size 812
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, KeywordErrorDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {_, str, operators} from "../../compile/codegen"
4
+
5
+ const error: KeywordErrorDefinition = {
6
+ message({keyword, schemaCode}) {
7
+ const comp = keyword === "maxItems" ? "more" : "fewer"
8
+ return str`must NOT have ${comp} than ${schemaCode} items`
9
+ },
10
+ params: ({schemaCode}) => _`{limit: ${schemaCode}}`,
11
+ }
12
+
13
+ const def: CodeKeywordDefinition = {
14
+ keyword: ["maxItems", "minItems"],
15
+ type: "array",
16
+ schemaType: "number",
17
+ $data: true,
18
+ error,
19
+ code(cxt: KeywordCxt) {
20
+ const {keyword, data, schemaCode} = cxt
21
+ const op = keyword === "maxItems" ? operators.GT : operators.LT
22
+ cxt.fail$data(_`${data}.length ${op} ${schemaCode}`)
23
+ },
24
+ }
25
+
26
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/limitLength.ts CHANGED
@@ -1,3 +1,30 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:72afbaaa2718abe23156d8bb4af09fdc98a12054fe3c559b82e22718dbedb7de
3
- size 1025
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, KeywordErrorDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {_, str, operators} from "../../compile/codegen"
4
+ import {useFunc} from "../../compile/util"
5
+ import ucs2length from "../../runtime/ucs2length"
6
+
7
+ const error: KeywordErrorDefinition = {
8
+ message({keyword, schemaCode}) {
9
+ const comp = keyword === "maxLength" ? "more" : "fewer"
10
+ return str`must NOT have ${comp} than ${schemaCode} characters`
11
+ },
12
+ params: ({schemaCode}) => _`{limit: ${schemaCode}}`,
13
+ }
14
+
15
+ const def: CodeKeywordDefinition = {
16
+ keyword: ["maxLength", "minLength"],
17
+ type: "string",
18
+ schemaType: "number",
19
+ $data: true,
20
+ error,
21
+ code(cxt: KeywordCxt) {
22
+ const {keyword, data, schemaCode, it} = cxt
23
+ const op = keyword === "maxLength" ? operators.GT : operators.LT
24
+ const len =
25
+ it.opts.unicode === false ? _`${data}.length` : _`${useFunc(cxt.gen, ucs2length)}(${data})`
26
+ cxt.fail$data(_`${len} ${op} ${schemaCode}`)
27
+ },
28
+ }
29
+
30
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts CHANGED
@@ -1,3 +1,42 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:61bedba4a12924a84924b096f3b401356805cc24593f4b800bab4ad05be06298
3
- size 1350
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {_, str, operators, Code} from "../../compile/codegen"
4
+
5
+ const ops = operators
6
+
7
+ type Kwd = "maximum" | "minimum" | "exclusiveMaximum" | "exclusiveMinimum"
8
+
9
+ type Comparison = "<=" | ">=" | "<" | ">"
10
+
11
+ const KWDs: {[K in Kwd]: {okStr: Comparison; ok: Code; fail: Code}} = {
12
+ maximum: {okStr: "<=", ok: ops.LTE, fail: ops.GT},
13
+ minimum: {okStr: ">=", ok: ops.GTE, fail: ops.LT},
14
+ exclusiveMaximum: {okStr: "<", ok: ops.LT, fail: ops.GTE},
15
+ exclusiveMinimum: {okStr: ">", ok: ops.GT, fail: ops.LTE},
16
+ }
17
+
18
+ export type LimitNumberError = ErrorObject<
19
+ Kwd,
20
+ {limit: number; comparison: Comparison},
21
+ number | {$data: string}
22
+ >
23
+
24
+ const error: KeywordErrorDefinition = {
25
+ message: ({keyword, schemaCode}) => str`must be ${KWDs[keyword as Kwd].okStr} ${schemaCode}`,
26
+ params: ({keyword, schemaCode}) =>
27
+ _`{comparison: ${KWDs[keyword as Kwd].okStr}, limit: ${schemaCode}}`,
28
+ }
29
+
30
+ const def: CodeKeywordDefinition = {
31
+ keyword: Object.keys(KWDs),
32
+ type: "number",
33
+ schemaType: "number",
34
+ $data: true,
35
+ error,
36
+ code(cxt: KeywordCxt) {
37
+ const {keyword, data, schemaCode} = cxt
38
+ cxt.fail$data(_`${data} ${KWDs[keyword as Kwd].fail} ${schemaCode} || isNaN(${data})`)
39
+ },
40
+ }
41
+
42
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts CHANGED
@@ -1,3 +1,26 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d55088c19cd829be5ff23dc7bb98dde9bb0bc9fb3baa2a4a141797044a668048
3
- size 851
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, KeywordErrorDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {_, str, operators} from "../../compile/codegen"
4
+
5
+ const error: KeywordErrorDefinition = {
6
+ message({keyword, schemaCode}) {
7
+ const comp = keyword === "maxProperties" ? "more" : "fewer"
8
+ return str`must NOT have ${comp} than ${schemaCode} properties`
9
+ },
10
+ params: ({schemaCode}) => _`{limit: ${schemaCode}}`,
11
+ }
12
+
13
+ const def: CodeKeywordDefinition = {
14
+ keyword: ["maxProperties", "minProperties"],
15
+ type: "object",
16
+ schemaType: "number",
17
+ $data: true,
18
+ error,
19
+ code(cxt: KeywordCxt) {
20
+ const {keyword, data, schemaCode} = cxt
21
+ const op = keyword === "maxProperties" ? operators.GT : operators.LT
22
+ cxt.fail$data(_`Object.keys(${data}).length ${op} ${schemaCode}`)
23
+ },
24
+ }
25
+
26
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts CHANGED
@@ -1,3 +1,34 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:5130cb4147d60dbec590b1e153f0f69b3c7ab552da9dd12eb2e1c22ca36daf7c
3
- size 1072
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {_, str} from "../../compile/codegen"
4
+
5
+ export type MultipleOfError = ErrorObject<
6
+ "multipleOf",
7
+ {multipleOf: number},
8
+ number | {$data: string}
9
+ >
10
+
11
+ const error: KeywordErrorDefinition = {
12
+ message: ({schemaCode}) => str`must be multiple of ${schemaCode}`,
13
+ params: ({schemaCode}) => _`{multipleOf: ${schemaCode}}`,
14
+ }
15
+
16
+ const def: CodeKeywordDefinition = {
17
+ keyword: "multipleOf",
18
+ type: "number",
19
+ schemaType: "number",
20
+ $data: true,
21
+ error,
22
+ code(cxt: KeywordCxt) {
23
+ const {gen, data, schemaCode, it} = cxt
24
+ // const bdt = bad$DataType(schemaCode, <string>def.schemaType, $data)
25
+ const prec = it.opts.multipleOfPrecision
26
+ const res = gen.let("res")
27
+ const invalid = prec
28
+ ? _`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}`
29
+ : _`${res} !== parseInt(${res})`
30
+ cxt.fail$data(_`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`)
31
+ },
32
+ }
33
+
34
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/pattern.ts CHANGED
@@ -1,3 +1,28 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9bdea618249c43667c80c253f28ff36f97ddf02bdda63f8897f7764014c3b314
3
- size 961
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {usePattern} from "../code"
4
+ import {_, str} from "../../compile/codegen"
5
+
6
+ export type PatternError = ErrorObject<"pattern", {pattern: string}, string | {$data: string}>
7
+
8
+ const error: KeywordErrorDefinition = {
9
+ message: ({schemaCode}) => str`must match pattern "${schemaCode}"`,
10
+ params: ({schemaCode}) => _`{pattern: ${schemaCode}}`,
11
+ }
12
+
13
+ const def: CodeKeywordDefinition = {
14
+ keyword: "pattern",
15
+ type: "string",
16
+ schemaType: "string",
17
+ $data: true,
18
+ error,
19
+ code(cxt: KeywordCxt) {
20
+ const {data, $data, schema, schemaCode, it} = cxt
21
+ // TODO regexp should be wrapped in try/catchs
22
+ const u = it.opts.unicodeRegExp ? "u" : ""
23
+ const regExp = $data ? _`(new RegExp(${schemaCode}, ${u}))` : usePattern(cxt, schema)
24
+ cxt.fail$data(_`!${regExp}.test(${data})`)
25
+ },
26
+ }
27
+
28
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/required.ts CHANGED
@@ -1,3 +1,98 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:73f26a08d78ace7a164eca526843086bfbb986799d9a7ecc02fb67a87d2456aa
3
- size 2961
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {
4
+ checkReportMissingProp,
5
+ checkMissingProp,
6
+ reportMissingProp,
7
+ propertyInData,
8
+ noPropertyInData,
9
+ } from "../code"
10
+ import {_, str, nil, not, Name, Code} from "../../compile/codegen"
11
+ import {checkStrictMode} from "../../compile/util"
12
+
13
+ export type RequiredError = ErrorObject<
14
+ "required",
15
+ {missingProperty: string},
16
+ string[] | {$data: string}
17
+ >
18
+
19
+ const error: KeywordErrorDefinition = {
20
+ message: ({params: {missingProperty}}) => str`must have required property '${missingProperty}'`,
21
+ params: ({params: {missingProperty}}) => _`{missingProperty: ${missingProperty}}`,
22
+ }
23
+
24
+ const def: CodeKeywordDefinition = {
25
+ keyword: "required",
26
+ type: "object",
27
+ schemaType: "array",
28
+ $data: true,
29
+ error,
30
+ code(cxt: KeywordCxt) {
31
+ const {gen, schema, schemaCode, data, $data, it} = cxt
32
+ const {opts} = it
33
+ if (!$data && schema.length === 0) return
34
+ const useLoop = schema.length >= opts.loopRequired
35
+ if (it.allErrors) allErrorsMode()
36
+ else exitOnErrorMode()
37
+
38
+ if (opts.strictRequired) {
39
+ const props = cxt.parentSchema.properties
40
+ const {definedProperties} = cxt.it
41
+ for (const requiredKey of schema) {
42
+ if (props?.[requiredKey] === undefined && !definedProperties.has(requiredKey)) {
43
+ const schemaPath = it.schemaEnv.baseId + it.errSchemaPath
44
+ const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`
45
+ checkStrictMode(it, msg, it.opts.strictRequired)
46
+ }
47
+ }
48
+ }
49
+
50
+ function allErrorsMode(): void {
51
+ if (useLoop || $data) {
52
+ cxt.block$data(nil, loopAllRequired)
53
+ } else {
54
+ for (const prop of schema) {
55
+ checkReportMissingProp(cxt, prop)
56
+ }
57
+ }
58
+ }
59
+
60
+ function exitOnErrorMode(): void {
61
+ const missing = gen.let("missing")
62
+ if (useLoop || $data) {
63
+ const valid = gen.let("valid", true)
64
+ cxt.block$data(valid, () => loopUntilMissing(missing, valid))
65
+ cxt.ok(valid)
66
+ } else {
67
+ gen.if(checkMissingProp(cxt, schema, missing))
68
+ reportMissingProp(cxt, missing)
69
+ gen.else()
70
+ }
71
+ }
72
+
73
+ function loopAllRequired(): void {
74
+ gen.forOf("prop", schemaCode as Code, (prop) => {
75
+ cxt.setParams({missingProperty: prop})
76
+ gen.if(noPropertyInData(gen, data, prop, opts.ownProperties), () => cxt.error())
77
+ })
78
+ }
79
+
80
+ function loopUntilMissing(missing: Name, valid: Name): void {
81
+ cxt.setParams({missingProperty: missing})
82
+ gen.forOf(
83
+ missing,
84
+ schemaCode as Code,
85
+ () => {
86
+ gen.assign(valid, propertyInData(gen, data, missing, opts.ownProperties))
87
+ gen.if(not(valid), () => {
88
+ cxt.error()
89
+ gen.break()
90
+ })
91
+ },
92
+ nil
93
+ )
94
+ }
95
+ },
96
+ }
97
+
98
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts CHANGED
@@ -1,3 +1,79 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9d978fd6b3dc81c07c60f5067253490b54962571a4b510e18f4e257508809ee0
3
- size 2690
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from "../../types"
2
+ import type {KeywordCxt} from "../../compile/validate"
3
+ import {checkDataTypes, getSchemaTypes, DataType} from "../../compile/validate/dataType"
4
+ import {_, str, Name} from "../../compile/codegen"
5
+ import {useFunc} from "../../compile/util"
6
+ import equal from "../../runtime/equal"
7
+
8
+ export type UniqueItemsError = ErrorObject<
9
+ "uniqueItems",
10
+ {i: number; j: number},
11
+ boolean | {$data: string}
12
+ >
13
+
14
+ const error: KeywordErrorDefinition = {
15
+ message: ({params: {i, j}}) =>
16
+ str`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
17
+ params: ({params: {i, j}}) => _`{i: ${i}, j: ${j}}`,
18
+ }
19
+
20
+ const def: CodeKeywordDefinition = {
21
+ keyword: "uniqueItems",
22
+ type: "array",
23
+ schemaType: "boolean",
24
+ $data: true,
25
+ error,
26
+ code(cxt: KeywordCxt) {
27
+ const {gen, data, $data, schema, parentSchema, schemaCode, it} = cxt
28
+ if (!$data && !schema) return
29
+ const valid = gen.let("valid")
30
+ const itemTypes = parentSchema.items ? getSchemaTypes(parentSchema.items) : []
31
+ cxt.block$data(valid, validateUniqueItems, _`${schemaCode} === false`)
32
+ cxt.ok(valid)
33
+
34
+ function validateUniqueItems(): void {
35
+ const i = gen.let("i", _`${data}.length`)
36
+ const j = gen.let("j")
37
+ cxt.setParams({i, j})
38
+ gen.assign(valid, true)
39
+ gen.if(_`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j))
40
+ }
41
+
42
+ function canOptimize(): boolean {
43
+ return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array")
44
+ }
45
+
46
+ function loopN(i: Name, j: Name): void {
47
+ const item = gen.name("item")
48
+ const wrongType = checkDataTypes(itemTypes, item, it.opts.strictNumbers, DataType.Wrong)
49
+ const indices = gen.const("indices", _`{}`)
50
+ gen.for(_`;${i}--;`, () => {
51
+ gen.let(item, _`${data}[${i}]`)
52
+ gen.if(wrongType, _`continue`)
53
+ if (itemTypes.length > 1) gen.if(_`typeof ${item} == "string"`, _`${item} += "_"`)
54
+ gen
55
+ .if(_`typeof ${indices}[${item}] == "number"`, () => {
56
+ gen.assign(j, _`${indices}[${item}]`)
57
+ cxt.error()
58
+ gen.assign(valid, false).break()
59
+ })
60
+ .code(_`${indices}[${item}] = ${i}`)
61
+ })
62
+ }
63
+
64
+ function loopN2(i: Name, j: Name): void {
65
+ const eql = useFunc(gen, equal)
66
+ const outer = gen.name("outer")
67
+ gen.label(outer).for(_`;${i}--;`, () =>
68
+ gen.for(_`${j} = ${i}; ${j}--;`, () =>
69
+ gen.if(_`${eql}(${data}[${i}], ${data}[${j}])`, () => {
70
+ cxt.error()
71
+ gen.assign(valid, false).break(outer)
72
+ })
73
+ )
74
+ )
75
+ }
76
+ },
77
+ }
78
+
79
+ export default def
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/ajv/package.json CHANGED
@@ -1,3 +1,126 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d709d5b644116edb33f086f770bb3432f4705518b8a22b6769dc852566912dc1
3
- size 4457
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "ajv",
3
+ "version": "8.14.0",
4
+ "description": "Another JSON Schema Validator",
5
+ "main": "dist/ajv.js",
6
+ "types": "dist/ajv.d.ts",
7
+ "files": [
8
+ "lib/",
9
+ "dist/",
10
+ ".runkit_example.js"
11
+ ],
12
+ "scripts": {
13
+ "eslint": "eslint \"lib/**/*.ts\" \"spec/**/*.*s\" --ignore-pattern spec/JSON-Schema-Test-Suite",
14
+ "prettier:write": "prettier --write \"./**/*.{json,yaml,js,ts}\"",
15
+ "prettier:check": "prettier --list-different \"./**/*.{json,yaml,js,ts}\"",
16
+ "test-spec": "cross-env TS_NODE_PROJECT=spec/tsconfig.json mocha -r ts-node/register \"spec/**/*.spec.{ts,js}\" -R dot",
17
+ "test-codegen": "nyc cross-env TS_NODE_PROJECT=spec/tsconfig.json mocha -r ts-node/register 'spec/codegen.spec.ts' -R spec",
18
+ "test-debug": "npm run test-spec -- --inspect-brk",
19
+ "test-cov": "nyc npm run test-spec",
20
+ "rollup": "rm -rf bundle && rollup -c",
21
+ "bundle": "rm -rf bundle && node ./scripts/bundle.js ajv ajv7 ajv7 && node ./scripts/bundle.js 2019 ajv2019 ajv2019 && node ./scripts/bundle.js 2020 ajv2020 ajv2020 && node ./scripts/bundle.js jtd ajvJTD ajvJTD",
22
+ "build": "rm -rf dist && tsc && cp -r lib/refs dist && rm dist/refs/json-schema-2019-09/index.ts && rm dist/refs/json-schema-2020-12/index.ts && rm dist/refs/jtd-schema.ts",
23
+ "json-tests": "rm -rf spec/_json/*.js && node scripts/jsontests",
24
+ "test-karma": "karma start",
25
+ "test-browser": "rm -rf .browser && npm run bundle && scripts/prepare-tests && karma start",
26
+ "test-all": "npm run test-cov && if-node-version 12 npm run test-browser",
27
+ "test": "npm run json-tests && npm run prettier:check && npm run eslint && npm link && npm link --legacy-peer-deps ajv && npm run test-cov",
28
+ "test-ci": "AJV_FULL_TEST=true npm test",
29
+ "prepublish": "npm run build",
30
+ "benchmark": "npm i && npm run build && npm link && cd ./benchmark && npm link --legacy-peer-deps ajv && npm i && node ./jtd",
31
+ "docs:dev": "./scripts/prepare-site && vuepress dev docs",
32
+ "docs:build": "./scripts/prepare-site && vuepress build docs"
33
+ },
34
+ "nyc": {
35
+ "exclude": [
36
+ "**/spec/**",
37
+ "node_modules"
38
+ ],
39
+ "reporter": [
40
+ "lcov",
41
+ "text-summary"
42
+ ]
43
+ },
44
+ "repository": "ajv-validator/ajv",
45
+ "keywords": [
46
+ "JSON",
47
+ "schema",
48
+ "validator",
49
+ "validation",
50
+ "jsonschema",
51
+ "json-schema",
52
+ "json-schema-validator",
53
+ "json-schema-validation"
54
+ ],
55
+ "author": "Evgeny Poberezkin",
56
+ "license": "MIT",
57
+ "bugs": "https://github.com/ajv-validator/ajv/issues",
58
+ "homepage": "https://ajv.js.org",
59
+ "runkitExampleFilename": ".runkit_example.js",
60
+ "dependencies": {
61
+ "fast-deep-equal": "^3.1.3",
62
+ "json-schema-traverse": "^1.0.0",
63
+ "require-from-string": "^2.0.2",
64
+ "uri-js": "^4.4.1"
65
+ },
66
+ "devDependencies": {
67
+ "@ajv-validator/config": "^0.5.0",
68
+ "@rollup/plugin-commonjs": "^25.0.7",
69
+ "@rollup/plugin-json": "^6.1.0",
70
+ "@rollup/plugin-node-resolve": "^15.2.3",
71
+ "@rollup/plugin-typescript": "^11.1.6",
72
+ "@types/chai": "^4.3.11",
73
+ "@types/mocha": "^10.0.6",
74
+ "@types/node": "^20.11.30",
75
+ "@types/require-from-string": "^1.2.3",
76
+ "@typescript-eslint/eslint-plugin": "^7.3.1",
77
+ "@typescript-eslint/parser": "^7.3.1",
78
+ "ajv-formats": "^3.0.1",
79
+ "browserify": "^17.0.0",
80
+ "chai": "^4.4.1",
81
+ "cross-env": "^7.0.3",
82
+ "dayjs": "^1.11.10",
83
+ "dayjs-plugin-utc": "^0.1.2",
84
+ "eslint": "^8.57.0",
85
+ "eslint-config-prettier": "^9.1.0",
86
+ "fast-uri": "^2.3.0",
87
+ "glob": "^10.3.10",
88
+ "husky": "^9.0.11",
89
+ "if-node-version": "^1.1.1",
90
+ "jimp": "^0.22.10",
91
+ "js-beautify": "^1.15.1",
92
+ "json-schema-test": "^2.0.0",
93
+ "karma": "^6.4.2",
94
+ "karma-chrome-launcher": "^3.2.0",
95
+ "karma-mocha": "^2.0.1",
96
+ "lint-staged": "^15.2.2",
97
+ "mocha": "^10.3.0",
98
+ "module-from-string": "^3.3.0",
99
+ "node-fetch": "^3.3.2",
100
+ "nyc": "^15.1.0",
101
+ "prettier": "3.0.3",
102
+ "re2": "^1.20.9",
103
+ "rollup": "^2.79.1",
104
+ "rollup-plugin-terser": "^7.0.2",
105
+ "ts-node": "^10.9.2",
106
+ "tsify": "^5.0.4",
107
+ "typescript": "5.3.3"
108
+ },
109
+ "collective": {
110
+ "type": "opencollective",
111
+ "url": "https://opencollective.com/ajv"
112
+ },
113
+ "funding": {
114
+ "type": "github",
115
+ "url": "https://github.com/sponsors/epoberezkin"
116
+ },
117
+ "prettier": "@ajv-validator/config/prettierrc.json",
118
+ "husky": {
119
+ "hooks": {
120
+ "pre-commit": "lint-staged && npm test"
121
+ }
122
+ },
123
+ "lint-staged": {
124
+ "*.{json,yaml,js,ts}": "prettier --write"
125
+ }
126
+ }
Java开发环境安装/eclipse-jee-2024-06-R-win32-x86_64/eclipse/plugins/org.eclipse.wildwebdeveloper_1.2.2.202405280856/node_modules/anymatch/LICENSE CHANGED
@@ -1,3 +1,15 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:5a3b0007c4203f10fe11b3fe8747253eb994f135e10b73e1f88ada941af09c6e
3
- size 784
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The ISC License
2
+
3
+ Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com)
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.