@a_team/prisma 2.0.10 → 2.0.12
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/client/default.d.ts +1 -1
- package/dist/client/default.js +1 -3
- package/dist/client/edge.d.ts +1 -1
- package/dist/client/edge.js +356 -3
- package/dist/client/index-browser.js +342 -2
- package/dist/client/index.d.ts +23935 -1
- package/dist/client/index.js +381 -3
- package/dist/client/libquery_engine-darwin-arm64.dylib.node +0 -0
- package/dist/client/libquery_engine-darwin.dylib.node +0 -0
- package/dist/client/package.json +18 -198
- package/dist/client/schema.prisma +482 -0
- package/dist/client/wasm.d.ts +1 -1
- package/dist/client/wasm.js +342 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -6
- package/package.json +2 -2
- package/dist/client/LICENSE +0 -201
- package/dist/client/README.md +0 -27
- package/dist/client/extension.d.ts +0 -1
- package/dist/client/extension.js +0 -4
- package/dist/client/generator-build/index.js +0 -9552
- package/dist/client/react-native.d.ts +0 -1
- package/dist/client/react-native.js +0 -3
- package/dist/client/runtime/binary.d.ts +0 -1
- package/dist/client/runtime/binary.js +0 -210
- package/dist/client/runtime/query_engine_bg.mysql.js +0 -2
- package/dist/client/runtime/query_engine_bg.mysql.wasm +0 -0
- package/dist/client/runtime/query_engine_bg.postgresql.js +0 -2
- package/dist/client/runtime/query_engine_bg.postgresql.wasm +0 -0
- package/dist/client/runtime/query_engine_bg.sqlite.js +0 -2
- package/dist/client/runtime/query_engine_bg.sqlite.wasm +0 -0
- package/dist/client/runtime/react-native.d.ts +0 -3273
- package/dist/client/scripts/colors.js +0 -176
- package/dist/client/scripts/default-deno-edge.ts +0 -9
- package/dist/client/scripts/default-index.d.ts +0 -110
- package/dist/client/scripts/default-index.js +0 -65
- package/dist/client/scripts/postinstall.d.ts +0 -5
- package/dist/client/scripts/postinstall.js +0 -410
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const isObject = (val) => val !== null && typeof val === 'object' && !Array.isArray(val)
|
|
4
|
-
|
|
5
|
-
// this is a modified version of https://github.com/chalk/ansi-regex (MIT License)
|
|
6
|
-
const ANSI_REGEX =
|
|
7
|
-
/* eslint-disable-next-line no-control-regex */
|
|
8
|
-
/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g
|
|
9
|
-
|
|
10
|
-
const create = () => {
|
|
11
|
-
const colors = { enabled: true, visible: true, styles: {}, keys: {} }
|
|
12
|
-
|
|
13
|
-
if ('FORCE_COLOR' in process.env) {
|
|
14
|
-
colors.enabled = process.env.FORCE_COLOR !== '0'
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const ansi = (style) => {
|
|
18
|
-
let open = (style.open = `\u001b[${style.codes[0]}m`)
|
|
19
|
-
let close = (style.close = `\u001b[${style.codes[1]}m`)
|
|
20
|
-
let regex = (style.regex = new RegExp(`\\u001b\\[${style.codes[1]}m`, 'g'))
|
|
21
|
-
style.wrap = (input, newline) => {
|
|
22
|
-
if (input.includes(close)) input = input.replace(regex, close + open)
|
|
23
|
-
let output = open + input + close
|
|
24
|
-
// see https://github.com/chalk/chalk/pull/92, thanks to the
|
|
25
|
-
// chalk contributors for this fix. However, we've confirmed that
|
|
26
|
-
// this issue is also present in Windows terminals
|
|
27
|
-
return newline ? output.replace(/\r*\n/g, `${close}$&${open}`) : output
|
|
28
|
-
}
|
|
29
|
-
return style
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const wrap = (style, input, newline) => {
|
|
33
|
-
return typeof style === 'function' ? style(input) : style.wrap(input, newline)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const style = (input, stack) => {
|
|
37
|
-
if (input === '' || input == null) return ''
|
|
38
|
-
if (colors.enabled === false) return input
|
|
39
|
-
if (colors.visible === false) return ''
|
|
40
|
-
let str = '' + input
|
|
41
|
-
let nl = str.includes('\n')
|
|
42
|
-
let n = stack.length
|
|
43
|
-
if (n > 0 && stack.includes('unstyle')) {
|
|
44
|
-
stack = [...new Set(['unstyle', ...stack])].reverse()
|
|
45
|
-
}
|
|
46
|
-
while (n-- > 0) str = wrap(colors.styles[stack[n]], str, nl)
|
|
47
|
-
return str
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const define = (name, codes, type) => {
|
|
51
|
-
colors.styles[name] = ansi({ name, codes })
|
|
52
|
-
let keys = colors.keys[type] || (colors.keys[type] = [])
|
|
53
|
-
keys.push(name)
|
|
54
|
-
|
|
55
|
-
Reflect.defineProperty(colors, name, {
|
|
56
|
-
configurable: true,
|
|
57
|
-
enumerable: true,
|
|
58
|
-
set(value) {
|
|
59
|
-
colors.alias(name, value)
|
|
60
|
-
},
|
|
61
|
-
get() {
|
|
62
|
-
let color = (input) => style(input, color.stack)
|
|
63
|
-
Reflect.setPrototypeOf(color, colors)
|
|
64
|
-
color.stack = this.stack ? this.stack.concat(name) : [name]
|
|
65
|
-
return color
|
|
66
|
-
},
|
|
67
|
-
})
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
define('reset', [0, 0], 'modifier')
|
|
71
|
-
define('bold', [1, 22], 'modifier')
|
|
72
|
-
define('dim', [2, 22], 'modifier')
|
|
73
|
-
define('italic', [3, 23], 'modifier')
|
|
74
|
-
define('underline', [4, 24], 'modifier')
|
|
75
|
-
define('inverse', [7, 27], 'modifier')
|
|
76
|
-
define('hidden', [8, 28], 'modifier')
|
|
77
|
-
define('strikethrough', [9, 29], 'modifier')
|
|
78
|
-
|
|
79
|
-
define('black', [30, 39], 'color')
|
|
80
|
-
define('red', [31, 39], 'color')
|
|
81
|
-
define('green', [32, 39], 'color')
|
|
82
|
-
define('yellow', [33, 39], 'color')
|
|
83
|
-
define('blue', [34, 39], 'color')
|
|
84
|
-
define('magenta', [35, 39], 'color')
|
|
85
|
-
define('cyan', [36, 39], 'color')
|
|
86
|
-
define('white', [37, 39], 'color')
|
|
87
|
-
define('gray', [90, 39], 'color')
|
|
88
|
-
define('grey', [90, 39], 'color')
|
|
89
|
-
|
|
90
|
-
define('bgBlack', [40, 49], 'bg')
|
|
91
|
-
define('bgRed', [41, 49], 'bg')
|
|
92
|
-
define('bgGreen', [42, 49], 'bg')
|
|
93
|
-
define('bgYellow', [43, 49], 'bg')
|
|
94
|
-
define('bgBlue', [44, 49], 'bg')
|
|
95
|
-
define('bgMagenta', [45, 49], 'bg')
|
|
96
|
-
define('bgCyan', [46, 49], 'bg')
|
|
97
|
-
define('bgWhite', [47, 49], 'bg')
|
|
98
|
-
|
|
99
|
-
define('blackBright', [90, 39], 'bright')
|
|
100
|
-
define('redBright', [91, 39], 'bright')
|
|
101
|
-
define('greenBright', [92, 39], 'bright')
|
|
102
|
-
define('yellowBright', [93, 39], 'bright')
|
|
103
|
-
define('blueBright', [94, 39], 'bright')
|
|
104
|
-
define('magentaBright', [95, 39], 'bright')
|
|
105
|
-
define('cyanBright', [96, 39], 'bright')
|
|
106
|
-
define('whiteBright', [97, 39], 'bright')
|
|
107
|
-
|
|
108
|
-
define('bgBlackBright', [100, 49], 'bgBright')
|
|
109
|
-
define('bgRedBright', [101, 49], 'bgBright')
|
|
110
|
-
define('bgGreenBright', [102, 49], 'bgBright')
|
|
111
|
-
define('bgYellowBright', [103, 49], 'bgBright')
|
|
112
|
-
define('bgBlueBright', [104, 49], 'bgBright')
|
|
113
|
-
define('bgMagentaBright', [105, 49], 'bgBright')
|
|
114
|
-
define('bgCyanBright', [106, 49], 'bgBright')
|
|
115
|
-
define('bgWhiteBright', [107, 49], 'bgBright')
|
|
116
|
-
|
|
117
|
-
colors.ansiRegex = ANSI_REGEX
|
|
118
|
-
colors.hasColor = colors.hasAnsi = (str) => {
|
|
119
|
-
colors.ansiRegex.lastIndex = 0
|
|
120
|
-
return typeof str === 'string' && str !== '' && colors.ansiRegex.test(str)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
colors.alias = (name, color) => {
|
|
124
|
-
let fn = typeof color === 'string' ? colors[color] : color
|
|
125
|
-
|
|
126
|
-
if (typeof fn !== 'function') {
|
|
127
|
-
throw new TypeError('Expected alias to be the name of an existing color (string) or a function')
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (!fn.stack) {
|
|
131
|
-
Reflect.defineProperty(fn, 'name', { value: name })
|
|
132
|
-
colors.styles[name] = fn
|
|
133
|
-
fn.stack = [name]
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
Reflect.defineProperty(colors, name, {
|
|
137
|
-
configurable: true,
|
|
138
|
-
enumerable: true,
|
|
139
|
-
set(value) {
|
|
140
|
-
colors.alias(name, value)
|
|
141
|
-
},
|
|
142
|
-
get() {
|
|
143
|
-
let color = (input) => style(input, color.stack)
|
|
144
|
-
Reflect.setPrototypeOf(color, colors)
|
|
145
|
-
color.stack = this.stack ? this.stack.concat(fn.stack) : fn.stack
|
|
146
|
-
return color
|
|
147
|
-
},
|
|
148
|
-
})
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
colors.theme = (custom) => {
|
|
152
|
-
if (!isObject(custom)) throw new TypeError('Expected theme to be an object')
|
|
153
|
-
for (let name of Object.keys(custom)) {
|
|
154
|
-
colors.alias(name, custom[name])
|
|
155
|
-
}
|
|
156
|
-
return colors
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
colors.alias('unstyle', (str) => {
|
|
160
|
-
if (typeof str === 'string' && str !== '') {
|
|
161
|
-
colors.ansiRegex.lastIndex = 0
|
|
162
|
-
return str.replace(colors.ansiRegex, '')
|
|
163
|
-
}
|
|
164
|
-
return ''
|
|
165
|
-
})
|
|
166
|
-
|
|
167
|
-
colors.alias('noop', (str) => str)
|
|
168
|
-
colors.none = colors.clear = colors.noop
|
|
169
|
-
|
|
170
|
-
colors.stripColor = colors.unstyle
|
|
171
|
-
colors.define = define
|
|
172
|
-
return colors
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
module.exports = create()
|
|
176
|
-
module.exports.create = create
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
-
|
|
3
|
-
import * as runtime from '@prisma/client/runtime/library'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* ## Prisma Client ʲˢ
|
|
7
|
-
*
|
|
8
|
-
* Type-safe database client for TypeScript & Node.js
|
|
9
|
-
* @example
|
|
10
|
-
* ```
|
|
11
|
-
* const prisma = new Prisma()
|
|
12
|
-
* // Fetch zero or more Users
|
|
13
|
-
* const users = await prisma.user.findMany()
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client).
|
|
18
|
-
*/
|
|
19
|
-
export declare const PrismaClient: any
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* ## Prisma Client ʲˢ
|
|
23
|
-
*
|
|
24
|
-
* Type-safe database client for TypeScript & Node.js
|
|
25
|
-
* @example
|
|
26
|
-
* ```
|
|
27
|
-
* const prisma = new Prisma()
|
|
28
|
-
* // Fetch zero or more Users
|
|
29
|
-
* const users = await prisma.user.findMany()
|
|
30
|
-
* ```
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client).
|
|
34
|
-
*/
|
|
35
|
-
export declare type PrismaClient = any
|
|
36
|
-
|
|
37
|
-
export declare class PrismaClientExtends<
|
|
38
|
-
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
|
|
39
|
-
> {
|
|
40
|
-
$extends: { extArgs: ExtArgs } & (<
|
|
41
|
-
R extends runtime.Types.Extensions.UserArgs['result'] = {},
|
|
42
|
-
M extends runtime.Types.Extensions.UserArgs['model'] = {},
|
|
43
|
-
Q extends runtime.Types.Extensions.UserArgs['query'] = {},
|
|
44
|
-
C extends runtime.Types.Extensions.UserArgs['client'] = {},
|
|
45
|
-
Args extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.InternalArgs<R, M, {}, C>,
|
|
46
|
-
>(
|
|
47
|
-
args:
|
|
48
|
-
| ((client: PrismaClientExtends<ExtArgs>) => { $extends: { extArgs: Args } })
|
|
49
|
-
| { name?: string }
|
|
50
|
-
| { result?: R & runtime.Types.Extensions.UserArgs['result'] }
|
|
51
|
-
| { model?: M & runtime.Types.Extensions.UserArgs['model'] }
|
|
52
|
-
| { query?: Q & runtime.Types.Extensions.UserArgs['query'] }
|
|
53
|
-
| { client?: C & runtime.Types.Extensions.UserArgs['client'] },
|
|
54
|
-
) => PrismaClientExtends<Args & ExtArgs> & Args['client'])
|
|
55
|
-
|
|
56
|
-
$transaction<R>(
|
|
57
|
-
fn: (prisma: Omit<this, runtime.ITXClientDenyList>) => Promise<R>,
|
|
58
|
-
options?: { maxWait?: number; timeout?: number; isolationLevel?: string },
|
|
59
|
-
): Promise<R>
|
|
60
|
-
$transaction<P extends Prisma.PrismaPromise<any>[]>(
|
|
61
|
-
arg: [...P],
|
|
62
|
-
options?: { isolationLevel?: string },
|
|
63
|
-
): Promise<runtime.Types.Utils.UnwrapTuple<P>>
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export declare const dmmf: any
|
|
67
|
-
export declare type dmmf = any
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Get the type of the value, that the Promise holds.
|
|
71
|
-
*/
|
|
72
|
-
export declare type PromiseType<T extends PromiseLike<any>> = T extends PromiseLike<infer U> ? U : T
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Get the return type of a function which returns a Promise.
|
|
76
|
-
*/
|
|
77
|
-
export declare type PromiseReturnType<T extends (...args: any) => Promise<any>> = PromiseType<ReturnType<T>>
|
|
78
|
-
|
|
79
|
-
export namespace Prisma {
|
|
80
|
-
export type TransactionClient = any
|
|
81
|
-
|
|
82
|
-
export function defineExtension<
|
|
83
|
-
R extends runtime.Types.Extensions.UserArgs['result'] = {},
|
|
84
|
-
M extends runtime.Types.Extensions.UserArgs['model'] = {},
|
|
85
|
-
Q extends runtime.Types.Extensions.UserArgs['query'] = {},
|
|
86
|
-
C extends runtime.Types.Extensions.UserArgs['client'] = {},
|
|
87
|
-
Args extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.InternalArgs<R, M, {}, C>,
|
|
88
|
-
>(
|
|
89
|
-
args:
|
|
90
|
-
| ((client: PrismaClientExtends) => { $extends: { extArgs: Args } })
|
|
91
|
-
| { name?: string }
|
|
92
|
-
| { result?: R & runtime.Types.Extensions.UserArgs['result'] }
|
|
93
|
-
| { model?: M & runtime.Types.Extensions.UserArgs['model'] }
|
|
94
|
-
| { query?: Q & runtime.Types.Extensions.UserArgs['query'] }
|
|
95
|
-
| { client?: C & runtime.Types.Extensions.UserArgs['client'] },
|
|
96
|
-
): (client: any) => PrismaClientExtends<Args>
|
|
97
|
-
|
|
98
|
-
export type Extension = runtime.Types.Extensions.UserArgs
|
|
99
|
-
export import getExtensionContext = runtime.Extensions.getExtensionContext
|
|
100
|
-
export import Args = runtime.Types.Public.Args
|
|
101
|
-
export import Payload = runtime.Types.Public.Payload
|
|
102
|
-
export import Result = runtime.Types.Public.Result
|
|
103
|
-
export import Exact = runtime.Types.Public.Exact
|
|
104
|
-
export import PrismaPromise = runtime.Types.Public.PrismaPromise
|
|
105
|
-
|
|
106
|
-
export const prismaVersion: {
|
|
107
|
-
client: string
|
|
108
|
-
engine: string
|
|
109
|
-
}
|
|
110
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
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
|
-
|
|
20
|
-
// src/scripts/default-index.ts
|
|
21
|
-
var default_index_exports = {};
|
|
22
|
-
__export(default_index_exports, {
|
|
23
|
-
Prisma: () => Prisma,
|
|
24
|
-
PrismaClient: () => PrismaClient,
|
|
25
|
-
default: () => default_index_default
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(default_index_exports);
|
|
28
|
-
|
|
29
|
-
// ../../node_modules/.pnpm/@prisma+engines-version@5.17.0-31.393aa359c9ad4a4bb28630fb5613f9c281cde053/node_modules/@prisma/engines-version/package.json
|
|
30
|
-
var prisma = {
|
|
31
|
-
enginesVersion: "393aa359c9ad4a4bb28630fb5613f9c281cde053"
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
// package.json
|
|
35
|
-
var version = "5.17.0";
|
|
36
|
-
|
|
37
|
-
// src/runtime/utils/clientVersion.ts
|
|
38
|
-
var clientVersion = version;
|
|
39
|
-
|
|
40
|
-
// src/scripts/default-index.ts
|
|
41
|
-
var PrismaClient = class {
|
|
42
|
-
constructor() {
|
|
43
|
-
throw new Error('@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.');
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
function defineExtension(ext) {
|
|
47
|
-
if (typeof ext === "function") {
|
|
48
|
-
return ext;
|
|
49
|
-
}
|
|
50
|
-
return (client) => client.$extends(ext);
|
|
51
|
-
}
|
|
52
|
-
function getExtensionContext(that) {
|
|
53
|
-
return that;
|
|
54
|
-
}
|
|
55
|
-
var Prisma = {
|
|
56
|
-
defineExtension,
|
|
57
|
-
getExtensionContext,
|
|
58
|
-
prismaVersion: { client: clientVersion, engine: prisma.enginesVersion }
|
|
59
|
-
};
|
|
60
|
-
var default_index_default = { Prisma };
|
|
61
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
62
|
-
0 && (module.exports = {
|
|
63
|
-
Prisma,
|
|
64
|
-
PrismaClient
|
|
65
|
-
});
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export function getPostInstallTrigger(): string
|
|
2
|
-
export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__EMPTY_STRING
|
|
3
|
-
export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING
|
|
4
|
-
export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR
|
|
5
|
-
export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR
|