@cimplify/cli 0.12.1 → 0.12.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.
- package/dist/{chunk-JPUGWNVY.mjs → chunk-7P2OGMZ4.mjs} +1 -1
- package/dist/{chunk-FOJVWJ57.mjs → chunk-PVHB2MHV.mjs} +1 -1
- package/dist/{dev-6OWQ2FZ7.mjs → dev-5MB2BJ6L.mjs} +38 -0
- package/dist/dispatcher.mjs +7 -7
- package/dist/{doctor-UMR72TNV.mjs → doctor-6Z6YR37N.mjs} +2 -2
- package/dist/{explain-RD6TURI3.mjs → explain-2FLJFJP3.mjs} +1 -1
- package/dist/{introspect-M2KNI7TW.mjs → introspect-YBDCOO3I.mjs} +2 -2
- package/dist/{update-MCTGCQIY.mjs → update-VIDP5OKO.mjs} +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { gitDetectRoot, gitCurrentBranch, gitCurrentSha, gitStatusPorcelain } from './chunk-K5464A3L.mjs';
|
|
3
3
|
import { parseEnvFile } from './chunk-DBZ3UOQ2.mjs';
|
|
4
|
-
import { package_default } from './chunk-
|
|
4
|
+
import { package_default } from './chunk-PVHB2MHV.mjs';
|
|
5
5
|
import { parseArgs } from './chunk-C4M3DXKC.mjs';
|
|
6
6
|
import { readAuthOrNull, readProjectLinkOrNull, readProjectState } from './chunk-UBAI443T.mjs';
|
|
7
7
|
import { bold, dim, yellow, green, info, result, red } from './chunk-E2T2SBP5.mjs';
|
|
@@ -418,6 +418,8 @@ function isRequest(message) {
|
|
|
418
418
|
return typeof message.op === "string";
|
|
419
419
|
}
|
|
420
420
|
var MessageFramer = class {
|
|
421
|
+
// Annotated Uint8Array (ArrayBufferLike) so concat/subarray/slice results
|
|
422
|
+
// assign back cleanly under TS 5.7's Uint8Array<ArrayBuffer> generic.
|
|
421
423
|
buffer = new Uint8Array(0);
|
|
422
424
|
push(bytes) {
|
|
423
425
|
this.buffer = concat(this.buffer, bytes);
|
|
@@ -1304,6 +1306,9 @@ var StreamHandleV2 = class {
|
|
|
1304
1306
|
}
|
|
1305
1307
|
};
|
|
1306
1308
|
var CONNECTION_STREAM_ID = 0;
|
|
1309
|
+
var LIVENESS_PING_INTERVAL_MS = 15e3;
|
|
1310
|
+
var LIVENESS_TIMEOUT_MS = 45e3;
|
|
1311
|
+
var FROZEN_TICK_GAP_MS = 6e4;
|
|
1307
1312
|
var textEncoder6 = new TextEncoder();
|
|
1308
1313
|
var textDecoder5 = new TextDecoder();
|
|
1309
1314
|
var SessionV2 = class {
|
|
@@ -1313,6 +1318,10 @@ var SessionV2 = class {
|
|
|
1313
1318
|
this.nextStreamId = options.role === "service" ? 1 : 2;
|
|
1314
1319
|
this.connectionSend = new SendWindow(0);
|
|
1315
1320
|
this.connectionRecv = new RecvWindow(options.local.connection_window);
|
|
1321
|
+
this.lastInboundAt = Date.now();
|
|
1322
|
+
this.lastTickAt = Date.now();
|
|
1323
|
+
this.livenessTimer = setInterval(() => this.onLivenessTick(), LIVENESS_PING_INTERVAL_MS);
|
|
1324
|
+
this.livenessTimer.unref?.();
|
|
1316
1325
|
transport.onMessage((bytes) => this.onMessage(bytes));
|
|
1317
1326
|
transport.onClose((reason) => this.teardown(reason));
|
|
1318
1327
|
}
|
|
@@ -1327,6 +1336,33 @@ var SessionV2 = class {
|
|
|
1327
1336
|
draining = false;
|
|
1328
1337
|
closed = false;
|
|
1329
1338
|
sending = Promise.resolve();
|
|
1339
|
+
lastInboundAt;
|
|
1340
|
+
lastTickAt;
|
|
1341
|
+
livenessTimer;
|
|
1342
|
+
onLivenessTick() {
|
|
1343
|
+
if (this.closed) return;
|
|
1344
|
+
const now = Date.now();
|
|
1345
|
+
const tickGap = now - this.lastTickAt;
|
|
1346
|
+
this.lastTickAt = now;
|
|
1347
|
+
if (tickGap > FROZEN_TICK_GAP_MS) {
|
|
1348
|
+
this.abort(`process froze ${Math.round(tickGap / 1e3)}s (suspend/resume); redialing`);
|
|
1349
|
+
return;
|
|
1350
|
+
}
|
|
1351
|
+
if (now - this.lastInboundAt > LIVENESS_TIMEOUT_MS) {
|
|
1352
|
+
this.abort(`no inbound frames for ${Math.round((now - this.lastInboundAt) / 1e3)}s`);
|
|
1353
|
+
return;
|
|
1354
|
+
}
|
|
1355
|
+
void this.enqueueSend({
|
|
1356
|
+
streamId: CONNECTION_STREAM_ID,
|
|
1357
|
+
frameType: FRAME_TYPE_V2.PING,
|
|
1358
|
+
payload: new Uint8Array(0)
|
|
1359
|
+
});
|
|
1360
|
+
}
|
|
1361
|
+
/** Presumed-dead teardown: no farewell frames — the socket is a zombie. */
|
|
1362
|
+
abort(reason) {
|
|
1363
|
+
this.teardown(reason);
|
|
1364
|
+
this.transport.close(1001, reason.slice(0, 100));
|
|
1365
|
+
}
|
|
1330
1366
|
/** Send our HELLO; the peer's must arrive as its first frame. */
|
|
1331
1367
|
async start() {
|
|
1332
1368
|
const payload = textEncoder6.encode(JSON.stringify(this.options.local));
|
|
@@ -1383,6 +1419,7 @@ var SessionV2 = class {
|
|
|
1383
1419
|
this.fail(`undecodable frame: ${error.message}`);
|
|
1384
1420
|
return;
|
|
1385
1421
|
}
|
|
1422
|
+
this.lastInboundAt = Date.now();
|
|
1386
1423
|
if (!this.peer) {
|
|
1387
1424
|
this.onHandshakeFrame(frame);
|
|
1388
1425
|
return;
|
|
@@ -1670,6 +1707,7 @@ var SessionV2 = class {
|
|
|
1670
1707
|
teardown(reason) {
|
|
1671
1708
|
if (this.closed) return;
|
|
1672
1709
|
this.closed = true;
|
|
1710
|
+
clearInterval(this.livenessTimer);
|
|
1673
1711
|
for (const streamId of this.streams.keys()) {
|
|
1674
1712
|
this.dropStream(streamId);
|
|
1675
1713
|
}
|
package/dist/dispatcher.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { package_default } from './chunk-
|
|
2
|
+
import { package_default } from './chunk-PVHB2MHV.mjs';
|
|
3
3
|
import { TEMPLATES } from './chunk-W3WLADJP.mjs';
|
|
4
4
|
|
|
5
5
|
// src/dispatcher.ts
|
|
@@ -142,18 +142,18 @@ var COMMANDS = {
|
|
|
142
142
|
domains: () => import('./domains-H3K2WW55.mjs'),
|
|
143
143
|
logs: () => import('./logs-2ECJQ3MU.mjs'),
|
|
144
144
|
status: () => import('./status-IA7PJ4TV.mjs'),
|
|
145
|
-
dev: () => import('./dev-
|
|
145
|
+
dev: () => import('./dev-5MB2BJ6L.mjs'),
|
|
146
146
|
mock: () => import('./mock-TSUKCLWU.mjs'),
|
|
147
|
-
introspect: () => import('./introspect-
|
|
147
|
+
introspect: () => import('./introspect-YBDCOO3I.mjs'),
|
|
148
148
|
inspect: () => import('./inspect-CGYX4DDF.mjs'),
|
|
149
|
-
doctor: () => import('./doctor-
|
|
150
|
-
explain: () => import('./explain-
|
|
149
|
+
doctor: () => import('./doctor-6Z6YR37N.mjs'),
|
|
150
|
+
explain: () => import('./explain-2FLJFJP3.mjs'),
|
|
151
151
|
assets: () => import('./assets-4D7VXRUE.mjs'),
|
|
152
152
|
repo: () => import('./repo-WSUAHXWO.mjs'),
|
|
153
153
|
list: () => import('./list-27TS2L47.mjs'),
|
|
154
154
|
add: () => import('./add-5ODVFWVR.mjs'),
|
|
155
|
-
update: () => import('./update-
|
|
156
|
-
upgrade: () => import('./update-
|
|
155
|
+
update: () => import('./update-VIDP5OKO.mjs'),
|
|
156
|
+
upgrade: () => import('./update-VIDP5OKO.mjs'),
|
|
157
157
|
"auth-step-up": () => import('./auth-step-up-NOSM4PUR.mjs')
|
|
158
158
|
};
|
|
159
159
|
var COMMAND_PREFIXES = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { gatherIntrospection } from './chunk-
|
|
2
|
+
import { gatherIntrospection } from './chunk-7P2OGMZ4.mjs';
|
|
3
3
|
import './chunk-K5464A3L.mjs';
|
|
4
4
|
import './chunk-DBZ3UOQ2.mjs';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-PVHB2MHV.mjs';
|
|
6
6
|
import { parseArgs, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
7
7
|
import { SDK_ENV_API_URL, DEFAULT_API_BASE_URL, ApiClient, ENV_API_BASE_URL } from './chunk-F4S5KETY.mjs';
|
|
8
8
|
import { readAuthOrNull } from './chunk-UBAI443T.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { package_default } from './chunk-
|
|
2
|
+
import { package_default } from './chunk-PVHB2MHV.mjs';
|
|
3
3
|
import { parseArgs } from './chunk-C4M3DXKC.mjs';
|
|
4
4
|
import { bold, dim, info, result, CliError, CLI_ERROR_CODE } from './chunk-E2T2SBP5.mjs';
|
|
5
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export { run as default, extractMockSeed, gatherIntrospection, renderIntrospection } from './chunk-
|
|
2
|
+
export { run as default, extractMockSeed, gatherIntrospection, renderIntrospection } from './chunk-7P2OGMZ4.mjs';
|
|
3
3
|
import './chunk-K5464A3L.mjs';
|
|
4
4
|
import './chunk-DBZ3UOQ2.mjs';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-PVHB2MHV.mjs';
|
|
6
6
|
import './chunk-C4M3DXKC.mjs';
|
|
7
7
|
import './chunk-UBAI443T.mjs';
|
|
8
8
|
import './chunk-E2T2SBP5.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { package_default } from './chunk-
|
|
2
|
+
import { package_default } from './chunk-PVHB2MHV.mjs';
|
|
3
3
|
import { promptYesNo } from './chunk-ITAFAORS.mjs';
|
|
4
4
|
import { parseArgs, flagBool, flagString } from './chunk-C4M3DXKC.mjs';
|
|
5
5
|
import { success, bold, info, dim, result, failure, CliError, CLI_ERROR_CODE, step, isJsonMode } from './chunk-E2T2SBP5.mjs';
|