@highstate/backend 0.17.0 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/{chunk-JT4KWE3B.js → chunk-V2NILDHS.js} +3 -2
  2. package/dist/chunk-V2NILDHS.js.map +1 -0
  3. package/dist/highstate.manifest.json +3 -4
  4. package/dist/index.js +190 -280
  5. package/dist/index.js.map +1 -1
  6. package/dist/shared/index.js +1 -1
  7. package/package.json +9 -10
  8. package/prisma/backend/postgresql/main.prisma +0 -2
  9. package/prisma/backend/sqlite/main.prisma +0 -2
  10. package/prisma/project/main.prisma +0 -1
  11. package/src/business/project.ts +1 -2
  12. package/src/database/_generated/backend/postgresql/browser.ts +54 -0
  13. package/src/database/_generated/backend/postgresql/client.ts +7 -8
  14. package/src/database/_generated/backend/postgresql/commonInputTypes.ts +3 -2
  15. package/src/database/_generated/backend/postgresql/enums.ts +3 -1
  16. package/src/database/_generated/backend/postgresql/internal/class.ts +24 -71
  17. package/src/database/_generated/backend/postgresql/internal/prismaNamespace.ts +41 -43
  18. package/src/database/_generated/backend/postgresql/internal/prismaNamespaceBrowser.ts +191 -0
  19. package/src/database/_generated/backend/postgresql/models/BackendUnlockMethod.ts +12 -11
  20. package/src/database/_generated/backend/postgresql/models/Library.ts +29 -28
  21. package/src/database/_generated/backend/postgresql/models/Project.ts +69 -68
  22. package/src/database/_generated/backend/postgresql/models/ProjectModelStorage.ts +29 -28
  23. package/src/database/_generated/backend/postgresql/models/ProjectSpace.ts +26 -25
  24. package/src/database/_generated/backend/postgresql/models/PulumiBackend.ts +29 -28
  25. package/src/database/_generated/backend/postgresql/models/UserWorkspaceLayout.ts +12 -11
  26. package/src/database/_generated/backend/postgresql/models.ts +2 -1
  27. package/src/database/_generated/backend/postgresql/pjtg.ts +1 -0
  28. package/src/database/_generated/backend/sqlite/browser.ts +54 -0
  29. package/src/database/_generated/backend/sqlite/client.ts +7 -8
  30. package/src/database/_generated/backend/sqlite/commonInputTypes.ts +3 -2
  31. package/src/database/_generated/backend/sqlite/enums.ts +3 -1
  32. package/src/database/_generated/backend/sqlite/internal/class.ts +24 -71
  33. package/src/database/_generated/backend/sqlite/internal/prismaNamespace.ts +41 -43
  34. package/src/database/_generated/backend/sqlite/internal/prismaNamespaceBrowser.ts +188 -0
  35. package/src/database/_generated/backend/sqlite/models/BackendUnlockMethod.ts +12 -11
  36. package/src/database/_generated/backend/sqlite/models/Library.ts +29 -28
  37. package/src/database/_generated/backend/sqlite/models/Project.ts +69 -68
  38. package/src/database/_generated/backend/sqlite/models/ProjectModelStorage.ts +29 -28
  39. package/src/database/_generated/backend/sqlite/models/ProjectSpace.ts +26 -25
  40. package/src/database/_generated/backend/sqlite/models/PulumiBackend.ts +29 -28
  41. package/src/database/_generated/backend/sqlite/models/UserWorkspaceLayout.ts +12 -11
  42. package/src/database/_generated/backend/sqlite/models.ts +2 -1
  43. package/src/database/_generated/backend/sqlite/pjtg.ts +1 -0
  44. package/src/database/_generated/project/browser.ts +1 -0
  45. package/src/database/_generated/project/client.ts +4 -5
  46. package/src/database/_generated/project/commonInputTypes.ts +1 -0
  47. package/src/database/_generated/project/enums.ts +1 -0
  48. package/src/database/_generated/project/internal/class.ts +20 -62
  49. package/src/database/_generated/project/internal/prismaNamespace.ts +40 -36
  50. package/src/database/_generated/project/internal/prismaNamespaceBrowser.ts +9 -6
  51. package/src/database/_generated/project/models/ApiKey.ts +1 -0
  52. package/src/database/_generated/project/models/Artifact.ts +1 -0
  53. package/src/database/_generated/project/models/HubModel.ts +1 -0
  54. package/src/database/_generated/project/models/InstanceCustomStatus.ts +1 -0
  55. package/src/database/_generated/project/models/InstanceEvaluationState.ts +1 -0
  56. package/src/database/_generated/project/models/InstanceLock.ts +1 -0
  57. package/src/database/_generated/project/models/InstanceModel.ts +1 -0
  58. package/src/database/_generated/project/models/InstanceOperationState.ts +1 -0
  59. package/src/database/_generated/project/models/InstanceState.ts +1 -0
  60. package/src/database/_generated/project/models/Operation.ts +1 -0
  61. package/src/database/_generated/project/models/OperationLog.ts +1 -0
  62. package/src/database/_generated/project/models/Page.ts +1 -0
  63. package/src/database/_generated/project/models/Secret.ts +1 -0
  64. package/src/database/_generated/project/models/ServiceAccount.ts +1 -0
  65. package/src/database/_generated/project/models/Terminal.ts +1 -0
  66. package/src/database/_generated/project/models/TerminalSession.ts +1 -0
  67. package/src/database/_generated/project/models/TerminalSessionLog.ts +1 -0
  68. package/src/database/_generated/project/models/Trigger.ts +1 -0
  69. package/src/database/_generated/project/models/UnlockMethod.ts +1 -0
  70. package/src/database/_generated/project/models/UserCompositeViewport.ts +1 -0
  71. package/src/database/_generated/project/models/UserProjectViewport.ts +1 -0
  72. package/src/database/_generated/project/models/Worker.ts +1 -0
  73. package/src/database/_generated/project/models/WorkerUnitRegistration.ts +1 -0
  74. package/src/database/_generated/project/models/WorkerVersion.ts +1 -0
  75. package/src/database/_generated/project/models/WorkerVersionLog.ts +1 -0
  76. package/src/database/_generated/project/models.ts +1 -0
  77. package/src/database/abstractions.ts +1 -7
  78. package/src/database/index.ts +1 -0
  79. package/src/database/local/backend.ts +19 -30
  80. package/src/database/local/project.ts +4 -9
  81. package/src/database/manager.ts +28 -34
  82. package/src/database/migration.ts +126 -0
  83. package/src/shared/resolvers/input.ts +2 -0
  84. package/src/test-utils/database.ts +28 -14
  85. package/dist/chunk-JT4KWE3B.js.map +0 -1
  86. package/dist/database/local/prisma.config.js +0 -26
  87. package/dist/database/local/prisma.config.js.map +0 -1
  88. package/src/database/local/prisma.config.ts +0 -25
  89. package/src/database/migrate.ts +0 -35
