@getxflow/cli 0.8.0 → 0.8.1
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/dist/commands/deploy.js +13 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/commands/deploy.js
CHANGED
|
@@ -100,6 +100,18 @@ async function startBuild(client, projectId, revision, allowRemovals) {
|
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Ask whether the plan allows a build before the sources go up.
|
|
105
|
+
*
|
|
106
|
+
* The gate sits on the build itself, so a refusal used to arrive after the archive
|
|
107
|
+
* had already become a revision, leaving the project looking like a forgotten
|
|
108
|
+
* deploy. Same gate, same wording, one round trip earlier. A platform older than
|
|
109
|
+
* this CLI answers the plain build state instead, and the deploy carries on as
|
|
110
|
+
* before: the check is an improvement, not a requirement.
|
|
111
|
+
*/
|
|
112
|
+
async function assertBuildAllowed(client, projectId) {
|
|
113
|
+
await (0, api_1.apiJson)(client, `/api/v1/projects/${projectId}/builds?check=plan`);
|
|
114
|
+
}
|
|
103
115
|
async function deploy(args) {
|
|
104
116
|
const { root, config } = (0, config_1.requireProject)();
|
|
105
117
|
const client = await (0, session_1.connectProject)(root, config);
|
|
@@ -113,6 +125,7 @@ async function deploy(args) {
|
|
|
113
125
|
(0, ui_1.warn)(`Sources not sent (--no-push), the build runs from revision ${revision}`);
|
|
114
126
|
}
|
|
115
127
|
else {
|
|
128
|
+
await assertBuildAllowed(client, config.projectId);
|
|
116
129
|
revision = (await (0, sources_1.pushSources)(root, config, client, { force: (0, args_1.flagBool)(args, 'force') })).revision;
|
|
117
130
|
}
|
|
118
131
|
(0, ui_1.step)(`Building on the platform from revision ${revision}`);
|
package/dist/version.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DEFAULT_API_URL = exports.CLI_VERSION = void 0;
|
|
4
4
|
/** Keep in sync with cli/package.json. */
|
|
5
|
-
exports.CLI_VERSION = '0.8.
|
|
5
|
+
exports.CLI_VERSION = '0.8.1';
|
|
6
6
|
/** Overridden by XFLOW_API_URL or the `api` field in xflow.json. */
|
|
7
7
|
exports.DEFAULT_API_URL = 'https://app.getxflow.com';
|