@prisma/cli-engine 0.0.9 → 0.1.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/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as Outcome, A as InputStream, At as CommandArgs, B as ExitWithChildStatusOptions, C as BrowserWaitRequest, Ct as TokenStorage, D as PromptSurface, Dt as Args, E as OpenUrlRequest, Et as defineConfigSection, F as TelemetryPayload, G as exitWithChildStatus, H as SpawnOptions, I as EngineCommandSnapshot, J as PackageManagerRunResult, K as PackageManagerId, L as RunSummary, M as OutputStream, Mt as PositionalSpec, N as PRISMA_CONFIG_VERSION, Nt as flag, O as Host, Ot as ArgsSpec, P as Runtime, Pt as positional, Q as Format, R as ChildResult, S as defineSessionCommand, St as ManagementApiClientConfig, T as OpenUrlOutcome, Tt as SectionValidation, U as SpawnRequest, V as SpawnChild, W as SpawnedChild, X as PackageOperations, Y as PackageManagerRunner, Z as Block, _ as ServerCommandDefinition, _t as CredentialOrigin, a as RedirectSpec, at as Text, b as defineCommand, bt as StoredSessions, c as CommandDefinition, ct as Ui, d as CommandNeeds, dt as StreamEvent, et as PRESENTED, f as CompletedEnvelope, ft as StreamMeta, g as NeedsSpec, gt as CredentialManager, h as HelpSpec, ht as CredentialIdentity, i as MountedTree, it as Status, j as LoadedConfig, jt as FlagSpec, k as HostProcess, kt as Char, l as CommandHandler, lt as EngineEvent, m as Handler, mt as Credential, n as CommandFamily, nt as PresentedResult, o as defineCommandFamily, ot as Tone, p as ErroredEnvelope, pt as ActiveCredential, q as PackageManagerRunRequest, r as CommandRedirect, rt as Span, s as AnyCommand, st as TreeNode, t as TelemetryDeclaration, tt as Presentations, u as CommandHelp, ut as Severity, v as SessionCommandDefinition, vt as SERVICE_TOKEN_ENV_VAR, w as CommandContext, wt as ConfigSection, x as defineServerCommand, xt as ManagementApiClient, y as SpawnDeclarations, yt as Session, z as ChildStatusSettlement } from "./report-DID_e0si.js";
|
|
2
2
|
import { n as CliStructuredError } from "./protocol-YjqPCCOG.js";
|
|
3
3
|
|
|
4
4
|
//#region src/cli.d.ts
|
|
@@ -36,7 +36,13 @@ declare function createCli(spec: {
|
|
|
36
36
|
readonly brief: string;
|
|
37
37
|
readonly description?: string;
|
|
38
38
|
}>>;
|
|
39
|
-
readonly commands: MountedTree;
|
|
39
|
+
readonly commands: MountedTree; /** Words for the root help card; the engine formats. */
|
|
40
|
+
readonly help?: {
|
|
41
|
+
readonly tagline?: string;
|
|
42
|
+
readonly description?: string;
|
|
43
|
+
readonly examples?: readonly string[];
|
|
44
|
+
readonly docsUrl?: string;
|
|
45
|
+
};
|
|
40
46
|
/**
|
|
41
47
|
* Declaring this, together with a `Runtime.spawnTelemetry` seam,
|
|
42
48
|
* turns telemetry on: the engine reads the user's preference,
|
|
@@ -54,11 +60,14 @@ declare function createCli(spec: {
|
|
|
54
60
|
* top-level key names a config section, and the recognised section
|
|
55
61
|
* names are exactly the ones the CLI's command families declare. Never
|
|
56
62
|
* throws — bad section values are the section validator's problem, not
|
|
57
|
-
*
|
|
63
|
+
* definePrismaConfig's.
|
|
58
64
|
*/
|
|
59
|
-
declare function
|
|
65
|
+
declare function definePrismaConfig<T extends Record<string, unknown>>(config: T): T & {
|
|
60
66
|
readonly $prismaConfig: number;
|
|
61
67
|
};
|
|
68
|
+
/** @deprecated Renamed to {@link definePrismaConfig}: every family's
|
|
69
|
+
* config helper carries a unique name, so none needs an import alias. */
|
|
70
|
+
declare const defineConfig: typeof definePrismaConfig;
|
|
62
71
|
/**
|
|
63
72
|
* The real-disk loader behind Runtime.loadConfig. The bin binds it to
|
|
64
73
|
* the process cwd; tests hand in fixtures.
|
|
@@ -186,4 +195,4 @@ declare function claimedExpiresAt(token: string): Date | undefined;
|
|
|
186
195
|
*/
|
|
187
196
|
declare function claimedIdentity(token: string): CredentialIdentity | undefined;
|
|
188
197
|
//#endregion
|
|
189
|
-
export { type ActiveCredential, type AnyCommand, type Args, type ArgsSpec, type Block, type BrowserWaitRequest, type Char, type ChildResult, type ChildStatusSettlement, type Cli, type CliRunHooks, type CommandArgs, type CommandContext, type CommandDefinition, type CommandFamily, type CommandHandler, type CommandHelp, type CommandNeeds, type CommandRedirect, type CompletedEnvelope, type ConfigSection, type Credential, type CredentialIdentity, type CredentialManager, type CredentialOrigin, type CredentialsRequiredReason, type EngineCommandSnapshot, type EngineEvent, EnvironmentCredentialManager, type ErroredEnvelope, type ExitWithChildStatusOptions, type FlagSpec, type Format, type Handler, type HelpSpec, type HostProcess, type InputStream, type LoadedConfig, type ManagementApiClient, type ManagementApiClientConfig, type MountedTree, type NeedsSpec, type OpenUrlOutcome, type OpenUrlRequest, type Outcome, type OutputStream, PRESENTED, PRISMA_CONFIG_VERSION, type PackageManagerId, type PackageManagerRunRequest, type PackageManagerRunResult, type PackageManagerRunner, type PackageOperations, type PositionalSpec, type Presentations, type PresentedResult, type PromptSurface, type RedirectSpec, type RunSummary, type Runtime, SERVICE_TOKEN_ENV_VAR, type SectionValidation, type ServerCommandDefinition, type Session, type SessionCommandDefinition, type Severity, type Span, type SpawnChild, type SpawnDeclarations, type SpawnOptions, type SpawnRequest, type SpawnedChild, type Status, type StoredSessions, type StreamEvent, type StreamMeta, type TelemetryDeclaration, type TelemetryPayload, type TelemetryStatus, type TelemetryStatusReason, type Text, type TokenStorage, type Tone, type TreeNode, type Ui, authServiceError, claimedExpiresAt, claimedIdentity, createCli, credentialRejectedError, credentialWorkspaceId, credentialWorkspaceMismatchError, credentialsRequiredError, defineCommand, defineCommandFamily, defineConfig, defineConfigSection, defineServerCommand, defineSessionCommand, emptyServiceTokenError, exitWithChildStatus, flag, loadConfig, noSessionForWorkspaceError, positional, telemetryCommandGroup };
|
|
198
|
+
export { type ActiveCredential, type AnyCommand, type Args, type ArgsSpec, type Block, type BrowserWaitRequest, type Char, type ChildResult, type ChildStatusSettlement, type Cli, type CliRunHooks, type CommandArgs, type CommandContext, type CommandDefinition, type CommandFamily, type CommandHandler, type CommandHelp, type CommandNeeds, type CommandRedirect, type CompletedEnvelope, type ConfigSection, type Credential, type CredentialIdentity, type CredentialManager, type CredentialOrigin, type CredentialsRequiredReason, type EngineCommandSnapshot, type EngineEvent, EnvironmentCredentialManager, type ErroredEnvelope, type ExitWithChildStatusOptions, type FlagSpec, type Format, type Handler, type HelpSpec, type Host, type HostProcess, type InputStream, type LoadedConfig, type ManagementApiClient, type ManagementApiClientConfig, type MountedTree, type NeedsSpec, type OpenUrlOutcome, type OpenUrlRequest, type Outcome, type OutputStream, PRESENTED, PRISMA_CONFIG_VERSION, type PackageManagerId, type PackageManagerRunRequest, type PackageManagerRunResult, type PackageManagerRunner, type PackageOperations, type PositionalSpec, type Presentations, type PresentedResult, type PromptSurface, type RedirectSpec, type RunSummary, type Runtime, SERVICE_TOKEN_ENV_VAR, type SectionValidation, type ServerCommandDefinition, type Session, type SessionCommandDefinition, type Severity, type Span, type SpawnChild, type SpawnDeclarations, type SpawnOptions, type SpawnRequest, type SpawnedChild, type Status, type StoredSessions, type StreamEvent, type StreamMeta, type TelemetryDeclaration, type TelemetryPayload, type TelemetryStatus, type TelemetryStatusReason, type Text, type TokenStorage, type Tone, type TreeNode, type Ui, authServiceError, claimedExpiresAt, claimedIdentity, createCli, credentialRejectedError, credentialWorkspaceId, credentialWorkspaceMismatchError, credentialsRequiredError, defineCommand, defineCommandFamily, defineConfig, defineConfigSection, definePrismaConfig, defineServerCommand, defineSessionCommand, emptyServiceTokenError, exitWithChildStatus, flag, loadConfig, noSessionForWorkspaceError, positional, telemetryCommandGroup };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { C as exitWithChildStatus, S as resolveGating, T as positional, _ as noSessionForWorkspaceError, b as userConfigPath, c as loadConfig, d as WORKSPACE_ID_ENV_VAR, f as authServiceError, g as emptyServiceTokenError, h as credentialsRequiredError, i as buildEngine, l as PRISMA_CONFIG_VERSION, m as credentialWorkspaceMismatchError, n as claimedIdentity, o as defineConfig, p as credentialRejectedError, r as credentialWorkspaceId, s as definePrismaConfig, t as claimedExpiresAt, u as SERVICE_TOKEN_ENV_VAR, v as PRESENTED, w as flag, x as writeUserConfig, y as readUserConfig } from "./token-claims-CJNNCGkL.js";
|
|
2
2
|
import { i as ok, r as notOk, t as CliStructuredError } from "./protocol-D1CRNkhv.js";
|
|
3
3
|
//#region src/cli.ts
|
|
4
4
|
/**
|
|
@@ -274,7 +274,8 @@ function statusPresentations(status) {
|
|
|
274
274
|
}]
|
|
275
275
|
}],
|
|
276
276
|
stdout: () => [...formatTelemetryStatusLines(status)],
|
|
277
|
-
json: () => status
|
|
277
|
+
json: () => status,
|
|
278
|
+
next: () => []
|
|
278
279
|
};
|
|
279
280
|
}
|
|
280
281
|
/** One confirmation line, echoed on stdout, with the stored decision as
|
|
@@ -287,7 +288,8 @@ function consentPresentations(line, json) {
|
|
|
287
288
|
text: line
|
|
288
289
|
}],
|
|
289
290
|
stdout: () => [line],
|
|
290
|
-
json: () => json
|
|
291
|
+
json: () => json,
|
|
292
|
+
next: () => []
|
|
291
293
|
};
|
|
292
294
|
}
|
|
293
295
|
const telemetryStatusCommand = defineCommand({
|
|
@@ -371,4 +373,4 @@ Telemetry is on by default (opt-out); see ${options.docsUrl}\nfor what is collec
|
|
|
371
373
|
};
|
|
372
374
|
}
|
|
373
375
|
//#endregion
|
|
374
|
-
export { EnvironmentCredentialManager, PRESENTED, PRISMA_CONFIG_VERSION, SERVICE_TOKEN_ENV_VAR, authServiceError, claimedExpiresAt, claimedIdentity, createCli, credentialRejectedError, credentialWorkspaceId, credentialWorkspaceMismatchError, credentialsRequiredError, defineCommand, defineCommandFamily, defineConfig, defineConfigSection, defineServerCommand, defineSessionCommand, emptyServiceTokenError, exitWithChildStatus, flag, loadConfig, noSessionForWorkspaceError, positional, telemetryCommandGroup };
|
|
376
|
+
export { EnvironmentCredentialManager, PRESENTED, PRISMA_CONFIG_VERSION, SERVICE_TOKEN_ENV_VAR, authServiceError, claimedExpiresAt, claimedIdentity, createCli, credentialRejectedError, credentialWorkspaceId, credentialWorkspaceMismatchError, credentialsRequiredError, defineCommand, defineCommandFamily, defineConfig, defineConfigSection, definePrismaConfig, defineServerCommand, defineSessionCommand, emptyServiceTokenError, exitWithChildStatus, flag, loadConfig, noSessionForWorkspaceError, positional, telemetryCommandGroup };
|