script/win/modulecheck/appStartup.json

140 lines
3.8 KiB
JSON
Raw Normal View History

2025-01-21 11:30:03 +08:00
{
"title": "JSON schema for app_startup.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"required": [
"configEntry"
],
"propertyNames": {
"enum": [
"startupTasks",
2025-05-09 08:58:27 +08:00
"configEntry",
"appPreloadHintStartupTasks"
2025-01-21 11:30:03 +08:00
]
},
"properties": {
"startupTasks": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"propertyNames": {
"enum": [
"name",
"srcEntry",
"dependencies",
"excludeFromAutoStart",
"runOnThread",
"waitOnMainThread"
]
},
"required": [
"name",
"srcEntry"
],
"properties": {
"name": {
"description": "Indicates the name of the startup task.",
"type": "string",
"pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$",
"maxLength": 127
},
"srcEntry": {
"description": "Indicates the js code path corresponding to the startup task.",
"type": "string",
"maxLength": 127
},
"dependencies": {
"description": "Indicates the dependencies of the startup task.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
},
"default": []
},
"excludeFromAutoStart": {
"description": "Indicates whether the startup task is excluded from automatic start.",
"type": "boolean",
"default": false
},
"runOnThread": {
"description": "Indicates the running thread of the startup task.",
"type": "string",
"enum": [
"mainThread",
"taskPool"
],
"default": "mainThread"
},
"waitOnMainThread": {
"description": "Indicates whether the startup task block the main thread.",
"type": "boolean",
"default": true
}
}
}
},
"configEntry": {
"description": "Indicates the js code path corresponding to the startup config.",
"type": "string",
"maxLength": 127
2025-05-09 08:58:27 +08:00
},
"appPreloadHintStartupTasks": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"propertyNames": {
"enum": [
"name",
"srcEntry",
"dependencies",
"excludeFromAutoStart",
"runOnThread"
]
},
"required": [
"name",
"srcEntry",
"runOnThread"
],
"properties": {
"name": {
"description": "Indicates the name of the preload task.",
"type": "string",
"pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$",
"maxLength": 127
},
"srcEntry": {
"description": "Indicates the js code path corresponding to the preload task.",
"type": "string",
"maxLength": 127
},
"dependencies": {
"description": "Indicates the dependencies of the preload task.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
},
"default": []
},
"excludeFromAutoStart": {
"description": "Indicates whether the preload task is excluded from automatic start.",
"type": "boolean",
"default": false
},
"runOnThread": {
"description": "Indicates the running thread, preload task runs only on child thread.",
"type": "string",
"enum": [
"taskPool"
]
}
}
}
2025-01-21 11:30:03 +08:00
}
}
}