{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://proa.so/schema/proa.lock.json",
"title": "Proa installed component lock",
"type": "object",
"additionalProperties": false,
"required": ["$schema", "components"],
"properties": {
"$schema": { "const": "https://proa.so/schema/proa.lock.json" },
"components": {
"type": "object",
"propertyNames": {
"pattern": "^@[a-z0-9][a-z0-9_-]*/[a-z0-9](?:[a-z0-9_-]{0,126}[a-z0-9])?$"
},
"additionalProperties": { "$ref": "#/$defs/installedItem" }
}
},
"$defs": {
"installedItem": {
"type": "object",
"additionalProperties": false,
"required": [
"version",
"registry",
"mode",
"sourceHash",
"localHashAtInstall",
"installedFiles",
"dependencies",
"rustModules",
"cargoDependencies"
],
"properties": {
"version": { "type": "string", "minLength": 1, "maxLength": 128 },
"registry": { "type": "string", "pattern": "^@[a-z0-9][a-z0-9_-]*$" },
"mode": { "const": "source" },
"sourceHash": { "$ref": "#/$defs/sha256" },
"localHashAtInstall": { "$ref": "#/$defs/sha256" },
"installedFiles": {
"type": "array",
"uniqueItems": true,
"items": { "$ref": "#/$defs/relativePath" }
},
"dependencies": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^@[a-z0-9][a-z0-9_-]*/[a-z0-9](?:[a-z0-9_-]{0,126}[a-z0-9])?$"
}
},
"rustModules": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["target", "modules"],
"properties": {
"target": { "$ref": "#/$defs/relativePath" },
"modules": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": { "type": "string", "pattern": "^[a-z_][a-z0-9_]*$" }
}
}
}
},
"cargoDependencies": {
"type": "array",
"uniqueItems": true,
"items": { "$ref": "#/$defs/cargoDependency" }
}
}
},
"cargoDependency": {
"type": "object",
"additionalProperties": false,
"required": ["name", "features"],
"oneOf": [
{ "required": ["path"], "not": { "required": ["version"] } },
{ "required": ["version"], "not": { "required": ["path"] } }
],
"properties": {
"name": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$" },
"path": { "$ref": "#/$defs/relativePath" },
"version": { "type": "string", "minLength": 1, "maxLength": 128 },
"registry": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$" },
"features": {
"type": "array",
"uniqueItems": true,
"items": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_+/-]*$" }
},
"defaultFeatures": { "type": "boolean" }
}
},
"sha256": {
"type": "string",
"pattern": "^sha256:[0-9a-f]{64}$"
},
"relativePath": {
"type": "string",
"minLength": 1,
"pattern": "^(?!/)(?!.*\\\\)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\u0000]+$"
}
}
}