@highstate/backend 0.16.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/{chunk-4JUMOKLV.js → chunk-JT4KWE3B.js} +10 -8
  2. package/dist/chunk-JT4KWE3B.js.map +1 -0
  3. package/dist/{chunk-VB4YL327.js → chunk-X2WG3WGL.js} +9 -2
  4. package/dist/chunk-X2WG3WGL.js.map +1 -0
  5. package/dist/highstate.manifest.json +4 -5
  6. package/dist/index.js +256 -287
  7. package/dist/index.js.map +1 -1
  8. package/dist/library/worker/main.js +1 -1
  9. package/dist/shared/index.js +1 -1
  10. package/package.json +9 -10
  11. package/prisma/backend/postgresql/main.prisma +0 -2
  12. package/prisma/backend/sqlite/main.prisma +0 -2
  13. package/prisma/project/instance.prisma +12 -0
  14. package/prisma/project/main.prisma +0 -1
  15. package/prisma/project/migrations/20260123000000_add_instance_state_self_hash/migration.sql +2 -0
  16. package/src/business/instance-state.test.ts +1 -0
  17. package/src/business/instance-state.ts +3 -0
  18. package/src/business/project.ts +1 -2
  19. package/src/common/utils.ts +9 -0
  20. package/src/database/_generated/backend/postgresql/browser.ts +54 -0
  21. package/src/database/_generated/backend/postgresql/client.ts +7 -8
  22. package/src/database/_generated/backend/postgresql/commonInputTypes.ts +3 -2
  23. package/src/database/_generated/backend/postgresql/enums.ts +3 -1
  24. package/src/database/_generated/backend/postgresql/internal/class.ts +24 -71
  25. package/src/database/_generated/backend/postgresql/internal/prismaNamespace.ts +41 -43
  26. package/src/database/_generated/backend/postgresql/internal/prismaNamespaceBrowser.ts +191 -0
  27. package/src/database/_generated/backend/postgresql/models/BackendUnlockMethod.ts +12 -11
  28. package/src/database/_generated/backend/postgresql/models/Library.ts +29 -28
  29. package/src/database/_generated/backend/postgresql/models/Project.ts +69 -68
  30. package/src/database/_generated/backend/postgresql/models/ProjectModelStorage.ts +29 -28
  31. package/src/database/_generated/backend/postgresql/models/ProjectSpace.ts +26 -25
  32. package/src/database/_generated/backend/postgresql/models/PulumiBackend.ts +29 -28
  33. package/src/database/_generated/backend/postgresql/models/UserWorkspaceLayout.ts +12 -11
  34. package/src/database/_generated/backend/postgresql/models.ts +2 -1
  35. package/src/database/_generated/backend/postgresql/pjtg.ts +1 -0
  36. package/src/database/_generated/backend/sqlite/browser.ts +54 -0
  37. package/src/database/_generated/backend/sqlite/client.ts +7 -8
  38. package/src/database/_generated/backend/sqlite/commonInputTypes.ts +3 -2
  39. package/src/database/_generated/backend/sqlite/enums.ts +3 -1
  40. package/src/database/_generated/backend/sqlite/internal/class.ts +24 -71
  41. package/src/database/_generated/backend/sqlite/internal/prismaNamespace.ts +41 -43
  42. package/src/database/_generated/backend/sqlite/internal/prismaNamespaceBrowser.ts +188 -0
  43. package/src/database/_generated/backend/sqlite/models/BackendUnlockMethod.ts +12 -11
  44. package/src/database/_generated/backend/sqlite/models/Library.ts +29 -28
  45. package/src/database/_generated/backend/sqlite/models/Project.ts +69 -68
  46. package/src/database/_generated/backend/sqlite/models/ProjectModelStorage.ts +29 -28
  47. package/src/database/_generated/backend/sqlite/models/ProjectSpace.ts +26 -25
  48. package/src/database/_generated/backend/sqlite/models/PulumiBackend.ts +29 -28
  49. package/src/database/_generated/backend/sqlite/models/UserWorkspaceLayout.ts +12 -11
  50. package/src/database/_generated/backend/sqlite/models.ts +2 -1
  51. package/src/database/_generated/backend/sqlite/pjtg.ts +1 -0
  52. package/src/database/_generated/project/browser.ts +1 -0
  53. package/src/database/_generated/project/client.ts +4 -5
  54. package/src/database/_generated/project/commonInputTypes.ts +1 -0
  55. package/src/database/_generated/project/enums.ts +1 -0
  56. package/src/database/_generated/project/internal/class.ts +21 -63
  57. package/src/database/_generated/project/internal/prismaNamespace.ts +41 -36
  58. package/src/database/_generated/project/internal/prismaNamespaceBrowser.ts +10 -6
  59. package/src/database/_generated/project/models/ApiKey.ts +1 -0
  60. package/src/database/_generated/project/models/Artifact.ts +1 -0
  61. package/src/database/_generated/project/models/HubModel.ts +1 -0
  62. package/src/database/_generated/project/models/InstanceCustomStatus.ts +1 -0
  63. package/src/database/_generated/project/models/InstanceEvaluationState.ts +1 -0
  64. package/src/database/_generated/project/models/InstanceLock.ts +1 -0
  65. package/src/database/_generated/project/models/InstanceModel.ts +1 -0
  66. package/src/database/_generated/project/models/InstanceOperationState.ts +1 -0
  67. package/src/database/_generated/project/models/InstanceState.ts +108 -1
  68. package/src/database/_generated/project/models/Operation.ts +1 -0
  69. package/src/database/_generated/project/models/OperationLog.ts +1 -0
  70. package/src/database/_generated/project/models/Page.ts +1 -0
  71. package/src/database/_generated/project/models/Secret.ts +1 -0
  72. package/src/database/_generated/project/models/ServiceAccount.ts +1 -0
  73. package/src/database/_generated/project/models/Terminal.ts +1 -0
  74. package/src/database/_generated/project/models/TerminalSession.ts +1 -0
  75. package/src/database/_generated/project/models/TerminalSessionLog.ts +1 -0
  76. package/src/database/_generated/project/models/Trigger.ts +1 -0
  77. package/src/database/_generated/project/models/UnlockMethod.ts +1 -0
  78. package/src/database/_generated/project/models/UserCompositeViewport.ts +1 -0
  79. package/src/database/_generated/project/models/UserProjectViewport.ts +1 -0
  80. package/src/database/_generated/project/models/Worker.ts +1 -0
  81. package/src/database/_generated/project/models/WorkerUnitRegistration.ts +1 -0
  82. package/src/database/_generated/project/models/WorkerVersion.ts +1 -0
  83. package/src/database/_generated/project/models/WorkerVersionLog.ts +1 -0
  84. package/src/database/_generated/project/models.ts +1 -0
  85. package/src/database/abstractions.ts +1 -7
  86. package/src/database/index.ts +1 -0
  87. package/src/database/local/backend.ts +19 -30
  88. package/src/database/local/project.ts +4 -9
  89. package/src/database/manager.ts +28 -34
  90. package/src/database/migration.ts +126 -0
  91. package/src/orchestrator/operation.cancel.test.ts +112 -0
  92. package/src/orchestrator/operation.composite.test.ts +123 -0
  93. package/src/orchestrator/operation.destroy.test.ts +77 -0
  94. package/src/orchestrator/operation.preview.test.ts +95 -0
  95. package/src/orchestrator/operation.refresh.test.ts +77 -0
  96. package/src/orchestrator/operation.test-utils.ts +646 -0
  97. package/src/orchestrator/operation.ts +91 -3
  98. package/src/orchestrator/operation.update.failure.test.ts +88 -0
  99. package/src/orchestrator/operation.update.skip.test.ts +95 -0
  100. package/src/orchestrator/operation.update.test.ts +117 -0
  101. package/src/orchestrator/plan-test-builder.ts +1 -0
  102. package/src/runner/abstractions.ts +5 -0
  103. package/src/runner/local.ts +1 -0
  104. package/src/shared/resolvers/input-hash.ts +10 -6
  105. package/src/terminal/manager.ts +0 -3
  106. package/src/test-utils/database.ts +28 -14
  107. package/dist/chunk-4JUMOKLV.js.map +0 -1
  108. package/dist/chunk-VB4YL327.js.map +0 -1
  109. package/dist/database/local/prisma.config.js +0 -26
  110. package/dist/database/local/prisma.config.js.map +0 -1
  111. package/src/database/local/prisma.config.ts +0 -25
  112. package/src/database/migrate.ts +0 -35
