@prisma-next/cli 0.3.0-pr.94.3 → 0.3.0-pr.94.4
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.map +1 -1
- package/dist/client-CoxxGz_7.mjs.map +1 -1
- package/dist/commands/contract-emit.mjs.map +1 -1
- package/dist/commands/db-init.mjs.map +1 -1
- package/dist/commands/db-introspect.mjs.map +1 -1
- package/dist/commands/db-schema-verify.mjs.map +1 -1
- package/dist/commands/db-sign.mjs.map +1 -1
- package/dist/commands/db-verify.mjs.map +1 -1
- package/dist/exports/index.mjs +0 -2
- package/dist/exports/index.mjs.map +1 -1
- package/dist/result-handler-Do_4Fi4U.mjs.map +1 -1
- package/package.json +10 -10
- package/src/cli.ts +9 -9
- package/src/commands/contract-emit.ts +9 -9
- package/src/commands/db-init.ts +9 -9
- package/src/commands/db-introspect.ts +8 -8
- package/src/commands/db-schema-verify.ts +8 -8
- package/src/commands/db-sign.ts +8 -8
- package/src/commands/db-verify.ts +8 -8
- package/src/control-api/client.ts +3 -3
- package/src/control-api/operations/db-init.ts +1 -1
- package/src/exports/control-api.ts +2 -2
- package/src/exports/index.ts +3 -3
- package/src/utils/framework-components.ts +1 -1
- package/src/utils/output.ts +3 -3
- package/src/utils/progress-adapter.ts +2 -2
- package/src/utils/result-handler.ts +3 -3
|
@@ -3,12 +3,12 @@ import { dirname, relative, resolve } from 'node:path';
|
|
|
3
3
|
import { errorContractConfigMissing } from '@prisma-next/core-control-plane/errors';
|
|
4
4
|
import { notOk, ok, type Result } from '@prisma-next/utils/result';
|
|
5
5
|
import { Command } from 'commander';
|
|
6
|
-
import { loadConfig } from '../config-loader';
|
|
7
|
-
import { createControlClient } from '../control-api/client';
|
|
8
|
-
import type { EmitContractSource, EmitFailure } from '../control-api/types';
|
|
9
|
-
import { CliStructuredError, errorRuntime, errorUnexpected } from '../utils/cli-errors';
|
|
10
|
-
import { setCommandDescriptions } from '../utils/command-helpers';
|
|
11
|
-
import { type GlobalFlags, parseGlobalFlags } from '../utils/global-flags';
|
|
6
|
+
import { loadConfig } from '../config-loader.ts';
|
|
7
|
+
import { createControlClient } from '../control-api/client.ts';
|
|
8
|
+
import type { EmitContractSource, EmitFailure } from '../control-api/types.ts';
|
|
9
|
+
import { CliStructuredError, errorRuntime, errorUnexpected } from '../utils/cli-errors.ts';
|
|
10
|
+
import { setCommandDescriptions } from '../utils/command-helpers.ts';
|
|
11
|
+
import { type GlobalFlags, parseGlobalFlags } from '../utils/global-flags.ts';
|
|
12
12
|
import {
|
|
13
13
|
type EmitContractResult,
|
|
14
14
|
formatCommandHelp,
|
|
@@ -16,9 +16,9 @@ import {
|
|
|
16
16
|
formatEmitOutput,
|
|
17
17
|
formatStyledHeader,
|
|
18
18
|
formatSuccessMessage,
|
|
19
|
-
} from '../utils/output';
|
|
20
|
-
import { createProgressAdapter } from '../utils/progress-adapter';
|
|
21
|
-
import { handleResult } from '../utils/result-handler';
|
|
19
|
+
} from '../utils/output.ts';
|
|
20
|
+
import { createProgressAdapter } from '../utils/progress-adapter.ts';
|
|
21
|
+
import { handleResult } from '../utils/result-handler.ts';
|
|
22
22
|
|
|
23
23
|
interface ContractEmitOptions {
|
|
24
24
|
readonly config?: string;
|
package/src/commands/db-init.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { readFile } from 'node:fs/promises';
|
|
|
2
2
|
import { relative, resolve } from 'node:path';
|
|
3
3
|
import { notOk, ok, type Result } from '@prisma-next/utils/result';
|
|
4
4
|
import { Command } from 'commander';
|
|
5
|
-
import { loadConfig } from '../config-loader';
|
|
6
|
-
import { createControlClient } from '../control-api/client';
|
|
7
|
-
import type { DbInitFailure } from '../control-api/types';
|
|
5
|
+
import { loadConfig } from '../config-loader.ts';
|
|
6
|
+
import { createControlClient } from '../control-api/client.ts';
|
|
7
|
+
import type { DbInitFailure } from '../control-api/types.ts';
|
|
8
8
|
import {
|
|
9
9
|
CliStructuredError,
|
|
10
10
|
errorContractValidationFailed,
|
|
@@ -16,9 +16,9 @@ import {
|
|
|
16
16
|
errorRuntime,
|
|
17
17
|
errorTargetMigrationNotSupported,
|
|
18
18
|
errorUnexpected,
|
|
19
|
-
} from '../utils/cli-errors';
|
|
20
|
-
import { setCommandDescriptions } from '../utils/command-helpers';
|
|
21
|
-
import { type GlobalFlags, parseGlobalFlags } from '../utils/global-flags';
|
|
19
|
+
} from '../utils/cli-errors.ts';
|
|
20
|
+
import { setCommandDescriptions } from '../utils/command-helpers.ts';
|
|
21
|
+
import { type GlobalFlags, parseGlobalFlags } from '../utils/global-flags.ts';
|
|
22
22
|
import {
|
|
23
23
|
type DbInitResult,
|
|
24
24
|
formatCommandHelp,
|
|
@@ -26,9 +26,9 @@ import {
|
|
|
26
26
|
formatDbInitJson,
|
|
27
27
|
formatDbInitPlanOutput,
|
|
28
28
|
formatStyledHeader,
|
|
29
|
-
} from '../utils/output';
|
|
30
|
-
import { createProgressAdapter } from '../utils/progress-adapter';
|
|
31
|
-
import { handleResult } from '../utils/result-handler';
|
|
29
|
+
} from '../utils/output.ts';
|
|
30
|
+
import { createProgressAdapter } from '../utils/progress-adapter.ts';
|
|
31
|
+
import { handleResult } from '../utils/result-handler.ts';
|
|
32
32
|
|
|
33
33
|
interface DbInitOptions {
|
|
34
34
|
readonly db?: string;
|
|
@@ -3,25 +3,25 @@ import type { CoreSchemaView } from '@prisma-next/core-control-plane/schema-view
|
|
|
3
3
|
import type { IntrospectSchemaResult } from '@prisma-next/core-control-plane/types';
|
|
4
4
|
import { notOk, ok, type Result } from '@prisma-next/utils/result';
|
|
5
5
|
import { Command } from 'commander';
|
|
6
|
-
import { loadConfig } from '../config-loader';
|
|
7
|
-
import { createControlClient } from '../control-api/client';
|
|
6
|
+
import { loadConfig } from '../config-loader.ts';
|
|
7
|
+
import { createControlClient } from '../control-api/client.ts';
|
|
8
8
|
import {
|
|
9
9
|
CliStructuredError,
|
|
10
10
|
errorDatabaseConnectionRequired,
|
|
11
11
|
errorDriverRequired,
|
|
12
12
|
errorJsonFormatNotSupported,
|
|
13
13
|
errorUnexpected,
|
|
14
|
-
} from '../utils/cli-errors';
|
|
15
|
-
import { setCommandDescriptions } from '../utils/command-helpers';
|
|
16
|
-
import { type GlobalFlags, parseGlobalFlags } from '../utils/global-flags';
|
|
14
|
+
} from '../utils/cli-errors.ts';
|
|
15
|
+
import { setCommandDescriptions } from '../utils/command-helpers.ts';
|
|
16
|
+
import { type GlobalFlags, parseGlobalFlags } from '../utils/global-flags.ts';
|
|
17
17
|
import {
|
|
18
18
|
formatCommandHelp,
|
|
19
19
|
formatIntrospectJson,
|
|
20
20
|
formatIntrospectOutput,
|
|
21
21
|
formatStyledHeader,
|
|
22
|
-
} from '../utils/output';
|
|
23
|
-
import { createProgressAdapter } from '../utils/progress-adapter';
|
|
24
|
-
import { handleResult } from '../utils/result-handler';
|
|
22
|
+
} from '../utils/output.ts';
|
|
23
|
+
import { createProgressAdapter } from '../utils/progress-adapter.ts';
|
|
24
|
+
import { handleResult } from '../utils/result-handler.ts';
|
|
25
25
|
|
|
26
26
|
interface DbIntrospectOptions {
|
|
27
27
|
readonly db?: string;
|
|
@@ -3,8 +3,8 @@ import { relative, resolve } from 'node:path';
|
|
|
3
3
|
import type { VerifyDatabaseSchemaResult } from '@prisma-next/core-control-plane/types';
|
|
4
4
|
import { notOk, ok, type Result } from '@prisma-next/utils/result';
|
|
5
5
|
import { Command } from 'commander';
|
|
6
|
-
import { loadConfig } from '../config-loader';
|
|
7
|
-
import { createControlClient } from '../control-api/client';
|
|
6
|
+
import { loadConfig } from '../config-loader.ts';
|
|
7
|
+
import { createControlClient } from '../control-api/client.ts';
|
|
8
8
|
import {
|
|
9
9
|
CliStructuredError,
|
|
10
10
|
errorContractValidationFailed,
|
|
@@ -13,17 +13,17 @@ import {
|
|
|
13
13
|
errorFileNotFound,
|
|
14
14
|
errorJsonFormatNotSupported,
|
|
15
15
|
errorUnexpected,
|
|
16
|
-
} from '../utils/cli-errors';
|
|
17
|
-
import { setCommandDescriptions } from '../utils/command-helpers';
|
|
18
|
-
import { type GlobalFlags, parseGlobalFlags } from '../utils/global-flags';
|
|
16
|
+
} from '../utils/cli-errors.ts';
|
|
17
|
+
import { setCommandDescriptions } from '../utils/command-helpers.ts';
|
|
18
|
+
import { type GlobalFlags, parseGlobalFlags } from '../utils/global-flags.ts';
|
|
19
19
|
import {
|
|
20
20
|
formatCommandHelp,
|
|
21
21
|
formatSchemaVerifyJson,
|
|
22
22
|
formatSchemaVerifyOutput,
|
|
23
23
|
formatStyledHeader,
|
|
24
|
-
} from '../utils/output';
|
|
25
|
-
import { createProgressAdapter } from '../utils/progress-adapter';
|
|
26
|
-
import { handleResult } from '../utils/result-handler';
|
|
24
|
+
} from '../utils/output.ts';
|
|
25
|
+
import { createProgressAdapter } from '../utils/progress-adapter.ts';
|
|
26
|
+
import { handleResult } from '../utils/result-handler.ts';
|
|
27
27
|
|
|
28
28
|
interface DbSchemaVerifyOptions {
|
|
29
29
|
readonly db?: string;
|
package/src/commands/db-sign.ts
CHANGED
|
@@ -6,8 +6,8 @@ import type {
|
|
|
6
6
|
} from '@prisma-next/core-control-plane/types';
|
|
7
7
|
import { notOk, ok, type Result } from '@prisma-next/utils/result';
|
|
8
8
|
import { Command } from 'commander';
|
|
9
|
-
import { loadConfig } from '../config-loader';
|
|
10
|
-
import { createControlClient } from '../control-api/client';
|
|
9
|
+
import { loadConfig } from '../config-loader.ts';
|
|
10
|
+
import { createControlClient } from '../control-api/client.ts';
|
|
11
11
|
import {
|
|
12
12
|
CliStructuredError,
|
|
13
13
|
errorContractValidationFailed,
|
|
@@ -16,9 +16,9 @@ import {
|
|
|
16
16
|
errorFileNotFound,
|
|
17
17
|
errorJsonFormatNotSupported,
|
|
18
18
|
errorUnexpected,
|
|
19
|
-
} from '../utils/cli-errors';
|
|
20
|
-
import { setCommandDescriptions } from '../utils/command-helpers';
|
|
21
|
-
import { type GlobalFlags, parseGlobalFlags } from '../utils/global-flags';
|
|
19
|
+
} from '../utils/cli-errors.ts';
|
|
20
|
+
import { setCommandDescriptions } from '../utils/command-helpers.ts';
|
|
21
|
+
import { type GlobalFlags, parseGlobalFlags } from '../utils/global-flags.ts';
|
|
22
22
|
import {
|
|
23
23
|
formatCommandHelp,
|
|
24
24
|
formatSchemaVerifyJson,
|
|
@@ -26,9 +26,9 @@ import {
|
|
|
26
26
|
formatSignJson,
|
|
27
27
|
formatSignOutput,
|
|
28
28
|
formatStyledHeader,
|
|
29
|
-
} from '../utils/output';
|
|
30
|
-
import { createProgressAdapter } from '../utils/progress-adapter';
|
|
31
|
-
import { handleResult } from '../utils/result-handler';
|
|
29
|
+
} from '../utils/output.ts';
|
|
30
|
+
import { createProgressAdapter } from '../utils/progress-adapter.ts';
|
|
31
|
+
import { handleResult } from '../utils/result-handler.ts';
|
|
32
32
|
|
|
33
33
|
interface DbSignOptions {
|
|
34
34
|
readonly db?: string;
|
|
@@ -3,8 +3,8 @@ import { relative, resolve } from 'node:path';
|
|
|
3
3
|
import type { VerifyDatabaseResult } from '@prisma-next/core-control-plane/types';
|
|
4
4
|
import { notOk, ok, type Result } from '@prisma-next/utils/result';
|
|
5
5
|
import { Command } from 'commander';
|
|
6
|
-
import { loadConfig } from '../config-loader';
|
|
7
|
-
import { createControlClient } from '../control-api/client';
|
|
6
|
+
import { loadConfig } from '../config-loader.ts';
|
|
7
|
+
import { createControlClient } from '../control-api/client.ts';
|
|
8
8
|
import {
|
|
9
9
|
CliStructuredError,
|
|
10
10
|
errorContractValidationFailed,
|
|
@@ -17,17 +17,17 @@ import {
|
|
|
17
17
|
errorRuntime,
|
|
18
18
|
errorTargetMismatch,
|
|
19
19
|
errorUnexpected,
|
|
20
|
-
} from '../utils/cli-errors';
|
|
21
|
-
import { setCommandDescriptions } from '../utils/command-helpers';
|
|
22
|
-
import { type GlobalFlags, parseGlobalFlags } from '../utils/global-flags';
|
|
20
|
+
} from '../utils/cli-errors.ts';
|
|
21
|
+
import { setCommandDescriptions } from '../utils/command-helpers.ts';
|
|
22
|
+
import { type GlobalFlags, parseGlobalFlags } from '../utils/global-flags.ts';
|
|
23
23
|
import {
|
|
24
24
|
formatCommandHelp,
|
|
25
25
|
formatStyledHeader,
|
|
26
26
|
formatVerifyJson,
|
|
27
27
|
formatVerifyOutput,
|
|
28
|
-
} from '../utils/output';
|
|
29
|
-
import { createProgressAdapter } from '../utils/progress-adapter';
|
|
30
|
-
import { handleResult } from '../utils/result-handler';
|
|
28
|
+
} from '../utils/output.ts';
|
|
29
|
+
import { createProgressAdapter } from '../utils/progress-adapter.ts';
|
|
30
|
+
import { handleResult } from '../utils/result-handler.ts';
|
|
31
31
|
|
|
32
32
|
interface DbVerifyOptions {
|
|
33
33
|
readonly db?: string;
|
|
@@ -10,8 +10,8 @@ import type {
|
|
|
10
10
|
VerifyDatabaseSchemaResult,
|
|
11
11
|
} from '@prisma-next/core-control-plane/types';
|
|
12
12
|
import { notOk, ok } from '@prisma-next/utils/result';
|
|
13
|
-
import { assertFrameworkComponentsCompatible } from '../utils/framework-components';
|
|
14
|
-
import { executeDbInit } from './operations/db-init';
|
|
13
|
+
import { assertFrameworkComponentsCompatible } from '../utils/framework-components.ts';
|
|
14
|
+
import { executeDbInit } from './operations/db-init.ts';
|
|
15
15
|
import type {
|
|
16
16
|
ControlClient,
|
|
17
17
|
ControlClientOptions,
|
|
@@ -23,7 +23,7 @@ import type {
|
|
|
23
23
|
SchemaVerifyOptions,
|
|
24
24
|
SignOptions,
|
|
25
25
|
VerifyOptions,
|
|
26
|
-
} from './types';
|
|
26
|
+
} from './types.ts';
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Creates a programmatic control client for Prisma Next operations.
|
|
@@ -10,7 +10,7 @@ import type {
|
|
|
10
10
|
TargetMigrationsCapability,
|
|
11
11
|
} from '@prisma-next/core-control-plane/types';
|
|
12
12
|
import { notOk, ok } from '@prisma-next/utils/result';
|
|
13
|
-
import type { DbInitResult, DbInitSuccess, OnControlProgress } from '../types';
|
|
13
|
+
import type { DbInitResult, DbInitSuccess, OnControlProgress } from '../types.ts';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Options for executing dbInit operation.
|
|
@@ -16,7 +16,7 @@ export type {
|
|
|
16
16
|
VerifyDatabaseSchemaResult,
|
|
17
17
|
} from '@prisma-next/core-control-plane/types';
|
|
18
18
|
// Client factory
|
|
19
|
-
export { createControlClient } from '../control-api/client';
|
|
19
|
+
export { createControlClient } from '../control-api/client.ts';
|
|
20
20
|
|
|
21
21
|
// CLI-specific types
|
|
22
22
|
export type {
|
|
@@ -43,4 +43,4 @@ export type {
|
|
|
43
43
|
SchemaVerifyOptions,
|
|
44
44
|
SignOptions,
|
|
45
45
|
VerifyOptions,
|
|
46
|
-
} from '../control-api/types';
|
|
46
|
+
} from '../control-api/types.ts';
|
package/src/exports/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// CLI-specific exports
|
|
2
|
-
export { createContractEmitCommand } from '../commands/contract-emit';
|
|
3
|
-
export type { LoadTsContractOptions } from '../load-ts-contract';
|
|
4
|
-
export { loadContractFromTs } from '../load-ts-contract';
|
|
2
|
+
export { createContractEmitCommand } from '../commands/contract-emit.ts';
|
|
3
|
+
export type { LoadTsContractOptions } from '../load-ts-contract.ts';
|
|
4
|
+
export { loadContractFromTs } from '../load-ts-contract.ts';
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from '@prisma-next/contract/framework-components';
|
|
5
5
|
import type { ContractIR } from '@prisma-next/contract/ir';
|
|
6
6
|
import type { ControlPlaneStack } from '@prisma-next/core-control-plane/types';
|
|
7
|
-
import { errorConfigValidation, errorContractMissingExtensionPacks } from './cli-errors';
|
|
7
|
+
import { errorConfigValidation, errorContractMissingExtensionPacks } from './cli-errors.ts';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Asserts that all framework components are compatible with the expected family and target.
|
package/src/utils/output.ts
CHANGED
|
@@ -26,9 +26,9 @@ import type {
|
|
|
26
26
|
VerifyDatabaseResult,
|
|
27
27
|
VerifyDatabaseSchemaResult,
|
|
28
28
|
} from '@prisma-next/core-control-plane/types';
|
|
29
|
-
import type { CliErrorConflict, CliErrorEnvelope } from './cli-errors';
|
|
30
|
-
import { getLongDescription } from './command-helpers';
|
|
31
|
-
import type { GlobalFlags } from './global-flags';
|
|
29
|
+
import type { CliErrorConflict, CliErrorEnvelope } from './cli-errors.ts';
|
|
30
|
+
import { getLongDescription } from './command-helpers.ts';
|
|
31
|
+
import type { GlobalFlags } from './global-flags.ts';
|
|
32
32
|
|
|
33
33
|
// ============================================================================
|
|
34
34
|
// Helper Functions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ora from 'ora';
|
|
2
|
-
import type { ControlProgressEvent, OnControlProgress } from '../control-api/types';
|
|
3
|
-
import type { GlobalFlags } from './global-flags';
|
|
2
|
+
import type { ControlProgressEvent, OnControlProgress } from '../control-api/types.ts';
|
|
3
|
+
import type { GlobalFlags } from './global-flags.ts';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Options for creating a progress adapter.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Result } from '@prisma-next/utils/result';
|
|
2
|
-
import type { CliStructuredError } from './cli-errors';
|
|
3
|
-
import type { GlobalFlags } from './global-flags';
|
|
4
|
-
import { formatErrorJson, formatErrorOutput } from './output';
|
|
2
|
+
import type { CliStructuredError } from './cli-errors.ts';
|
|
3
|
+
import type { GlobalFlags } from './global-flags.ts';
|
|
4
|
+
import { formatErrorJson, formatErrorOutput } from './output.ts';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Processes a CLI command result, handling both success and error cases.
|