@prisma/cli 8.0.0-rc.15-dev.109 → 8.0.0-rc.15-dev.111
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.js +143 -64
- package/package.json +8 -8
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import process$1 from "node:process";
|
|
4
|
-
import { SERVICE_TOKEN_ENV_VAR, claimedExpiresAt, claimedIdentity, createCli, credentialWorkspaceId, credentialWorkspaceMismatchError, credentialsRequiredError, defineCommand, defineCommandFamily, defineConfigSection, defineSessionCommand, detectCI, emptyServiceTokenError, flag, loadConfig, noSessionForWorkspaceError, positional, readActiveAccessToken, telemetryCommandGroup } from "@prisma/cli-engine";
|
|
4
|
+
import { SERVICE_TOKEN_ENV_VAR, claimedExpiresAt, claimedIdentity, createCli, credentialWorkspaceId, credentialWorkspaceMismatchError, credentialsRequiredError, defineCommand, defineCommandFamily, defineConfigSection, defineSessionCommand, detectCI, emptyServiceTokenError, flag, loadConfig, noSessionForWorkspaceError, positional, readActiveAccessToken, realpathOr, resolveSectionOverChain, telemetryCommandGroup } from "@prisma/cli-engine";
|
|
5
5
|
import { createComposerFamily } from "@prisma/composer-cli/family";
|
|
6
6
|
import { ormCommandFamily } from "@prisma/orm-toolchain/cli";
|
|
7
7
|
import { CliStructuredError, notOk, ok } from "@prisma/cli-engine/protocol";
|
|
@@ -16,7 +16,7 @@ import events from "node:events";
|
|
|
16
16
|
import http from "node:http";
|
|
17
17
|
import readline from "node:readline/promises";
|
|
18
18
|
import open from "open";
|
|
19
|
-
import {
|
|
19
|
+
import { fstatSync, readFileSync, statSync } from "node:fs";
|
|
20
20
|
import { PnpmTool, YarnTool } from "@manypkg/tools";
|
|
21
21
|
import { Result, TaggedError, UnhandledException, matchError } from "better-result";
|
|
22
22
|
import { execFile, fork, spawn } from "node:child_process";
|
|
@@ -2212,6 +2212,28 @@ async function isFile(target) {
|
|
|
2212
2212
|
}
|
|
2213
2213
|
}
|
|
2214
2214
|
//#endregion
|
|
2215
|
+
//#region src/lib/version.ts
|
|
2216
|
+
const requireFromHere = createRequire(import.meta.url);
|
|
2217
|
+
/** The bundled entry sits one directory below the package root
|
|
2218
|
+
* (`dist/cli.js`); this source file sits two below (`src/lib/`). Both
|
|
2219
|
+
* are tried, nearest first, so the same code serves either. */
|
|
2220
|
+
const PACKAGE_JSON_CANDIDATES = ["../package.json", "../../package.json"];
|
|
2221
|
+
function readPackageMetadata() {
|
|
2222
|
+
for (const candidate of PACKAGE_JSON_CANDIDATES) try {
|
|
2223
|
+
const metadata = requireFromHere(candidate);
|
|
2224
|
+
if (metadata.version) return metadata;
|
|
2225
|
+
} catch {}
|
|
2226
|
+
return {};
|
|
2227
|
+
}
|
|
2228
|
+
function getCliVersion() {
|
|
2229
|
+
const pkg = readPackageMetadata();
|
|
2230
|
+
if (!pkg.version) throw new Error("CLI version metadata is missing from the installed package: the bundled package.json could not be read or did not contain a version field. Reinstall the CLI from the npm registry, or check your install path is intact.");
|
|
2231
|
+
return pkg.version;
|
|
2232
|
+
}
|
|
2233
|
+
function getCliName() {
|
|
2234
|
+
return CLI_NAME;
|
|
2235
|
+
}
|
|
2236
|
+
//#endregion
|
|
2215
2237
|
//#region src/commands/skills/config.ts
|
|
2216
2238
|
const DEFAULT = {
|
|
2217
2239
|
check: true,
|
|
@@ -2288,31 +2310,34 @@ function validateAgents(raw) {
|
|
|
2288
2310
|
agents
|
|
2289
2311
|
};
|
|
2290
2312
|
}
|
|
2313
|
+
/** The disk loader bound the way the bin's Runtime binds it, for
|
|
2314
|
+
* callers with no Runtime in scope (the post-login tip). */
|
|
2315
|
+
function projectConfigLoader(cwd) {
|
|
2316
|
+
return (configPath) => loadConfig(cwd, configPath, getCliVersion());
|
|
2317
|
+
}
|
|
2291
2318
|
/**
|
|
2292
|
-
* The
|
|
2293
|
-
*
|
|
2294
|
-
* command handler (the staleness check, the
|
|
2295
|
-
*
|
|
2319
|
+
* The project's skills settings, resolved per key over the discovered
|
|
2320
|
+
* config chain exactly as the skills commands resolve them, so callers
|
|
2321
|
+
* that run outside a command handler (the staleness check, the
|
|
2322
|
+
* post-login tip) agree with the commands on the governing config from
|
|
2323
|
+
* any directory. `load` is Runtime.loadConfig wherever a Runtime is in
|
|
2324
|
+
* scope, so a host-supplied loader governs these reads too. Chain
|
|
2325
|
+
* discovery is stat-only until a file exists, so a project without a
|
|
2326
|
+
* config never pays a TypeScript transpile.
|
|
2296
2327
|
*
|
|
2297
|
-
* Null deliberately collapses "no config" and "config
|
|
2298
|
-
* callers fall back to the default agent set, so a
|
|
2299
|
-
* silences the check. The commands that consume
|
|
2300
|
-
*
|
|
2328
|
+
* Null deliberately collapses "no config" and "config broken or
|
|
2329
|
+
* invalid": both callers fall back to the default agent set, so a
|
|
2330
|
+
* broken config never silences the check. The commands that consume
|
|
2331
|
+
* the config surface the error themselves.
|
|
2301
2332
|
*/
|
|
2302
|
-
function
|
|
2303
|
-
const
|
|
2333
|
+
async function readProjectSkillsConfig(load, configPath) {
|
|
2334
|
+
const loaded = await load(configPath);
|
|
2335
|
+
if (loaded.diagnostics.some((entry) => entry.diagnostic.severity === "error") || loaded.files.length === 0) return null;
|
|
2336
|
+
const resolved = resolveSectionOverChain(skillsConfigSection, loaded.files);
|
|
2337
|
+
if (!resolved.ok) return null;
|
|
2338
|
+
const section = skillsConfigSection.validate(resolved.value, resolved.provenance);
|
|
2304
2339
|
return section.ok ? section.value : null;
|
|
2305
2340
|
}
|
|
2306
|
-
/**
|
|
2307
|
-
* The project's skills settings from prisma.config.ts, or null when no
|
|
2308
|
-
* config file exists — decided with one stat, so a project without a
|
|
2309
|
-
* config never pays the file's TypeScript transpile — or the section
|
|
2310
|
-
* does not validate.
|
|
2311
|
-
*/
|
|
2312
|
-
async function readProjectSkillsConfig(cwd, configPath) {
|
|
2313
|
-
if (!existsSync(configPath === void 0 ? path.join(cwd, "prisma.config.ts") : path.resolve(cwd, configPath))) return null;
|
|
2314
|
-
return readSkillsConfig(await loadConfig(cwd, configPath));
|
|
2315
|
-
}
|
|
2316
2341
|
const skillsConfigSection = defineConfigSection({
|
|
2317
2342
|
name: SKILLS_CONFIG_SECTION_NAME,
|
|
2318
2343
|
validate: (raw) => {
|
|
@@ -2369,7 +2394,7 @@ const SKILLS_SYNC_ARGS = ["skills", "sync"];
|
|
|
2369
2394
|
async function resolveAgentSetupTipCommand(ctx) {
|
|
2370
2395
|
if (ctx.env.CI) return null;
|
|
2371
2396
|
try {
|
|
2372
|
-
const config = await readProjectSkillsConfig(ctx.cwd);
|
|
2397
|
+
const config = await readProjectSkillsConfig(projectConfigLoader(ctx.cwd), ctx.configPath);
|
|
2373
2398
|
if (config !== null && !config.check) return null;
|
|
2374
2399
|
const status = await readSkillsStatus(ctx.cwd, {
|
|
2375
2400
|
orphans: false,
|
|
@@ -2388,6 +2413,7 @@ async function resolveAgentSetupTipCommand(ctx) {
|
|
|
2388
2413
|
//#endregion
|
|
2389
2414
|
//#region src/commands/auth/credential-card.ts
|
|
2390
2415
|
const ENVIRONMENT_CREDENTIAL_NOTICE = `${SERVICE_TOKEN_ENV_VAR} supplies the credential in force; unset it to use your stored workspace sessions.`;
|
|
2416
|
+
const UNVERIFIED_CREDENTIAL_NOTICE = "Could not reach Prisma to confirm this sign-in. Showing what the local credential says.";
|
|
2391
2417
|
/** The card rows for the active credential, or the signed-out row when
|
|
2392
2418
|
* there is none. A credential nothing names — an environment token
|
|
2393
2419
|
* whose claims carry no workspace — has no workspace row at all. */
|
|
@@ -2661,22 +2687,31 @@ const SIGN_IN = {
|
|
|
2661
2687
|
* nothing else bounds a request: a host that accepts the connection
|
|
2662
2688
|
* and never answers would otherwise hold the command for minutes. */
|
|
2663
2689
|
const ENRICHMENT_TIMEOUT_MS = 3e3;
|
|
2664
|
-
/** Best-effort online enrichment: whoami works offline, so
|
|
2665
|
-
* leaves the identity as
|
|
2690
|
+
/** Best-effort online enrichment: whoami works offline, so a transient
|
|
2691
|
+
* failure leaves the identity as the credential's own claims said.
|
|
2692
|
+
* CLI.CREDENTIALS_REQUIRED means signed out; AUTH.SERVICE_TOKEN_REJECTED
|
|
2693
|
+
* is rethrown because signing in cannot fix an environment token. */
|
|
2666
2694
|
async function fetchedIdentity(api, signal) {
|
|
2667
2695
|
const bounded = AbortSignal.any([signal, AbortSignal.timeout(ENRICHMENT_TIMEOUT_MS)]);
|
|
2668
2696
|
try {
|
|
2669
2697
|
const { data } = await api.GET("/v1/me", { signal: bounded });
|
|
2670
|
-
|
|
2671
|
-
|
|
2698
|
+
if (data === void 0) return { kind: "inconclusive" };
|
|
2699
|
+
const user = data.data?.user;
|
|
2672
2700
|
return {
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2701
|
+
kind: "confirmed",
|
|
2702
|
+
identity: user ? {
|
|
2703
|
+
userId: user.id ?? void 0,
|
|
2704
|
+
email: user.email ?? void 0,
|
|
2705
|
+
name: user.name ?? void 0
|
|
2706
|
+
} : void 0
|
|
2676
2707
|
};
|
|
2677
|
-
} catch {
|
|
2708
|
+
} catch (cause) {
|
|
2678
2709
|
signal.throwIfAborted();
|
|
2679
|
-
|
|
2710
|
+
if (CliStructuredError.is(cause)) {
|
|
2711
|
+
if (cause.code === "CLI.CREDENTIALS_REQUIRED") return { kind: "signed-out" };
|
|
2712
|
+
if (cause.code === "AUTH.SERVICE_TOKEN_REJECTED") throw cause;
|
|
2713
|
+
}
|
|
2714
|
+
return { kind: "inconclusive" };
|
|
2680
2715
|
}
|
|
2681
2716
|
}
|
|
2682
2717
|
/**
|
|
@@ -2717,6 +2752,11 @@ function presentationsFor(spec, result) {
|
|
|
2717
2752
|
kind: "summary",
|
|
2718
2753
|
status: "info",
|
|
2719
2754
|
text: ENVIRONMENT_CREDENTIAL_NOTICE
|
|
2755
|
+
}] : [],
|
|
2756
|
+
...result.authenticated && !result.verified ? [{
|
|
2757
|
+
kind: "summary",
|
|
2758
|
+
status: "info",
|
|
2759
|
+
text: UNVERIFIED_CREDENTIAL_NOTICE
|
|
2720
2760
|
}] : []
|
|
2721
2761
|
],
|
|
2722
2762
|
stdout: () => rows.map((row) => `${row.label}: ${row.value}`),
|
|
@@ -2730,10 +2770,13 @@ const authWhoamiCommand = defineCommand({
|
|
|
2730
2770
|
examples: ["auth whoami", "auth whoami --json"]
|
|
2731
2771
|
},
|
|
2732
2772
|
handler: async (_args, ctx) => {
|
|
2733
|
-
const
|
|
2734
|
-
const
|
|
2773
|
+
const active = await ctx.activeCredential();
|
|
2774
|
+
const lookup = active === null ? void 0 : await fetchedIdentity(ctx.api, ctx.signal);
|
|
2775
|
+
const credential = lookup?.kind === "signed-out" ? null : active;
|
|
2776
|
+
const identity = credential === null ? null : mergedIdentity(credential.identity, lookup?.kind === "confirmed" ? lookup.identity : void 0);
|
|
2735
2777
|
const result = {
|
|
2736
2778
|
authenticated: credential !== null,
|
|
2779
|
+
verified: credential !== null && lookup?.kind === "confirmed",
|
|
2737
2780
|
workspace: credential === null || credential.workspaceId === void 0 ? null : {
|
|
2738
2781
|
id: credential.workspaceId,
|
|
2739
2782
|
name: credential.workspaceName ?? null
|
|
@@ -5053,28 +5096,6 @@ function unreadableBodyDetail(error) {
|
|
|
5053
5096
|
return isTimeout(error) ? TIMEOUT_DETAIL : "The feedback service response could not be read.";
|
|
5054
5097
|
}
|
|
5055
5098
|
//#endregion
|
|
5056
|
-
//#region src/lib/version.ts
|
|
5057
|
-
const requireFromHere = createRequire(import.meta.url);
|
|
5058
|
-
/** The bundled entry sits one directory below the package root
|
|
5059
|
-
* (`dist/cli.js`); this source file sits two below (`src/lib/`). Both
|
|
5060
|
-
* are tried, nearest first, so the same code serves either. */
|
|
5061
|
-
const PACKAGE_JSON_CANDIDATES = ["../package.json", "../../package.json"];
|
|
5062
|
-
function readPackageMetadata() {
|
|
5063
|
-
for (const candidate of PACKAGE_JSON_CANDIDATES) try {
|
|
5064
|
-
const metadata = requireFromHere(candidate);
|
|
5065
|
-
if (metadata.version) return metadata;
|
|
5066
|
-
} catch {}
|
|
5067
|
-
return {};
|
|
5068
|
-
}
|
|
5069
|
-
function getCliVersion() {
|
|
5070
|
-
const pkg = readPackageMetadata();
|
|
5071
|
-
if (!pkg.version) throw new Error("CLI version metadata is missing from the installed package: the bundled package.json could not be read or did not contain a version field. Reinstall the CLI from the npm registry, or check your install path is intact.");
|
|
5072
|
-
return pkg.version;
|
|
5073
|
-
}
|
|
5074
|
-
function getCliName() {
|
|
5075
|
-
return CLI_NAME;
|
|
5076
|
-
}
|
|
5077
|
-
//#endregion
|
|
5078
5099
|
//#region src/commands/feedback.ts
|
|
5079
5100
|
const DEFAULT_FEEDBACK_ENDPOINT = "https://hiieirp2pwqnjvq9axzyg6d0.fra.prisma.build/feedback";
|
|
5080
5101
|
const MAX_MESSAGE_LENGTH = 4e3;
|
|
@@ -6272,6 +6293,39 @@ async function syncSkillsStep(cwd, agents, checkEnabledByConfig) {
|
|
|
6272
6293
|
};
|
|
6273
6294
|
}
|
|
6274
6295
|
}
|
|
6296
|
+
/** Whether some file on the resolved chain sits in a strict ancestor
|
|
6297
|
+
* directory of cwd. A config in cwd itself does not count, and neither
|
|
6298
|
+
* does one reached sideways (--config to a file elsewhere) — the spec
|
|
6299
|
+
* defers only to an ancestor config. The chain is the one the needs
|
|
6300
|
+
* check loaded before the handler ran, so init's own scaffold never
|
|
6301
|
+
* counts either. Realpath'd on both sides so symlinked layouts compare
|
|
6302
|
+
* like with like. */
|
|
6303
|
+
function governedByAncestorConfig(files, cwd) {
|
|
6304
|
+
const here = realpathOr(cwd);
|
|
6305
|
+
return files.some((file) => {
|
|
6306
|
+
const relative = path.relative(realpathOr(path.dirname(file.path)), here);
|
|
6307
|
+
return relative !== "" && !relative.startsWith("..") && !path.isAbsolute(relative);
|
|
6308
|
+
});
|
|
6309
|
+
}
|
|
6310
|
+
const ANCESTOR_SKIPPED_POSTINSTALL = {
|
|
6311
|
+
report: {
|
|
6312
|
+
outcome: "skipped",
|
|
6313
|
+
reason: "governing-config",
|
|
6314
|
+
script: null,
|
|
6315
|
+
dependency: "skipped"
|
|
6316
|
+
},
|
|
6317
|
+
lines: [summary("info", "Skipped the postinstall hook and the prisma dev dependency: another prisma.config.ts already governs this directory, so both belong at the repository root. Pass --postinstall to add them here anyway.")],
|
|
6318
|
+
diagnostics: []
|
|
6319
|
+
};
|
|
6320
|
+
const ANCESTOR_SKIPPED_SKILLS = {
|
|
6321
|
+
report: {
|
|
6322
|
+
outcome: "skipped",
|
|
6323
|
+
reason: "governing-config",
|
|
6324
|
+
sync: null
|
|
6325
|
+
},
|
|
6326
|
+
lines: [summary("info", "Skipped the skills sync: another prisma.config.ts already governs this directory, so the skills belong at the repository root. Pass --skills with your agents to sync them here anyway.")],
|
|
6327
|
+
diagnostics: []
|
|
6328
|
+
};
|
|
6275
6329
|
const SKIPPED_POSTINSTALL = {
|
|
6276
6330
|
report: {
|
|
6277
6331
|
outcome: "skipped",
|
|
@@ -6327,6 +6381,11 @@ function parseSkillsFlag(raw, configured) {
|
|
|
6327
6381
|
agents
|
|
6328
6382
|
};
|
|
6329
6383
|
}
|
|
6384
|
+
async function postinstallStep(flag, deferToAncestor, cwd) {
|
|
6385
|
+
if (flag === false) return SKIPPED_POSTINSTALL;
|
|
6386
|
+
if (deferToAncestor && flag === void 0) return ANCESTOR_SKIPPED_POSTINSTALL;
|
|
6387
|
+
return addPostinstallHook(cwd);
|
|
6388
|
+
}
|
|
6330
6389
|
function initPresentations(result, postinstall, config, skills) {
|
|
6331
6390
|
return {
|
|
6332
6391
|
json: () => result,
|
|
@@ -6345,7 +6404,7 @@ function initPresentations(result, postinstall, config, skills) {
|
|
|
6345
6404
|
const initCommand = defineCommand({
|
|
6346
6405
|
help: {
|
|
6347
6406
|
summary: "Prepare this repository for Prisma: config file, dev dependency, AI-agent skills",
|
|
6348
|
-
description: "Runs locally and calls no platform API. Adds a postinstall script to package.json that keeps the Prisma agent skills in sync on every install, adds prisma to devDependencies at this CLI's exact version when no dependency field declares it, scaffolds a prisma.config.ts recording which agents to install skills for, then syncs the skills once now. Everything lands in the current directory; a prisma.config.ts or postinstall script that already exists is never edited. Rerunning is safe: each step reports what is already done.",
|
|
6407
|
+
description: "Runs locally and calls no platform API. Adds a postinstall script to package.json that keeps the Prisma agent skills in sync on every install, adds prisma to devDependencies at this CLI's exact version when no dependency field declares it, scaffolds a prisma.config.ts recording which agents to install skills for, then syncs the skills once now. Everything lands in the current directory; a prisma.config.ts or postinstall script that already exists is never edited. Rerunning is safe: each step reports what is already done. In a directory another prisma.config.ts already governs, init writes only the prisma.config.ts scaffold — the postinstall hook, the prisma dev dependency, and the skills sync belong at the repository root and are skipped unless --postinstall or --skills asks for them here.",
|
|
6349
6408
|
examples: [
|
|
6350
6409
|
"init",
|
|
6351
6410
|
"init --skills=claude,cursor",
|
|
@@ -6364,9 +6423,13 @@ const initCommand = defineCommand({
|
|
|
6364
6423
|
handler: async (args, ctx) => {
|
|
6365
6424
|
const skillsFlag = parseSkillsFlag(args.flags.skills, ctx.config.agents);
|
|
6366
6425
|
if (skillsFlag.kind === "invalid") return notOk(skillsFlag.error);
|
|
6367
|
-
const
|
|
6426
|
+
const deferToAncestor = governedByAncestorConfig(ctx.configFiles, ctx.cwd);
|
|
6427
|
+
const postinstall = await postinstallStep(args.flags.postinstall, deferToAncestor, ctx.cwd);
|
|
6368
6428
|
const config = await scaffoldConfigStep(ctx.cwd, skillsFlag.kind === "skip" ? [] : skillsFlag.agents, ctx.config.agentsConfigured);
|
|
6369
|
-
|
|
6429
|
+
let skills;
|
|
6430
|
+
if (skillsFlag.kind === "skip") skills = SKIPPED_SKILLS;
|
|
6431
|
+
else if (deferToAncestor && args.flags.skills === void 0) skills = ANCESTOR_SKIPPED_SKILLS;
|
|
6432
|
+
else skills = await syncSkillsStep(ctx.cwd, skillsFlag.agents, ctx.config.check);
|
|
6370
6433
|
const result = {
|
|
6371
6434
|
postinstall: postinstall.report,
|
|
6372
6435
|
config: config.report,
|
|
@@ -14482,6 +14545,21 @@ function outputStreamsShareDevice() {
|
|
|
14482
14545
|
return;
|
|
14483
14546
|
}
|
|
14484
14547
|
}
|
|
14548
|
+
/** One chain discovery and transpile per config path per process: a
|
|
14549
|
+
* command's needs check and the skills staleness check both load the
|
|
14550
|
+
* config, and the process is single-shot, so nothing invalidates. The
|
|
14551
|
+
* promise is cached, not the value, so concurrent calls coalesce. */
|
|
14552
|
+
function memoizedConfigLoader(proc) {
|
|
14553
|
+
const loads = /* @__PURE__ */ new Map();
|
|
14554
|
+
return (configPath) => {
|
|
14555
|
+
let load = loads.get(configPath);
|
|
14556
|
+
if (load === void 0) {
|
|
14557
|
+
load = loadConfig(proc.cwd(), configPath, getCliVersion());
|
|
14558
|
+
loads.set(configPath, load);
|
|
14559
|
+
}
|
|
14560
|
+
return load;
|
|
14561
|
+
};
|
|
14562
|
+
}
|
|
14485
14563
|
async function assembleRuntime(proc) {
|
|
14486
14564
|
const stdin = {
|
|
14487
14565
|
setRawMode: proc.stdin.isTTY === true && proc.stdin.setRawMode !== void 0 ? (enabled) => {
|
|
@@ -14515,7 +14593,7 @@ async function assembleRuntime(proc) {
|
|
|
14515
14593
|
outputStreamsShareDevice: outputStreamsShareDevice(),
|
|
14516
14594
|
exit: (code) => proc.exit(code),
|
|
14517
14595
|
onSignal: makeOnSignal(proc),
|
|
14518
|
-
loadConfig: (
|
|
14596
|
+
loadConfig: memoizedConfigLoader(proc),
|
|
14519
14597
|
credentialManager: new FileCredentialManager({
|
|
14520
14598
|
env: proc.env,
|
|
14521
14599
|
fetchWorkspaceName: fetchWorkspaceName(apiBaseUrl),
|
|
@@ -14554,7 +14632,7 @@ async function maybeWriteSkillsStaleNotice(runtime) {
|
|
|
14554
14632
|
checkDisabled: false
|
|
14555
14633
|
});
|
|
14556
14634
|
if (status.upToDate) return;
|
|
14557
|
-
const config = await readProjectSkillsConfig(runtime.
|
|
14635
|
+
const config = await readProjectSkillsConfig(runtime.loadConfig, configPathFromArgv(runtime.argv));
|
|
14558
14636
|
if (config !== null && !config.check) return;
|
|
14559
14637
|
const agents = config?.agents ?? DEFAULT_AGENTS;
|
|
14560
14638
|
if (agents.length === 0) return;
|
|
@@ -14631,8 +14709,8 @@ function isSuppressedByInvocation(runtime) {
|
|
|
14631
14709
|
function isFormat(tokens, format) {
|
|
14632
14710
|
return tokens.some((token, index) => token === `--format=${format}` || token === "--format" && tokens[index + 1] === format);
|
|
14633
14711
|
}
|
|
14634
|
-
/** The file an explicit --config names, so the check
|
|
14635
|
-
*
|
|
14712
|
+
/** The file an explicit --config names, so the check anchors the same
|
|
14713
|
+
* chain the command did. Discovery otherwise anchors at cwd. */
|
|
14636
14714
|
function configPathFromArgv(argv) {
|
|
14637
14715
|
const tokens = flagTokens(argv);
|
|
14638
14716
|
for (let index = 0; index < tokens.length; index += 1) {
|
|
@@ -14863,7 +14941,8 @@ async function main(proc, buildCliForRun = buildCli) {
|
|
|
14863
14941
|
argv: proc.argv.slice(2),
|
|
14864
14942
|
cwd: proc.cwd(),
|
|
14865
14943
|
stdout: proc.stdout,
|
|
14866
|
-
stderr: proc.stderr
|
|
14944
|
+
stderr: proc.stderr,
|
|
14945
|
+
loadConfig: runtime.loadConfig
|
|
14867
14946
|
});
|
|
14868
14947
|
return exitCode;
|
|
14869
14948
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/cli",
|
|
3
|
-
"version": "8.0.0-rc.15-dev.
|
|
3
|
+
"version": "8.0.0-rc.15-dev.111",
|
|
4
4
|
"description": "Command-line interface for the Prisma Developer Platform.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"license": "Apache-2.0",
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@manypkg/tools": "^2.1.2",
|
|
43
|
-
"@prisma/cli-engine": "0.
|
|
44
|
-
"@prisma/composer-cli": "0.
|
|
43
|
+
"@prisma/cli-engine": "0.5.0",
|
|
44
|
+
"@prisma/composer-cli": "0.21.0-dev.2",
|
|
45
45
|
"@prisma/compute-sdk": "0.42.0",
|
|
46
46
|
"@prisma/management-api-sdk": "1.69.0",
|
|
47
|
-
"@prisma/orm-toolchain": "8.0.0-rc.11-dev.
|
|
47
|
+
"@prisma/orm-toolchain": "8.0.0-rc.11-dev.37",
|
|
48
48
|
"@vercel/detect-agent": "^1.2.3",
|
|
49
49
|
"better-result": "^2.9.2",
|
|
50
50
|
"cross-spawn": "^7.0.6",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"open": "^11.0.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@prisma/composer": "0.
|
|
56
|
+
"@prisma/composer": "0.21.0-dev.2",
|
|
57
57
|
"@prisma/credentials-store": "^7.8.0",
|
|
58
|
-
"@repo/cli-conformance": "8.0.0-rc.15-dev.
|
|
59
|
-
"@repo/cli-telemetry": "8.0.0-rc.15-dev.
|
|
60
|
-
"@repo/tsconfig": "8.0.0-rc.15-dev.
|
|
58
|
+
"@repo/cli-conformance": "8.0.0-rc.15-dev.111",
|
|
59
|
+
"@repo/cli-telemetry": "8.0.0-rc.15-dev.111",
|
|
60
|
+
"@repo/tsconfig": "8.0.0-rc.15-dev.111",
|
|
61
61
|
"@types/node": "^22.19.19",
|
|
62
62
|
"@types/cross-spawn": "^6.0.6",
|
|
63
63
|
"tsdown": "^0.21.10",
|