Comparing version 7.0.0 to 7.1.0
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://bpmn.io/20241206/moddle-package.schema.json", | ||
"title": "Moddle Package Schema", | ||
"type": "object", | ||
@@ -12,7 +14,22 @@ "required": [ | ||
"name": { | ||
"type": "string" | ||
"type": "string", | ||
"description": "Name of the package." | ||
}, | ||
"$schema": { | ||
"type": "string", | ||
"description": "Reference to this schema" | ||
}, | ||
"prefix": { | ||
"type": "string", | ||
"description": "The prefix uniquely identifies elements in a package if more multiple packages are in place." | ||
}, | ||
"uri": { | ||
"type": "string", | ||
"description": "The uri field in a package definition defines the associated XML namespace URI." | ||
}, | ||
"types": { | ||
"type": "array", | ||
"description": "List of types belonging to this package.", | ||
"items": { | ||
"type": "object", | ||
"required": [ | ||
@@ -23,3 +40,4 @@ "name" | ||
"name": { | ||
"type": "string" | ||
"type": "string", | ||
"description": "Name of the defined type." | ||
}, | ||
@@ -29,36 +47,74 @@ "superClass": { | ||
"items": { | ||
"type": "string" | ||
"type": "string", | ||
"description": "Name of the super type." | ||
} | ||
}, | ||
"isAbstract": { | ||
"type": "boolean", | ||
"description": "Can this type be instantiated." | ||
}, | ||
"properties": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
"type": "string", | ||
"description": "Name of the property." | ||
}, | ||
"type": { | ||
"type": "string" | ||
"type": "string", | ||
"description": "Type of the property." | ||
}, | ||
"isAttr": { | ||
"type": "boolean" | ||
"type": "boolean", | ||
"description": "Should the property be serialized as XML attribute." | ||
}, | ||
"isBody": { | ||
"type": "boolean", | ||
"description": "Should the property be serialized as body element." | ||
}, | ||
"isId": { | ||
"type": "boolean" | ||
"type": "boolean", | ||
"description": "Is current property map to XML node id." | ||
}, | ||
"isMany": { | ||
"type": "boolean" | ||
"type": "boolean", | ||
"description": "Is the property an array or a single." | ||
}, | ||
"isReference": { | ||
"type": "boolean" | ||
"type": "boolean", | ||
"description": "Is the property referencing to another element" | ||
}, | ||
"default": { | ||
"type": [ | ||
"boolean", | ||
"number", | ||
"string" | ||
"description": "Provides default for the property.", | ||
"oneOf": [ | ||
{ | ||
"type": "boolean" | ||
}, | ||
{ | ||
"type": "number" | ||
}, | ||
{ | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"redefines": { | ||
"type": "string" | ||
"type": "string", | ||
"description": "Property name for the redefinition of existing property" | ||
}, | ||
"replaces": { | ||
"type": "string", | ||
"description": "Property name for the replacement of existing property" | ||
}, | ||
"xml": { | ||
"type": "object", | ||
"description": "Defines XML serialization details", | ||
"properties": { | ||
"serialize": { | ||
"type": "string", | ||
"description": "Provides XML serialization type, e.g. xsi:type" | ||
} | ||
} | ||
} | ||
@@ -73,2 +129,3 @@ } | ||
"type": "object", | ||
"description": "Defines XML serialization details.", | ||
"properties": { | ||
@@ -84,5 +141,7 @@ "tagAlias": { | ||
"associations": { | ||
"type": "array" | ||
"type": "array", | ||
"description": "The associations property is reserved for future use." | ||
}, | ||
"enumarations": { | ||
"enumerations": { | ||
"description": "The enumerations property is reserved for future use.", | ||
"type": "array", | ||
@@ -98,2 +157,3 @@ "items": { | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
@@ -100,0 +160,0 @@ "name": { |
{ | ||
"name": "moddle", | ||
"version": "7.0.0", | ||
"version": "7.1.0", | ||
"description": "A library for importing meta-model based file formats into JS", | ||
"scripts": { | ||
"all": "run-s lint test test:build", | ||
"all": "run-s lint test test:schema", | ||
"lint": "eslint .", | ||
"pretest": "run-s build", | ||
"dev": "npm test -- --watch", | ||
"test": "mocha --reporter=spec --recursive test/spec", | ||
"test": "mocha --reporter=spec --recursive test", | ||
"test:schema": "ajv -s docs/moddle.json -d 'test/fixtures/**/*.json'", | ||
"build": "rollup -c", | ||
"prepare": "npm run build", | ||
"test:build": "mocha --reporter=spec --recursive test/distro" | ||
"prepare": "run-s build" | ||
}, | ||
@@ -49,5 +49,6 @@ "type": "module", | ||
"ajv": "^8.12.0", | ||
"ajv-cli": "^5.0.0", | ||
"chai": "^4.3.7", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-bpmn-io": "^1.0.0", | ||
"eslint": "^9.12.0", | ||
"eslint-plugin-bpmn-io": "^2.0.2", | ||
"fast-glob": "^3.3.2", | ||
@@ -54,0 +55,0 @@ "mocha": "^10.2.0", |
@@ -50,6 +50,13 @@ # moddle | ||
### Validate the schema | ||
You can validate your schema with [the provided JSON schema](./docs/moddle.json): | ||
```bash | ||
npx ajv-cli -s docs/moddle.json -d my-schema.json | ||
``` | ||
### Instantiate moddle | ||
You can instantiate a moddle instance with a set of defined schemas: | ||
You can instantiate a moddle instance with a set of defined schemas: | ||
@@ -56,0 +63,0 @@ ```javascript |
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
285919
13
4296
145
9
1