arcadible 0.1.10 → 0.1.11
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/arc-deploy.js +14 -1
- package/package.json +1 -1
- package/src/schema/game.js +8 -2
- package/src/schema/workflow.js +1 -1
package/bin/arc-deploy.js
CHANGED
|
@@ -18,6 +18,7 @@ const output = require("../src/util/output");
|
|
|
18
18
|
const pkg = require("../package.json");
|
|
19
19
|
const rc = require("../src/util/rc");
|
|
20
20
|
const validate = require("../src/cli/validate");
|
|
21
|
+
const whoami = require("../src/cli/whoami");
|
|
21
22
|
|
|
22
23
|
// [use]
|
|
23
24
|
|
|
@@ -60,6 +61,12 @@ const handler = function ({ json, quiet }) {
|
|
|
60
61
|
log.p(`• ${message}`);
|
|
61
62
|
}
|
|
62
63
|
},
|
|
64
|
+
onRefresh(refresh) {
|
|
65
|
+
if (!json) {
|
|
66
|
+
log.p("Checking login...");
|
|
67
|
+
}
|
|
68
|
+
return refresh(true);
|
|
69
|
+
},
|
|
63
70
|
};
|
|
64
71
|
};
|
|
65
72
|
|
|
@@ -69,7 +76,13 @@ const start = function (argv) {
|
|
|
69
76
|
const json = argv.json;
|
|
70
77
|
const quiet = argv.quiet;
|
|
71
78
|
const root = resolve(process.cwd(), argv.cwd);
|
|
72
|
-
return
|
|
79
|
+
return whoami({ handler: handler({ json, quiet }) })
|
|
80
|
+
.then((current) => {
|
|
81
|
+
if (!current || !current.profile) {
|
|
82
|
+
throw new Error("Not logged in. Run `arc login` to log in.");
|
|
83
|
+
}
|
|
84
|
+
return validate({ root });
|
|
85
|
+
})
|
|
73
86
|
.then((issues) => {
|
|
74
87
|
const valid = !issues.length;
|
|
75
88
|
if (!valid) {
|
package/package.json
CHANGED
package/src/schema/game.js
CHANGED
|
@@ -301,12 +301,13 @@ const zIconVideo = function (root) {
|
|
|
301
301
|
const zId = function () {
|
|
302
302
|
const field = "id";
|
|
303
303
|
return z
|
|
304
|
-
.
|
|
304
|
+
.string(
|
|
305
305
|
message(field, [
|
|
306
306
|
"Must be a valid UUID.",
|
|
307
307
|
"Run `arc init` to generate a new game ID.",
|
|
308
308
|
]),
|
|
309
309
|
)
|
|
310
|
+
.uuid(message(field, ["Must be a valid UUID."]))
|
|
310
311
|
.refine(
|
|
311
312
|
(value) => value === value.toLowerCase(),
|
|
312
313
|
message(field, ["Must use lowercase characters."]),
|
|
@@ -403,7 +404,12 @@ const zTrailer = function () {
|
|
|
403
404
|
const zVersion = function () {
|
|
404
405
|
const field = "version";
|
|
405
406
|
return z
|
|
406
|
-
.string(
|
|
407
|
+
.string(
|
|
408
|
+
message(field, [
|
|
409
|
+
"Must be valid semver.",
|
|
410
|
+
"A version is required unless one can be derived.",
|
|
411
|
+
]),
|
|
412
|
+
)
|
|
407
413
|
.refine(
|
|
408
414
|
(value) => validSemver(value) !== null,
|
|
409
415
|
message(field, ["Must be valid semver."]),
|
package/src/schema/workflow.js
CHANGED
|
@@ -71,7 +71,7 @@ const zDeployDir = function (root, { build }) {
|
|
|
71
71
|
(file) => build || existsCheck(root, file),
|
|
72
72
|
message(field, [
|
|
73
73
|
"Must exist when there is no build step.",
|
|
74
|
-
"Run `arc inspect workflow.deploy_dir`
|
|
74
|
+
"Run `arc inspect workflow.deploy_dir` for details.",
|
|
75
75
|
]),
|
|
76
76
|
);
|
|
77
77
|
};
|