@@ -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/sqlite",
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/sqlite/main.prisma",
46
- "isCustomOutput": true
47
- },
48
- "relativePath": "../../../../../prisma/backend/sqlite",
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": "sqlite",
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 = \"sqlite\"\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/sqlite\"\n moduleFormat = \"esm\"\n generatedFileExtension = \"ts\"\n importFileExtension = \"ts\"\n}\n\ngenerator json {\n provider = \"prisma-json-types-generator\"\n}\n",
65
- "inlineSchemaHash": "a1ceaf17c7e387f39b598365de3b12cae9e6d31f021d9ab4f958f2c85bb34129",
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 = \"sqlite\"\n}\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"../../../src/database/_generated/backend/sqlite\"\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.sqlite.mjs"),
40
+ getRuntime: async () => await import("@prisma/client/runtime/query_compiler_fast_bg.sqlite.mjs"),
87
41
 
88
42
  getQueryCompilerWasmModule: async () => {
89
- const { wasm } = await import("@prisma/client/runtime/query_compiler_bg.sqlite.wasm-base64.mjs")
43
+ const { wasm } = await import("@prisma/client/runtime/query_compiler_fast_bg.sqlite.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
  }
@@ -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! 🛑
@@ -24,11 +25,6 @@ export type DMMF = typeof runtime.DMMF
24
25
 
25
26
  export type PrismaPromise<T> = runtime.Types.Public.PrismaPromise<T>
26
27
 
27
- /**
28
- * Validator
29
- */
30
- export const validator = runtime.Public.validator
31
-
32
28
  /**
33
29
  * Prisma Errors
34
30
  */
@@ -68,14 +64,6 @@ export type Decimal = runtime.Decimal
68
64
 
69
65
  export type DecimalJsLike = runtime.DecimalJsLike
70
66
 
71
- /**
72
- * Metrics
73
- */
74
- export type Metrics = runtime.Metrics
75
- export type Metric<T> = runtime.Metric<T>
76
- export type MetricHistogram = runtime.MetricHistogram
77
- export type MetricHistogramBucket = runtime.MetricHistogramBucket
78
-
79
67
  /**
80
68
  * Extensions
81
69
  */
@@ -92,18 +80,19 @@ export type PrismaVersion = {
92
80
  }
93
81
 
94
82
  /**
95
- * Prisma Client JS version: 6.14.0
96
- * Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49
83
+ * Prisma Client JS version: 7.3.0
84
+ * Query Engine version: 9d6ad21cbbceab97458517b147a6a09ff43aa735
97
85
  */
98
86
  export const prismaVersion: PrismaVersion = {
99
- client: "6.14.0",
100
- engine: "717184b7b35ea05dfa71a3236b7af656013e1e49"
87
+ client: "7.3.0",
88
+ engine: "9d6ad21cbbceab97458517b147a6a09ff43aa735"
101
89
  }
102
90
 
103
91
  /**
104
92
  * Utility Types
105
93
  */
106
94
 
95
+ export type Bytes = runtime.Bytes
107
96
  export type JsonObject = runtime.JsonObject
108
97
  export type JsonArray = runtime.JsonArray
109
98
  export type JsonValue = runtime.JsonValue
@@ -111,32 +100,33 @@ export type InputJsonObject = runtime.InputJsonObject
111
100
  export type InputJsonArray = runtime.InputJsonArray
112
101
  export type InputJsonValue = runtime.InputJsonValue
113
102
 
103
+
114
104
  export const NullTypes = {
115
- DbNull: runtime.objectEnumValues.classes.DbNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.DbNull),
116
- JsonNull: runtime.objectEnumValues.classes.JsonNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.JsonNull),
117
- AnyNull: runtime.objectEnumValues.classes.AnyNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.AnyNull),
105
+ DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull),
106
+ JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull),
107
+ AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull),
118
108
  }
