@webstudio-is/trpc-interface 0.71.0 → 0.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,6 +43,9 @@ const Output = import_zod.z.discriminatedUnion("success", [
|
|
|
43
43
|
]);
|
|
44
44
|
const deploymentRouter = (0, import_trpc.router)({
|
|
45
45
|
publish: import_trpc.procedure.input(PublishInput).output(Output).mutation(async ({ input, ctx }) => {
|
|
46
|
-
return {
|
|
46
|
+
return {
|
|
47
|
+
success: false,
|
|
48
|
+
error: `Not implemented, use buildId=${input.buildId}`
|
|
49
|
+
};
|
|
47
50
|
})
|
|
48
51
|
});
|
package/lib/shared/deployment.js
CHANGED
|
@@ -20,7 +20,10 @@ const Output = z.discriminatedUnion("success", [
|
|
|
20
20
|
]);
|
|
21
21
|
const deploymentRouter = router({
|
|
22
22
|
publish: procedure.input(PublishInput).output(Output).mutation(async ({ input, ctx }) => {
|
|
23
|
-
return {
|
|
23
|
+
return {
|
|
24
|
+
success: false,
|
|
25
|
+
error: `Not implemented, use buildId=${input.buildId}`
|
|
26
|
+
};
|
|
24
27
|
})
|
|
25
28
|
});
|
|
26
29
|
export {
|
|
@@ -20,6 +20,14 @@ type AuthorizationContext = {
|
|
|
20
20
|
type DomainContext = {
|
|
21
21
|
domainTrpc: TrpcInterfaceClient["domain"];
|
|
22
22
|
};
|
|
23
|
+
type EntriContext = {
|
|
24
|
+
entryApi: {
|
|
25
|
+
getEntriToken: () => Promise<{
|
|
26
|
+
token: string;
|
|
27
|
+
applicationId: string;
|
|
28
|
+
}>;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
23
31
|
type DeploymentContext = {
|
|
24
32
|
deploymentTrpc: TrpcInterfaceClient["deployment"];
|
|
25
33
|
env: {
|
|
@@ -36,5 +44,6 @@ export type AppContext = {
|
|
|
36
44
|
authorization: AuthorizationContext;
|
|
37
45
|
domain: DomainContext;
|
|
38
46
|
deployment: DeploymentContext;
|
|
47
|
+
entri: EntriContext;
|
|
39
48
|
};
|
|
40
49
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/trpc-interface",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.73.0",
|
|
4
4
|
"description": "Webstudio TRPC Interface",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"ts-custom-error": "^3.3.1",
|
|
13
13
|
"uuid": "^9.0.0",
|
|
14
14
|
"zod": "^3.21.4",
|
|
15
|
-
"@webstudio-is/prisma-client": "^0.
|
|
15
|
+
"@webstudio-is/prisma-client": "^0.73.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/node": "^18.11.18",
|
|
19
|
-
"typescript": "5.
|
|
19
|
+
"typescript": "5.1.3",
|
|
20
20
|
"@webstudio-is/jest-config": "^1.0.6",
|
|
21
21
|
"@webstudio-is/scripts": "^0.0.0",
|
|
22
22
|
"@webstudio-is/tsconfig": "^1.0.6"
|
|
@@ -27,6 +27,16 @@ type DomainContext = {
|
|
|
27
27
|
domainTrpc: TrpcInterfaceClient["domain"];
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
// https://developers.entri.com/docs/install
|
|
31
|
+
type EntriContext = {
|
|
32
|
+
entryApi: {
|
|
33
|
+
getEntriToken: () => Promise<{
|
|
34
|
+
token: string;
|
|
35
|
+
applicationId: string;
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
30
40
|
type DeploymentContext = {
|
|
31
41
|
deploymentTrpc: TrpcInterfaceClient["deployment"];
|
|
32
42
|
env: {
|
|
@@ -44,4 +54,5 @@ export type AppContext = {
|
|
|
44
54
|
authorization: AuthorizationContext;
|
|
45
55
|
domain: DomainContext;
|
|
46
56
|
deployment: DeploymentContext;
|
|
57
|
+
entri: EntriContext;
|
|
47
58
|
};
|
package/src/shared/deployment.ts
CHANGED
|
@@ -30,6 +30,9 @@ export const deploymentRouter = router({
|
|
|
30
30
|
.input(PublishInput)
|
|
31
31
|
.output(Output)
|
|
32
32
|
.mutation(async ({ input, ctx }) => {
|
|
33
|
-
return {
|
|
33
|
+
return {
|
|
34
|
+
success: false,
|
|
35
|
+
error: `Not implemented, use buildId=${input.buildId}`,
|
|
36
|
+
};
|
|
34
37
|
}),
|
|
35
38
|
});
|