feat: 초기 프로젝트 설정 및 룰.md 파일 추가

This commit is contained in:
2025-07-28 09:53:31 +09:00
commit 09a4d38512
8165 changed files with 1021855 additions and 0 deletions

8
api.hyungi.net/node_modules/tv4/LICENSE.txt generated vendored Normal file
View File

@@ -0,0 +1,8 @@
/*
Author: Geraint Luff and others
Year: 2013
This code is released into the "public domain" by its author(s). Anybody may use, alter and distribute the code without restriction. The author makes no guarantees, and takes no liability of any kind for use of this code.
If you find a bug or make an improvement, it would be courteous to let the author know, but it is not compulsory.
*/

468
api.hyungi.net/node_modules/tv4/README.md generated vendored Normal file
View File

@@ -0,0 +1,468 @@
# Tiny Validator (for v4 JSON Schema)
[![Build Status](https://secure.travis-ci.org/geraintluff/tv4.svg?branch=master)](http://travis-ci.org/geraintluff/tv4) [![Dependency Status](https://gemnasium.com/geraintluff/tv4.svg)](https://gemnasium.com/geraintluff/tv4) [![NPM version](https://badge.fury.io/js/tv4.svg)](http://badge.fury.io/js/tv4)
Use [json-schema](http://json-schema.org/) [draft v4](http://json-schema.org/latest/json-schema-core.html) to validate simple values and complex objects using a rich [validation vocabulary](http://json-schema.org/latest/json-schema-validation.html) ([examples](http://json-schema.org/examples.html)).
There is support for `$ref` with JSON Pointer fragment paths (```other-schema.json#/properties/myKey```).
## Usage 1: Simple validation
```javascript
var valid = tv4.validate(data, schema);
```
If validation returns ```false```, then an explanation of why validation failed can be found in ```tv4.error```.
The error object will look something like:
```json
{
"code": 0,
"message": "Invalid type: string",
"dataPath": "/intKey",
"schemaPath": "/properties/intKey/type"
}
```
The `"code"` property will refer to one of the values in `tv4.errorCodes` - in this case, `tv4.errorCodes.INVALID_TYPE`.
To enable external schema to be referenced, you use:
```javascript
tv4.addSchema(url, schema);
```
If schemas are referenced (```$ref```) but not known, then validation will return ```true``` and the missing schema(s) will be listed in ```tv4.missing```. For more info see the API documentation below.
## Usage 2: Multi-threaded validation
Storing the error and missing schemas does not work well in multi-threaded environments, so there is an alternative syntax:
```javascript
var result = tv4.validateResult(data, schema);
```
The result will look something like:
```json
{
"valid": false,
"error": {...},
"missing": [...]
}
```
## Usage 3: Multiple errors
Normally, `tv4` stops when it encounters the first validation error. However, you can collect an array of validation errors using:
```javascript
var result = tv4.validateMultiple(data, schema);
```
The result will look something like:
```json
{
"valid": false,
"errors": [
{...},
...
],
"missing": [...]
}
```
## Asynchronous validation
Support for asynchronous validation (where missing schemas are fetched) can be added by including an extra JavaScript file. Currently, the only version requires jQuery (`tv4.async-jquery.js`), but the code is very short and should be fairly easy to modify for other libraries (such as MooTools).
Usage:
```javascript
tv4.validate(data, schema, function (isValid, validationError) { ... });
```
`validationError` is simply taken from `tv4.error`.
## Cyclical JavaScript objects
While they don't occur in proper JSON, JavaScript does support self-referencing objects. Any of the above calls support an optional third argument: `checkRecursive`. If true, tv4 will handle self-referencing objects properly - this slows down validation slightly, but that's better than a hanging script.
Consider this data, notice how both `a` and `b` refer to each other:
```javascript
var a = {};
var b = { a: a };
a.b = b;
var aSchema = { properties: { b: { $ref: 'bSchema' }}};
var bSchema = { properties: { a: { $ref: 'aSchema' }}};
tv4.addSchema('aSchema', aSchema);
tv4.addSchema('bSchema', bSchema);
```
If the `checkRecursive` argument were missing, this would throw a "too much recursion" error.
To enable support for this, pass `true` as additional argument to any of the regular validation methods:
```javascript
tv4.validate(a, aSchema, true);
tv4.validateResult(data, aSchema, true);
tv4.validateMultiple(data, aSchema, true);
```
## The `banUnknownProperties` flag
Sometimes, it is desirable to flag all unknown properties as an error. This is especially useful during development, to catch typos and the like, even when extra custom-defined properties are allowed.
As such, tv4 implements ["ban unknown properties" mode](https://github.com/json-schema/json-schema/wiki/ban-unknown-properties-mode-\(v5-proposal\)), enabled by a fourth-argument flag:
```javascript
tv4.validate(data, schema, checkRecursive, true);
tv4.validateResult(data, schema, checkRecursive, true);
tv4.validateMultiple(data, schema, checkRecursive, true);
```
## API
There are additional api commands available for more complex use-cases:
##### addSchema(uri, schema)
Pre-register a schema for reference by other schema and synchronous validation.
````js
tv4.addSchema('http://example.com/schema', { ... });
````
* `uri` the uri to identify this schema.
* `schema` the schema object.
Schemas that have their `id` property set can be added directly.
````js
tv4.addSchema({ ... });
````
##### getSchema(uri)
Return a schema from the cache.
* `uri` the uri of the schema (may contain a `#` fragment)
````js
var schema = tv4.getSchema('http://example.com/schema');
````
##### getSchemaMap()
Return a shallow copy of the schema cache, mapping schema document URIs to schema objects.
````
var map = tv4.getSchemaMap();
var schema = map[uri];
````
##### getSchemaUris(filter)
Return an Array with known schema document URIs.
* `filter` optional RegExp to filter URIs
````
var arr = tv4.getSchemaUris();
// optional filter using a RegExp
var arr = tv4.getSchemaUris(/^https?://example.com/);
````
##### getMissingUris(filter)
Return an Array with schema document URIs that are used as `$ref` in known schemas but which currently have no associated schema data.
Use this in combination with `tv4.addSchema(uri, schema)` to preload the cache for complete synchronous validation with.
* `filter` optional RegExp to filter URIs
````
var arr = tv4.getMissingUris();
// optional filter using a RegExp
var arr = tv4.getMissingUris(/^https?://example.com/);
````
##### dropSchemas()
Drop all known schema document URIs from the cache.
````
tv4.dropSchemas();
````
##### freshApi()
Return a new tv4 instance with no shared state.
````
var otherTV4 = tv4.freshApi();
````
##### reset()
Manually reset validation status from the simple `tv4.validate(data, schema)`. Although tv4 will self reset on each validation there are some implementation scenarios where this is useful.
````
tv4.reset();
````
##### setErrorReporter(reporter)
Sets a custom error reporter. This is a function that accepts three arguments, and returns an error message (string):
```
tv4.setErrorReporter(function (error, data, schema) {
return "Error code: " + error.code;
});
```
The `error` object already has everything aside from the `.message` property filled in (so you can use `error.params`, `error.dataPath`, `error.schemaPath` etc.).
If nothing is returned (or the empty string), then it falls back to the default error reporter. To remove a custom error reporter, call `tv4.setErrorReporter(null)`.
##### language(code)
Sets the language used by the default error reporter.
* `code` is a language code, like `'en'` or `'en-gb'`
````
tv4.language('en-gb');
````
If you specify a multi-level language code (e.g. `fr-CH`), then it will fall back to the generic version (`fr`) if needed.
##### addLanguage(code, map)
Add a new template-based language map for the default error reporter (used by `tv4.language(code)`)
* `code` is new language code
* `map` is an object mapping error IDs or constant names (e.g. `103` or `"NUMBER_MAXIMUM"`) to language strings.
````
tv4.addLanguage('fr', { ... });
// select for use
tv4.language('fr')
````
If you register a multi-level language code (e.g. `fr-FR`), then it will also be registered for plain `fr` if that does not already exist.
##### addFormat(format, validationFunction)
Add a custom format validator. (There are no built-in format validators. Several common ones can be found [here](https://github.com/ikr/tv4-formats) though)
* `format` is a string, corresponding to the `"format"` value in schemas.
* `validationFunction` is a function that either returns:
* `null` (meaning no error)
* an error string (explaining the reason for failure)
````
tv4.addFormat('decimal-digits', function (data, schema) {
if (typeof data === 'string' && !/^[0-9]+$/.test(data)) {
return null;
}
return "must be string of decimal digits";
});
````
Alternatively, multiple formats can be added at the same time using an object:
````
tv4.addFormat({
'my-format': function () {...},
'other-format': function () {...}
});
````
##### defineKeyword(keyword, validationFunction)
Add a custom keyword validator.
* `keyword` is a string, corresponding to a schema keyword
* `validationFunction` is a function that either returns:
* `null` (meaning no error)
* an error string (explaining the reason for failure)
* an error object (containing some of: `code`/`message`/`dataPath`/`schemaPath`)
````
tv4.defineKeyword('my-custom-keyword', function (data, value, schema) {
if (simpleFailure()) {
return "Failure";
} else if (detailedFailure()) {
return {code: tv4.errorCodes.MY_CUSTOM_CODE, message: {param1: 'a', param2: 'b'}};
} else {
return null;
}
});
````
`schema` is the schema upon which the keyword is defined. In the above example, `value === schema['my-custom-keyword']`.
If an object is returned from the custom validator, and its `message` is a string, then that is used as the message result. If `message` is an object, then that is used to populate the (localisable) error template.
##### defineError(codeName, codeNumber, defaultMessage)
Defines a custom error code.
* `codeName` is a string, all-caps underscore separated, e.g. `"MY_CUSTOM_ERROR"`
* `codeNumber` is an integer > 10000, which will be stored in `tv4.errorCodes` (e.g. `tv4.errorCodes.MY_CUSTOM_ERROR`)
* `defaultMessage` is an error message template to use (assuming translations have not been provided for this code)
An example of `defaultMessage` might be: `"Incorrect moon (expected {expected}, got {actual}"`). This is filled out if a custom keyword returns a object `message` (see above). Translations will be used, if associated with the correct code name/number.
## Demos
### Basic usage
<div class="content inline-demo" markdown="1" data-demo="demo1">
<pre class="code" id="demo1">
var schema = {
"items": {
"type": "boolean"
}
};
var data1 = [true, false];
var data2 = [true, 123];
alert("data 1: " + tv4.validate(data1, schema)); // true
alert("data 2: " + tv4.validate(data2, schema)); // false
alert("data 2 error: " + JSON.stringify(tv4.error, null, 4));
</pre>
</div>
### Use of <code>$ref</code>
<div class="content inline-demo" markdown="1" data-demo="demo2">
<pre class="code" id="demo2">
var schema = {
"type": "array",
"items": {"$ref": "#"}
};
var data1 = [[], [[]]];
var data2 = [[], [true, []]];
alert("data 1: " + tv4.validate(data1, schema)); // true
alert("data 2: " + tv4.validate(data2, schema)); // false
</pre>
</div>
### Missing schema
<div class="content inline-demo" markdown="1" data-demo="demo3">
<pre class="code" id="demo3">
var schema = {
"type": "array",
"items": {"$ref": "http://example.com/schema" }
};
var data = [1, 2, 3];
alert("Valid: " + tv4.validate(data, schema)); // true
alert("Missing schemas: " + JSON.stringify(tv4.missing));
</pre>
</div>
### Referencing remote schema
<div class="content inline-demo" markdown="1" data-demo="demo4">
<pre class="code" id="demo4">
tv4.addSchema("http://example.com/schema", {
"definitions": {
"arrayItem": {"type": "boolean"}
}
});
var schema = {
"type": "array",
"items": {"$ref": "http://example.com/schema#/definitions/arrayItem" }
};
var data1 = [true, false, true];
var data2 = [1, 2, 3];
alert("data 1: " + tv4.validate(data1, schema)); // true
alert("data 2: " + tv4.validate(data2, schema)); // false
</pre>
</div>
## Supported platforms
* Node.js
* All modern browsers
* IE >= 7
## Installation
You can manually download [`tv4.js`](https://raw.github.com/geraintluff/tv4/master/tv4.js) or the minified [`tv4.min.js`](https://raw.github.com/geraintluff/tv4/master/tv4.min.js) and include it in your html to create the global `tv4` variable.
Alternately use it as a CommonJS module:
````js
var tv4 = require('tv4');
````
or as an AMD module (e.g. with requirejs):
```js
require('tv4', function(tv4){
//use tv4 here
});
```
There is a command-line tool that wraps this library: [tv4-cmd](https://www.npmjs.com/package/tv4-cmd).
#### npm
````
$ npm install tv4
````
#### bower
````
$ bower install tv4
````
#### component.io
````
$ component install geraintluff/tv4
````
## Build and test
You can rebuild and run the node and browser tests using node.js and [grunt](http://http://gruntjs.com/):
Make sure you have the global grunt cli command:
````
$ npm install grunt-cli -g
````
Clone the git repos, open a shell in the root folder and install the development dependencies:
````
$ npm install
````
Rebuild and run the tests:
````
$ grunt
````
It will run a build and display one Spec-style report for the node.js and two Dot-style reports for both the plain and minified browser tests (via phantomJS). You can also use your own browser to manually run the suites by opening [`test/index.html`](http://geraintluff.github.io/tv4/test/index.html) and [`test/index-min.html`](http://geraintluff.github.io/tv4/test/index-min.html).
## Contributing
Pull-requests for fixes and expansions are welcome. Edit the partial files in `/source` and add your tests in a suitable suite or folder under `/test/tests` and run `grunt` to rebuild and run the test suite. Try to maintain an idiomatic coding style and add tests for any new features. It is recommend to discuss big changes in an Issue.
Do you speak another language? `tv4` needs internationalisation - please contribute language files to `/lang`!
## Packages using tv4
* [chai-json-schema](http://chaijs.com/plugins/chai-json-schema) is a [Chai Assertion Library](http://chaijs.com) plugin to assert values against json-schema.
* [grunt-tv4](http://www.github.com/Bartvds/grunt-tv4) is a plugin for [Grunt](http://http://gruntjs.com/) that uses tv4 to bulk validate json files.
## License
The code is available as "public domain", meaning that it is completely free to use, without any restrictions at all. Read the full license [here](http://geraintluff.github.com/tv4/LICENSE.txt).
It's also available under an [MIT license](http://jsonary.com/LICENSE.txt).

47
api.hyungi.net/node_modules/tv4/lang/de.js generated vendored Normal file
View File

@@ -0,0 +1,47 @@
(function (global) {
var lang = {
INVALID_TYPE: "Ungültiger Typ: {type} (erwartet wurde: {expected})",
ENUM_MISMATCH: "Keine Übereinstimmung mit der Aufzählung (enum) für: {value}",
ANY_OF_MISSING: "Daten stimmen nicht überein mit einem der Schemas von \"anyOf\"",
ONE_OF_MISSING: "Daten stimmen nicht überein mit einem der Schemas von \"oneOf\"",
ONE_OF_MULTIPLE: "Daten sind valid in Bezug auf mehreren Schemas von \"oneOf\": index {index1} und {index2}",
NOT_PASSED: "Daten stimmen mit dem \"not\" Schema überein",
// Numeric errors
NUMBER_MULTIPLE_OF: "Wert {value} ist kein Vielfaches von {multipleOf}",
NUMBER_MINIMUM: "Wert {value} ist kleiner als das Minimum {minimum}",
NUMBER_MINIMUM_EXCLUSIVE: "Wert {value} ist gleich dem Exklusiven Minimum {minimum}",
NUMBER_MAXIMUM: "Wert {value} ist größer als das Maximum {maximum}",
NUMBER_MAXIMUM_EXCLUSIVE: "Wert {value} ist gleich dem Exklusiven Maximum {maximum}",
// String errors
STRING_LENGTH_SHORT: "Zeichenkette zu kurz ({length} chars), minimum {minimum}",
STRING_LENGTH_LONG: "Zeichenkette zu lang ({length} chars), maximum {maximum}",
STRING_PATTERN: "Zeichenkette entspricht nicht dem Muster: {pattern}",
// Object errors
OBJECT_PROPERTIES_MINIMUM: "Zu wenige Attribute definiert ({propertyCount}), minimum {minimum}",
OBJECT_PROPERTIES_MAXIMUM: "Zu viele Attribute definiert ({propertyCount}), maximum {maximum}",
OBJECT_REQUIRED: "Notwendiges Attribut fehlt: {key}",
OBJECT_ADDITIONAL_PROPERTIES: "Zusätzliche Attribute nicht erlaubt",
OBJECT_DEPENDENCY_KEY: "Abhängigkeit fehlt - Schlüssel nicht vorhanden: {missing} (wegen Schlüssel: {key})",
// Array errors
ARRAY_LENGTH_SHORT: "Array zu kurz ({length}), minimum {minimum}",
ARRAY_LENGTH_LONG: "Array zu lang ({length}), maximum {maximum}",
ARRAY_UNIQUE: "Array Einträge nicht eindeutig (Index {match1} und {match2})",
ARRAY_ADDITIONAL_ITEMS: "Zusätzliche Einträge nicht erlaubt"
};
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['../tv4'], function(tv4) {
tv4.addLanguage('de', lang);
return tv4;
});
} else if (typeof module !== 'undefined' && module.exports){
// CommonJS. Define export.
var tv4 = require('../tv4');
tv4.addLanguage('de', lang);
module.exports = tv4;
} else {
// Browser globals
global.tv4.addLanguage('de', lang);
}
})(this);

55
api.hyungi.net/node_modules/tv4/lang/es.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
(function (global) {
var lang = {
INVALID_TYPE: "Tipo inválido: {type} (se esperaba {expected})",
ENUM_MISMATCH: "No hay enum que corresponda con: {value}",
ANY_OF_MISSING: "Los datos no corresponden con ningún esquema de \"anyOf\"",
ONE_OF_MISSING: "Los datos no corresponden con ningún esquema de \"oneOf\"",
ONE_OF_MULTIPLE: "Los datos son válidos contra más de un esquema de \"oneOf\": índices {index1} y {index2}",
NOT_PASSED: "Los datos se corresponden con el esquema de \"not\"",
// Errores numéricos
NUMBER_MULTIPLE_OF: "El valor {value} no es múltiplo de {multipleOf}",
NUMBER_MINIMUM: "El {value} es inferior al mínimo {minimum}",
NUMBER_MINIMUM_EXCLUSIVE: "El valor {value} es igual que el mínimo exclusivo {minimum}",
NUMBER_MAXIMUM: "El valor {value} es mayor que el máximo {maximum}",
NUMBER_MAXIMUM_EXCLUSIVE: "El valor {value} es igual que el máximo exclusivo {maximum}",
NUMBER_NOT_A_NUMBER: "El valor {value} no es un número válido",
// Errores de cadena
STRING_LENGTH_SHORT: "La cadena es demasiado corta ({length} chars), mínimo {minimum}",
STRING_LENGTH_LONG: "La cadena es demasiado larga ({length} chars), máximo {maximum}",
STRING_PATTERN: "La cadena no se corresponde con el patrón: {pattern}",
// Errores de objeto
OBJECT_PROPERTIES_MINIMUM: "No se han definido suficientes propiedades ({propertyCount}), mínimo {minimum}",
OBJECT_PROPERTIES_MAXIMUM: "Se han definido demasiadas propiedades ({propertyCount}), máximo {maximum}",
OBJECT_REQUIRED: "Falta la propiedad requerida: {key}",
OBJECT_ADDITIONAL_PROPERTIES: "No se permiten propiedades adicionales",
OBJECT_DEPENDENCY_KEY: "Dependencia fallida - debe existir la clave: {missing} (debido a la clave: {key})",
// Errores de array
ARRAY_LENGTH_SHORT: "Array demasiado corto ({length}), mínimo {minimum}",
ARRAY_LENGTH_LONG: "Array demasiado largo ({length}), máximo {maximum}",
ARRAY_UNIQUE: "Elementos de array no únicos (índices {match1} y {match2})",
ARRAY_ADDITIONAL_ITEMS: "Elementos adicionales no permitidos",
// Errores de formato
FORMAT_CUSTOM: "Fallo en la validación del formato ({message})",
KEYWORD_CUSTOM: "Fallo en la palabra clave: {key} ({message})",
// Estructura de esquema
CIRCULAR_REFERENCE: "Referencias $refs circulares: {urls}",
// Opciones de validación no estándar
UNKNOWN_PROPERTY: "Propiedad desconocida (no existe en el esquema)"
};
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['../tv4'], function(tv4) {
tv4.addLanguage('es', lang);
return tv4;
});
} else if (typeof module !== 'undefined' && module.exports){
// CommonJS. Define export.
var tv4 = require('../tv4');
tv4.addLanguage('es', lang);
module.exports = tv4;
} else {
// Browser globals
global.tv4.addLanguage('es', lang);
}
})(this);

55
api.hyungi.net/node_modules/tv4/lang/fr.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
(function (global) {
var lang = {
INVALID_TYPE: "Type invalide: {type} ({expected} attendu)",
ENUM_MISMATCH: "Aucune valeur correspondante (enum) pour: {value}",
ANY_OF_MISSING: "La donnée ne correspond à aucun schema de \"anyOf\"",
ONE_OF_MISSING: "La donnée ne correspond à aucun schema de \"oneOf\"",
ONE_OF_MULTIPLE: "La donnée est valide pour plus d'un schema de \"oneOf\": indices {index1} et {index2}",
NOT_PASSED: "La donnée correspond au schema de \"not\"",
// Numeric errors
NUMBER_MULTIPLE_OF: "La valeur {value} n'est pas un multiple de {multipleOf}",
NUMBER_MINIMUM: "La valeur {value} est inférieure au minimum {minimum}",
NUMBER_MINIMUM_EXCLUSIVE: "La valeur {value} est égale au minimum exclusif {minimum}",
NUMBER_MAXIMUM: "La valeur {value} est supérieure au maximum {maximum}",
NUMBER_MAXIMUM_EXCLUSIVE: "La valeur {value} est égale au maximum exclusif {maximum}",
NUMBER_NOT_A_NUMBER: "La valeur {value} n'est pas un nombre valide",
// String errors
STRING_LENGTH_SHORT: "Le texte est trop court ({length} carac.), minimum {minimum}",
STRING_LENGTH_LONG: "Le texte est trop long ({length} carac.), maximum {maximum}",
STRING_PATTERN: "Le texte ne correspond pas au motif: {pattern}",
// Object errors
OBJECT_PROPERTIES_MINIMUM: "Pas assez de propriétés définies ({propertyCount}), minimum {minimum}",
OBJECT_PROPERTIES_MAXIMUM: "Trop de propriétés définies ({propertyCount}), maximum {maximum}",
OBJECT_REQUIRED: "Propriété requise manquante: {key}",
OBJECT_ADDITIONAL_PROPERTIES: "Propriétés additionnelles non autorisées",
OBJECT_DEPENDENCY_KEY: "Echec de dépendance - la clé doit exister: {missing} (du à la clé: {key})",
// Array errors
ARRAY_LENGTH_SHORT: "Le tableau est trop court ({length}), minimum {minimum}",
ARRAY_LENGTH_LONG: "Le tableau est trop long ({length}), maximum {maximum}",
ARRAY_UNIQUE: "Des éléments du tableau ne sont pas uniques (indices {match1} et {match2})",
ARRAY_ADDITIONAL_ITEMS: "Éléments additionnels non autorisés",
// Format errors
FORMAT_CUSTOM: "Échec de validation du format ({message})",
KEYWORD_CUSTOM: "Échec de mot-clé: {key} ({message})",
// Schema structure
CIRCULAR_REFERENCE: "Références ($refs) circulaires: {urls}",
// Non-standard validation options
UNKNOWN_PROPERTY: "Propriété inconnue (n'existe pas dans le schema)"
};
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['../tv4'], function(tv4) {
tv4.addLanguage('fr', lang);
return tv4;
});
} else if (typeof module !== 'undefined' && module.exports){
// CommonJS. Define export.
var tv4 = require('../tv4');
tv4.addLanguage('fr', lang);
module.exports = tv4;
} else {
// Browser globals
global.tv4.addLanguage('fr', lang);
}
})(this);

56
api.hyungi.net/node_modules/tv4/lang/nb.js generated vendored Normal file
View File

@@ -0,0 +1,56 @@
(function (global) {
var lang = {
INVALID_TYPE: "Ugyldig type: {type} (forventet {expected})",
ENUM_MISMATCH: "Ingen samsvarende enum verdi for: {value}",
ANY_OF_MISSING: "Data samsvarer ikke med noe skjema fra \"anyOf\"",
ONE_OF_MISSING: "Data samsvarer ikke med noe skjema fra \"oneOf\"",
ONE_OF_MULTIPLE: "Data samsvarer med mer enn ett skjema fra \"oneOf\": indeks {index1} og {index2}",
NOT_PASSED: "Data samsvarer med skjema fra \"not\"",
// Numeric errors
NUMBER_MULTIPLE_OF: "Verdien {value} er ikke et multiplum av {multipleOf}",
NUMBER_MINIMUM: "Verdien {value} er mindre enn minsteverdi {minimum}",
NUMBER_MINIMUM_EXCLUSIVE: "Verdien {value} er lik eksklusiv minsteverdi {minimum}",
NUMBER_MAXIMUM: "Verdien {value} er større enn maksimalverdi {maximum}",
NUMBER_MAXIMUM_EXCLUSIVE: "Verdien {value} er lik eksklusiv maksimalverdi {maximum}",
NUMBER_NOT_A_NUMBER: "Verdien {value} er ikke et gyldig tall",
// String errors
STRING_LENGTH_SHORT: "Strengen er for kort ({length} tegn), minst {minimum}",
STRING_LENGTH_LONG: "Strengen er for lang ({length} tegn), maksimalt {maximum}",
STRING_PATTERN: "Strengen samsvarer ikke med regulært uttrykk: {pattern}",
// Object errors
OBJECT_PROPERTIES_MINIMUM: "For få variabler definert ({propertyCount}), minst {minimum} er forventet",
OBJECT_PROPERTIES_MAXIMUM: "For mange variabler definert ({propertyCount}), makismalt {maximum} er tillatt",
OBJECT_REQUIRED: "Mangler obligatorisk variabel: {key}",
OBJECT_ADDITIONAL_PROPERTIES: "Tilleggsvariabler er ikke tillatt",
OBJECT_DEPENDENCY_KEY: "Variabelen {missing} må være definert (på grunn av følgende variabel: {key})",
// Array errors
ARRAY_LENGTH_SHORT: "Listen er for kort ({length} elementer), minst {minimum}",
ARRAY_LENGTH_LONG: "Listen er for lang ({length} elementer), maksimalt {maximum}",
ARRAY_UNIQUE: "Elementene er ikke unike (indeks {match1} og {match2} er like)",
ARRAY_ADDITIONAL_ITEMS: "Tillegselementer er ikke tillatt",
// Format errors
FORMAT_CUSTOM: "Formatteringen stemmer ikke ({message})",
KEYWORD_CUSTOM: "Nøkkelen stemmer ikke: {key} ({message})",
// Schema structure
CIRCULAR_REFERENCE: "Sirkulære referanser ($refs): {urls}",
// Non-standard validation options
UNKNOWN_PROPERTY: "Ukjent variabel (eksisterer ikke i skjemaet)"
};
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['../tv4'], function(tv4) {
tv4.addLanguage('nb', lang);
return tv4;
});
} else if (typeof module !== 'undefined' && module.exports) {
// CommonJS. Define export.
var tv4 = require('../tv4');
tv4.addLanguage('nb', lang);
module.exports = tv4;
} else {
// Browser globals
global.tv4.addLanguage('nb', lang);
}
})(this);

55
api.hyungi.net/node_modules/tv4/lang/pl-PL.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
(function (global) {
var lang = {
INVALID_TYPE: "Niepoprawny typ: {type} (spodziewany {expected})",
ENUM_MISMATCH: "Żadna predefiniowana wartośc nie pasuje do: {value}",
ANY_OF_MISSING: "Dane nie pasują do żadnego wzoru z sekcji \"anyOf\"",
ONE_OF_MISSING: "Dane nie pasują do żadnego wzoru z sekcji \"oneOf\"",
ONE_OF_MULTIPLE: "Dane są prawidłowe dla więcej niż jednego schematu z \"oneOf\": indeksy {index1} i {index2}",
NOT_PASSED: "Dane pasują do wzoru z sekcji \"not\"",
// Numeric errors
NUMBER_MULTIPLE_OF: "Wartość {value} nie jest wielokrotnością {multipleOf}",
NUMBER_MINIMUM: "Wartość {value} jest mniejsza niż {minimum}",
NUMBER_MINIMUM_EXCLUSIVE: "Wartość {value} jest równa wyłączonemu minimum {minimum}",
NUMBER_MAXIMUM: "Wartość {value} jest większa niż {maximum}",
NUMBER_MAXIMUM_EXCLUSIVE: "Wartość {value} jest równa wyłączonemu maksimum {maximum}",
NUMBER_NOT_A_NUMBER: "Wartość {value} nie jest poprawną liczbą",
// String errors
STRING_LENGTH_SHORT: "Napis jest za krótki ({length} znaków), minimum {minimum}",
STRING_LENGTH_LONG: "Napis jest za długi ({length} )znaków, maksimum {maximum}",
STRING_PATTERN: "Napis nie pasuje do wzoru: {pattern}",
// Object errors
OBJECT_PROPERTIES_MINIMUM: "Za mało zdefiniowanych pól ({propertyCount}), minimum {minimum}",
OBJECT_PROPERTIES_MAXIMUM: "Za dużo zdefiniowanych pól ({propertyCount}), maksimum {maximum}",
OBJECT_REQUIRED: "Brakuje wymaganego pola: {key}",
OBJECT_ADDITIONAL_PROPERTIES: "Dodatkowe pola są niedozwolone",
OBJECT_DEPENDENCY_KEY: "Błąd zależności - klucz musi istnieć: {missing} (wzgledem klucza: {key})",
// Array errors
ARRAY_LENGTH_SHORT: "Tablica ma za mało elementów ({length}), minimum {minimum}",
ARRAY_LENGTH_LONG: "Tablica ma za dużo elementów ({length}), maximum {maximum}",
ARRAY_UNIQUE: "Elementy tablicy nie są unikalne (indeks {match1} i {match2})",
ARRAY_ADDITIONAL_ITEMS: "Dodatkowe elementy są niedozwolone",
// Format errors
FORMAT_CUSTOM: "Błąd zgodności z formatem ({message})",
KEYWORD_CUSTOM: "Błąd słowa kluczowego: {key} ({message})",
// Schema structure
CIRCULAR_REFERENCE: "Cykliczna referencja $refs: {urls}",
// Non-standard validation options
UNKNOWN_PROPERTY: "Nie znane pole (brak we wzorze(schema))"
};
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['../tv4'], function(tv4) {
tv4.addLanguage('pl-PL', lang);
return tv4;
});
} else if (typeof module !== 'undefined' && module.exports) {
// CommonJS. Define export.
var tv4 = require('../tv4');
tv4.addLanguage('pl-PL', lang);
module.exports = tv4;
} else {
// Browser globals
global.tv4.addLanguage('pl-PL', lang);
}
})(this);

55
api.hyungi.net/node_modules/tv4/lang/pt-PT.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
(function (global) {
var lang = {
INVALID_TYPE: "Tipo inválido: {type} (esperava {expected})",
ENUM_MISMATCH: "Nenhuma correspondência 'enum' para: {value}",
ANY_OF_MISSING: "Os dados não correspondem a nenhum esquema de \"anyOf\"",
ONE_OF_MISSING: "Os dados não correspondem a nenhum esquema de \"oneOf\"",
ONE_OF_MULTIPLE: "Os dados são válidos quando comparados com mais de um esquema de \"oneOf\": índices {index1} e {index2}",
NOT_PASSED: "Os dados correspondem a um esquema de \"not\"",
// Numeric errors
NUMBER_MULTIPLE_OF: "O valor {value} não é um múltiplo de {multipleOf}",
NUMBER_MINIMUM: "O valor {value} é menor que o mínimo {minimum}",
NUMBER_MINIMUM_EXCLUSIVE: "O valor {value} é igual ao mínimo exclusivo {minimum}",
NUMBER_MAXIMUM: "O valor {value} é maior que o máximo {maximum}",
NUMBER_MAXIMUM_EXCLUSIVE: "O valor {value} é igual ao máximo exclusivo {maximum}",
NUMBER_NOT_A_NUMBER: "O valor {value} não é um número válido",
// String errors
STRING_LENGTH_SHORT: "A 'string' é muito curta ({length} caracteres), mínimo {minimum}",
STRING_LENGTH_LONG: "A 'string' é muito longa ({length} caracteres), máximo {maximum}",
STRING_PATTERN: "A 'string' não corresponde ao modelo: {pattern}",
// Object errors
OBJECT_PROPERTIES_MINIMUM: "Poucas propriedades definidas ({propertyCount}), mínimo {minimum}",
OBJECT_PROPERTIES_MAXIMUM: "Muitas propriedades definidas ({propertyCount}), máximo {maximum}",
OBJECT_REQUIRED: "Propriedade necessária em falta: {key}",
OBJECT_ADDITIONAL_PROPERTIES: "Não são permitidas propriedades adicionais",
OBJECT_DEPENDENCY_KEY: "Uma dependência falhou - tem de existir uma chave: {missing} (devido à chave: {key})",
// Array errors
ARRAY_LENGTH_SHORT: "A 'array' é muito curta ({length}), mínimo {minimum}",
ARRAY_LENGTH_LONG: "A 'array' é muito longa ({length}), máximo {maximum}",
ARRAY_UNIQUE: "Os itens da 'array' não são únicos (índices {match1} e {match2})",
ARRAY_ADDITIONAL_ITEMS: "Não são permitidos itens adicionais",
// Format errors
FORMAT_CUSTOM: "A validação do formato falhou ({message})",
KEYWORD_CUSTOM: "A 'keyword' falhou: {key} ({message})",
// Schema structure
CIRCULAR_REFERENCE: "$refs circular: {urls}",
// Non-standard validation options
UNKNOWN_PROPERTY: "Propriedade desconhecida (não está em 'schema')"
};
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['../tv4'], function(tv4) {
tv4.addLanguage('pt-PT', lang);
return tv4;
});
} else if (typeof module !== 'undefined' && module.exports) {
// CommonJS. Define export.
var tv4 = require('../tv4');
tv4.addLanguage('pt-PT', lang);
module.exports = tv4;
} else {
// Browser globals
global.tv4.addLanguage('pt-PT', lang);
}
})(this);

55
api.hyungi.net/node_modules/tv4/lang/sv-SE.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
(function (global) {
var lang = {
INVALID_TYPE: "Otillåten typ: {type} (skall vara {expected})",
ENUM_MISMATCH: "Otillåtet värde: {value}",
ANY_OF_MISSING: "Värdet matchar inget av schemana \"anyOf\"",
ONE_OF_MISSING: "Värdet matchar inget av schemana \"oneOf\"",
ONE_OF_MULTIPLE: "Värdet matchar flera scheman \"oneOf\": index {index1} och {index2}",
NOT_PASSED: "Värdet matchar schemat från \"not\"",
// Numeric errors
NUMBER_MULTIPLE_OF: "Värdet {value} är inte en multipel av {multipleOf}",
NUMBER_MINIMUM: "Värdet {value} får inte vara mindre än {minimum}",
NUMBER_MINIMUM_EXCLUSIVE: "Värdet {value} måste vara större än {minimum}",
NUMBER_MAXIMUM: "Värdet {value} får inte vara större än {maximum}",
NUMBER_MAXIMUM_EXCLUSIVE: "Värdet {value} måste vara mindre än {maximum}",
NUMBER_NOT_A_NUMBER: "Värdet {value} är inte ett giltigt tal",
// String errors
STRING_LENGTH_SHORT: "Texten är för kort ({length} tecken), ska vara minst {minimum} tecken",
STRING_LENGTH_LONG: "Texten är för lång ({length} tecken), ska vara högst {maximum}",
STRING_PATTERN: "Texten har fel format: {pattern}",
// Object errors
OBJECT_PROPERTIES_MINIMUM: "För få parametrar ({propertyCount}), ska minst vara {minimum}",
OBJECT_PROPERTIES_MAXIMUM: "För många parametrar ({propertyCount}), får högst vara {maximum}",
OBJECT_REQUIRED: "Egenskap saknas: {key}",
OBJECT_ADDITIONAL_PROPERTIES: "Extra parametrar är inte tillåtna",
OBJECT_DEPENDENCY_KEY: "Saknar beroende - saknad nyckel: {missing} (beroende nyckel: {key})",
// Array errors
ARRAY_LENGTH_SHORT: "Listan är för kort ({length}), ska minst vara {minimum}",
ARRAY_LENGTH_LONG: "Listan är för lång ({length}), ska högst vara {maximum}",
ARRAY_UNIQUE: "Listvärden är inte unika (index {match1} och {match2})",
ARRAY_ADDITIONAL_ITEMS: "Extra värden är inte tillåtna",
// Format errors
FORMAT_CUSTOM: "Misslyckad validering ({message})",
KEYWORD_CUSTOM: "Misslyckat nyckelord: {key} ({message})",
// Schema structure
CIRCULAR_REFERENCE: "Cirkulär $refs: {urls}",
// Non-standard validation options
UNKNOWN_PROPERTY: "Okänd egenskap (finns ej i schema)"
};
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['../tv4'], function(tv4) {
tv4.addLanguage('sv-SE', lang);
return tv4;
});
} else if (typeof module !== 'undefined' && module.exports) {
// CommonJS. Define export.
var tv4 = require('../tv4');
tv4.addLanguage('sv-SE', lang);
module.exports = tv4;
} else {
// Browser globals
global.tv4.addLanguage('sv-SE', lang);
}
})(this);

