@prisma/migrate 6.7.0-dev.8 → 6.7.0-dev.9

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.
Files changed (145) hide show
  1. package/dist/Migrate.js +5 -5
  2. package/dist/SchemaEngineCLI.js +4 -4
  3. package/dist/SchemaEngineWasm.js +3 -3
  4. package/dist/bin.js +25 -25
  5. package/dist/{chunk-U3PKVEAK.js → chunk-3LPJTPON.js} +5 -5
  6. package/dist/{chunk-O5YQGEQH.js → chunk-6FXCGDYG.js} +5 -5
  7. package/dist/{chunk-7HZE6BDG.js → chunk-7SHRWQOO.js} +6 -6
  8. package/dist/{chunk-OEWQACEH.js → chunk-AXR7LS2N.js} +531 -617
  9. package/dist/{chunk-OEFUBBD2.js → chunk-EVYAFMVA.js} +5 -5
  10. package/dist/{chunk-TUCW5C5C.js → chunk-GTNVXSIW.js} +5 -5
  11. package/dist/{chunk-I3LT2PO3.js → chunk-HAXSH7UY.js} +5 -5
  12. package/dist/{chunk-BKPGODI6.js → chunk-HKEIYY25.js} +5 -5
  13. package/dist/{chunk-SQFNJXFA.js → chunk-K7LD5M6A.js} +5 -5
  14. package/dist/{chunk-NRSITJIH.js → chunk-NP7ZZIVZ.js} +5 -5
  15. package/dist/{chunk-JOAFF4FT.js → chunk-QRILN5QM.js} +7 -7
  16. package/dist/{chunk-UGHI6IC4.js → chunk-R6N4ZN7K.js} +532 -1063
  17. package/dist/{chunk-6JKG6LGO.js → chunk-RAQT64TS.js} +7 -7
  18. package/dist/{chunk-ORYJRFI7.js → chunk-UYASBG5U.js} +5 -5
  19. package/dist/{chunk-6BNGZSAG.js → chunk-WFPTCAHP.js} +5 -5
  20. package/dist/commands/DbExecute.js +6 -6
  21. package/dist/commands/DbPull.js +6 -6
  22. package/dist/commands/DbPush.js +6 -6
  23. package/dist/commands/MigrateDeploy.js +6 -6
  24. package/dist/commands/MigrateDev.js +6 -6
  25. package/dist/commands/MigrateDiff.js +6 -6
  26. package/dist/commands/MigrateReset.js +6 -6
  27. package/dist/commands/MigrateResolve.js +6 -6
  28. package/dist/commands/MigrateStatus.js +6 -6
  29. package/dist/index.js +29 -29
  30. package/dist/utils/getDatabaseVersionSafe.js +6 -6
  31. package/dist/utils/introspectSql.js +6 -6
  32. package/dist/views/handleViewsIO.js +2 -2
  33. package/package.json +8 -8
  34. package/dist/chunk-QY6XVXFR.js +0 -11313
  35. package/dist/internals/src/Generator.d.ts +0 -42
  36. package/dist/internals/src/WasmPanicRegistry.d.ts +0 -5
  37. package/dist/internals/src/WasmSchemaEngineLoader.d.ts +0 -5
  38. package/dist/internals/src/cli/Help.d.ts +0 -11
  39. package/dist/internals/src/cli/checkUnsupportedDataProxy.d.ts +0 -18
  40. package/dist/internals/src/cli/checkUnsupportedSchemaEngineWasm.d.ts +0 -22
  41. package/dist/internals/src/cli/directoryConfig.d.ts +0 -7
  42. package/dist/internals/src/cli/getGeneratorSuccessMessage.d.ts +0 -7
  43. package/dist/internals/src/cli/getTypescriptVersion.d.ts +0 -1
  44. package/dist/internals/src/cli/hashes.d.ts +0 -10
  45. package/dist/internals/src/cli/schemaContext.d.ts +0 -59
  46. package/dist/internals/src/cli/types.d.ts +0 -47
  47. package/dist/internals/src/cli/utils.d.ts +0 -13
  48. package/dist/internals/src/client/getClientEngineType.d.ts +0 -8
  49. package/dist/internals/src/convertCredentials.d.ts +0 -10
  50. package/dist/internals/src/dotenvExpand.d.ts +0 -35
  51. package/dist/internals/src/engine-commands/errorHelpers.d.ts +0 -4
  52. package/dist/internals/src/engine-commands/formatSchema.d.ts +0 -22
  53. package/dist/internals/src/engine-commands/getConfig.d.ts +0 -31
  54. package/dist/internals/src/engine-commands/getDmmf.d.ts +0 -20
  55. package/dist/internals/src/engine-commands/getEngineVersion.d.ts +0 -4
  56. package/dist/internals/src/engine-commands/getEnginesMetaInfo.d.ts +0 -25
  57. package/dist/internals/src/engine-commands/index.d.ts +0 -10
  58. package/dist/internals/src/engine-commands/lintSchema.d.ts +0 -26
  59. package/dist/internals/src/engine-commands/mergeSchemas.d.ts +0 -12
  60. package/dist/internals/src/engine-commands/queryEngineCommons.d.ts +0 -31
  61. package/dist/internals/src/engine-commands/relativizePathInPSLError.d.ts +0 -1
  62. package/dist/internals/src/engine-commands/validate.d.ts +0 -12
  63. package/dist/internals/src/errorReporting.d.ts +0 -25
  64. package/dist/internals/src/get-generators/getGenerators.d.ts +0 -71
  65. package/dist/internals/src/get-generators/utils/binaryTypeToEngineType.d.ts +0 -3
  66. package/dist/internals/src/get-generators/utils/engineTypeToBinaryType.d.ts +0 -3
  67. package/dist/internals/src/get-generators/utils/fixBinaryTargets.d.ts +0 -3
  68. package/dist/internals/src/get-generators/utils/getBinaryPathsByVersion.d.ts +0 -3
  69. package/dist/internals/src/get-generators/utils/getEngineVersionForGenerator.d.ts +0 -2
  70. package/dist/internals/src/get-generators/utils/printGeneratorConfig.d.ts +0 -9
  71. package/dist/internals/src/getPackedPackage.d.ts +0 -1
  72. package/dist/internals/src/highlight/highlight.d.ts +0 -3
  73. package/dist/internals/src/highlight/languages/dml.d.ts +0 -2
  74. package/dist/internals/src/highlight/languages/sql.d.ts +0 -2
  75. package/dist/internals/src/highlight/prism.d.ts +0 -6
  76. package/dist/internals/src/highlight/theme.d.ts +0 -2
  77. package/dist/internals/src/highlight/types.d.ts +0 -35
  78. package/dist/internals/src/index.d.ts +0 -92
  79. package/dist/internals/src/logger.d.ts +0 -14
  80. package/dist/internals/src/migrateTypes.d.ts +0 -89
  81. package/dist/internals/src/panic.d.ts +0 -31
  82. package/dist/internals/src/resolveBinary.d.ts +0 -6
  83. package/dist/internals/src/resolveOutput.d.ts +0 -5
  84. package/dist/internals/src/resolvePkg.d.ts +0 -7
  85. package/dist/internals/src/schemaEngineCommands.d.ts +0 -37
  86. package/dist/internals/src/sendPanic.d.ts +0 -10
  87. package/dist/internals/src/tracing/types.d.ts +0 -55
  88. package/dist/internals/src/types.d.ts +0 -19
  89. package/dist/internals/src/utils/assertAlways.d.ts +0 -14
  90. package/dist/internals/src/utils/assertNever.d.ts +0 -27
  91. package/dist/internals/src/utils/binaryTargetRegex.d.ts +0 -8
  92. package/dist/internals/src/utils/byline.d.ts +0 -4
  93. package/dist/internals/src/utils/callOnce.d.ts +0 -13
  94. package/dist/internals/src/utils/canPrompt.d.ts +0 -1
  95. package/dist/internals/src/utils/chmodPlusX.d.ts +0 -1
  96. package/dist/internals/src/utils/cloudflareD1.d.ts +0 -5
  97. package/dist/internals/src/utils/drawBox.d.ts +0 -9
  98. package/dist/internals/src/utils/extractPreviewFeatures.d.ts +0 -2
  99. package/dist/internals/src/utils/formatTable.d.ts +0 -5
  100. package/dist/internals/src/utils/formatms.d.ts +0 -5
  101. package/dist/internals/src/utils/fs-functional.d.ts +0 -53
  102. package/dist/internals/src/utils/fs-utils.d.ts +0 -30
  103. package/dist/internals/src/utils/getCommandWithExecutor.d.ts +0 -1
  104. package/dist/internals/src/utils/getEnvPaths.d.ts +0 -14
  105. package/dist/internals/src/utils/getGitHubIssueUrl.d.ts +0 -18
  106. package/dist/internals/src/utils/getMigrateConfigDir.d.ts +0 -2
  107. package/dist/internals/src/utils/getVersionFromPackageJson.d.ts +0 -1
  108. package/dist/internals/src/utils/handleEngineLoadingErrors.d.ts +0 -8
  109. package/dist/internals/src/utils/handlePanic.d.ts +0 -11
  110. package/dist/internals/src/utils/hasOwnProperty.d.ts +0 -1
  111. package/dist/internals/src/utils/isCi.d.ts +0 -1
  112. package/dist/internals/src/utils/isCurrentBinInstalledGlobally.d.ts +0 -1
  113. package/dist/internals/src/utils/isInContainer.d.ts +0 -5
  114. package/dist/internals/src/utils/isInNpmLifecycleHook.d.ts +0 -4
  115. package/dist/internals/src/utils/isInteractive.d.ts +0 -6
  116. package/dist/internals/src/utils/isPromiseLike.d.ts +0 -1
  117. package/dist/internals/src/utils/isValidJsIdentifier.d.ts +0 -1
  118. package/dist/internals/src/utils/keyBy.d.ts +0 -9
  119. package/dist/internals/src/utils/link.d.ts +0 -1
  120. package/dist/internals/src/utils/load.d.ts +0 -6
  121. package/dist/internals/src/utils/loadEnvFile.d.ts +0 -10
  122. package/dist/internals/src/utils/mapKeys.d.ts +0 -1
  123. package/dist/internals/src/utils/mapObjectValues.d.ts +0 -1
  124. package/dist/internals/src/utils/maskSchema.d.ts +0 -4
  125. package/dist/internals/src/utils/max.d.ts +0 -11
  126. package/dist/internals/src/utils/maybeInGitHook.d.ts +0 -9
  127. package/dist/internals/src/utils/missingDatasource.d.ts +0 -1
  128. package/dist/internals/src/utils/missingGeneratorMessage.d.ts +0 -3
  129. package/dist/internals/src/utils/parseAWSNodejsRuntimeEnvVarVersion.d.ts +0 -1
  130. package/dist/internals/src/utils/parseEnvValue.d.ts +0 -17
  131. package/dist/internals/src/utils/path.d.ts +0 -14
  132. package/dist/internals/src/utils/pick.d.ts +0 -1
  133. package/dist/internals/src/utils/printConfigWarnings.d.ts +0 -1
  134. package/dist/internals/src/utils/prismaPostgres.d.ts +0 -3
  135. package/dist/internals/src/utils/serializeQueryEngineName.d.ts +0 -4
  136. package/dist/internals/src/utils/setClassName.d.ts +0 -9
  137. package/dist/internals/src/utils/toSchemasContainer.d.ts +0 -5
  138. package/dist/internals/src/utils/tryLoadEnvs.d.ts +0 -25
  139. package/dist/internals/src/utils/vercelPkgPathRegex.d.ts +0 -1
  140. package/dist/internals/src/warnOnce.d.ts +0 -1
  141. package/dist/internals/src/wasm.d.ts +0 -5
  142. package/dist/multipart-parser-ASKQAOL4-WZ47HU6G.js +0 -4696
  143. package/dist/multipart-parser-QCI3Y5IB.js +0 -4561
  144. package/dist/typescript-2LKASCMC.js +0 -205192
  145. package/dist/typescript-H3AVJ6KX.js +0 -205230
