@glash/cli 0.2.46 → 0.2.47

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/commands/pull.mjs CHANGED
@@ -104,6 +104,14 @@ async function downloadAndExtract(token, slugOrId, outDir) {
104
104
  }
105
105
  if (!res.body) throw new Error('empty response from server');
106
106
 
107
+ // The server says which of the two sources it could serve.
108
+ if (res.headers.get('x-glash-pull-mode') === 'build-directory') {
109
+ stderr.write(color.dim(
110
+ ' ! this host runs an older glash agent, so the live image could not be unpacked\n' +
111
+ ' you are getting the build directory instead, which may hold only a Dockerfile and env files\n',
112
+ ));
113
+ }
114
+
107
115
  // Stream-pipe into `tar -xz -C outDir` via stdin
108
116
  const child = spawnSync('tar', ['-xz', '-C', outDir], { input: Buffer.from(await res.arrayBuffer()) });
109
117
  if (child.status !== 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glash/cli",
3
- "version": "0.2.46",
3
+ "version": "0.2.47",
4
4
  "description": "glashDB command-line interface - deploy projects, pull source + env, manage env vars.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://glashdb.com",