@ohos-ports/prisma-internals 7.10.0-beta.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/LICENSE +201 -0
- package/dist/Generator.d.ts +42 -0
- package/dist/Generator.js +29 -0
- package/dist/WasmPanicRegistry.d.ts +5 -0
- package/dist/WasmPanicRegistry.js +25 -0
- package/dist/WasmSchemaEngineLoader.d.ts +5 -0
- package/dist/WasmSchemaEngineLoader.js +25 -0
- package/dist/built-in-provider.d.ts +5 -0
- package/dist/built-in-provider.js +25 -0
- package/dist/chunk-2B26F5N3.js +72 -0
- package/dist/chunk-2IOZUH3U.js +26 -0
- package/dist/chunk-2SDPW6AX.js +39 -0
- package/dist/chunk-3IMRWXIL.js +176 -0
- package/dist/chunk-3TYD3ZGQ.js +115 -0
- package/dist/chunk-3U4QB2G3.js +166 -0
- package/dist/chunk-3VD46SL7.js +151 -0
- package/dist/chunk-3YOF262C.js +176 -0
- package/dist/chunk-3ZHE2IX4.js +55 -0
- package/dist/chunk-4VNS5WPM.js +61 -0
- package/dist/chunk-5AI4FIZ3.js +1342 -0
- package/dist/chunk-5BDP445D.js +51 -0
- package/dist/chunk-5DBOS77Y.js +609 -0
- package/dist/chunk-5FJ3MENK.js +30 -0
- package/dist/chunk-5I4ERIIY.js +30 -0
- package/dist/chunk-5PJQQKQI.js +106 -0
- package/dist/chunk-5VQNKCKW.js +38 -0
- package/dist/chunk-5WRIOIZY.js +31 -0
- package/dist/chunk-6JE6QGSJ.js +37 -0
- package/dist/chunk-6PWHYRKR.js +74 -0
- package/dist/chunk-6QMQ2JYG.js +122 -0
- package/dist/chunk-6Z766KGR.js +95 -0
- package/dist/chunk-74RGCSUJ.js +44 -0
- package/dist/chunk-7B5PXS6N.js +29 -0
- package/dist/chunk-ANU3HEGF.js +29 -0
- package/dist/chunk-BERN76ZI.js +347 -0
- package/dist/chunk-BGMZPA2F.js +39 -0
- package/dist/chunk-BPDMLM32.js +105 -0
- package/dist/chunk-C47SCASR.js +37 -0
- package/dist/chunk-CGFNDGGI.js +40 -0
- package/dist/chunk-CTQD6OLG.js +438 -0
- package/dist/chunk-CUD726EK.js +36 -0
- package/dist/chunk-CXEXLFVL.js +166 -0
- package/dist/chunk-CYAS6B5N.js +48 -0
- package/dist/chunk-D4VZUY3O.js +71 -0
- package/dist/chunk-DODIJPCS.js +34 -0
- package/dist/chunk-DTPFRZWV.js +31 -0
- package/dist/chunk-DUDEWDFC.js +101 -0
- package/dist/chunk-DZ4QWHTB.js +127 -0
- package/dist/chunk-E23HYCQJ.js +37 -0
- package/dist/chunk-E476ARWS.js +2091 -0
- package/dist/chunk-EKGEKB22.js +28 -0
- package/dist/chunk-EU6UOKRD.js +26 -0
- package/dist/chunk-EWPXLBGE.js +115 -0
- package/dist/chunk-FCYHZHVW.js +43 -0
- package/dist/chunk-FRVJZOHP.js +1823 -0
- package/dist/chunk-GJSFP4V4.js +30 -0
- package/dist/chunk-GXW4NTU2.js +34 -0
- package/dist/chunk-H4NI2RIK.js +35 -0
- package/dist/chunk-HHG4DGHC.js +496 -0
- package/dist/chunk-HPVMQFIY.js +407 -0
- package/dist/chunk-I2CBQZJY.js +122 -0
- package/dist/chunk-I4K46RGG.js +31 -0
- package/dist/chunk-I6WLABB2.js +429 -0
- package/dist/chunk-ICFLO5JW.js +26 -0
- package/dist/chunk-IL7PSY44.js +26 -0
- package/dist/chunk-IOIAK7V7.js +53 -0
- package/dist/chunk-IYN5VKMD.js +110 -0
- package/dist/chunk-J77ZIDXB.js +69 -0
- package/dist/chunk-J7ZPY2XA.js +47 -0
- package/dist/chunk-JFXHOFJA.js +46 -0
- package/dist/chunk-JOIHHXR6.js +2067 -0
- package/dist/chunk-JPZYSRK3.js +6412 -0
- package/dist/chunk-JTKAT4KZ.js +26 -0
- package/dist/chunk-K2EOOA2X.js +91 -0
- package/dist/chunk-KDP6C3CB.js +56 -0
- package/dist/chunk-L3LDE52J.js +51 -0
- package/dist/chunk-L6V54WGO.js +39 -0
- package/dist/chunk-LMVSIVKQ.js +62 -0
- package/dist/chunk-LPNBWFQ3.js +38 -0
- package/dist/chunk-LRBXMV4B.js +26 -0
- package/dist/chunk-LRU47BGE.js +78 -0
- package/dist/chunk-M3GBKLGE.js +24 -0
- package/dist/chunk-MCS5ZY6Y.js +27 -0
- package/dist/chunk-NBWRGVYR.js +47 -0
- package/dist/chunk-NIWBAJZV.js +36 -0
- package/dist/chunk-NTDBN2N2.js +104 -0
- package/dist/chunk-NVNI2SRU.js +4230 -0
- package/dist/chunk-OIVPX3BR.js +32 -0
- package/dist/chunk-PFYALFCY.js +26 -0
- package/dist/chunk-PG5FDKSF.js +79 -0
- package/dist/chunk-PKF53VLJ.js +26 -0
- package/dist/chunk-PTPRBA7K.js +6675 -0
- package/dist/chunk-QBNYSYZK.js +74 -0
- package/dist/chunk-QMNPESAP.js +124 -0
- package/dist/chunk-QN6PSQY7.js +37 -0
- package/dist/chunk-QVJ2BXKF.js +3997 -0
- package/dist/chunk-R47SFJ5Z.js +104 -0
- package/dist/chunk-R6QH57HZ.js +311 -0
- package/dist/chunk-RBDYOTWB.js +193 -0
- package/dist/chunk-SBUSVJCV.js +62 -0
- package/dist/chunk-SP2ETLT2.js +41 -0
- package/dist/chunk-TPCPXGC5.js +218 -0
- package/dist/chunk-TWSLDIFL.js +48 -0
- package/dist/chunk-UGR6KLZN.js +30 -0
- package/dist/chunk-UMM35VP5.js +1193 -0
- package/dist/chunk-VFNP7Q3Y.js +15529 -0
- package/dist/chunk-VNIE2AZB.js +41 -0
- package/dist/chunk-VUGB2H7M.js +438 -0
- package/dist/chunk-WFMA7DI5.js +92 -0
- package/dist/chunk-WV4QHCSM.js +26 -0
- package/dist/chunk-WXRVYSYN.js +33 -0
- package/dist/chunk-X3P4J7WW.js +28 -0
- package/dist/chunk-X77CS5RK.js +33 -0
- package/dist/chunk-XAAVALN7.js +110 -0
- package/dist/chunk-XXTPN4LB.js +41 -0
- package/dist/chunk-XYCIH36R.js +29 -0
- package/dist/chunk-Y4TOGY6I.js +30 -0
- package/dist/chunk-YNDZCLVL.js +307 -0
- package/dist/chunk-YXB6APHS.js +447 -0
- package/dist/chunk-ZJWZK45Z.js +68 -0
- package/dist/chunk-ZKWDIAVF.js +29 -0
- package/dist/cli/Help.d.ts +11 -0
- package/dist/cli/Help.js +27 -0
- package/dist/cli/checkUnsupportedDataProxy.d.ts +16 -0
- package/dist/cli/checkUnsupportedDataProxy.js +125 -0
- package/dist/cli/completion-values.d.ts +24 -0
- package/dist/cli/completion-values.js +47 -0
- package/dist/cli/directoryConfig.d.ts +11 -0
- package/dist/cli/directoryConfig.js +25 -0
- package/dist/cli/getGeneratorSuccessMessage.d.ts +7 -0
- package/dist/cli/getGeneratorSuccessMessage.js +29 -0
- package/dist/cli/getSchema.d.ts +46 -0
- package/dist/cli/getSchema.js +31 -0
- package/dist/cli/getTypescriptVersion.d.ts +1 -0
- package/dist/cli/getTypescriptVersion.js +25 -0
- package/dist/cli/hashes.d.ts +11 -0
- package/dist/cli/hashes.js +28 -0
- package/dist/cli/schemaContext.d.ts +56 -0
- package/dist/cli/schemaContext.js +126 -0
- package/dist/cli/types.d.ts +63 -0
- package/dist/cli/types.js +1 -0
- package/dist/cli/utils.d.ts +13 -0
- package/dist/cli/utils.js +27 -0
- package/dist/convertCredentials.d.ts +10 -0
- package/dist/convertCredentials.js +28 -0
- package/dist/engine-commands/errorHelpers.d.ts +4 -0
- package/dist/engine-commands/errorHelpers.js +28 -0
- package/dist/engine-commands/formatSchema.d.ts +22 -0
- package/dist/engine-commands/formatSchema.js +124 -0
- package/dist/engine-commands/getConfig.d.ts +27 -0
- package/dist/engine-commands/getConfig.js +39 -0
- package/dist/engine-commands/getDmmf.d.ts +21 -0
- package/dist/engine-commands/getDmmf.js +40 -0
- package/dist/engine-commands/getEngineVersion.d.ts +4 -0
- package/dist/engine-commands/getEngineVersion.js +33 -0
- package/dist/engine-commands/getEnginesInfo.d.ts +20 -0
- package/dist/engine-commands/getEnginesInfo.js +36 -0
- package/dist/engine-commands/index.d.ts +10 -0
- package/dist/engine-commands/index.js +136 -0
- package/dist/engine-commands/lintSchema.d.ts +26 -0
- package/dist/engine-commands/lintSchema.js +34 -0
- package/dist/engine-commands/mergeSchemas.d.ts +12 -0
- package/dist/engine-commands/mergeSchemas.js +39 -0
- package/dist/engine-commands/queryEngineCommons.d.ts +31 -0
- package/dist/engine-commands/queryEngineCommons.js +33 -0
- package/dist/engine-commands/relativizePathInPSLError.d.ts +1 -0
- package/dist/engine-commands/relativizePathInPSLError.js +25 -0
- package/dist/engine-commands/validate.d.ts +12 -0
- package/dist/engine-commands/validate.js +39 -0
- package/dist/errorReporting.d.ts +25 -0
- package/dist/errorReporting.js +29 -0
- package/dist/get-generators/getGenerators.d.ts +71 -0
- package/dist/get-generators/getGenerators.js +127 -0
- package/dist/get-generators/utils/binaryTypeToEngineType.d.ts +3 -0
- package/dist/get-generators/utils/binaryTypeToEngineType.js +25 -0
- package/dist/get-generators/utils/engineTypeToBinaryType.d.ts +3 -0
- package/dist/get-generators/utils/engineTypeToBinaryType.js +25 -0
- package/dist/get-generators/utils/fixBinaryTargets.d.ts +3 -0
- package/dist/get-generators/utils/fixBinaryTargets.js +25 -0
- package/dist/get-generators/utils/getBinaryPathsByVersion.d.ts +7 -0
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +30 -0
- package/dist/get-generators/utils/getEngineVersionForGenerator.d.ts +2 -0
- package/dist/get-generators/utils/getEngineVersionForGenerator.js +25 -0
- package/dist/get-generators/utils/printGeneratorConfig.d.ts +9 -0
- package/dist/get-generators/utils/printGeneratorConfig.js +29 -0
- package/dist/getPackedPackage.d.ts +1 -0
- package/dist/getPackedPackage.js +29 -0
- package/dist/highlight/highlight.d.ts +3 -0
- package/dist/highlight/highlight.js +32 -0
- package/dist/highlight/languages/dml.d.ts +2 -0
- package/dist/highlight/languages/dml.js +25 -0
- package/dist/highlight/languages/sql.d.ts +2 -0
- package/dist/highlight/languages/sql.js +25 -0
- package/dist/highlight/prism.d.ts +6 -0
- package/dist/highlight/prism.js +28 -0
- package/dist/highlight/theme.d.ts +2 -0
- package/dist/highlight/theme.js +26 -0
- package/dist/highlight/types.d.ts +35 -0
- package/dist/highlight/types.js +1 -0
- package/dist/index.d.ts +80 -0
- package/dist/index.js +257 -0
- package/dist/logger.d.ts +14 -0
- package/dist/logger.js +32 -0
- package/dist/magic-string.es-B2CP4FDB.js +1324 -0
- package/dist/migrateTypes.d.ts +99 -0
- package/dist/migrateTypes.js +1 -0
- package/dist/multipart-parser-3AFJFP6K.js +374 -0
- package/dist/panic.d.ts +31 -0
- package/dist/panic.js +29 -0
- package/dist/resolveBinary.d.ts +6 -0
- package/dist/resolveBinary.js +34 -0
- package/dist/resolveOutput.d.ts +5 -0
- package/dist/resolveOutput.js +25 -0
- package/dist/resolvePkg.d.ts +7 -0
- package/dist/resolvePkg.js +25 -0
- package/dist/schemaEngineCommands.d.ts +36 -0
- package/dist/schemaEngineCommands.js +36 -0
- package/dist/sendPanic.d.ts +10 -0
- package/dist/sendPanic.js +29 -0
- package/dist/types.d.ts +34 -0
- package/dist/types.js +1 -0
- package/dist/utils/__tests__/isCi.test.js +58 -0
- package/dist/utils/__tests__/isInteractive.test.js +47 -0
- package/dist/utils/assertAlways.d.ts +14 -0
- package/dist/utils/assertAlways.js +25 -0
- package/dist/utils/assertNever.d.ts +27 -0
- package/dist/utils/assertNever.js +25 -0
- package/dist/utils/binaryTargetRegex.d.ts +8 -0
- package/dist/utils/binaryTargetRegex.js +25 -0
- package/dist/utils/callOnce.d.ts +13 -0
- package/dist/utils/callOnce.js +25 -0
- package/dist/utils/callOnce.test.d.ts +1 -0
- package/dist/utils/callOnce.test.js +36 -0
- package/dist/utils/canPrompt.d.ts +1 -0
- package/dist/utils/canPrompt.js +27 -0
- package/dist/utils/chmodPlusX.d.ts +1 -0
- package/dist/utils/chmodPlusX.js +25 -0
- package/dist/utils/drawBox.d.ts +9 -0
- package/dist/utils/drawBox.js +26 -0
- package/dist/utils/extractPreviewFeatures.d.ts +2 -0
- package/dist/utils/extractPreviewFeatures.js +28 -0
- package/dist/utils/formatTable.d.ts +5 -0
- package/dist/utils/formatTable.js +25 -0
- package/dist/utils/formatms.d.ts +5 -0
- package/dist/utils/formatms.js +25 -0
- package/dist/utils/fs-functional.d.ts +53 -0
- package/dist/utils/fs-functional.js +35 -0
- package/dist/utils/fs-utils.d.ts +30 -0
- package/dist/utils/fs-utils.js +32 -0
- package/dist/utils/getCommandWithExecutor.d.ts +1 -0
- package/dist/utils/getCommandWithExecutor.js +26 -0
- package/dist/utils/getGitHubIssueUrl.d.ts +18 -0
- package/dist/utils/getGitHubIssueUrl.js +27 -0
- package/dist/utils/getVersionFromPackageJson.d.ts +1 -0
- package/dist/utils/getVersionFromPackageJson.js +26 -0
- package/dist/utils/handlePanic.d.ts +11 -0
- package/dist/utils/handlePanic.js +36 -0
- package/dist/utils/hasOwnProperty.d.ts +1 -0
- package/dist/utils/hasOwnProperty.js +25 -0
- package/dist/utils/isCi.d.ts +1 -0
- package/dist/utils/isCi.js +25 -0
- package/dist/utils/isCurrentBinInstalledGlobally.d.ts +1 -0
- package/dist/utils/isCurrentBinInstalledGlobally.js +25 -0
- package/dist/utils/isInContainer.d.ts +5 -0
- package/dist/utils/isInContainer.js +25 -0
- package/dist/utils/isInNpmLifecycleHook.d.ts +4 -0
- package/dist/utils/isInNpmLifecycleHook.js +25 -0
- package/dist/utils/isInteractive.d.ts +6 -0
- package/dist/utils/isInteractive.js +25 -0
- package/dist/utils/isPromiseLike.d.ts +1 -0
- package/dist/utils/isPromiseLike.js +25 -0
- package/dist/utils/isValidJsIdentifier.d.ts +1 -0
- package/dist/utils/isValidJsIdentifier.js +25 -0
- package/dist/utils/keyBy.d.ts +9 -0
- package/dist/utils/keyBy.js +25 -0
- package/dist/utils/link.d.ts +1 -0
- package/dist/utils/link.js +26 -0
- package/dist/utils/mapKeys.d.ts +1 -0
- package/dist/utils/mapKeys.js +25 -0
- package/dist/utils/mapObjectValues.d.ts +1 -0
- package/dist/utils/mapObjectValues.js +25 -0
- package/dist/utils/max.d.ts +11 -0
- package/dist/utils/max.js +26 -0
- package/dist/utils/max.test.d.ts +1 -0
- package/dist/utils/max.test.js +22 -0
- package/dist/utils/maybeInGitHook.d.ts +9 -0
- package/dist/utils/maybeInGitHook.js +25 -0
- package/dist/utils/missingDatasource.d.ts +1 -0
- package/dist/utils/missingDatasource.js +32 -0
- package/dist/utils/missingGeneratorMessage.d.ts +3 -0
- package/dist/utils/missingGeneratorMessage.js +34 -0
- package/dist/utils/now.d.ts +3 -0
- package/dist/utils/now.js +51 -0
- package/dist/utils/omit.d.ts +6 -0
- package/dist/utils/omit.js +30 -0
- package/dist/utils/parseAWSNodejsRuntimeEnvVarVersion.d.ts +1 -0
- package/dist/utils/parseAWSNodejsRuntimeEnvVarVersion.js +25 -0
- package/dist/utils/parseEnvValue.d.ts +17 -0
- package/dist/utils/parseEnvValue.js +27 -0
- package/dist/utils/path.d.ts +14 -0
- package/dist/utils/path.js +26 -0
- package/dist/utils/path.test.d.ts +1 -0
- package/dist/utils/path.test.js +54 -0
- package/dist/utils/pick.d.ts +1 -0
- package/dist/utils/pick.js +25 -0
- package/dist/utils/printConfigWarnings.d.ts +1 -0
- package/dist/utils/printConfigWarnings.js +26 -0
- package/dist/utils/prismaPostgres.d.ts +13 -0
- package/dist/utils/prismaPostgres.js +28 -0
- package/dist/utils/prismaPostgres.test.d.ts +1 -0
- package/dist/utils/prismaPostgres.test.js +33 -0
- package/dist/utils/schemaFileInput.d.ts +2 -0
- package/dist/utils/schemaFileInput.js +25 -0
- package/dist/utils/setClassName.d.ts +9 -0
- package/dist/utils/setClassName.js +25 -0
- package/dist/utils/toSchemasContainer.d.ts +5 -0
- package/dist/utils/toSchemasContainer.js +26 -0
- package/dist/utils/unique.d.ts +5 -0
- package/dist/utils/unique.js +38 -0
- package/dist/utils/validatePrismaConfigWithDatasource.d.ts +17 -0
- package/dist/utils/validatePrismaConfigWithDatasource.js +28 -0
- package/dist/utils/vercelPkgPathRegex.d.ts +1 -0
- package/dist/utils/vercelPkgPathRegex.js +25 -0
- package/dist/warnOnce.d.ts +1 -0
- package/dist/warnOnce.js +27 -0
- package/dist/wasm.d.ts +5 -0
- package/dist/wasm.js +29 -0
- package/package.json +93 -0
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
* An init script that will be run on the shadow database before the migrations are applied.
|
|
62
|
+
* Useful in combination with external tables. Can be empty.
|
|
63
|
+
* Set via `migrations.initShadowDb` in the Prisma config file.
|
|
64
|
+
*/
|
|
65
|
+
shadowDbInitScript: string;
|
|
66
|
+
/**
|
|
67
|
+
* Description of the migration directories.
|
|
68
|
+
*/
|
|
69
|
+
migrationDirectories: Array<MigrationDirectory>;
|
|
70
|
+
};
|
|
71
|
+
type SchemaContainer = {
|
|
72
|
+
path: string;
|
|
73
|
+
content: string;
|
|
74
|
+
};
|
|
75
|
+
type SchemasContainer = {
|
|
76
|
+
files: SchemaContainer[];
|
|
77
|
+
};
|
|
78
|
+
type SchemasWithConfigDir = {
|
|
79
|
+
files: SchemaContainer[];
|
|
80
|
+
configDir: string;
|
|
81
|
+
};
|
|
82
|
+
type SchemaFilter = {
|
|
83
|
+
externalTables: string[];
|
|
84
|
+
externalEnums: string[];
|
|
85
|
+
};
|
|
86
|
+
type UrlContainer = {
|
|
87
|
+
url: string;
|
|
88
|
+
};
|
|
89
|
+
type DatasourceParam = Tagged<'ConnectionString', UrlContainer> | Tagged<'Schema', SchemasContainer>;
|
|
90
|
+
type GetDatabaseVersionParams = {
|
|
91
|
+
datasource: MigrateTypes.DatasourceParam;
|
|
92
|
+
};
|
|
93
|
+
type Tagged<Tag extends string, T> = Display<{
|
|
94
|
+
tag: Tag;
|
|
95
|
+
} & T>;
|
|
96
|
+
type Display<T> = {
|
|
97
|
+
[K in keyof T]: T[K];
|
|
98
|
+
} & unknown;
|
|
99
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var multipart_parser_3AFJFP6K_exports = {};
|
|
20
|
+
__export(multipart_parser_3AFJFP6K_exports, {
|
|
21
|
+
toFormData: () => toFormData
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(multipart_parser_3AFJFP6K_exports);
|
|
24
|
+
var import_chunk_NVNI2SRU = require("./chunk-NVNI2SRU.js");
|
|
25
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
26
|
+
var s = 0;
|
|
27
|
+
var S = {
|
|
28
|
+
START_BOUNDARY: s++,
|
|
29
|
+
HEADER_FIELD_START: s++,
|
|
30
|
+
HEADER_FIELD: s++,
|
|
31
|
+
HEADER_VALUE_START: s++,
|
|
32
|
+
HEADER_VALUE: s++,
|
|
33
|
+
HEADER_VALUE_ALMOST_DONE: s++,
|
|
34
|
+
HEADERS_ALMOST_DONE: s++,
|
|
35
|
+
PART_DATA_START: s++,
|
|
36
|
+
PART_DATA: s++,
|
|
37
|
+
END: s++
|
|
38
|
+
};
|
|
39
|
+
var f = 1;
|
|
40
|
+
var F = {
|
|
41
|
+
PART_BOUNDARY: f,
|
|
42
|
+
LAST_BOUNDARY: f *= 2
|
|
43
|
+
};
|
|
44
|
+
var LF = 10;
|
|
45
|
+
var CR = 13;
|
|
46
|
+
var SPACE = 32;
|
|
47
|
+
var HYPHEN = 45;
|
|
48
|
+
var COLON = 58;
|
|
49
|
+
var A = 97;
|
|
50
|
+
var Z = 122;
|
|
51
|
+
var lower = (c) => c | 32;
|
|
52
|
+
var noop = () => {
|
|
53
|
+
};
|
|
54
|
+
var MultipartParser = class {
|
|
55
|
+
/**
|
|
56
|
+
* @param {string} boundary
|
|
57
|
+
*/
|
|
58
|
+
constructor(boundary) {
|
|
59
|
+
this.index = 0;
|
|
60
|
+
this.flags = 0;
|
|
61
|
+
this.onHeaderEnd = noop;
|
|
62
|
+
this.onHeaderField = noop;
|
|
63
|
+
this.onHeadersEnd = noop;
|
|
64
|
+
this.onHeaderValue = noop;
|
|
65
|
+
this.onPartBegin = noop;
|
|
66
|
+
this.onPartData = noop;
|
|
67
|
+
this.onPartEnd = noop;
|
|
68
|
+
this.boundaryChars = {};
|
|
69
|
+
boundary = "\r\n--" + boundary;
|
|
70
|
+
const ui8a = new Uint8Array(boundary.length);
|
|
71
|
+
for (let i = 0; i < boundary.length; i++) {
|
|
72
|
+
ui8a[i] = boundary.charCodeAt(i);
|
|
73
|
+
this.boundaryChars[ui8a[i]] = true;
|
|
74
|
+
}
|
|
75
|
+
this.boundary = ui8a;
|
|
76
|
+
this.lookbehind = new Uint8Array(this.boundary.length + 8);
|
|
77
|
+
this.state = S.START_BOUNDARY;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* @param {Uint8Array} data
|
|
81
|
+
*/
|
|
82
|
+
write(data) {
|
|
83
|
+
let i = 0;
|
|
84
|
+
const length_ = data.length;
|
|
85
|
+
let previousIndex = this.index;
|
|
86
|
+
let { lookbehind, boundary, boundaryChars, index, state, flags } = this;
|
|
87
|
+
const boundaryLength = this.boundary.length;
|
|
88
|
+
const boundaryEnd = boundaryLength - 1;
|
|
89
|
+
const bufferLength = data.length;
|
|
90
|
+
let c;
|
|
91
|
+
let cl;
|
|
92
|
+
const mark = (name) => {
|
|
93
|
+
this[name + "Mark"] = i;
|
|
94
|
+
};
|
|
95
|
+
const clear = (name) => {
|
|
96
|
+
delete this[name + "Mark"];
|
|
97
|
+
};
|
|
98
|
+
const callback = (callbackSymbol, start, end, ui8a) => {
|
|
99
|
+
if (start === void 0 || start !== end) {
|
|
100
|
+
this[callbackSymbol](ui8a && ui8a.subarray(start, end));
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const dataCallback = (name, clear2) => {
|
|
104
|
+
const markSymbol = name + "Mark";
|
|
105
|
+
if (!(markSymbol in this)) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (clear2) {
|
|
109
|
+
callback(name, this[markSymbol], i, data);
|
|
110
|
+
delete this[markSymbol];
|
|
111
|
+
} else {
|
|
112
|
+
callback(name, this[markSymbol], data.length, data);
|
|
113
|
+
this[markSymbol] = 0;
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
for (i = 0; i < length_; i++) {
|
|
117
|
+
c = data[i];
|
|
118
|
+
switch (state) {
|
|
119
|
+
case S.START_BOUNDARY:
|
|
120
|
+
if (index === boundary.length - 2) {
|
|
121
|
+
if (c === HYPHEN) {
|
|
122
|
+
flags |= F.LAST_BOUNDARY;
|
|
123
|
+
} else if (c !== CR) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
index++;
|
|
127
|
+
break;
|
|
128
|
+
} else if (index - 1 === boundary.length - 2) {
|
|
129
|
+
if (flags & F.LAST_BOUNDARY && c === HYPHEN) {
|
|
130
|
+
state = S.END;
|
|
131
|
+
flags = 0;
|
|
132
|
+
} else if (!(flags & F.LAST_BOUNDARY) && c === LF) {
|
|
133
|
+
index = 0;
|
|
134
|
+
callback("onPartBegin");
|
|
135
|
+
state = S.HEADER_FIELD_START;
|
|
136
|
+
} else {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
if (c !== boundary[index + 2]) {
|
|
142
|
+
index = -2;
|
|
143
|
+
}
|
|
144
|
+
if (c === boundary[index + 2]) {
|
|
145
|
+
index++;
|
|
146
|
+
}
|
|
147
|
+
break;
|
|
148
|
+
case S.HEADER_FIELD_START:
|
|
149
|
+
state = S.HEADER_FIELD;
|
|
150
|
+
mark("onHeaderField");
|
|
151
|
+
index = 0;
|
|
152
|
+
// falls through
|
|
153
|
+
case S.HEADER_FIELD:
|
|
154
|
+
if (c === CR) {
|
|
155
|
+
clear("onHeaderField");
|
|
156
|
+
state = S.HEADERS_ALMOST_DONE;
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
index++;
|
|
160
|
+
if (c === HYPHEN) {
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
if (c === COLON) {
|
|
164
|
+
if (index === 1) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
dataCallback("onHeaderField", true);
|
|
168
|
+
state = S.HEADER_VALUE_START;
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
cl = lower(c);
|
|
172
|
+
if (cl < A || cl > Z) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
break;
|
|
176
|
+
case S.HEADER_VALUE_START:
|
|
177
|
+
if (c === SPACE) {
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
mark("onHeaderValue");
|
|
181
|
+
state = S.HEADER_VALUE;
|
|
182
|
+
// falls through
|
|
183
|
+
case S.HEADER_VALUE:
|
|
184
|
+
if (c === CR) {
|
|
185
|
+
dataCallback("onHeaderValue", true);
|
|
186
|
+
callback("onHeaderEnd");
|
|
187
|
+
state = S.HEADER_VALUE_ALMOST_DONE;
|
|
188
|
+
}
|
|
189
|
+
break;
|
|
190
|
+
case S.HEADER_VALUE_ALMOST_DONE:
|
|
191
|
+
if (c !== LF) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
state = S.HEADER_FIELD_START;
|
|
195
|
+
break;
|
|
196
|
+
case S.HEADERS_ALMOST_DONE:
|
|
197
|
+
if (c !== LF) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
callback("onHeadersEnd");
|
|
201
|
+
state = S.PART_DATA_START;
|
|
202
|
+
break;
|
|
203
|
+
case S.PART_DATA_START:
|
|
204
|
+
state = S.PART_DATA;
|
|
205
|
+
mark("onPartData");
|
|
206
|
+
// falls through
|
|
207
|
+
case S.PART_DATA:
|
|
208
|
+
previousIndex = index;
|
|
209
|
+
if (index === 0) {
|
|
210
|
+
i += boundaryEnd;
|
|
211
|
+
while (i < bufferLength && !(data[i] in boundaryChars)) {
|
|
212
|
+
i += boundaryLength;
|
|
213
|
+
}
|
|
214
|
+
i -= boundaryEnd;
|
|
215
|
+
c = data[i];
|
|
216
|
+
}
|
|
217
|
+
if (index < boundary.length) {
|
|
218
|
+
if (boundary[index] === c) {
|
|
219
|
+
if (index === 0) {
|
|
220
|
+
dataCallback("onPartData", true);
|
|
221
|
+
}
|
|
222
|
+
index++;
|
|
223
|
+
} else {
|
|
224
|
+
index = 0;
|
|
225
|
+
}
|
|
226
|
+
} else if (index === boundary.length) {
|
|
227
|
+
index++;
|
|
228
|
+
if (c === CR) {
|
|
229
|
+
flags |= F.PART_BOUNDARY;
|
|
230
|
+
} else if (c === HYPHEN) {
|
|
231
|
+
flags |= F.LAST_BOUNDARY;
|
|
232
|
+
} else {
|
|
233
|
+
index = 0;
|
|
234
|
+
}
|
|
235
|
+
} else if (index - 1 === boundary.length) {
|
|
236
|
+
if (flags & F.PART_BOUNDARY) {
|
|
237
|
+
index = 0;
|
|
238
|
+
if (c === LF) {
|
|
239
|
+
flags &= ~F.PART_BOUNDARY;
|
|
240
|
+
callback("onPartEnd");
|
|
241
|
+
callback("onPartBegin");
|
|
242
|
+
state = S.HEADER_FIELD_START;
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
} else if (flags & F.LAST_BOUNDARY) {
|
|
246
|
+
if (c === HYPHEN) {
|
|
247
|
+
callback("onPartEnd");
|
|
248
|
+
state = S.END;
|
|
249
|
+
flags = 0;
|
|
250
|
+
} else {
|
|
251
|
+
index = 0;
|
|
252
|
+
}
|
|
253
|
+
} else {
|
|
254
|
+
index = 0;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
if (index > 0) {
|
|
258
|
+
lookbehind[index - 1] = c;
|
|
259
|
+
} else if (previousIndex > 0) {
|
|
260
|
+
const _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength);
|
|
261
|
+
callback("onPartData", 0, previousIndex, _lookbehind);
|
|
262
|
+
previousIndex = 0;
|
|
263
|
+
mark("onPartData");
|
|
264
|
+
i--;
|
|
265
|
+
}
|
|
266
|
+
break;
|
|
267
|
+
case S.END:
|
|
268
|
+
break;
|
|
269
|
+
default:
|
|
270
|
+
throw new Error(`Unexpected state entered: ${state}`);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
dataCallback("onHeaderField");
|
|
274
|
+
dataCallback("onHeaderValue");
|
|
275
|
+
dataCallback("onPartData");
|
|
276
|
+
this.index = index;
|
|
277
|
+
this.state = state;
|
|
278
|
+
this.flags = flags;
|
|
279
|
+
}
|
|
280
|
+
end() {
|
|
281
|
+
if (this.state === S.HEADER_FIELD_START && this.index === 0 || this.state === S.PART_DATA && this.index === this.boundary.length) {
|
|
282
|
+
this.onPartEnd();
|
|
283
|
+
} else if (this.state !== S.END) {
|
|
284
|
+
throw new Error("MultipartParser.end(): stream ended unexpectedly");
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
function _fileName(headerValue) {
|
|
289
|
+
const m = headerValue.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
|
|
290
|
+
if (!m) {
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
const match = m[2] || m[3] || "";
|
|
294
|
+
let filename = match.slice(match.lastIndexOf("\\") + 1);
|
|
295
|
+
filename = filename.replace(/%22/g, '"');
|
|
296
|
+
filename = filename.replace(/&#(\d{4});/g, (m2, code) => {
|
|
297
|
+
return String.fromCharCode(code);
|
|
298
|
+
});
|
|
299
|
+
return filename;
|
|
300
|
+
}
|
|
301
|
+
async function toFormData(Body, ct) {
|
|
302
|
+
if (!/multipart/i.test(ct)) {
|
|
303
|
+
throw new TypeError("Failed to fetch");
|
|
304
|
+
}
|
|
305
|
+
const m = ct.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
|
|
306
|
+
if (!m) {
|
|
307
|
+
throw new TypeError("no or bad content-type header, no multipart boundary");
|
|
308
|
+
}
|
|
309
|
+
const parser = new MultipartParser(m[1] || m[2]);
|
|
310
|
+
let headerField;
|
|
311
|
+
let headerValue;
|
|
312
|
+
let entryValue;
|
|
313
|
+
let entryName;
|
|
314
|
+
let contentType;
|
|
315
|
+
let filename;
|
|
316
|
+
const entryChunks = [];
|
|
317
|
+
const formData = new import_chunk_NVNI2SRU.FormData();
|
|
318
|
+
const onPartData = (ui8a) => {
|
|
319
|
+
entryValue += decoder.decode(ui8a, { stream: true });
|
|
320
|
+
};
|
|
321
|
+
const appendToFile = (ui8a) => {
|
|
322
|
+
entryChunks.push(ui8a);
|
|
323
|
+
};
|
|
324
|
+
const appendFileToFormData = () => {
|
|
325
|
+
const file = new import_chunk_NVNI2SRU.file_default(entryChunks, filename, { type: contentType });
|
|
326
|
+
formData.append(entryName, file);
|
|
327
|
+
};
|
|
328
|
+
const appendEntryToFormData = () => {
|
|
329
|
+
formData.append(entryName, entryValue);
|
|
330
|
+
};
|
|
331
|
+
const decoder = new TextDecoder("utf-8");
|
|
332
|
+
decoder.decode();
|
|
333
|
+
parser.onPartBegin = function() {
|
|
334
|
+
parser.onPartData = onPartData;
|
|
335
|
+
parser.onPartEnd = appendEntryToFormData;
|
|
336
|
+
headerField = "";
|
|
337
|
+
headerValue = "";
|
|
338
|
+
entryValue = "";
|
|
339
|
+
entryName = "";
|
|
340
|
+
contentType = "";
|
|
341
|
+
filename = null;
|
|
342
|
+
entryChunks.length = 0;
|
|
343
|
+
};
|
|
344
|
+
parser.onHeaderField = function(ui8a) {
|
|
345
|
+
headerField += decoder.decode(ui8a, { stream: true });
|
|
346
|
+
};
|
|
347
|
+
parser.onHeaderValue = function(ui8a) {
|
|
348
|
+
headerValue += decoder.decode(ui8a, { stream: true });
|
|
349
|
+
};
|
|
350
|
+
parser.onHeaderEnd = function() {
|
|
351
|
+
headerValue += decoder.decode();
|
|
352
|
+
headerField = headerField.toLowerCase();
|
|
353
|
+
if (headerField === "content-disposition") {
|
|
354
|
+
const m2 = headerValue.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);
|
|
355
|
+
if (m2) {
|
|
356
|
+
entryName = m2[2] || m2[3] || "";
|
|
357
|
+
}
|
|
358
|
+
filename = _fileName(headerValue);
|
|
359
|
+
if (filename) {
|
|
360
|
+
parser.onPartData = appendToFile;
|
|
361
|
+
parser.onPartEnd = appendFileToFormData;
|
|
362
|
+
}
|
|
363
|
+
} else if (headerField === "content-type") {
|
|
364
|
+
contentType = headerValue;
|
|
365
|
+
}
|
|
366
|
+
headerValue = "";
|
|
367
|
+
headerField = "";
|
|
368
|
+
};
|
|
369
|
+
for await (const chunk of Body) {
|
|
370
|
+
parser.write(chunk);
|
|
371
|
+
}
|
|
372
|
+
parser.end();
|
|
373
|
+
return formData;
|
|
374
|
+
}
|
package/dist/panic.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
};
|
package/dist/panic.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var panic_exports = {};
|
|
20
|
+
__export(panic_exports, {
|
|
21
|
+
ErrorArea: () => import_chunk_LMVSIVKQ.ErrorArea,
|
|
22
|
+
RustPanic: () => import_chunk_LMVSIVKQ.RustPanic,
|
|
23
|
+
getWasmError: () => import_chunk_LMVSIVKQ.getWasmError,
|
|
24
|
+
isRustPanic: () => import_chunk_LMVSIVKQ.isRustPanic,
|
|
25
|
+
isWasmPanic: () => import_chunk_LMVSIVKQ.isWasmPanic
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(panic_exports);
|
|
28
|
+
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
29
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
@@ -0,0 +1,6 @@
|
|
|
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>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var resolveBinary_exports = {};
|
|
20
|
+
__export(resolveBinary_exports, {
|
|
21
|
+
BinaryType: () => import_chunk_5PJQQKQI.BinaryType,
|
|
22
|
+
engineEnvVarMap: () => import_chunk_5PJQQKQI.engineEnvVarMap,
|
|
23
|
+
maybeCopyToTmp: () => import_chunk_5PJQQKQI.maybeCopyToTmp,
|
|
24
|
+
resolveBinary: () => import_chunk_5PJQQKQI.resolveBinary,
|
|
25
|
+
safeResolveBinary: () => import_chunk_5PJQQKQI.safeResolveBinary
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(resolveBinary_exports);
|
|
28
|
+
var import_chunk_5PJQQKQI = require("./chunk-5PJQQKQI.js");
|
|
29
|
+
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
|
30
|
+
var import_chunk_E476ARWS = require("./chunk-E476ARWS.js");
|
|
31
|
+
var import_chunk_TWSLDIFL = require("./chunk-TWSLDIFL.js");
|
|
32
|
+
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
33
|
+
var import_chunk_5VQNKCKW = require("./chunk-5VQNKCKW.js");
|
|
34
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var resolveOutput_exports = {};
|
|
20
|
+
__export(resolveOutput_exports, {
|
|
21
|
+
resolveOutput: () => import_chunk_2B26F5N3.resolveOutput
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(resolveOutput_exports);
|
|
24
|
+
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
25
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
@@ -0,0 +1,7 @@
|
|
|
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>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var resolvePkg_exports = {};
|
|
20
|
+
__export(resolvePkg_exports, {
|
|
21
|
+
resolvePkg: () => import_chunk_UMM35VP5.resolvePkg
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(resolvePkg_exports);
|
|
24
|
+
var import_chunk_UMM35VP5 = require("./chunk-UMM35VP5.js");
|
|
25
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare enum SchemaEngineExitCode {
|
|
2
|
+
Success = 0,
|
|
3
|
+
Error = 1,
|
|
4
|
+
Panic = 101
|
|
5
|
+
}
|
|
6
|
+
export interface SchemaEngineLogLine {
|
|
7
|
+
timestamp: string;
|
|
8
|
+
level: LogLevel;
|
|
9
|
+
fields: LogFields;
|
|
10
|
+
target: string;
|
|
11
|
+
}
|
|
12
|
+
type LogLevel = 'INFO' | 'ERROR' | 'DEBUG' | 'WARN';
|
|
13
|
+
interface LogFields {
|
|
14
|
+
message: string;
|
|
15
|
+
git_hash?: string;
|
|
16
|
+
is_panic?: boolean;
|
|
17
|
+
error_code?: string;
|
|
18
|
+
backtrace?: string;
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}
|
|
21
|
+
export type DatabaseErrorCodes = 'P1000' | 'P1001' | 'P1002' | 'P1003' | 'P1009' | 'P1010';
|
|
22
|
+
export type ConnectionResult = true | ConnectionError;
|
|
23
|
+
export interface ConnectionError {
|
|
24
|
+
message: string;
|
|
25
|
+
code: DatabaseErrorCodes;
|
|
26
|
+
}
|
|
27
|
+
export declare function canConnectToDatabase(connectionString: string, cwd?: string, schemaEnginePath?: string): Promise<ConnectionResult>;
|
|
28
|
+
export declare function createDatabase(connectionString: string, cwd?: string, schemaEnginePath?: string): Promise<boolean>;
|
|
29
|
+
export declare function dropDatabase(connectionString: string, cwd?: string, schemaEnginePath?: string): Promise<boolean>;
|
|
30
|
+
export declare function execaCommand({ connectionString, cwd, schemaEnginePath, engineCommandName, }: {
|
|
31
|
+
connectionString: string;
|
|
32
|
+
cwd: string;
|
|
33
|
+
schemaEnginePath?: string;
|
|
34
|
+
engineCommandName: 'create-database' | 'drop-database' | 'can-connect-to-database';
|
|
35
|
+
}): Promise<import("execa").ExecaReturnValue<string>>;
|
|
36
|
+
export {};
|