taggor 0.3.0 → 0.5.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taggor",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "The taggor CLI: login, init, dev, publish, promote, rollback, sites, data and logs.",
5
5
  "keywords": [
6
6
  "taggor",
@@ -36,10 +36,10 @@
36
36
  "@taggor/api-client": "0.0.0",
37
37
  "@taggor/builder": "0.0.0",
38
38
  "@taggor/config": "0.0.0",
39
- "@taggor/contract": "0.3.0",
40
- "@taggor/runtime": "0.3.0",
41
- "@taggor/server": "0.3.0",
42
- "@taggor/component": "0.3.0",
39
+ "@taggor/contract": "0.5.0",
40
+ "@taggor/runtime": "0.5.0",
41
+ "@taggor/server": "0.5.0",
42
+ "@taggor/component": "0.5.0",
43
43
  "@types/node": "26.6.5",
44
44
  "ajv": "8.20.0",
45
45
  "citty": "0.2.2",
@@ -37,31 +37,9 @@
37
37
  "loading": {
38
38
  "type": "string",
39
39
  "enum": ["eager", "idle"]
40
- },
41
- "site_source": {
42
- "type": "object",
43
- "properties": {
44
- "from": {
45
- "type": "string",
46
- "enum": ["flag", "project"]
47
- },
48
- "path": {
49
- "type": ["string", "null"]
50
- }
51
- },
52
- "required": ["from", "path"],
53
- "additionalProperties": false
54
40
  }
55
41
  },
56
- "required": [
57
- "site_id",
58
- "site_key",
59
- "component_id",
60
- "tag",
61
- "channel",
62
- "created",
63
- "site_source"
64
- ],
42
+ "required": ["site_id", "site_key", "component_id", "tag", "channel", "created"],
65
43
  "additionalProperties": false
66
44
  }
67
45
  },
package/schemas/init.json CHANGED
@@ -43,6 +43,9 @@
43
43
  "managed": {
44
44
  "type": "boolean"
45
45
  },
46
+ "workspace": {
47
+ "type": ["string", "null"]
48
+ },
46
49
  "agent": {
47
50
  "anyOf": [
48
51
  {
@@ -90,6 +93,7 @@
90
93
  "overwritten",
91
94
  "already_listed",
92
95
  "managed",
96
+ "workspace",
93
97
  "agent"
94
98
  ],
95
99
  "additionalProperties": false
@@ -0,0 +1,114 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "anyOf": [
4
+ {
5
+ "type": "object",
6
+ "properties": {
7
+ "ok": {
8
+ "type": "boolean",
9
+ "const": true
10
+ },
11
+ "command": {
12
+ "type": "string",
13
+ "const": "preview"
14
+ },
15
+ "data": {
16
+ "type": "object",
17
+ "properties": {
18
+ "component_id": {
19
+ "type": "string"
20
+ },
21
+ "tag": {
22
+ "type": "string"
23
+ },
24
+ "workspace": {
25
+ "type": ["string", "null"]
26
+ },
27
+ "build_id": {
28
+ "type": ["string", "null"]
29
+ },
30
+ "spent_build": {
31
+ "type": "boolean"
32
+ },
33
+ "version_id": {
34
+ "type": ["string", "null"]
35
+ },
36
+ "semver": {
37
+ "type": ["string", "null"]
38
+ },
39
+ "channel": {
40
+ "anyOf": [
41
+ {
42
+ "type": "string",
43
+ "enum": ["staging", "production"]
44
+ },
45
+ {
46
+ "type": "null"
47
+ }
48
+ ]
49
+ },
50
+ "preview_url": {
51
+ "type": ["string", "null"]
52
+ },
53
+ "preview_state": {
54
+ "type": "string",
55
+ "enum": ["ready", "off"]
56
+ }
57
+ },
58
+ "required": [
59
+ "component_id",
60
+ "tag",
61
+ "workspace",
62
+ "build_id",
63
+ "spent_build",
64
+ "version_id",
65
+ "semver",
66
+ "channel",
67
+ "preview_url",
68
+ "preview_state"
69
+ ],
70
+ "additionalProperties": false
71
+ }
72
+ },
73
+ "required": ["ok", "command", "data"],
74
+ "additionalProperties": false
75
+ },
76
+ {
77
+ "type": "object",
78
+ "properties": {
79
+ "ok": {
80
+ "type": "boolean",
81
+ "const": false
82
+ },
83
+ "command": {
84
+ "type": "string",
85
+ "const": "preview"
86
+ },
87
+ "error": {
88
+ "type": "object",
89
+ "properties": {
90
+ "code": {
91
+ "type": "string"
92
+ },
93
+ "message": {
94
+ "type": "string"
95
+ },
96
+ "request_id": {
97
+ "type": ["string", "null"]
98
+ },
99
+ "exit_code": {
100
+ "type": "integer",
101
+ "minimum": -9007199254740991,
102
+ "maximum": 9007199254740991
103
+ }
104
+ },
105
+ "required": ["code", "message", "request_id", "exit_code"],
106
+ "additionalProperties": false
107
+ }
108
+ },
109
+ "required": ["ok", "command", "error"],
110
+ "additionalProperties": false
111
+ }
112
+ ],
113
+ "title": "taggor preview --json"
114
+ }
@@ -135,24 +135,31 @@
135
135
  "type": "boolean"
136
136
  },
