arcadible 0.1.28 → 0.1.31
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/README.md +66 -2
- package/bin/arc-build.js +18 -25
- package/bin/arc-default.js +3 -2
- package/bin/arc-deploy.js +198 -58
- package/bin/arc-init.js +32 -51
- package/bin/arc-inspect.js +7 -37
- package/bin/arc-login.js +6 -7
- package/bin/arc-logout.js +7 -8
- package/bin/arc-open.js +21 -21
- package/bin/arc-pack.js +11 -27
- package/bin/arc-play.js +28 -20
- package/bin/arc-validate.js +8 -20
- package/bin/arc-whoami.js +16 -10
- package/bin/arc.js +2 -2
- package/package.json +20 -6
- package/src/account.js +60 -7
- package/src/action/build/tool.js +12 -3
- package/src/action/deploy/tool-git.js +61 -11
- package/src/action/deploy/tool.js +47 -29
- package/src/action/deploy/wait.js +145 -0
- package/src/action/init/tool-patch.js +5 -28
- package/src/action/init/tool.js +8 -21
- package/src/action/inspect/tool.js +3 -38
- package/src/action/login/flow.js +1 -1
- package/src/action/open/tool.js +15 -3
- package/src/action/pack/limits.js +43 -0
- package/src/action/pack/tool.js +3 -7
- package/src/action/play/tool.js +74 -13
- package/src/action/predeploy/ac.js +14 -43
- package/src/action/predeploy/git.js +40 -61
- package/src/action/predeploy/published.js +69 -0
- package/src/action/predeploy/tool-git.js +58 -15
- package/src/action/predeploy/tool.js +5 -11
- package/src/action/validate/tool.js +28 -7
- package/src/api.js +56 -19
- package/src/cli/inspect.js +2 -2
- package/src/config/html.js +2 -1
- package/src/config/image.js +0 -1
- package/src/config/uri.js +1 -0
- package/src/parser/env.js +8 -3
- package/src/parser/manifest.js +16 -3
- package/src/parser/media.js +16 -11
- package/src/parser/project.js +38 -16
- package/src/parser/readme-file.js +69 -0
- package/src/parser/readme.js +37 -109
- package/src/parser/sections.js +107 -0
- package/src/phrase.js +382 -53
- package/src/schema/check/workflow.js +42 -5
- package/src/schema/game.js +164 -99
- package/src/schema/message.js +46 -0
- package/src/schema/readme.js +38 -0
- package/src/schema/workflow.js +27 -26
- package/src/util/argv.js +49 -0
- package/src/util/chars.js +30 -0
- package/src/util/delay.js +1 -1
- package/src/util/doc.js +50 -29
- package/src/util/http.js +5 -3
- package/src/util/image.js +46 -23
- package/src/util/links.js +63 -0
- package/src/util/log.js +36 -51
- package/src/util/md.js +39 -2
- package/src/util/output.js +34 -9
- package/src/util/paths.js +3 -1
- package/src/util/progress.js +19 -5
- package/src/util/rc.js +67 -11
- package/src/util/request.js +36 -32
- package/src/util/schema.js +12 -4
- package/src/util/shell.js +39 -7
- package/src/util/spinner.js +14 -3
- package/src/util/term.js +28 -0
- package/src/util/uris.js +8 -1
- package/src/util/video.js +49 -17
- package/src/util/zip.js +15 -0
- package/.eslintrc +0 -6
- package/src/action/inspect/media.js +0 -34
- package/src/config/game.js +0 -5
- package/src/util/dom.js +0 -46
package/src/phrase.js
CHANGED
|
@@ -6,10 +6,77 @@ const cfgproduct = require("./config/product");
|
|
|
6
6
|
|
|
7
7
|
// [declare]
|
|
8
8
|
|
|
9
|
+
const TITLE = cfgproduct.title;
|
|
9
10
|
const TOOL = cfgproduct.tool;
|
|
10
11
|
|
|
11
12
|
// [function]
|
|
12
13
|
|
|
14
|
+
// a message's reason, then each block of details after a blank line
|
|
15
|
+
// (OUTPUT.md). A block of several lines is an array.
|
|
16
|
+
const blocks = function (reason, ...details) {
|
|
17
|
+
return [reason, ...details.map((block) => [block].flat().join("\n"))].join(
|
|
18
|
+
"\n\n",
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// [function]
|
|
23
|
+
|
|
24
|
+
// a wait, in words: "5 minutes", "90 seconds".
|
|
25
|
+
const waited = function (seconds) {
|
|
26
|
+
if (seconds % 60 === 0) {
|
|
27
|
+
const minutes = seconds / 60;
|
|
28
|
+
return `${minutes} minute${minutes === 1 ? "" : "s"}`;
|
|
29
|
+
}
|
|
30
|
+
return `${seconds} second${seconds === 1 ? "" : "s"}`;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// [function]
|
|
34
|
+
|
|
35
|
+
// a build that exited with `code`, or was stopped by `signal`, with what it
|
|
36
|
+
// wrote to stderr.
|
|
37
|
+
const buildFailed = function ({ code, signal, stderr }) {
|
|
38
|
+
const output = stderr?.trim();
|
|
39
|
+
return blocks(
|
|
40
|
+
signal
|
|
41
|
+
? `Build stopped by ${signal}.`
|
|
42
|
+
: `Build failed with exit code ${code}.`,
|
|
43
|
+
...(output ? [output] : []),
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// [function]
|
|
48
|
+
|
|
49
|
+
const buildOutputMissing = function (dir) {
|
|
50
|
+
return `Build didn't create deploy_dir (${dir}).`;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// [function]
|
|
54
|
+
|
|
55
|
+
const buildPublishing = function () {
|
|
56
|
+
return `${TITLE} publishes it once it's processed.`;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// [function]
|
|
60
|
+
|
|
61
|
+
const buildPublishingGit = function (channel) {
|
|
62
|
+
return `GitHub Actions builds it, then ${TITLE} publishes it to ${channel}.`;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// [function]
|
|
66
|
+
|
|
67
|
+
// `built` when workflow.build ran first.
|
|
68
|
+
const buildSubmitted = function (version, channel, built) {
|
|
69
|
+
return `${built ? "Built and submitted" : "Submitted"} v${version} to ${channel}.`;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// [function]
|
|
73
|
+
|
|
74
|
+
const cmdDeploy = function () {
|
|
75
|
+
return `\`${TOOL} deploy\``;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
// [function]
|
|
79
|
+
|
|
13
80
|
const cmdInit = function () {
|
|
14
81
|
return `\`${TOOL} init\``;
|
|
15
82
|
};
|
|
@@ -41,13 +108,37 @@ const docAttrInvalid = function (tag, attr, value) {
|
|
|
41
108
|
// [function]
|
|
42
109
|
|
|
43
110
|
const docAttrUnallowed = function (tag, attr) {
|
|
44
|
-
return `Attribute '${attr}' is not
|
|
111
|
+
return `Attribute '${attr}' is not permitted on the '${tag}' tag.`;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
// [function]
|
|
115
|
+
|
|
116
|
+
const docCommentUnallowed = function () {
|
|
117
|
+
return "HTML comments are not permitted.";
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
// [function]
|
|
121
|
+
|
|
122
|
+
const docMediaElement = function (src, tag) {
|
|
123
|
+
return `Must be ${tag === "video" ? "an MP4" : "a PNG"} file in <${tag}>: ${src}`;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
// [function]
|
|
127
|
+
|
|
128
|
+
const docMediaMissing = function (src) {
|
|
129
|
+
return `Unable to find: ${src}`;
|
|
45
130
|
};
|
|
46
131
|
|
|
47
132
|
// [function]
|
|
48
133
|
|
|
49
|
-
const
|
|
50
|
-
return
|
|
134
|
+
const docMediaType = function (src) {
|
|
135
|
+
return `Must be a PNG or MP4 file: ${src}`;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
// [function]
|
|
139
|
+
|
|
140
|
+
const docTagUnallowed = function (tag) {
|
|
141
|
+
return `Tag '${tag}' is not permitted.`;
|
|
51
142
|
};
|
|
52
143
|
|
|
53
144
|
// [function]
|
|
@@ -64,80 +155,105 @@ const gameExists = function (idOrHandle) {
|
|
|
64
155
|
|
|
65
156
|
// [function]
|
|
66
157
|
|
|
67
|
-
const
|
|
68
|
-
return
|
|
158
|
+
const gameNotDeployed = function (game) {
|
|
159
|
+
return blocks(`${game} isn't on ${TITLE} yet.`, [
|
|
160
|
+
`Deploy it once with ${cmdDeploy()}.`,
|
|
161
|
+
`Then connect its repository in ${TITLE} Studio.`,
|
|
162
|
+
]);
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// [function]
|
|
166
|
+
|
|
167
|
+
const gameNotFound = function (idOrHandle) {
|
|
168
|
+
return `Game not found: ${idOrHandle}`;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
// [function]
|
|
172
|
+
|
|
173
|
+
const gameUnavailable = function (id) {
|
|
174
|
+
return blocks(`Game unavailable: ${id}`, [
|
|
175
|
+
"It was deleted, or belongs to another account.",
|
|
176
|
+
"Give game.id a new UUID to deploy it as a new game.",
|
|
177
|
+
]);
|
|
69
178
|
};
|
|
70
179
|
|
|
71
180
|
// [function]
|
|
72
181
|
|
|
73
182
|
const gitChangesPresent = function () {
|
|
74
|
-
return
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
|
|
183
|
+
return blocks(
|
|
184
|
+
"Uncommitted changes found.",
|
|
185
|
+
"Commit, stash, or discard them first.",
|
|
186
|
+
);
|
|
78
187
|
};
|
|
79
188
|
|
|
80
189
|
// [function]
|
|
81
190
|
|
|
82
191
|
const gitRemoteMissing = function () {
|
|
83
|
-
return
|
|
192
|
+
return blocks(
|
|
84
193
|
"Unable to access Git remote 'origin'.",
|
|
85
|
-
"
|
|
86
|
-
|
|
194
|
+
"Check that it exists and that you can access it.",
|
|
195
|
+
);
|
|
87
196
|
};
|
|
88
197
|
|
|
89
198
|
// [function]
|
|
90
199
|
|
|
91
200
|
const gitRepoMissing = function () {
|
|
92
|
-
return
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
|
|
201
|
+
return blocks(
|
|
202
|
+
"No Git repository found.",
|
|
203
|
+
"Deploy from inside one, or create one with `git init`.",
|
|
204
|
+
);
|
|
96
205
|
};
|
|
97
206
|
|
|
98
207
|
// [function]
|
|
99
208
|
|
|
100
|
-
const
|
|
101
|
-
return
|
|
209
|
+
const gitTagCreateFailed = function (version) {
|
|
210
|
+
return blocks(`Unable to create Git tag for v${version}.`, [
|
|
211
|
+
"Check that the repository has a commit.",
|
|
212
|
+
"Check that your Git name and email are set.",
|
|
213
|
+
]);
|
|
102
214
|
};
|
|
103
215
|
|
|
104
216
|
// [function]
|
|
105
217
|
|
|
106
|
-
const
|
|
107
|
-
return
|
|
108
|
-
|
|
109
|
-
"
|
|
110
|
-
|
|
218
|
+
const gitTagPushFailed = function (version) {
|
|
219
|
+
return blocks(
|
|
220
|
+
`Unable to push Git tag for v${version}.`,
|
|
221
|
+
"Check that you can push to 'origin'.",
|
|
222
|
+
);
|
|
111
223
|
};
|
|
112
224
|
|
|
113
225
|
// [function]
|
|
114
226
|
|
|
115
|
-
const
|
|
116
|
-
return
|
|
117
|
-
|
|
118
|
-
"
|
|
119
|
-
|
|
227
|
+
const gitVersionExists = function (version) {
|
|
228
|
+
return blocks(
|
|
229
|
+
`Git tag for v${version} already exists, here or on origin.`,
|
|
230
|
+
"Bump the version.",
|
|
231
|
+
);
|
|
120
232
|
};
|
|
121
233
|
|
|
122
234
|
// [function]
|
|
123
235
|
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"Ensure the version tag does not already exist locally.",
|
|
128
|
-
].join("\n");
|
|
236
|
+
const httpError = function (name, status, detail) {
|
|
237
|
+
const head = `${name} (${status})`;
|
|
238
|
+
return detail ? `${head}: ${detail}` : `${head}.`;
|
|
129
239
|
};
|
|
130
240
|
|
|
131
241
|
// [function]
|
|
132
242
|
|
|
133
|
-
const
|
|
134
|
-
return `
|
|
243
|
+
const imageAspect = function (aspect) {
|
|
244
|
+
return `Image aspect ratio must be: ${aspect}`;
|
|
135
245
|
};
|
|
136
246
|
|
|
137
247
|
// [function]
|
|
138
248
|
|
|
139
|
-
const
|
|
140
|
-
return `Image
|
|
249
|
+
const imageFound = function (width, height) {
|
|
250
|
+
return `Image is ${width} × ${height}px.`;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
// [function]
|
|
254
|
+
|
|
255
|
+
const imageHeightMax = function (height) {
|
|
256
|
+
return `Image height must not exceed: ${height}px`;
|
|
141
257
|
};
|
|
142
258
|
|
|
143
259
|
// [function]
|
|
@@ -148,6 +264,12 @@ const imageHeightMin = function (height) {
|
|
|
148
264
|
|
|
149
265
|
// [function]
|
|
150
266
|
|
|
267
|
+
const imageInvalid = function () {
|
|
268
|
+
return "Image is an invalid file.";
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
// [function]
|
|
272
|
+
|
|
151
273
|
const imageSizeMax = function (size) {
|
|
152
274
|
return `Image size must not exceed: ${size}`;
|
|
153
275
|
};
|
|
@@ -160,6 +282,12 @@ const imageUnsupported = function () {
|
|
|
160
282
|
|
|
161
283
|
// [function]
|
|
162
284
|
|
|
285
|
+
const imageWidthMax = function (width) {
|
|
286
|
+
return `Image width must not exceed: ${width}px`;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
// [function]
|
|
290
|
+
|
|
163
291
|
const imageWidthMin = function (width) {
|
|
164
292
|
return `Image width must be at least: ${width}px`;
|
|
165
293
|
};
|
|
@@ -167,7 +295,10 @@ const imageWidthMin = function (width) {
|
|
|
167
295
|
// [function]
|
|
168
296
|
|
|
169
297
|
const issuesFound = function (count) {
|
|
170
|
-
return
|
|
298
|
+
return blocks(
|
|
299
|
+
`${count} ${count === 1 ? "issue" : "issues"} found.`,
|
|
300
|
+
`Run ${cmdValidate()} for details.`,
|
|
301
|
+
);
|
|
171
302
|
};
|
|
172
303
|
|
|
173
304
|
// [function]
|
|
@@ -185,25 +316,40 @@ const loginFailed = function () {
|
|
|
185
316
|
// [function]
|
|
186
317
|
|
|
187
318
|
const noGameId = function () {
|
|
188
|
-
return
|
|
319
|
+
return blocks(
|
|
320
|
+
"No game handle or ID.",
|
|
321
|
+
`Pass one, or run ${cmdInit()} to add an ID.`,
|
|
322
|
+
);
|
|
189
323
|
};
|
|
190
324
|
|
|
191
325
|
// [function]
|
|
192
326
|
|
|
193
327
|
const noLockFile = function () {
|
|
194
|
-
return "No
|
|
328
|
+
return blocks("No lockfile found.", [
|
|
329
|
+
"Install your dependencies to create one.",
|
|
330
|
+
"Then commit it.",
|
|
331
|
+
]);
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
// [function]
|
|
335
|
+
|
|
336
|
+
const noProductionRelease = function () {
|
|
337
|
+
return "No production release yet, so opening staging.";
|
|
195
338
|
};
|
|
196
339
|
|
|
197
340
|
// [function]
|
|
198
341
|
|
|
199
|
-
const
|
|
200
|
-
return "No
|
|
342
|
+
const noTemplate = function () {
|
|
343
|
+
return blocks("No template chosen.", [
|
|
344
|
+
"Pass `--template <user/repo>`.",
|
|
345
|
+
"Or pass `--yes` for the blank starter.",
|
|
346
|
+
]);
|
|
201
347
|
};
|
|
202
348
|
|
|
203
349
|
// [function]
|
|
204
350
|
|
|
205
351
|
const notLoggedIn = function () {
|
|
206
|
-
return
|
|
352
|
+
return blocks("Not logged in.", `Run ${cmdLogin()} to log in.`);
|
|
207
353
|
};
|
|
208
354
|
|
|
209
355
|
// [function]
|
|
@@ -220,8 +366,14 @@ const noVideoTrack = function () {
|
|
|
220
366
|
|
|
221
367
|
// [function]
|
|
222
368
|
|
|
223
|
-
const
|
|
224
|
-
return "
|
|
369
|
+
const opened = function (where) {
|
|
370
|
+
return `Opened in ${where === "app" ? `the ${TITLE} app` : "your browser"}.`;
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
// [function]
|
|
374
|
+
|
|
375
|
+
const openToContinue = function () {
|
|
376
|
+
return "Open the link to continue.";
|
|
225
377
|
};
|
|
226
378
|
|
|
227
379
|
// [function]
|
|
@@ -232,8 +384,91 @@ const packageFileMissing = function (file) {
|
|
|
232
384
|
|
|
233
385
|
// [function]
|
|
234
386
|
|
|
235
|
-
const
|
|
236
|
-
return `
|
|
387
|
+
const packageFileTooLarge = function (file, size) {
|
|
388
|
+
return `'${file}' is larger than ${size} MB.`;
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
// [function]
|
|
392
|
+
|
|
393
|
+
const packageTooLarge = function (size) {
|
|
394
|
+
return blocks(
|
|
395
|
+
`Package is larger than ${size} MB.`,
|
|
396
|
+
"Store assets don't count toward it.",
|
|
397
|
+
);
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
// [function]
|
|
401
|
+
|
|
402
|
+
const packageTooManyFiles = function (count) {
|
|
403
|
+
return `Package has more than ${count.toLocaleString("en-US")} files.`;
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
// [function]
|
|
407
|
+
|
|
408
|
+
const packageUncompressedTooLarge = function (size) {
|
|
409
|
+
return `Package is larger than ${size} MB uncompressed.`;
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
// [function]
|
|
413
|
+
|
|
414
|
+
// a failed release's message, a sentence to a line, then its reason code
|
|
415
|
+
// and where to see it.
|
|
416
|
+
const releaseFailed = function ({ message, reason }, studio) {
|
|
417
|
+
return blocks(
|
|
418
|
+
(message ?? "").split(/(?<=\.)\s+/u).join("\n"),
|
|
419
|
+
`Reason: ${reason}.`,
|
|
420
|
+
[`${TITLE} Studio:`, studio],
|
|
421
|
+
);
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
// [function]
|
|
425
|
+
|
|
426
|
+
// a git deploy that isn't logged in can't read its release, so it doesn't
|
|
427
|
+
// wait for it.
|
|
428
|
+
const releaseNotWaited = function () {
|
|
429
|
+
return `Log in to wait for it: ${cmdLogin()}.`;
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
// [function]
|
|
433
|
+
|
|
434
|
+
// `built` when workflow.build ran first.
|
|
435
|
+
const releasePublished = function (version, channel, built) {
|
|
436
|
+
return `${built ? "Built and published" : "Published"} v${version} to ${channel}.`;
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
// [function]
|
|
440
|
+
|
|
441
|
+
// `--wait` ran out of time. `found` when the release exists: it may still
|
|
442
|
+
// finish, as may a direct one it couldn't read. A git release that never
|
|
443
|
+
// appeared was likely never built.
|
|
444
|
+
const releaseTimedOut = function (
|
|
445
|
+
version,
|
|
446
|
+
seconds,
|
|
447
|
+
{ actions, found, git, studio },
|
|
448
|
+
) {
|
|
449
|
+
return blocks(
|
|
450
|
+
`Waited ${waited(seconds)} for v${version}.`,
|
|
451
|
+
found || !git
|
|
452
|
+
? [`It may still finish. See it in ${TITLE} Studio:`, studio]
|
|
453
|
+
: [
|
|
454
|
+
"GitHub Actions hasn't released it yet, or its workflow failed:",
|
|
455
|
+
actions ?? "See the repository's Actions tab.",
|
|
456
|
+
],
|
|
457
|
+
);
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
// [function]
|
|
461
|
+
|
|
462
|
+
// the spinner while `--wait` waits: on GitHub Actions until the release
|
|
463
|
+
// exists, then on Arcadible.
|
|
464
|
+
const releaseWaiting = function (building) {
|
|
465
|
+
return building ? "Waiting for GitHub Actions... %s" : "Publishing... %s";
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
// [function]
|
|
469
|
+
|
|
470
|
+
const sessionExpired = function () {
|
|
471
|
+
return blocks("Session expired.", `Run ${cmdLogin()} to log in.`);
|
|
237
472
|
};
|
|
238
473
|
|
|
239
474
|
// [function]
|
|
@@ -292,6 +527,21 @@ const starterThreeJs = function () {
|
|
|
292
527
|
|
|
293
528
|
// [function]
|
|
294
529
|
|
|
530
|
+
const tagPushed = function (tag) {
|
|
531
|
+
return `Pushed ${tag} to origin.`;
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
// [function]
|
|
535
|
+
|
|
536
|
+
const templateUnavailable = function (template) {
|
|
537
|
+
return blocks(
|
|
538
|
+
`Unable to download template ${template}.`,
|
|
539
|
+
"Check that it's a public GitHub repository.",
|
|
540
|
+
);
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
// [function]
|
|
544
|
+
|
|
295
545
|
const timedOut = function () {
|
|
296
546
|
return "Timed out.";
|
|
297
547
|
};
|
|
@@ -304,8 +554,14 @@ const unableToFind = function (file) {
|
|
|
304
554
|
|
|
305
555
|
// [function]
|
|
306
556
|
|
|
557
|
+
const unableToOpen = function () {
|
|
558
|
+
return "Unable to open a browser.";
|
|
559
|
+
};
|
|
560
|
+
|
|
561
|
+
// [function]
|
|
562
|
+
|
|
307
563
|
const unableToParse = function (file, message) {
|
|
308
|
-
return `Unable to parse ${file}
|
|
564
|
+
return blocks(`Unable to parse ${file}.`, message);
|
|
309
565
|
};
|
|
310
566
|
|
|
311
567
|
// [function]
|
|
@@ -322,12 +578,34 @@ const versionPrerelease = function (version) {
|
|
|
322
578
|
|
|
323
579
|
// [function]
|
|
324
580
|
|
|
581
|
+
// a version that's already published, with what is, so the developer knows
|
|
582
|
+
// what to bump to.
|
|
583
|
+
const versionPublished = function (version, { next, production, staging }) {
|
|
584
|
+
const latest = [
|
|
585
|
+
production ? `Production: ${production}` : null,
|
|
586
|
+
staging ? `Staging: ${staging}` : null,
|
|
587
|
+
].filter(Boolean);
|
|
588
|
+
return blocks(
|
|
589
|
+
`Version ${version} is already published.`,
|
|
590
|
+
...(latest.length ? [latest] : []),
|
|
591
|
+
`Bump the version, for example to ${next}.`,
|
|
592
|
+
);
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
// [function]
|
|
596
|
+
|
|
325
597
|
const versionRelease = function (version) {
|
|
326
598
|
return `Release v${version}`;
|
|
327
599
|
};
|
|
328
600
|
|
|
329
601
|
// [function]
|
|
330
602
|
|
|
603
|
+
const versionUnchecked = function (version) {
|
|
604
|
+
return `Unable to reach ${TITLE} to check v${version}, so pushing anyway.`;
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
// [function]
|
|
608
|
+
|
|
331
609
|
const videoAspect = function (aspect) {
|
|
332
610
|
return `Video aspect ratio must be: ${aspect}`;
|
|
333
611
|
};
|
|
@@ -346,6 +624,18 @@ const videoDurationMin = function (duration) {
|
|
|
346
624
|
|
|
347
625
|
// [function]
|
|
348
626
|
|
|
627
|
+
const videoFound = function (width, height, duration) {
|
|
628
|
+
return `Video is ${width} × ${height}px, ${Number(duration.toFixed(1))}s.`;
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
// [function]
|
|
632
|
+
|
|
633
|
+
const videoHeightMax = function (height) {
|
|
634
|
+
return `Video height must not exceed: ${height}px`;
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
// [function]
|
|
638
|
+
|
|
349
639
|
const videoHeightMin = function (height) {
|
|
350
640
|
return `Video height must be at least: ${height}px`;
|
|
351
641
|
};
|
|
@@ -370,6 +660,12 @@ const videoUnsupported = function () {
|
|
|
370
660
|
|
|
371
661
|
// [function]
|
|
372
662
|
|
|
663
|
+
const videoWidthMax = function (width) {
|
|
664
|
+
return `Video width must not exceed: ${width}px`;
|
|
665
|
+
};
|
|
666
|
+
|
|
667
|
+
// [function]
|
|
668
|
+
|
|
373
669
|
const videoWidthMin = function (width) {
|
|
374
670
|
return `Video width must be at least: ${width}px`;
|
|
375
671
|
};
|
|
@@ -377,39 +673,64 @@ const videoWidthMin = function (width) {
|
|
|
377
673
|
// [export]
|
|
378
674
|
|
|
379
675
|
module.exports = {
|
|
676
|
+
buildFailed,
|
|
677
|
+
buildOutputMissing,
|
|
678
|
+
buildPublishing,
|
|
679
|
+
buildPublishingGit,
|
|
680
|
+
buildSubmitted,
|
|
380
681
|
cmdInit,
|
|
381
682
|
cmdInspect,
|
|
382
683
|
docAttrInvalid,
|
|
383
684
|
docAttrUnallowed,
|
|
384
|
-
|
|
685
|
+
docCommentUnallowed,
|
|
686
|
+
docMediaElement,
|
|
687
|
+
docMediaMissing,
|
|
688
|
+
docMediaType,
|
|
689
|
+
docTagUnallowed,
|
|
385
690
|
docUnsupported,
|
|
386
691
|
gameExists,
|
|
387
|
-
|
|
692
|
+
gameNotDeployed,
|
|
693
|
+
gameNotFound,
|
|
694
|
+
gameUnavailable,
|
|
388
695
|
gitChangesPresent,
|
|
389
696
|
gitRemoteMissing,
|
|
390
697
|
gitRepoMissing,
|
|
391
|
-
gitStagedUnincluded,
|
|
392
698
|
gitTagCreateFailed,
|
|
393
699
|
gitTagPushFailed,
|
|
394
700
|
gitVersionExists,
|
|
395
701
|
httpError,
|
|
396
702
|
imageAspect,
|
|
703
|
+
imageFound,
|
|
704
|
+
imageHeightMax,
|
|
397
705
|
imageHeightMin,
|
|
706
|
+
imageInvalid,
|
|
398
707
|
imageSizeMax,
|
|
399
708
|
imageUnsupported,
|
|
709
|
+
imageWidthMax,
|
|
400
710
|
imageWidthMin,
|
|
401
711
|
issuesFound,
|
|
402
712
|
loginExpired,
|
|
403
713
|
loginFailed,
|
|
404
714
|
noGameId,
|
|
405
715
|
noLockFile,
|
|
406
|
-
|
|
716
|
+
noProductionRelease,
|
|
717
|
+
noTemplate,
|
|
407
718
|
noVideoMetadata,
|
|
408
719
|
noVideoTrack,
|
|
409
720
|
notLoggedIn,
|
|
410
|
-
|
|
721
|
+
openToContinue,
|
|
722
|
+
opened,
|
|
411
723
|
packageFileMissing,
|
|
724
|
+
packageFileTooLarge,
|
|
412
725
|
packageTooLarge,
|
|
726
|
+
packageTooManyFiles,
|
|
727
|
+
packageUncompressedTooLarge,
|
|
728
|
+
releaseFailed,
|
|
729
|
+
releaseNotWaited,
|
|
730
|
+
releasePublished,
|
|
731
|
+
releaseTimedOut,
|
|
732
|
+
releaseWaiting,
|
|
733
|
+
sessionExpired,
|
|
413
734
|
sizeB,
|
|
414
735
|
sizeGb,
|
|
415
736
|
sizeKb,
|
|
@@ -419,18 +740,26 @@ module.exports = {
|
|
|
419
740
|
starterPhaser,
|
|
420
741
|
starterPixiJs,
|
|
421
742
|
starterThreeJs,
|
|
743
|
+
tagPushed,
|
|
744
|
+
templateUnavailable,
|
|
422
745
|
timedOut,
|
|
423
746
|
unableToFind,
|
|
747
|
+
unableToOpen,
|
|
424
748
|
unableToParse,
|
|
425
749
|
uploadFailed,
|
|
426
750
|
versionPrerelease,
|
|
751
|
+
versionPublished,
|
|
427
752
|
versionRelease,
|
|
753
|
+
versionUnchecked,
|
|
428
754
|
videoAspect,
|
|
429
755
|
videoDurationMax,
|
|
430
756
|
videoDurationMin,
|
|
757
|
+
videoFound,
|
|
758
|
+
videoHeightMax,
|
|
431
759
|
videoHeightMin,
|
|
432
760
|
videoInvalid,
|
|
433
761
|
videoSizeMax,
|
|
434
762
|
videoUnsupported,
|
|
763
|
+
videoWidthMax,
|
|
435
764
|
videoWidthMin,
|
|
436
765
|
};
|