119
-
120
109
  /**
121
110
  * Helper for filtering JSON entries that have `null` on the database (empty on the db)
122
111
  *
123
112
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
124
113
  */
125
- export const DbNull = runtime.objectEnumValues.instances.DbNull
114
+ export const DbNull = runtime.DbNull
126
115
 
127
116
  /**
128
117
  * Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
129
118
  *
130
119
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
131
120
  */
132
- export const JsonNull = runtime.objectEnumValues.instances.JsonNull
121
+ export const JsonNull = runtime.JsonNull
133
122
 
134
123
  /**
135
124
  * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
136
125
  *
137
126
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
138
127
  */
139
- export const AnyNull = runtime.objectEnumValues.instances.AnyNull
128
+ export const AnyNull = runtime.AnyNull
129
+
140
130
 
141
131
  type SelectAndInclude = {
142
132
  select: any
@@ -1142,26 +1132,22 @@ export type BatchPayload = {
1142
1132
  count: number
1143
1133
  }
1144
1134
 
1145
-
1146
- export type Datasource = {
1147
- url?: string
1148
- }
1149
- export type Datasources = {
1150
- db?: Datasource
1151
- }
1152
-
1153
1135
  export const defineExtension = runtime.Extensions.defineExtension as unknown as runtime.Types.Extensions.ExtendsHook<"define", TypeMapCb, runtime.Types.Extensions.DefaultArgs>
1154
1136
  export type DefaultPrismaClient = PrismaClient
1155
1137
  export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
1156
- export interface PrismaClientOptions {
1138
+ export type PrismaClientOptions = ({
1157
1139
  /**
1158
- * Overwrites the datasource url from your schema.prisma file
1140
+ * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-pg`.
1159
1141
  */
1160
- datasources?: Datasources
1142
+ adapter: runtime.SqlDriverAdapterFactory
1143
+ accelerateUrl?: never
1144
+ } | {
1161
1145
  /**
1162
- * Overwrites the datasource url from your schema.prisma file
1146
+ * Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database.
1163
1147
  */
1164
- datasourceUrl?: string
1148
+ accelerateUrl: string
1149
+ adapter?: never
1150
+ }) & {
1165
1151
  /**
1166
1152
  * @default "colorless"
1167
1153
  */
@@ -1188,7 +1174,7 @@ export interface PrismaClientOptions {
1188
1174
  * { emit: 'stdout', level: 'error' }
1189
1175
  *
1190
1176
  * ```
1191
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option).
1177
+ * Read more in our [docs](https://pris.ly/d/logging).
1192
1178
  */
1193
1179
  log?: (LogLevel | LogDefinition)[]
1194
1180
  /**
@@ -1201,10 +1187,6 @@ export interface PrismaClientOptions {
1201
1187
  timeout?: number
1202
1188
  isolationLevel?: TransactionIsolationLevel
1203
1189
  }
1204
- /**
1205
- * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`
1206
- */
1207
- adapter?: runtime.SqlDriverAdapterFactory | null
1208
1190
  /**
1209
1191
  * Global configuration for omitting model fields by default.
1210
1192
  *
@@ -1220,6 +1202,22 @@ export interface PrismaClientOptions {
1220
1202
  * ```
1221
1203
  */
1222
1204
  omit?: GlobalOmitConfig
1205
+ /**
1206
+ * SQL commenter plugins that add metadata to SQL queries as comments.
1207
+ * Comments follow the sqlcommenter format: https://google.github.io/sqlcommenter/
1208
+ *
1209
+ * @example
1210
+ * ```
1211
+ * const prisma = new PrismaClient({
1212
+ * adapter,
1213
+ * comments: [
1214
+ * traceContext(),
1215
+ * queryInsights(),
1216
+ * ],
1217
+ * })
1218
+ * ```
1219
+ */
1220
+ comments?: runtime.SqlCommenterPlugin[]
1223
1221
  }
1224
1222
  export type GlobalOmitConfig = {
1225
1223
  userWorkspaceLayout?: Prisma.UserWorkspaceLayoutOmit
@@ -0,0 +1,188 @@
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
+ * WARNING: This is an internal file that is subject to change!
8
+ *
9
+ * 🛑 Under no circumstances should you import this file directly! 🛑
10
+ *
11
+ * All exports from this file are wrapped under a `Prisma` namespace object in the browser.ts file.
12
+ * While this enables partial backward compatibility, it is not part of the stable public API.
13
+ *
14
+ * If you are looking for your Models, Enums, and Input Types, please import them from the respective
15
+ * model files in the `model` directory!
16
+ */
17
+
18
+ import * as runtime from "@prisma/client/runtime/index-browser"
19
+
20
+ export type * from '../models.ts'
21
+ export type * from './prismaNamespace.ts'
22
+
23
+ export const Decimal = runtime.Decimal
24
+
25
+
26
+ export const NullTypes = {
27
+ DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull),
28
+ JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull),
29
+ AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull),
30
+ }
31
+ /**
32
+ * Helper for filtering JSON entries that have `null` on the database (empty on the db)
33
+ *
34
+ * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
35
+ */
36
+ export const DbNull = runtime.DbNull
37
+
38
+ /**
39
+ * Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
40
+ *
41
+ * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
42
+ */
43
+ export const JsonNull = runtime.JsonNull
44
+
45
+ /**
46
+ * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
47
+ *
48
+ * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
49
+ */
50
+ export const AnyNull = runtime.AnyNull
51
+
52
+
53
+ export const ModelName = {
54
+ UserWorkspaceLayout: 'UserWorkspaceLayout',
55
+ Library: 'Library',
56
+ Project: 'Project',
57
+ ProjectSpace: 'ProjectSpace',
58
+ ProjectModelStorage: 'ProjectModelStorage',
59
+ PulumiBackend: 'PulumiBackend',
60
+ BackendUnlockMethod: 'BackendUnlockMethod'
61
+ } as const
62
+
63
+ export type ModelName = (typeof ModelName)[keyof typeof ModelName]
64
+
65
+ /*
66
+ * Enums
67
+ */
68
+
69
+ export const TransactionIsolationLevel = runtime.makeStrictEnum({
70
+ Serializable: 'Serializable'
71
+ } as const)
72
+
73
+ export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
74
+
75
+
76
+ export const UserWorkspaceLayoutScalarFieldEnum = {
77
+ userId: 'userId',
78
+ layout: 'layout'
79
+ } as const
80
+
81
+ export type UserWorkspaceLayoutScalarFieldEnum = (typeof UserWorkspaceLayoutScalarFieldEnum)[keyof typeof UserWorkspaceLayoutScalarFieldEnum]
82
+
83
+
84
+ export const LibraryScalarFieldEnum = {
85
+ id: 'id',
86
+ meta: 'meta',
87
+ spec: 'spec'
88
+ } as const
89
+
90
+ export type LibraryScalarFieldEnum = (typeof LibraryScalarFieldEnum)[keyof typeof LibraryScalarFieldEnum]
91
+
92
+
93
+ export const ProjectScalarFieldEnum = {
94
+ id: 'id',
95
+ meta: 'meta',
96
+ name: 'name',
97
+ spaceId: 'spaceId',
98
+ modelStorageId: 'modelStorageId',
99
+ libraryId: 'libraryId',
100
+ pulumiBackendId: 'pulumiBackendId',
101
+ encryptedMasterKey: 'encryptedMasterKey',
102
+ unlockSuite: 'unlockSuite',
103
+ databaseVersion: 'databaseVersion',
104
+ createdAt: 'createdAt',
105
+ updatedAt: 'updatedAt'
106
+ } as const
107
+
108
+ export type ProjectScalarFieldEnum = (typeof ProjectScalarFieldEnum)[keyof typeof ProjectScalarFieldEnum]
109
+
110
+
111
+ export const ProjectSpaceScalarFieldEnum = {
112
+ id: 'id',
113
+ name: 'name',
114
+ parentId: 'parentId',
115
+ meta: 'meta'
116
+ } as const
117
+
118
+ export type ProjectSpaceScalarFieldEnum = (typeof ProjectSpaceScalarFieldEnum)[keyof typeof ProjectSpaceScalarFieldEnum]
119
+
120
+
121
+ export const ProjectModelStorageScalarFieldEnum = {
122
+ id: 'id',
123
+ meta: 'meta',
124
+ spec: 'spec'
125
+ } as const
126
+
127
+ export type ProjectModelStorageScalarFieldEnum = (typeof ProjectModelStorageScalarFieldEnum)[keyof typeof ProjectModelStorageScalarFieldEnum]
128
+
129
+
130
+ export const PulumiBackendScalarFieldEnum = {
131
+ id: 'id',
132
+ meta: 'meta',
133
+ spec: 'spec'
134
+ } as const
135
+
136
+ export type PulumiBackendScalarFieldEnum = (typeof PulumiBackendScalarFieldEnum)[keyof typeof PulumiBackendScalarFieldEnum]
137
+
138
+
139
+ export const BackendUnlockMethodScalarFieldEnum = {
140
+ id: 'id',
141
+ meta: 'meta',
142
+ recipient: 'recipient',
143
+ createdAt: 'createdAt',
144
+ updatedAt: 'updatedAt'
145
+ } as const
146
+
147
+ export type BackendUnlockMethodScalarFieldEnum = (typeof BackendUnlockMethodScalarFieldEnum)[keyof typeof BackendUnlockMethodScalarFieldEnum]
148
+
149
+
150
+ export const SortOrder = {
151
+ asc: 'asc',
152
+ desc: 'desc'
153
+ } as const
154
+
155
+ export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
156
+
157
+
158
+ export const JsonNullValueInput = {
159
+ JsonNull: JsonNull
160
+ } as const
161
+
162
+ export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput]
163
+
164
+
165
+ export const JsonNullValueFilter = {
166
+ DbNull: DbNull,
167
+ JsonNull: JsonNull,
168
+ AnyNull: AnyNull
169
+ } as const
170
+
171
+ export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter]
172
+
173
+
174
+ export const QueryMode = {
175
+ default: 'default',
176
+ insensitive: 'insensitive'
177
+ } as const
178
+
179
+ export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
180
+
181
+
182
+ export const NullsOrder = {
183
+ first: 'first',
184
+ last: 'last'
185
+ } as const
186
+
187
+ export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
188
+