@superblocksteam/sdk 2.0.21-next.9 → 2.0.21
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/cli-replacement/automatic-upgrades.d.ts +1 -1
- package/dist/cli-replacement/automatic-upgrades.d.ts.map +1 -1
- package/dist/cli-replacement/automatic-upgrades.js +5 -5
- package/dist/cli-replacement/automatic-upgrades.js.map +1 -1
- package/dist/cli-replacement/dev.d.mts +5 -1
- package/dist/cli-replacement/dev.d.mts.map +1 -1
- package/dist/cli-replacement/dev.mjs +13 -5
- package/dist/cli-replacement/dev.mjs.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/dbfs/client.d.ts.map +1 -1
- package/dist/dbfs/client.js +3 -2
- package/dist/dbfs/client.js.map +1 -1
- package/dist/dev-utils/dev-server.d.mts.map +1 -1
- package/dist/dev-utils/dev-server.mjs +20 -6
- package/dist/dev-utils/dev-server.mjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/telemetry/attributes.d.ts +1 -0
- package/dist/telemetry/attributes.d.ts.map +1 -1
- package/dist/telemetry/attributes.js +1 -0
- package/dist/telemetry/attributes.js.map +1 -1
- package/dist/telemetry/index.d.ts.map +1 -1
- package/dist/telemetry/index.js +13 -7
- package/dist/telemetry/index.js.map +1 -1
- package/dist/telemetry/logging.d.ts.map +1 -1
- package/dist/telemetry/logging.js +23 -16
- package/dist/telemetry/logging.js.map +1 -1
- package/dist/version-control.d.mts.map +1 -1
- package/dist/version-control.mjs +6 -4
- package/dist/version-control.mjs.map +1 -1
- package/package.json +5 -5
- package/src/cli-replacement/automatic-upgrades.ts +5 -4
- package/src/cli-replacement/dev.mts +16 -8
- package/src/client.ts +4 -2
- package/src/dbfs/client.ts +3 -2
- package/src/dev-utils/dev-server.mts +36 -16
- package/src/index.ts +1 -1
- package/src/telemetry/attributes.ts +1 -0
- package/src/telemetry/index.ts +14 -6
- package/src/telemetry/logging.ts +16 -2
- package/src/version-control.mts +7 -5
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -101,6 +101,11 @@ async function installPackages(cwd: string, logger: Logger) {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
export enum DevServerAutoUpgradeMode {
|
|
105
|
+
SKIP = "skip-upgrade",
|
|
106
|
+
FORCE = "force-ugprade",
|
|
107
|
+
}
|
|
108
|
+
|
|
104
109
|
export async function dev(options: {
|
|
105
110
|
/* cwd is required */
|
|
106
111
|
cwd: string;
|
|
@@ -120,8 +125,8 @@ export async function dev(options: {
|
|
|
120
125
|
/* For redirecting output, like when running outside of the CLI */
|
|
121
126
|
logger?: (...messages: (string | Error)[]) => void;
|
|
122
127
|
|
|
123
|
-
/*
|
|
124
|
-
|
|
128
|
+
/* Optionally force auto-upgrade (for testing purposes), or skip it for a child process when restarting the dev server for automatic upgrades */
|
|
129
|
+
autoUpgradeMode?: DevServerAutoUpgradeMode;
|
|
125
130
|
|
|
126
131
|
/* To cancel the dev server */
|
|
127
132
|
signal?: AbortSignal;
|
|
@@ -140,7 +145,7 @@ export async function dev(options: {
|
|
|
140
145
|
uploadFirst,
|
|
141
146
|
skipSync,
|
|
142
147
|
applicationConfig,
|
|
143
|
-
|
|
148
|
+
autoUpgradeMode,
|
|
144
149
|
tokenManager,
|
|
145
150
|
getCurrentToken,
|
|
146
151
|
updateTokenManagerManually,
|
|
@@ -153,6 +158,7 @@ export async function dev(options: {
|
|
|
153
158
|
let aiService: AiService | undefined;
|
|
154
159
|
const tracer = getTracer();
|
|
155
160
|
const logger = getLogger(options.logger);
|
|
161
|
+
const skipAutoUpgrade = autoUpgradeMode === DevServerAutoUpgradeMode.SKIP;
|
|
156
162
|
|
|
157
163
|
// Add check for node_modules
|
|
158
164
|
if (!fs.existsSync(path.join(cwd, "node_modules"))) {
|
|
@@ -265,6 +271,7 @@ export async function dev(options: {
|
|
|
265
271
|
organizationId: currentUser.organizations[0].id,
|
|
266
272
|
fsOperationQueue,
|
|
267
273
|
draftInterface: syncService as DraftInterface,
|
|
274
|
+
rpcClient,
|
|
268
275
|
tracer,
|
|
269
276
|
logger,
|
|
270
277
|
});
|
|
@@ -294,7 +301,7 @@ export async function dev(options: {
|
|
|
294
301
|
|
|
295
302
|
const packageJsonBefore = await readPkgJson(cwd);
|
|
296
303
|
|
|
297
|
-
if (downloadFirst) {
|
|
304
|
+
if (downloadFirst && !isSynced) {
|
|
298
305
|
await tracer.startActiveSpan("downloadFirst", async (span) => {
|
|
299
306
|
logger.info(
|
|
300
307
|
`Starting download of branch '${applicationConfig.branchName}'`,
|
|
@@ -307,10 +314,10 @@ export async function dev(options: {
|
|
|
307
314
|
|
|
308
315
|
let hasCliUpdated = false;
|
|
309
316
|
let upgradePromises: Promise<void>[] = [];
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
) {
|
|
317
|
+
const forceUpgrade =
|
|
318
|
+
options.autoUpgradeMode === DevServerAutoUpgradeMode.FORCE;
|
|
319
|
+
// Determine whether we must try to auto-upgrade the CLI
|
|
320
|
+
if (!skipAutoUpgrade || forceUpgrade) {
|
|
314
321
|
await tracer.startActiveSpan(
|
|
315
322
|
"versionCheckAndUpgrade",
|
|
316
323
|
async (span) => {
|
|
@@ -328,6 +335,7 @@ export async function dev(options: {
|
|
|
328
335
|
const result = await checkVersionsAndWritePackageJson(
|
|
329
336
|
lockService,
|
|
330
337
|
applicationConfigWithTokenConfigAndUserInfo,
|
|
338
|
+
forceUpgrade,
|
|
331
339
|
);
|
|
332
340
|
hasCliUpdated = result.cliUpdated;
|
|
333
341
|
upgradePromises = result.upgradePromises;
|
package/src/client.ts
CHANGED
|
@@ -51,7 +51,7 @@ const BASE_SERVER_PUBLIC_API_URL_v2 = "api/v2/public";
|
|
|
51
51
|
const BASE_SERVER_API_URL_V2 = "api/v2";
|
|
52
52
|
const BASE_SERVER_API_URL_V3 = "api/v3";
|
|
53
53
|
|
|
54
|
-
const SUPERBLOCKS_MAX_FILE_SIZE_MB =
|
|
54
|
+
const SUPERBLOCKS_MAX_FILE_SIZE_MB = 30;
|
|
55
55
|
|
|
56
56
|
const CLI_VERSION_HEADER = "x-superblocks-cli-version";
|
|
57
57
|
const SUPERBLOCKS_URL_HEADER = "x-superblocks-url";
|
|
@@ -326,7 +326,9 @@ export async function fetchApplication({
|
|
|
326
326
|
return data;
|
|
327
327
|
} catch (e) {
|
|
328
328
|
if (axios.isAxiosError(e) && e.response?.status === 404) {
|
|
329
|
-
throw new NotFoundError(
|
|
329
|
+
throw new NotFoundError(
|
|
330
|
+
`Application ${applicationId} was not found with branch ${branch}, are you sure you are on the correct application and branch?`,
|
|
331
|
+
);
|
|
330
332
|
}
|
|
331
333
|
throw new Error(
|
|
332
334
|
`Could not fetch application: ${
|
package/src/dbfs/client.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { unreachable } from "@superblocksteam/util";
|
|
2
2
|
import { connectToISocketRPCServer } from "../socket/index.js";
|
|
3
|
+
import { getLogger } from "../telemetry/logging.js";
|
|
3
4
|
import { doDownloadDirectoryToLocal, doUploadLocalDirectory } from "./local.js";
|
|
4
5
|
|
|
5
6
|
// TODO(code-mode): this is re-implemented in the vite-plugin-file-sync package
|
|
@@ -74,7 +75,7 @@ export async function uploadLocalApplication(
|
|
|
74
75
|
rpcClient,
|
|
75
76
|
localDirectoryPath,
|
|
76
77
|
);
|
|
77
|
-
|
|
78
|
+
getLogger().info(`New application directory hash: ${directoryHash}`);
|
|
78
79
|
await rpcClient.call.v3.application.liveEditDirectoryContents.set({
|
|
79
80
|
applicationId,
|
|
80
81
|
branchName: branch,
|
|
@@ -124,7 +125,7 @@ export async function printDirectoryEntries(
|
|
|
124
125
|
unreachable(entry);
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
|
-
|
|
128
|
+
getLogger().info(
|
|
128
129
|
`${entry.type}${executable ? "x" : " "} ${hash} ${entry.name}${
|
|
129
130
|
target ? ` -> ${target}` : ""
|
|
130
131
|
}`,
|
|
@@ -158,14 +158,20 @@ export async function createDevServer({
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
// hold the request until the vite server is initialized
|
|
161
|
-
vitePromise
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
161
|
+
vitePromise
|
|
162
|
+
.then(() => {
|
|
163
|
+
// If the server is already closed, don't hold the request
|
|
164
|
+
if (isViteServerInitialized) {
|
|
165
|
+
next();
|
|
166
|
+
} else {
|
|
167
|
+
res.status(500).send("Dev server is not running");
|
|
168
|
+
}
|
|
169
|
+
})
|
|
170
|
+
.catch((e) => {
|
|
171
|
+
// This should never happen, but if it does,
|
|
172
|
+
logger.error("Error holding request", getErrorMeta(e));
|
|
173
|
+
res.status(500).send("Error holding request");
|
|
174
|
+
});
|
|
169
175
|
});
|
|
170
176
|
|
|
171
177
|
app.get("/_sb_health", async (_req, res) => {
|
|
@@ -174,14 +180,16 @@ export async function createDevServer({
|
|
|
174
180
|
});
|
|
175
181
|
|
|
176
182
|
// Attach the vite server to the express app
|
|
177
|
-
app.get("/_sb_connect", async (
|
|
183
|
+
app.get("/_sb_connect", async (req, res) => {
|
|
184
|
+
const reqOrigin = req.headers.origin ?? "";
|
|
185
|
+
|
|
178
186
|
res.setHeader("Content-Type", "application/json");
|
|
179
187
|
if (isViteServerInitialized) {
|
|
180
|
-
|
|
188
|
+
logger.info("Vite server already initialized");
|
|
181
189
|
res.send(JSON.stringify(healthResponse));
|
|
182
190
|
return;
|
|
183
191
|
}
|
|
184
|
-
|
|
192
|
+
logger.info("Starting vite server");
|
|
185
193
|
isViteServerInitialized = true;
|
|
186
194
|
// TODO(code-mode): should this include any validation checks, such as getting a token?
|
|
187
195
|
startVite({
|
|
@@ -195,11 +203,19 @@ export async function createDevServer({
|
|
|
195
203
|
aiService,
|
|
196
204
|
logger: loggerOverride,
|
|
197
205
|
httpServer,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
206
|
+
connectionOrigin: reqOrigin,
|
|
207
|
+
}).then(
|
|
208
|
+
(result) => {
|
|
209
|
+
logger.info("Vite server initialized");
|
|
210
|
+
viteResolve();
|
|
211
|
+
viteCreationResults = result;
|
|
212
|
+
res.send(JSON.stringify(healthResponse));
|
|
213
|
+
},
|
|
214
|
+
(e) => {
|
|
215
|
+
logger.error("Error initializing vite server", getErrorMeta(e));
|
|
216
|
+
viteReject(e);
|
|
217
|
+
},
|
|
218
|
+
);
|
|
203
219
|
});
|
|
204
220
|
|
|
205
221
|
app.post("/_sb_disconnect", async (req, res) => {
|
|
@@ -301,10 +317,12 @@ async function startVite({
|
|
|
301
317
|
syncService,
|
|
302
318
|
lockService,
|
|
303
319
|
aiService,
|
|
320
|
+
connectionOrigin,
|
|
304
321
|
logger: loggerOverride,
|
|
305
322
|
}: CreateDevServerOptions & {
|
|
306
323
|
app: express.Express;
|
|
307
324
|
httpServer: http.Server;
|
|
325
|
+
connectionOrigin: string;
|
|
308
326
|
}): Promise<{
|
|
309
327
|
viteServer: ViteDevServer;
|
|
310
328
|
dispose: () => void;
|
|
@@ -340,6 +358,7 @@ async function startVite({
|
|
|
340
358
|
port: hmrPort,
|
|
341
359
|
clientPort: port,
|
|
342
360
|
server: httpServer,
|
|
361
|
+
overlay: false,
|
|
343
362
|
};
|
|
344
363
|
|
|
345
364
|
// https://codesandbox.io/docs/learn/environment/preview-urls#using-environment-variables
|
|
@@ -358,6 +377,7 @@ async function startVite({
|
|
|
358
377
|
httpServer,
|
|
359
378
|
tracer,
|
|
360
379
|
logger,
|
|
380
|
+
connectionOrigin,
|
|
361
381
|
},
|
|
362
382
|
{ isCustomBuildEnabled },
|
|
363
383
|
);
|
package/src/index.ts
CHANGED
|
@@ -149,7 +149,7 @@ export {
|
|
|
149
149
|
type SocketFileInfo,
|
|
150
150
|
} from "./cli-replacement/socket-utils.mjs";
|
|
151
151
|
|
|
152
|
-
export { dev } from "./cli-replacement/dev.mjs";
|
|
152
|
+
export { dev, DevServerAutoUpgradeMode } from "./cli-replacement/dev.mjs";
|
|
153
153
|
|
|
154
154
|
export { getLogger } from "./telemetry/logging.js";
|
|
155
155
|
|
|
@@ -5,3 +5,4 @@ export const ATTR_SUPERBLOCKS_BASE_URL = "superblocks.base_url";
|
|
|
5
5
|
export const ATTR_SUPERBLOCKS_CLI_TOKEN = "superblocks.cli_token";
|
|
6
6
|
export const ATTR_SUPERBLOCKS_IS_CSB = "superblocks.is_csb";
|
|
7
7
|
export const ATTR_SUPERBLOCKS_USER_ID = "user-id";
|
|
8
|
+
export const ATTR_SUPERBLOCKS_CSB_ID = "csb_id";
|
package/src/telemetry/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import os from "node:os";
|
|
1
2
|
import { logs as logsAPI } from "@opentelemetry/api-logs";
|
|
2
3
|
import { AsyncLocalStorageContextManager } from "@opentelemetry/context-async-hooks";
|
|
3
4
|
import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-http";
|
|
@@ -7,7 +8,6 @@ import { HttpInstrumentation } from "@opentelemetry/instrumentation-http";
|
|
|
7
8
|
import { Resource } from "@opentelemetry/resources";
|
|
8
9
|
import { NodeSDK, logs, api } from "@opentelemetry/sdk-node";
|
|
9
10
|
import { ATTR_SERVICE_NAME } from "@opentelemetry/semantic-conventions";
|
|
10
|
-
import { ATTR_DEPLOYMENT_ENVIRONMENT_NAME } from "@opentelemetry/semantic-conventions/incubating";
|
|
11
11
|
import {
|
|
12
12
|
OBS_TAG_APPLICATION_ID,
|
|
13
13
|
OBS_TAG_BRANCH,
|
|
@@ -17,8 +17,10 @@ import {
|
|
|
17
17
|
import ddTrace from "dd-trace";
|
|
18
18
|
import packageJson from "../../package.json" with { type: "json" };
|
|
19
19
|
import {
|
|
20
|
+
ATTR_DEPLOYMENT_ENVIRONMENT,
|
|
20
21
|
ATTR_SUPERBLOCKS_BASE_URL,
|
|
21
22
|
ATTR_SUPERBLOCKS_CLI_TOKEN,
|
|
23
|
+
ATTR_SUPERBLOCKS_CSB_ID,
|
|
22
24
|
ATTR_SUPERBLOCKS_IS_CSB,
|
|
23
25
|
ATTR_SUPERBLOCKS_USER_ID,
|
|
24
26
|
} from "./attributes.js";
|
|
@@ -61,9 +63,12 @@ export async function configureTelemetry(
|
|
|
61
63
|
version: packageJson.version,
|
|
62
64
|
plugins: false,
|
|
63
65
|
tags: {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
[ATTR_SUPERBLOCKS_BASE_URL]: config.superblocksHostname,
|
|
67
|
+
[ATTR_SUPERBLOCKS_CLI_TOKEN]: config.token,
|
|
68
|
+
[ATTR_SUPERBLOCKS_IS_CSB]: !!process.env.SUPERBLOCKS_IS_CSB,
|
|
69
|
+
[ATTR_SUPERBLOCKS_CSB_ID]: process.env.SUPERBLOCKS_IS_CSB
|
|
70
|
+
? os.hostname()
|
|
71
|
+
: undefined,
|
|
67
72
|
[OBS_TAG_APPLICATION_ID]: applicationConfig?.id,
|
|
68
73
|
[OBS_TAG_BRANCH]: applicationConfig?.branchName,
|
|
69
74
|
},
|
|
@@ -78,10 +83,13 @@ export async function configureTelemetry(
|
|
|
78
83
|
resource: Resource.default().merge(
|
|
79
84
|
new Resource({
|
|
80
85
|
[ATTR_SERVICE_NAME]: config.serviceName,
|
|
81
|
-
[
|
|
86
|
+
[ATTR_DEPLOYMENT_ENVIRONMENT]: process.env.SUPERBLOCKS_CLI_ENV,
|
|
82
87
|
[ATTR_SUPERBLOCKS_BASE_URL]: config.superblocksHostname,
|
|
83
88
|
[ATTR_SUPERBLOCKS_CLI_TOKEN]: config.token,
|
|
84
|
-
[ATTR_SUPERBLOCKS_IS_CSB]: process.env.SUPERBLOCKS_IS_CSB,
|
|
89
|
+
[ATTR_SUPERBLOCKS_IS_CSB]: !!process.env.SUPERBLOCKS_IS_CSB,
|
|
90
|
+
[ATTR_SUPERBLOCKS_CSB_ID]: process.env.SUPERBLOCKS_IS_CSB
|
|
91
|
+
? os.hostname()
|
|
92
|
+
: undefined,
|
|
85
93
|
[OBS_TAG_APPLICATION_ID]: applicationConfig?.id,
|
|
86
94
|
[OBS_TAG_BRANCH]: applicationConfig?.branchName,
|
|
87
95
|
[OBS_TAG_USER_EMAIL]: applicationConfig?.userEmail,
|
package/src/telemetry/logging.ts
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
import { SeverityNumber } from "@opentelemetry/api-logs";
|
|
2
2
|
import { createLogger, format, transports } from "winston";
|
|
3
3
|
import { getLogger as getTracedLogger } from "./index.js";
|
|
4
|
+
import type { AnyValueMap } from "@opentelemetry/api-logs";
|
|
4
5
|
import type winston from "winston";
|
|
5
6
|
|
|
6
|
-
const activeTransports: winston.transport[] = [
|
|
7
|
+
const activeTransports: winston.transport[] = [];
|
|
8
|
+
|
|
9
|
+
if (process.env.SUPERBLOCKS_IS_CSB === "true") {
|
|
10
|
+
activeTransports.push(
|
|
11
|
+
new transports.File({
|
|
12
|
+
format: format.json(),
|
|
13
|
+
filename: `/tmp/dev-server.log`,
|
|
14
|
+
level: "debug",
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
activeTransports.push(
|
|
7
20
|
new transports.Console({
|
|
8
21
|
format: format.combine(
|
|
9
22
|
format.colorize(),
|
|
@@ -23,7 +36,7 @@ const activeTransports: winston.transport[] = [
|
|
|
23
36
|
}),
|
|
24
37
|
),
|
|
25
38
|
}),
|
|
26
|
-
|
|
39
|
+
);
|
|
27
40
|
|
|
28
41
|
const winstonLogger = createLogger({
|
|
29
42
|
level: "debug",
|
|
@@ -82,6 +95,7 @@ const logger: Logger = Object.freeze({
|
|
|
82
95
|
severityNumber: SeverityNumber.ERROR,
|
|
83
96
|
severityText: "ERROR",
|
|
84
97
|
body: message,
|
|
98
|
+
attributes: meta as unknown as AnyValueMap,
|
|
85
99
|
});
|
|
86
100
|
winstonLogger.error(message, meta);
|
|
87
101
|
},
|
package/src/version-control.mts
CHANGED
|
@@ -20,6 +20,7 @@ import * as semver from "semver";
|
|
|
20
20
|
import { simpleGit } from "simple-git";
|
|
21
21
|
import slugify from "slugify";
|
|
22
22
|
import { parse, stringify as ymlstringify } from "yaml";
|
|
23
|
+
import { getLogger } from "./telemetry/logging.js";
|
|
23
24
|
import type {
|
|
24
25
|
ApplicationWrapper,
|
|
25
26
|
MultiPageApplicationWrapper,
|
|
@@ -97,6 +98,7 @@ export type ApiRepresentation = {
|
|
|
97
98
|
const DEFAULT_FILE_VERSION = "0.1.0";
|
|
98
99
|
const SPLIT_LARGE_API_STEPS_VERSION = "0.2.0";
|
|
99
100
|
const LATEST_FILE_VERSION = SPLIT_LARGE_API_STEPS_VERSION;
|
|
101
|
+
const logger = getLogger();
|
|
100
102
|
|
|
101
103
|
export function getApiRepresentation(
|
|
102
104
|
featureFlags: FeatureFlags,
|
|
@@ -173,7 +175,7 @@ async function downloadFile(
|
|
|
173
175
|
try {
|
|
174
176
|
await fs.unlink(fullPath);
|
|
175
177
|
} catch {
|
|
176
|
-
|
|
178
|
+
logger.warn(`Failed to delete file ${fullPath}`);
|
|
177
179
|
}
|
|
178
180
|
|
|
179
181
|
return Promise.resolve(fullPath);
|
|
@@ -469,7 +471,7 @@ export async function writeResourceToDisk(
|
|
|
469
471
|
createdFiles
|
|
470
472
|
.filter((createdFiles) => createdFiles.length)
|
|
471
473
|
.forEach((createdFile) => {
|
|
472
|
-
|
|
474
|
+
logger.warn(`Unable to download ${createdFile}`);
|
|
473
475
|
});
|
|
474
476
|
|
|
475
477
|
return {
|
|
@@ -746,7 +748,7 @@ async function writeV1ApplicationToDisk(
|
|
|
746
748
|
createdFiles
|
|
747
749
|
.filter((createdFiles) => createdFiles.length)
|
|
748
750
|
.forEach((createdFile) => {
|
|
749
|
-
|
|
751
|
+
logger.warn(`Unable to download ${createdFile}`);
|
|
750
752
|
});
|
|
751
753
|
|
|
752
754
|
// do a post-migration cleanup if necessary
|
|
@@ -797,9 +799,9 @@ async function writeCodeModeApplicationToDisk(
|
|
|
797
799
|
branch: DEFAULT_BRANCH,
|
|
798
800
|
localDirectoryPath: appDirName,
|
|
799
801
|
});
|
|
800
|
-
} catch (e) {
|
|
802
|
+
} catch (e: any) {
|
|
801
803
|
// This is most likely to happen if the application is not initialized
|
|
802
|
-
|
|
804
|
+
logger.error(e.message);
|
|
803
805
|
throw e;
|
|
804
806
|
}
|
|
805
807
|
}
|