@@ -1,4 +1,4 @@
1
- export { AccessError, BackendError, BackendUnlockMethodNotFoundError, CannotDeleteLastBackendUnlockMethodError, CannotDeleteLastUnlockMethodError, GraphResolver, InputHashResolver, InputResolver, InstanceLockLostError, InstanceLockedError, InstanceNotFoundError, InstanceStateNotFoundError, InvalidInstanceKindError, MAX_WORKER_START_ATTEMPTS, OperationNotFoundError, ProjectLockedError, ProjectNotFoundError, PromiseTracker, SystemSecretNames, ValidationResolver, WorkerVersionNotFoundError, apiKeyMetaSchema, apiKeyOutputSchema, apiKeyQuerySchema, applyLibraryUpdate, artifactOutputSchema, artifactQuerySchema, backendUnlockMethodInputSchema, backendUnlockMethodMetaSchema, codebaseLibrary, codebaseProjectModelStorage, collectionQueryResult, collectionQuerySchema, createAsyncBatcher, databaseProjectModelStorage, diffLibraries, extractDigestFromImage, finalInstanceOperationStatuses, finalOperationStatuses, forSchema, getAllDependents, getMatchedInjectionInstanceInputs, getResolvedHubInputs, getResolvedInjectionInstanceInputs, getResolvedInstanceInputs, getResolvedInstanceOutputs, getWorkerIdentity, globalProjectSpace, hasObjectMeta, hostPulumiBackend, instanceCustomStatusInputSchema, instanceLockEventSchema, instanceLockOutputSchema, instanceStateEventSchema, int32ToBytes, isFinalOperationStatus, isInstanceDeployed, isTransientInstanceOperationStatus, isTransientOperationStatus, isVirtualGhostInstance, librarySpecSchema, operationEventSchema, operationLaunchInputSchema, operationMetaSchema, operationOptionsSchema, operationOutputSchema, operationPhaseInstanceSchema, operationPhaseSchema, operationPhaseTypeSchema, operationPlanInputSchema, operationStatusSchema, operationTypeSchema, pageDetailsOutputSchema, pageOutputSchema, pageQuerySchema, projectInputSchema, projectModelEventSchema, projectModelStorageSpecSchema, projectOutputSchema, projectUnlockStateSchema, projectUnlockSuiteSchema, pulumiBackendSpecSchema, resolverFactories, secretOutputSchema, secretQuerySchema, serviceAccountOutputSchema, serviceAccountQuerySchema, stableInstanceInputSchema, terminalDetailsOutputSchema, terminalOutputSchema, terminalQuerySchema, terminalSessionOutputSchema, terminalStatusSchema, toApiKeyOutput, toPageOutput, toSecretOutput, toTerminalDetailsOutput, toTerminalOutput, toTerminalSessionOutput, toWorkerOutput, toWorkerVersionOutput, triggerOutputSchema, triggerQuerySchema, unlockMethodInputSchema, unlockMethodMetaSchema, unlockMethodOutputSchema, unlockMethodType, waitAll, workerOutputSchema, workerQuerySchema, workerUnitRegistrationEventSchema, workerVersionOutputSchema, workerVersionStatusSchema } from '../chunk-JT4KWE3B.js';
1
+ export { AccessError, BackendError, BackendUnlockMethodNotFoundError, CannotDeleteLastBackendUnlockMethodError, CannotDeleteLastUnlockMethodError, GraphResolver, InputHashResolver, InputResolver, InstanceLockLostError, InstanceLockedError, InstanceNotFoundError, InstanceStateNotFoundError, InvalidInstanceKindError, MAX_WORKER_START_ATTEMPTS, OperationNotFoundError, ProjectLockedError, ProjectNotFoundError, PromiseTracker, SystemSecretNames, ValidationResolver, WorkerVersionNotFoundError, apiKeyMetaSchema, apiKeyOutputSchema, apiKeyQuerySchema, applyLibraryUpdate, artifactOutputSchema, artifactQuerySchema, backendUnlockMethodInputSchema, backendUnlockMethodMetaSchema, codebaseLibrary, codebaseProjectModelStorage, collectionQueryResult, collectionQuerySchema, createAsyncBatcher, databaseProjectModelStorage, diffLibraries, extractDigestFromImage, finalInstanceOperationStatuses, finalOperationStatuses, forSchema, getAllDependents, getMatchedInjectionInstanceInputs, getResolvedHubInputs, getResolvedInjectionInstanceInputs, getResolvedInstanceInputs, getResolvedInstanceOutputs, getWorkerIdentity, globalProjectSpace, hasObjectMeta, hostPulumiBackend, instanceCustomStatusInputSchema, instanceLockEventSchema, instanceLockOutputSchema, instanceStateEventSchema, int32ToBytes, isFinalOperationStatus, isInstanceDeployed, isTransientInstanceOperationStatus, isTransientOperationStatus, isVirtualGhostInstance, librarySpecSchema, operationEventSchema, operationLaunchInputSchema, operationMetaSchema, operationOptionsSchema, operationOutputSchema, operationPhaseInstanceSchema, operationPhaseSchema, operationPhaseTypeSchema, operationPlanInputSchema, operationStatusSchema, operationTypeSchema, pageDetailsOutputSchema, pageOutputSchema, pageQuerySchema, projectInputSchema, projectModelEventSchema, projectModelStorageSpecSchema, projectOutputSchema, projectUnlockStateSchema, projectUnlockSuiteSchema, pulumiBackendSpecSchema, resolverFactories, secretOutputSchema, secretQuerySchema, serviceAccountOutputSchema, serviceAccountQuerySchema, stableInstanceInputSchema, terminalDetailsOutputSchema, terminalOutputSchema, terminalQuerySchema, terminalSessionOutputSchema, terminalStatusSchema, toApiKeyOutput, toPageOutput, toSecretOutput, toTerminalDetailsOutput, toTerminalOutput, toTerminalSessionOutput, toWorkerOutput, toWorkerVersionOutput, triggerOutputSchema, triggerQuerySchema, unlockMethodInputSchema, unlockMethodMetaSchema, unlockMethodOutputSchema, unlockMethodType, waitAll, workerOutputSchema, workerQuerySchema, workerUnitRegistrationEventSchema, workerVersionOutputSchema, workerVersionStatusSchema } from '../chunk-V2NILDHS.js';
2
2
  import '../chunk-I7BWSAN6.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@highstate/backend",
