@highstate/backend 0.9.26 → 0.9.28
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/{chunk-GJTMJQUW.js → chunk-QSHSXLO2.js} +18 -9
- package/dist/chunk-QSHSXLO2.js.map +1 -0
- package/dist/index.js +292 -132
- package/dist/index.js.map +1 -1
- package/dist/shared/index.js +1 -1
- package/package.json +3 -3
- package/prisma/backend/_schema/layout.prisma +3 -1
- package/prisma/backend/_schema/project.prisma +4 -2
- package/prisma/backend/_schema/unlock-method.prisma +19 -0
- package/prisma/backend/sqlite/migrations/{20250818082732_add_models → 20250928124105_initial_migration}/migration.sql +48 -16
- package/prisma/project/api-key.prisma +3 -1
- package/prisma/project/artifact.prisma +2 -2
- package/prisma/project/custom-status.prisma +1 -1
- package/prisma/project/layout.prisma +4 -0
- package/prisma/project/migrations/{20250816081310_initial → 20250928130725_initial_migration}/migration.sql +132 -46
- package/prisma/project/terminal.prisma +2 -2
- package/prisma/project/unlock-method.prisma +1 -1
- package/prisma/project/worker.prisma +1 -1
- package/src/business/backend-unlock.test.ts +133 -0
- package/src/business/backend-unlock.ts +76 -0
- package/src/business/index.ts +1 -0
- package/src/business/settings.test.ts +3 -2
- package/src/database/_generated/backend/postgresql/client.ts +9 -4
- package/src/database/_generated/backend/postgresql/internal/class.ts +147 -168
- package/src/database/_generated/backend/postgresql/internal/prismaNamespace.ts +127 -40
- package/src/database/_generated/backend/postgresql/models/BackendUnlockMethod.ts +1156 -0
- package/src/database/_generated/backend/postgresql/models/Project.ts +2 -2
- package/src/database/_generated/backend/postgresql/models/ProjectSpace.ts +7 -1
- package/src/database/_generated/backend/postgresql/models/UserWorkspaceLayout.ts +1067 -0
- package/src/database/_generated/backend/postgresql/models.ts +2 -1
- package/src/database/_generated/backend/sqlite/client.ts +9 -4
- package/src/database/_generated/backend/sqlite/internal/class.ts +146 -165
- package/src/database/_generated/backend/sqlite/internal/prismaNamespace.ts +127 -40
- package/src/database/_generated/backend/sqlite/models/BackendUnlockMethod.ts +1154 -0
- package/src/database/_generated/backend/sqlite/models/Project.ts +2 -2
- package/src/database/_generated/backend/sqlite/models/ProjectSpace.ts +7 -1
- package/src/database/_generated/backend/sqlite/models/UserWorkspaceLayout.ts +1065 -0
- package/src/database/_generated/backend/sqlite/models.ts +2 -1
- package/src/database/_generated/project/commonInputTypes.ts +26 -26
- package/src/database/_generated/project/internal/class.ts +7 -8
- package/src/database/_generated/project/internal/prismaNamespace.ts +8 -7
- package/src/database/_generated/project/models/ApiKey.ts +2 -0
- package/src/database/_generated/project/models/Artifact.ts +2 -2
- package/src/database/_generated/project/models/InstanceCustomStatus.ts +1 -1
- package/src/database/_generated/project/models/OperationLog.ts +49 -1
- package/src/database/_generated/project/models/UnlockMethod.ts +2 -2
- package/src/database/_generated/project/models/UserCompositeViewport.ts +16 -14
- package/src/database/_generated/project/models/UserProjectViewport.ts +11 -9
- package/src/database/_generated/project/models/WorkerVersion.ts +1 -5
- package/src/database/abstractions.ts +25 -3
- package/src/database/factory.ts +5 -6
- package/src/database/local/backend.ts +148 -18
- package/src/database/manager.ts +30 -2
- package/src/database/prisma.ts +1 -0
- package/src/orchestrator/operation-plan.ts +0 -19
- package/src/orchestrator/operation.ts +21 -4
- package/src/services.ts +12 -3
- package/src/shared/models/backend/unlock-method.ts +7 -13
- package/src/shared/models/errors.ts +14 -0
- package/src/shared/models/prisma.ts +10 -2
- package/src/test-utils/database.ts +34 -6
- package/dist/chunk-GJTMJQUW.js.map +0 -1
- package/prisma/backend/sqlite/migrations/20250817070609_initiial/migration.sql +0 -34
- package/prisma/backend/sqlite/migrations/20250817104948_add_fields/migration.sql +0 -59
- package/prisma/backend/sqlite/migrations/20250818083106_a/migration.sql +0 -19
- package/prisma/backend/sqlite/migrations/20250818101945_hi/migration.sql +0 -1
- package/prisma/backend/sqlite/migrations/20250819082315_a/migration.sql +0 -5
- package/prisma/project/migrations/20250816082523_test/migration.sql +0 -72
- package/prisma/project/migrations/20250818065643_update/migration.sql +0 -42
- package/prisma/project/migrations/20250818070758_a/migration.sql +0 -8
- package/prisma/project/migrations/20250818070913_a/migration.sql +0 -8
- package/prisma/project/migrations/20250818082720_add_motels/migration.sql +0 -11
- package/prisma/project/migrations/20250818112523_hello/migration.sql +0 -35
- package/prisma/project/migrations/20250819082305_a/migration.sql +0 -14
- package/prisma/project/migrations/20250819165004_add_missing_fields/migration.sql +0 -216
- package/prisma/project/migrations/20250819171309_a/migration.sql +0 -22
- package/prisma/project/migrations/20250820113949_a/migration.sql +0 -66
- package/prisma/project/migrations/20250820144256_b/migration.sql +0 -31
- package/prisma/project/migrations/20250820145547_a/migration.sql +0 -24
- package/prisma/project/migrations/20250820182517_b/migration.sql +0 -2
- package/prisma/project/migrations/20250821172324_a/migration.sql +0 -2
- package/prisma/project/migrations/20250822081339_a/migration.sql +0 -219
- package/prisma/project/migrations/20250822083742_b/migration.sql +0 -1
- package/prisma/project/migrations/20250822105134_boom/migration.sql +0 -1
- package/prisma/project/migrations/20250822141028_b/migration.sql +0 -1
- package/prisma/project/migrations/20250822142342_b/migration.sql +0 -16
- package/prisma/project/migrations/20250824072720_a/migration.sql +0 -1
- package/prisma/project/migrations/20250824093656_b/migration.sql +0 -21
- package/prisma/project/migrations/20250825082518_a/migration.sql +0 -1
- package/prisma/project/migrations/20250825085343_b/migration.sql +0 -1
- package/prisma/project/migrations/20250825091312_a/migration.sql +0 -1
- package/prisma/project/migrations/20250903095431_hi/migration.sql +0 -44
- package/prisma/project/migrations/20250903174255_a/migration.sql +0 -24
- package/prisma/project/migrations/20250908095205_hi/migration.sql +0 -18
- package/prisma/project/migrations/20250909155857_hi/migration.sql +0 -15
- package/prisma/project/migrations/20250921092621_b/migration.sql +0 -33
- package/prisma/project/migrations/20250921093911_b/migration.sql +0 -1
- package/src/database/_generated/backend/postgresql/models/UserWorkspaseLayout.ts +0 -1065
- package/src/database/_generated/backend/sqlite/models/UserWorkspaseLayout.ts +0 -1063
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
|
|
1
2
|
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
2
3
|
/* eslint-disable */
|
|
3
|
-
// @ts-nocheck
|
|
4
|
+
// @ts-nocheck
|
|
4
5
|
/**
|
|
5
6
|
* WARNING: This is an internal file that is subject to change!
|
|
6
7
|
*
|
|
@@ -12,71 +13,72 @@
|
|
|
12
13
|
import * as runtime from "@prisma/client/runtime/client"
|
|
13
14
|
import type * as Prisma from "./prismaNamespace.ts"
|
|
14
15
|
|
|
16
|
+
|
|
15
17
|
const config: runtime.GetPrismaClientConfig = {
|
|
16
|
-
generator: {
|
|
17
|
-
name: "client",
|
|
18
|
-
provider: {
|
|
19
|
-
fromEnvVar: null,
|
|
20
|
-
value: "prisma-client"
|
|
18
|
+
"generator": {
|
|
19
|
+
"name": "client",
|
|
20
|
+
"provider": {
|
|
21
|
+
"fromEnvVar": null,
|
|
22
|
+
"value": "prisma-client"
|
|
21
23
|
},
|
|
22
|
-
output: {
|
|
23
|
-
value:
|
|
24
|
-
|
|
25
|
-
fromEnvVar: null,
|
|
24
|
+
"output": {
|
|
25
|
+
"value": "/home/exeteres/Projects/personal/highstate/packages/platform/backend/src/database/_generated/backend/postgresql",
|
|
26
|
+
"fromEnvVar": null
|
|
26
27
|
},
|
|
27
|
-
config: {
|
|
28
|
-
|
|
29
|
-
generatedFileExtension: "ts",
|
|
30
|
-
|
|
31
|
-
engineType: "client"
|
|
28
|
+
"config": {
|
|
29
|
+
"moduleFormat": "esm",
|
|
30
|
+
"generatedFileExtension": "ts",
|
|
31
|
+
"importFileExtension": "ts",
|
|
32
|
+
"engineType": "client"
|
|
32
33
|
},
|
|
33
|
-
binaryTargets: [
|
|
34
|
+
"binaryTargets": [
|
|
34
35
|
{
|
|
35
|
-
fromEnvVar: null,
|
|
36
|
-
value: "linux-nixos",
|
|
37
|
-
native: true
|
|
38
|
-
}
|
|
36
|
+
"fromEnvVar": null,
|
|
37
|
+
"value": "linux-nixos",
|
|
38
|
+
"native": true
|
|
39
|
+
}
|
|
39
40
|
],
|
|
40
|
-
previewFeatures: [
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
41
|
+
"previewFeatures": [
|
|
42
|
+
"driverAdapters",
|
|
43
|
+
"queryCompiler"
|
|
44
|
+
],
|
|
45
|
+
"sourceFilePath": "/home/exeteres/Projects/personal/highstate/packages/platform/backend/prisma/backend/postgresql/main.prisma",
|
|
46
|
+
"isCustomOutput": true
|
|
44
47
|
},
|
|
45
|
-
relativePath: "../../../../../prisma/backend/postgresql",
|
|
46
|
-
clientVersion: "6.14.0",
|
|
47
|
-
engineVersion: "717184b7b35ea05dfa71a3236b7af656013e1e49",
|
|
48
|
-
datasourceNames: [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
48
|
+
"relativePath": "../../../../../prisma/backend/postgresql",
|
|
49
|
+
"clientVersion": "6.14.0",
|
|
50
|
+
"engineVersion": "717184b7b35ea05dfa71a3236b7af656013e1e49",
|
|
51
|
+
"datasourceNames": [
|
|
52
|
+
"db"
|
|
53
|
+
],
|
|
54
|
+
"activeProvider": "postgresql",
|
|
55
|
+
"postinstall": false,
|
|
56
|
+
"inlineDatasources": {
|
|
57
|
+
"db": {
|
|
58
|
+
"url": {
|
|
59
|
+
"fromEnvVar": "HIGHSTATE_MIGRATION_DATABASE_URL",
|
|
60
|
+
"value": null
|
|
61
|
+
}
|
|
62
|
+
}
|
|
58
63
|
},
|
|
59
|
-
inlineSchema:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
types: {},
|
|
64
|
+
"inlineSchema": "model UserWorkspaceLayout {\n /// The opaque ID of the user to which this layout belongs.\n userId String @id\n\n /// The layout of the user workspace managed by the frontend.\n ///\n /// ![unknown]\n layout Json\n}\n\nmodel Library {\n /// The CUIDv2 of the library.\n id String @id @default(cuid(2))\n\n /// The metadata of the library managed by the backend.\n ///\n /// [CommonObjectMeta]\n meta Json\n\n /// The spec of the library.\n ///\n /// [LibrarySpec]\n spec Json\n\n /// The projects using this library.\n projects Project[]\n}\n\nmodel Project {\n /// The CUIDv2 of the project.\n id String @id @default(cuid(2))\n\n /// Project meta managed by the backend.\n ///\n /// [CommonObjectMeta]\n meta Json\n\n /// The name of the project within the space.\n name String\n\n /// The ID of the project space this project belongs to.\n spaceId String\n\n /// The ID of the project model storage this project uses.\n modelStorageId String\n\n /// The ID of the library used by this project.\n libraryId String\n\n /// The ID of the Pulumi backend used by this project.\n pulumiBackendId String\n\n /// Encrypted project master key in AGE format.\n encryptedMasterKey String\n\n /// The unlock suite for this project.\n ///\n /// [ProjectUnlockSuite]\n unlockSuite Json\n\n /// The current version of the project database.\n /// This is used to determine if the project needs to be migrated.\n databaseVersion Int\n\n /// The time when the project was created.\n createdAt DateTime @default(now())\n\n /// The time when the project was last updated.\n updatedAt DateTime @updatedAt\n\n /// The project space this project belongs to.\n space ProjectSpace @relation(fields: [spaceId], references: [id])\n\n /// The project model storage this project uses.\n modelStorage ProjectModelStorage @relation(fields: [modelStorageId], references: [id])\n\n /// The library used by this project.\n library Library @relation(fields: [libraryId], references: [id])\n\n /// The Pulumi backend used by this project.\n pulumiBackend PulumiBackend @relation(fields: [pulumiBackendId], references: [id])\n\n @@unique([spaceId, name])\n}\n\nmodel ProjectSpace {\n /// The CUIDv2 of the project space.\n id String @id @default(cuid(2))\n\n /// The name of the project space within the parent space.\n ///\n /// Will be null for the global project space.\n name String?\n\n /// The ID of the parent project space, if any.\n parentId String?\n\n /// The metadata of the project space managed by the backend.\n ///\n /// [CommonObjectMeta]\n meta Json\n\n /// The projects in this project space.\n projects Project[]\n\n /// The parent project space, if any.\n parent ProjectSpace? @relation(\"ProjectSpaceHierarchy\", fields: [parentId], references: [id])\n\n /// The child project spaces, if any.\n children ProjectSpace[] @relation(\"ProjectSpaceHierarchy\")\n\n @@unique([parentId, name])\n}\n\nmodel ProjectModelStorage {\n /// The CUIDv2 of the project model storage.\n id String @id @default(cuid(2))\n\n /// The metadata of the project model storage managed by the backend.\n ///\n /// [CommonObjectMeta]\n meta Json\n\n /// The specification of the project model storage.\n ///\n /// [ProjectModelStorageSpec]\n spec Json\n\n /// The projects using this model storage.\n projects Project[]\n}\n\nmodel PulumiBackend {\n /// The CUIDv2 of the Pulumi backend.\n id String @id @default(cuid(2))\n\n /// The backend meta managed by the backend.\n ///\n /// [CommonObjectMeta]\n meta Json\n\n /// The spec of the Pulumi backend.\n ///\n /// [PulumiBackendSpec]\n spec Json\n\n /// The projects using this backend.\n projects Project[]\n}\n\n/// Unlock methods describe trusted identities that can decrypt the backend master key.\nmodel BackendUnlockMethod {\n /// The CUIDv2 of the unlock method.\n id String @id @default(cuid(2))\n\n /// The metadata of the unlock method managed by the backend.\n /// \n /// [BackendUnlockMethodMeta]\n meta Json\n\n /// The AGE recipient for this unlock method.\n recipient String @unique\n\n /// The time when the unlock method was created.\n createdAt DateTime @default(now())\n\n /// The time when the unlock method was last updated.\n updatedAt DateTime @updatedAt\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"HIGHSTATE_MIGRATION_DATABASE_URL\")\n}\n\ngenerator client {\n provider = \"prisma-client\"\n previewFeatures = [\"queryCompiler\", \"driverAdapters\"]\n output = \"../../../src/database/_generated/backend/postgresql\"\n moduleFormat = \"esm\"\n generatedFileExtension = \"ts\"\n importFileExtension = \"ts\"\n}\n\ngenerator json {\n provider = \"prisma-json-types-generator\"\n}\n",
|
|
65
|
+
"inlineSchemaHash": "da1dbb64b6c731ded11a88c53a02bc985f6d5732acc37035289eded446f9fbcc",
|
|
66
|
+
"copyEngine": true,
|
|
67
|
+
"runtimeDataModel": {
|
|
68
|
+
"models": {},
|
|
69
|
+
"enums": {},
|
|
70
|
+
"types": {}
|
|
67
71
|
},
|
|
68
|
-
dirname: ""
|
|
72
|
+
"dirname": ""
|
|
69
73
|
}
|
|
70
74
|
|
|
71
|
-
config.runtimeDataModel = JSON.parse(
|
|
72
|
-
'{"models":{"UserWorkspaseLayout":{"fields":[{"name":"userId","kind":"scalar","type":"String"},{"name":"layout","kind":"scalar","type":"Json"}],"dbName":null},"Library":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"meta","kind":"scalar","type":"Json"},{"name":"spec","kind":"scalar","type":"Json"},{"name":"projects","kind":"object","type":"Project","relationName":"LibraryToProject"}],"dbName":null},"Project":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"meta","kind":"scalar","type":"Json"},{"name":"name","kind":"scalar","type":"String"},{"name":"spaceId","kind":"scalar","type":"String"},{"name":"modelStorageId","kind":"scalar","type":"String"},{"name":"libraryId","kind":"scalar","type":"String"},{"name":"pulumiBackendId","kind":"scalar","type":"String"},{"name":"encryptedMasterKey","kind":"scalar","type":"String"},{"name":"unlockSuite","kind":"scalar","type":"Json"},{"name":"databaseVersion","kind":"scalar","type":"Int"},{"name":"createdAt","kind":"scalar","type":"DateTime"},{"name":"updatedAt","kind":"scalar","type":"DateTime"},{"name":"space","kind":"object","type":"ProjectSpace","relationName":"ProjectToProjectSpace"},{"name":"modelStorage","kind":"object","type":"ProjectModelStorage","relationName":"ProjectToProjectModelStorage"},{"name":"library","kind":"object","type":"Library","relationName":"LibraryToProject"},{"name":"pulumiBackend","kind":"object","type":"PulumiBackend","relationName":"ProjectToPulumiBackend"}],"dbName":null},"ProjectSpace":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"parentId","kind":"scalar","type":"String"},{"name":"meta","kind":"scalar","type":"Json"},{"name":"projects","kind":"object","type":"Project","relationName":"ProjectToProjectSpace"},{"name":"parent","kind":"object","type":"ProjectSpace","relationName":"ProjectSpaceHierarchy"},{"name":"children","kind":"object","type":"ProjectSpace","relationName":"ProjectSpaceHierarchy"}],"dbName":null},"ProjectModelStorage":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"meta","kind":"scalar","type":"Json"},{"name":"spec","kind":"scalar","type":"Json"},{"name":"projects","kind":"object","type":"Project","relationName":"ProjectToProjectModelStorage"}],"dbName":null},"PulumiBackend":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"meta","kind":"scalar","type":"Json"},{"name":"spec","kind":"scalar","type":"Json"},{"name":"projects","kind":"object","type":"Project","relationName":"ProjectToPulumiBackend"}],"dbName":null}},"enums":{},"types":{}}',
|
|
73
|
-
)
|
|
75
|
+
config.runtimeDataModel = JSON.parse("{\"models\":{\"UserWorkspaceLayout\":{\"fields\":[{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"layout\",\"kind\":\"scalar\",\"type\":\"Json\"}],\"dbName\":null},\"Library\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"spec\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"projects\",\"kind\":\"object\",\"type\":\"Project\",\"relationName\":\"LibraryToProject\"}],\"dbName\":null},\"Project\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"spaceId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"modelStorageId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"libraryId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"pulumiBackendId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"encryptedMasterKey\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unlockSuite\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"databaseVersion\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"space\",\"kind\":\"object\",\"type\":\"ProjectSpace\",\"relationName\":\"ProjectToProjectSpace\"},{\"name\":\"modelStorage\",\"kind\":\"object\",\"type\":\"ProjectModelStorage\",\"relationName\":\"ProjectToProjectModelStorage\"},{\"name\":\"library\",\"kind\":\"object\",\"type\":\"Library\",\"relationName\":\"LibraryToProject\"},{\"name\":\"pulumiBackend\",\"kind\":\"object\",\"type\":\"PulumiBackend\",\"relationName\":\"ProjectToPulumiBackend\"}],\"dbName\":null},\"ProjectSpace\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"parentId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"projects\",\"kind\":\"object\",\"type\":\"Project\",\"relationName\":\"ProjectToProjectSpace\"},{\"name\":\"parent\",\"kind\":\"object\",\"type\":\"ProjectSpace\",\"relationName\":\"ProjectSpaceHierarchy\"},{\"name\":\"children\",\"kind\":\"object\",\"type\":\"ProjectSpace\",\"relationName\":\"ProjectSpaceHierarchy\"}],\"dbName\":null},\"ProjectModelStorage\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"spec\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"projects\",\"kind\":\"object\",\"type\":\"Project\",\"relationName\":\"ProjectToProjectModelStorage\"}],\"dbName\":null},\"PulumiBackend\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"spec\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"projects\",\"kind\":\"object\",\"type\":\"Project\",\"relationName\":\"ProjectToPulumiBackend\"}],\"dbName\":null},\"BackendUnlockMethod\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"recipient\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}")
|
|
74
76
|
config.engineWasm = undefined
|
|
75
77
|
|
|
76
78
|
async function decodeBase64AsWasm(wasmBase64: string): Promise<WebAssembly.Module> {
|
|
77
|
-
const { Buffer } = await import(
|
|
78
|
-
const base64Data = wasmBase64.replace(
|
|
79
|
-
const wasmArray = new Uint8Array(Buffer.from(base64Data,
|
|
79
|
+
const { Buffer } = await import('node:buffer')
|
|
80
|
+
const base64Data = wasmBase64.replace('data:application/wasm;base64,', '')
|
|
81
|
+
const wasmArray = new Uint8Array(Buffer.from(base64Data, 'base64'))
|
|
80
82
|
return new WebAssembly.Module(wasmArray)
|
|
81
83
|
}
|
|
82
84
|
|
|
@@ -84,85 +86,74 @@ config.compilerWasm = {
|
|
|
84
86
|
getRuntime: async () => await import("@prisma/client/runtime/query_compiler_bg.postgresql.mjs"),
|
|
85
87
|
|
|
86
88
|
getQueryCompilerWasmModule: async () => {
|
|
87
|
-
const { wasm } = await import(
|
|
88
|
-
"@prisma/client/runtime/query_compiler_bg.postgresql.wasm-base64.mjs"
|
|
89
|
-
)
|
|
89
|
+
const { wasm } = await import("@prisma/client/runtime/query_compiler_bg.postgresql.wasm-base64.mjs")
|
|
90
90
|
return await decodeBase64AsWasm(wasm)
|
|
91
|
-
}
|
|
91
|
+
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
94
97
|
export type LogOptions<ClientOptions extends Prisma.PrismaClientOptions> =
|
|
95
|
-
|
|
96
|
-
? ClientOptions["log"] extends Array<Prisma.LogLevel | Prisma.LogDefinition>
|
|
97
|
-
? Prisma.GetEvents<ClientOptions["log"]>
|
|
98
|
-
: never
|
|
99
|
-
: never
|
|
98
|
+
'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<ClientOptions['log']> : never : never
|
|
100
99
|
|
|
101
100
|
export interface PrismaClientConstructor {
|
|
102
|
-
|
|
101
|
+
/**
|
|
103
102
|
* ## Prisma Client
|
|
104
|
-
*
|
|
103
|
+
*
|
|
105
104
|
* Type-safe database client for TypeScript
|
|
106
105
|
* @example
|
|
107
106
|
* ```
|
|
108
107
|
* const prisma = new PrismaClient()
|
|
109
|
-
* // Fetch zero or more
|
|
110
|
-
* const
|
|
108
|
+
* // Fetch zero or more UserWorkspaceLayouts
|
|
109
|
+
* const userWorkspaceLayouts = await prisma.userWorkspaceLayout.findMany()
|
|
111
110
|
* ```
|
|
112
|
-
*
|
|
111
|
+
*
|
|
113
112
|
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
|
|
114
113
|
*/
|
|
115
114
|
|
|
116
115
|
new <
|
|
117
116
|
Options extends Prisma.PrismaClientOptions,
|
|
118
117
|
LogOpts extends LogOptions<Options>,
|
|
119
|
-
OmitOpts extends Prisma.PrismaClientOptions[
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
|
|
123
|
-
>(
|
|
124
|
-
options?: Prisma.Subset<Options, Prisma.PrismaClientOptions>,
|
|
125
|
-
): PrismaClient<LogOpts, OmitOpts, ExtArgs>
|
|
118
|
+
OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'],
|
|
119
|
+
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
|
|
120
|
+
>(options?: Prisma.Subset<Options, Prisma.PrismaClientOptions> ): PrismaClient<LogOpts, OmitOpts, ExtArgs>
|
|
126
121
|
}
|
|
127
122
|
|
|
128
123
|
/**
|
|
129
124
|
* ## Prisma Client
|
|
130
|
-
*
|
|
125
|
+
*
|
|
131
126
|
* Type-safe database client for TypeScript
|
|
132
127
|
* @example
|
|
133
128
|
* ```
|
|
134
129
|
* const prisma = new PrismaClient()
|
|
135
|
-
* // Fetch zero or more
|
|
136
|
-
* const
|
|
130
|
+
* // Fetch zero or more UserWorkspaceLayouts
|
|
131
|
+
* const userWorkspaceLayouts = await prisma.userWorkspaceLayout.findMany()
|
|
137
132
|
* ```
|
|
138
|
-
*
|
|
133
|
+
*
|
|
139
134
|
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
|
|
140
135
|
*/
|
|
141
136
|
|
|
142
137
|
export interface PrismaClient<
|
|
143
138
|
in LogOpts extends Prisma.LogLevel = never,
|
|
144
|
-
in out OmitOpts extends Prisma.PrismaClientOptions[
|
|
145
|
-
in out ExtArgs extends
|
|
146
|
-
runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
|
|
139
|
+
in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = Prisma.PrismaClientOptions['omit'],
|
|
140
|
+
in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
|
|
147
141
|
> {
|
|
148
|
-
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>[
|
|
142
|
+
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
|
|
149
143
|
|
|
150
|
-
$on<V extends LogOpts>(
|
|
151
|
-
eventType: V,
|
|
152
|
-
callback: (event: V extends "query" ? Prisma.QueryEvent : Prisma.LogEvent) => void,
|
|
153
|
-
): PrismaClient
|
|
144
|
+
$on<V extends LogOpts>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;
|
|
154
145
|
|
|
155
146
|
/**
|
|
156
147
|
* Connect with the database
|
|
157
148
|
*/
|
|
158
|
-
$connect(): runtime.Types.Utils.JsPromise<void
|
|
149
|
+
$connect(): runtime.Types.Utils.JsPromise<void>;
|
|
159
150
|
|
|
160
151
|
/**
|
|
161
152
|
* Disconnect from the database
|
|
162
153
|
*/
|
|
163
|
-
$disconnect(): runtime.Types.Utils.JsPromise<void
|
|
154
|
+
$disconnect(): runtime.Types.Utils.JsPromise<void>;
|
|
164
155
|
|
|
165
|
-
|
|
156
|
+
/**
|
|
166
157
|
* Executes a prepared raw query and returns the number of affected rows.
|
|
167
158
|
* @example
|
|
168
159
|
* ```
|
|
@@ -171,10 +162,7 @@ export interface PrismaClient<
|
|
|
171
162
|
*
|
|
172
163
|
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
|
|
173
164
|
*/
|
|
174
|
-
$executeRaw<T = unknown>(
|
|
175
|
-
query: TemplateStringsArray | Prisma.Sql,
|
|
176
|
-
...values: any[]
|
|
177
|
-
): Prisma.PrismaPromise<number>
|
|
165
|
+
$executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;
|
|
178
166
|
|
|
179
167
|
/**
|
|
180
168
|
* Executes a raw query and returns the number of affected rows.
|
|
@@ -186,7 +174,7 @@ export interface PrismaClient<
|
|
|
186
174
|
*
|
|
187
175
|
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
|
|
188
176
|
*/
|
|
189
|
-
$executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number
|
|
177
|
+
$executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;
|
|
190
178
|
|
|
191
179
|
/**
|
|
192
180
|
* Performs a prepared raw query and returns the `SELECT` data.
|
|
@@ -197,10 +185,7 @@ export interface PrismaClient<
|
|
|
197
185
|
*
|
|
198
186
|
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
|
|
199
187
|
*/
|
|
200
|
-
$queryRaw<T = unknown>(
|
|
201
|
-
query: TemplateStringsArray | Prisma.Sql,
|
|
202
|
-
...values: any[]
|
|
203
|
-
): Prisma.PrismaPromise<T>
|
|
188
|
+
$queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;
|
|
204
189
|
|
|
205
190
|
/**
|
|
206
191
|
* Performs a raw query and returns the `SELECT` data.
|
|
@@ -212,7 +197,8 @@ export interface PrismaClient<
|
|
|
212
197
|
*
|
|
213
198
|
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
|
|
214
199
|
*/
|
|
215
|
-
$queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T
|
|
200
|
+
$queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;
|
|
201
|
+
|
|
216
202
|
|
|
217
203
|
/**
|
|
218
204
|
* Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
|
|
@@ -224,94 +210,87 @@ export interface PrismaClient<
|
|
|
224
210
|
* prisma.user.create({ data: { name: 'Alice' } }),
|
|
225
211
|
* ])
|
|
226
212
|
* ```
|
|
227
|
-
*
|
|
213
|
+
*
|
|
228
214
|
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
|
|
229
215
|
*/
|
|
230
|
-
$transaction<P extends Prisma.PrismaPromise<any>[]>(
|
|
231
|
-
arg: [...P],
|
|
232
|
-
options?: { isolationLevel?: Prisma.TransactionIsolationLevel },
|
|
233
|
-
): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>
|
|
234
|
-
|
|
235
|
-
$transaction<R>(
|
|
236
|
-
fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => runtime.Types.Utils.JsPromise<R>,
|
|
237
|
-
options?: {
|
|
238
|
-
maxWait?: number
|
|
239
|
-
timeout?: number
|
|
240
|
-
isolationLevel?: Prisma.TransactionIsolationLevel
|
|
241
|
-
},
|
|
242
|
-
): runtime.Types.Utils.JsPromise<R>
|
|
243
|
-
|
|
244
|
-
$extends: runtime.Types.Extensions.ExtendsHook<
|
|
245
|
-
"extends",
|
|
246
|
-
Prisma.TypeMapCb<OmitOpts>,
|
|
247
|
-
ExtArgs,
|
|
248
|
-
runtime.Types.Utils.Call<
|
|
249
|
-
Prisma.TypeMapCb<OmitOpts>,
|
|
250
|
-
{
|
|
251
|
-
extArgs: ExtArgs
|
|
252
|
-
}
|
|
253
|
-
>
|
|
254
|
-
>
|
|
216
|
+
$transaction<P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>
|
|
255
217
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
218
|
+
$transaction<R>(fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => runtime.Types.Utils.JsPromise<R>, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<R>
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
$extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb<OmitOpts>, ExtArgs, runtime.Types.Utils.Call<Prisma.TypeMapCb<OmitOpts>, {
|
|
222
|
+
extArgs: ExtArgs
|
|
223
|
+
}>>
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* `prisma.userWorkspaceLayout`: Exposes CRUD operations for the **UserWorkspaceLayout** model.
|
|
227
|
+
* Example usage:
|
|
228
|
+
* ```ts
|
|
229
|
+
* // Fetch zero or more UserWorkspaceLayouts
|
|
230
|
+
* const userWorkspaceLayouts = await prisma.userWorkspaceLayout.findMany()
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
get userWorkspaceLayout(): Prisma.UserWorkspaceLayoutDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
265
234
|
|
|
266
235
|
/**
|
|
267
236
|
* `prisma.library`: Exposes CRUD operations for the **Library** model.
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
get library(): Prisma.LibraryDelegate<ExtArgs, { omit: OmitOpts }
|
|
237
|
+
* Example usage:
|
|
238
|
+
* ```ts
|
|
239
|
+
* // Fetch zero or more Libraries
|
|
240
|
+
* const libraries = await prisma.library.findMany()
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
get library(): Prisma.LibraryDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
275
244
|
|
|
276
245
|
/**
|
|
277
246
|
* `prisma.project`: Exposes CRUD operations for the **Project** model.
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
get project(): Prisma.ProjectDelegate<ExtArgs, { omit: OmitOpts }
|
|
247
|
+
* Example usage:
|
|
248
|
+
* ```ts
|
|
249
|
+
* // Fetch zero or more Projects
|
|
250
|
+
* const projects = await prisma.project.findMany()
|
|
251
|
+
* ```
|
|
252
|
+
*/
|
|
253
|
+
get project(): Prisma.ProjectDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
285
254
|
|
|
286
255
|
/**
|
|
287
256
|
* `prisma.projectSpace`: Exposes CRUD operations for the **ProjectSpace** model.
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
get projectSpace(): Prisma.ProjectSpaceDelegate<ExtArgs, { omit: OmitOpts }
|
|
257
|
+
* Example usage:
|
|
258
|
+
* ```ts
|
|
259
|
+
* // Fetch zero or more ProjectSpaces
|
|
260
|
+
* const projectSpaces = await prisma.projectSpace.findMany()
|
|
261
|
+
* ```
|
|
262
|
+
*/
|
|
263
|
+
get projectSpace(): Prisma.ProjectSpaceDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
295
264
|
|
|
296
265
|
/**
|
|
297
266
|
* `prisma.projectModelStorage`: Exposes CRUD operations for the **ProjectModelStorage** model.
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
get projectModelStorage(): Prisma.ProjectModelStorageDelegate<ExtArgs, { omit: OmitOpts }
|
|
267
|
+
* Example usage:
|
|
268
|
+
* ```ts
|
|
269
|
+
* // Fetch zero or more ProjectModelStorages
|
|
270
|
+
* const projectModelStorages = await prisma.projectModelStorage.findMany()
|
|
271
|
+
* ```
|
|
272
|
+
*/
|
|
273
|
+
get projectModelStorage(): Prisma.ProjectModelStorageDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
305
274
|
|
|
306
275
|
/**
|
|
307
276
|
* `prisma.pulumiBackend`: Exposes CRUD operations for the **PulumiBackend** model.
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
get pulumiBackend(): Prisma.PulumiBackendDelegate<ExtArgs, { omit: OmitOpts }
|
|
277
|
+
* Example usage:
|
|
278
|
+
* ```ts
|
|
279
|
+
* // Fetch zero or more PulumiBackends
|
|
280
|
+
* const pulumiBackends = await prisma.pulumiBackend.findMany()
|
|
281
|
+
* ```
|
|
282
|
+
*/
|
|
283
|
+
get pulumiBackend(): Prisma.PulumiBackendDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* `prisma.backendUnlockMethod`: Exposes CRUD operations for the **BackendUnlockMethod** model.
|
|
287
|
+
* Example usage:
|
|
288
|
+
* ```ts
|
|
289
|
+
* // Fetch zero or more BackendUnlockMethods
|
|
290
|
+
* const backendUnlockMethods = await prisma.backendUnlockMethod.findMany()
|
|
291
|
+
* ```
|
|
292
|
+
*/
|
|
293
|
+
get backendUnlockMethod(): Prisma.BackendUnlockMethodDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
315
294
|
}
|
|
316
295
|
|
|
317
296
|
export function getPrismaClientClass(dirname: string): PrismaClientConstructor {
|