From 68ea6cd12b1293edbce9922feeb6a7e0107b59a2 Mon Sep 17 00:00:00 2001 From: changzheng6 Date: Mon, 16 Jan 2023 14:05:54 +0800 Subject: [PATCH] add shared type for module Signed-off-by: changzheng6 --- modulecheck/module.json | 97 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 91 insertions(+), 6 deletions(-) diff --git a/modulecheck/module.json b/modulecheck/module.json index ffa0aba6..77366ca1 100644 --- a/modulecheck/module.json +++ b/modulecheck/module.json @@ -16,6 +16,36 @@ "description": "Indicates the configuration of a .hap file. The module configuration is valid only for the current .hap file.", "type": "object", "allOf": [ + { + "if": { + "properties": { + "type": { + "const": "shared" + } + } + }, + "then": { + "propertyNames": { + "enum": [ + "name", + "type", + "description", + "deliveryWithInstall", + "deviceTypes", + "pages", + "metadata", + "requestPermissions", + "dependencies", + "libIsolation" + ] + }, + "required": [ + "name", + "type", + "deviceTypes" + ] + } + }, { "if": { "properties": { @@ -24,6 +54,33 @@ } } }, + "then": { + "propertyNames": { + "enum": [ + "name", + "type", + "description", + "deviceTypes", + "uiSyntax", + "metadata", + "requestPermissions" + ] + }, + "required": [ + "name", + "type", + "deviceTypes" + ] + } + }, + { + "if": { + "properties": { + "type": { + "const": "entry" + } + } + }, "then": { "propertyNames": { "enum": [ @@ -34,9 +91,11 @@ "process", "mainElement", "deviceTypes", + "deliveryWithInstall", "installationFree", "virtualMachine", "uiSyntax", + "pages", "metadata", "abilities", "extensionAbilities", @@ -50,10 +109,21 @@ "required": [ "name", "type", - "deviceTypes" + "deviceTypes", + "deliveryWithInstall", + "pages" ] + } + }, + { + "if": { + "properties": { + "type": { + "const": "feature" + } + } }, - "else": { + "then": { "propertyNames": { "enum": [ "name", @@ -100,7 +170,8 @@ "enum": [ "entry", "feature", - "har" + "har", + "shared" ] }, "srcEntrance": { @@ -956,11 +1027,25 @@ } }, "dependencies": { - "description": "Indicates the module names that this module depends on", + "description": "Indicates the module names that this module depends on.", "type": "array", "items": { - "type": "string", - "maxLength": 127 + "type": "object", + "propertyNames": { + "enum": [ + "moduleName" + ] + }, + "required": [ + "moduleName" + ], + "properties":{ + "moduleName": { + "description": "Indicates the module name of the dependency shared library.", + "type": "string", + "maxLength": 31 + } + } } }, "libIsolation": { -- Gitee