prisma 7.10.0-dev.9 → 8.0.0-rc.3
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 +158 -201
- package/README.md +108 -58
- package/dist/deploy-framework-DHEGywve.js +23 -0
- package/dist/payload-B88Qvzxk-CrtTXSOe.js +34 -0
- package/dist/prisma.js +15586 -0
- package/dist/sender.js +192 -0
- package/package.json +48 -188
- package/build/child.js +0 -82915
- package/build/cli.js +0 -5748
- package/build/completion.js +0 -804
- package/build/index.js +0 -2
- package/build/prisma_schema_build_bg.wasm +0 -0
- package/build/query_compiler_fast_bg.cockroachdb.js +0 -2
- package/build/query_compiler_fast_bg.cockroachdb.mjs +0 -2
- package/build/query_compiler_fast_bg.cockroachdb.wasm +0 -0
- package/build/query_compiler_fast_bg.mysql.js +0 -2
- package/build/query_compiler_fast_bg.mysql.mjs +0 -2
- package/build/query_compiler_fast_bg.mysql.wasm +0 -0
- package/build/query_compiler_fast_bg.postgresql.js +0 -2
- package/build/query_compiler_fast_bg.postgresql.mjs +0 -2
- package/build/query_compiler_fast_bg.postgresql.wasm +0 -0
- package/build/query_compiler_fast_bg.sqlite.js +0 -2
- package/build/query_compiler_fast_bg.sqlite.mjs +0 -2
- package/build/query_compiler_fast_bg.sqlite.wasm +0 -0
- package/build/query_compiler_fast_bg.sqlserver.js +0 -2
- package/build/query_compiler_fast_bg.sqlserver.mjs +0 -2
- package/build/query_compiler_fast_bg.sqlserver.wasm +0 -0
- package/build/query_compiler_small_bg.cockroachdb.js +0 -2
- package/build/query_compiler_small_bg.cockroachdb.mjs +0 -2
- package/build/query_compiler_small_bg.cockroachdb.wasm +0 -0
- package/build/query_compiler_small_bg.mysql.js +0 -2
- package/build/query_compiler_small_bg.mysql.mjs +0 -2
- package/build/query_compiler_small_bg.mysql.wasm +0 -0
- package/build/query_compiler_small_bg.postgresql.js +0 -2
- package/build/query_compiler_small_bg.postgresql.mjs +0 -2
- package/build/query_compiler_small_bg.postgresql.wasm +0 -0
- package/build/query_compiler_small_bg.sqlite.js +0 -2
- package/build/query_compiler_small_bg.sqlite.mjs +0 -2
- package/build/query_compiler_small_bg.sqlite.wasm +0 -0
- package/build/query_compiler_small_bg.sqlserver.js +0 -2
- package/build/query_compiler_small_bg.sqlserver.mjs +0 -2
- package/build/query_compiler_small_bg.sqlserver.wasm +0 -0
- package/build/schema_engine_bg.wasm +0 -0
- package/build/studio.css +0 -5850
- package/build/studio.js +0 -373
- package/build/xdg-open +0 -1066
- package/config.d.ts +0 -1
- package/config.js +0 -30
- package/dist/cli/src/config.d.ts +0 -1
- package/dist/cli/src/types.d.ts +0 -1
- package/preinstall/index.js +0 -7
- package/scripts/preinstall-entry.js +0 -10
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region ../cli-telemetry/dist/payload-B88Qvzxk.js
|
|
2
|
+
function isNonEmptyString(value) {
|
|
3
|
+
return typeof value === "string" && value.length > 0;
|
|
4
|
+
}
|
|
5
|
+
function isStringArray(value) {
|
|
6
|
+
return Array.isArray(value) && value.every((entry) => typeof entry === "string");
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Runtime validation for {@link ParentToSenderPayload}. The child sender
|
|
10
|
+
* uses this before `postEvent` so a payload missing a required field
|
|
11
|
+
* cannot silently produce a degraded telemetry event downstream.
|
|
12
|
+
*
|
|
13
|
+
* Same semantics as the ORM CLI's arktype schema (this repo carries no
|
|
14
|
+
* arktype dependency, so the checks are spelled out): required scalars
|
|
15
|
+
* must be non-empty strings; the optional `databaseTarget` override is
|
|
16
|
+
* a `string` when present (no `null` — see the type's doc-block); the
|
|
17
|
+
* string array is validated element-by-element. Size caps are enforced
|
|
18
|
+
* by the backend, not here — IPC is structured-cloned and the
|
|
19
|
+
* parent/child agree on the schema by version-coupling.
|
|
20
|
+
*/
|
|
21
|
+
function isParentToSenderPayload(value) {
|
|
22
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
23
|
+
const record = value;
|
|
24
|
+
if (!isNonEmptyString(record.installationId)) return false;
|
|
25
|
+
if (!isNonEmptyString(record.version)) return false;
|
|
26
|
+
if (!isNonEmptyString(record.command)) return false;
|
|
27
|
+
if (!isStringArray(record.flags)) return false;
|
|
28
|
+
if (!isNonEmptyString(record.projectRoot)) return false;
|
|
29
|
+
if (!isNonEmptyString(record.endpoint)) return false;
|
|
30
|
+
if ("databaseTarget" in record && typeof record.databaseTarget !== "string") return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { isParentToSenderPayload as t };
|