@cimplify/cli 0.12.2 → 0.13.0
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/{add-5ODVFWVR.mjs → add-Q4OFUCNB.mjs} +3 -2
- package/dist/agent-3PAQPC7W.mjs +25 -0
- package/dist/{assets-4D7VXRUE.mjs → assets-Y4JE6MSG.mjs} +4 -3
- package/dist/{auth-step-up-NOSM4PUR.mjs → auth-step-up-EHL5PM2L.mjs} +5 -4
- package/dist/{cancel-PPNH6K67.mjs → cancel-QSZE2XC2.mjs} +4 -3
- package/dist/{dev-5MB2BJ6L.mjs → chunk-3UV4P4DM.mjs} +19 -158
- package/dist/{chunk-ITAFAORS.mjs → chunk-4YIFBYBV.mjs} +2 -1
- package/dist/{chunk-7P2OGMZ4.mjs → chunk-5GYD3EHJ.mjs} +5 -5
- package/dist/{chunk-DBZ3UOQ2.mjs → chunk-5U5OXOPN.mjs} +1 -1
- package/dist/{chunk-PVHB2MHV.mjs → chunk-5XXUHANH.mjs} +1 -1
- package/dist/{chunk-F4S5KETY.mjs → chunk-JPXK5BLA.mjs} +1 -1
- package/dist/{chunk-K5464A3L.mjs → chunk-OVHZV57L.mjs} +1 -1
- package/dist/{chunk-UBAI443T.mjs → chunk-QA36VSLX.mjs} +1 -1
- package/dist/{chunk-6C2QY3ZP.mjs → chunk-RR4NOZGY.mjs} +5 -4
- package/dist/{chunk-GLXONXS3.mjs → chunk-UP7N53C4.mjs} +1 -1
- package/dist/{chunk-VTR5R5NQ.mjs → chunk-VJJDGHZC.mjs} +2 -1
- package/dist/{chunk-E2T2SBP5.mjs → chunk-YPC4VU65.mjs} +1 -73
- package/dist/chunk-ZPVN6UXL.mjs +74 -0
- package/dist/{deploy-H7245HMP.mjs → deploy-UTAYLZOM.mjs} +8 -7
- package/dist/dev-QC55VHDI.mjs +165 -0
- package/dist/dispatcher.mjs +29 -27
- package/dist/{doctor-6Z6YR37N.mjs → doctor-4BHP3JT7.mjs} +8 -7
- package/dist/{domains-H3K2WW55.mjs → domains-OS3DXSDN.mjs} +5 -4
- package/dist/{env-3HY7HFVT.mjs → env-UVO4OIEO.mjs} +6 -5
- package/dist/{explain-2FLJFJP3.mjs → explain-OQZKABWP.mjs} +3 -2
- package/dist/{inspect-CGYX4DDF.mjs → inspect-ULWQHT7J.mjs} +3 -2
- package/dist/introspect-X7GQ7XUE.mjs +9 -0
- package/dist/{link-O4WAUWWE.mjs → link-VQN2WPZO.mjs} +4 -3
- package/dist/{list-27TS2L47.mjs → list-3OGYEBKV.mjs} +2 -1
- package/dist/{login-SCWIIEGR.mjs → login-UZ5Y7GIO.mjs} +5 -4
- package/dist/{logout-3RLBZ33M.mjs → logout-XYWZR6QJ.mjs} +3 -2
- package/dist/{logs-2ECJQ3MU.mjs → logs-YNXDXAF7.mjs} +4 -3
- package/dist/{mock-TSUKCLWU.mjs → mock-HFVAAYK2.mjs} +2 -1
- package/dist/{projects-2BITX2YE.mjs → projects-RJ44DJKZ.mjs} +4 -3
- package/dist/repo-OK6CVG3G.mjs +9 -0
- package/dist/{rollback-4YLTZRXP.mjs → rollback-Z2PRL7FS.mjs} +5 -4
- package/dist/{status-IA7PJ4TV.mjs → status-RR3GGTVU.mjs} +4 -3
- package/dist/{unlink-RFK74SFP.mjs → unlink-JBVZYOA3.mjs} +3 -2
- package/dist/{update-VIDP5OKO.mjs → update-6DO57SJN.mjs} +4 -3
- package/dist/{whoami-6GFMOY2M.mjs → whoami-5G32NNEP.mjs} +4 -3
- package/package.json +1 -1
- package/dist/introspect-YBDCOO3I.mjs +0 -8
- package/dist/repo-WSUAHXWO.mjs +0 -8
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { REGISTRY_INDEX, REGISTRY } from './chunk-W3WLADJP.mjs';
|
|
3
|
-
import { promptYesNo } from './chunk-
|
|
3
|
+
import { promptYesNo } from './chunk-4YIFBYBV.mjs';
|
|
4
4
|
import { parseArgs, flagString, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
5
|
-
import { CliError, CLI_ERROR_CODE
|
|
5
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
6
|
+
import { info, bold, dim, success, result, yellow } from './chunk-ZPVN6UXL.mjs';
|
|
6
7
|
import { mkdirSync, existsSync, writeFileSync } from 'fs';
|
|
7
8
|
import { resolve, join, dirname } from 'path';
|
|
8
9
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { startTunnelRuntime } from './chunk-3UV4P4DM.mjs';
|
|
3
|
+
import { info } from './chunk-ZPVN6UXL.mjs';
|
|
4
|
+
|
|
5
|
+
// src/commands/agent.ts
|
|
6
|
+
var FLAG_CHECK = "--check";
|
|
7
|
+
async function run(argv) {
|
|
8
|
+
if (argv.includes(FLAG_CHECK)) {
|
|
9
|
+
info("ok");
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const cwd = process.cwd();
|
|
13
|
+
info("cimplify agent: supervising the preview tunnel");
|
|
14
|
+
const stop = startTunnelRuntime(cwd);
|
|
15
|
+
await new Promise((resolve) => {
|
|
16
|
+
const shutdown = () => {
|
|
17
|
+
stop();
|
|
18
|
+
resolve();
|
|
19
|
+
};
|
|
20
|
+
process.once("SIGINT", shutdown);
|
|
21
|
+
process.once("SIGTERM", shutdown);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { run as default };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { parseArgs, flagString, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
3
|
-
import { ApiClient } from './chunk-
|
|
4
|
-
import { readAuth } from './chunk-
|
|
5
|
-
import { CliError, CLI_ERROR_CODE
|
|
3
|
+
import { ApiClient } from './chunk-JPXK5BLA.mjs';
|
|
4
|
+
import { readAuth } from './chunk-QA36VSLX.mjs';
|
|
5
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
6
|
+
import { step, yellow, dim, success, info, result, bold, green } from './chunk-ZPVN6UXL.mjs';
|
|
6
7
|
import { createHash } from 'crypto';
|
|
7
8
|
import { promises } from 'fs';
|
|
8
9
|
import path from 'path';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { startLoopbackServer, generateState, openBrowser } from './chunk-
|
|
2
|
+
import { startLoopbackServer, generateState, openBrowser } from './chunk-UP7N53C4.mjs';
|
|
3
3
|
import { parseArgs, flagString, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
4
|
-
import { resolveBaseUrl } from './chunk-
|
|
5
|
-
import { readAuth, writeStepUp } from './chunk-
|
|
6
|
-
import {
|
|
4
|
+
import { resolveBaseUrl } from './chunk-JPXK5BLA.mjs';
|
|
5
|
+
import { readAuth, writeStepUp } from './chunk-QA36VSLX.mjs';
|
|
6
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
7
|
+
import { isJsonMode, step, info, dim, success, result } from './chunk-ZPVN6UXL.mjs';
|
|
7
8
|
|
|
8
9
|
// src/commands/auth-step-up.ts
|
|
9
10
|
var FLAG_NO_BROWSER = "no-browser";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { parseArgs } from './chunk-C4M3DXKC.mjs';
|
|
3
|
-
import { ApiClient } from './chunk-
|
|
4
|
-
import { readAuth, readProjectLink } from './chunk-
|
|
5
|
-
import { CliError, CLI_ERROR_CODE
|
|
3
|
+
import { ApiClient } from './chunk-JPXK5BLA.mjs';
|
|
4
|
+
import { readAuth, readProjectLink } from './chunk-QA36VSLX.mjs';
|
|
5
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
6
|
+
import { success, result } from './chunk-ZPVN6UXL.mjs';
|
|
6
7
|
|
|
7
8
|
// src/commands/cancel.ts
|
|
8
9
|
function cancelEndpoint(businessId, projectId, deploymentId) {
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { parseArgs, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
5
|
-
import { ApiClient } from './chunk-F4S5KETY.mjs';
|
|
6
|
-
import { readAuth, readProjectLink } from './chunk-UBAI443T.mjs';
|
|
7
|
-
import { info, CliError, CLI_ERROR_CODE, dim } from './chunk-E2T2SBP5.mjs';
|
|
2
|
+
import { info, dim } from './chunk-ZPVN6UXL.mjs';
|
|
3
|
+
import http from 'http';
|
|
8
4
|
import { spawn } from 'child_process';
|
|
9
5
|
import { promises, watch } from 'fs';
|
|
10
6
|
import path from 'path';
|
|
11
|
-
import http from 'http';
|
|
12
7
|
|
|
13
8
|
// src/tunnel/v2/codec.ts
|
|
14
9
|
var HEADER_LEN = 9;
|
|
@@ -1344,6 +1339,10 @@ var SessionV2 = class {
|
|
|
1344
1339
|
const now = Date.now();
|
|
1345
1340
|
const tickGap = now - this.lastTickAt;
|
|
1346
1341
|
this.lastTickAt = now;
|
|
1342
|
+
if (tickGap < 0 || now < this.lastInboundAt) {
|
|
1343
|
+
this.lastInboundAt = now;
|
|
1344
|
+
return;
|
|
1345
|
+
}
|
|
1347
1346
|
if (tickGap > FROZEN_TICK_GAP_MS) {
|
|
1348
1347
|
this.abort(`process froze ${Math.round(tickGap / 1e3)}s (suspend/resume); redialing`);
|
|
1349
1348
|
return;
|
|
@@ -1906,6 +1905,7 @@ function sameTunnelEndpoint(a, b) {
|
|
|
1906
1905
|
var CONFIG_POLL_MS = 2e3;
|
|
1907
1906
|
var RECONNECT_MIN_MS = 1e3;
|
|
1908
1907
|
var RECONNECT_MAX_MS = 3e4;
|
|
1908
|
+
var STAND_DOWN_RETRY_MS = 5 * 6e4;
|
|
1909
1909
|
var CLOSE_CODE_REPLACED = 4e3;
|
|
1910
1910
|
function makeDefaultCreateClient(workspaceRoot) {
|
|
1911
1911
|
return (config, events) => new NegotiatingAgentClient({
|
|
@@ -1935,6 +1935,7 @@ function startTunnelRuntime(cwd, options = {}) {
|
|
|
1935
1935
|
reconnectTimer = null;
|
|
1936
1936
|
}
|
|
1937
1937
|
};
|
|
1938
|
+
let backoffResetTimer = null;
|
|
1938
1939
|
const startClient = (config) => {
|
|
1939
1940
|
generation += 1;
|
|
1940
1941
|
standDown = false;
|
|
@@ -1943,7 +1944,14 @@ function startTunnelRuntime(cwd, options = {}) {
|
|
|
1943
1944
|
onConnected: () => {
|
|
1944
1945
|
if (stopped || myGeneration !== generation) return;
|
|
1945
1946
|
connected = true;
|
|
1946
|
-
|
|
1947
|
+
if (backoffResetTimer) clearTimeout(backoffResetTimer);
|
|
1948
|
+
backoffResetTimer = setTimeout(() => {
|
|
1949
|
+
backoffResetTimer = null;
|
|
1950
|
+
if (!stopped && connected && myGeneration === generation) {
|
|
1951
|
+
reconnectDelay = RECONNECT_MIN_MS;
|
|
1952
|
+
}
|
|
1953
|
+
}, 1e4);
|
|
1954
|
+
backoffResetTimer.unref?.();
|
|
1947
1955
|
onStatus("(preview tunnel: connected)");
|
|
1948
1956
|
},
|
|
1949
1957
|
onClosed: (reason, closeCode) => {
|
|
@@ -1952,6 +1960,8 @@ function startTunnelRuntime(cwd, options = {}) {
|
|
|
1952
1960
|
if (closeCode === CLOSE_CODE_REPLACED) {
|
|
1953
1961
|
standDown = true;
|
|
1954
1962
|
onStatus("(preview tunnel: replaced by a newer agent; standing down)");
|
|
1963
|
+
reconnectDelay = STAND_DOWN_RETRY_MS;
|
|
1964
|
+
scheduleReconnect();
|
|
1955
1965
|
return;
|
|
1956
1966
|
}
|
|
1957
1967
|
onStatus(`(preview tunnel: disconnected \u2014 ${reason})`);
|
|
@@ -2019,153 +2029,4 @@ function startTunnelRuntime(cwd, options = {}) {
|
|
|
2019
2029
|
};
|
|
2020
2030
|
}
|
|
2021
2031
|
|
|
2022
|
-
|
|
2023
|
-
var FLAG_REMOTE = "remote";
|
|
2024
|
-
var PACKAGE_JSON = "package.json";
|
|
2025
|
-
var ENV_LOCAL_FILE = ".env.local";
|
|
2026
|
-
var PUBLIC_API_URL_KEY = "NEXT_PUBLIC_CIMPLIFY_API_URL";
|
|
2027
|
-
var SCRIPT_DEV = "dev";
|
|
2028
|
-
var PREVIEW_ORIGIN_ENV = "CIMPLIFY_PREVIEW_ORIGIN";
|
|
2029
|
-
async function applyPreviewOrigin(cwd, originList) {
|
|
2030
|
-
const { ensurePreviewOrigin } = await import('./preview-config-344CUZLO.mjs');
|
|
2031
|
-
const origins = originList.split(",").map((origin) => origin.trim()).filter((origin) => origin.length > 0);
|
|
2032
|
-
if (origins.length === 0) return;
|
|
2033
|
-
try {
|
|
2034
|
-
const result = await ensurePreviewOrigin(cwd, origins);
|
|
2035
|
-
if (result.status === "unrecognized") {
|
|
2036
|
-
info(
|
|
2037
|
-
dim(
|
|
2038
|
-
`(preview: could not resolve ${result.file} config shape; hot-reload may be limited)`
|
|
2039
|
-
)
|
|
2040
|
-
);
|
|
2041
|
-
}
|
|
2042
|
-
} catch (err) {
|
|
2043
|
-
info(dim(`(preview: dev-origin setup skipped: ${err.message})`));
|
|
2044
|
-
}
|
|
2045
|
-
}
|
|
2046
|
-
var PM_BUN = "bun";
|
|
2047
|
-
var PM_PNPM = "pnpm";
|
|
2048
|
-
var PM_YARN = "yarn";
|
|
2049
|
-
var PM_NPM = "npm";
|
|
2050
|
-
var LOCKFILE_BUN = "bun.lock";
|
|
2051
|
-
var LOCKFILE_BUN_BINARY = "bun.lockb";
|
|
2052
|
-
var LOCKFILE_PNPM = "pnpm-lock.yaml";
|
|
2053
|
-
var LOCKFILE_YARN = "yarn.lock";
|
|
2054
|
-
var BUNFIG = "bunfig.toml";
|
|
2055
|
-
function envEndpoint(businessId, projectId) {
|
|
2056
|
-
return `/v1/businesses/${encodeURIComponent(businessId)}/projects/${encodeURIComponent(projectId)}/env-vars`;
|
|
2057
|
-
}
|
|
2058
|
-
async function detectPackageManager(cwd) {
|
|
2059
|
-
if (await pathExists(path.join(cwd, LOCKFILE_BUN))) return PM_BUN;
|
|
2060
|
-
if (await pathExists(path.join(cwd, LOCKFILE_BUN_BINARY))) return PM_BUN;
|
|
2061
|
-
if (await pathExists(path.join(cwd, BUNFIG))) return PM_BUN;
|
|
2062
|
-
if (await pathExists(path.join(cwd, LOCKFILE_PNPM))) return PM_PNPM;
|
|
2063
|
-
if (await pathExists(path.join(cwd, LOCKFILE_YARN))) return PM_YARN;
|
|
2064
|
-
return PM_NPM;
|
|
2065
|
-
}
|
|
2066
|
-
async function pathExists(target) {
|
|
2067
|
-
try {
|
|
2068
|
-
await promises.stat(target);
|
|
2069
|
-
return true;
|
|
2070
|
-
} catch (err) {
|
|
2071
|
-
if (err.code === "ENOENT") return false;
|
|
2072
|
-
throw err;
|
|
2073
|
-
}
|
|
2074
|
-
}
|
|
2075
|
-
async function readPackageJson(cwd) {
|
|
2076
|
-
const pkgPath = path.join(cwd, PACKAGE_JSON);
|
|
2077
|
-
let raw;
|
|
2078
|
-
try {
|
|
2079
|
-
raw = await promises.readFile(pkgPath, "utf8");
|
|
2080
|
-
} catch (err) {
|
|
2081
|
-
if (err.code === "ENOENT") {
|
|
2082
|
-
throw new CliError(
|
|
2083
|
-
CLI_ERROR_CODE.INVALID_INPUT,
|
|
2084
|
-
`No package.json in ${cwd}. \`cimplify dev\` runs your project's dev script.`
|
|
2085
|
-
);
|
|
2086
|
-
}
|
|
2087
|
-
throw err;
|
|
2088
|
-
}
|
|
2089
|
-
return JSON.parse(raw);
|
|
2090
|
-
}
|
|
2091
|
-
function mergeEnvEntries(existing, incoming) {
|
|
2092
|
-
const seen = new Set(existing.map((e) => e.key));
|
|
2093
|
-
const merged = [...existing];
|
|
2094
|
-
for (const entry of incoming) {
|
|
2095
|
-
if (seen.has(entry.key)) continue;
|
|
2096
|
-
merged.push(entry);
|
|
2097
|
-
seen.add(entry.key);
|
|
2098
|
-
}
|
|
2099
|
-
return merged;
|
|
2100
|
-
}
|
|
2101
|
-
async function applyRemoteEnv(client, businessId, projectId, apiBaseUrl, cwd) {
|
|
2102
|
-
const records = await client.get(envEndpoint(businessId, projectId), {
|
|
2103
|
-
query: { scope: ENV_SCOPE.PRODUCTION }
|
|
2104
|
-
});
|
|
2105
|
-
const incoming = records.filter((r) => r.value !== null && !r.is_secret).map((r) => ({ key: r.key, value: r.value }));
|
|
2106
|
-
incoming.push({ key: PUBLIC_API_URL_KEY, value: apiBaseUrl });
|
|
2107
|
-
const envPath = path.join(cwd, ENV_LOCAL_FILE);
|
|
2108
|
-
let existing = [];
|
|
2109
|
-
try {
|
|
2110
|
-
const raw = await promises.readFile(envPath, "utf8");
|
|
2111
|
-
existing = parseEnvFile(raw);
|
|
2112
|
-
} catch (err) {
|
|
2113
|
-
if (err.code !== "ENOENT") throw err;
|
|
2114
|
-
}
|
|
2115
|
-
const merged = mergeEnvEntries(existing, incoming);
|
|
2116
|
-
await promises.writeFile(envPath, formatEnvFile(merged), "utf8");
|
|
2117
|
-
const publicCount = incoming.filter((e) => e.key.startsWith(PUBLIC_ENV_PREFIX)).length;
|
|
2118
|
-
return publicCount;
|
|
2119
|
-
}
|
|
2120
|
-
async function run(argv) {
|
|
2121
|
-
const args = parseArgs(argv);
|
|
2122
|
-
const remote = flagBool(args, FLAG_REMOTE);
|
|
2123
|
-
const cwd = process.cwd();
|
|
2124
|
-
const previewOrigin = process.env[PREVIEW_ORIGIN_ENV];
|
|
2125
|
-
if (remote) {
|
|
2126
|
-
const auth = await readAuth();
|
|
2127
|
-
const link = await readProjectLink();
|
|
2128
|
-
const client = ApiClient.fromAuth(auth);
|
|
2129
|
-
const publicCount = await applyRemoteEnv(
|
|
2130
|
-
client,
|
|
2131
|
-
link.businessId,
|
|
2132
|
-
link.projectId,
|
|
2133
|
-
auth.apiBaseUrl,
|
|
2134
|
-
cwd
|
|
2135
|
-
);
|
|
2136
|
-
const label = link.businessHandle ?? auth.businessHandle ?? auth.businessId;
|
|
2137
|
-
info(`Dev mode: connected to ${label} production data (${publicCount} public var${publicCount === 1 ? "" : "s"} merged)`);
|
|
2138
|
-
} else if (previewOrigin) {
|
|
2139
|
-
info("Dev mode: hosted preview");
|
|
2140
|
-
} else {
|
|
2141
|
-
info("Dev mode: using local mock (`cimplify mock`)");
|
|
2142
|
-
}
|
|
2143
|
-
const pkg = await readPackageJson(cwd);
|
|
2144
|
-
if (!pkg.scripts || !pkg.scripts[SCRIPT_DEV]) {
|
|
2145
|
-
throw new CliError(
|
|
2146
|
-
CLI_ERROR_CODE.INVALID_INPUT,
|
|
2147
|
-
`No "${SCRIPT_DEV}" script in package.json. Add one (e.g. "next dev") and re-run.`
|
|
2148
|
-
);
|
|
2149
|
-
}
|
|
2150
|
-
let stopTunnel = null;
|
|
2151
|
-
if (previewOrigin) {
|
|
2152
|
-
await applyPreviewOrigin(cwd, previewOrigin);
|
|
2153
|
-
stopTunnel = startTunnelRuntime(cwd);
|
|
2154
|
-
}
|
|
2155
|
-
const pm = await detectPackageManager(cwd);
|
|
2156
|
-
info(dim(`(running: ${pm} run ${SCRIPT_DEV})`));
|
|
2157
|
-
const child = spawn(pm, ["run", SCRIPT_DEV], { cwd, stdio: "inherit" });
|
|
2158
|
-
try {
|
|
2159
|
-
await new Promise((resolve, reject) => {
|
|
2160
|
-
child.on("error", (err) => reject(new CliError(CLI_ERROR_CODE.INVALID_INPUT, `Failed to spawn ${pm}: ${err.message}`)));
|
|
2161
|
-
child.on("close", (code) => {
|
|
2162
|
-
process.exitCode = code ?? 0;
|
|
2163
|
-
resolve();
|
|
2164
|
-
});
|
|
2165
|
-
});
|
|
2166
|
-
} finally {
|
|
2167
|
-
stopTunnel?.();
|
|
2168
|
-
}
|
|
2169
|
-
}
|
|
2170
|
-
|
|
2171
|
-
export { run as default, detectPackageManager, mergeEnvEntries };
|
|
2032
|
+
export { startTunnelRuntime };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
3
|
+
import { isAutoYes, isInteractive } from './chunk-ZPVN6UXL.mjs';
|
|
3
4
|
import readline from 'readline';
|
|
4
5
|
|
|
5
6
|
async function promptLine(question) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { gitDetectRoot, gitCurrentBranch, gitCurrentSha, gitStatusPorcelain } from './chunk-
|
|
3
|
-
import { parseEnvFile } from './chunk-
|
|
4
|
-
import { package_default } from './chunk-
|
|
2
|
+
import { gitDetectRoot, gitCurrentBranch, gitCurrentSha, gitStatusPorcelain } from './chunk-OVHZV57L.mjs';
|
|
3
|
+
import { parseEnvFile } from './chunk-5U5OXOPN.mjs';
|
|
4
|
+
import { package_default } from './chunk-5XXUHANH.mjs';
|
|
5
5
|
import { parseArgs } from './chunk-C4M3DXKC.mjs';
|
|
6
|
-
import { readAuthOrNull, readProjectLinkOrNull, readProjectState } from './chunk-
|
|
7
|
-
import { bold, dim, yellow, green, info, result, red } from './chunk-
|
|
6
|
+
import { readAuthOrNull, readProjectLinkOrNull, readProjectState } from './chunk-QA36VSLX.mjs';
|
|
7
|
+
import { bold, dim, yellow, green, info, result, red } from './chunk-ZPVN6UXL.mjs';
|
|
8
8
|
import { promises } from 'fs';
|
|
9
9
|
import path from 'path';
|
|
10
10
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { promptYesNo } from './chunk-
|
|
2
|
+
import { promptYesNo } from './chunk-4YIFBYBV.mjs';
|
|
3
3
|
import { TOKEN_PURPOSE, REPO_PROVIDER, REPO_PROVIDER_VALUES } from './chunk-MXYUAJEW.mjs';
|
|
4
4
|
import { parseArgs, flagString, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
5
|
-
import { ApiClient } from './chunk-
|
|
6
|
-
import { readAuth, readProjectLink } from './chunk-
|
|
7
|
-
import { CliError, CLI_ERROR_CODE
|
|
5
|
+
import { ApiClient } from './chunk-JPXK5BLA.mjs';
|
|
6
|
+
import { readAuth, readProjectLink } from './chunk-QA36VSLX.mjs';
|
|
7
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
8
|
+
import { isJsonMode, result, dim, success, info, bold } from './chunk-ZPVN6UXL.mjs';
|
|
8
9
|
|
|
9
10
|
// src/commands/repo.ts
|
|
10
11
|
var SUB_PROVISION = "provision";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { CliError, CLI_ERROR_CODE } from './chunk-
|
|
2
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
3
3
|
import { randomBytes, createHash } from 'crypto';
|
|
4
4
|
import { createServer } from 'http';
|
|
5
5
|
import { spawn } from 'child_process';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { TERMINAL_DEPLOYMENT_STATUSES, DEPLOYMENT_STATUS } from './chunk-MXYUAJEW.mjs';
|
|
3
|
-
import {
|
|
3
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
4
|
+
import { dim, failure, success, isJsonMode } from './chunk-ZPVN6UXL.mjs';
|
|
4
5
|
|
|
5
6
|
// src/progress.ts
|
|
6
7
|
var POLL_INTERVAL_MS = 1e3;
|
|
@@ -73,76 +73,4 @@ function isCliError(err) {
|
|
|
73
73
|
return err instanceof CliError || typeof err === "object" && err !== null && err.name === "CliError" && typeof err.code === "string" && typeof err.exitCode === "number";
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
var RESET = "\x1B[0m";
|
|
78
|
-
var BOLD_OPEN = "\x1B[1m";
|
|
79
|
-
var DIM_OPEN = "\x1B[2m";
|
|
80
|
-
var RED_OPEN = "\x1B[31m";
|
|
81
|
-
var GREEN_OPEN = "\x1B[32m";
|
|
82
|
-
var YELLOW_OPEN = "\x1B[33m";
|
|
83
|
-
var CYAN_OPEN = "\x1B[36m";
|
|
84
|
-
var PREFIX_STEP = "\u25B8";
|
|
85
|
-
var PREFIX_SUCCESS = "\u2713";
|
|
86
|
-
var PREFIX_FAILURE = "\u2717";
|
|
87
|
-
var ENV_JSON = "CIMPLIFY_JSON";
|
|
88
|
-
var ENV_YES = "CIMPLIFY_YES";
|
|
89
|
-
function envFlag(name) {
|
|
90
|
-
const v = process.env[name];
|
|
91
|
-
return v === "1" || v === "true";
|
|
92
|
-
}
|
|
93
|
-
function isJsonMode() {
|
|
94
|
-
return envFlag(ENV_JSON);
|
|
95
|
-
}
|
|
96
|
-
function isAutoYes() {
|
|
97
|
-
return envFlag(ENV_YES);
|
|
98
|
-
}
|
|
99
|
-
function isInteractive() {
|
|
100
|
-
return Boolean(process.stdout.isTTY) && Boolean(process.stdin.isTTY);
|
|
101
|
-
}
|
|
102
|
-
function wrap(open, value) {
|
|
103
|
-
return `${open}${value}${RESET}`;
|
|
104
|
-
}
|
|
105
|
-
function bold(value) {
|
|
106
|
-
return isJsonMode() ? value : wrap(BOLD_OPEN, value);
|
|
107
|
-
}
|
|
108
|
-
function dim(value) {
|
|
109
|
-
return isJsonMode() ? value : wrap(DIM_OPEN, value);
|
|
110
|
-
}
|
|
111
|
-
function red(value) {
|
|
112
|
-
return isJsonMode() ? value : wrap(RED_OPEN, value);
|
|
113
|
-
}
|
|
114
|
-
function green(value) {
|
|
115
|
-
return isJsonMode() ? value : wrap(GREEN_OPEN, value);
|
|
116
|
-
}
|
|
117
|
-
function yellow(value) {
|
|
118
|
-
return isJsonMode() ? value : wrap(YELLOW_OPEN, value);
|
|
119
|
-
}
|
|
120
|
-
function cyan(value) {
|
|
121
|
-
return isJsonMode() ? value : wrap(CYAN_OPEN, value);
|
|
122
|
-
}
|
|
123
|
-
function step(message) {
|
|
124
|
-
if (isJsonMode()) return;
|
|
125
|
-
console.log(`${cyan(PREFIX_STEP)} ${message}`);
|
|
126
|
-
}
|
|
127
|
-
function success(message) {
|
|
128
|
-
if (isJsonMode()) return;
|
|
129
|
-
console.log(`${green(PREFIX_SUCCESS)} ${message}`);
|
|
130
|
-
}
|
|
131
|
-
function failure(message) {
|
|
132
|
-
if (isJsonMode()) return;
|
|
133
|
-
console.error(`${red(PREFIX_FAILURE)} ${message}`);
|
|
134
|
-
}
|
|
135
|
-
function info(message) {
|
|
136
|
-
if (isJsonMode()) return;
|
|
137
|
-
console.log(message);
|
|
138
|
-
}
|
|
139
|
-
var ENV_EMITTED = "__CIMPLIFY_RESULT_EMITTED";
|
|
140
|
-
function result(data) {
|
|
141
|
-
if (!isJsonMode()) return;
|
|
142
|
-
if (process.env[ENV_EMITTED] === "1") return;
|
|
143
|
-
process.env[ENV_EMITTED] = "1";
|
|
144
|
-
process.stdout.write(`${JSON.stringify({ ok: true, data })}
|
|
145
|
-
`);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export { CLI_ERROR_CODE, CliError, EXIT_CODE, bold, dim, failure, green, info, isAutoYes, isCliError, isInteractive, isJsonMode, red, result, step, success, yellow };
|
|
76
|
+
export { CLI_ERROR_CODE, CliError, EXIT_CODE, isCliError };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// src/output.ts
|
|
3
|
+
var RESET = "\x1B[0m";
|
|
4
|
+
var BOLD_OPEN = "\x1B[1m";
|
|
5
|
+
var DIM_OPEN = "\x1B[2m";
|
|
6
|
+
var RED_OPEN = "\x1B[31m";
|
|
7
|
+
var GREEN_OPEN = "\x1B[32m";
|
|
8
|
+
var YELLOW_OPEN = "\x1B[33m";
|
|
9
|
+
var CYAN_OPEN = "\x1B[36m";
|
|
10
|
+
var PREFIX_STEP = "\u25B8";
|
|
11
|
+
var PREFIX_SUCCESS = "\u2713";
|
|
12
|
+
var PREFIX_FAILURE = "\u2717";
|
|
13
|
+
var ENV_JSON = "CIMPLIFY_JSON";
|
|
14
|
+
var ENV_YES = "CIMPLIFY_YES";
|
|
15
|
+
function envFlag(name) {
|
|
16
|
+
const v = process.env[name];
|
|
17
|
+
return v === "1" || v === "true";
|
|
18
|
+
}
|
|
19
|
+
function isJsonMode() {
|
|
20
|
+
return envFlag(ENV_JSON);
|
|
21
|
+
}
|
|
22
|
+
function isAutoYes() {
|
|
23
|
+
return envFlag(ENV_YES);
|
|
24
|
+
}
|
|
25
|
+
function isInteractive() {
|
|
26
|
+
return Boolean(process.stdout.isTTY) && Boolean(process.stdin.isTTY);
|
|
27
|
+
}
|
|
28
|
+
function wrap(open, value) {
|
|
29
|
+
return `${open}${value}${RESET}`;
|
|
30
|
+
}
|
|
31
|
+
function bold(value) {
|
|
32
|
+
return isJsonMode() ? value : wrap(BOLD_OPEN, value);
|
|
33
|
+
}
|
|
34
|
+
function dim(value) {
|
|
35
|
+
return isJsonMode() ? value : wrap(DIM_OPEN, value);
|
|
36
|
+
}
|
|
37
|
+
function red(value) {
|
|
38
|
+
return isJsonMode() ? value : wrap(RED_OPEN, value);
|
|
39
|
+
}
|
|
40
|
+
function green(value) {
|
|
41
|
+
return isJsonMode() ? value : wrap(GREEN_OPEN, value);
|
|
42
|
+
}
|
|
43
|
+
function yellow(value) {
|
|
44
|
+
return isJsonMode() ? value : wrap(YELLOW_OPEN, value);
|
|
45
|
+
}
|
|
46
|
+
function cyan(value) {
|
|
47
|
+
return isJsonMode() ? value : wrap(CYAN_OPEN, value);
|
|
48
|
+
}
|
|
49
|
+
function step(message) {
|
|
50
|
+
if (isJsonMode()) return;
|
|
51
|
+
console.log(`${cyan(PREFIX_STEP)} ${message}`);
|
|
52
|
+
}
|
|
53
|
+
function success(message) {
|
|
54
|
+
if (isJsonMode()) return;
|
|
55
|
+
console.log(`${green(PREFIX_SUCCESS)} ${message}`);
|
|
56
|
+
}
|
|
57
|
+
function failure(message) {
|
|
58
|
+
if (isJsonMode()) return;
|
|
59
|
+
console.error(`${red(PREFIX_FAILURE)} ${message}`);
|
|
60
|
+
}
|
|
61
|
+
function info(message) {
|
|
62
|
+
if (isJsonMode()) return;
|
|
63
|
+
console.log(message);
|
|
64
|
+
}
|
|
65
|
+
var ENV_EMITTED = "__CIMPLIFY_RESULT_EMITTED";
|
|
66
|
+
function result(data) {
|
|
67
|
+
if (!isJsonMode()) return;
|
|
68
|
+
if (process.env[ENV_EMITTED] === "1") return;
|
|
69
|
+
process.env[ENV_EMITTED] = "1";
|
|
70
|
+
process.stdout.write(`${JSON.stringify({ ok: true, data })}
|
|
71
|
+
`);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { bold, dim, failure, green, info, isAutoYes, isInteractive, isJsonMode, red, result, step, success, yellow };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { isFreestyleRemote, gitDetectRoot, gitStatusPorcelain, gitCurrentBranch, gitCurrentSha, gitGetRemoteUrl, gitPushToUrl, gitPush } from './chunk-
|
|
3
|
-
import { pollDeployment } from './chunk-
|
|
4
|
-
import { fetchRepoRecord, fetchCloneToken } from './chunk-
|
|
5
|
-
import { promptYesNo } from './chunk-
|
|
2
|
+
import { isFreestyleRemote, gitDetectRoot, gitStatusPorcelain, gitCurrentBranch, gitCurrentSha, gitGetRemoteUrl, gitPushToUrl, gitPush } from './chunk-OVHZV57L.mjs';
|
|
3
|
+
import { pollDeployment } from './chunk-VJJDGHZC.mjs';
|
|
4
|
+
import { fetchRepoRecord, fetchCloneToken } from './chunk-RR4NOZGY.mjs';
|
|
5
|
+
import { promptYesNo } from './chunk-4YIFBYBV.mjs';
|
|
6
6
|
import { REPO_PROVIDER, ENV_SCOPE, DEPLOY_TRIGGER, DEPLOYMENT_STATUS, TOKEN_PURPOSE } from './chunk-MXYUAJEW.mjs';
|
|
7
7
|
import { parseArgs, flagBool, flagString } from './chunk-C4M3DXKC.mjs';
|
|
8
|
-
import { ApiClient } from './chunk-
|
|
9
|
-
import { readAuth, readProjectLink, writeProjectState } from './chunk-
|
|
10
|
-
import { CliError, CLI_ERROR_CODE,
|
|
8
|
+
import { ApiClient } from './chunk-JPXK5BLA.mjs';
|
|
9
|
+
import { readAuth, readProjectLink, writeProjectState } from './chunk-QA36VSLX.mjs';
|
|
10
|
+
import { CliError, CLI_ERROR_CODE, EXIT_CODE } from './chunk-YPC4VU65.mjs';
|
|
11
|
+
import { info, dim, step, success, result } from './chunk-ZPVN6UXL.mjs';
|
|
11
12
|
|
|
12
13
|
// src/commands/deploy.ts
|
|
13
14
|
var FLAG_PROD = "prod";
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { startTunnelRuntime } from './chunk-3UV4P4DM.mjs';
|
|
3
|
+
import { parseEnvFile, formatEnvFile } from './chunk-5U5OXOPN.mjs';
|
|
4
|
+
import { ENV_SCOPE, PUBLIC_ENV_PREFIX } from './chunk-MXYUAJEW.mjs';
|
|
5
|
+
import { parseArgs, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
6
|
+
import { ApiClient } from './chunk-JPXK5BLA.mjs';
|
|
7
|
+
import { readAuth, readProjectLink } from './chunk-QA36VSLX.mjs';
|
|
8
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
9
|
+
import { info, dim } from './chunk-ZPVN6UXL.mjs';
|
|
10
|
+
import { spawn } from 'child_process';
|
|
11
|
+
import { promises } from 'fs';
|
|
12
|
+
import path from 'path';
|
|
13
|
+
|
|
14
|
+
var FLAG_REMOTE = "remote";
|
|
15
|
+
var PACKAGE_JSON = "package.json";
|
|
16
|
+
var ENV_LOCAL_FILE = ".env.local";
|
|
17
|
+
var PUBLIC_API_URL_KEY = "NEXT_PUBLIC_CIMPLIFY_API_URL";
|
|
18
|
+
var SCRIPT_DEV = "dev";
|
|
19
|
+
var PREVIEW_ORIGIN_ENV = "CIMPLIFY_PREVIEW_ORIGIN";
|
|
20
|
+
var AGENT_EXTERNAL_ENV = "CIMPLIFY_AGENT_EXTERNAL";
|
|
21
|
+
async function applyPreviewOrigin(cwd, originList) {
|
|
22
|
+
const { ensurePreviewOrigin } = await import('./preview-config-344CUZLO.mjs');
|
|
23
|
+
const origins = originList.split(",").map((origin) => origin.trim()).filter((origin) => origin.length > 0);
|
|
24
|
+
if (origins.length === 0) return;
|
|
25
|
+
try {
|
|
26
|
+
const result = await ensurePreviewOrigin(cwd, origins);
|
|
27
|
+
if (result.status === "unrecognized") {
|
|
28
|
+
info(
|
|
29
|
+
dim(
|
|
30
|
+
`(preview: could not resolve ${result.file} config shape; hot-reload may be limited)`
|
|
31
|
+
)
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
} catch (err) {
|
|
35
|
+
info(dim(`(preview: dev-origin setup skipped: ${err.message})`));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
var PM_BUN = "bun";
|
|
39
|
+
var PM_PNPM = "pnpm";
|
|
40
|
+
var PM_YARN = "yarn";
|
|
41
|
+
var PM_NPM = "npm";
|
|
42
|
+
var LOCKFILE_BUN = "bun.lock";
|
|
43
|
+
var LOCKFILE_BUN_BINARY = "bun.lockb";
|
|
44
|
+
var LOCKFILE_PNPM = "pnpm-lock.yaml";
|
|
45
|
+
var LOCKFILE_YARN = "yarn.lock";
|
|
46
|
+
var BUNFIG = "bunfig.toml";
|
|
47
|
+
function envEndpoint(businessId, projectId) {
|
|
48
|
+
return `/v1/businesses/${encodeURIComponent(businessId)}/projects/${encodeURIComponent(projectId)}/env-vars`;
|
|
49
|
+
}
|
|
50
|
+
async function detectPackageManager(cwd) {
|
|
51
|
+
if (await pathExists(path.join(cwd, LOCKFILE_BUN))) return PM_BUN;
|
|
52
|
+
if (await pathExists(path.join(cwd, LOCKFILE_BUN_BINARY))) return PM_BUN;
|
|
53
|
+
if (await pathExists(path.join(cwd, BUNFIG))) return PM_BUN;
|
|
54
|
+
if (await pathExists(path.join(cwd, LOCKFILE_PNPM))) return PM_PNPM;
|
|
55
|
+
if (await pathExists(path.join(cwd, LOCKFILE_YARN))) return PM_YARN;
|
|
56
|
+
return PM_NPM;
|
|
57
|
+
}
|
|
58
|
+
async function pathExists(target) {
|
|
59
|
+
try {
|
|
60
|
+
await promises.stat(target);
|
|
61
|
+
return true;
|
|
62
|
+
} catch (err) {
|
|
63
|
+
if (err.code === "ENOENT") return false;
|
|
64
|
+
throw err;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
async function readPackageJson(cwd) {
|
|
68
|
+
const pkgPath = path.join(cwd, PACKAGE_JSON);
|
|
69
|
+
let raw;
|
|
70
|
+
try {
|
|
71
|
+
raw = await promises.readFile(pkgPath, "utf8");
|
|
72
|
+
} catch (err) {
|
|
73
|
+
if (err.code === "ENOENT") {
|
|
74
|
+
throw new CliError(
|
|
75
|
+
CLI_ERROR_CODE.INVALID_INPUT,
|
|
76
|
+
`No package.json in ${cwd}. \`cimplify dev\` runs your project's dev script.`
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
throw err;
|
|
80
|
+
}
|
|
81
|
+
return JSON.parse(raw);
|
|
82
|
+
}
|
|
83
|
+
function mergeEnvEntries(existing, incoming) {
|
|
84
|
+
const seen = new Set(existing.map((e) => e.key));
|
|
85
|
+
const merged = [...existing];
|
|
86
|
+
for (const entry of incoming) {
|
|
87
|
+
if (seen.has(entry.key)) continue;
|
|
88
|
+
merged.push(entry);
|
|
89
|
+
seen.add(entry.key);
|
|
90
|
+
}
|
|
91
|
+
return merged;
|
|
92
|
+
}
|
|
93
|
+
async function applyRemoteEnv(client, businessId, projectId, apiBaseUrl, cwd) {
|
|
94
|
+
const records = await client.get(envEndpoint(businessId, projectId), {
|
|
95
|
+
query: { scope: ENV_SCOPE.PRODUCTION }
|
|
96
|
+
});
|
|
97
|
+
const incoming = records.filter((r) => r.value !== null && !r.is_secret).map((r) => ({ key: r.key, value: r.value }));
|
|
98
|
+
incoming.push({ key: PUBLIC_API_URL_KEY, value: apiBaseUrl });
|
|
99
|
+
const envPath = path.join(cwd, ENV_LOCAL_FILE);
|
|
100
|
+
let existing = [];
|
|
101
|
+
try {
|
|
102
|
+
const raw = await promises.readFile(envPath, "utf8");
|
|
103
|
+
existing = parseEnvFile(raw);
|
|
104
|
+
} catch (err) {
|
|
105
|
+
if (err.code !== "ENOENT") throw err;
|
|
106
|
+
}
|
|
107
|
+
const merged = mergeEnvEntries(existing, incoming);
|
|
108
|
+
await promises.writeFile(envPath, formatEnvFile(merged), "utf8");
|
|
109
|
+
const publicCount = incoming.filter((e) => e.key.startsWith(PUBLIC_ENV_PREFIX)).length;
|
|
110
|
+
return publicCount;
|
|
111
|
+
}
|
|
112
|
+
async function run(argv) {
|
|
113
|
+
const args = parseArgs(argv);
|
|
114
|
+
const remote = flagBool(args, FLAG_REMOTE);
|
|
115
|
+
const cwd = process.cwd();
|
|
116
|
+
const previewOrigin = process.env[PREVIEW_ORIGIN_ENV];
|
|
117
|
+
if (remote) {
|
|
118
|
+
const auth = await readAuth();
|
|
119
|
+
const link = await readProjectLink();
|
|
120
|
+
const client = ApiClient.fromAuth(auth);
|
|
121
|
+
const publicCount = await applyRemoteEnv(
|
|
122
|
+
client,
|
|
123
|
+
link.businessId,
|
|
124
|
+
link.projectId,
|
|
125
|
+
auth.apiBaseUrl,
|
|
126
|
+
cwd
|
|
127
|
+
);
|
|
128
|
+
const label = link.businessHandle ?? auth.businessHandle ?? auth.businessId;
|
|
129
|
+
info(`Dev mode: connected to ${label} production data (${publicCount} public var${publicCount === 1 ? "" : "s"} merged)`);
|
|
130
|
+
} else if (previewOrigin) {
|
|
131
|
+
info("Dev mode: hosted preview");
|
|
132
|
+
} else {
|
|
133
|
+
info("Dev mode: using local mock (`cimplify mock`)");
|
|
134
|
+
}
|
|
135
|
+
const pkg = await readPackageJson(cwd);
|
|
136
|
+
if (!pkg.scripts || !pkg.scripts[SCRIPT_DEV]) {
|
|
137
|
+
throw new CliError(
|
|
138
|
+
CLI_ERROR_CODE.INVALID_INPUT,
|
|
139
|
+
`No "${SCRIPT_DEV}" script in package.json. Add one (e.g. "next dev") and re-run.`
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
let stopTunnel = null;
|
|
143
|
+
if (previewOrigin) {
|
|
144
|
+
await applyPreviewOrigin(cwd, previewOrigin);
|
|
145
|
+
if (!process.env[AGENT_EXTERNAL_ENV]) {
|
|
146
|
+
stopTunnel = startTunnelRuntime(cwd);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const pm = await detectPackageManager(cwd);
|
|
150
|
+
info(dim(`(running: ${pm} run ${SCRIPT_DEV})`));
|
|
151
|
+
const child = spawn(pm, ["run", SCRIPT_DEV], { cwd, stdio: "inherit" });
|
|
152
|
+
try {
|
|
153
|
+
await new Promise((resolve, reject) => {
|
|
154
|
+
child.on("error", (err) => reject(new CliError(CLI_ERROR_CODE.INVALID_INPUT, `Failed to spawn ${pm}: ${err.message}`)));
|
|
155
|
+
child.on("close", (code) => {
|
|
156
|
+
process.exitCode = code ?? 0;
|
|
157
|
+
resolve();
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
} finally {
|
|
161
|
+
stopTunnel?.();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export { run as default, detectPackageManager, mergeEnvEntries };
|
package/dist/dispatcher.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { package_default } from './chunk-PVHB2MHV.mjs';
|
|
3
2
|
import { TEMPLATES } from './chunk-W3WLADJP.mjs';
|
|
3
|
+
import { package_default } from './chunk-5XXUHANH.mjs';
|
|
4
4
|
|
|
5
5
|
// src/dispatcher.ts
|
|
6
6
|
var VERSION = package_default.version ?? "unknown";
|
|
@@ -33,6 +33,7 @@ Deploy:
|
|
|
33
33
|
cimplify status Show the latest deployment for the linked project
|
|
34
34
|
cimplify logs [flags] Stream build logs for the latest (or given) deployment
|
|
35
35
|
cimplify dev [--remote] Run your project's dev script (optionally with prod env)
|
|
36
|
+
cimplify agent Supervise the preview tunnel (dev VMs; runs in its own unit)
|
|
36
37
|
cimplify mock [flags] Boot the local Cimplify API mock (custom seeds welcome)
|
|
37
38
|
cimplify mock init [--from <seed>] Scaffold a cimplify.seed.ts (or --format json) to customise
|
|
38
39
|
|
|
@@ -129,32 +130,33 @@ Local mock server (custom demo data, no fork needed):
|
|
|
129
130
|
cimplify mock --seed-module ./seed.ts Boot from a seed module (defineSeed from @cimplify/sdk/mock)
|
|
130
131
|
`;
|
|
131
132
|
var COMMANDS = {
|
|
132
|
-
login: () => import('./login-
|
|
133
|
-
logout: () => import('./logout-
|
|
134
|
-
whoami: () => import('./whoami-
|
|
135
|
-
projects: () => import('./projects-
|
|
136
|
-
link: () => import('./link-
|
|
137
|
-
unlink: () => import('./unlink-
|
|
138
|
-
deploy: () => import('./deploy-
|
|
139
|
-
cancel: () => import('./cancel-
|
|
140
|
-
rollback: () => import('./rollback-
|
|
141
|
-
env: () => import('./env-
|
|
142
|
-
domains: () => import('./domains-
|
|
143
|
-
logs: () => import('./logs-
|
|
144
|
-
status: () => import('./status-
|
|
145
|
-
dev: () => import('./dev-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
133
|
+
login: () => import('./login-UZ5Y7GIO.mjs'),
|
|
134
|
+
logout: () => import('./logout-XYWZR6QJ.mjs'),
|
|
135
|
+
whoami: () => import('./whoami-5G32NNEP.mjs'),
|
|
136
|
+
projects: () => import('./projects-RJ44DJKZ.mjs'),
|
|
137
|
+
link: () => import('./link-VQN2WPZO.mjs'),
|
|
138
|
+
unlink: () => import('./unlink-JBVZYOA3.mjs'),
|
|
139
|
+
deploy: () => import('./deploy-UTAYLZOM.mjs'),
|
|
140
|
+
cancel: () => import('./cancel-QSZE2XC2.mjs'),
|
|
141
|
+
rollback: () => import('./rollback-Z2PRL7FS.mjs'),
|
|
142
|
+
env: () => import('./env-UVO4OIEO.mjs'),
|
|
143
|
+
domains: () => import('./domains-OS3DXSDN.mjs'),
|
|
144
|
+
logs: () => import('./logs-YNXDXAF7.mjs'),
|
|
145
|
+
status: () => import('./status-RR3GGTVU.mjs'),
|
|
146
|
+
dev: () => import('./dev-QC55VHDI.mjs'),
|
|
147
|
+
agent: () => import('./agent-3PAQPC7W.mjs'),
|
|
148
|
+
mock: () => import('./mock-HFVAAYK2.mjs'),
|
|
149
|
+
introspect: () => import('./introspect-X7GQ7XUE.mjs'),
|
|
150
|
+
inspect: () => import('./inspect-ULWQHT7J.mjs'),
|
|
151
|
+
doctor: () => import('./doctor-4BHP3JT7.mjs'),
|
|
152
|
+
explain: () => import('./explain-OQZKABWP.mjs'),
|
|
153
|
+
assets: () => import('./assets-Y4JE6MSG.mjs'),
|
|
154
|
+
repo: () => import('./repo-OK6CVG3G.mjs'),
|
|
155
|
+
list: () => import('./list-3OGYEBKV.mjs'),
|
|
156
|
+
add: () => import('./add-Q4OFUCNB.mjs'),
|
|
157
|
+
update: () => import('./update-6DO57SJN.mjs'),
|
|
158
|
+
upgrade: () => import('./update-6DO57SJN.mjs'),
|
|
159
|
+
"auth-step-up": () => import('./auth-step-up-EHL5PM2L.mjs')
|
|
158
160
|
};
|
|
159
161
|
var COMMAND_PREFIXES = {
|
|
160
162
|
auth: { "step-up": "auth-step-up" }
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { gatherIntrospection } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
2
|
+
import { gatherIntrospection } from './chunk-5GYD3EHJ.mjs';
|
|
3
|
+
import './chunk-OVHZV57L.mjs';
|
|
4
|
+
import './chunk-5U5OXOPN.mjs';
|
|
5
|
+
import './chunk-5XXUHANH.mjs';
|
|
6
6
|
import { parseArgs, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
7
|
-
import { SDK_ENV_API_URL, DEFAULT_API_BASE_URL, ApiClient, ENV_API_BASE_URL } from './chunk-
|
|
8
|
-
import { readAuthOrNull } from './chunk-
|
|
9
|
-
import {
|
|
7
|
+
import { SDK_ENV_API_URL, DEFAULT_API_BASE_URL, ApiClient, ENV_API_BASE_URL } from './chunk-JPXK5BLA.mjs';
|
|
8
|
+
import { readAuthOrNull } from './chunk-QA36VSLX.mjs';
|
|
9
|
+
import { isCliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
10
|
+
import { bold, dim, info, result, red, yellow, green } from './chunk-ZPVN6UXL.mjs';
|
|
10
11
|
import { promises } from 'fs';
|
|
11
12
|
import path from 'path';
|
|
12
13
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { promptYesNo } from './chunk-
|
|
2
|
+
import { promptYesNo } from './chunk-4YIFBYBV.mjs';
|
|
3
3
|
import { ENV_SCOPE, DOMAIN_TYPE } from './chunk-MXYUAJEW.mjs';
|
|
4
4
|
import { parseArgs, flagBool, flagString } from './chunk-C4M3DXKC.mjs';
|
|
5
|
-
import { ApiClient } from './chunk-
|
|
6
|
-
import { readAuth, readProjectLink } from './chunk-
|
|
7
|
-
import { CliError, CLI_ERROR_CODE
|
|
5
|
+
import { ApiClient } from './chunk-JPXK5BLA.mjs';
|
|
6
|
+
import { readAuth, readProjectLink } from './chunk-QA36VSLX.mjs';
|
|
7
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
8
|
+
import { result, info, dim, bold, success } from './chunk-ZPVN6UXL.mjs';
|
|
8
9
|
|
|
9
10
|
// src/commands/domains.ts
|
|
10
11
|
var SUB_LS = "ls";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { formatEnvFile, parseEnvFile, parseKeyValueArg } from './chunk-
|
|
3
|
-
import { promptYesNo } from './chunk-
|
|
2
|
+
import { formatEnvFile, parseEnvFile, parseKeyValueArg } from './chunk-5U5OXOPN.mjs';
|
|
3
|
+
import { promptYesNo } from './chunk-4YIFBYBV.mjs';
|
|
4
4
|
import { ENV_SCOPE, PUBLIC_ENV_PREFIX, SECRET_MASK } from './chunk-MXYUAJEW.mjs';
|
|
5
5
|
import { parseArgs, flagString, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
6
|
-
import { ApiClient } from './chunk-
|
|
7
|
-
import { readAuth, readProjectLink } from './chunk-
|
|
8
|
-
import { CliError, CLI_ERROR_CODE
|
|
6
|
+
import { ApiClient } from './chunk-JPXK5BLA.mjs';
|
|
7
|
+
import { readAuth, readProjectLink } from './chunk-QA36VSLX.mjs';
|
|
8
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
9
|
+
import { info, dim, result, bold, success } from './chunk-ZPVN6UXL.mjs';
|
|
9
10
|
import { promises } from 'fs';
|
|
10
11
|
import path from 'path';
|
|
11
12
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { package_default } from './chunk-
|
|
2
|
+
import { package_default } from './chunk-5XXUHANH.mjs';
|
|
3
3
|
import { parseArgs } from './chunk-C4M3DXKC.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
5
|
+
import { bold, dim, info, result } from './chunk-ZPVN6UXL.mjs';
|
|
5
6
|
|
|
6
7
|
// src/embedded-docs.ts
|
|
7
8
|
var TOPICS = [
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { parseEnvFile } from './chunk-
|
|
2
|
+
import { parseEnvFile } from './chunk-5U5OXOPN.mjs';
|
|
3
3
|
import { parseArgs, flagString, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
4
|
-
import { CliError, CLI_ERROR_CODE
|
|
4
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
5
|
+
import { isJsonMode, result, info, bold, dim, yellow, green, red } from './chunk-ZPVN6UXL.mjs';
|
|
5
6
|
import { promises } from 'fs';
|
|
6
7
|
import path from 'path';
|
|
7
8
|
import { createCimplifyClient } from '@cimplify/sdk';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
export { run as default, extractMockSeed, gatherIntrospection, renderIntrospection } from './chunk-5GYD3EHJ.mjs';
|
|
3
|
+
import './chunk-OVHZV57L.mjs';
|
|
4
|
+
import './chunk-5U5OXOPN.mjs';
|
|
5
|
+
import './chunk-5XXUHANH.mjs';
|
|
6
|
+
import './chunk-C4M3DXKC.mjs';
|
|
7
|
+
import './chunk-QA36VSLX.mjs';
|
|
8
|
+
import './chunk-YPC4VU65.mjs';
|
|
9
|
+
import './chunk-ZPVN6UXL.mjs';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { parseArgs } from './chunk-C4M3DXKC.mjs';
|
|
3
|
-
import { ApiClient } from './chunk-
|
|
4
|
-
import { readAuth, writeProjectLink } from './chunk-
|
|
5
|
-
import { CliError, CLI_ERROR_CODE
|
|
3
|
+
import { ApiClient } from './chunk-JPXK5BLA.mjs';
|
|
4
|
+
import { readAuth, writeProjectLink } from './chunk-QA36VSLX.mjs';
|
|
5
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
6
|
+
import { success, info, dim, result } from './chunk-ZPVN6UXL.mjs';
|
|
6
7
|
|
|
7
8
|
// src/commands/link.ts
|
|
8
9
|
function projectEndpoint(businessId, projectId) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { REGISTRY_INDEX } from './chunk-W3WLADJP.mjs';
|
|
3
3
|
import { parseArgs, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
4
|
-
import { CliError, CLI_ERROR_CODE
|
|
4
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
5
|
+
import { info, bold, dim, green, result } from './chunk-ZPVN6UXL.mjs';
|
|
5
6
|
|
|
6
7
|
// src/commands/list.ts
|
|
7
8
|
async function run(argv) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { generatePkcePair, openBrowser } from './chunk-
|
|
2
|
+
import { generatePkcePair, openBrowser } from './chunk-UP7N53C4.mjs';
|
|
3
3
|
import { parseArgs, flagString, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
4
|
-
import { resolveBaseUrl, ApiClient } from './chunk-
|
|
5
|
-
import { writeAuth } from './chunk-
|
|
6
|
-
import { CliError, CLI_ERROR_CODE
|
|
4
|
+
import { resolveBaseUrl, ApiClient } from './chunk-JPXK5BLA.mjs';
|
|
5
|
+
import { writeAuth } from './chunk-QA36VSLX.mjs';
|
|
6
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
7
|
+
import { success, result, isJsonMode, step, info, dim } from './chunk-ZPVN6UXL.mjs';
|
|
7
8
|
import os from 'os';
|
|
8
9
|
|
|
9
10
|
var FLAG_API_KEY = "api-key";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { clearAuth } from './chunk-
|
|
3
|
-
import
|
|
2
|
+
import { clearAuth } from './chunk-QA36VSLX.mjs';
|
|
3
|
+
import './chunk-YPC4VU65.mjs';
|
|
4
|
+
import { success, info, result } from './chunk-ZPVN6UXL.mjs';
|
|
4
5
|
|
|
5
6
|
// src/commands/logout.ts
|
|
6
7
|
async function run(_argv) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { TERMINAL_DEPLOYMENT_STATUSES } from './chunk-MXYUAJEW.mjs';
|
|
3
3
|
import { parseArgs, flagString, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
4
|
-
import { ApiClient } from './chunk-
|
|
5
|
-
import { readAuth, readProjectLink, readProjectState } from './chunk-
|
|
6
|
-
import { CliError, CLI_ERROR_CODE
|
|
4
|
+
import { ApiClient } from './chunk-JPXK5BLA.mjs';
|
|
5
|
+
import { readAuth, readProjectLink, readProjectState } from './chunk-QA36VSLX.mjs';
|
|
6
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
7
|
+
import { isJsonMode, failure, result, red } from './chunk-ZPVN6UXL.mjs';
|
|
7
8
|
|
|
8
9
|
// src/commands/logs.ts
|
|
9
10
|
var FLAG_DEPLOYMENT = "deployment";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { parseArgs, flagString, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
3
|
-
import { CliError, CLI_ERROR_CODE
|
|
3
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
4
|
+
import { info, dim } from './chunk-ZPVN6UXL.mjs';
|
|
4
5
|
import { spawn } from 'child_process';
|
|
5
6
|
import { existsSync, writeFileSync } from 'fs';
|
|
6
7
|
import path from 'path';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { REPO_PROVIDER } from './chunk-MXYUAJEW.mjs';
|
|
3
3
|
import { parseArgs, flagString, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
4
|
-
import { ApiClient } from './chunk-
|
|
5
|
-
import { readAuth } from './chunk-
|
|
6
|
-
import { CliError, CLI_ERROR_CODE
|
|
4
|
+
import { ApiClient } from './chunk-JPXK5BLA.mjs';
|
|
5
|
+
import { readAuth } from './chunk-QA36VSLX.mjs';
|
|
6
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
7
|
+
import { info, dim, result, bold, success } from './chunk-ZPVN6UXL.mjs';
|
|
7
8
|
|
|
8
9
|
// src/commands/projects.ts
|
|
9
10
|
var SUB_LS = "ls";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
export { run as default, fetchCloneToken, fetchRepoRecord } from './chunk-RR4NOZGY.mjs';
|
|
3
|
+
import './chunk-4YIFBYBV.mjs';
|
|
4
|
+
import './chunk-MXYUAJEW.mjs';
|
|
5
|
+
import './chunk-C4M3DXKC.mjs';
|
|
6
|
+
import './chunk-JPXK5BLA.mjs';
|
|
7
|
+
import './chunk-QA36VSLX.mjs';
|
|
8
|
+
import './chunk-YPC4VU65.mjs';
|
|
9
|
+
import './chunk-ZPVN6UXL.mjs';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { pollDeployment } from './chunk-
|
|
2
|
+
import { pollDeployment } from './chunk-VJJDGHZC.mjs';
|
|
3
3
|
import { DEPLOYMENT_STATUS, DEPLOY_TRIGGER } from './chunk-MXYUAJEW.mjs';
|
|
4
4
|
import { parseArgs, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
5
|
-
import { ApiClient } from './chunk-
|
|
6
|
-
import { readAuth, readProjectLink, writeProjectState } from './chunk-
|
|
7
|
-
import { CliError, CLI_ERROR_CODE,
|
|
5
|
+
import { ApiClient } from './chunk-JPXK5BLA.mjs';
|
|
6
|
+
import { readAuth, readProjectLink, writeProjectState } from './chunk-QA36VSLX.mjs';
|
|
7
|
+
import { CliError, CLI_ERROR_CODE, EXIT_CODE } from './chunk-YPC4VU65.mjs';
|
|
8
|
+
import { step, success, info, dim, result } from './chunk-ZPVN6UXL.mjs';
|
|
8
9
|
|
|
9
10
|
// src/commands/rollback.ts
|
|
10
11
|
var FLAG_NO_POLL = "no-poll";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { DEPLOYMENT_STATUS } from './chunk-MXYUAJEW.mjs';
|
|
3
3
|
import { parseArgs } from './chunk-C4M3DXKC.mjs';
|
|
4
|
-
import { ApiClient } from './chunk-
|
|
5
|
-
import { readAuth, readProjectLink, readProjectState } from './chunk-
|
|
6
|
-
import
|
|
4
|
+
import { ApiClient } from './chunk-JPXK5BLA.mjs';
|
|
5
|
+
import { readAuth, readProjectLink, readProjectState } from './chunk-QA36VSLX.mjs';
|
|
6
|
+
import './chunk-YPC4VU65.mjs';
|
|
7
|
+
import { bold, dim, info, result } from './chunk-ZPVN6UXL.mjs';
|
|
7
8
|
|
|
8
9
|
// src/commands/status.ts
|
|
9
10
|
var QUERY_LIMIT = "limit";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { clearProjectLink } from './chunk-
|
|
3
|
-
import
|
|
2
|
+
import { clearProjectLink } from './chunk-QA36VSLX.mjs';
|
|
3
|
+
import './chunk-YPC4VU65.mjs';
|
|
4
|
+
import { success, info, result } from './chunk-ZPVN6UXL.mjs';
|
|
4
5
|
|
|
5
6
|
// src/commands/unlink.ts
|
|
6
7
|
async function run(_argv) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { package_default } from './chunk-
|
|
3
|
-
import { promptYesNo } from './chunk-
|
|
2
|
+
import { package_default } from './chunk-5XXUHANH.mjs';
|
|
3
|
+
import { promptYesNo } from './chunk-4YIFBYBV.mjs';
|
|
4
4
|
import { parseArgs, flagBool, flagString } from './chunk-C4M3DXKC.mjs';
|
|
5
|
-
import {
|
|
5
|
+
import { CliError, CLI_ERROR_CODE } from './chunk-YPC4VU65.mjs';
|
|
6
|
+
import { success, bold, info, dim, result, failure, step, isJsonMode } from './chunk-ZPVN6UXL.mjs';
|
|
6
7
|
import { spawn } from 'child_process';
|
|
7
8
|
import { basename, dirname } from 'path';
|
|
8
9
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { ApiClient } from './chunk-
|
|
3
|
-
import { readAuth } from './chunk-
|
|
4
|
-
import
|
|
2
|
+
import { ApiClient } from './chunk-JPXK5BLA.mjs';
|
|
3
|
+
import { readAuth } from './chunk-QA36VSLX.mjs';
|
|
4
|
+
import './chunk-YPC4VU65.mjs';
|
|
5
|
+
import { info, bold, dim, result } from './chunk-ZPVN6UXL.mjs';
|
|
5
6
|
|
|
6
7
|
// src/commands/whoami.ts
|
|
7
8
|
var ENDPOINT_AUTH_ME = "/v1/auth/me";
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
export { run as default, extractMockSeed, gatherIntrospection, renderIntrospection } from './chunk-7P2OGMZ4.mjs';
|
|
3
|
-
import './chunk-K5464A3L.mjs';
|
|
4
|
-
import './chunk-DBZ3UOQ2.mjs';
|
|
5
|
-
import './chunk-PVHB2MHV.mjs';
|
|
6
|
-
import './chunk-C4M3DXKC.mjs';
|
|
7
|
-
import './chunk-UBAI443T.mjs';
|
|
8
|
-
import './chunk-E2T2SBP5.mjs';
|
package/dist/repo-WSUAHXWO.mjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
export { run as default, fetchCloneToken, fetchRepoRecord } from './chunk-6C2QY3ZP.mjs';
|
|
3
|
-
import './chunk-ITAFAORS.mjs';
|
|
4
|
-
import './chunk-MXYUAJEW.mjs';
|
|
5
|
-
import './chunk-C4M3DXKC.mjs';
|
|
6
|
-
import './chunk-F4S5KETY.mjs';
|
|
7
|
-
import './chunk-UBAI443T.mjs';
|
|
8
|
-
import './chunk-E2T2SBP5.mjs';
|