sim 2.2.2-preview.179.1 → 2.2.3-preview.181.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/index.js +1 -1
- package/dist/runtime.js +32 -34
- package/package.json +1 -1
- package/dist/helpers.d.ts +0 -9
package/dist/index.js
CHANGED
|
@@ -9330,7 +9330,7 @@ import { createInterface } from "node:readline/promises";
|
|
|
9330
9330
|
// src/auth/device-flow.ts
|
|
9331
9331
|
import { createHash as createHash3, randomBytes as randomBytes2, randomInt } from "node:crypto";
|
|
9332
9332
|
|
|
9333
|
-
// src/helpers.ts
|
|
9333
|
+
// ../utils/src/helpers.ts
|
|
9334
9334
|
function sleep(ms) {
|
|
9335
9335
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
9336
9336
|
}
|
package/dist/runtime.js
CHANGED
|
@@ -3345,6 +3345,36 @@ var {
|
|
|
3345
3345
|
Option,
|
|
3346
3346
|
Help
|
|
3347
3347
|
} = import__.default;
|
|
3348
|
+
// ../utils/src/errors.ts
|
|
3349
|
+
function getErrorMessage(value, fallback) {
|
|
3350
|
+
if (value instanceof Error)
|
|
3351
|
+
return value.message;
|
|
3352
|
+
if (typeof value === "string" && value.length > 0)
|
|
3353
|
+
return value;
|
|
3354
|
+
return fallback ?? String(value);
|
|
3355
|
+
}
|
|
3356
|
+
var CAPACITY_CODES = new Set(["55P03", "25P03", "25P04", "53300"]);
|
|
3357
|
+
var CONFLICT_CODES = new Set(["40P01", "40001"]);
|
|
3358
|
+
var SERVER_UNAVAILABLE_SQLSTATES = new Set(["57P01", "57P02", "57P03"]);
|
|
3359
|
+
var DRIVER_CONNECTION_CODES = new Set([
|
|
3360
|
+
"CONNECTION_CLOSED",
|
|
3361
|
+
"CONNECTION_DESTROYED",
|
|
3362
|
+
"CONNECTION_ENDED",
|
|
3363
|
+
"CONNECT_TIMEOUT"
|
|
3364
|
+
]);
|
|
3365
|
+
var SOCKET_CONNECTION_CODES = new Set([
|
|
3366
|
+
"ECONNRESET",
|
|
3367
|
+
"EPIPE",
|
|
3368
|
+
"ETIMEDOUT",
|
|
3369
|
+
"ECONNREFUSED",
|
|
3370
|
+
"EHOSTUNREACH",
|
|
3371
|
+
"ENOTFOUND",
|
|
3372
|
+
"EAI_AGAIN",
|
|
3373
|
+
"ENETDOWN",
|
|
3374
|
+
"ENETRESET",
|
|
3375
|
+
"ENETUNREACH"
|
|
3376
|
+
]);
|
|
3377
|
+
|
|
3348
3378
|
// src/config/paths.ts
|
|
3349
3379
|
import { homedir } from "node:os";
|
|
3350
3380
|
import { join } from "node:path";
|
|
@@ -8587,38 +8617,6 @@ import { readFileSync as readFileSync3, realpathSync } from "node:fs";
|
|
|
8587
8617
|
import { homedir as homedir2 } from "node:os";
|
|
8588
8618
|
import { dirname as dirname3, isAbsolute, join as join2 } from "node:path";
|
|
8589
8619
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
8590
|
-
|
|
8591
|
-
// ../utils/src/errors.ts
|
|
8592
|
-
function getErrorMessage(value, fallback) {
|
|
8593
|
-
if (value instanceof Error)
|
|
8594
|
-
return value.message;
|
|
8595
|
-
if (typeof value === "string" && value.length > 0)
|
|
8596
|
-
return value;
|
|
8597
|
-
return fallback ?? String(value);
|
|
8598
|
-
}
|
|
8599
|
-
var CAPACITY_CODES = new Set(["55P03", "25P03", "25P04", "53300"]);
|
|
8600
|
-
var CONFLICT_CODES = new Set(["40P01", "40001"]);
|
|
8601
|
-
var SERVER_UNAVAILABLE_SQLSTATES = new Set(["57P01", "57P02", "57P03"]);
|
|
8602
|
-
var DRIVER_CONNECTION_CODES = new Set([
|
|
8603
|
-
"CONNECTION_CLOSED",
|
|
8604
|
-
"CONNECTION_DESTROYED",
|
|
8605
|
-
"CONNECTION_ENDED",
|
|
8606
|
-
"CONNECT_TIMEOUT"
|
|
8607
|
-
]);
|
|
8608
|
-
var SOCKET_CONNECTION_CODES = new Set([
|
|
8609
|
-
"ECONNRESET",
|
|
8610
|
-
"EPIPE",
|
|
8611
|
-
"ETIMEDOUT",
|
|
8612
|
-
"ECONNREFUSED",
|
|
8613
|
-
"EHOSTUNREACH",
|
|
8614
|
-
"ENOTFOUND",
|
|
8615
|
-
"EAI_AGAIN",
|
|
8616
|
-
"ENETDOWN",
|
|
8617
|
-
"ENETRESET",
|
|
8618
|
-
"ENETUNREACH"
|
|
8619
|
-
]);
|
|
8620
|
-
|
|
8621
|
-
// src/update/install.ts
|
|
8622
8620
|
var import_proper_lockfile2 = __toESM(require_proper_lockfile(), 1);
|
|
8623
8621
|
|
|
8624
8622
|
// src/update/check.ts
|
|
@@ -9041,7 +9039,7 @@ import { createInterface } from "node:readline/promises";
|
|
|
9041
9039
|
// src/auth/device-flow.ts
|
|
9042
9040
|
import { createHash as createHash2, randomBytes, randomInt } from "node:crypto";
|
|
9043
9041
|
|
|
9044
|
-
// src/helpers.ts
|
|
9042
|
+
// ../utils/src/helpers.ts
|
|
9045
9043
|
function sleep(ms) {
|
|
9046
9044
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
9047
9045
|
}
|
|
@@ -24566,7 +24564,7 @@ function renderEmbeddedError(ctx, error) {
|
|
|
24566
24564
|
}
|
|
24567
24565
|
return error.exitCode;
|
|
24568
24566
|
}
|
|
24569
|
-
ctx.stderr.diagnostic(`Error: ${sanitize(
|
|
24567
|
+
ctx.stderr.diagnostic(`Error: ${sanitize(getErrorMessage(error))}`);
|
|
24570
24568
|
return 1;
|
|
24571
24569
|
}
|
|
24572
24570
|
function configureEmbeddedOutput(command) {
|
package/package.json
CHANGED
package/dist/helpers.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Local copies of the shared helpers.
|
|
3
|
-
*
|
|
4
|
-
* `@sim/utils` is a private workspace package, so the published `sim` package
|
|
5
|
-
* cannot depend on it — importing it would resolve in the monorepo and fail for
|
|
6
|
-
* anyone installing from npm.
|
|
7
|
-
*/
|
|
8
|
-
/** Resolves after `ms` milliseconds. */
|
|
9
|
-
export declare function sleep(ms: number): Promise<void>;
|