55
api.hyungi.net/node_modules/tv4/lang/zh-CN.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
(function (global) {
var lang = {
INVALID_TYPE: "当前类型 {type} 不符合期望的类型 {expected}",
ENUM_MISMATCH: "{value} 不是有效的枚举类型取值",
ANY_OF_MISSING: "数据不符合以下任何一个模式 (\"anyOf\")",
ONE_OF_MISSING: "数据不符合以下任何一个模式 (\"oneOf\")",
ONE_OF_MULTIPLE: "数据同时符合多个模式 (\"oneOf\"): 下标 {index1} 和 {index2}",
NOT_PASSED: "数据不应匹配以下模式 (\"not\")",
// Numeric errors
NUMBER_MULTIPLE_OF: "数值 {value} 不是 {multipleOf} 的倍数",
NUMBER_MINIMUM: "数值 {value} 小于最小值 {minimum}",
NUMBER_MINIMUM_EXCLUSIVE: "数值 {value} 等于排除的最小值 {minimum}",
NUMBER_MAXIMUM: "数值 {value} is greater 大于最大值 {maximum}",
NUMBER_MAXIMUM_EXCLUSIVE: "数值 {value} 等于排除的最大值 {maximum}",
NUMBER_NOT_A_NUMBER: "数值 {value} 不是有效的数字",
// String errors
STRING_LENGTH_SHORT: "字符串太短 ({length} 个字符), 最少 {minimum} 个",
STRING_LENGTH_LONG: "字符串太长 ({length} 个字符), 最多 {maximum} 个",
STRING_PATTERN: "字符串不匹配模式: {pattern}",
// Object errors
OBJECT_PROPERTIES_MINIMUM: "字段数过少 ({propertyCount}), 最少 {minimum} 个",
OBJECT_PROPERTIES_MAXIMUM: "字段数过多 ({propertyCount}), 最多 {maximum} 个",
OBJECT_REQUIRED: "缺少必要字段: {key}",
OBJECT_ADDITIONAL_PROPERTIES: "不允许多余的字段",
OBJECT_DEPENDENCY_KEY: "依赖失败 - 缺少键 {missing} (来自键: {key})",
// Array errors
ARRAY_LENGTH_SHORT: "数组长度太短 ({length}), 最小长度 {minimum}",
ARRAY_LENGTH_LONG: "数组长度太长 ({length}), 最大长度 {maximum}",
ARRAY_UNIQUE: "数组元素不唯一 (下标 {match1} 和 {match2})",
ARRAY_ADDITIONAL_ITEMS: "不允许多余的元素",
// Format errors
FORMAT_CUSTOM: "格式校验失败 ({message})",
KEYWORD_CUSTOM: "关键字 {key} 校验失败: ({message})",
// Schema structure
CIRCULAR_REFERENCE: "循环引用 ($refs): {urls}",
// Non-standard validation options
UNKNOWN_PROPERTY: "未知字段 (不在 schema 中)"
};
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['../tv4'], function(tv4) {
tv4.addLanguage('zh-CN', lang);
return tv4;
});
} else if (typeof module !== 'undefined' && module.exports){
// CommonJS. Define export.
var tv4 = require('../tv4');
tv4.addLanguage('zh-CN', lang);
module.exports = tv4;
} else {
// Browser globals
global.tv4.addLanguage('zh-CN', lang);
}
})(this);

