@baseplate-dev/project-builder-server 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +390 -0
- package/dist/api/context.d.ts +15 -0
- package/dist/api/context.d.ts.map +1 -0
- package/dist/api/context.js +21 -0
- package/dist/api/context.js.map +1 -0
- package/dist/api/index.d.ts +287 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +12 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/plugins.d.ts +35 -0
- package/dist/api/plugins.d.ts.map +1 -0
- package/dist/api/plugins.js +13 -0
- package/dist/api/plugins.js.map +1 -0
- package/dist/api/projects.d.ts +62 -0
- package/dist/api/projects.d.ts.map +1 -0
- package/dist/api/projects.js +64 -0
- package/dist/api/projects.js.map +1 -0
- package/dist/api/sync.d.ts +134 -0
- package/dist/api/sync.d.ts.map +1 -0
- package/dist/api/sync.js +90 -0
- package/dist/api/sync.js.map +1 -0
- package/dist/api/trpc.d.ts +50 -0
- package/dist/api/trpc.d.ts.map +1 -0
- package/dist/api/trpc.js +39 -0
- package/dist/api/trpc.js.map +1 -0
- package/dist/api/types.d.ts +13 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +2 -0
- package/dist/api/types.js.map +1 -0
- package/dist/api/version.d.ts +40 -0
- package/dist/api/version.d.ts.map +1 -0
- package/dist/api/version.js +9 -0
- package/dist/api/version.js.map +1 -0
- package/dist/compiler/admin/crud/displays.d.ts +5 -0
- package/dist/compiler/admin/crud/displays.d.ts.map +1 -0
- package/dist/compiler/admin/crud/displays.js +46 -0
- package/dist/compiler/admin/crud/displays.js.map +1 -0
- package/dist/compiler/admin/crud/index.d.ts +5 -0
- package/dist/compiler/admin/crud/index.d.ts.map +1 -0
- package/dist/compiler/admin/crud/index.js +90 -0
- package/dist/compiler/admin/crud/index.js.map +1 -0
- package/dist/compiler/admin/crud/inputs.d.ts +5 -0
- package/dist/compiler/admin/crud/inputs.d.ts.map +1 -0
- package/dist/compiler/admin/crud/inputs.js +146 -0
- package/dist/compiler/admin/crud/inputs.js.map +1 -0
- package/dist/compiler/admin/index.d.ts +3 -0
- package/dist/compiler/admin/index.d.ts.map +1 -0
- package/dist/compiler/admin/index.js +95 -0
- package/dist/compiler/admin/index.js.map +1 -0
- package/dist/compiler/admin/sections.d.ts +5 -0
- package/dist/compiler/admin/sections.d.ts.map +1 -0
- package/dist/compiler/admin/sections.js +54 -0
- package/dist/compiler/admin/sections.js.map +1 -0
- package/dist/compiler/app-entry-builder.d.ts +19 -0
- package/dist/compiler/app-entry-builder.d.ts.map +1 -0
- package/dist/compiler/app-entry-builder.js +45 -0
- package/dist/compiler/app-entry-builder.js.map +1 -0
- package/dist/compiler/backend/enums.d.ts +4 -0
- package/dist/compiler/backend/enums.d.ts.map +1 -0
- package/dist/compiler/backend/enums.js +14 -0
- package/dist/compiler/backend/enums.js.map +1 -0
- package/dist/compiler/backend/fastify.d.ts +5 -0
- package/dist/compiler/backend/fastify.d.ts.map +1 -0
- package/dist/compiler/backend/fastify.js +62 -0
- package/dist/compiler/backend/fastify.js.map +1 -0
- package/dist/compiler/backend/feature.d.ts +4 -0
- package/dist/compiler/backend/feature.d.ts.map +1 -0
- package/dist/compiler/backend/feature.js +26 -0
- package/dist/compiler/backend/feature.js.map +1 -0
- package/dist/compiler/backend/graphql.d.ts +4 -0
- package/dist/compiler/backend/graphql.d.ts.map +1 -0
- package/dist/compiler/backend/graphql.js +171 -0
- package/dist/compiler/backend/graphql.js.map +1 -0
- package/dist/compiler/backend/index.d.ts +3 -0
- package/dist/compiler/backend/index.d.ts.map +1 -0
- package/dist/compiler/backend/index.js +34 -0
- package/dist/compiler/backend/index.js.map +1 -0
- package/dist/compiler/backend/models.d.ts +4 -0
- package/dist/compiler/backend/models.d.ts.map +1 -0
- package/dist/compiler/backend/models.js +79 -0
- package/dist/compiler/backend/models.js.map +1 -0
- package/dist/compiler/backend/services.d.ts +4 -0
- package/dist/compiler/backend/services.d.ts.map +1 -0
- package/dist/compiler/backend/services.js +90 -0
- package/dist/compiler/backend/services.js.map +1 -0
- package/dist/compiler/backend/utils.d.ts +16 -0
- package/dist/compiler/backend/utils.d.ts.map +1 -0
- package/dist/compiler/backend/utils.js +17 -0
- package/dist/compiler/backend/utils.js.map +1 -0
- package/dist/compiler/index.d.ts +3 -0
- package/dist/compiler/index.d.ts.map +1 -0
- package/dist/compiler/index.js +31 -0
- package/dist/compiler/index.js.map +1 -0
- package/dist/compiler/web/features.d.ts +5 -0
- package/dist/compiler/web/features.d.ts.map +1 -0
- package/dist/compiler/web/features.js +30 -0
- package/dist/compiler/web/features.js.map +1 -0
- package/dist/compiler/web/index.d.ts +3 -0
- package/dist/compiler/web/index.d.ts.map +1 -0
- package/dist/compiler/web/index.js +58 -0
- package/dist/compiler/web/index.js.map +1 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +2 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/server.d.ts +2 -0
- package/dist/constants/server.d.ts.map +1 -0
- package/dist/constants/server.js +2 -0
- package/dist/constants/server.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/plugins/index.d.ts +3 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +3 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/node-plugin-store.d.ts +6 -0
- package/dist/plugins/node-plugin-store.d.ts.map +1 -0
- package/dist/plugins/node-plugin-store.js +40 -0
- package/dist/plugins/node-plugin-store.js.map +1 -0
- package/dist/plugins/plugin-discovery.d.ts +7 -0
- package/dist/plugins/plugin-discovery.d.ts.map +1 -0
- package/dist/plugins/plugin-discovery.js +50 -0
- package/dist/plugins/plugin-discovery.js.map +1 -0
- package/dist/server/builder-service-manager.d.ts +32 -0
- package/dist/server/builder-service-manager.d.ts.map +1 -0
- package/dist/server/builder-service-manager.js +52 -0
- package/dist/server/builder-service-manager.js.map +1 -0
- package/dist/server/graceful-shutdown.d.ts +2 -0
- package/dist/server/graceful-shutdown.d.ts.map +1 -0
- package/dist/server/graceful-shutdown.js +25 -0
- package/dist/server/graceful-shutdown.js.map +1 -0
- package/dist/server/index.d.ts +8 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +33 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/plugin.d.ts +12 -0
- package/dist/server/plugin.d.ts.map +1 -0
- package/dist/server/plugin.js +109 -0
- package/dist/server/plugin.js.map +1 -0
- package/dist/server/server.d.ts +16 -0
- package/dist/server/server.d.ts.map +1 -0
- package/dist/server/server.js +47 -0
- package/dist/server/server.js.map +1 -0
- package/dist/service/builder-service.d.ts +154 -0
- package/dist/service/builder-service.d.ts.map +1 -0
- package/dist/service/builder-service.js +338 -0
- package/dist/service/builder-service.js.map +1 -0
- package/dist/sync/build-project.d.ts +54 -0
- package/dist/sync/build-project.d.ts.map +1 -0
- package/dist/sync/build-project.js +173 -0
- package/dist/sync/build-project.js.map +1 -0
- package/dist/sync/conflict-file-monitor.d.ts +27 -0
- package/dist/sync/conflict-file-monitor.d.ts.map +1 -0
- package/dist/sync/conflict-file-monitor.js +125 -0
- package/dist/sync/conflict-file-monitor.js.map +1 -0
- package/dist/sync/generate-for-directory.d.ts +29 -0
- package/dist/sync/generate-for-directory.d.ts.map +1 -0
- package/dist/sync/generate-for-directory.js +132 -0
- package/dist/sync/generate-for-directory.js.map +1 -0
- package/dist/sync/generator-steps-writer.d.ts +3 -0
- package/dist/sync/generator-steps-writer.d.ts.map +1 -0
- package/dist/sync/generator-steps-writer.js +6 -0
- package/dist/sync/generator-steps-writer.js.map +1 -0
- package/dist/sync/index.d.ts +4 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +4 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/sync-metadata-controller.d.ts +29 -0
- package/dist/sync/sync-metadata-controller.d.ts.map +1 -0
- package/dist/sync/sync-metadata-controller.js +95 -0
- package/dist/sync/sync-metadata-controller.js.map +1 -0
- package/dist/sync/sync-metadata-service.d.ts +20 -0
- package/dist/sync/sync-metadata-service.d.ts.map +1 -0
- package/dist/sync/sync-metadata-service.js +31 -0
- package/dist/sync/sync-metadata-service.js.map +1 -0
- package/dist/sync/sync-metadata.d.ts +444 -0
- package/dist/sync/sync-metadata.d.ts.map +1 -0
- package/dist/sync/sync-metadata.js +80 -0
- package/dist/sync/sync-metadata.js.map +1 -0
- package/dist/sync/utils.d.ts +8 -0
- package/dist/sync/utils.d.ts.map +1 -0
- package/dist/sync/utils.js +23 -0
- package/dist/sync/utils.js.map +1 -0
- package/dist/template-extractor/index.d.ts +2 -0
- package/dist/template-extractor/index.d.ts.map +1 -0
- package/dist/template-extractor/index.js +2 -0
- package/dist/template-extractor/index.js.map +1 -0
- package/dist/template-extractor/run-template-extractor.d.ts +4 -0
- package/dist/template-extractor/run-template-extractor.d.ts.map +1 -0
- package/dist/template-extractor/run-template-extractor.js +60 -0
- package/dist/template-extractor/run-template-extractor.js.map +1 -0
- package/dist/user-config/index.d.ts +2 -0
- package/dist/user-config/index.d.ts.map +1 -0
- package/dist/user-config/index.js +2 -0
- package/dist/user-config/index.js.map +1 -0
- package/dist/user-config/user-config-schema.d.ts +46 -0
- package/dist/user-config/user-config-schema.d.ts.map +1 -0
- package/dist/user-config/user-config-schema.js +30 -0
- package/dist/user-config/user-config-schema.js.map +1 -0
- package/dist/utils/case.d.ts +3 -0
- package/dist/utils/case.d.ts.map +1 -0
- package/dist/utils/case.js +14 -0
- package/dist/utils/case.js.map +1 -0
- package/dist/utils/errors.d.ts +10 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +15 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/paths.d.ts +8 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +17 -0
- package/dist/utils/paths.js.map +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
export type { ProjectInfo } from './projects.js';
|
|
2
|
+
export type { ClientVersionInfo } from './version.js';
|
|
3
|
+
export declare const appRouter: import("@trpc/server/unstable-core-do-not-import").BuiltRouter<{
|
|
4
|
+
ctx: {
|
|
5
|
+
getApi: (projectId: string) => import("../index.js").ProjectBuilderService;
|
|
6
|
+
cliVersion: string;
|
|
7
|
+
serviceManager: import("../index.js").BuilderServiceManager;
|
|
8
|
+
logger: import("@baseplate-dev/sync").Logger;
|
|
9
|
+
featureFlags: import("@baseplate-dev/project-builder-lib").FeatureFlag[];
|
|
10
|
+
userConfig: import("../index.js").BaseplateUserConfig;
|
|
11
|
+
serverPort: number;
|
|
12
|
+
req: import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider.js").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>>;
|
|
13
|
+
res: import("fastify").FastifyReply<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
|
|
14
|
+
};
|
|
15
|
+
meta: object;
|
|
16
|
+
errorShape: {
|
|
17
|
+
data: {
|
|
18
|
+
isUserVisible: boolean;
|
|
19
|
+
descriptionText: string | undefined;
|
|
20
|
+
code: import("@trpc/server/unstable-core-do-not-import").TRPC_ERROR_CODE_KEY;
|
|
21
|
+
httpStatus: number;
|
|
22
|
+
path?: string;
|
|
23
|
+
stack?: string;
|
|
24
|
+
};
|
|
25
|
+
message: string;
|
|
26
|
+
code: import("@trpc/server/unstable-core-do-not-import").TRPC_ERROR_CODE_NUMBER;
|
|
27
|
+
};
|
|
28
|
+
transformer: false;
|
|
29
|
+
}, import("@trpc/server/unstable-core-do-not-import").DecorateCreateRouterOptions<{
|
|
30
|
+
projects: import("@trpc/server/unstable-core-do-not-import").BuiltRouter<{
|
|
31
|
+
ctx: {
|
|
32
|
+
getApi: (projectId: string) => import("../index.js").ProjectBuilderService;
|
|
33
|
+
cliVersion: string;
|
|
34
|
+
serviceManager: import("../index.js").BuilderServiceManager;
|
|
35
|
+
logger: import("@baseplate-dev/sync").Logger;
|
|
36
|
+
featureFlags: import("@baseplate-dev/project-builder-lib").FeatureFlag[];
|
|
37
|
+
userConfig: import("../index.js").BaseplateUserConfig;
|
|
38
|
+
serverPort: number;
|
|
39
|
+
req: import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider.js").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>>;
|
|
40
|
+
res: import("fastify").FastifyReply<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
|
|
41
|
+
};
|
|
42
|
+
meta: object;
|
|
43
|
+
errorShape: {
|
|
44
|
+
data: {
|
|
45
|
+
isUserVisible: boolean;
|
|
46
|
+
descriptionText: string | undefined;
|
|
47
|
+
code: import("@trpc/server/unstable-core-do-not-import").TRPC_ERROR_CODE_KEY;
|
|
48
|
+
httpStatus: number;
|
|
49
|
+
path?: string;
|
|
50
|
+
stack?: string;
|
|
51
|
+
};
|
|
52
|
+
message: string;
|
|
53
|
+
code: import("@trpc/server/unstable-core-do-not-import").TRPC_ERROR_CODE_NUMBER;
|
|
54
|
+
};
|
|
55
|
+
transformer: false;
|
|
56
|
+
}, import("@trpc/server/unstable-core-do-not-import").DecorateCreateRouterOptions<{
|
|
57
|
+
list: import("@trpc/server").TRPCQueryProcedure<{
|
|
58
|
+
input: void;
|
|
59
|
+
output: import("./projects.js").ProjectInfo[];
|
|
60
|
+
}>;
|
|
61
|
+
readDefinition: import("@trpc/server").TRPCQueryProcedure<{
|
|
62
|
+
input: {
|
|
63
|
+
id: string;
|
|
64
|
+
};
|
|
65
|
+
output: {
|
|
66
|
+
contents: import("../index.js").ProjectDefinitionFilePayload;
|
|
67
|
+
};
|
|
68
|
+
}>;
|
|
69
|
+
onProjectJsonChanged: import("@trpc/server").TRPCSubscriptionProcedure<{
|
|
70
|
+
input: {
|
|
71
|
+
id: string;
|
|
72
|
+
};
|
|
73
|
+
output: AsyncIterable<import("../index.js").ProjectDefinitionFilePayload, void, any>;
|
|
74
|
+
}>;
|
|
75
|
+
writeDefinition: import("@trpc/server").TRPCMutationProcedure<{
|
|
76
|
+
input: {
|
|
77
|
+
id: string;
|
|
78
|
+
newContents: string;
|
|
79
|
+
oldContentsHash: string;
|
|
80
|
+
};
|
|
81
|
+
output: {
|
|
82
|
+
result: import("../index.js").ProjectDefinitionFileWriteResult;
|
|
83
|
+
};
|
|
84
|
+
}>;
|
|
85
|
+
}>>;
|
|
86
|
+
sync: import("@trpc/server/unstable-core-do-not-import").BuiltRouter<{
|
|
87
|
+
ctx: {
|
|
88
|
+
getApi: (projectId: string) => import("../index.js").ProjectBuilderService;
|
|
89
|
+
cliVersion: string;
|
|
90
|
+
serviceManager: import("../index.js").BuilderServiceManager;
|
|
91
|
+
logger: import("@baseplate-dev/sync").Logger;
|
|
92
|
+
featureFlags: import("@baseplate-dev/project-builder-lib").FeatureFlag[];
|
|
93
|
+
userConfig: import("../index.js").BaseplateUserConfig;
|
|
94
|
+
serverPort: number;
|
|
95
|
+
req: import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider.js").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>>;
|
|
96
|
+
res: import("fastify").FastifyReply<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
|
|
97
|
+
};
|
|
98
|
+
meta: object;
|
|
99
|
+
errorShape: {
|
|
100
|
+
data: {
|
|
101
|
+
isUserVisible: boolean;
|
|
102
|
+
descriptionText: string | undefined;
|
|
103
|
+
code: import("@trpc/server/unstable-core-do-not-import").TRPC_ERROR_CODE_KEY;
|
|
104
|
+
httpStatus: number;
|
|
105
|
+
path?: string;
|
|
106
|
+
stack?: string;
|
|
107
|
+
};
|
|
108
|
+
message: string;
|
|
109
|
+
code: import("@trpc/server/unstable-core-do-not-import").TRPC_ERROR_CODE_NUMBER;
|
|
110
|
+
};
|
|
111
|
+
transformer: false;
|
|
112
|
+
}, import("@trpc/server/unstable-core-do-not-import").DecorateCreateRouterOptions<{
|
|
113
|
+
startSync: import("@trpc/server").TRPCMutationProcedure<{
|
|
114
|
+
input: {
|
|
115
|
+
id: string;
|
|
116
|
+
};
|
|
117
|
+
output: {
|
|
118
|
+
success: boolean;
|
|
119
|
+
};
|
|
120
|
+
}>;
|
|
121
|
+
cancelSync: import("@trpc/server").TRPCMutationProcedure<{
|
|
122
|
+
input: {
|
|
123
|
+
id: string;
|
|
124
|
+
};
|
|
125
|
+
output: void;
|
|
126
|
+
}>;
|
|
127
|
+
onConsoleEmitted: import("@trpc/server").TRPCSubscriptionProcedure<{
|
|
128
|
+
input: {
|
|
129
|
+
id: string;
|
|
130
|
+
};
|
|
131
|
+
output: AsyncIterable<import("../index.js").CommandConsoleEmittedPayload, void, any>;
|
|
132
|
+
}>;
|
|
133
|
+
getCurrentSyncConsoleOutput: import("@trpc/server").TRPCQueryProcedure<{
|
|
134
|
+
input: {
|
|
135
|
+
id: string;
|
|
136
|
+
};
|
|
137
|
+
output: string[];
|
|
138
|
+
}>;
|
|
139
|
+
onSyncMetadataChanged: import("@trpc/server").TRPCSubscriptionProcedure<{
|
|
140
|
+
input: {
|
|
141
|
+
id: string;
|
|
142
|
+
};
|
|
143
|
+
output: AsyncIterable<import("../index.js").SyncMetadataChangedPayload, void, any>;
|
|
144
|
+
}>;
|
|
145
|
+
getSyncMetadata: import("@trpc/server").TRPCQueryProcedure<{
|
|
146
|
+
input: {
|
|
147
|
+
id: string;
|
|
148
|
+
};
|
|
149
|
+
output: {
|
|
150
|
+
status: "in-progress" | "success" | "cancelled" | "not-started" | "error";
|
|
151
|
+
packages: Record<string, {
|
|
152
|
+
path: string;
|
|
153
|
+
status: "not-synced" | "in-progress" | "success" | "unknown-error" | "conflicts" | "command-error" | "cancelled";
|
|
154
|
+
order: number;
|
|
155
|
+
name: string;
|
|
156
|
+
statusMessage?: string | undefined;
|
|
157
|
+
result?: {
|
|
158
|
+
completedAt: string;
|
|
159
|
+
filesWithConflicts?: {
|
|
160
|
+
relativePath: string;
|
|
161
|
+
conflictType: "merge-conflict" | "working-deleted" | "generated-deleted";
|
|
162
|
+
generatedConflictRelativePath?: string | undefined;
|
|
163
|
+
}[] | undefined;
|
|
164
|
+
errors?: {
|
|
165
|
+
message: string;
|
|
166
|
+
stack?: string | undefined;
|
|
167
|
+
}[] | undefined;
|
|
168
|
+
failedCommands?: {
|
|
169
|
+
id: string;
|
|
170
|
+
command: string;
|
|
171
|
+
workingDir?: string | undefined;
|
|
172
|
+
output?: string | undefined;
|
|
173
|
+
}[] | undefined;
|
|
174
|
+
wasCancelled?: boolean | undefined;
|
|
175
|
+
} | undefined;
|
|
176
|
+
}>;
|
|
177
|
+
completedAt?: string | undefined;
|
|
178
|
+
globalErrors?: string[] | undefined;
|
|
179
|
+
startedAt?: string | undefined;
|
|
180
|
+
};
|
|
181
|
+
}>;
|
|
182
|
+
onSyncStarted: import("@trpc/server").TRPCSubscriptionProcedure<{
|
|
183
|
+
input: {
|
|
184
|
+
id: string;
|
|
185
|
+
};
|
|
186
|
+
output: AsyncIterable<import("../index.js").SyncStartedPayload, void, any>;
|
|
187
|
+
}>;
|
|
188
|
+
onSyncCompleted: import("@trpc/server").TRPCSubscriptionProcedure<{
|
|
189
|
+
input: {
|
|
190
|
+
id: string;
|
|
191
|
+
};
|
|
192
|
+
output: AsyncIterable<import("../index.js").SyncCompletedPayload, void, any>;
|
|
193
|
+
}>;
|
|
194
|
+
openEditor: import("@trpc/server").TRPCMutationProcedure<{
|
|
195
|
+
input: {
|
|
196
|
+
id: string;
|
|
197
|
+
relativePath: string;
|
|
198
|
+
packageId: string;
|
|
199
|
+
};
|
|
200
|
+
output: void;
|
|
201
|
+
}>;
|
|
202
|
+
deleteConflictFile: import("@trpc/server").TRPCMutationProcedure<{
|
|
203
|
+
input: {
|
|
204
|
+
id: string;
|
|
205
|
+
relativePath: string;
|
|
206
|
+
packageId: string;
|
|
207
|
+
};
|
|
208
|
+
output: void;
|
|
209
|
+
}>;
|
|
210
|
+
keepConflictFile: import("@trpc/server").TRPCMutationProcedure<{
|
|
211
|
+
input: {
|
|
212
|
+
id: string;
|
|
213
|
+
relativePath: string;
|
|
214
|
+
packageId: string;
|
|
215
|
+
};
|
|
216
|
+
output: void;
|
|
217
|
+
}>;
|
|
218
|
+
}>>;
|
|
219
|
+
version: import("@trpc/server/unstable-core-do-not-import").BuiltRouter<{
|
|
220
|
+
ctx: {
|
|
221
|
+
getApi: (projectId: string) => import("../index.js").ProjectBuilderService;
|
|
222
|
+
cliVersion: string;
|
|
223
|
+
serviceManager: import("../index.js").BuilderServiceManager;
|
|
224
|
+
logger: import("@baseplate-dev/sync").Logger;
|
|
225
|
+
featureFlags: import("@baseplate-dev/project-builder-lib").FeatureFlag[];
|
|
226
|
+
userConfig: import("../index.js").BaseplateUserConfig;
|
|
227
|
+
serverPort: number;
|
|
228
|
+
req: import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider.js").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>>;
|
|
229
|
+
res: import("fastify").FastifyReply<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
|
|
230
|
+
};
|
|
231
|
+
meta: object;
|
|
232
|
+
errorShape: {
|
|
233
|
+
data: {
|
|
234
|
+
isUserVisible: boolean;
|
|
235
|
+
descriptionText: string | undefined;
|
|
236
|
+
code: import("@trpc/server/unstable-core-do-not-import").TRPC_ERROR_CODE_KEY;
|
|
237
|
+
httpStatus: number;
|
|
238
|
+
path?: string;
|
|
239
|
+
stack?: string;
|
|
240
|
+
};
|
|
241
|
+
message: string;
|
|
242
|
+
code: import("@trpc/server/unstable-core-do-not-import").TRPC_ERROR_CODE_NUMBER;
|
|
243
|
+
};
|
|
244
|
+
transformer: false;
|
|
245
|
+
}, import("@trpc/server/unstable-core-do-not-import").DecorateCreateRouterOptions<{
|
|
246
|
+
get: import("@trpc/server").TRPCQueryProcedure<{
|
|
247
|
+
input: void;
|
|
248
|
+
output: import("./version.js").ClientVersionInfo;
|
|
249
|
+
}>;
|
|
250
|
+
}>>;
|
|
251
|
+
plugins: import("@trpc/server/unstable-core-do-not-import").BuiltRouter<{
|
|
252
|
+
ctx: {
|
|
253
|
+
getApi: (projectId: string) => import("../index.js").ProjectBuilderService;
|
|
254
|
+
cliVersion: string;
|
|
255
|
+
serviceManager: import("../index.js").BuilderServiceManager;
|
|
256
|
+
logger: import("@baseplate-dev/sync").Logger;
|
|
257
|
+
featureFlags: import("@baseplate-dev/project-builder-lib").FeatureFlag[];
|
|
258
|
+
userConfig: import("../index.js").BaseplateUserConfig;
|
|
259
|
+
serverPort: number;
|
|
260
|
+
req: import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider.js").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>>;
|
|
261
|
+
res: import("fastify").FastifyReply<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
|
|
262
|
+
};
|
|
263
|
+
meta: object;
|
|
264
|
+
errorShape: {
|
|
265
|
+
data: {
|
|
266
|
+
isUserVisible: boolean;
|
|
267
|
+
descriptionText: string | undefined;
|
|
268
|
+
code: import("@trpc/server/unstable-core-do-not-import").TRPC_ERROR_CODE_KEY;
|
|
269
|
+
httpStatus: number;
|
|
270
|
+
path?: string;
|
|
271
|
+
stack?: string;
|
|
272
|
+
};
|
|
273
|
+
message: string;
|
|
274
|
+
code: import("@trpc/server/unstable-core-do-not-import").TRPC_ERROR_CODE_NUMBER;
|
|
275
|
+
};
|
|
276
|
+
transformer: false;
|
|
277
|
+
}, import("@trpc/server/unstable-core-do-not-import").DecorateCreateRouterOptions<{
|
|
278
|
+
getAvailablePlugins: import("@trpc/server").TRPCMutationProcedure<{
|
|
279
|
+
input: {
|
|
280
|
+
projectId: string;
|
|
281
|
+
};
|
|
282
|
+
output: import("@baseplate-dev/project-builder-lib").PluginMetadataWithPaths[];
|
|
283
|
+
}>;
|
|
284
|
+
}>>;
|
|
285
|
+
}>>;
|
|
286
|
+
export type AppRouter = typeof appRouter;
|
|
287
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAMA,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAKpB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { pluginsRouter } from './plugins.js';
|
|
2
|
+
import { projectsRouter } from './projects.js';
|
|
3
|
+
import { syncRouter } from './sync.js';
|
|
4
|
+
import { router } from './trpc.js';
|
|
5
|
+
import { versionRouter } from './version.js';
|
|
6
|
+
export const appRouter = router({
|
|
7
|
+
projects: projectsRouter,
|
|
8
|
+
sync: syncRouter,
|
|
9
|
+
version: versionRouter,
|
|
10
|
+
plugins: pluginsRouter,
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAK7C,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC;IAC9B,QAAQ,EAAE,cAAc;IACxB,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,aAAa;IACtB,OAAO,EAAE,aAAa;CACvB,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const pluginsRouter: import("@trpc/server/unstable-core-do-not-import").BuiltRouter<{
|
|
2
|
+
ctx: {
|
|
3
|
+
getApi: (projectId: string) => import("../index.js").ProjectBuilderService;
|
|
4
|
+
cliVersion: string;
|
|
5
|
+
serviceManager: import("../index.js").BuilderServiceManager;
|
|
6
|
+
logger: import("@baseplate-dev/sync").Logger;
|
|
7
|
+
featureFlags: import("@baseplate-dev/project-builder-lib").FeatureFlag[];
|
|
8
|
+
userConfig: import("../index.js").BaseplateUserConfig;
|
|
9
|
+
serverPort: number;
|
|
10
|
+
req: import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider.js").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>>;
|
|
11
|
+
res: import("fastify").FastifyReply<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
|
|
12
|
+
};
|
|
13
|
+
meta: object;
|
|
14
|
+
errorShape: {
|
|
15
|
+
data: {
|
|
16
|
+
isUserVisible: boolean;
|
|
17
|
+
descriptionText: string | undefined;
|
|
18
|
+
code: import("@trpc/server/unstable-core-do-not-import").TRPC_ERROR_CODE_KEY;
|
|
19
|
+
httpStatus: number;
|
|
20
|
+
path?: string;
|
|
21
|
+
stack?: string;
|
|
22
|
+
};
|
|
23
|
+
message: string;
|
|
24
|
+
code: import("@trpc/server/unstable-core-do-not-import").TRPC_ERROR_CODE_NUMBER;
|
|
25
|
+
};
|
|
26
|
+
transformer: false;
|
|
27
|
+
}, import("@trpc/server/unstable-core-do-not-import").DecorateCreateRouterOptions<{
|
|
28
|
+
getAvailablePlugins: import("@trpc/server").TRPCMutationProcedure<{
|
|
29
|
+
input: {
|
|
30
|
+
projectId: string;
|
|
31
|
+
};
|
|
32
|
+
output: import("@baseplate-dev/project-builder-lib").PluginMetadataWithPaths[];
|
|
33
|
+
}>;
|
|
34
|
+
}>>;
|
|
35
|
+
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/api/plugins.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAYxB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { privateProcedure, router } from './trpc.js';
|
|
3
|
+
export const pluginsRouter = router({
|
|
4
|
+
getAvailablePlugins: privateProcedure
|
|
5
|
+
.input(z.object({
|
|
6
|
+
projectId: z.string(),
|
|
7
|
+
}))
|
|
8
|
+
.mutation(async ({ input: { projectId }, ctx }) => {
|
|
9
|
+
const api = ctx.getApi(projectId);
|
|
10
|
+
return api.getAvailablePlugins();
|
|
11
|
+
}),
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=plugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../src/api/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC;IAClC,mBAAmB,EAAE,gBAAgB;SAClC,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;KACtB,CAAC,CACH;SACA,QAAQ,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;QAChD,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAElC,OAAO,GAAG,CAAC,mBAAmB,EAAE,CAAC;IACnC,CAAC,CAAC;CACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export interface ProjectInfo {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
directory: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const projectsRouter: import("@trpc/server/unstable-core-do-not-import").BuiltRouter<{
|
|
7
|
+
ctx: {
|
|
8
|
+
getApi: (projectId: string) => import("../index.js").ProjectBuilderService;
|
|
9
|
+
cliVersion: string;
|
|
10
|
+
serviceManager: import("../index.js").BuilderServiceManager;
|
|
11
|
+
logger: import("@baseplate-dev/sync").Logger;
|
|
12
|
+
featureFlags: import("@baseplate-dev/project-builder-lib").FeatureFlag[];
|
|
13
|
+
userConfig: import("../index.js").BaseplateUserConfig;
|
|
14
|
+
serverPort: number;
|
|
15
|
+
req: import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider.js").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>>;
|
|
16
|
+
res: import("fastify").FastifyReply<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
|
|
17
|
+
};
|
|
18
|
+
meta: object;
|
|
19
|
+
errorShape: {
|
|
20
|
+
data: {
|
|
21
|
+
isUserVisible: boolean;
|
|
22
|
+
descriptionText: string | undefined;
|
|
23
|
+
code: import("@trpc/server/unstable-core-do-not-import").TRPC_ERROR_CODE_KEY;
|
|
24
|
+
httpStatus: number;
|
|
25
|
+
path?: string;
|
|
26
|
+
stack?: string;
|
|
27
|
+
};
|
|
28
|
+
message: string;
|
|
29
|
+
code: import("@trpc/server/unstable-core-do-not-import").TRPC_ERROR_CODE_NUMBER;
|
|
30
|
+
};
|
|
31
|
+
transformer: false;
|
|
32
|
+
}, import("@trpc/server/unstable-core-do-not-import").DecorateCreateRouterOptions<{
|
|
33
|
+
list: import("@trpc/server").TRPCQueryProcedure<{
|
|
34
|
+
input: void;
|
|
35
|
+
output: ProjectInfo[];
|
|
36
|
+
}>;
|
|
37
|
+
readDefinition: import("@trpc/server").TRPCQueryProcedure<{
|
|
38
|
+
input: {
|
|
39
|
+
id: string;
|
|
40
|
+
};
|
|
41
|
+
output: {
|
|
42
|
+
contents: import("../index.js").ProjectDefinitionFilePayload;
|
|
43
|
+
};
|
|
44
|
+
}>;
|
|
45
|
+
onProjectJsonChanged: import("@trpc/server").TRPCSubscriptionProcedure<{
|
|
46
|
+
input: {
|
|
47
|
+
id: string;
|
|
48
|
+
};
|
|
49
|
+
output: AsyncIterable<import("../index.js").ProjectDefinitionFilePayload, void, any>;
|
|
50
|
+
}>;
|
|
51
|
+
writeDefinition: import("@trpc/server").TRPCMutationProcedure<{
|
|
52
|
+
input: {
|
|
53
|
+
id: string;
|
|
54
|
+
newContents: string;
|
|
55
|
+
oldContentsHash: string;
|
|
56
|
+
};
|
|
57
|
+
output: {
|
|
58
|
+
result: import("../index.js").ProjectDefinitionFileWriteResult;
|
|
59
|
+
};
|
|
60
|
+
}>;
|
|
61
|
+
}>>;
|
|
62
|
+
//# sourceMappingURL=projects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/api/projects.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAcD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEzB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { privateProcedure, router } from './trpc.js';
|
|
3
|
+
const simpleProjectDefinitionSchema = z.object({
|
|
4
|
+
// handle old placement of name
|
|
5
|
+
name: z.string().optional(),
|
|
6
|
+
settings: z
|
|
7
|
+
.object({
|
|
8
|
+
general: z.object({
|
|
9
|
+
name: z.string(),
|
|
10
|
+
}),
|
|
11
|
+
})
|
|
12
|
+
.optional(),
|
|
13
|
+
});
|
|
14
|
+
export const projectsRouter = router({
|
|
15
|
+
list: privateProcedure.query(async ({ ctx }) => Promise.all(ctx.serviceManager
|
|
16
|
+
.getServices()
|
|
17
|
+
.map(async (service) => {
|
|
18
|
+
const { contents } = await service.readDefinition();
|
|
19
|
+
const parseResult = simpleProjectDefinitionSchema.safeParse(JSON.parse(contents));
|
|
20
|
+
if (!parseResult.success) {
|
|
21
|
+
throw new Error(`Invalid project definition for ${service.directory}: ${parseResult.error.message}`);
|
|
22
|
+
}
|
|
23
|
+
const parsedContents = parseResult.data;
|
|
24
|
+
const name = parsedContents.name ?? parsedContents.settings?.general.name;
|
|
25
|
+
if (!name) {
|
|
26
|
+
throw new Error(`Invalid project definition for ${service.directory}: name is required`);
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
id: service.id,
|
|
30
|
+
name,
|
|
31
|
+
directory: service.directory,
|
|
32
|
+
};
|
|
33
|
+
}))),
|
|
34
|
+
readDefinition: privateProcedure
|
|
35
|
+
.input(z.object({
|
|
36
|
+
id: z.string(),
|
|
37
|
+
}))
|
|
38
|
+
.query(async ({ input: { id }, ctx }) => {
|
|
39
|
+
const api = ctx.getApi(id);
|
|
40
|
+
const contents = await api.readDefinition();
|
|
41
|
+
return { contents };
|
|
42
|
+
}),
|
|
43
|
+
onProjectJsonChanged: privateProcedure
|
|
44
|
+
.input(z.object({ id: z.string() }))
|
|
45
|
+
.subscription(async function* ({ input: { id }, ctx, signal }) {
|
|
46
|
+
for await (const payload of ctx
|
|
47
|
+
.getApi(id)
|
|
48
|
+
.onAsync('project-json-changed', { signal })) {
|
|
49
|
+
yield payload;
|
|
50
|
+
}
|
|
51
|
+
}),
|
|
52
|
+
writeDefinition: privateProcedure
|
|
53
|
+
.input(z.object({
|
|
54
|
+
id: z.string(),
|
|
55
|
+
newContents: z.string(),
|
|
56
|
+
oldContentsHash: z.string(),
|
|
57
|
+
}))
|
|
58
|
+
.mutation(async ({ input: { id, newContents, oldContentsHash }, ctx }) => {
|
|
59
|
+
const api = ctx.getApi(id);
|
|
60
|
+
const result = await api.writeDefinition(newContents, oldContentsHash);
|
|
61
|
+
return { result };
|
|
62
|
+
}),
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=projects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/api/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAQrD,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,+BAA+B;IAC/B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,QAAQ,EAAE,CAAC;SACR,MAAM,CAAC;QACN,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;YAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;SACjB,CAAC;KACH,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC;IACnC,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAC7C,OAAO,CAAC,GAAG,CACT,GAAG,CAAC,cAAc;SACf,WAAW,EAAE;SACb,GAAG,CAAC,KAAK,EAAE,OAAO,EAAwB,EAAE;QAC3C,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,OAAO,CAAC,cAAc,EAAE,CAAC;QACpD,MAAM,WAAW,GAAG,6BAA6B,CAAC,SAAS,CACzD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAY,CAChC,CAAC;QAEF,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CACb,kCAAkC,OAAO,CAAC,SAAS,KAAK,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,CACpF,CAAC;QACJ,CAAC;QAED,MAAM,cAAc,GAAG,WAAW,CAAC,IAAI,CAAC;QAExC,MAAM,IAAI,GACR,cAAc,CAAC,IAAI,IAAI,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC;QAC/D,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CACb,kCAAkC,OAAO,CAAC,SAAS,oBAAoB,CACxE,CAAC;QACJ,CAAC;QAED,OAAO;YACL,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,IAAI;YACJ,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAC;IACJ,CAAC,CAAC,CACL,CACF;IAED,cAAc,EAAE,gBAAgB;SAC7B,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;KACf,CAAC,CACH;SACA,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;QACtC,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAC3B,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,cAAc,EAAE,CAAC;QAC5C,OAAO,EAAE,QAAQ,EAAE,CAAC;IACtB,CAAC,CAAC;IAEJ,oBAAoB,EAAE,gBAAgB;SACnC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;SACnC,YAAY,CAAC,KAAK,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE;QAC3D,IAAI,KAAK,EAAE,MAAM,OAAO,IAAI,GAAG;aAC5B,MAAM,CAAC,EAAE,CAAC;aACV,OAAO,CAAC,sBAAsB,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;YAC/C,MAAM,OAAO,CAAC;QAChB,CAAC;IACH,CAAC,CAAC;IAEJ,eAAe,EAAE,gBAAgB;SAC9B,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;QACvB,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;KAC5B,CAAC,CACH;SACA,QAAQ,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;QACvE,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,eAAe,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;QACvE,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC,CAAC;CACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
export declare const syncRouter: import("@trpc/server/unstable-core-do-not-import").BuiltRouter<{
|
|
2
|
+
ctx: {
|
|
3
|
+
getApi: (projectId: string) => import("../index.js").ProjectBuilderService;
|
|
4
|
+
cliVersion: string;
|
|
5
|
+
serviceManager: import("../index.js").BuilderServiceManager;
|
|
6
|
+
logger: import("@baseplate-dev/sync").Logger;
|
|
7
|
+
featureFlags: import("@baseplate-dev/project-builder-lib").FeatureFlag[];
|
|
8
|
+
userConfig: import("../index.js").BaseplateUserConfig;
|
|
9
|
+
serverPort: number;
|
|
10
|
+
req: import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider.js").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>>;
|
|
11
|
+
res: import("fastify").FastifyReply<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
|
|
12
|
+
};
|
|
13
|
+
meta: object;
|
|
14
|
+
errorShape: {
|
|
15
|
+
data: {
|
|
16
|
+
isUserVisible: boolean;
|
|
17
|
+
descriptionText: string | undefined;
|
|
18
|
+
code: import("@trpc/server/unstable-core-do-not-import").TRPC_ERROR_CODE_KEY;
|
|
19
|
+
httpStatus: number;
|
|
20
|
+
path?: string;
|
|
21
|
+
stack?: string;
|
|
22
|
+
};
|
|
23
|
+
message: string;
|
|
24
|
+
code: import("@trpc/server/unstable-core-do-not-import").TRPC_ERROR_CODE_NUMBER;
|
|
25
|
+
};
|
|
26
|
+
transformer: false;
|
|
27
|
+
}, import("@trpc/server/unstable-core-do-not-import").DecorateCreateRouterOptions<{
|
|
28
|
+
startSync: import("@trpc/server").TRPCMutationProcedure<{
|
|
29
|
+
input: {
|
|
30
|
+
id: string;
|
|
31
|
+
};
|
|
32
|
+
output: {
|
|
33
|
+
success: boolean;
|
|
34
|
+
};
|
|
35
|
+
}>;
|
|
36
|
+
cancelSync: import("@trpc/server").TRPCMutationProcedure<{
|
|
37
|
+
input: {
|
|
38
|
+
id: string;
|
|
39
|
+
};
|
|
40
|
+
output: void;
|
|
41
|
+
}>;
|
|
42
|
+
onConsoleEmitted: import("@trpc/server").TRPCSubscriptionProcedure<{
|
|
43
|
+
input: {
|
|
44
|
+
id: string;
|
|
45
|
+
};
|
|
46
|
+
output: AsyncIterable<import("../index.js").CommandConsoleEmittedPayload, void, any>;
|
|
47
|
+
}>;
|
|
48
|
+
getCurrentSyncConsoleOutput: import("@trpc/server").TRPCQueryProcedure<{
|
|
49
|
+
input: {
|
|
50
|
+
id: string;
|
|
51
|
+
};
|
|
52
|
+
output: string[];
|
|
53
|
+
}>;
|
|
54
|
+
onSyncMetadataChanged: import("@trpc/server").TRPCSubscriptionProcedure<{
|
|
55
|
+
input: {
|
|
56
|
+
id: string;
|
|
57
|
+
};
|
|
58
|
+
output: AsyncIterable<import("../index.js").SyncMetadataChangedPayload, void, any>;
|
|
59
|
+
}>;
|
|
60
|
+
getSyncMetadata: import("@trpc/server").TRPCQueryProcedure<{
|
|
61
|
+
input: {
|
|
62
|
+
id: string;
|
|
63
|
+
};
|
|
64
|
+
output: {
|
|
65
|
+
status: "in-progress" | "success" | "cancelled" | "not-started" | "error";
|
|
66
|
+
packages: Record<string, {
|
|
67
|
+
path: string;
|
|
68
|
+
status: "not-synced" | "in-progress" | "success" | "unknown-error" | "conflicts" | "command-error" | "cancelled";
|
|
69
|
+
order: number;
|
|
70
|
+
name: string;
|
|
71
|
+
statusMessage?: string | undefined;
|
|
72
|
+
result?: {
|
|
73
|
+
completedAt: string;
|
|
74
|
+
filesWithConflicts?: {
|
|
75
|
+
relativePath: string;
|
|
76
|
+
conflictType: "merge-conflict" | "working-deleted" | "generated-deleted";
|
|
77
|
+
generatedConflictRelativePath?: string | undefined;
|
|
78
|
+
}[] | undefined;
|
|
79
|
+
errors?: {
|
|
80
|
+
message: string;
|
|
81
|
+
stack?: string | undefined;
|
|
82
|
+
}[] | undefined;
|
|
83
|
+
failedCommands?: {
|
|
84
|
+
id: string;
|
|
85
|
+
command: string;
|
|
86
|
+
workingDir?: string | undefined;
|
|
87
|
+
output?: string | undefined;
|
|
88
|
+
}[] | undefined;
|
|
89
|
+
wasCancelled?: boolean | undefined;
|
|
90
|
+
} | undefined;
|
|
91
|
+
}>;
|
|
92
|
+
completedAt?: string | undefined;
|
|
93
|
+
globalErrors?: string[] | undefined;
|
|
94
|
+
startedAt?: string | undefined;
|
|
95
|
+
};
|
|
96
|
+
}>;
|
|
97
|
+
onSyncStarted: import("@trpc/server").TRPCSubscriptionProcedure<{
|
|
98
|
+
input: {
|
|
99
|
+
id: string;
|
|
100
|
+
};
|
|
101
|
+
output: AsyncIterable<import("../index.js").SyncStartedPayload, void, any>;
|
|
102
|
+
}>;
|
|
103
|
+
onSyncCompleted: import("@trpc/server").TRPCSubscriptionProcedure<{
|
|
104
|
+
input: {
|
|
105
|
+
id: string;
|
|
106
|
+
};
|
|
107
|
+
output: AsyncIterable<import("../index.js").SyncCompletedPayload, void, any>;
|
|
108
|
+
}>;
|
|
109
|
+
openEditor: import("@trpc/server").TRPCMutationProcedure<{
|
|
110
|
+
input: {
|
|
111
|
+
id: string;
|
|
112
|
+
relativePath: string;
|
|
113
|
+
packageId: string;
|
|
114
|
+
};
|
|
115
|
+
output: void;
|
|
116
|
+
}>;
|
|
117
|
+
deleteConflictFile: import("@trpc/server").TRPCMutationProcedure<{
|
|
118
|
+
input: {
|
|
119
|
+
id: string;
|
|
120
|
+
relativePath: string;
|
|
121
|
+
packageId: string;
|
|
122
|
+
};
|
|
123
|
+
output: void;
|
|
124
|
+
}>;
|
|
125
|
+
keepConflictFile: import("@trpc/server").TRPCMutationProcedure<{
|
|
126
|
+
input: {
|
|
127
|
+
id: string;
|
|
128
|
+
relativePath: string;
|
|
129
|
+
packageId: string;
|
|
130
|
+
};
|
|
131
|
+
output: void;
|
|
132
|
+
}>;
|
|
133
|
+
}>>;
|
|
134
|
+
//# sourceMappingURL=sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/api/sync.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4GrB,CAAC"}
|