arcadible 1.0.22 → 1.0.24
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 +2 -1
- package/bin/arc.js +1 -85
- package/dist/account.js +197 -0
- package/dist/action/build/tool.js +65 -0
- package/dist/action/delete/tool.js +46 -0
- package/dist/action/deploy/rebuilt.js +25 -0
- package/dist/action/deploy/result.js +36 -0
- package/dist/action/deploy/timeout.js +18 -0
- package/dist/action/deploy/tool-git.js +54 -0
- package/dist/action/deploy/tool.js +54 -0
- package/dist/action/deploy/wait.js +104 -0
- package/dist/action/function/tool.js +127 -0
- package/dist/action/game.js +61 -0
- package/dist/action/init/manifest.js +64 -0
- package/dist/action/init/tool-patch.js +15 -0
- package/dist/action/init/tool.js +64 -0
- package/dist/action/inspect/tool.js +13 -0
- package/dist/action/key/tool.js +87 -0
- package/dist/action/login/flow.js +69 -0
- package/dist/action/login/tool.js +8 -0
- package/dist/action/logout/tool.js +8 -0
- package/dist/action/open/tool.js +29 -0
- package/dist/action/pack/limits.js +46 -0
- package/dist/action/pack/tool.js +150 -0
- package/dist/action/pack/unsound.js +51 -0
- package/dist/action/play/tool.js +83 -0
- package/dist/action/predeploy/ac.js +75 -0
- package/dist/action/predeploy/game.js +12 -0
- package/dist/action/predeploy/git.js +151 -0
- package/dist/action/predeploy/pm.js +20 -0
- package/dist/action/predeploy/published.js +54 -0
- package/dist/action/predeploy/secrets.js +35 -0
- package/dist/action/predeploy/tool-git.js +108 -0
- package/dist/action/predeploy/tool.js +16 -0
- package/dist/action/secret/tool.js +91 -0
- package/dist/action/serve/tool.js +249 -0
- package/dist/action/validate/checked.js +28 -0
- package/dist/action/validate/tool.js +56 -0
- package/dist/action/validate/unknown.js +58 -0
- package/dist/action/validate/unsound.js +99 -0
- package/dist/action/whoami/tool.js +7 -0
- package/dist/api.js +160 -0
- package/dist/arc.js +41 -0
- package/dist/cli/argv.js +61 -0
- package/dist/cli/channel.js +29 -0
- package/dist/cli/command.js +163 -0
- package/dist/cli/confirm.js +39 -0
- package/dist/cli/options.js +62 -0
- package/dist/cli/rc.js +103 -0
- package/dist/cli/yargs.js +40 -0
- package/dist/command/build.js +68 -0
- package/dist/command/delete.js +66 -0
- package/dist/command/deploy.js +308 -0
- package/dist/command/function/index.js +17 -0
- package/dist/command/function/pause.js +18 -0
- package/dist/command/function/resume.js +18 -0
- package/dist/command/function/run.js +41 -0
- package/dist/command/function/secret/index.js +15 -0
- package/dist/command/function/secret/list.js +27 -0
- package/dist/command/function/secret/name.js +8 -0
- package/dist/command/function/secret/remove.js +26 -0
- package/dist/command/function/secret/run.js +52 -0
- package/dist/command/function/secret/set.js +48 -0
- package/dist/command/function/status.js +40 -0
- package/dist/command/init.js +128 -0
- package/dist/command/inspect.js +38 -0
- package/dist/command/login.js +108 -0
- package/dist/command/logout.js +24 -0
- package/dist/command/open.js +48 -0
- package/dist/command/pack.js +90 -0
- package/dist/command/play.js +80 -0
- package/dist/command/serve.js +176 -0
- package/dist/command/server/index.js +17 -0
- package/dist/command/server/key/create.js +36 -0
- package/dist/command/server/key/index.js +15 -0
- package/dist/command/server/key/list.js +34 -0
- package/dist/command/server/key/revoke.js +24 -0
- package/dist/command/server/key/run.js +54 -0
- package/dist/command/validate.js +47 -0
- package/dist/command/whoami.js +55 -0
- package/dist/commands.js +93 -0
- package/dist/config/ai.js +2 -0
- package/dist/config/art.js +13 -0
- package/dist/config/audience.js +2 -0
- package/dist/config/code.js +129 -0
- package/dist/config/file.js +13 -0
- package/dist/config/genre.js +19 -0
- package/{src → dist}/config/html.js +2 -7
- package/dist/config/image.js +5 -0
- package/dist/config/input.js +11 -0
- package/dist/config/json.js +23 -0
- package/dist/config/limit.js +14 -0
- package/dist/config/orientation.js +11 -0
- package/dist/config/package.js +8 -0
- package/dist/config/product.js +14 -0
- package/dist/config/template.js +37 -0
- package/dist/config/uri.js +18 -0
- package/dist/config/url.js +11 -0
- package/dist/config/video.js +5 -0
- package/dist/config/visibility.js +2 -0
- package/dist/config/workflow.js +7 -0
- package/dist/parser/env.js +61 -0
- package/dist/parser/given.js +8 -0
- package/dist/parser/manifest.js +45 -0
- package/dist/parser/media.js +57 -0
- package/dist/parser/project.js +129 -0
- package/dist/parser/readme-file.js +44 -0
- package/dist/parser/readme.js +70 -0
- package/dist/parser/sections.js +92 -0
- package/dist/parser/self.js +16 -0
- package/dist/phrase/account.js +35 -0
- package/dist/phrase/common.js +130 -0
- package/dist/phrase/deploy.js +184 -0
- package/dist/phrase/function.js +135 -0
- package/dist/phrase/game.js +27 -0
- package/dist/phrase/index.js +15 -0
- package/dist/phrase/init.js +53 -0
- package/dist/phrase/internal.js +61 -0
- package/dist/phrase/manifest.js +120 -0
- package/dist/phrase/media.js +90 -0
- package/dist/phrase/pack.js +69 -0
- package/dist/phrase/serve.js +84 -0
- package/dist/phrase/server.js +38 -0
- package/dist/runner/bundle.js +95 -0
- package/dist/runner/outbound.js +69 -0
- package/dist/schema/check/game.js +29 -0
- package/dist/schema/check/workflow.js +57 -0
- package/dist/schema/game.js +462 -0
- package/dist/schema/message.js +61 -0
- package/dist/schema/readme.js +27 -0
- package/dist/schema/runner.js +43 -0
- package/dist/schema/server.js +91 -0
- package/dist/schema/workflow.js +99 -0
- package/dist/serve/files.js +39 -0
- package/dist/serve/game.js +172 -0
- package/dist/serve/page.js +490 -0
- package/dist/serve/reload.js +55 -0
- package/dist/serve/remote.js +114 -0
- package/dist/serve/runner.js +296 -0
- package/dist/serve/server.js +163 -0
- package/dist/serve/ticket.js +232 -0
- package/dist/util/bytes.js +16 -0
- package/dist/util/chars.js +19 -0
- package/dist/util/command.js +11 -0
- package/dist/util/delay.js +36 -0
- package/dist/util/doc.js +59 -0
- package/dist/util/error.js +35 -0
- package/dist/util/http.js +13 -0
- package/dist/util/image.js +64 -0
- package/dist/util/links.js +45 -0
- package/dist/util/lockfile.js +17 -0
- package/dist/util/log.js +101 -0
- package/dist/util/md.js +37 -0
- package/dist/util/media.js +27 -0
- package/dist/util/objs.js +29 -0
- package/dist/util/os.js +13 -0
- package/dist/util/output.js +133 -0
- package/dist/util/paths.js +8 -0
- package/dist/util/progress.js +57 -0
- package/dist/util/promise.js +18 -0
- package/dist/util/request.js +91 -0
- package/dist/util/s3.js +67 -0
- package/dist/util/schema.js +151 -0
- package/dist/util/screenshot.js +24 -0
- package/dist/util/shell.js +64 -0
- package/dist/util/size.js +32 -0
- package/dist/util/spinner.js +35 -0
- package/dist/util/strs.js +46 -0
- package/dist/util/table.js +18 -0
- package/dist/util/term.js +21 -0
- package/dist/util/time.js +16 -0
- package/dist/util/toml.js +28 -0
- package/{src → dist}/util/uris.js +8 -14
- package/dist/util/video.js +113 -0
- package/dist/util/zip.js +62 -0
- package/npm-shrinkwrap.json +3256 -0
- package/package.json +42 -40
- package/bin/arc-build.js +0 -139
- package/bin/arc-default.js +0 -65
- package/bin/arc-deploy.js +0 -456
- package/bin/arc-init.js +0 -187
- package/bin/arc-inspect.js +0 -97
- package/bin/arc-login.js +0 -165
- package/bin/arc-logout.js +0 -75
- package/bin/arc-open.js +0 -104
- package/bin/arc-pack.js +0 -146
- package/bin/arc-play.js +0 -140
- package/bin/arc-serve.js +0 -214
- package/bin/arc-validate.js +0 -112
- package/bin/arc-whoami.js +0 -119
- package/src/account.js +0 -249
- package/src/action/build/tool.js +0 -80
- package/src/action/deploy/tool-git.js +0 -90
- package/src/action/deploy/tool.js +0 -88
- package/src/action/deploy/wait.js +0 -151
- package/src/action/init/manifest.js +0 -83
- package/src/action/init/tool-patch.js +0 -32
- package/src/action/init/tool.js +0 -97
- package/src/action/inspect/tool.js +0 -26
- package/src/action/login/flow.js +0 -101
- package/src/action/login/tool.js +0 -16
- package/src/action/logout/tool.js +0 -15
- package/src/action/open/tool.js +0 -38
- package/src/action/pack/limits.js +0 -51
- package/src/action/pack/tool.js +0 -171
- package/src/action/pack/unsound.js +0 -69
- package/src/action/play/tool.js +0 -109
- package/src/action/predeploy/ac.js +0 -112
- package/src/action/predeploy/git.js +0 -223
- package/src/action/predeploy/pm.js +0 -37
- package/src/action/predeploy/published.js +0 -82
- package/src/action/predeploy/tool-git.js +0 -154
- package/src/action/predeploy/tool.js +0 -29
- package/src/action/serve/tool.js +0 -209
- package/src/action/validate/checked.js +0 -37
- package/src/action/validate/tool.js +0 -67
- package/src/action/validate/unknown.js +0 -86
- package/src/action/validate/unsound.js +0 -138
- package/src/action/whoami/tool.js +0 -15
- package/src/api.js +0 -163
- package/src/cli/build.js +0 -15
- package/src/cli/deploy.js +0 -21
- package/src/cli/init.js +0 -17
- package/src/cli/inspect.js +0 -15
- package/src/cli/login.js +0 -15
- package/src/cli/logout.js +0 -15
- package/src/cli/open.js +0 -15
- package/src/cli/pack.js +0 -15
- package/src/cli/play.js +0 -15
- package/src/cli/predeploy.js +0 -21
- package/src/cli/serve.js +0 -15
- package/src/cli/validate.js +0 -15
- package/src/cli/whoami.js +0 -15
- package/src/config/ai.js +0 -5
- package/src/config/art.js +0 -16
- package/src/config/audience.js +0 -5
- package/src/config/code.js +0 -142
- package/src/config/file.js +0 -23
- package/src/config/genre.js +0 -22
- package/src/config/image.js +0 -7
- package/src/config/input.js +0 -14
- package/src/config/limit.js +0 -21
- package/src/config/orientation.js +0 -14
- package/src/config/package.js +0 -5
- package/src/config/product.js +0 -5
- package/src/config/template.js +0 -45
- package/src/config/uri.js +0 -27
- package/src/config/url.js +0 -20
- package/src/config/video.js +0 -7
- package/src/config/visibility.js +0 -5
- package/src/config/workflow.js +0 -18
- package/src/parser/env.js +0 -84
- package/src/parser/given.js +0 -17
- package/src/parser/manifest.js +0 -80
- package/src/parser/media.js +0 -90
- package/src/parser/project.js +0 -166
- package/src/parser/readme-file.js +0 -76
- package/src/parser/readme.js +0 -96
- package/src/parser/sections.js +0 -107
- package/src/parser/self.js +0 -27
- package/src/phrase.js +0 -1294
- package/src/schema/check/game.js +0 -61
- package/src/schema/check/workflow.js +0 -99
- package/src/schema/game.js +0 -649
- package/src/schema/message.js +0 -85
- package/src/schema/readme.js +0 -44
- package/src/schema/workflow.js +0 -150
- package/src/serve/files.js +0 -61
- package/src/serve/game.js +0 -191
- package/src/serve/page.js +0 -345
- package/src/serve/reload.js +0 -68
- package/src/serve/remote.js +0 -121
- package/src/serve/server.js +0 -128
- package/src/util/argv.js +0 -116
- package/src/util/bytes.js +0 -25
- package/src/util/chars.js +0 -30
- package/src/util/command.js +0 -18
- package/src/util/delay.js +0 -52
- package/src/util/doc.js +0 -72
- package/src/util/error.js +0 -50
- package/src/util/http.js +0 -25
- package/src/util/image.js +0 -93
- package/src/util/links.js +0 -78
- package/src/util/lockfile.js +0 -35
- package/src/util/log.js +0 -149
- package/src/util/md.js +0 -61
- package/src/util/media.js +0 -40
- package/src/util/objs.js +0 -45
- package/src/util/os.js +0 -27
- package/src/util/output.js +0 -174
- package/src/util/paths.js +0 -21
- package/src/util/progress.js +0 -85
- package/src/util/promise.js +0 -29
- package/src/util/rc.js +0 -144
- package/src/util/request.js +0 -89
- package/src/util/s3.js +0 -92
- package/src/util/schema.js +0 -189
- package/src/util/screenshot.js +0 -37
- package/src/util/shell.js +0 -84
- package/src/util/size.js +0 -53
- package/src/util/spinner.js +0 -52
- package/src/util/strs.js +0 -73
- package/src/util/term.js +0 -28
- package/src/util/time.js +0 -29
- package/src/util/toml.js +0 -14
- package/src/util/video.js +0 -157
- package/src/util/zip.js +0 -88
- /package/{src/serve → assets}/favicon.ico +0 -0
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
// [import]
|
|
4
|
-
|
|
5
|
-
const path = require("node:path");
|
|
6
|
-
|
|
7
|
-
// [import]
|
|
8
|
-
|
|
9
|
-
const semver = require("semver");
|
|
10
|
-
|
|
11
|
-
// [import]
|
|
12
|
-
|
|
13
|
-
const cfgart = require("../../config/art");
|
|
14
|
-
const cfgcode = require("../../config/code");
|
|
15
|
-
const cfgfile = require("../../config/file");
|
|
16
|
-
const output = require("../../util/output");
|
|
17
|
-
const phrase = require("../../phrase");
|
|
18
|
-
const screenshot = require("../../util/screenshot");
|
|
19
|
-
|
|
20
|
-
// [use]
|
|
21
|
-
|
|
22
|
-
const extname = path.extname;
|
|
23
|
-
const parse = path.parse;
|
|
24
|
-
const posixBasename = path.posix.basename;
|
|
25
|
-
const prerelease = semver.prerelease;
|
|
26
|
-
const validSemver = semver.valid;
|
|
27
|
-
const WARNING = cfgcode.WARNING;
|
|
28
|
-
|
|
29
|
-
// [declare]
|
|
30
|
-
|
|
31
|
-
const MEDIA = cfgfile.MEDIA;
|
|
32
|
-
|
|
33
|
-
// [declare]
|
|
34
|
-
|
|
35
|
-
// the art fields, such as `icon`, each of which may have a `_video`.
|
|
36
|
-
const ART = cfgart
|
|
37
|
-
.map((file) => parse(file).name)
|
|
38
|
-
.filter((name) => !name.endsWith("_video"));
|
|
39
|
-
// a screenshot's name, as the store reads it (util/screenshot.js).
|
|
40
|
-
const SCREENSHOT = screenshot.SCREENSHOT;
|
|
41
|
-
// a name one case or separator away from a screenshot's: `Screenshot_01`,
|
|
42
|
-
// `screenshot-01`, `screenshot01`, with any qualifier after it.
|
|
43
|
-
const SCREENSHOT_NEAR = /^screenshot[-_ ]?(\d+)(?:[-_ ](.+))?$/iu;
|
|
44
|
-
|
|
45
|
-
// [function]
|
|
46
|
-
|
|
47
|
-
// a warning about a field, in an issue's shape, with its details.
|
|
48
|
-
const warning = function (code, field, [message, ...details]) {
|
|
49
|
-
return { ...output.warning(code, message, field), details };
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
// [function]
|
|
53
|
-
|
|
54
|
-
// the fields a release leaves out whose defaults it may not mean: a release
|
|
55
|
-
// version's `visibility` and `title`, and a public one's `inputs`. A
|
|
56
|
-
// prerelease changes no store page, so it's never warned about.
|
|
57
|
-
const unset = function (game) {
|
|
58
|
-
const version = game.version;
|
|
59
|
-
if (!validSemver(version) || prerelease(version)) {
|
|
60
|
-
return [];
|
|
61
|
-
}
|
|
62
|
-
const fields = [
|
|
63
|
-
"visibility",
|
|
64
|
-
"title",
|
|
65
|
-
...(game.visibility === "public" ? ["inputs"] : []),
|
|
66
|
-
];
|
|
67
|
-
return fields
|
|
68
|
-
.filter((field) => typeof game[field] === "undefined")
|
|
69
|
-
.map((field) =>
|
|
70
|
-
warning(WARNING.FIELD_UNSET, `game.${field}`, phrase.fieldUnset(field)),
|
|
71
|
-
);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
// [function]
|
|
75
|
-
|
|
76
|
-
// each art video without its PNG, such as `icon_video` without `icon`.
|
|
77
|
-
const unpaired = function (game) {
|
|
78
|
-
return ART.filter((art) => game[`${art}_video`] && !game[art]).map((art) =>
|
|
79
|
-
warning(
|
|
80
|
-
WARNING.ART_VIDEO_UNPAIRED,
|
|
81
|
-
`game.${art}_video`,
|
|
82
|
-
phrase.artVideoUnpaired(art, `${MEDIA}/${art}.png`),
|
|
83
|
-
),
|
|
84
|
-
);
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
// [function]
|
|
88
|
-
|
|
89
|
-
// the gallery's file names, or none when it isn't a list of paths, which
|
|
90
|
-
// its issues report.
|
|
91
|
-
const galleryNames = function (game) {
|
|
92
|
-
const gallery = game.gallery;
|
|
93
|
-
if (!Array.isArray(gallery)) {
|
|
94
|
-
return [];
|
|
95
|
-
}
|
|
96
|
-
return gallery
|
|
97
|
-
.filter((file) => typeof file === "string")
|
|
98
|
-
.map((file) => posixBasename(file));
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
// [function]
|
|
102
|
-
|
|
103
|
-
// a gallery file named almost as a screenshot, with the name it might mean.
|
|
104
|
-
const misnamed = function (names) {
|
|
105
|
-
return names.flatMap((name) => {
|
|
106
|
-
if (SCREENSHOT.test(name)) {
|
|
107
|
-
return [];
|
|
108
|
-
}
|
|
109
|
-
const ext = extname(name);
|
|
110
|
-
const match = SCREENSHOT_NEAR.exec(parse(name).name);
|
|
111
|
-
if (!match) {
|
|
112
|
-
return [];
|
|
113
|
-
}
|
|
114
|
-
const qualifier = match[2] ? `_${match[2]}` : "";
|
|
115
|
-
const near = `screenshot_${match[1]}${qualifier}${ext}`;
|
|
116
|
-
return [
|
|
117
|
-
warning(WARNING.SCREENSHOT_NAME_INVALID, "game.gallery", [
|
|
118
|
-
phrase.screenshotNameInvalid(name),
|
|
119
|
-
phrase.didYouMean(near),
|
|
120
|
-
]),
|
|
121
|
-
];
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
// [function]
|
|
126
|
-
|
|
127
|
-
// what the resolved manifest has that's sound by its rules but almost never
|
|
128
|
-
// meant, as warnings: facts about the project, never a guess at how the
|
|
129
|
-
// store will show it (OUTPUT.md, Codes).
|
|
130
|
-
const main = function (proj) {
|
|
131
|
-
const game = proj?.game ?? {};
|
|
132
|
-
const names = galleryNames(game);
|
|
133
|
-
return [...unset(game), ...unpaired(game), ...misnamed(names)];
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
// [export]
|
|
137
|
-
|
|
138
|
-
module.exports = main;
|
package/src/api.js
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
// [import]
|
|
4
|
-
|
|
5
|
-
const cfguri = require("./config/uri");
|
|
6
|
-
const request = require("./util/request");
|
|
7
|
-
|
|
8
|
-
// [declare]
|
|
9
|
-
|
|
10
|
-
const VERSION = "v1";
|
|
11
|
-
|
|
12
|
-
// [function]
|
|
13
|
-
|
|
14
|
-
// an API path with each value encoded as one segment, so a handle or version
|
|
15
|
-
// can't add a segment or a query: pathOf`/games/${id}`.
|
|
16
|
-
const pathOf = function (strings, ...values) {
|
|
17
|
-
return strings.reduce(
|
|
18
|
-
(out, each, i) =>
|
|
19
|
-
out + each + (i < values.length ? encodeURIComponent(values[i]) : ""),
|
|
20
|
-
"",
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
// [function]
|
|
25
|
-
|
|
26
|
-
// the full URL of an API path, with `params` as its query. Undefined and null
|
|
27
|
-
// params are left out.
|
|
28
|
-
const endpoint = function (path, params) {
|
|
29
|
-
const url = new URL(`${cfguri.HOST_HTTP_API}/${VERSION}${path}`);
|
|
30
|
-
for (const [key, value] of Object.entries(params ?? {})) {
|
|
31
|
-
if ((value ?? null) !== null) {
|
|
32
|
-
url.searchParams.set(key, value);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return url.href;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
// [function]
|
|
39
|
-
|
|
40
|
-
// the headers that authenticate a request with an access token.
|
|
41
|
-
const auth = function (token) {
|
|
42
|
-
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
// [function]
|
|
46
|
-
|
|
47
|
-
// ends the session the access token belongs to, and only that one.
|
|
48
|
-
const postAuthLogout = function (params, headers) {
|
|
49
|
-
return request.post(endpoint("/auth/logout", params), null, headers);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
// [function]
|
|
53
|
-
|
|
54
|
-
const postAuthRefresh = function (form, params, headers) {
|
|
55
|
-
return request.post(endpoint("/auth/refresh", params), form, headers);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
// [function]
|
|
59
|
-
|
|
60
|
-
const postFlow = function (form, params, headers) {
|
|
61
|
-
return request.post(endpoint("/flows", params), form, headers);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
// [function]
|
|
65
|
-
|
|
66
|
-
const flow = function (id, params, headers) {
|
|
67
|
-
return request.get(endpoint(pathOf`/flows/${id}`, params), headers);
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
// [function]
|
|
71
|
-
|
|
72
|
-
const postUpload = function (form, params, headers) {
|
|
73
|
-
return request.post(endpoint("/uploads", params), form, headers);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
// [function]
|
|
77
|
-
|
|
78
|
-
const discoverGame = function (id, params, headers) {
|
|
79
|
-
return request.get(endpoint(pathOf`/discover/games/${id}`, params), headers);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
// [function]
|
|
83
|
-
|
|
84
|
-
const discoverGameBuilds = function (id, params, headers) {
|
|
85
|
-
return request.get(
|
|
86
|
-
endpoint(pathOf`/discover/games/${id}/builds`, params),
|
|
87
|
-
headers,
|
|
88
|
-
);
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
// [function]
|
|
92
|
-
|
|
93
|
-
const discoverGameBuild = function (id, version, params, headers) {
|
|
94
|
-
return request.get(
|
|
95
|
-
endpoint(pathOf`/discover/games/${id}/builds/${version}`, params),
|
|
96
|
-
headers,
|
|
97
|
-
);
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
// [function]
|
|
101
|
-
|
|
102
|
-
// a game's releases, which anyone can read: what each says about itself.
|
|
103
|
-
const discoverGameReleases = function (id, params, headers) {
|
|
104
|
-
return request.get(
|
|
105
|
-
endpoint(pathOf`/discover/games/${id}/releases`, params),
|
|
106
|
-
headers,
|
|
107
|
-
);
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
// [function]
|
|
111
|
-
|
|
112
|
-
// the game's connected repository, if it's `owner/name`; otherwise 404.
|
|
113
|
-
const discoverGameRepo = function (id, owner, name, params, headers) {
|
|
114
|
-
return request.get(
|
|
115
|
-
endpoint(pathOf`/discover/games/${id}/repos/${owner}/${name}`, params),
|
|
116
|
-
headers,
|
|
117
|
-
);
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
// [function]
|
|
121
|
-
|
|
122
|
-
const gameBuild = function (id, version, params, headers) {
|
|
123
|
-
return request.get(
|
|
124
|
-
endpoint(pathOf`/games/${id}/builds/${version}`, params),
|
|
125
|
-
headers,
|
|
126
|
-
);
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
// [function]
|
|
130
|
-
|
|
131
|
-
// whether the caller's game could take a handle on a deploy to `channel`:
|
|
132
|
-
// its status is available, taken, limit, or lapsed.
|
|
133
|
-
const gameHandle = function (id, handle, params, headers) {
|
|
134
|
-
return request.get(
|
|
135
|
-
endpoint(pathOf`/games/${id}/handles/${handle}`, params),
|
|
136
|
-
headers,
|
|
137
|
-
);
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
// [function]
|
|
141
|
-
|
|
142
|
-
const release = function (id, params, headers) {
|
|
143
|
-
return request.get(endpoint(pathOf`/releases/${id}`, params), headers);
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
// [export]
|
|
147
|
-
|
|
148
|
-
module.exports = {
|
|
149
|
-
auth,
|
|
150
|
-
discoverGame,
|
|
151
|
-
discoverGameBuild,
|
|
152
|
-
discoverGameBuilds,
|
|
153
|
-
discoverGameReleases,
|
|
154
|
-
discoverGameRepo,
|
|
155
|
-
flow,
|
|
156
|
-
gameBuild,
|
|
157
|
-
gameHandle,
|
|
158
|
-
postAuthLogout,
|
|
159
|
-
postAuthRefresh,
|
|
160
|
-
postFlow,
|
|
161
|
-
postUpload,
|
|
162
|
-
release,
|
|
163
|
-
};
|
package/src/cli/build.js
DELETED
package/src/cli/deploy.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
// [import]
|
|
4
|
-
|
|
5
|
-
const account = require("../account");
|
|
6
|
-
const deployTool = require("../action/deploy/tool");
|
|
7
|
-
const deployToolGit = require("../action/deploy/tool-git");
|
|
8
|
-
|
|
9
|
-
// [function]
|
|
10
|
-
|
|
11
|
-
const main = function ({ artifact, current, git, handler, ...conf }) {
|
|
12
|
-
return (
|
|
13
|
-
git
|
|
14
|
-
? deployToolGit(conf, handler)
|
|
15
|
-
: deployTool(current, artifact, conf, handler)
|
|
16
|
-
).catch(account.ended(current));
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
// [export]
|
|
20
|
-
|
|
21
|
-
module.exports = main;
|
package/src/cli/init.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
// [import]
|
|
4
|
-
|
|
5
|
-
const initTool = require("../action/init/tool");
|
|
6
|
-
const initToolPatch = require("../action/init/tool-patch");
|
|
7
|
-
|
|
8
|
-
// [function]
|
|
9
|
-
|
|
10
|
-
const main = function ({ handler, patch, ...conf }) {
|
|
11
|
-
const tool = patch ? initToolPatch : initTool;
|
|
12
|
-
return tool(conf, handler);
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
// [export]
|
|
16
|
-
|
|
17
|
-
module.exports = main;
|
package/src/cli/inspect.js
DELETED
package/src/cli/login.js
DELETED
package/src/cli/logout.js
DELETED
package/src/cli/open.js
DELETED
package/src/cli/pack.js
DELETED
package/src/cli/play.js
DELETED
package/src/cli/predeploy.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
// [import]
|
|
4
|
-
|
|
5
|
-
const account = require("../account");
|
|
6
|
-
const predeployTool = require("../action/predeploy/tool");
|
|
7
|
-
const predeployToolGit = require("../action/predeploy/tool-git");
|
|
8
|
-
|
|
9
|
-
// [function]
|
|
10
|
-
|
|
11
|
-
const main = function ({ current, git, handler, ...conf }) {
|
|
12
|
-
return (
|
|
13
|
-
git
|
|
14
|
-
? predeployToolGit(conf, handler)
|
|
15
|
-
: predeployTool(current, conf, handler)
|
|
16
|
-
).catch(account.ended(current));
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
// [export]
|
|
20
|
-
|
|
21
|
-
module.exports = main;
|
package/src/cli/serve.js
DELETED
package/src/cli/validate.js
DELETED
package/src/cli/whoami.js
DELETED
package/src/config/ai.js
DELETED
package/src/config/art.js
DELETED