diff --git a/package-lock.json b/package-lock.json index db81943..a58130c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@nasa-jpl/seq-json-schema", - "version": "1.1.0", + "version": "1.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@nasa-jpl/seq-json-schema", - "version": "1.1.0", + "version": "1.2.0", "license": "MIT", "devDependencies": { "ajv": "^8.12.0", @@ -161,14 +161,15 @@ } }, "node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", "dev": true, "hasInstallScript": true, "dependencies": { "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", "next-tick": "^1.1.0" }, "engines": { @@ -208,6 +209,27 @@ "es6-symbol": "^3.1.1" } }, + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esniff/node_modules/type": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz", + "integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==", + "dev": true + }, "node_modules/event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", @@ -714,13 +736,14 @@ } }, "es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", "dev": true, "requires": { "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", "next-tick": "^1.1.0" } }, @@ -757,6 +780,26 @@ "es6-symbol": "^3.1.1" } }, + "esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dev": true, + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "dependencies": { + "type": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz", + "integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==", + "dev": true + } + } + }, "event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", diff --git a/package.json b/package.json index 17d3919..4fa098c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nasa-jpl/seq-json-schema", - "version": "1.1.0", + "version": "1.2.0", "license": "MIT", "type": "module", "repository": { diff --git a/schema.json b/schema.json index 2460093..ddb92f3 100644 --- a/schema.json +++ b/schema.json @@ -1,5 +1,5 @@ { - "$id": "https://github.com/NASA-AMMOS/seq-json-schema/tree/v1.1.0", + "$id": "https://github.com/NASA-AMMOS/seq-json-schema/tree/v1.2.0", "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "immediate_activate": { @@ -34,7 +34,7 @@ "description": "Onboard path and filename of sequence to be loaded." }, "type": { - "const": "activate" + "const": "immediate_activate" } }, "required": ["sequence", "type"], @@ -120,12 +120,18 @@ "metadata": { "$ref": "#/$defs/metadata" }, + "models": { + "items": { + "$ref": "#/$defs/model" + }, + "type": "array" + }, "stem": { "type": "string", "description": "Command stem" }, "type": { - "const": "command" + "const": "immediate_command" } }, "required": ["stem", "args"], @@ -284,7 +290,7 @@ "description": "Onboard path and filename of sequence to be loaded." }, "type": { - "const": "load" + "const": "immediate_load" } }, "required": ["sequence", "type"], diff --git a/test/invalid-seq-json/immediate-activate-with-time.seq.json b/test/invalid-seq-json/immediate-activate-with-time.seq.json index f318c5a..47e670b 100644 --- a/test/invalid-seq-json/immediate-activate-with-time.seq.json +++ b/test/invalid-seq-json/immediate-activate-with-time.seq.json @@ -6,7 +6,7 @@ "args": [], "sequence": "d:/eng/test.mod", "description": "immediate activate with time field", - "type": "activate", + "type": "immediate_activate", "time": { "type": "COMMAND_RELATIVE" } diff --git a/test/invalid-seq-json/immediate-command-with-time.seq.json b/test/invalid-seq-json/immediate-command-with-time.seq.json index 116f831..47e8339 100644 --- a/test/invalid-seq-json/immediate-command-with-time.seq.json +++ b/test/invalid-seq-json/immediate-command-with-time.seq.json @@ -11,7 +11,8 @@ "args": [], "time": { "type": "COMMAND_COMPLETE" - } + }, + "type": "immediate_command" } ] } diff --git a/test/invalid-seq-json/immediate-load-with-time.seq.json b/test/invalid-seq-json/immediate-load-with-time.seq.json index 1faebda..1c7d0ab 100644 --- a/test/invalid-seq-json/immediate-load-with-time.seq.json +++ b/test/invalid-seq-json/immediate-load-with-time.seq.json @@ -6,7 +6,7 @@ "args": [], "sequence": "d:/eng/test.mod", "description": "immediate load with time field", - "type": "load", + "type": "immediate_load", "time": { "type": "COMMAND_RELATIVE" } diff --git a/test/valid-seq-json/rtc.seq.json b/test/valid-seq-json/rtc.seq.json index 4ece582..b246528 100644 --- a/test/valid-seq-json/rtc.seq.json +++ b/test/valid-seq-json/rtc.seq.json @@ -34,6 +34,13 @@ "metadata": { "processor": "VC1A" }, + "models": [ + { + "offset": "00:10:00.000", + "variable": "model_var_float", + "value": "1.62" + } + ], "args": [] }, { @@ -42,8 +49,9 @@ "metadata": { "processor": "VC1A" }, + "args": [], - "type": "command" + "type": "immediate_command" }, { "args": [ @@ -63,7 +71,7 @@ } ], "sequence": "d:/eng/test.mod", - "type": "activate", + "type": "immediate_activate", "metadata": { "metadata_arg": "metadata_value" } @@ -86,7 +94,7 @@ } ], "sequence": "d:/eng/test.mod", - "type": "load", + "type": "immediate_load", "metadata": { "metadata_arg": "metadata_value" }