@@ -1,3 +0,0 @@
1
- import type { BinaryPaths } from '@prisma/generator';
2
- import type { GetBinaryPathsByVersionInput } from '../getGenerators';
3
- export declare function getBinaryPathsByVersion({ neededVersions, binaryTarget, version, printDownloadProgress, skipDownload, binaryPathsOverride, }: GetBinaryPathsByVersionInput): Promise<Record<string, BinaryPaths>>;
@@ -1,2 +0,0 @@
1
- import type { GeneratorManifest } from '@prisma/generator';
2
- export declare function getEngineVersionForGenerator(manifest?: GeneratorManifest, defaultVersion?: string | undefined): string;
@@ -1,9 +0,0 @@
1
- import type { BinaryTargetsEnvValue, GeneratorConfig } from '@prisma/generator';
2
- export declare function printGeneratorConfig(config: GeneratorConfig): string;
3
- export declare class GeneratorConfigClass {
4
- private readonly config;
5
- constructor(config: GeneratorConfig);
6
- toString(): string;
7
- }
8
- export declare function getOriginalBinaryTargetsValue(binaryTargets: BinaryTargetsEnvValue[]): string | string[] | undefined;
9
- export declare function printDatamodelObject(obj: any): string;
@@ -1 +0,0 @@
1
- export declare function getPackedPackage(name: string, target?: string, packageDir?: string): Promise<string | void>;
@@ -1,3 +0,0 @@
1
- export declare function highlightDatamodel(str: string): any;
2
- export declare function highlightSql(str: string): any;
3
- export declare function highlightTS(str: string): any;
@@ -1,2 +0,0 @@
1
- import type { SyntaxDefinition } from '../types';
2
- export declare const dml: SyntaxDefinition;
@@ -1,2 +0,0 @@
1
- import type { SyntaxDefinition } from '../types';
2
- export declare const sql: SyntaxDefinition;
@@ -1,6 +0,0 @@
1
- export declare const Prism: any;
2
- export declare function Token(this: any, type: any, content: any, alias: any, matchedStr?: any, greedy?: any): void;
3
- export declare namespace Token {
4
- var stringify: (o: any, language?: any) => any;
5
- }
6
- /** eslint-enable */
@@ -1,2 +0,0 @@
1
- import type { Theme } from './types';
2
- export declare const theme: Theme;
@@ -1,35 +0,0 @@
1
- export type SyntaxCondition = RegExp | {
2
- pattern: RegExp;
3
- greedy?: boolean;
4
- lookbehind?: boolean;
5
- };
6
- export type SyntaxDefinition = {
7
- comment?: SyntaxCondition | Array<SyntaxCondition>;
8
- variable?: SyntaxCondition | Array<SyntaxCondition>;
9
- string?: SyntaxCondition | Array<SyntaxCondition>;
10
- function?: SyntaxCondition | Array<SyntaxCondition>;
11
- keyword?: SyntaxCondition | Array<SyntaxCondition>;
12
- boolean?: SyntaxCondition | Array<SyntaxCondition>;
13
- number?: SyntaxCondition | Array<SyntaxCondition>;
14
- operator?: SyntaxCondition | Array<SyntaxCondition>;
15
- punctuation?: SyntaxCondition | Array<SyntaxCondition>;
16
- directive?: SyntaxCondition | Array<SyntaxCondition>;
17
- entity?: SyntaxCondition | Array<SyntaxCondition>;
18
- value?: SyntaxCondition | Array<SyntaxCondition>;
19
- field?: SyntaxCondition | Array<SyntaxCondition>;
20
- };
21
- export type Theme = {
22
- comment: (str: string) => string;
23
- variable?: (str: string) => string;
24
- string?: (str: string) => string;
25
- function?: (str: string) => string;
26
- keyword?: (str: string) => string;
27
- boolean?: (str: string) => string;
28
- number?: (str: string) => string;
29
- operator?: (str: string) => string;
30
- punctuation?: (str: string) => string;
31
- directive?: (str: string) => string;
32
- entity?: (str: string) => string;
33
- value?: (str: string) => string;
34
- field?: (str: string) => string;
35
- };
@@ -1,92 +0,0 @@
1
- export { checkUnsupportedDataProxy } from './cli/checkUnsupportedDataProxy';
2
- export { checkUnsupportedSchemaEngineWasm } from './cli/checkUnsupportedSchemaEngineWasm';
3
- export { type DirectoryConfig, inferDirectoryConfig } from './cli/directoryConfig';
4
- export { getGeneratorSuccessMessage } from './cli/getGeneratorSuccessMessage';
5
- export { getPrismaConfigFromPackageJson, type GetSchemaOptions, getSchemaWithPath, getSchemaWithPathOptional, printSchemaLoadedMessage, } from './cli/getSchema';
6
- export { getTypescriptVersion } from './cli/getTypescriptVersion';
7
- export { getCLIPathHash, getProjectHash } from './cli/hashes';
8
- export { unknownCommand } from './cli/Help';
9
- export { HelpError } from './cli/Help';
10
- export { loadSchemaContext, processSchemaResult, type SchemaContext } from './cli/schemaContext';
11
- export type { Command, Commands, CompiledGeneratorDefinition, Dictionary, GeneratorConfig, GeneratorDefinition, GeneratorDefinitionWithPackage, GeneratorFunction, GeneratorOptions, } from './cli/types';
12
- export { arg, format, isError } from './cli/utils';
13
- export { ClientEngineType, DEFAULT_CLIENT_ENGINE_TYPE, getClientEngineType } from './client/getClientEngineType';
14
- export { credentialsToUri, protocolToConnectorType, uriToCredentials } from './convertCredentials';
15
- export * from './engine-commands';
16
- export { resolveUrl } from './engine-commands/getConfig';
17
- export { relativizePathInPSLError } from './engine-commands/relativizePathInPSLError';
18
- export { Generator } from './Generator';
19
- export { type GeneratorRegistry, type GeneratorRegistryEntry, getGenerator, getGenerators, } from './get-generators/getGenerators';
20
- export { fixBinaryTargets } from './get-generators/utils/fixBinaryTargets';
21
- export { printGeneratorConfig } from './get-generators/utils/printGeneratorConfig';
22
- export { getPackedPackage } from './getPackedPackage';
23
- export { highlightDatamodel, highlightSql, highlightTS } from './highlight/highlight';
24
- export * as logger from './logger';
25
- export type { MigrateTypes } from './migrateTypes';
26
- export { ErrorArea, getWasmError, isRustPanic, isWasmPanic, RustPanic } from './panic';
27
- export { BinaryType } from './resolveBinary';
28
- export { engineEnvVarMap, resolveBinary } from './resolveBinary';
29
- export { resolvePkg } from './resolvePkg';
30
- export type { SchemaEngineLogLine } from './schemaEngineCommands';
31
- export { canConnectToDatabase, createDatabase, dropDatabase } from './schemaEngineCommands';
32
- export { SchemaEngineExitCode } from './schemaEngineCommands';
33
- export { sendPanic } from './sendPanic';
34
- export * from './tracing/types';
35
- export type { DatabaseCredentials } from './types';
36
- export { assertAlways } from './utils/assertAlways';
37
- export { assertNever } from './utils/assertNever';
38
- export { binaryTargetRegex } from './utils/binaryTargetRegex';
39
- export { default as byline } from './utils/byline';
40
- export { callOnceOnSuccess } from './utils/callOnce';
41
- export { canPrompt } from './utils/canPrompt';
42
- export { chmodPlusX } from './utils/chmodPlusX';
43
- export { locateLocalCloudflareD1 } from './utils/cloudflareD1';
44
- export { drawBox } from './utils/drawBox';
45
- export { extractPreviewFeatures } from './utils/extractPreviewFeatures';
46
- export { formatms } from './utils/formatms';
47
- export { formatTable } from './utils/formatTable';
48
- export * as fsFunctional from './utils/fs-functional';
49
- export * as fsUtils from './utils/fs-utils';
50
- export { getCommandWithExecutor } from './utils/getCommandWithExecutor';
51
- export { getEnvPaths } from './utils/getEnvPaths';
52
- export { getMigrateConfigDir } from './utils/getMigrateConfigDir';
53
- export { version } from './utils/getVersionFromPackageJson';
54
- export { handleLibraryLoadingErrors } from './utils/handleEngineLoadingErrors';
55
- export { handlePanic } from './utils/handlePanic';
56
- export { hasOwnProperty } from './utils/hasOwnProperty';
57
- export { isCi } from './utils/isCi';
58
- export { isCurrentBinInstalledGlobally } from './utils/isCurrentBinInstalledGlobally';
59
- export { isInContainer } from './utils/isInContainer';
60
- export { isInNpmLifecycleHook } from './utils/isInNpmLifecycleHook';
61
- export { isInteractive } from './utils/isInteractive';
62
- export { isPromiseLike } from './utils/isPromiseLike';
63
- export { isValidJsIdentifier } from './utils/isValidJsIdentifier';
64
- export { keyBy } from './utils/keyBy';
65
- export { link } from './utils/link';
66
- export { loadLibrary as load } from './utils/load';
67
- export { loadEnvFile } from './utils/loadEnvFile';
68
- export { mapObjectValues } from './utils/mapObjectValues';
69
- export { maskSchema } from './utils/maskSchema';
70
- export { maxBy, maxWithComparator } from './utils/max';
71
- export { maybeInGitHook } from './utils/maybeInGitHook';
72
- export { missingGeneratorMessage } from './utils/missingGeneratorMessage';
73
- export { parseAWSNodejsRuntimeEnvVarVersion } from './utils/parseAWSNodejsRuntimeEnvVarVersion';
74
- export { parseBinaryTargetsEnvValue, parseEnvValue } from './utils/parseEnvValue';
75
- export { longestCommonPathPrefix, pathToPosix } from './utils/path';
76
- export { pick } from './utils/pick';
77
- export { printConfigWarnings } from './utils/printConfigWarnings';
78
- export { isPrismaPostgres, PRISMA_POSTGRES_PROTOCOL, PRISMA_POSTGRES_PROVIDER } from './utils/prismaPostgres';
79
- export { extractSchemaContent, type SchemaFileInput } from './utils/schemaFileInput';
80
- export { type MultipleSchemas } from './utils/schemaFileInput';
81
- export { serializeQueryEngineName } from './utils/serializeQueryEngineName';
82
- export { setClassName } from './utils/setClassName';
83
- export { toSchemasContainer, toSchemasWithConfigDir } from './utils/toSchemasContainer';
84
- export { type LoadedEnv, tryLoadEnvs } from './utils/tryLoadEnvs';
85
- export { vercelPkgPathRegex } from './utils/vercelPkgPathRegex';
86
- export { warnOnce } from './warnOnce';
87
- export * as wasm from './wasm';
88
- export { wasmSchemaEngineLoader } from './WasmSchemaEngineLoader';
89
- export type { EnvPaths } from '@prisma/generator';
90
- export type { BinaryTarget } from '@prisma/get-platform';
91
- export { getBinaryTargetForCurrentPlatform, getNodeAPIName } from '@prisma/get-platform';
92
- export type { GetSchemaResult } from '@prisma/schema-files-loader';
@@ -1,14 +0,0 @@
1
- export declare const tags: {
2
- error: string;
3
- warn: string;
4
- info: string;
5
- query: string;
6
- };
7
- export declare const should: {
8
- warn: () => boolean;
9
- };
10
- export declare function log(...data: any[]): void;
11
- export declare function warn(message: any, ...optionalParams: any[]): void;
12
- export declare function info(message: any, ...optionalParams: any[]): void;
13
- export declare function error(message: any, ...optionalParams: any[]): void;
14
- export declare function query(message: any, ...optionalParams: any[]): void;
@@ -1,89 +0,0 @@
1
- export declare namespace MigrateTypes {
2
- type MigrationDirectory = {
3
- /**
4
- * Relative path to a migration directory from `baseDir`.
5
- * E.g., `./20201117144659_test`.
6
- */
7
- path: string;
8
- /**
9
- * Description of the migration file in the directory.
10
- */
11
- migrationFile: {
12
- /**
13
- * Relative path to the migration file from `path`.
14
- */
15
- path: 'migration.sql';
16
- /**
17
- * Content of the migration file.
18
- * E.g.,
19
- * ```sql
20
- * -- CreateTable
21
- * CREATE TABLE "Blog" (
22
- * "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
23
- *
24
- * "viewCount20" INTEGER NOT NULL
25
- * );
26
- * ```
27
- */
28
- content: Tagged<'ok', {
29
- value: string;
30
- }> | Tagged<'error', {
31
- value: string;
32
- }>;
33
- };
34
- };
35
- type MigrationLockfile = {
36
- /**
37
- * Relative path to the lockfile from `baseDir`.
38
- */
39
- path: 'migration_lock.toml';
40
- /**
41
- * Content of the lockfile, if it exists.
42
- * E.g.,
43
- * ```toml
44
- * # Please do not edit this file manually
45
- * provider = "sqlite"
46
- * ```
47
- */
48
- content: string | null;
49
- };
50
- type MigrationList = {
51
- /**
52
- * Absolute path to the base directory of Prisma migrations.
53
- * E.g., `/usr/src/app/prisma/migrations`.
54
- */
55
- baseDir: string;
56
- /**
57
- * Description of the lockfile, which may or may not exist.
58
- */
59
- lockfile: MigrationLockfile;
60
- /**
61
- * Description of the migration directories.
62
- */
63
- migrationDirectories: Array<MigrationDirectory>;
64
- };
65
- type SchemaContainer = {
66
- path: string;
67
- content: string;
68
- };
69
- type SchemasContainer = {
70
- files: SchemaContainer[];
71
- };
72
- type SchemasWithConfigDir = {
73
- files: SchemaContainer[];
74
- configDir: string;
75
- };
76
- type UrlContainer = {
77
- url: string;
78
- };
79
- type DatasourceParam = Tagged<'ConnectionString', UrlContainer> | Tagged<'Schema', SchemasContainer>;
80
- type GetDatabaseVersionParams = {
81
- datasource: MigrateTypes.DatasourceParam;
82
- };
83
- type Tagged<Tag extends string, T> = Display<{
84
- tag: Tag;
85
- } & T>;
86
- type Display<T> = {
87
- [K in keyof T]: T[K];
88
- } & unknown;
89
- }
@@ -1,31 +0,0 @@
1
- export declare class RustPanic extends Error {
2
- readonly __typename = "RustPanic";
3
- request: any;
4
- rustStack: string;
5
- area: ErrorArea;
6
- introspectionUrl?: string;
7
- constructor(message: string, rustStack: string, request: any, area: ErrorArea, introspectionUrl?: string);
8
- }
9
- export declare function isRustPanic(e: Error): e is RustPanic;
10
- export declare enum ErrorArea {
11
- LIFT_CLI = "LIFT_CLI",
12
- PHOTON_STUDIO = "PHOTON_STUDIO",
13
- INTROSPECTION_CLI = "INTROSPECTION_CLI",
14
- FMT_CLI = "FMT_CLI",
15
- QUERY_ENGINE_BINARY_CLI = "QUERY_ENGINE_BINARY_CLI",
16
- QUERY_ENGINE_LIBRARY_CLI = "QUERY_ENGINE_LIBRARY_CLI"
17
- }
18
- /**
19
- * Branded type for Wasm panics.
20
- */
21
- export type WasmPanic = Error & {
22
- name: 'RuntimeError';
23
- };
24
- /**
25
- * Returns true if the given error is a Wasm panic.
26
- */
27
- export declare function isWasmPanic(error: Error): error is WasmPanic;
28
- export declare function getWasmError(error: WasmPanic): {
29
- message: string;
30
- stack: string;
31
- };
@@ -1,6 +0,0 @@
1
- import { BinaryType, engineEnvVarMap } from '@prisma/fetch-engine';
2
- import * as TE from 'fp-ts/TaskEither';
3
- export { BinaryType, engineEnvVarMap };
4
- export declare function resolveBinary(name: BinaryType, proposedPath?: string): Promise<string>;
5
- export declare function safeResolveBinary(name: BinaryType, proposedPath?: string): TE.TaskEither<Error, string>;
6
- export declare function maybeCopyToTmp(file: string): Promise<string>;
@@ -1,5 +0,0 @@
1
- export type ResolveOutputOptions = {
2
- defaultOutput: string;
3
- baseDir: string;
4
- };
5
- export declare function resolveOutput(options: ResolveOutputOptions): Promise<string>;
@@ -1,7 +0,0 @@
1
- import resolve from 'resolve';
2
- /**
3
- * Alternative to `require.resolve` that returns undefined instead of throwing.
4
- * It also enables preserving symlinks, which is not possible with the original
5
- * `require.resolve`. This variant will find the _root_ of a package.
6
- */
7
- export declare function resolvePkg(id: string, options: resolve.AsyncOpts): Promise<string | undefined>;
@@ -1,37 +0,0 @@
1
- import execa from 'execa';
2
- export declare enum SchemaEngineExitCode {
3
- Success = 0,
4
- Error = 1,
5
- Panic = 101
6
- }
7
- export interface SchemaEngineLogLine {
8
- timestamp: string;
9
- level: LogLevel;
10
- fields: LogFields;
11
- target: string;
12
- }
13
- type LogLevel = 'INFO' | 'ERROR' | 'DEBUG' | 'WARN';
14
- interface LogFields {
15
- message: string;
16
- git_hash?: string;
17
- is_panic?: boolean;
18
- error_code?: string;
19
- backtrace?: string;
20
- [key: string]: any;
21
- }
22
- export type DatabaseErrorCodes = 'P1000' | 'P1001' | 'P1002' | 'P1003' | 'P1009' | 'P1010';
23
- export type ConnectionResult = true | ConnectionError;
24
- export interface ConnectionError {
25
- message: string;
26
- code: DatabaseErrorCodes;
27
- }
28
- export declare function canConnectToDatabase(connectionString: string, cwd?: string, schemaEnginePath?: string): Promise<ConnectionResult>;
29
- export declare function createDatabase(connectionString: string, cwd?: string, schemaEnginePath?: string): Promise<boolean>;
30
- export declare function dropDatabase(connectionString: string, cwd?: string, schemaEnginePath?: string): Promise<boolean>;
31
- export declare function execaCommand({ connectionString, cwd, schemaEnginePath, engineCommandName, }: {
32
- connectionString: string;
33
- cwd: string;
34
- schemaEnginePath?: string;
35
- engineCommandName: 'create-database' | 'drop-database' | 'can-connect-to-database';
36
- }): Promise<execa.ExecaReturnValue<string>>;
37
- export {};
@@ -1,10 +0,0 @@
1
- import type { MigrateTypes } from './migrateTypes';
2
- import type { RustPanic } from './panic';
3
- type SendPanic = {
4
- error: RustPanic;
5
- cliVersion: string;
6
- enginesVersion: string;
7
- getDatabaseVersionSafe: (args: MigrateTypes.GetDatabaseVersionParams | undefined) => Promise<string | undefined>;
8
- };
9
- export declare function sendPanic({ error, cliVersion, enginesVersion, getDatabaseVersionSafe, }: SendPanic): Promise<number>;
10
- export {};
@@ -1,55 +0,0 @@
1
- import type { Context, Span, SpanOptions } from '@opentelemetry/api';
2
- export type SpanCallback<R> = (span?: Span, context?: Context) => R;
3
- export type ExtendedSpanOptions = SpanOptions & {
4
- /** The name of the span */
5
- name: string;
6
- internal?: boolean;
7
- middleware?: boolean;
8
- /** Whether it propagates context (?=true) */
9
- active?: boolean;
10
- /** The context to append the span to */
11
- context?: Context;
12
- };
13
- export type EngineSpanId = string;
14
- export type HrTime = [number, number];
15
- export type EngineSpanKind = 'client' | 'internal';
16
- export type EngineSpan = {
17
- id: EngineSpanId;
18
- parentId: string | null;
19
- name: string;
20
- startTime: HrTime;
21
- endTime: HrTime;
22
- kind: EngineSpanKind;
23
- attributes?: Record<string, unknown>;
24
- links?: EngineSpanId[];
25
- };
26
- export type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'query';
27
- export type EngineTraceEvent = {
28
- spanId: EngineSpanId;
29
- target: string;
30
- level: LogLevel;
31
- timestamp: HrTime;
32
- attributes: Record<string, unknown> & {
33
- message?: string;
34
- query?: string;
35
- duration_ms?: number;
36
- params?: string;
37
- };
38
- };
39
- export type EngineTrace = {
40
- spans: EngineSpan[];
41
- events: EngineTraceEvent[];
42
- };
43
- export interface TracingHelper {
44
- isEnabled(): boolean;
45
- getTraceParent(context?: Context): string;
46
- dispatchEngineSpans(spans: EngineSpan[]): void;
47
- getActiveContext(): Context | undefined;
48
- runInChildSpan<R>(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
49
- }
50
- export type PrismaInstrumentationGlobalValue = {
51
- helper?: TracingHelper;
52
- };
53
- declare global {
54
- var PRISMA_INSTRUMENTATION: PrismaInstrumentationGlobalValue | undefined;
55
- }
@@ -1,19 +0,0 @@
1
- import type { ConnectorType } from '@prisma/generator';
2
- export interface DatabaseCredentials {
3
- type: ConnectorType;
4
- host?: string;
5
- port?: number;
6
- user?: string;
7
- password?: string;
8
- database?: string;
9
- alreadyData?: boolean;
10
- schema?: string;
11
- newSchema?: string;
12
- ssl?: boolean;
13
- uri?: string;
14
- executeRaw?: boolean;
15
- socket?: string;
16
- extraFields?: {
17
- [key: string]: string;
18
- };
19
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * Assertion function for internal consistency checks that should never fail
3
- * in the correct code. It's purpose is pretty much:
4
- * - ensuring we get more helpful error message if invariant does not hold due to a bug
5
- * - have a better way of dealing with overly broad type definition than typecasting to `any`
6
- * or more narrow type.
7
- *
8
- * This function should be for assertions only on the values where we control both the input and the output: engine to client, generator to generated client, etc.
9
- * Don't use this function for assertion for any external input.
10
- *
11
- * @param condition
12
- * @param message
13
- */
14
- export declare function assertAlways(condition: unknown, message: string): asserts condition;
@@ -1,27 +0,0 @@
1
- /**
2
- * Utility function to ensure exhaustive checks for union types.
3
- *
4
- * @example
5
- * ```ts
6
- * declare const fruit: 'Apple' | 'Orange'
7
- *
8
- * switch (fruit) {
9
- * case 'Apple:
10
- * // do apple things
11
- * break;
12
- * case 'Orange:
13
- * // do orange things
14
- * break;
15
- * default:
16
- * // in case `fruit` type will expand in the future,
17
- * // we'll get a compile-time error here, listing all unhandled
18
- * // cases
19
- * assertNever(fruit, 'Unknown fruit')
20
- * }
21
- * ```
22
- * @param arg variable of the any union type. By the time `assertNever` is called
23
- * all possible cases of this union must already be handled
24
- * @param errorMessage error message to throw in runtime. Normally, should never happen
25
- * unless compile-time check is skipped
26
- */
27
- export declare function assertNever(arg: never, errorMessage: string): never;
@@ -1,8 +0,0 @@
1
- /**
2
- * This regex matches all supported binary target names in a given string.
3
- *
4
- * Platform names are sorted by their lengths in descending order to ensure that
5
- * the longest substring is always matched (e.g., "darwin-arm64" is matched as a
6
- * whole instead of "darwin" and "arm" separately)
7
- */
8
- export declare const binaryTargetRegex: RegExp;
@@ -1,4 +0,0 @@
1
- export default function byline(readStream: any, options?: any): any;
2
- export declare function createStream(readStream: any, options: any): any;
3
- export declare function createLineStream(readStream: any, options: any): any;
4
- export declare function LineStream(this: any, options: any): void;
@@ -1,13 +0,0 @@
1
- type AsyncFn<Args extends unknown[], R> = (...args: Args) => Promise<R>;
2
- /**
3
- * Takes an async function `fn` as a parameter and returns a wrapper function, which ensures
4
- * that `fn` will be called only once if the promise succeeds:
5
- *
6
- * - If the first call is not finished yet, returns the promise to the same result
7
- * - If the first call is finished and has succeeded, returns the result of this call
8
- * - If the first call is finished but has failed, `fn` is called again
9
- * @param fn
10
- * @returns
11
- */
12
- export declare function callOnceOnSuccess<Args extends unknown[], R>(fn: AsyncFn<Args, R>): AsyncFn<Args, R>;
13
- export {};
@@ -1 +0,0 @@
1
- export declare const canPrompt: () => boolean;
@@ -1 +0,0 @@
1
- export declare function chmodPlusX(file: string): void;
@@ -1,5 +0,0 @@
1
- type TocateLocalCloudflareD1Args = {
2
- arg: '--to-local-d1' | '--from-local-d1';
3
- };
4
- export declare function locateLocalCloudflareD1({ arg }: TocateLocalCloudflareD1Args): Promise<string>;
5
- export {};
@@ -1,9 +0,0 @@
1
- export type BoxOptions = {
2
- title?: string;
3
- width: number;
4
- height: number;
5
- str: string;
6
- horizontalPadding?: number;
7
- verticalPadding?: number;
8
- };
9
- export declare function drawBox({ title, width, height, str, horizontalPadding }: BoxOptions): string;
@@ -1,2 +0,0 @@
1
- import type { GeneratorConfig } from '@prisma/generator';
2
- export declare function extractPreviewFeatures(generators: GeneratorConfig[]): string[];
@@ -1,5 +0,0 @@
1
- type FormatTableOptions = {
2
- json?: boolean;
3
- };
4
- export declare function formatTable(rows: string[][], options?: FormatTableOptions): string;
5
- export {};
@@ -1,5 +0,0 @@
1
- /**
2
- * Formats a time interval in milliseconds, converting it to seconds if `ms` >= 1000.
3
- * Returns a string like "3ms" or "3.10s".
4
- */
5
- export declare function formatms(ms: number): string;
@@ -1,53 +0,0 @@
1
- import * as T from 'fp-ts/lib/Task';
2
- import * as TE from 'fp-ts/lib/TaskEither';
3
- export declare const createDirIfNotExists: (dir: string) => TE.TaskEither<{
4
- readonly type: "fs-create-dir";
5
- readonly error: Error & {
6
- code: string;
7
- };
8
- readonly meta: {
9
- dir: string;
10
- };
11
- }, string | undefined>;
12
- export declare const writeFile: (params: {
13
- path: string;
14
- content: string;
15
- }) => TE.TaskEither<{
16
- readonly type: "fs-write-file";
17
- readonly error: Error & {
18
- code: string;
19
- };
20
- readonly meta: {
21
- path: string;
22
- content: string;
23
- };
24
- }, void>;
25
- export declare const removeEmptyDirs: (dir: string) => TE.TaskEither<{
26
- readonly type: "fs-remove-empty-dirs";
27
- readonly error: Error & {
28
- code: string;
29
- };
30
- readonly meta: {
31
- dir: string;
32
- };
33
- }, void>;
34
- export declare const removeDir: (dir: string) => TE.TaskEither<{
35
- readonly type: "fs-remove-dir";
36
- readonly error: Error & {
37
- code: string;
38
- };
39
- readonly meta: {
40
- dir: string;
41
- };
42
- }, void>;
43
- export declare const removeFile: (filePath: string) => TE.TaskEither<{
44
- readonly type: "fs-remove-file";
45
- readonly error: Error & {
46
- code: string;
47
- };
48
- readonly meta: {
49
- filePath: string;
50
- };
51
- }, void>;
52
- export declare const getNestedFoldersInDir: (dir: string) => T.Task<string[]>;
53
- export declare const getFilesInDir: (dir: string, pattern?: string) => T.Task<string[]>;