62
api.hyungi.net/node_modules/tv4/package.json generated vendored Normal file
View File

@@ -0,0 +1,62 @@
{
"name": "tv4",
"version": "1.3.0",
"author": "Geraint Luff",
"description": "A public domain JSON Schema validator for JavaScript",
"keywords": [
"json-schema",
"schema",
"validator",
"tv4"
],
"maintainers": [
{
"name": "Geraint Luff",
"email": "luffgd@gmail.com",
"web": "https://github.com/geraintluff/"
}
],
"main": "tv4.js",
"repository": {
"type": "git",
"url": "https://github.com/geraintluff/tv4.git"
},
"license": [
{
"type": "Public Domain",
"url": "http://geraintluff.github.io/tv4/LICENSE.txt"
},
{
"type": "MIT",
"url": "http://jsonary.com/LICENSE.txt"
}
],
"devDependencies": {
"grunt": "~0.4.1",
"grunt-cli": "~0.1.9",
"grunt-component-io": "~0.1.0",
"grunt-concat-sourcemap": "~0.2",
"grunt-contrib-clean": "~0.4.1",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-jshint": "~0.6.2",
"grunt-contrib-uglify": "~0.2.2",
"grunt-markdown": "~0.3.0",
"grunt-mocha": "~0.4",
"grunt-mocha-test": "~0.5.0",
"grunt-push-release": "~0.1.1",
"grunt-regex-replace": "~0.2.5",
"jshint-path-reporter": "~0.1",
"mocha": "~1.11.0",
"mocha-unfunk-reporter": "~0.2",
"proclaim": "1.4",
"requirejs": "~2.1.11",
"source-map-support": "~0.1"
},
"engines": {
"node": ">= 0.8.0"
},
"scripts": {
"test": "grunt test",
"prepublish": "grunt prepublish"
}
}