137
137
  "package": {
138
- "type": "object",
139
- "properties": {
140
- "bytes": {
141
- "type": "integer",
142
- "minimum": -9007199254740991,
143
- "maximum": 9007199254740991
144
- },
145
- "sha256": {
146
- "type": "string"
138
+ "anyOf": [
139
+ {
140
+ "type": "object",
141
+ "properties": {
142
+ "bytes": {
143
+ "type": "integer",
144
+ "minimum": -9007199254740991,
145
+ "maximum": 9007199254740991
146
+ },
147
+ "sha256": {
148
+ "type": "string"
149
+ },
150
+ "files": {
151
+ "type": "integer",
152
+ "minimum": -9007199254740991,
153
+ "maximum": 9007199254740991
154
+ }
155
+ },
156
+ "required": ["bytes", "sha256", "files"],
157
+ "additionalProperties": false
147
158
  },
148
- "files": {
149
- "type": "integer",
150
- "minimum": -9007199254740991,
151
- "maximum": 9007199254740991
159
+ {
160
+ "type": "null"
152
161
  }
153
- },
154
- "required": ["bytes", "sha256", "files"],
155
- "additionalProperties": false
162
+ ]
156
163
  },
157
164
  "skipped": {
158
165
  "type": "array",
@@ -206,20 +213,6 @@
206
213
  "attached_channel": {
207
214
  "type": "string",
208
215
  "enum": ["staging", "production"]
209
- },
210
- "source": {
211
- "type": "object",
212
- "properties": {
213
- "from": {
214
- "type": "string",
215
- "enum": ["flag", "project"]
216
- },
217
- "path": {
218
- "type": ["string", "null"]
219
- }
220
- },
221
- "required": ["from", "path"],
222
- "additionalProperties": false
223
216
  }
224
217
  },
225
218
  "required": [
@@ -229,45 +222,7 @@
229
222
  "snippet",
230
223
  "loader_url",
231
224
  "attachment",
232
- "attached_channel",
233
- "source"
234
- ],
235
- "additionalProperties": false
236
- }
237
- },
238
- "sites_not_attached": {
239
- "type": "array",
240
- "items": {
241
- "type": "object",
242
- "properties": {
243
- "id": {
244
- "type": "string"
245
- },
246
- "site_key": {
247
- "type": "string"
248
- },
249
- "name": {
250
- "type": "string"
251
- },
252
- "environment": {
253
- "type": "string",
254
- "enum": ["staging", "production"]
255
- },
256
- "reason": {
257
- "type": "string",
258
- "enum": ["production_site_from_project"]
259
- },
260
- "attach_command": {
261
- "type": "string"
262
- }
263
- },
264
- "required": [
265
- "id",
266
- "site_key",
267
- "name",
268
- "environment",
269
- "reason",
270
- "attach_command"
225
+ "attached_channel"
271
226
  ],
272
227
  "additionalProperties": false
273
228
  }
@@ -329,7 +284,6 @@
329
284
  "package",
330
285
  "skipped",
331
286
  "sites",
332
- "sites_not_attached",
333
287
  "preview_url",
334
288
  "warnings"
335
289
  ],
package/schemas/pull.json CHANGED
@@ -13,67 +13,160 @@
13
13
  "const": "pull"
14
14
  },
15
15
  "data": {
16
- "type": "object",
17
- "properties": {
18
- "mode": {
19
- "type": "string",
20
- "enum": ["created", "component-added"]
21
- },
22
- "root": {
23
- "type": "string"
24
- },
25
- "component_id": {
26
- "type": "string"
16
+ "oneOf": [
17
+ {
18
+ "type": "object",
19
+ "properties": {
20
+ "mode": {
21
+ "type": "string",
22
+ "enum": ["created", "component-added"]
23
+ },
24
+ "root": {
25
+ "type": "string"
26
+ },
27
+ "component_id": {
28
+ "type": "string"
29
+ },
30
+ "tag": {
31
+ "type": "string"
32
+ },
33
+ "version_id": {
34
+ "type": "string"
35
+ },
36
+ "semver": {
37
+ "type": ["string", "null"]
38
+ },
39
+ "sha256": {
40
+ "type": "string"
41
+ },
42
+ "path": {
43
+ "type": "string"
44
+ },
45
+ "managed": {
46
+ "type": "boolean"
47
+ },
48
+ "written": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "string"
52
+ }
53
+ },
54
+ "overwritten": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "string"
58
+ }
59
+ },
60
+ "already_listed": {
61
+ "type": "boolean"
62
+ }
63
+ },
64
+ "required": [
65
+ "mode",
66
+ "root",
67
+ "component_id",
68
+ "tag",
69
+ "version_id",
70
+ "semver",
71
+ "sha256",
72
+ "path",
73
+ "managed",
74
+ "written",
75
+ "overwritten",
76
+ "already_listed"
77
+ ],
78
+ "additionalProperties": false
27
79
  },