3
- "version": "0.17.0",
3
+ "version": "0.19.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -17,8 +17,7 @@
17
17
  "default": "./dist/shared/index.js"
18
18
  },
19
19
  "./library-worker": "./dist/library/worker/main.js",
20
- "./package-resolution-worker": "./dist/library/package-resolution-worker.js",
21
- "./prisma-config": "./dist/database/local/prisma.config.js"
20
+ "./package-resolution-worker": "./dist/library/package-resolution-worker.js"
22
21
  },
23
22
  "publishConfig": {
24
23
  "access": "public"
@@ -35,15 +34,17 @@
35
34
  "@noble/ciphers": "^1.3.0",
36
35
  "@noble/hashes": "^1.8.0",
37
36
  "@paralleldrive/cuid2": "^2.2.2",
38
- "@prisma/adapter-libsql": "^6.14.0",
39
- "@prisma/client": "^6.14.0",
40
- "@prisma/driver-adapter-utils": "^6.14.0",
37
+ "@prisma/adapter-libsql": "7.3.0",
38
+ "@prisma/client": "7.3.0",
39
+ "@prisma/driver-adapter-utils": "7.3.0",
40
+ "@pulumi/pulumi": "3.198.0",
41
41
  "age-encryption": "^0.2.3",
42
42
  "ajv": "^8.17.1",
43
43
  "ansi-colors": "^4.1.3",
44
44
  "ansi-styles": "^6.2.1",
45
45
  "better-lock": "^3.2.0",
46
46
  "buffer-polyfill": "npm:buffer@^6.0.3",
47
+ "classic-level": "^2.0.0",
47
48
  "consola": "^3.2.3",
48
49
  "crypto-hash": "^3.1.0",
49
50
  "dotenv": "^16.4.7",
@@ -56,16 +57,14 @@
56
57
  "p-queue": "^8.0.0",
57
58
  "pino": "^9.6.0",
58
59
  "pkg-types": "^1.2.1",
59
- "prisma": "^6.14.0",
60
+ "prisma": "7.3.0",
60
61
  "remeda": "^2.21.0",
61
62
  "ulid": "^3.0.1",
62
63
  "uuid": "^11.1.0",
63
64
  "watcher": "^2.3.1",
64
65
  "yaml": "^2.7.1",
65
66
  "zod": "^4.0.5",
66
- "@pulumi/pulumi": "3.198.0",
67
- "classic-level": "^2.0.0",
68
- "@highstate/contract": "0.17.0"
67
+ "@highstate/contract": "0.19.1"
69
68
  },