34
api.hyungi.net/node_modules/tv4/tv4.async-jquery.js generated vendored Normal file
View File

@@ -0,0 +1,34 @@
// Provides support for asynchronous validation (fetching schemas) using jQuery
// Callback is optional third argument to tv4.validate() - if not present, synchronous operation
// callback(result, error);
if (typeof (tv4.asyncValidate) === 'undefined') {
tv4.syncValidate = tv4.validate;
tv4.validate = function (data, schema, callback, checkRecursive, banUnknownProperties) {
if (typeof (callback) === 'undefined') {
return this.syncValidate(data, schema, checkRecursive, banUnknownProperties);
} else {
return this.asyncValidate(data, schema, callback, checkRecursive, banUnknownProperties);
}
};
tv4.asyncValidate = function (data, schema, callback, checkRecursive, banUnknownProperties) {
var $ = jQuery;
var result = tv4.validate(data, schema, checkRecursive, banUnknownProperties);
if (!tv4.missing.length) {
callback(result, tv4.error);
} else {
// Make a request for each missing schema
var missingSchemas = $.map(tv4.missing, function (schemaUri) {
return $.getJSON(schemaUri).success(function (fetchedSchema) {
tv4.addSchema(schemaUri, fetchedSchema);
}).error(function () {
// If there's an error, just use an empty schema
tv4.addSchema(schemaUri, {});
});
});
// When all requests done, try again
$.when.apply($, missingSchemas).done(function () {
var result = tv4.asyncValidate(data, schema, callback, checkRecursive, banUnknownProperties);
});
}
};
}

1681
api.hyungi.net/node_modules/tv4/tv4.js generated vendored Normal file

File diff suppressed because it is too large Load Diff