@graphcms/validation
Advanced tools
Comparing version 1.3.2 to 1.3.3
@@ -10,2 +10,3 @@ import * as authtoken from './authtoken'; | ||
import * as webhook from './webhook'; | ||
export { authtoken, enumeration, field, invite, model, project, role, stage, webhook }; | ||
import * as locale from './locale'; | ||
export { authtoken, enumeration, field, invite, model, project, role, stage, webhook, locale }; |
@@ -25,3 +25,3 @@ var yup = require('yup'); | ||
var reservedNonSystemFieldNames = ['id','createdat','updatedat','versions','createdby', | ||
'status','stage','locale','localizations','publish','documentInStages']; | ||
'status']; | ||
var reservedModelApiIds = ['Type'].concat(reservedNonSystemTypeNames); | ||
@@ -246,2 +246,42 @@ var reservedEnumerationApiIds = ['Type'].concat(reservedNonSystemTypeNames); | ||
var apiId$3 = yup.string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').min(1, 'Enter an Api Id.').max(64, 'Use an Api Id that is shorter than 64 characters.').test({ | ||
name: 'no-graphql-type', | ||
test: function (value) { | ||
return !graphQlTypeNames.some(function (reservedWord) { | ||
return value ? reservedWord === value.toLowerCase() : false; | ||
}); | ||
}, | ||
message: '"${value}" is a restricted word and cannot be used here.', | ||
exclusive: false | ||
}).test({ | ||
name: 'no-reserved-word', | ||
test: function (value) { | ||
var options = this.options; | ||
if (options.context && options.context.isSystem) { | ||
return true; | ||
} | ||
var reservedApiIds = reservedEnumerationApiIds; | ||
if (options.context && options.context.isLocalized) { | ||
reservedApiIds = reservedEnumerationApiIds.filter(function (word) { | ||
return word !== 'Locale'; | ||
}); | ||
} | ||
return !reservedApiIds.some(function (reservedWord) { | ||
return value ? reservedWord.toLowerCase() === value.toLowerCase() : false; | ||
}); | ||
}, | ||
message: '"${value}" is a restricted word and cannot be used here.', | ||
exclusive: false | ||
}).matches(/^[a-zA-Z0-9_]+$/, 'Should only use alphanumeric characters.'); | ||
var displayName$4 = yup.string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').min(1, 'Enter a Display Name.').trim('The display name may not have leading or trailing whitespaces.'); | ||
var locale = ({ | ||
apiId: apiId$3, | ||
displayName: displayName$4 | ||
}); | ||
exports.authtoken = authtoken; | ||
@@ -256,2 +296,3 @@ exports.enumeration = enumeration; | ||
exports.webhook = webhook; | ||
exports.locale = locale; | ||
//# sourceMappingURL=validation.js.map |
@@ -25,3 +25,3 @@ import { string, boolean } from 'yup'; | ||
var reservedNonSystemFieldNames = ['id','createdat','updatedat','versions','createdby', | ||
'status','stage','locale','localizations','publish','documentInStages']; | ||
'status']; | ||
var reservedModelApiIds = ['Type'].concat(reservedNonSystemTypeNames); | ||
@@ -32,3 +32,3 @@ var reservedEnumerationApiIds = ['Type'].concat(reservedNonSystemTypeNames); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlc2VydmVkV29yZHMudHMob3JpZ2luYWwpIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sR0FBQSxDQUFJLG1CQUFtQixDQUMxQixNQUNBLFFBQ0EsU0FDQSxVQUNBLE9BQ0E7SUFDQSxRQUNBLFdBQ0EsV0FDQSxPQUNBLFdBQ0EsZUFDQSxTQUNBO0lBQ0EsUUFDQTtBQUVKLEdBQUEsQ0FBSSw2QkFBNkIsQ0FDN0IsS0FDQSxPQUNBLFNBQ0EsU0FDQSxTQUNBO0lBQ0EsY0FDQSxXQUNBLGdCQUNBLFFBQ0EsYUFDQTtJQUNBLFVBQ0EsTUFDQTtBQUVKLEdBQUEsQ0FBSSw4QkFBOEIsQ0FDOUIsS0FDQSxZQUNBLFlBQ0EsV0FDQTtJQUNBLFNBQ0EsUUFDQSxTQUNBLGdCQUNBLFVBQ0E7QUFFSixPQUFPLEdBQUEsQ0FBSSxzQkFBc0IsQ0FBQyxPQUFELENBQVMsTUFBVCxDQUFnQjtBQUNqRCxPQUFPLEdBQUEsQ0FBSSw0QkFBNEIsQ0FBQyxPQUFELENBQVMsTUFBVCxDQUFnQjtBQUN2RCxPQUFPLE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ZW1GaWVsZE5hbWVzID0gW1xyXG4gICAgJ2lkJyxcclxuICAgICdjcmVhdGVkYXQnLFxyXG4gICAgJ3VwZGF0ZWRhdCcsXHJcbiAgICAndmVyc2lvbnMnLFxyXG4gICAgJ2NyZWF0ZWRieScsXHJcbiAgICAnc3RhdHVzJyxcclxuXTtcclxuZXhwb3J0IHZhciByZXNlcnZlZE1vZGVsQXBpSWRzID0gWydUeXBlJ10uY29uY2F0KHJlc2VydmVkTm9uU3lzdGVtVHlwZU5hbWVzKTtcclxuZXhwb3J0IHZhciByZXNlcnZlZEVudW1lcmF0aW9uQXBpSWRzID0gWydUeXBlJ10uY29uY2F0KHJlc2VydmVkTm9uU3lzdGVtVHlwZU5hbWVzKTtcclxuZXhwb3J0IHZhciByZXNlcnZlZEZpZWxkQXBpSWRzID0gcmVzZXJ2ZWROb25TeXN0ZW1GaWVsZE5hbWVzO1xyXG4iXX0= | ||
@@ -250,5 +250,45 @@ var apiId = string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').min(1, 'Enter an Api Id.').max(64, 'Use an Api Id that is shorter than 64 characters.').test({ | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzKG9yaWdpbmFsKSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxZQUFZLGVBQWU7QUFDM0IsWUFBWSxpQkFBaUI7QUFDN0IsWUFBWSxXQUFXO0FBQ3ZCLFlBQVksWUFBWTtBQUN4QixZQUFZLFdBQVc7QUFDdkIsWUFBWSxhQUFhO0FBQ3pCLFlBQVksVUFBVTtBQUN0QixZQUFZLFdBQVc7QUFDdkIsWUFBWSxhQUFhO0FBQ3pCLE9BQUEsQ0FBUyxXQUFXLGFBQWEsT0FBTyxRQUFRLE9BQU8sU0FBUyxNQUFNLE9BQU87QUFUN0UiLCJmaWxlIjoiaW5kZXgudHMob3JpZ2luYWwpIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgYXV0aHRva2VuIGZyb20gJy4vYXV0aHRva2VuJztcclxuaW1wb3J0ICogYXMgZW51bWVyYXRpb24gZnJvbSAnLi9lbnVtZXJhdGlvbic7XHJcbmltcG9ydCAqIGFzIGZpZWxkIGZyb20gJy4vZmllbGQnO1xyXG5pbXBvcnQgKiBhcyBpbnZpdGUgZnJvbSAnLi9pbnZpdGUnO1xyXG5pbXBvcnQgKiBhcyBtb2RlbCBmcm9tICcuL21vZGVsJztcclxuaW1wb3J0ICogYXMgcHJvamVjdCBmcm9tICcuL3Byb2plY3QnO1xyXG5pbXBvcnQgKiBhcyByb2xlIGZyb20gJy4vcm9sZSc7XHJcbmltcG9ydCAqIGFzIHN0YWdlIGZyb20gJy4vc3RhZ2UnO1xyXG5pbXBvcnQgKiBhcyB3ZWJob29rIGZyb20gJy4vd2ViaG9vayc7XHJcbmV4cG9ydCB7IGF1dGh0b2tlbiwgZW51bWVyYXRpb24sIGZpZWxkLCBpbnZpdGUsIG1vZGVsLCBwcm9qZWN0LCByb2xlLCBzdGFnZSwgd2ViaG9vayB9O1xyXG4iXX0= | ||
var apiId$3 = string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').min(1, 'Enter an Api Id.').max(64, 'Use an Api Id that is shorter than 64 characters.').test({ | ||
name: 'no-graphql-type', | ||
test: function (value) { | ||
return !graphQlTypeNames.some(function (reservedWord) { | ||
return value ? reservedWord === value.toLowerCase() : false; | ||
}); | ||
}, | ||
message: '"${value}" is a restricted word and cannot be used here.', | ||
exclusive: false | ||
}).test({ | ||
name: 'no-reserved-word', | ||
test: function (value) { | ||
var options = this.options; | ||
if (options.context && options.context.isSystem) { | ||
return true; | ||
} | ||
var reservedApiIds = reservedEnumerationApiIds; | ||
if (options.context && options.context.isLocalized) { | ||
reservedApiIds = reservedEnumerationApiIds.filter(function (word) { | ||
return word !== 'Locale'; | ||
}); | ||
} | ||
return !reservedApiIds.some(function (reservedWord) { | ||
return value ? reservedWord.toLowerCase() === value.toLowerCase() : false; | ||
}); | ||
}, | ||
message: '"${value}" is a restricted word and cannot be used here.', | ||
exclusive: false | ||
}).matches(/^[a-zA-Z0-9_]+$/, 'Should only use alphanumeric characters.'); | ||
var displayName$4 = string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').min(1, 'Enter a Display Name.').trim('The display name may not have leading or trailing whitespaces.'); | ||
export { authtoken, enumeration, field, invite, model, project, role, stage, webhook }; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2FsZS50cyhvcmlnaW5hbCkiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsWUFBWSxTQUFTO0FBQ3JCLFFBQVMsa0JBQWtCLGdDQUFpQztBQUM1RCxPQUFPLEdBQUEsQ0FBSSxRQUFRLEdBQUEsQ0FDZCxNQURjLEVBQUEsQ0FFZCxTQUZjLENBRUosd0ZBRkksQ0FHZCxHQUhjLENBR1YsR0FBRyxtQkFITyxDQUlkLEdBSmMsQ0FJVixJQUFJLG9EQUpNLENBS2QsSUFMYyxDQUtUO0lBQ04sTUFBTSxpQkFEQSxDQUFBO0lBRU4sTUFBTSxVQUFVLE9BQU87UUFDbkIsT0FBTyxDQUFDLGdCQUFBLENBQWlCLElBQWpCLENBQXNCLFVBQVUsY0FBYztZQUFFLE9BQVEsS0FBQSxHQUFRLFlBQUEsQ0FBQSxHQUFBLENBQWlCLEtBQUEsQ0FBTSxXQUFOLEtBQXNCO1FBQXZIO0lBQ0EsQ0FKVSxDQUFBO0lBS04sU0FBUywwREFMSCxDQUFBO0lBTU4sV0FBVztFQVhJLENBYWQsSUFiYyxDQWFUO0lBQ04sTUFBTSxrQkFEQSxDQUFBO0lBRU4sTUFBTSxVQUFVLE9BQU87UUFDbkIsR0FBQSxDQUFJLFVBQVUsSUFBQSxDQUFLO1FBQ25CLElBQUksT0FBQSxDQUFRLE9BQVIsQ0FBQSxF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UgbGVhZGluZyBvciB0cmFpbGluZyB3aGl0ZXNwYWNlcy4nKTtcclxuIl19 | ||
var locale = ({ | ||
apiId: apiId$3, | ||
displayName: displayName$4 | ||
}); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzKG9yaWdpbmFsKSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxZQUFZLGVBQWU7QUFDM0IsWUFBWSxpQkFBaUI7QUFDN0IsWUFBWSxXQUFXO0FBQ3ZCLFlBQVksWUFBWTtBQUN4QixZQUFZLFdBQVc7QUFDdkIsWUFBWSxhQUFhO0FBQ3pCLFlBQVksVUFBVTtBQUN0QixZQUFZLFdBQVc7QUFDdkIsWUFBWSxhQUFhO0FBQ3pCLFlBQVksWUFBWTtBQUN4QixPQUFBLENBQVMsV0FBVyxhQUFhLE9BQU8sUUFBUSxPQUFPLFNBQVMsTUFBTSxPQUFPLFNBQVM7QUFWdEYiLCJmaWxlIjoiaW5kZXgudHMob3JpZ2luYWwpIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgYXV0aHRva2VuIGZyb20gJy4vYXV0aHRva2VuJztcclxuaW1wb3J0ICogYXMgZW51bWVyYXRpb24gZnJvbSAnLi9lbnVtZXJhdGlvbic7XHJcbmltcG9ydCAqIGFzIGZpZWxkIGZyb20gJy4vZmllbGQnO1xyXG5pbXBvcnQgKiBhcyBpbnZpdGUgZnJvbSAnLi9pbnZpdGUnO1xyXG5pbXBvcnQgKiBhcyBtb2RlbCBmcm9tICcuL21vZGVsJztcclxuaW1wb3J0ICogYXMgcHJvamVjdCBmcm9tICcuL3Byb2plY3QnO1xyXG5pbXBvcnQgKiBhcyByb2xlIGZyb20gJy4vcm9sZSc7XHJcbmltcG9ydCAqIGFzIHN0YWdlIGZyb20gJy4vc3RhZ2UnO1xyXG5pbXBvcnQgKiBhcyB3ZWJob29rIGZyb20gJy4vd2ViaG9vayc7XHJcbmltcG9ydCAqIGFzIGxvY2FsZSBmcm9tICcuL2xvY2FsZSc7XHJcbmV4cG9ydCB7IGF1dGh0b2tlbiwgZW51bWVyYXRpb24sIGZpZWxkLCBpbnZpdGUsIG1vZGVsLCBwcm9qZWN0LCByb2xlLCBzdGFnZSwgd2ViaG9vaywgbG9jYWxlIH07XHJcbiJdfQ== | ||
export { authtoken, enumeration, field, invite, model, project, role, stage, webhook, locale }; | ||
//# sourceMappingURL=validation.m.js.map |
@@ -29,3 +29,3 @@ (function (global, factory) { | ||
var reservedNonSystemFieldNames = ['id','createdat','updatedat','versions','createdby', | ||
'status','stage','locale','localizations','publish','documentInStages']; | ||
'status']; | ||
var reservedModelApiIds = ['Type'].concat(reservedNonSystemTypeNames); | ||
@@ -36,3 +36,3 @@ var reservedEnumerationApiIds = ['Type'].concat(reservedNonSystemTypeNames); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlc2VydmVkV29yZHMudHMob3JpZ2luYWwpIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sR0FBQSxDQUFJLG1CQUFtQixDQUMxQixNQUNBLFFBQ0EsU0FDQSxVQUNBLE9BQ0E7SUFDQSxRQUNBLFdBQ0EsV0FDQSxPQUNBLFdBQ0EsZUFDQSxTQUNBO0lBQ0EsUUFDQTtBQUVKLEdBQUEsQ0FBSSw2QkFBNkIsQ0FDN0IsS0FDQSxPQUNBLFNBQ0EsU0FDQSxTQUNBO0lBQ0EsY0FDQSxXQUNBLGdCQUNBLFFBQ0EsYUFDQTtJQUNBLFVBQ0EsTUFDQTtBQUVKLEdBQUEsQ0FBSSw4QkFBOEIsQ0FDOUIsS0FDQSxZQUNBLFlBQ0EsV0FDQTtJQUNBLFNBQ0EsUUFDQSxTQUNBLGdCQUNBLFVBQ0E7QUFFSixPQUFPLEdBQUEsQ0FBSSxzQkFBc0IsQ0FBQyxPQ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JhbnNwYXJlbmN5JyxcclxuICAgICdSR0JBSHVlJyxcclxuICAgICdIRVgnLFxyXG4gICAgJ1JHQkEnLFxyXG5dO1xyXG52YXIgcmVzZXJ2ZWROb25TeXN0ZW1GaWVsZE5hbWVzID0gW1xyXG4gICAgJ2lkJyxcclxuICAgICdjcmVhdGVkYXQnLFxyXG4gICAgJ3VwZGF0ZWRhdCcsXHJcbiAgICAndmVyc2lvbnMnLFxyXG4gICAgJ2NyZWF0ZWRieScsXHJcbiAgICAnc3RhdHVzJyxcclxuXTtcclxuZXhwb3J0IHZhciByZXNlcnZlZE1vZGVsQXBpSWRzID0gWydUeXBlJ10uY29uY2F0KHJlc2VydmVkTm9uU3lzdGVtVHlwZU5hbWVzKTtcclxuZXhwb3J0IHZhciByZXNlcnZlZEVudW1lcmF0aW9uQXBpSWRzID0gWydUeXBlJ10uY29uY2F0KHJlc2VydmVkTm9uU3lzdGVtVHlwZU5hbWVzKTtcclxuZXhwb3J0IHZhciByZXNlcnZlZEZpZWxkQXBpSWRzID0gcmVzZXJ2ZWROb25TeXN0ZW1GaWVsZE5hbWVzO1xyXG4iXX0= | ||
@@ -254,4 +254,44 @@ var apiId = yup.string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').min(1, 'Enter an Api Id.').max(64, 'Use an Api Id that is shorter than 64 characters.').test({ | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzKG9yaWdpbmFsKSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxZQUFZLGVBQWU7QUFDM0IsWUFBWSxpQkFBaUI7QUFDN0IsWUFBWSxXQUFXO0FBQ3ZCLFlBQVksWUFBWTtBQUN4QixZQUFZLFdBQVc7QUFDdkIsWUFBWSxhQUFhO0FBQ3pCLFlBQVksVUFBVTtBQUN0QixZQUFZLFdBQVc7QUFDdkIsWUFBWSxhQUFhO0FBQ3pCLE9BQUEsQ0FBUyxXQUFXLGFBQWEsT0FBTyxRQUFRLE9BQU8sU0FBUyxNQUFNLE9BQU87QUFUN0UiLCJmaWxlIjoiaW5kZXgudHMob3JpZ2luYWwpIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgYXV0aHRva2VuIGZyb20gJy4vYXV0aHRva2VuJztcclxuaW1wb3J0ICogYXMgZW51bWVyYXRpb24gZnJvbSAnLi9lbnVtZXJhdGlvbic7XHJcbmltcG9ydCAqIGFzIGZpZWxkIGZyb20gJy4vZmllbGQnO1xyXG5pbXBvcnQgKiBhcyBpbnZpdGUgZnJvbSAnLi9pbnZpdGUnO1xyXG5pbXBvcnQgKiBhcyBtb2RlbCBmcm9tICcuL21vZGVsJztcclxuaW1wb3J0ICogYXMgcHJvamVjdCBmcm9tICcuL3Byb2plY3QnO1xyXG5pbXBvcnQgKiBhcyByb2xlIGZyb20gJy4vcm9sZSc7XHJcbmltcG9ydCAqIGFzIHN0YWdlIGZyb20gJy4vc3RhZ2UnO1xyXG5pbXBvcnQgKiBhcyB3ZWJob29rIGZyb20gJy4vd2ViaG9vayc7XHJcbmV4cG9ydCB7IGF1dGh0b2tlbiwgZW51bWVyYXRpb24sIGZpZWxkLCBpbnZpdGUsIG1vZGVsLCBwcm9qZWN0LCByb2xlLCBzdGFnZSwgd2ViaG9vayB9O1xyXG4iXX0= | ||
var apiId$3 = yup.string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').min(1, 'Enter an Api Id.').max(64, 'Use an Api Id that is shorter than 64 characters.').test({ | ||
name: 'no-graphql-type', | ||
test: function (value) { | ||
return !graphQlTypeNames.some(function (reservedWord) { | ||
return value ? reservedWord === value.toLowerCase() : false; | ||
}); | ||
}, | ||
message: '"${value}" is a restricted word and cannot be used here.', | ||
exclusive: false | ||
}).test({ | ||
name: 'no-reserved-word', | ||
test: function (value) { | ||
var options = this.options; | ||
if (options.context && options.context.isSystem) { | ||
return true; | ||
} | ||
var reservedApiIds = reservedEnumerationApiIds; | ||
if (options.context && options.context.isLocalized) { | ||
reservedApiIds = reservedEnumerationApiIds.filter(function (word) { | ||
return word !== 'Locale'; | ||
}); | ||
} | ||
return !reservedApiIds.some(function (reservedWord) { | ||
return value ? reservedWord.toLowerCase() === value.toLowerCase() : false; | ||
}); | ||
}, | ||
message: '"${value}" is a restricted word and cannot be used here.', | ||
exclusive: false | ||
}).matches(/^[a-zA-Z0-9_]+$/, 'Should only use alphanumeric characters.'); | ||
var displayName$4 = yup.string().typeError('The supplied value "${value}" of type "${type}" is not compatible with type "string"!').min(1, 'Enter a Display Name.').trim('The display name may not have leading or trailing whitespaces.'); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2FsZS50cyhvcmlnaW5hbCkiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsWUFBWSxTQUFTO0FBQ3JCLFFBQVMsa0JBQWtCLGdDQUFpQztBQUM1RCxPQUFPLEdBQUEsQ0FBSSxRQUFRLEdBQUEsQ0FDZCxNQURjLEVBQUEsQ0FFZCxTQUZjLENBRUosd0ZBRkksQ0FHZCxHQUhjLENBR1YsR0FBRyxtQkFITyxDQUlkLEdBSmMsQ0FJVixJQUFJLG9EQUpNLENBS2QsSUFMYyxDQUtUO0lBQ04sTUFBTSxpQkFEQSxDQUFBO0lBRU4sTUFBTSxVQUFVLE9BQU87UUFDbkIsT0FBTyxDQUFDLGdCQUFBLENBQWlCLElBQWpCLENBQXNCLFVBQVUsY0FBYztZQUFFLE9BQVEsS0FBQSxHQUFRLFlBQUEsQ0FBQSxHQUFBLENBQWlCLEtBQUEsQ0FBTSxXQUFOLEtBQXNCO1FBQXZIO0lBQ0EsQ0FKVSxDQUFBO0lBS04sU0FBUywwREFMSCxDQUFBO0lBTU4sV0FBVztFQVhJLENBYWQsSUFiYyxDQWFUO0lBQ04sTUFBTSxrQkFEQSxDQUFBO0lBRU4sTUFBTSxVQUFVLE9BQ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J0VudGVyIGEgRGlzcGxheSBOYW1lLicpXHJcbiAgICAudHJpbSgnVGhlIGRpc3BsYXkgbmFtZSBtYXkgbm90IGhhdmUgbGVhZGluZyBvciB0cmFpbGluZyB3aGl0ZXNwYWNlcy4nKTtcclxuIl19 | ||
var locale = ({ | ||
apiId: apiId$3, | ||
displayName: displayName$4 | ||
}); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzKG9yaWdpbmFsKSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxZQUFZLGVBQWU7QUFDM0IsWUFBWSxpQkFBaUI7QUFDN0IsWUFBWSxXQUFXO0FBQ3ZCLFlBQVksWUFBWTtBQUN4QixZQUFZLFdBQVc7QUFDdkIsWUFBWSxhQUFhO0FBQ3pCLFlBQVksVUFBVTtBQUN0QixZQUFZLFdBQVc7QUFDdkIsWUFBWSxhQUFhO0FBQ3pCLFlBQVksWUFBWTtBQUN4QixPQUFBLENBQVMsV0FBVyxhQUFhLE9BQU8sUUFBUSxPQUFPLFNBQVMsTUFBTSxPQUFPLFNBQVM7QUFWdEYiLCJmaWxlIjoiaW5kZXgudHMob3JpZ2luYWwpIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgYXV0aHRva2VuIGZyb20gJy4vYXV0aHRva2VuJztcclxuaW1wb3J0ICogYXMgZW51bWVyYXRpb24gZnJvbSAnLi9lbnVtZXJhdGlvbic7XHJcbmltcG9ydCAqIGFzIGZpZWxkIGZyb20gJy4vZmllbGQnO1xyXG5pbXBvcnQgKiBhcyBpbnZpdGUgZnJvbSAnLi9pbnZpdGUnO1xyXG5pbXBvcnQgKiBhcyBtb2RlbCBmcm9tICcuL21vZGVsJztcclxuaW1wb3J0ICogYXMgcHJvamVjdCBmcm9tICcuL3Byb2plY3QnO1xyXG5pbXBvcnQgKiBhcyByb2xlIGZyb20gJy4vcm9sZSc7XHJcbmltcG9ydCAqIGFzIHN0YWdlIGZyb20gJy4vc3RhZ2UnO1xyXG5pbXBvcnQgKiBhcyB3ZWJob29rIGZyb20gJy4vd2ViaG9vayc7XHJcbmltcG9ydCAqIGFzIGxvY2FsZSBmcm9tICcuL2xvY2FsZSc7XHJcbmV4cG9ydCB7IGF1dGh0b2tlbiwgZW51bWVyYXRpb24sIGZpZWxkLCBpbnZpdGUsIG1vZGVsLCBwcm9qZWN0LCByb2xlLCBzdGFnZSwgd2ViaG9vaywgbG9jYWxlIH07XHJcbiJdfQ== | ||
exports.authtoken = authtoken; | ||
@@ -266,4 +306,5 @@ exports.enumeration = enumeration; | ||
exports.webhook = webhook; | ||
exports.locale = locale; | ||
}))); | ||
//# sourceMappingURL=validation.umd.js.map |
{ | ||
"name": "@graphcms/validation", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"main": "dist/validation.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
171711
98
1282
1