28
- "tag": {
29
- "type": "string"
30
- },
31
- "version_id": {
32
- "type": "string"
33
- },
34
- "semver": {
35
- "type": ["string", "null"]
36
- },
37
- "sha256": {
38
- "type": "string"
39
- },
40
- "path": {
41
- "type": "string"
42
- },
43
- "managed": {
44
- "type": "boolean"
45
- },
46
- "written": {
47
- "type": "array",
48
- "items": {
49
- "type": "string"
50
- }
51
- },
52
- "overwritten": {
53
- "type": "array",
54
- "items": {
55
- "type": "string"
56
- }
57
- },
58
- "already_listed": {
59
- "type": "boolean"
80
+ {
81
+ "type": "object",
82
+ "properties": {
83
+ "mode": {
84
+ "type": "string",
85
+ "const": "workspace"
86
+ },
87
+ "root": {
88
+ "type": "string"
89
+ },
90
+ "workspace": {
91
+ "type": "string"
92
+ },
93
+ "managed": {
94
+ "type": "boolean"
95
+ },
96
+ "components": {
97
+ "type": "array",
98
+ "items": {
99
+ "oneOf": [
100
+ {
101
+ "type": "object",
102
+ "properties": {
103
+ "tag": {
104
+ "type": "string"
105
+ },
106
+ "status": {
107
+ "type": "string",
108
+ "const": "pulled"
109
+ },
110
+ "component_id": {
111
+ "type": ["string", "null"]
112
+ },
113
+ "version_id": {
114
+ "type": "string"
115
+ },
116
+ "semver": {
117
+ "type": ["string", "null"]
118
+ },
119
+ "sha256": {
120
+ "type": "string"
121
+ },
122
+ "path": {
123
+ "type": "string"
124
+ },
125
+ "overwritten": {
126
+ "type": "array",
127
+ "items": {
128
+ "type": "string"
129
+ }
130
+ }
131
+ },
132
+ "required": [
133
+ "tag",
134
+ "status",
135
+ "component_id",
136
+ "version_id",
137
+ "semver",
138
+ "sha256",
139
+ "path",
140
+ "overwritten"
141
+ ],
142
+ "additionalProperties": false
143
+ },
144
+ {
145
+ "type": "object",
146
+ "properties": {
147
+ "tag": {
148
+ "type": "string"
149
+ },
150
+ "status": {
151
+ "type": "string",
152
+ "const": "skipped"
153
+ },
154
+ "reason": {
155
+ "type": "string",
156
+ "enum": ["no-source", "present", "changed"]
157
+ }
158
+ },
159
+ "required": ["tag", "status", "reason"],
160
+ "additionalProperties": false
161
+ }
162
+ ]
163
+ }
164
+ }
165
+ },
166
+ "required": ["mode", "root", "workspace", "managed", "components"],
167
+ "additionalProperties": false
60
168
  }
61
- },
62
- "required": [
63
- "mode",
64
- "root",
65
- "component_id",
66
- "tag",
67
- "version_id",
68
- "semver",
69
- "sha256",
70
- "path",
71
- "managed",
72
- "written",
73
- "overwritten",
74
- "already_listed"
75
- ],
76
- "additionalProperties": false
169
+ ]
77
170
  }
78
171
  },
79
172
  "required": ["ok", "command", "data"],
@@ -49,26 +49,6 @@
49
49
  },
50
50
  "required": ["html", "src"],
51
51
  "additionalProperties": false
52
- },
53
- "project_file": {
54
- "type": "object",
55
- "properties": {
56
- "state": {
57
- "type": "string",
58
- "enum": ["none", "written", "kept", "skipped", "failed"]
59
- },
60
- "path": {
61
- "type": ["string", "null"]
62
- },
63
- "reason": {
64
- "type": ["string", "null"]
65
- },
66
- "kept_site_key": {
67
- "type": ["string", "null"]
68
- }
69
- },
70
- "required": ["state", "path", "reason", "kept_site_key"],
71
- "additionalProperties": false
72
52
  }
73
53
  },
74
54
  "required": [
@@ -78,8 +58,7 @@
78
58
  "environment",
79
59
  "status",
80
60
  "allowed_domains",
81
- "snippet",
82
- "project_file"
61
+ "snippet"
83
62
  ],
84
63
  "additionalProperties": false
85
64
  }