hammerkit 2.0.0-next.1 → 2.0.0-next.2
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.
|
@@ -31,7 +31,7 @@ exports.hostServerSchema = zod_1.z
|
|
|
31
31
|
.strict();
|
|
32
32
|
// A command that prints the token for a server instead of a login, see token-source.ts.
|
|
33
33
|
// It is bound to the url and issuer it was registered for, like a sign-in, and lives
|
|
34
|
-
// beside `servers` rather than in it: hammerkit before
|
|
34
|
+
// beside `servers` rather than in it: hammerkit before 2.0 refuses unknown keys of a
|
|
35
35
|
// server, but keeps unknown top-level keys. It is only ever read from the host config,
|
|
36
36
|
// a build file can't name one.
|
|
37
37
|
const tokenCommandSchema = zod_1.z
|
|
@@ -221,7 +221,7 @@ function registerWorkCommands(remote, context) {
|
|
|
221
221
|
}
|
|
222
222
|
return { version, proposed };
|
|
223
223
|
};
|
|
224
|
-
// what publishing the bundle would do, undefined from a server that can't say (before
|
|
224
|
+
// what publishing the bundle would do, undefined from a server that can't say (before 2.0)
|
|
225
225
|
const planBundle = async (server, token, bundle) => {
|
|
226
226
|
try {
|
|
227
227
|
return (await (0, server_client_1.callServer)(server, token, 'POST', '/v1/definitions/plan', bundle)).body;
|
|
@@ -271,7 +271,7 @@ function registerWorkCommands(remote, context) {
|
|
|
271
271
|
if (!environment.prompt) {
|
|
272
272
|
throw new Error(`${notPublished}, publish it first with: hammerkit remote publish ${serverName}, or pass --publish`);
|
|
273
273
|
}
|
|
274
|
-
// a server before
|
|
274
|
+
// a server before 2.0 can't say what publishing would do: it is asked all the same,
|
|
275
275
|
// and refuses then what the caller may not do
|
|
276
276
|
const planned = await planBundle(server, token, local);
|
|
277
277
|
if (planned && planned.outcome === null) {
|
|
@@ -322,7 +322,7 @@ function registerWorkCommands(remote, context) {
|
|
|
322
322
|
const { name: serverName, server, token } = await connect(name);
|
|
323
323
|
const answer = await (0, server_client_1.callServer)(server, token, 'POST', '/v1/definitions/plan', bundle).catch((e) => {
|
|
324
324
|
throw e instanceof server_client_1.ServerError && e.status === 404
|
|
325
|
-
? new Error(`${serverName} can't check a build file without publishing it, it needs hammerkit
|
|
325
|
+
? new Error(`${serverName} can't check a build file without publishing it, it needs hammerkit 2.0`)
|
|
326
326
|
: e;
|
|
327
327
|
});
|
|
328
328
|
const planned = answer.body;
|
package/package.json
CHANGED