70
69
  "devDependencies": {
71
70
  "@biomejs/biome": "2.2.0",
@@ -1,11 +1,9 @@
1
1
  datasource db {
2
2
  provider = "postgresql"
3
- url = env("HIGHSTATE_MIGRATION_DATABASE_URL")
4
3
  }
5
4
 
6
5
  generator client {
7
6
  provider = "prisma-client"
8
- previewFeatures = ["queryCompiler", "driverAdapters"]
9
7
  output = "../../../src/database/_generated/backend/postgresql"
10
8
  moduleFormat = "esm"
11
9
  generatedFileExtension = "ts"
@@ -1,11 +1,9 @@
1
1
  datasource db {
2
2
  provider = "sqlite"
3
- url = env("HIGHSTATE_MIGRATION_DATABASE_URL")
4
3
  }
5
4
 
6
5
  generator client {
7
6
  provider = "prisma-client"
8
- previewFeatures = ["queryCompiler", "driverAdapters"]
9
7
  output = "../../../src/database/_generated/backend/sqlite"
10
8
  moduleFormat = "esm"
11
9
  generatedFileExtension = "ts"
@@ -1,6 +1,5 @@
1
1
  datasource db {
2
2
  provider = "sqlite"
3
- url = env("HIGHSTATE_MIGRATION_DATABASE_URL")
4
3
  }
5
4
 
6
5
  generator client {
@@ -1,6 +1,5 @@
1
1
  import type { InputJsonValue } from "@prisma/client/runtime/client"
2
2
  import type { Logger } from "pino"
3
- import type { DatabaseManager, Project } from "../database"
4
3
  import type { LibraryBackend } from "../library"
5
4
  import type { PubSubManager } from "../pubsub"
6
5
  import type { ProjectModelService } from "./project-model"
@@ -17,7 +16,7 @@ import {
17
16
  } from "@highstate/contract"
18
17
  import { createId } from "@paralleldrive/cuid2"
19
18
  import { createProjectLogger } from "../common"
20
- import { projectDatabaseVersion } from "../database/abstractions"
19
+ import { type DatabaseManager, type Project, projectDatabaseVersion } from "../database"
21
20
  import {
22
21
  applyInstancePatch,
23
22
  type ProjectEvaluationSubsystem,
@@ -0,0 +1,54 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * This file should be your main import to use Prisma-related types and utilities in a browser.
8
+ * Use it to get access to models, enums, and input types.
9
+ *
10
+ * This file does not contain a `PrismaClient` class, nor several other helpers that are intended as server-side only.
11
+ * See `client.ts` for the standard, server-side entry point.
12
+ *
13
+ * 🟢 You can import this file directly.
14
+ */
15
+
16
+ import * as Prisma from './internal/prismaNamespaceBrowser.ts'
17
+ export { Prisma }
18
+ export * as $Enums from './enums.ts'
19
+ export * from './enums.ts';
20
+ /**
21
+ * Model UserWorkspaceLayout
22
+ *
23
+ */
24
+ export type UserWorkspaceLayout = Prisma.UserWorkspaceLayoutModel
25
+ /**
26
+ * Model Library
27
+ *
28
+ */
29
+ export type Library = Prisma.LibraryModel
30
+ /**
31
+ * Model Project
32
+ *
33
+ */
34
+ export type Project = Prisma.ProjectModel
35
+ /**
36
+ * Model ProjectSpace
37
+ *
38
+ */
39
+ export type ProjectSpace = Prisma.ProjectSpaceModel
40
+ /**
41
+ * Model ProjectModelStorage
42
+ *
43
+ */
44
+ export type ProjectModelStorage = Prisma.ProjectModelStorageModel
45
+ /**
46
+ * Model PulumiBackend
47
+ *
48
+ */
49
+ export type PulumiBackend = Prisma.PulumiBackendModel
50
+ /**
51
+ * Model BackendUnlockMethod
52
+ * Unlock methods describe trusted identities that can decrypt the backend master key.
53
+ */
54
+ export type BackendUnlockMethod = Prisma.BackendUnlockMethodModel
@@ -1,9 +1,11 @@
1
1
 
2
2
  /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
3
  /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
4
5
  // @ts-nocheck
5
- /**
6
+ /*
6
7
  * This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types.
8
+ * If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead.
7
9
  *
8
10
  * 🟢 You can import this file directly.
9
11
  */
@@ -11,7 +13,7 @@
11
13
  import * as process from 'node:process'
12
14
  import * as path from 'node:path'
13
15
  import { fileURLToPath } from 'node:url'
14
- const __dirname = path.dirname(fileURLToPath(import.meta.url))
16
+ globalThis['__dirname'] = path.dirname(fileURLToPath(import.meta.url))
15
17
 
16
18
  import * as runtime from "@prisma/client/runtime/client"
17
19
  import * as $Enums from "./enums.ts"
@@ -19,6 +21,7 @@ import * as $Class from "./internal/class.ts"
19
21
  import * as Prisma from "./internal/prismaNamespace.ts"
20
22
 
21
23
  export * as $Enums from './enums.ts'
24
+ export * from "./enums.ts"
22
25
  /**
23
26
  * ## Prisma Client
24
27
  *
@@ -30,14 +33,12 @@ export * as $Enums from './enums.ts'
30
33
  * const userWorkspaceLayouts = await prisma.userWorkspaceLayout.findMany()
31
34
  * ```
32
35
  *
33
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
36
+ * Read more in our [docs](https://pris.ly/d/client).
34
37
  */
35
- export const PrismaClient = $Class.getPrismaClientClass(__dirname)
38
+ export const PrismaClient = $Class.getPrismaClientClass()
36
39
  export type PrismaClient<LogOpts extends Prisma.LogLevel = never, OmitOpts extends Prisma.PrismaClientOptions["omit"] = Prisma.PrismaClientOptions["omit"], ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = $Class.PrismaClient<LogOpts, OmitOpts, ExtArgs>
37
40
  export { Prisma }
38
41
 
39
-
40
-
41
42
  /**
42
43
  * Model UserWorkspaceLayout
43
44
  *
@@ -73,5 +74,3 @@ export type PulumiBackend = Prisma.PulumiBackendModel
73
74
  * Unlock methods describe trusted identities that can decrypt the backend master key.
74
75
  */
75
76
  export type BackendUnlockMethod = Prisma.BackendUnlockMethodModel
76
-
77
-
@@ -1,14 +1,15 @@
1
1
 
2
2
  /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
3
  /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
4
5
  // @ts-nocheck
5
- /**
6
+ /*
6
7
  * This file exports various common sort, input & filter types that are not directly linked to a particular model.
7
8
  *
8
9
  * 🟢 You can import this file directly.
9
10
  */
10
11
 
11
- import * as runtime from "@prisma/client/runtime/client"
12
+ import type * as runtime from "@prisma/client/runtime/client"
12
13
  import * as $Enums from "./enums.ts"
13
14
  import type * as Prisma from "./internal/prismaNamespace.ts"
14
15
 
@@ -1,13 +1,15 @@
1
1
 
2
2
  /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
3
  /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
4
5
  // @ts-nocheck
5
- /**
6
+ /*
6
7
  * This file exports all enum related types from the schema.
7
8
  *
8
9
  * 🟢 You can import this file directly.
9
10
  */
10
11
 
11
12
 
13
+
12
14
  // This file is empty because there are no enums in the schema.
13
15
  export {}
@@ -1,8 +1,9 @@
1
1
 
2
2
  /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
3
  /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
4
5
  // @ts-nocheck
5
- /**
6
+ /*
6
7
  * WARNING: This is an internal file that is subject to change!
7
8
  *
8
9
  * 🛑 Under no circumstances should you import this file directly! 🛑
@@ -15,82 +16,36 @@ import type * as Prisma from "./prismaNamespace.ts"
15
16
 
16
17
 
17
18
  const config: runtime.GetPrismaClientConfig = {
18
- "generator": {
19
- "name": "client",
20
- "provider": {
21
- "fromEnvVar": null,
22
- "value": "prisma-client"
23
- },
24
- "output": {
25
- "value": "/home/exeteres/Projects/personal/highstate/packages/platform/backend/src/database/_generated/backend/postgresql",
26
- "fromEnvVar": null
27
- },
28
- "config": {
29
- "moduleFormat": "esm",
30
- "generatedFileExtension": "ts",
31
- "importFileExtension": "ts",
32
- "engineType": "client"
33
- },
34
- "binaryTargets": [
35
- {
36
- "fromEnvVar": null,
37
- "value": "linux-nixos",
38
- "native": true
39
- }
40
- ],
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
47
- },
48
- "relativePath": "../../../../../prisma/backend/postgresql",
49
- "clientVersion": "6.14.0",
50
- "engineVersion": "717184b7b35ea05dfa71a3236b7af656013e1e49",
51
- "datasourceNames": [
52
- "db"
53
- ],
19
+ "previewFeatures": [],
20
+ "clientVersion": "7.3.0",
21
+ "engineVersion": "9d6ad21cbbceab97458517b147a6a09ff43aa735",
54
22
  "activeProvider": "postgresql",
55
- "postinstall": false,
56
- "inlineDatasources": {
57
- "db": {
58
- "url": {
59
- "fromEnvVar": "HIGHSTATE_MIGRATION_DATABASE_URL",
60
- "value": null
61
- }
62
- }
63
- },
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,
23
+ "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}\n\ngenerator client {\n provider = \"prisma-client\"\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",
67
24
  "runtimeDataModel": {
68
25
  "models": {},
69
26
  "enums": {},
70
27
  "types": {}
71
- },
72
- "dirname": ""
28
+ }
73
29
  }
74
30
 
75
31
  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\":{}}")
76
- config.engineWasm = undefined
77
32
 
78
33
  async function decodeBase64AsWasm(wasmBase64: string): Promise<WebAssembly.Module> {
79
34
  const { Buffer } = await import('node:buffer')
80
- const base64Data = wasmBase64.replace('data:application/wasm;base64,', '')
81
- const wasmArray = new Uint8Array(Buffer.from(base64Data, 'base64'))
35
+ const wasmArray = Buffer.from(wasmBase64, 'base64')
82
36
  return new WebAssembly.Module(wasmArray)
83
37
  }
84
38
 
85
39
  config.compilerWasm = {
86
- getRuntime: async () => await import("@prisma/client/runtime/query_compiler_bg.postgresql.mjs"),
40
+ getRuntime: async () => await import("@prisma/client/runtime/query_compiler_fast_bg.postgresql.mjs"),
87
41
 
88
42
  getQueryCompilerWasmModule: async () => {
89
- const { wasm } = await import("@prisma/client/runtime/query_compiler_bg.postgresql.wasm-base64.mjs")
43
+ const { wasm } = await import("@prisma/client/runtime/query_compiler_fast_bg.postgresql.wasm-base64.mjs")
90
44
  return await decodeBase64AsWasm(wasm)
91
- }
92
- }
45
+ },
93
46
 
47
+ importName: "./query_compiler_fast_bg.js"
48
+ }
94
49
 
95
50
 
96
51
 
@@ -109,15 +64,15 @@ export interface PrismaClientConstructor {
109
64
  * const userWorkspaceLayouts = await prisma.userWorkspaceLayout.findMany()
110
65
  * ```
111
66
  *
112
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
67
+ * Read more in our [docs](https://pris.ly/d/client).
113
68
  */
114
69
 
115
70
  new <
116
- Options extends Prisma.PrismaClientOptions,
117
- LogOpts extends LogOptions<Options>,
71
+ Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
72
+ LogOpts extends LogOptions<Options> = LogOptions<Options>,
118
73
  OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'],
119
74
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
120
- >(options?: Prisma.Subset<Options, Prisma.PrismaClientOptions> ): PrismaClient<LogOpts, OmitOpts, ExtArgs>
75
+ >(options: Prisma.Subset<Options, Prisma.PrismaClientOptions> ): PrismaClient<LogOpts, OmitOpts, ExtArgs>
121
76
  }
122
77
 
123
78
  /**
@@ -131,12 +86,12 @@ export interface PrismaClientConstructor {
131
86
  * const userWorkspaceLayouts = await prisma.userWorkspaceLayout.findMany()
132
87
  * ```
133
88
  *
134
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
89
+ * Read more in our [docs](https://pris.ly/d/client).
135
90
  */
136
91
 
137
92
  export interface PrismaClient<
138
93
  in LogOpts extends Prisma.LogLevel = never,
139
- in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = Prisma.PrismaClientOptions['omit'],
94
+ in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = undefined,
140
95
  in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
141
96
  > {
142
97
  [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
@@ -160,7 +115,7 @@ export interface PrismaClient<
160
115
  * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
161
116
  * ```
162
117
  *
163
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
118
+ * Read more in our [docs](https://pris.ly/d/raw-queries).
164
119
  */
165
120
  $executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;
166
121
 
@@ -172,7 +127,7 @@ export interface PrismaClient<
172
127
  * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
173
128
  * ```
174
129
  *
175
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
130
+ * Read more in our [docs](https://pris.ly/d/raw-queries).
176
131
  */
177
132
  $executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;
178
133
 
@@ -183,7 +138,7 @@ export interface PrismaClient<
183
138
  * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
184
139
  * ```
185
140
  *
186
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
141
+ * Read more in our [docs](https://pris.ly/d/raw-queries).
187
142
  */
188
143
  $queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;
189
144
 
@@ -195,7 +150,7 @@ export interface PrismaClient<
195
150
  * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
196
151
  * ```
197
152
  *
198
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
153
+ * Read more in our [docs](https://pris.ly/d/raw-queries).
199
154
  */
200
155
  $queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;
201
156
 
@@ -217,7 +172,6 @@ export interface PrismaClient<
217
172
 
218
173
  $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
174
 
220
-
221
175
  $extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb<OmitOpts>, ExtArgs, runtime.Types.Utils.Call<Prisma.TypeMapCb<OmitOpts>, {
222
176
  extArgs: ExtArgs
223
177
  }>>
@@ -293,7 +247,6 @@ export interface PrismaClient<
293
247
  get backendUnlockMethod(): Prisma.BackendUnlockMethodDelegate<ExtArgs, { omit: OmitOpts }>;
294
248
  }
295
249
 
296
- export function getPrismaClientClass(dirname: string): PrismaClientConstructor {
297
- config.dirname = dirname
250
+ export function getPrismaClientClass(): PrismaClientConstructor {
298
251
  return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor
299
252
  }