Skip to content

Commit

Permalink
Merge pull request #76 from Cardano-Forge/feat/MET-68
Browse files Browse the repository at this point in the history
Remove CIPs rules
  • Loading branch information
JFKFred authored Oct 21, 2024
2 parents 7d59b8c + 75a8199 commit 24bc63f
Show file tree
Hide file tree
Showing 33 changed files with 31 additions and 175 deletions.
2 changes: 1 addition & 1 deletion core/validator/deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ada-anvil/metadraft-validator",
"version": "0.3.3",
"version": "0.3.4",
"exports": "./src/mod.ts",
"imports": {
"@deno/dnt": "jsr:@deno/dnt@^0.41.2",
Expand Down
4 changes: 0 additions & 4 deletions core/validator/src/mapping.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { Cip25Version1 } from "./rules/cip-25-version-1.ts";
import { Cip25Version2 } from "./rules/cip-25-version-2.ts";
import { CompareAttributesKeys } from "./rules/compare-attributes-keys.ts";
import { CompareRootKeys } from "./rules/compare-root-keys.ts";
import { CompareRootValues } from "./rules/compare-root-values.ts";
Expand Down Expand Up @@ -31,8 +29,6 @@ export { DuplicateImage } from "./rules/duplicate-image.ts";
export { DuplicateName } from "./rules/duplicate-name.ts";

export const mapping = {
cip25Version1: Cip25Version1,
cip25Version2: Cip25Version2,
compareAttributesKeys: CompareAttributesKeys,
compareRootKeys: CompareRootKeys,
compareRootValues: CompareRootValues,
Expand Down
2 changes: 0 additions & 2 deletions core/validator/src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ export { split } from "./format/split.ts";

export * from "./utils/types.ts";

export { Cip25Version1 } from "./rules/cip-25-version-1.ts";
export { Cip25Version2 } from "./rules/cip-25-version-2.ts";
export { CompareAttributesKeys } from "./rules/compare-attributes-keys.ts";
export { CompareRootKeys } from "./rules/compare-root-keys.ts";
export { CompareRootValues } from "./rules/compare-root-values.ts";
Expand Down
4 changes: 2 additions & 2 deletions core/validator/src/reader/readers/csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class CsvReader extends BaseReader {
* @param {string} pathOrData - The file path containing CSV data or the CSV data as a string.
* @return {DataRead[]} An array of objects representing the parsed CSV data.
*/
Load(pathOrData: string): DataRead[] {
override Load(pathOrData: string): DataRead[] {
const reader = csvToJson
.formatValueByType(this.options.valueByType)
.fieldDelimiter(this.options.delimiter)
Expand All @@ -66,7 +66,7 @@ export class CsvReader extends BaseReader {
*
* @return {DataRead[] | null} The read CSV data.
*/
Read(): DataRead[] | null {
override Read(): DataRead[] | null {
return this.data;
}
}
4 changes: 2 additions & 2 deletions core/validator/src/reader/readers/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class JsonReader extends BaseReader {
* @param {string} pathOrData - The file path containing JSON data or the JSON data as a string.
* @return {DataRead[]} The loaded JSON data as an object.
*/
Load(pathOrData: string): DataRead[] {
override Load(pathOrData: string): DataRead[] {
if (isValidPath(pathOrData)) {
this.data = JSON.parse(readFileSync(pathOrData, "utf8"));
} else {
Expand All @@ -38,7 +38,7 @@ export class JsonReader extends BaseReader {
*
* @return {DataRead[] | null} The read JSON data.
*/
Read(): DataRead[] | null {
override Read(): DataRead[] | null {
return this.data;
}
}
69 changes: 0 additions & 69 deletions core/validator/src/rules/cip-25-version-1.ts

This file was deleted.

69 changes: 0 additions & 69 deletions core/validator/src/rules/cip-25-version-2.ts

This file was deleted.

2 changes: 1 addition & 1 deletion core/validator/src/rules/compare-attributes-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class CompareAttributesKeys extends BaseValidator {
* @param _metadatas - An array of metadata objects, currently unused but provided for consistency with other validators.
* @returns An array of results from validation checks.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[]
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/compare-root-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class CompareRootKeys extends BaseValidator {
* @param {unknown[]} _metadatas - An array of all metadatas (not used in this validator).
* @returns {StateOutput} An array containing the validation results.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[]
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/compare-root-values.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class CompareRootValues extends BaseValidator {
* @param {unknown[]} _metadatas - An array of all metadatas (not used in this validator).
* @returns {StateOutput} An array containing the validation results.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[]
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/duplicate-asset-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class DuplicateAssetName extends BaseValidator {
* @param {Record<string, StateOutput>} validations - An object of all validations made.
* @returns {Record<string, StateOutput>} An array containing the validation results.
*/
ExecuteOnce(
override ExecuteOnce(
metadatas: object[],
validations: Record<string, StateOutput>
): Record<string, StateOutput> {
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/duplicate-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class DuplicateImage extends BaseValidator {
* @param {Record<string, StateOutput>} validations - An object of all validations made.
* @returns {Record<string, StateOutput>} An array containing the validation results.
*/
ExecuteOnce(
override ExecuteOnce(
metadatas: object[],
validations: Record<string, StateOutput>
): Record<string, StateOutput> {
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/duplicate-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class DuplicateKeys extends BaseValidator {
* @param {unknown[]} _metadatas - An array of all metadatas, currently not used.
* @returns {StateOutput} - An array of validation results.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[]
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/duplicate-name-and-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class DuplicateNameAndImage extends BaseValidator {
* @param {Record<string, StateOutput>} validations - An object of all validations made.
* @returns {Record<string, StateOutput>} An array containing the validation results.
*/
ExecuteOnce(
override ExecuteOnce(
metadatas: object[],
validations: Record<string, StateOutput>
): Record<string, StateOutput> {
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/duplicate-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class DuplicateName extends BaseValidator {
* @param {Record<string, StateOutput>} validations - An object of all validations made.
* @returns {Record<string, StateOutput>} An array containing the validation results.
*/
ExecuteOnce(
override ExecuteOnce(
metadatas: object[],
validations: Record<string, StateOutput>
): Record<string, StateOutput> {
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/has-required-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class HasRequiredKeys extends BaseValidator {
* @param {unknown[]} _metadatas - An array of all metadatas, currently not used.
* @returns {StateOutput} - An array of validation results.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[]
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/key-alphanumeric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class KeyAlphanumeric extends BaseValidator {
* @param {unknown[]} _metadatas - An array of all metadatas, currently not used.
* @returns {StateOutput} - An array of validation results.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[]
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/key-anvil-case.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class KeyAnvilCase extends BaseValidator {
* @param {unknown[]} _metadatas - An array of all metadatas, currently not used.
* @returns {StateOutput} - An array of validation results.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[]
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/key-attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class KeyAttributes extends BaseValidator {
* @param {unknown[]} _metadatas - An array of all metadatas, currently not used.
* @returns {StateOutput} - An array of validation results.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[],
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/key-camel-case.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class KeyCamelCase extends BaseValidator {
* @param {unknown[]} _metadatas - The list of all metadatas (not used in this validator).
* @returns {StateOutput} An array containing the validation results.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[]
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/key-description.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class KeyDescription extends BaseValidator {
* @param _metadatas - Ignored; included for compatibility with BaseValidator.
* @returns {StateOutput} An array of validation results.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[]
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/key-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class KeyFiles extends BaseValidator {
* @param _metadatas - An array of metadata objects, ignored in this validator.
* @returns {StateOutput} An array of validation results.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[]
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/key-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class KeyImage extends BaseValidator {
* @param _metadatas - An array of metadata objects, ignored in this validator.
* @returns {StateOutput} An array of validation results.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[]
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/key-length.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class KeyLength extends BaseValidator {
* @param _metadatas - An array of metadata objects, ignored in this validator.
* @returns {StateOutput} An array of validation results.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[]
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/key-lower-case.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class KeyLowerCase extends BaseValidator {
* @param _metadatas - An array of metadata objects, ignored in this validator.
* @returns {StateOutput} An array of validation results.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[]
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/key-media-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class KeyMediaType extends BaseValidator {
* @param _metadatas - An array of metadata objects, ignored in this validator.
* @returns {StateOutput} An array of validation results.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[]
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/key-media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class KeyMedia extends BaseValidator {
* @param _metadatas - An array of metadata objects, ignored in this validator.
* @returns {StateOutput} An array of validation results.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[]
Expand Down
2 changes: 1 addition & 1 deletion core/validator/src/rules/key-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class KeyName extends BaseValidator {
* @param _metadatas - An array of metadata objects, ignored in this validator.
* @returns {StateOutput} An array of validation results.
*/
Execute(
override Execute(
assetName: string,
metadata: unknown,
_metadatas: unknown[]
Expand Down
Loading

0 comments on commit 24bc63f

Please sign in to comment.