Skip to content

Commit b4fb906

Browse files
committed
feat: Updated schemas
1 parent 1a727a8 commit b4fb906

2 files changed

Lines changed: 160 additions & 3 deletions

File tree

scripts/upload-resources.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,13 @@ async function main() {
3636

3737
const { id: resourceId } = resourceRow.data![0];
3838

39-
console.log(`Adding parameters for resource ${type}`)
4039
const parameters = Object.entries(resource.properties)
4140
.filter(([k]) => k !== 'type')
4241
.map(([key, property]) => ({
4342
type: property.type,
4443
name: key,
4544
resource_id: resourceId,
46-
schema: JSON.stringify(property),
45+
schema: property,
4746
}))
4847

4948
await client.from('registry_resource_parameters').upsert(parameters, {onConflict: ['name', 'resource_id']});

src/schemastore/codify-schema.json

Lines changed: 159 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,40 @@
3434
"required": ["type"],
3535
"additionalProperties": false
3636
},
37+
{
38+
"description": "Set and manage global git settings (email and username)",
39+
"type": "object",
40+
"properties": {
41+
"email": {
42+
"type": "string",
43+
"description": "The global email to set for git"
44+
},
45+
"username": {
46+
"type": "string",
47+
"description": "The global username to set for git"
48+
},
49+
"name": {
50+
"description": "Optional name. Useful for specifying multiple resources of the same type",
51+
"type": "string",
52+
"pattern": "^[\\w-]+$"
53+
},
54+
"dependsOn": {
55+
"type": "array",
56+
"items": {
57+
"type": "string"
58+
},
59+
"uniqueItems": true
60+
},
61+
"type": {
62+
"const": "git",
63+
"type": "string"
64+
}
65+
},
66+
"additionalProperties": false,
67+
"required": [
68+
"type"
69+
]
70+
},
3771
{
3872
"type": "object",
3973
"properties": {
@@ -901,7 +935,19 @@
901935
"type": "boolean",
902936
"description": "Specifies whether to use password authentication."
903937
}
904-
}
938+
},
939+
"oneOf": [
940+
{
941+
"required": [
942+
"Host"
943+
]
944+
},
945+
{
946+
"required": [
947+
"Match"
948+
]
949+
}
950+
]
905951
}
906952
},
907953
"name": {
@@ -1284,6 +1330,13 @@
12841330
]
12851331
}
12861332
},
1333+
"installFiles": {
1334+
"description": "A list of requirement files to install.",
1335+
"type": "array",
1336+
"items": {
1337+
"type": "string"
1338+
}
1339+
},
12871340
"name": {
12881341
"description": "Optional name. Useful for specifying multiple resources of the same type",
12891342
"type": "string",
@@ -1348,6 +1401,111 @@
13481401
"requirementFiles",
13491402
"type"
13501403
]
1404+
},
1405+
{
1406+
"description": "Install macports and manage packages.",
1407+
"type": "object",
1408+
"properties": {
1409+
"install": {
1410+
"type": "array",
1411+
"description": "Installs packages.",
1412+
"items": {
1413+
"oneOf": [
1414+
{
1415+
"type": "string"
1416+
},
1417+
{
1418+
"type": "object",
1419+
"properties": {
1420+
"name": {
1421+
"type": "string"
1422+
},
1423+
"version": {
1424+
"type": "string"
1425+
}
1426+
},
1427+
"required": [
1428+
"name"
1429+
]
1430+
}
1431+
]
1432+
}
1433+
},
1434+
"name": {
1435+
"description": "Optional name. Useful for specifying multiple resources of the same type",
1436+
"type": "string",
1437+
"pattern": "^[\\w-]+$"
1438+
},
1439+
"dependsOn": {
1440+
"type": "array",
1441+
"items": {
1442+
"type": "string"
1443+
},
1444+
"uniqueItems": true
1445+
},
1446+
"type": {
1447+
"const": "macports",
1448+
"type": "string"
1449+
}
1450+
},
1451+
"additionalProperties": false,
1452+
"required": [
1453+
"type"
1454+
]
1455+
},
1456+
{
1457+
"description": "Install and manage packages using NPM.",
1458+
"type": "object",
1459+
"properties": {
1460+
"globalInstall": {
1461+
"type": "array",
1462+
"description": "An array of",
1463+
"items": {
1464+
"oneOf": [
1465+
{
1466+
"type": "string",
1467+
"description": "Npm packages to install globally"
1468+
},
1469+
{
1470+
"type": "object",
1471+
"properties": {
1472+
"name": {
1473+
"type": "string",
1474+
"description": "The name of the package to install"
1475+
},
1476+
"version": {
1477+
"type": "string",
1478+
"description": "The version of package to install"
1479+
}
1480+
},
1481+
"required": [
1482+
"name"
1483+
]
1484+
}
1485+
]
1486+
}
1487+
},
1488+
"name": {
1489+
"description": "Optional name. Useful for specifying multiple resources of the same type",
1490+
"type": "string",
1491+
"pattern": "^[\\w-]+$"
1492+
},
1493+
"dependsOn": {
1494+
"type": "array",
1495+
"items": {
1496+
"type": "string"
1497+
},
1498+
"uniqueItems": true
1499+
},
1500+
"type": {
1501+
"const": "npm",
1502+
"type": "string"
1503+
}
1504+
},
1505+
"additionalProperties": false,
1506+
"required": [
1507+
"type"
1508+
]
13511509
}
13521510
]
13531511
}

0 commit comments

Comments
 (0)