@codemation/host 0.0.5 → 0.0.11
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/README.md +3 -3
- package/dist/{PrismaMigrationDeployer-B7cHGrXP.js → AppConfigFactory-DWIz2hy-.js} +104 -58
- package/dist/AppConfigFactory-DWIz2hy-.js.map +1 -0
- package/dist/{client-Yh7-CQud.d.ts → AppConfigFactory-DmHOpg8O.d.ts} +52 -31
- package/dist/{CodemationFrontendBootstrapRequest-CNEk-C4D.js → AppContainerFactory-B5eRpvAa.js} +3269 -3374
- package/dist/AppContainerFactory-B5eRpvAa.js.map +1 -0
- package/dist/{CodemationWhitelabelConfig-DgbjgtrR.d.ts → CodemationAuthConfig-Bh2cCNCI.d.ts} +32 -2
- package/dist/{CodemationConfig-XCkSV2dj.d.ts → CodemationConfig-D2ULNkec.d.ts} +53 -49
- package/dist/CodemationConfigNormalizer-CBLxXaRV.d.ts +9 -0
- package/dist/{CodemationConsumerConfigLoader-scS_RQMy.js → CodemationConsumerConfigLoader-BBzAr6L_.js} +128 -3
- package/dist/CodemationConsumerConfigLoader-BBzAr6L_.js.map +1 -0
- package/dist/{CodemationConsumerConfigLoader-Dmm2TzAA.d.ts → CodemationConsumerConfigLoader-BLvzcfb7.d.ts} +4 -4
- package/dist/CodemationPluginListMerger-B0-e4CJ6.d.ts +391 -0
- package/dist/{CodemationPluginListMerger-BNmaoXQL.js → CodemationPluginListMerger-DrVOw9KP.js} +18 -10
- package/dist/CodemationPluginListMerger-DrVOw9KP.js.map +1 -0
- package/dist/{CredentialServices-DpDpm8mL.d.ts → CredentialServices-BeuMtqYA.d.ts} +3 -3
- package/dist/{CredentialServices-BKBGe7l3.js → CredentialServices-DNb3CZwW.js} +3 -3
- package/dist/CredentialServices-DNb3CZwW.js.map +1 -0
- package/dist/FrontendAppConfig-D50wjj_n.d.ts +27 -0
- package/dist/{WorkflowViewContracts-DCLpTn25.d.ts → FrontendAppConfigFactory-Bj-DZNlt.d.ts} +29 -2
- package/dist/FrontendAppConfigJsonCodec-1_L7H_Qo.d.ts +20 -0
- package/dist/FrontendAppConfigJsonCodec-nOCQI0ag.js +84 -0
- package/dist/FrontendAppConfigJsonCodec-nOCQI0ag.js.map +1 -0
- package/dist/{LogLevelPolicy-4cq9z0TI.d.ts → LogLevelPolicy-BS_NlAOg.d.ts} +2 -2
- package/dist/{ServerLoggerFactory-BRHxIDS7.js → ServerLoggerFactory-BltIIDfQ.js} +4 -129
- package/dist/ServerLoggerFactory-BltIIDfQ.js.map +1 -0
- package/dist/client.d.ts +5 -3
- package/dist/client.js +2 -1
- package/dist/client.js.map +1 -1
- package/dist/consumer.d.ts +5 -4
- package/dist/consumer.js +4 -4
- package/dist/credentials.d.ts +4 -4
- package/dist/credentials.js +3 -3
- package/dist/devServerSidecar.d.ts +1 -1
- package/dist/{index-Bs4F1IsC.d.ts → index-CkiptHb-.d.ts} +19 -20
- package/dist/index.d.ts +14 -19
- package/dist/index.js +12 -11
- package/dist/nextServer.d.ts +244 -9
- package/dist/nextServer.js +8 -8
- package/dist/persistenceServer-CaehMh3M.d.ts +9 -0
- package/dist/{persistenceServer-8tcM2S48.js → persistenceServer-DVeWUbc3.js} +2 -2
- package/dist/{persistenceServer-8tcM2S48.js.map → persistenceServer-DVeWUbc3.js.map} +1 -1
- package/dist/persistenceServer.d.ts +7 -6
- package/dist/persistenceServer.js +4 -4
- package/dist/{server-Dd65rNm6.js → server-C65z_kqm.js} +47 -17
- package/dist/server-C65z_kqm.js.map +1 -0
- package/dist/{server-BBdsATju.d.ts → server-Dyo8qh4k.d.ts} +23 -4
- package/dist/server.d.ts +12 -9
- package/dist/server.js +11 -10
- package/package.json +11 -6
- package/prisma/migrations/20260315063514_init/migration.sql +16 -16
- package/prisma/migrations/20260316090000_workflow_debugger_overlay/migration.sql +9 -9
- package/prisma/migrations/20260317120000_trigger_state_store/migration.sql +3 -3
- package/prisma/migrations/20260317153000_trigger_setup_state/migration.sql +8 -8
- package/prisma/migrations/20260318110000_credentials_v2/migration.sql +49 -49
- package/prisma/migrations/20260319110000_credential_oauth2_material/migration.sql +28 -28
- package/prisma/migrations/20260319200000_codemation_auth_tables/migration.sql +56 -56
- package/prisma/migrations/20260320140000_user_invites_account_status/migration.sql +20 -20
- package/prisma/migrations/20260325120000_workflow_activation/migration.sql +8 -8
- package/prisma/migrations/migration_lock.toml +3 -3
- package/prisma/schema.prisma +179 -179
- package/prisma.config.ts +15 -2
- package/src/application/commands/WorkflowCommandHandlers.ts +9 -0
- package/src/application/dev/BootRuntimeSnapshotHolder.ts +2 -2
- package/src/application/dev/BootRuntimeSummary.types.ts +2 -2
- package/src/application/queries/WorkflowQueryHandlers.ts +7 -0
- package/src/applicationTokens.ts +1 -1
- package/src/bootstrap/AppContainerFactory.ts +584 -0
- package/src/bootstrap/{PreparedCodemationRuntime.ts → AppContainerLifecycle.ts} +3 -8
- package/src/bootstrap/runtime/AppConfigFactory.ts +155 -30
- package/src/bootstrap/runtime/DatabaseMigrations.ts +18 -0
- package/src/bootstrap/runtime/FrontendRuntime.ts +44 -0
- package/src/bootstrap/runtime/WorkerRuntime.ts +55 -0
- package/src/client.ts +7 -0
- package/src/index.ts +15 -5
- package/src/infrastructure/persistence/PrismaMigrationDeployer.ts +2 -2
- package/src/infrastructure/persistence/SchedulerPersistenceCompatibilityValidator.ts +2 -2
- package/src/infrastructure/scheduler/WorkerRuntimeScheduler.ts +16 -0
- package/src/infrastructure/scheduler/bullmq/BullmqNodeExecutionScheduler.ts +47 -0
- package/src/infrastructure/scheduler/bullmq/BullmqScheduler.ts +33 -0
- package/src/infrastructure/scheduler/bullmq/BullmqWorker.ts +48 -0
- package/src/infrastructure/scheduler/bullmq/RedisConnectionOptionsFactory.ts +48 -0
- package/src/nextServer.ts +12 -3
- package/src/persistenceServer.ts +2 -2
- package/src/presentation/config/AppConfig.ts +25 -1
- package/src/presentation/frontend/CodemationFrontendAuthSnapshot.ts +14 -0
- package/src/presentation/frontend/CodemationFrontendAuthSnapshotFactory.ts +84 -0
- package/src/presentation/frontend/CodemationFrontendAuthSnapshotJsonCodec.ts +58 -0
- package/src/presentation/frontend/FrontendAppConfig.ts +10 -0
- package/src/presentation/frontend/FrontendAppConfigFactory.ts +26 -0
- package/src/presentation/frontend/FrontendAppConfigJsonCodec.ts +58 -0
- package/src/presentation/http/CodemationServerGatewayFactory.ts +22 -16
- package/src/presentation/server/AppConfigLoader.ts +39 -0
- package/src/presentation/server/CodemationConsumerAppResolver.ts +2 -2
- package/src/presentation/server/CodemationConsumerConfigLoader.ts +3 -2
- package/src/server.ts +7 -0
- package/vitest.shared.ts +0 -4
- package/dist/CodemationConsumerConfigLoader-scS_RQMy.js.map +0 -1
- package/dist/CodemationFrontendBootstrapRequest-CNEk-C4D.js.map +0 -1
- package/dist/CodemationPluginListMerger-BNmaoXQL.js.map +0 -1
- package/dist/CodemationPluginListMerger-BRYqEk0y.d.ts +0 -793
- package/dist/CredentialServices-BKBGe7l3.js.map +0 -1
- package/dist/PrismaMigrationDeployer-B7cHGrXP.js.map +0 -1
- package/dist/ServerLoggerFactory-BRHxIDS7.js.map +0 -1
- package/dist/persistenceServer-DPSj_-oU.d.ts +0 -37
- package/dist/server-Dd65rNm6.js.map +0 -1
- package/src/bootstrap/CodemationContainerFactory.ts +0 -310
- package/src/bootstrap/CodemationFrontendBootstrapRequest.ts +0 -16
- package/src/bootstrap/CodemationWorkerBootstrapRequest.ts +0 -19
- package/src/bootstrap/PreparedCodemationRuntimeFactory.ts +0 -308
- package/src/bootstrap/boot/CliRuntimeBootService.ts +0 -27
- package/src/bootstrap/boot/FrontendRuntimeBootService.ts +0 -86
- package/src/bootstrap/boot/WorkerRuntimeBootService.ts +0 -64
- package/src/bootstrap/runtime/ResolvedImplementationSelectionFactory.ts +0 -118
- package/src/codemationApplication.ts +0 -311
- package/src/infrastructure/credentials/FrameworkBuiltinCredentialTypesRegistrar.ts +0 -21
- package/src/infrastructure/persistence/DatabasePersistenceResolver.ts +0 -91
- package/src/infrastructure/persistence/generated/prisma/client.d.ts +0 -1
- package/src/infrastructure/persistence/generated/prisma/default.d.ts +0 -1
- package/src/infrastructure/persistence/generated/prisma/edge.d.ts +0 -1
- package/src/infrastructure/persistence/generated/prisma/index.d.ts +0 -4766
- package/src/infrastructure/persistence/generated/prisma/package.json +0 -144
- package/src/infrastructure/persistence/generated/prisma/query_compiler_fast_bg.wasm +0 -0
- package/src/infrastructure/persistence/generated/prisma/runtime/client.d.ts +0 -3358
- package/src/infrastructure/persistence/generated/prisma/runtime/index-browser.d.ts +0 -90
- package/src/infrastructure/persistence/generated/prisma/schema.prisma +0 -35
- package/src/infrastructure/persistence/generated/prisma/wasm-edge-light-loader.mjs +0 -5
- package/src/infrastructure/persistence/generated/prisma/wasm-worker-loader.mjs +0 -5
- package/src/infrastructure/runtime/WorkerRuntimeScheduler.ts +0 -35
- package/src/presentation/config/CodemationApplicationFacade.ts +0 -5
- /package/dist/{decorate-B-N_5S4p.js → decorate-B0PP651O.js} +0 -0
- /package/dist/{decorateParam-BTcc3KNk.js → decorateParam-DrsXNPuw.js} +0 -0
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { AnyNull } from '@prisma/client-runtime-utils';
|
|
2
|
-
import { DbNull } from '@prisma/client-runtime-utils';
|
|
3
|
-
import { Decimal } from '@prisma/client-runtime-utils';
|
|
4
|
-
import { isAnyNull } from '@prisma/client-runtime-utils';
|
|
5
|
-
import { isDbNull } from '@prisma/client-runtime-utils';
|
|
6
|
-
import { isJsonNull } from '@prisma/client-runtime-utils';
|
|
7
|
-
import { isObjectEnumValue } from '@prisma/client-runtime-utils';
|
|
8
|
-
import { JsonNull } from '@prisma/client-runtime-utils';
|
|
9
|
-
import { NullTypes } from '@prisma/client-runtime-utils';
|
|
10
|
-
|
|
11
|
-
export { AnyNull }
|
|
12
|
-
|
|
13
|
-
declare type Args<T, F extends Operation> = T extends {
|
|
14
|
-
[K: symbol]: {
|
|
15
|
-
types: {
|
|
16
|
-
operations: {
|
|
17
|
-
[K in F]: {
|
|
18
|
-
args: any;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
} ? T[symbol]['types']['operations'][F]['args'] : any;
|
|
24
|
-
|
|
25
|
-
export { DbNull }
|
|
26
|
-
|
|
27
|
-
export { Decimal }
|
|
28
|
-
|
|
29
|
-
declare type Exact<A, W> = (A extends unknown ? (W extends A ? {
|
|
30
|
-
[K in keyof A]: Exact<A[K], W[K]>;
|
|
31
|
-
} : W) : never) | (A extends Narrowable ? A : never);
|
|
32
|
-
|
|
33
|
-
export declare function getRuntime(): GetRuntimeOutput;
|
|
34
|
-
|
|
35
|
-
declare type GetRuntimeOutput = {
|
|
36
|
-
id: RuntimeName;
|
|
37
|
-
prettyName: string;
|
|
38
|
-
isEdge: boolean;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export { isAnyNull }
|
|
42
|
-
|
|
43
|
-
export { isDbNull }
|
|
44
|
-
|
|
45
|
-
export { isJsonNull }
|
|
46
|
-
|
|
47
|
-
export { isObjectEnumValue }
|
|
48
|
-
|
|
49
|
-
export { JsonNull }
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Generates more strict variant of an enum which, unlike regular enum,
|
|
53
|
-
* throws on non-existing property access. This can be useful in following situations:
|
|
54
|
-
* - we have an API, that accepts both `undefined` and `SomeEnumType` as an input
|
|
55
|
-
* - enum values are generated dynamically from DMMF.
|
|
56
|
-
*
|
|
57
|
-
* In that case, if using normal enums and no compile-time typechecking, using non-existing property
|
|
58
|
-
* will result in `undefined` value being used, which will be accepted. Using strict enum
|
|
59
|
-
* in this case will help to have a runtime exception, telling you that you are probably doing something wrong.
|
|
60
|
-
*
|
|
61
|
-
* Note: if you need to check for existence of a value in the enum you can still use either
|
|
62
|
-
* `in` operator or `hasOwnProperty` function.
|
|
63
|
-
*
|
|
64
|
-
* @param definition
|
|
65
|
-
* @returns
|
|
66
|
-
*/
|
|
67
|
-
export declare function makeStrictEnum<T extends Record<PropertyKey, string | number>>(definition: T): T;
|
|
68
|
-
|
|
69
|
-
declare type Narrowable = string | number | bigint | boolean | [];
|
|
70
|
-
|
|
71
|
-
export { NullTypes }
|
|
72
|
-
|
|
73
|
-
declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'updateManyAndReturn' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw';
|
|
74
|
-
|
|
75
|
-
declare namespace Public {
|
|
76
|
-
export {
|
|
77
|
-
validator
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
export { Public }
|
|
81
|
-
|
|
82
|
-
declare type RuntimeName = 'workerd' | 'deno' | 'netlify' | 'node' | 'bun' | 'edge-light' | '';
|
|
83
|
-
|
|
84
|
-
declare function validator<V>(): <S>(select: Exact<S, V>) => S;
|
|
85
|
-
|
|
86
|
-
declare function validator<C, M extends Exclude<keyof C, `$${string}`>, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): <S>(select: Exact<S, Args<C[M], O>>) => S;
|
|
87
|
-
|
|
88
|
-
declare function validator<C, M extends Exclude<keyof C, `$${string}`>, O extends keyof C[M] & Operation, P extends keyof Args<C[M], O>>(client: C, model: M, operation: O, prop: P): <S>(select: Exact<S, Args<C[M], O>[P]>) => S;
|
|
89
|
-
|
|
90
|
-
export { }
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
generator client {
|
|
2
|
-
provider = "prisma-client-js"
|
|
3
|
-
output = "../src/infrastructure/persistence/generated/prisma"
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
datasource db {
|
|
7
|
-
provider = "postgresql"
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
model Run {
|
|
11
|
-
runId String @id @map("run_id")
|
|
12
|
-
workflowId String @map("workflow_id")
|
|
13
|
-
startedAt String @map("started_at")
|
|
14
|
-
status String
|
|
15
|
-
parentJson String? @map("parent_json")
|
|
16
|
-
executionOptionsJson String? @map("execution_options_json")
|
|
17
|
-
updatedAt String @map("updated_at")
|
|
18
|
-
stateJson String @map("state_json")
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
model WorkflowDebuggerOverlay {
|
|
22
|
-
workflowId String @id @map("workflow_id")
|
|
23
|
-
updatedAt String @map("updated_at")
|
|
24
|
-
copiedFromRunId String? @map("copied_from_run_id")
|
|
25
|
-
stateJson String @map("state_json")
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
model TriggerSetupState {
|
|
29
|
-
workflowId String @map("workflow_id")
|
|
30
|
-
nodeId String @map("node_id")
|
|
31
|
-
updatedAt String @map("updated_at")
|
|
32
|
-
stateJson String @map("state_json")
|
|
33
|
-
|
|
34
|
-
@@id([workflowId, nodeId])
|
|
35
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
BinaryStorage,
|
|
3
|
-
CredentialSessionService,
|
|
4
|
-
EngineExecutionLimitsPolicy,
|
|
5
|
-
NodeActivationContinuation,
|
|
6
|
-
NodeExecutionScheduler,
|
|
7
|
-
NodeResolver,
|
|
8
|
-
WorkflowExecutionRepository,
|
|
9
|
-
WorkflowDefinition,
|
|
10
|
-
WorkflowId,
|
|
11
|
-
} from "@codemation/core";
|
|
12
|
-
|
|
13
|
-
export type WorkerRuntimeHandle = Readonly<{
|
|
14
|
-
stop: () => Promise<void>;
|
|
15
|
-
}>;
|
|
16
|
-
|
|
17
|
-
export interface WorkerRuntimeScheduler extends NodeExecutionScheduler {
|
|
18
|
-
createWorker(
|
|
19
|
-
args: Readonly<{
|
|
20
|
-
queues: ReadonlyArray<string>;
|
|
21
|
-
workflowsById: ReadonlyMap<WorkflowId, WorkflowDefinition>;
|
|
22
|
-
nodeResolver: NodeResolver;
|
|
23
|
-
credentialSessions: CredentialSessionService;
|
|
24
|
-
workflowExecutionRepository: WorkflowExecutionRepository;
|
|
25
|
-
continuation: NodeActivationContinuation;
|
|
26
|
-
binaryStorage?: BinaryStorage;
|
|
27
|
-
workflows?: unknown;
|
|
28
|
-
now?: () => Date;
|
|
29
|
-
/** When set, must match the host engine policy so worker execution contexts use the same limits as `runtime.engineExecutionLimits`. */
|
|
30
|
-
executionLimitsPolicy?: EngineExecutionLimitsPolicy;
|
|
31
|
-
}>,
|
|
32
|
-
): WorkerRuntimeHandle;
|
|
33
|
-
|
|
34
|
-
close(): Promise<void>;
|
|
35
|
-
}
|
|
File without changes
|
|
File without changes
|