mano-coding 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mano-coding.js +18 -0
- package/dist/bin.js +41972 -0
- package/dist/index.d.ts +175 -0
- package/dist/index.js +31 -0
- package/dist/schemas/installations.schema.json +206 -0
- package/dist/schemas/manifest.schema.json +65 -0
- package/dist/schemas/project-lock.schema.json +456 -0
- package/dist/schemas/registry-entry.schema.json +86 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +55 -0
- package/schemas/installations.schema.json +206 -0
- package/schemas/manifest.schema.json +65 -0
- package/schemas/project-lock.schema.json +456 -0
- package/schemas/registry-entry.schema.json +86 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "installations.schema.json",
|
|
4
|
+
"title": "Mano Coding User Installations",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["kind", "generatedBy", "machine", "updatedAt", "installations"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"kind": { "const": "Installations" },
|
|
9
|
+
"generatedBy": { "$ref": "#/$defs/generatedBy" },
|
|
10
|
+
"machine": { "$ref": "#/$defs/machine" },
|
|
11
|
+
"updatedAt": { "$ref": "#/$defs/dateTime" },
|
|
12
|
+
"installations": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": { "$ref": "#/$defs/installation" }
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"$defs": {
|
|
19
|
+
"packageName": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*$",
|
|
22
|
+
"maxLength": 214
|
|
23
|
+
},
|
|
24
|
+
"localId": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
|
|
27
|
+
"maxLength": 64
|
|
28
|
+
},
|
|
29
|
+
"semver": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(?:\\+[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*)?$"
|
|
32
|
+
},
|
|
33
|
+
"integrity": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^(sha256|sha512)-[A-Za-z0-9+/]+={0,2}$",
|
|
36
|
+
"maxLength": 256
|
|
37
|
+
},
|
|
38
|
+
"digest": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
41
|
+
},
|
|
42
|
+
"dateTime": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"format": "date-time"
|
|
45
|
+
},
|
|
46
|
+
"absolutePath": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"minLength": 1,
|
|
49
|
+
"maxLength": 1024,
|
|
50
|
+
"pattern": "^(?!.*\\\\).+$",
|
|
51
|
+
"description": "Machine-local normalized absolute path; forward slashes only, even on Windows"
|
|
52
|
+
},
|
|
53
|
+
"generatedBy": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"required": ["cliVersion"],
|
|
56
|
+
"properties": {
|
|
57
|
+
"cliVersion": { "$ref": "#/$defs/semver" }
|
|
58
|
+
},
|
|
59
|
+
"additionalProperties": false
|
|
60
|
+
},
|
|
61
|
+
"machine": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"required": ["platform", "arch"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"platform": { "enum": ["win32", "darwin", "linux"] },
|
|
66
|
+
"arch": { "enum": ["x64", "arm64"] }
|
|
67
|
+
},
|
|
68
|
+
"additionalProperties": false
|
|
69
|
+
},
|
|
70
|
+
"owner": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"required": ["kind", "packageId", "id"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"kind": { "enum": ["project", "capability", "plugin"] },
|
|
75
|
+
"packageId": { "$ref": "#/$defs/packageName" },
|
|
76
|
+
"id": { "$ref": "#/$defs/localId" }
|
|
77
|
+
},
|
|
78
|
+
"additionalProperties": false
|
|
79
|
+
},
|
|
80
|
+
"command": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"required": ["name", "executable", "args"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
85
|
+
"executable": { "$ref": "#/$defs/absolutePath" },
|
|
86
|
+
"args": {
|
|
87
|
+
"type": "array",
|
|
88
|
+
"items": { "type": "string", "maxLength": 1024 }
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"additionalProperties": false
|
|
92
|
+
},
|
|
93
|
+
"pathEntry": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"required": ["path", "operation"],
|
|
96
|
+
"properties": {
|
|
97
|
+
"path": { "$ref": "#/$defs/absolutePath" },
|
|
98
|
+
"operation": { "enum": ["prepend", "append"] }
|
|
99
|
+
},
|
|
100
|
+
"additionalProperties": false
|
|
101
|
+
},
|
|
102
|
+
"environmentVariable": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"required": ["name", "valueDigest"],
|
|
105
|
+
"properties": {
|
|
106
|
+
"name": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
|
|
109
|
+
"maxLength": 128
|
|
110
|
+
},
|
|
111
|
+
"valueDigest": { "$ref": "#/$defs/digest" }
|
|
112
|
+
},
|
|
113
|
+
"additionalProperties": false
|
|
114
|
+
},
|
|
115
|
+
"environment": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"required": ["pathEntries", "variables"],
|
|
118
|
+
"properties": {
|
|
119
|
+
"pathEntries": {
|
|
120
|
+
"type": "array",
|
|
121
|
+
"items": { "$ref": "#/$defs/pathEntry" }
|
|
122
|
+
},
|
|
123
|
+
"variables": {
|
|
124
|
+
"type": "array",
|
|
125
|
+
"items": { "$ref": "#/$defs/environmentVariable" }
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"additionalProperties": false
|
|
129
|
+
},
|
|
130
|
+
"reference": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"required": ["projectRoot", "lockDigest", "lastSeenAt"],
|
|
133
|
+
"properties": {
|
|
134
|
+
"projectRoot": { "$ref": "#/$defs/absolutePath" },
|
|
135
|
+
"lockDigest": { "$ref": "#/$defs/digest" },
|
|
136
|
+
"lastSeenAt": { "$ref": "#/$defs/dateTime" }
|
|
137
|
+
},
|
|
138
|
+
"additionalProperties": false
|
|
139
|
+
},
|
|
140
|
+
"health": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"required": ["status"],
|
|
143
|
+
"properties": {
|
|
144
|
+
"status": { "enum": ["unknown", "healthy", "degraded", "broken"] },
|
|
145
|
+
"checkedAt": { "$ref": "#/$defs/dateTime" },
|
|
146
|
+
"message": { "type": "string", "minLength": 1, "maxLength": 500 }
|
|
147
|
+
},
|
|
148
|
+
"additionalProperties": false
|
|
149
|
+
},
|
|
150
|
+
"failure": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"required": ["code", "message", "failedAt"],
|
|
153
|
+
"properties": {
|
|
154
|
+
"code": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
155
|
+
"message": { "type": "string", "minLength": 1, "maxLength": 500 },
|
|
156
|
+
"failedAt": { "$ref": "#/$defs/dateTime" }
|
|
157
|
+
},
|
|
158
|
+
"additionalProperties": false
|
|
159
|
+
},
|
|
160
|
+
"installation": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"required": [
|
|
163
|
+
"owner",
|
|
164
|
+
"version",
|
|
165
|
+
"state",
|
|
166
|
+
"integrity",
|
|
167
|
+
"commands",
|
|
168
|
+
"environment",
|
|
169
|
+
"references",
|
|
170
|
+
"health",
|
|
171
|
+
"updatedAt"
|
|
172
|
+
],
|
|
173
|
+
"properties": {
|
|
174
|
+
"owner": { "$ref": "#/$defs/owner" },
|
|
175
|
+
"version": { "$ref": "#/$defs/semver" },
|
|
176
|
+
"state": { "enum": ["ready", "failed"] },
|
|
177
|
+
"root": { "$ref": "#/$defs/absolutePath" },
|
|
178
|
+
"integrity": { "$ref": "#/$defs/integrity" },
|
|
179
|
+
"commands": {
|
|
180
|
+
"type": "array",
|
|
181
|
+
"items": { "$ref": "#/$defs/command" }
|
|
182
|
+
},
|
|
183
|
+
"environment": { "$ref": "#/$defs/environment" },
|
|
184
|
+
"references": {
|
|
185
|
+
"type": "array",
|
|
186
|
+
"items": { "$ref": "#/$defs/reference" }
|
|
187
|
+
},
|
|
188
|
+
"health": { "$ref": "#/$defs/health" },
|
|
189
|
+
"installedAt": { "$ref": "#/$defs/dateTime" },
|
|
190
|
+
"updatedAt": { "$ref": "#/$defs/dateTime" },
|
|
191
|
+
"failure": { "$ref": "#/$defs/failure" }
|
|
192
|
+
},
|
|
193
|
+
"additionalProperties": false,
|
|
194
|
+
"allOf": [
|
|
195
|
+
{
|
|
196
|
+
"if": {
|
|
197
|
+
"properties": { "state": { "const": "ready" } },
|
|
198
|
+
"required": ["state"]
|
|
199
|
+
},
|
|
200
|
+
"then": { "required": ["root", "installedAt"] },
|
|
201
|
+
"else": { "required": ["failure"] }
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "manifest.schema.json",
|
|
4
|
+
"title": "Mano Coding Template Manifest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["id", "version", "name", "description"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*$",
|
|
11
|
+
"maxLength": 214
|
|
12
|
+
},
|
|
13
|
+
"version": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(?:\\+[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*)?$"
|
|
16
|
+
},
|
|
17
|
+
"name": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1,
|
|
20
|
+
"maxLength": 100
|
|
21
|
+
},
|
|
22
|
+
"description": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"minLength": 1,
|
|
25
|
+
"maxLength": 1000
|
|
26
|
+
},
|
|
27
|
+
"tasks": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"required": ["id", "command"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"id": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$",
|
|
36
|
+
"maxLength": 64
|
|
37
|
+
},
|
|
38
|
+
"command": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1,
|
|
41
|
+
"maxLength": 256
|
|
42
|
+
},
|
|
43
|
+
"args": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"cwd": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"maxLength": 512
|
|
52
|
+
},
|
|
53
|
+
"env": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"additionalProperties": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"additionalProperties": false
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"additionalProperties": false
|
|
65
|
+
}
|