@highstate/backend 0.9.16 → 0.9.19
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-5WVU2AK4.js +1535 -0
- package/dist/chunk-5WVU2AK4.js.map +1 -0
- package/dist/chunk-I7BWSAN6.js +49 -0
- package/dist/chunk-I7BWSAN6.js.map +1 -0
- package/dist/{chunk-RCB4AFGD.js → chunk-VB4YL327.js} +51 -71
- package/dist/chunk-VB4YL327.js.map +1 -0
- package/dist/database/local/prisma.config.js +26 -0
- package/dist/database/local/prisma.config.js.map +1 -0
- package/dist/highstate.manifest.json +5 -4
- package/dist/index.js +7676 -6634
- package/dist/index.js.map +1 -1
- package/dist/library/package-resolution-worker.js +8 -6
- package/dist/library/package-resolution-worker.js.map +1 -1
- package/dist/library/worker/main.js +63 -58
- package/dist/library/worker/main.js.map +1 -1
- package/dist/shared/index.js +3 -216
- package/dist/shared/index.js.map +1 -1
- package/package.json +23 -11
- package/prisma/backend/_schema/layout.prisma +7 -0
- package/prisma/backend/_schema/library.prisma +17 -0
- package/prisma/backend/_schema/project.prisma +101 -0
- package/prisma/backend/_schema/pulumi.prisma +17 -0
- package/prisma/backend/postgresql/main.prisma +17 -0
- package/prisma/backend/sqlite/main.prisma +17 -0
- package/prisma/backend/sqlite/migrations/20250817070609_initiial/migration.sql +34 -0
- package/prisma/backend/sqlite/migrations/20250817104948_add_fields/migration.sql +59 -0
- package/prisma/backend/sqlite/migrations/20250818082732_add_models/migration.sql +41 -0
- package/prisma/backend/sqlite/migrations/20250818083106_a/migration.sql +19 -0
- package/prisma/backend/sqlite/migrations/20250818101945_hi/migration.sql +1 -0
- package/prisma/backend/sqlite/migrations/20250819082315_a/migration.sql +5 -0
- package/prisma/backend/sqlite/migrations/migration_lock.toml +3 -0
- package/prisma/project/api-key.prisma +27 -0
- package/prisma/project/artifact.prisma +52 -0
- package/prisma/project/custom-status.prisma +46 -0
- package/prisma/project/evaluation.prisma +35 -0
- package/prisma/project/instance.prisma +160 -0
- package/prisma/project/layout.prisma +23 -0
- package/prisma/project/lock.prisma +18 -0
- package/prisma/project/main.prisma +17 -0
- package/prisma/project/migrations/20250816081310_initial/migration.sql +300 -0
- package/prisma/project/migrations/20250816082523_test/migration.sql +72 -0
- package/prisma/project/migrations/20250818065643_update/migration.sql +42 -0
- package/prisma/project/migrations/20250818070758_a/migration.sql +8 -0
- package/prisma/project/migrations/20250818070913_a/migration.sql +8 -0
- package/prisma/project/migrations/20250818082720_add_motels/migration.sql +11 -0
- package/prisma/project/migrations/20250818112523_hello/migration.sql +35 -0
- package/prisma/project/migrations/20250819082305_a/migration.sql +14 -0
- package/prisma/project/migrations/20250819165004_add_missing_fields/migration.sql +216 -0
- package/prisma/project/migrations/20250819171309_a/migration.sql +22 -0
- package/prisma/project/migrations/20250820113949_a/migration.sql +66 -0
- package/prisma/project/migrations/20250820144256_b/migration.sql +31 -0
- package/prisma/project/migrations/20250820145547_a/migration.sql +24 -0
- package/prisma/project/migrations/20250820182517_b/migration.sql +2 -0
- package/prisma/project/migrations/20250821172324_a/migration.sql +2 -0
- package/prisma/project/migrations/20250822081339_a/migration.sql +219 -0
- package/prisma/project/migrations/20250822083742_b/migration.sql +1 -0
- package/prisma/project/migrations/20250822105134_boom/migration.sql +1 -0
- package/prisma/project/migrations/20250822141028_b/migration.sql +1 -0
- package/prisma/project/migrations/20250822142342_b/migration.sql +16 -0
- package/prisma/project/migrations/20250824072720_a/migration.sql +1 -0
- package/prisma/project/migrations/20250824093656_b/migration.sql +21 -0
- package/prisma/project/migrations/20250825082518_a/migration.sql +1 -0
- package/prisma/project/migrations/20250825085343_b/migration.sql +1 -0
- package/prisma/project/migrations/20250825091312_a/migration.sql +1 -0
- package/prisma/project/migrations/20250903095431_hi/migration.sql +44 -0
- package/prisma/project/migrations/20250903174255_a/migration.sql +24 -0
- package/prisma/project/migrations/20250908095205_hi/migration.sql +18 -0
- package/prisma/project/migrations/20250909155857_hi/migration.sql +15 -0
- package/prisma/project/migrations/migration_lock.toml +3 -0
- package/prisma/project/model.prisma +37 -0
- package/prisma/project/operation.prisma +148 -0
- package/prisma/project/page.prisma +41 -0
- package/prisma/project/secret.prisma +42 -0
- package/prisma/project/service-account.prisma +36 -0
- package/prisma/project/terminal.prisma +90 -0
- package/prisma/project/trigger.prisma +31 -0
- package/prisma/project/unlock-method.prisma +32 -0
- package/prisma/project/worker.prisma +138 -0
- package/src/artifact/abstractions.ts +13 -13
- package/src/artifact/encryption.ts +31 -15
- package/src/artifact/factory.ts +7 -10
- package/src/artifact/local.ts +33 -50
- package/src/business/api-key.ts +24 -36
- package/src/business/artifact.test.ts +978 -0
- package/src/business/artifact.ts +136 -215
- package/src/business/evaluation.ts +328 -0
- package/src/business/index.ts +5 -1
- package/src/business/instance-lock.test.ts +1060 -0
- package/src/business/instance-lock.ts +387 -77
- package/src/business/instance-state.test.ts +735 -0
- package/src/business/instance-state.ts +604 -217
- package/src/business/operation.test.ts +439 -0
- package/src/business/operation.ts +174 -208
- package/src/business/project-model.ts +258 -0
- package/src/business/project-unlock.ts +172 -112
- package/src/business/project.ts +407 -0
- package/src/business/secret.test.ts +513 -0
- package/src/business/secret.ts +194 -131
- package/src/business/settings.test.ts +695 -0
- package/src/business/settings.ts +855 -0
- package/src/business/terminal-session.ts +90 -0
- package/src/business/unit-extra.test.ts +539 -0
- package/src/business/unit-extra.ts +160 -0
- package/src/business/worker.test.ts +391 -0
- package/src/business/worker.ts +250 -114
- package/src/common/codebase.ts +65 -0
- package/src/common/index.ts +3 -2
- package/src/common/logger.ts +5 -0
- package/src/common/utils.ts +4 -3
- package/src/config.ts +15 -12
- package/src/database/_generated/backend/postgresql/client.ts +72 -0
- package/src/database/_generated/backend/postgresql/commonInputTypes.ts +350 -0
- package/src/database/_generated/backend/postgresql/enums.ts +13 -0
- package/src/database/_generated/backend/postgresql/internal/class.ts +320 -0
- package/src/database/_generated/backend/postgresql/internal/prismaNamespace.ts +1238 -0
- package/src/database/_generated/backend/postgresql/models/Library.ts +1263 -0
- package/src/database/_generated/backend/postgresql/models/Project.ts +2175 -0
- package/src/database/_generated/backend/postgresql/models/ProjectModelStorage.ts +1263 -0
- package/src/database/_generated/backend/postgresql/models/ProjectSpace.ts +1602 -0
- package/src/database/_generated/backend/postgresql/models/PulumiBackend.ts +1263 -0
- package/src/database/_generated/backend/postgresql/models/UserWorkspaseLayout.ts +1065 -0
- package/src/database/_generated/backend/postgresql/models.ts +16 -0
- package/src/database/_generated/backend/postgresql/pjtg.ts +182 -0
- package/src/database/_generated/backend/sqlite/client.ts +72 -0
- package/src/database/_generated/backend/sqlite/commonInputTypes.ts +331 -0
- package/src/database/_generated/backend/sqlite/enums.ts +13 -0
- package/src/database/_generated/backend/sqlite/internal/class.ts +318 -0
- package/src/database/_generated/backend/sqlite/internal/prismaNamespace.ts +1207 -0
- package/src/database/_generated/backend/sqlite/models/Library.ts +1261 -0
- package/src/database/_generated/backend/sqlite/models/Project.ts +2169 -0
- package/src/database/_generated/backend/sqlite/models/ProjectModelStorage.ts +1261 -0
- package/src/database/_generated/backend/sqlite/models/ProjectSpace.ts +1599 -0
- package/src/database/_generated/backend/sqlite/models/PulumiBackend.ts +1261 -0
- package/src/database/_generated/backend/sqlite/models/UserWorkspaseLayout.ts +1063 -0
- package/src/database/_generated/backend/sqlite/models.ts +16 -0
- package/src/database/_generated/backend/sqlite/pjtg.ts +182 -0
- package/src/database/_generated/project/client.ts +204 -0
- package/src/database/_generated/project/commonInputTypes.ts +827 -0
- package/src/database/_generated/project/enums.ts +104 -0
- package/src/database/_generated/project/internal/class.ts +479 -0
- package/src/database/_generated/project/internal/prismaNamespace.ts +2974 -0
- package/src/database/_generated/project/models/ApiKey.ts +1506 -0
- package/src/database/_generated/project/models/Artifact.ts +2051 -0
- package/src/database/_generated/project/models/HubModel.ts +1125 -0
- package/src/database/_generated/project/models/InstanceCustomStatus.ts +1713 -0
- package/src/database/_generated/project/models/InstanceEvaluationState.ts +1312 -0
- package/src/database/_generated/project/models/InstanceLock.ts +1268 -0
- package/src/database/_generated/project/models/InstanceModel.ts +1125 -0
- package/src/database/_generated/project/models/InstanceOperationState.ts +1707 -0
- package/src/database/_generated/project/models/InstanceState.ts +4613 -0
- package/src/database/_generated/project/models/Operation.ts +1647 -0
- package/src/database/_generated/project/models/OperationLog.ts +1455 -0
- package/src/database/_generated/project/models/Page.ts +1838 -0
- package/src/database/_generated/project/models/Secret.ts +1692 -0
- package/src/database/_generated/project/models/ServiceAccount.ts +2165 -0
- package/src/database/_generated/project/models/Terminal.ts +2038 -0
- package/src/database/_generated/project/models/TerminalSession.ts +1454 -0
- package/src/database/_generated/project/models/TerminalSessionLog.ts +1280 -0
- package/src/database/_generated/project/models/Trigger.ts +1430 -0
- package/src/database/_generated/project/models/UnlockMethod.ts +1220 -0
- package/src/database/_generated/project/models/UserCompositeViewport.ts +1280 -0
- package/src/database/_generated/project/models/UserProjectViewport.ts +1059 -0
- package/src/database/_generated/project/models/Worker.ts +1459 -0
- package/src/database/_generated/project/models/WorkerUnitRegistration.ts +1524 -0
- package/src/database/_generated/project/models/WorkerVersion.ts +1974 -0
- package/src/database/_generated/project/models/WorkerVersionLog.ts +1318 -0
- package/src/database/_generated/project/models.ts +35 -0
- package/src/database/_generated/project/pjtg.ts +182 -0
- package/src/database/abstractions.ts +19 -0
- package/src/database/factory.ts +37 -0
- package/src/database/index.ts +6 -0
- package/src/database/local/backend.ts +134 -0
- package/src/database/local/index.ts +3 -0
- package/src/database/local/meta.ts +46 -0
- package/src/database/local/prisma.config.ts +25 -0
- package/src/database/local/project.ts +39 -0
- package/src/database/manager.ts +181 -0
- package/src/database/migrate.ts +35 -0
- package/src/database/prisma.ts +56 -0
- package/src/database/well-known.ts +38 -0
- package/src/index.ts +4 -4
- package/src/library/abstractions.ts +21 -14
- package/src/library/factory.ts +1 -1
- package/src/library/local.ts +86 -38
- package/src/library/package-resolution-worker.ts +1 -1
- package/src/library/worker/evaluator.ts +61 -48
- package/src/library/worker/loader.lite.ts +14 -1
- package/src/library/worker/main.ts +9 -16
- package/src/library/worker/protocol.ts +0 -12
- package/src/lock/manager.ts +12 -7
- package/src/orchestrator/manager.ts +198 -131
- package/src/orchestrator/operation-context.ts +357 -0
- package/src/orchestrator/operation-plan.destroy.test.md +357 -0
- package/src/orchestrator/operation-plan.destroy.test.ts +775 -0
- package/src/orchestrator/operation-plan.fixtures.ts +213 -0
- package/src/orchestrator/operation-plan.md +198 -0
- package/src/orchestrator/operation-plan.refresh.test.md +199 -0
- package/src/orchestrator/operation-plan.refresh.test.ts +367 -0
- package/src/orchestrator/operation-plan.ts +709 -0
- package/src/orchestrator/operation-plan.update.test.md +485 -0
- package/src/orchestrator/operation-plan.update.test.ts +1066 -0
- package/src/orchestrator/operation-workset.ts +235 -583
- package/src/orchestrator/operation.ts +446 -904
- package/src/orchestrator/plan-test-builder.ts +267 -0
- package/src/project-model/abstractions.ts +118 -0
- package/src/project-model/backends/codebase.ts +365 -0
- package/src/project-model/backends/database.ts +440 -0
- package/src/project-model/errors.ts +81 -0
- package/src/project-model/factory.ts +24 -0
- package/src/project-model/index.ts +4 -0
- package/src/project-model/utils.test.ts +544 -0
- package/src/project-model/utils.ts +242 -0
- package/src/pubsub/abstractions.ts +10 -1
- package/src/pubsub/factory.ts +4 -4
- package/src/pubsub/index.ts +1 -0
- package/src/pubsub/manager.ts +49 -25
- package/src/pubsub/memory.ts +31 -0
- package/src/runner/abstractions.ts +38 -26
- package/src/runner/artifact-env.ts +17 -6
- package/src/runner/factory.ts +6 -6
- package/src/runner/force-abort.ts +3 -6
- package/src/runner/local.ts +79 -72
- package/src/runner/pulumi.ts +26 -63
- package/src/services.ts +214 -103
- package/src/shared/models/backend/index.ts +3 -1
- package/src/shared/models/backend/library.ts +12 -4
- package/src/shared/models/backend/project.ts +43 -23
- package/src/shared/models/backend/pulumi.ts +14 -0
- package/src/shared/models/backend/unlock-method.ts +1 -1
- package/src/shared/models/backend/well-known.ts +58 -0
- package/src/shared/models/base.ts +40 -109
- package/src/shared/models/errors.ts +82 -1
- package/src/shared/models/index.ts +3 -2
- package/src/shared/models/prisma.ts +36 -0
- package/src/shared/models/project/api-key.ts +37 -56
- package/src/shared/models/project/artifact.ts +15 -105
- package/src/shared/models/project/custom-status.ts +12 -0
- package/src/shared/models/project/index.ts +9 -9
- package/src/shared/models/project/lock.ts +10 -78
- package/src/shared/models/project/model.ts +32 -0
- package/src/shared/models/project/operation.ts +222 -99
- package/src/shared/models/project/page.ts +37 -48
- package/src/shared/models/project/secret.ts +29 -103
- package/src/shared/models/project/service-account.ts +12 -17
- package/src/shared/models/project/state.ts +100 -390
- package/src/shared/models/project/terminal.ts +75 -89
- package/src/shared/models/project/trigger.ts +13 -49
- package/src/shared/models/project/unlock-method.ts +21 -20
- package/src/shared/models/project/worker.ts +89 -88
- package/src/shared/resolvers/graph-resolver.ts +62 -26
- package/src/shared/resolvers/index.ts +1 -1
- package/src/shared/resolvers/input-hash.ts +24 -14
- package/src/shared/resolvers/input.ts +48 -6
- package/src/shared/resolvers/registry.ts +5 -4
- package/src/shared/resolvers/state.ts +12 -1
- package/src/shared/resolvers/validation.ts +29 -9
- package/src/shared/utils/index.ts +1 -1
- package/src/shared/utils/promise-tracker.ts +30 -3
- package/src/terminal/abstractions.ts +1 -1
- package/src/terminal/docker.ts +3 -3
- package/src/terminal/manager.ts +102 -118
- package/src/test-utils/database.ts +119 -0
- package/src/test-utils/index.ts +2 -0
- package/src/test-utils/services.ts +134 -0
- package/src/unlock/abstractions.ts +31 -0
- package/src/unlock/index.ts +2 -0
- package/src/unlock/memory.ts +27 -0
- package/src/worker/abstractions.ts +7 -4
- package/src/worker/docker.ts +14 -19
- package/src/worker/manager.ts +376 -79
- package/dist/chunk-RCB4AFGD.js.map +0 -1
- package/dist/chunk-WHALQHEZ.js +0 -2017
- package/dist/chunk-WHALQHEZ.js.map +0 -1
- package/src/business/backend-unlock.ts +0 -10
- package/src/common/performance.ts +0 -44
- package/src/hotstate/abstractions.ts +0 -48
- package/src/hotstate/factory.ts +0 -17
- package/src/hotstate/index.ts +0 -3
- package/src/hotstate/manager.ts +0 -192
- package/src/hotstate/memory.ts +0 -100
- package/src/hotstate/validation.ts +0 -101
- package/src/project/abstractions.ts +0 -102
- package/src/project/factory.ts +0 -11
- package/src/project/index.ts +0 -3
- package/src/project/local.ts +0 -469
- package/src/project/manager.ts +0 -574
- package/src/pubsub/local.ts +0 -36
- package/src/pubsub/validation.ts +0 -33
- package/src/shared/models/project/component.ts +0 -45
- package/src/shared/models/project/instance.ts +0 -74
- package/src/state/abstractions.ts +0 -450
- package/src/state/encryption.ts +0 -59
- package/src/state/factory.ts +0 -20
- package/src/state/index.ts +0 -6
- package/src/state/local/backend.ts +0 -299
- package/src/state/local/collection.ts +0 -342
- package/src/state/local/index.ts +0 -2
- package/src/state/manager.ts +0 -819
- package/src/state/repository/index.ts +0 -2
- package/src/state/repository/repository.index.ts +0 -193
- package/src/state/repository/repository.ts +0 -458
- /package/src/{state → database/local}/keyring.ts +0 -0
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
/**
|
|
5
|
+
* WARNING: This is an internal file that is subject to change!
|
|
6
|
+
*
|
|
7
|
+
* 🛑 Under no circumstances should you import this file directly! 🛑
|
|
8
|
+
*
|
|
9
|
+
* Please import the `PrismaClient` class from the `client.ts` file instead.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import * as runtime from "@prisma/client/runtime/client"
|
|
13
|
+
import type * as Prisma from "./prismaNamespace.ts"
|
|
14
|
+
|
|
15
|
+
const config: runtime.GetPrismaClientConfig = {
|
|
16
|
+
generator: {
|
|
17
|
+
name: "client",
|
|
18
|
+
provider: {
|
|
19
|
+
fromEnvVar: null,
|
|
20
|
+
value: "prisma-client",
|
|
21
|
+
},
|
|
22
|
+
output: {
|
|
23
|
+
value:
|
|
24
|
+
"/home/exeteres/Projects/personal/highstate/packages/platform/backend/src/database/_generated/backend/sqlite",
|
|
25
|
+
fromEnvVar: null,
|
|
26
|
+
},
|
|
27
|
+
config: {
|
|
28
|
+
importFileExtension: "ts",
|
|
29
|
+
moduleFormat: "esm",
|
|
30
|
+
generatedFileExtension: "ts",
|
|
31
|
+
engineType: "client",
|
|
32
|
+
},
|
|
33
|
+
binaryTargets: [
|
|
34
|
+
{
|
|
35
|
+
fromEnvVar: null,
|
|
36
|
+
value: "linux-nixos",
|
|
37
|
+
native: true,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
previewFeatures: ["driverAdapters", "queryCompiler"],
|
|
41
|
+
sourceFilePath:
|
|
42
|
+
"/home/exeteres/Projects/personal/highstate/packages/platform/backend/prisma/backend/sqlite/main.prisma",
|
|
43
|
+
isCustomOutput: true,
|
|
44
|
+
},
|
|
45
|
+
relativePath: "../../../../../prisma/backend/sqlite",
|
|
46
|
+
clientVersion: "6.14.0",
|
|
47
|
+
engineVersion: "717184b7b35ea05dfa71a3236b7af656013e1e49",
|
|
48
|
+
datasourceNames: ["db"],
|
|
49
|
+
activeProvider: "sqlite",
|
|
50
|
+
postinstall: false,
|
|
51
|
+
inlineDatasources: {
|
|
52
|
+
db: {
|
|
53
|
+
url: {
|
|
54
|
+
fromEnvVar: null,
|
|
55
|
+
value: "<invalid>",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
inlineSchema:
|
|
60
|
+
'model UserWorkspaseLayout {\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 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 date and time when the project was created.\n createdAt DateTime @default(now())\n\n /// The date and 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\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\ndatasource db {\n provider = "sqlite"\n directUrl = 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',
|
|
61
|
+
inlineSchemaHash: "5f72ff333e4519a038ec922562f162a877719127538df9de3cc6af3d476a0ef7",
|
|
62
|
+
copyEngine: true,
|
|
63
|
+
runtimeDataModel: {
|
|
64
|
+
models: {},
|
|
65
|
+
enums: {},
|
|
66
|
+
types: {},
|
|
67
|
+
},
|
|
68
|
+
dirname: "",
|
|
69
|
+
}
|
|
70
|
+
|
|
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
|
+
)
|
|
74
|
+
config.engineWasm = undefined
|
|
75
|
+
|
|
76
|
+
async function decodeBase64AsWasm(wasmBase64: string): Promise<WebAssembly.Module> {
|
|
77
|
+
const { Buffer } = await import("node:buffer")
|
|
78
|
+
const base64Data = wasmBase64.replace("data:application/wasm;base64,", "")
|
|
79
|
+
const wasmArray = new Uint8Array(Buffer.from(base64Data, "base64"))
|
|
80
|
+
return new WebAssembly.Module(wasmArray)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
config.compilerWasm = {
|
|
84
|
+
getRuntime: async () => await import("@prisma/client/runtime/query_compiler_bg.sqlite.mjs"),
|
|
85
|
+
|
|
86
|
+
getQueryCompilerWasmModule: async () => {
|
|
87
|
+
const { wasm } = await import("@prisma/client/runtime/query_compiler_bg.sqlite.wasm-base64.mjs")
|
|
88
|
+
return await decodeBase64AsWasm(wasm)
|
|
89
|
+
},
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export type LogOptions<ClientOptions extends Prisma.PrismaClientOptions> =
|
|
93
|
+
"log" extends keyof ClientOptions
|
|
94
|
+
? ClientOptions["log"] extends Array<Prisma.LogLevel | Prisma.LogDefinition>
|
|
95
|
+
? Prisma.GetEvents<ClientOptions["log"]>
|
|
96
|
+
: never
|
|
97
|
+
: never
|
|
98
|
+
|
|
99
|
+
export interface PrismaClientConstructor {
|
|
100
|
+
/**
|
|
101
|
+
* ## Prisma Client
|
|
102
|
+
*
|
|
103
|
+
* Type-safe database client for TypeScript
|
|
104
|
+
* @example
|
|
105
|
+
* ```
|
|
106
|
+
* const prisma = new PrismaClient()
|
|
107
|
+
* // Fetch zero or more UserWorkspaseLayouts
|
|
108
|
+
* const userWorkspaseLayouts = await prisma.userWorkspaseLayout.findMany()
|
|
109
|
+
* ```
|
|
110
|
+
*
|
|
111
|
+
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
new <
|
|
115
|
+
Options extends Prisma.PrismaClientOptions,
|
|
116
|
+
LogOpts extends LogOptions<Options>,
|
|
117
|
+
OmitOpts extends Prisma.PrismaClientOptions["omit"] = Options extends { omit: infer U }
|
|
118
|
+
? U
|
|
119
|
+
: Prisma.PrismaClientOptions["omit"],
|
|
120
|
+
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
|
|
121
|
+
>(
|
|
122
|
+
options?: Prisma.Subset<Options, Prisma.PrismaClientOptions>,
|
|
123
|
+
): PrismaClient<LogOpts, OmitOpts, ExtArgs>
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* ## Prisma Client
|
|
128
|
+
*
|
|
129
|
+
* Type-safe database client for TypeScript
|
|
130
|
+
* @example
|
|
131
|
+
* ```
|
|
132
|
+
* const prisma = new PrismaClient()
|
|
133
|
+
* // Fetch zero or more UserWorkspaseLayouts
|
|
134
|
+
* const userWorkspaseLayouts = await prisma.userWorkspaseLayout.findMany()
|
|
135
|
+
* ```
|
|
136
|
+
*
|
|
137
|
+
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
export interface PrismaClient<
|
|
141
|
+
in LogOpts extends Prisma.LogLevel = never,
|
|
142
|
+
in out OmitOpts extends Prisma.PrismaClientOptions["omit"] = Prisma.PrismaClientOptions["omit"],
|
|
143
|
+
in out ExtArgs extends
|
|
144
|
+
runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
|
|
145
|
+
> {
|
|
146
|
+
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>["other"] }
|
|
147
|
+
|
|
148
|
+
$on<V extends LogOpts>(
|
|
149
|
+
eventType: V,
|
|
150
|
+
callback: (event: V extends "query" ? Prisma.QueryEvent : Prisma.LogEvent) => void,
|
|
151
|
+
): PrismaClient
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Connect with the database
|
|
155
|
+
*/
|
|
156
|
+
$connect(): runtime.Types.Utils.JsPromise<void>
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Disconnect from the database
|
|
160
|
+
*/
|
|
161
|
+
$disconnect(): runtime.Types.Utils.JsPromise<void>
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Executes a prepared raw query and returns the number of affected rows.
|
|
165
|
+
* @example
|
|
166
|
+
* ```
|
|
167
|
+
* const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
|
|
168
|
+
* ```
|
|
169
|
+
*
|
|
170
|
+
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
|
|
171
|
+
*/
|
|
172
|
+
$executeRaw<T = unknown>(
|
|
173
|
+
query: TemplateStringsArray | Prisma.Sql,
|
|
174
|
+
...values: any[]
|
|
175
|
+
): Prisma.PrismaPromise<number>
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Executes a raw query and returns the number of affected rows.
|
|
179
|
+
* Susceptible to SQL injections, see documentation.
|
|
180
|
+
* @example
|
|
181
|
+
* ```
|
|
182
|
+
* const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
|
|
183
|
+
* ```
|
|
184
|
+
*
|
|
185
|
+
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
|
|
186
|
+
*/
|
|
187
|
+
$executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Performs a prepared raw query and returns the `SELECT` data.
|
|
191
|
+
* @example
|
|
192
|
+
* ```
|
|
193
|
+
* const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
|
|
197
|
+
*/
|
|
198
|
+
$queryRaw<T = unknown>(
|
|
199
|
+
query: TemplateStringsArray | Prisma.Sql,
|
|
200
|
+
...values: any[]
|
|
201
|
+
): Prisma.PrismaPromise<T>
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Performs a raw query and returns the `SELECT` data.
|
|
205
|
+
* Susceptible to SQL injections, see documentation.
|
|
206
|
+
* @example
|
|
207
|
+
* ```
|
|
208
|
+
* const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
|
|
209
|
+
* ```
|
|
210
|
+
*
|
|
211
|
+
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
|
|
212
|
+
*/
|
|
213
|
+
$queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
|
|
217
|
+
* @example
|
|
218
|
+
* ```
|
|
219
|
+
* const [george, bob, alice] = await prisma.$transaction([
|
|
220
|
+
* prisma.user.create({ data: { name: 'George' } }),
|
|
221
|
+
* prisma.user.create({ data: { name: 'Bob' } }),
|
|
222
|
+
* prisma.user.create({ data: { name: 'Alice' } }),
|
|
223
|
+
* ])
|
|
224
|
+
* ```
|
|
225
|
+
*
|
|
226
|
+
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
|
|
227
|
+
*/
|
|
228
|
+
$transaction<P extends Prisma.PrismaPromise<any>[]>(
|
|
229
|
+
arg: [...P],
|
|
230
|
+
options?: { isolationLevel?: Prisma.TransactionIsolationLevel },
|
|
231
|
+
): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>
|
|
232
|
+
|
|
233
|
+
$transaction<R>(
|
|
234
|
+
fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => runtime.Types.Utils.JsPromise<R>,
|
|
235
|
+
options?: {
|
|
236
|
+
maxWait?: number
|
|
237
|
+
timeout?: number
|
|
238
|
+
isolationLevel?: Prisma.TransactionIsolationLevel
|
|
239
|
+
},
|
|
240
|
+
): runtime.Types.Utils.JsPromise<R>
|
|
241
|
+
|
|
242
|
+
$extends: runtime.Types.Extensions.ExtendsHook<
|
|
243
|
+
"extends",
|
|
244
|
+
Prisma.TypeMapCb<OmitOpts>,
|
|
245
|
+
ExtArgs,
|
|
246
|
+
runtime.Types.Utils.Call<
|
|
247
|
+
Prisma.TypeMapCb<OmitOpts>,
|
|
248
|
+
{
|
|
249
|
+
extArgs: ExtArgs
|
|
250
|
+
}
|
|
251
|
+
>
|
|
252
|
+
>
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* `prisma.userWorkspaseLayout`: Exposes CRUD operations for the **UserWorkspaseLayout** model.
|
|
256
|
+
* Example usage:
|
|
257
|
+
* ```ts
|
|
258
|
+
* // Fetch zero or more UserWorkspaseLayouts
|
|
259
|
+
* const userWorkspaseLayouts = await prisma.userWorkspaseLayout.findMany()
|
|
260
|
+
* ```
|
|
261
|
+
*/
|
|
262
|
+
get userWorkspaseLayout(): Prisma.UserWorkspaseLayoutDelegate<ExtArgs, { omit: OmitOpts }>
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* `prisma.library`: Exposes CRUD operations for the **Library** model.
|
|
266
|
+
* Example usage:
|
|
267
|
+
* ```ts
|
|
268
|
+
* // Fetch zero or more Libraries
|
|
269
|
+
* const libraries = await prisma.library.findMany()
|
|
270
|
+
* ```
|
|
271
|
+
*/
|
|
272
|
+
get library(): Prisma.LibraryDelegate<ExtArgs, { omit: OmitOpts }>
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* `prisma.project`: Exposes CRUD operations for the **Project** model.
|
|
276
|
+
* Example usage:
|
|
277
|
+
* ```ts
|
|
278
|
+
* // Fetch zero or more Projects
|
|
279
|
+
* const projects = await prisma.project.findMany()
|
|
280
|
+
* ```
|
|
281
|
+
*/
|
|
282
|
+
get project(): Prisma.ProjectDelegate<ExtArgs, { omit: OmitOpts }>
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* `prisma.projectSpace`: Exposes CRUD operations for the **ProjectSpace** model.
|
|
286
|
+
* Example usage:
|
|
287
|
+
* ```ts
|
|
288
|
+
* // Fetch zero or more ProjectSpaces
|
|
289
|
+
* const projectSpaces = await prisma.projectSpace.findMany()
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
get projectSpace(): Prisma.ProjectSpaceDelegate<ExtArgs, { omit: OmitOpts }>
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* `prisma.projectModelStorage`: Exposes CRUD operations for the **ProjectModelStorage** model.
|
|
296
|
+
* Example usage:
|
|
297
|
+
* ```ts
|
|
298
|
+
* // Fetch zero or more ProjectModelStorages
|
|
299
|
+
* const projectModelStorages = await prisma.projectModelStorage.findMany()
|
|
300
|
+
* ```
|
|
301
|
+
*/
|
|
302
|
+
get projectModelStorage(): Prisma.ProjectModelStorageDelegate<ExtArgs, { omit: OmitOpts }>
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* `prisma.pulumiBackend`: Exposes CRUD operations for the **PulumiBackend** model.
|
|
306
|
+
* Example usage:
|
|
307
|
+
* ```ts
|
|
308
|
+
* // Fetch zero or more PulumiBackends
|
|
309
|
+
* const pulumiBackends = await prisma.pulumiBackend.findMany()
|
|
310
|
+
* ```
|
|
311
|
+
*/
|
|
312
|
+
get pulumiBackend(): Prisma.PulumiBackendDelegate<ExtArgs, { omit: OmitOpts }>
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export function getPrismaClientClass(dirname: string): PrismaClientConstructor {
|
|
316
|
+
config.dirname = dirname
|
|
317
|
+
return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor
|
|
318
|
+
}
|