@ms-cloudpack/api-server 0.63.11 → 0.64.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/lib/apis/addPackageOverride.d.ts +1 -1
- package/lib/apis/addPackageOverride.js +7 -7
- package/lib/apis/addPackageOverride.js.map +1 -1
- package/lib/apis/ensurePackageBundled.js.map +1 -1
- package/lib/apis/getData.d.ts +9 -17
- package/lib/apis/getData.d.ts.map +1 -1
- package/lib/apis/getData.js +5 -5
- package/lib/apis/getData.js.map +1 -1
- package/lib/apis/getLinkConfig.d.ts +2 -4
- package/lib/apis/getLinkConfig.d.ts.map +1 -1
- package/lib/apis/getLinkConfig.js +4 -3
- package/lib/apis/getLinkConfig.js.map +1 -1
- package/lib/apis/getSessionId.d.ts +2 -6
- package/lib/apis/getSessionId.d.ts.map +1 -1
- package/lib/apis/getSessionId.js +3 -4
- package/lib/apis/getSessionId.js.map +1 -1
- package/lib/apis/linkPath.d.ts +3 -8
- package/lib/apis/linkPath.js +3 -3
- package/lib/apis/linkPath.js.map +1 -1
- package/lib/apis/notifyLinkChange.d.ts +3 -16
- package/lib/apis/notifyLinkChange.d.ts.map +1 -1
- package/lib/apis/notifyLinkChange.js +5 -4
- package/lib/apis/notifyLinkChange.js.map +1 -1
- package/lib/apis/onDataChanged.d.ts +5 -18
- package/lib/apis/onDataChanged.d.ts.map +1 -1
- package/lib/apis/onDataChanged.js +4 -10
- package/lib/apis/onDataChanged.js.map +1 -1
- package/lib/apis/openCodeEditor.d.ts +10 -26
- package/lib/apis/openCodeEditor.d.ts.map +1 -1
- package/lib/apis/openCodeEditor.js +11 -7
- package/lib/apis/openCodeEditor.js.map +1 -1
- package/lib/apis/openConfigEditor.d.ts +4 -1
- package/lib/apis/openConfigEditor.d.ts.map +1 -1
- package/lib/apis/openConfigEditor.js +6 -2
- package/lib/apis/openConfigEditor.js.map +1 -1
- package/lib/apis/openFilePath.d.ts +10 -17
- package/lib/apis/openFilePath.d.ts.map +1 -1
- package/lib/apis/openFilePath.js +9 -5
- package/lib/apis/openFilePath.js.map +1 -1
- package/lib/apis/publishData.d.ts +7 -17
- package/lib/apis/publishData.d.ts.map +1 -1
- package/lib/apis/publishData.js +5 -4
- package/lib/apis/publishData.js.map +1 -1
- package/lib/apis/reportSpan.d.ts +6 -24
- package/lib/apis/reportSpan.d.ts.map +1 -1
- package/lib/apis/reportSpan.js +6 -5
- package/lib/apis/reportSpan.js.map +1 -1
- package/lib/apis/restartAllTasks.d.ts +1 -1
- package/lib/apis/restartAllTasks.d.ts.map +1 -1
- package/lib/apis/restartAllTasks.js +14 -7
- package/lib/apis/restartAllTasks.js.map +1 -1
- package/lib/apis/restartTask.d.ts +4 -18
- package/lib/apis/restartTask.d.ts.map +1 -1
- package/lib/apis/restartTask.js +6 -5
- package/lib/apis/restartTask.js.map +1 -1
- package/lib/apis/unlinkPath.d.ts +3 -8
- package/lib/apis/unlinkPath.js +3 -3
- package/lib/apis/unlinkPath.js.map +1 -1
- package/lib/apis/validatePackageOverride.d.ts +1 -1
- package/lib/apis/validatePackageOverride.js +5 -8
- package/lib/apis/validatePackageOverride.js.map +1 -1
- package/lib/common/createApiContext.d.ts.map +1 -1
- package/lib/common/createApiContext.js +4 -1
- package/lib/common/createApiContext.js.map +1 -1
- package/lib/common/createMockContext.d.ts +16 -9
- package/lib/common/createMockContext.d.ts.map +1 -1
- package/lib/common/createMockContext.js +21 -16
- package/lib/common/createMockContext.js.map +1 -1
- package/lib/common/createMockSession.d.ts +1 -1
- package/lib/common/createMockSession.d.ts.map +1 -1
- package/lib/common/createMockSession.js.map +1 -1
- package/lib/common/createSession.d.ts +5 -1
- package/lib/common/createSession.d.ts.map +1 -1
- package/lib/common/createSession.js +1 -1
- package/lib/common/createSession.js.map +1 -1
- package/lib/common/prepareOutputPath.js +1 -1
- package/lib/common/prepareOutputPath.js.map +1 -1
- package/lib/data/busSources.d.ts +12 -240
- package/lib/data/busSources.d.ts.map +1 -1
- package/lib/data/busSources.js +4 -4
- package/lib/data/busSources.js.map +1 -1
- package/lib/index.browser.d.ts +2 -2
- package/lib/index.browser.d.ts.map +1 -1
- package/lib/index.browser.js.map +1 -1
- package/lib/index.d.ts +0 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/trpc/common.d.ts +41 -2
- package/lib/trpc/common.d.ts.map +1 -1
- package/lib/trpc/common.js +44 -3
- package/lib/trpc/common.js.map +1 -1
- package/lib/types/GetLinkConfigOutput.d.ts +5 -0
- package/lib/types/GetLinkConfigOutput.d.ts.map +1 -0
- package/lib/types/GetLinkConfigOutput.js +18 -0
- package/lib/types/GetLinkConfigOutput.js.map +1 -0
- package/lib/types/LinkPath.d.ts +9 -93
- package/lib/types/LinkPath.d.ts.map +1 -1
- package/lib/types/LinkPath.js +28 -34
- package/lib/types/LinkPath.js.map +1 -1
- package/lib/types/NotifyLinkChangeInput.d.ts +9 -0
- package/lib/types/NotifyLinkChangeInput.d.ts.map +1 -0
- package/lib/types/NotifyLinkChangeInput.js +16 -0
- package/lib/types/NotifyLinkChangeInput.js.map +1 -0
- package/lib/types/Task.d.ts +20 -12
- package/lib/types/Task.d.ts.map +1 -1
- package/lib/types/Task.js.map +1 -1
- package/lib/types/TaskDescription.d.ts +19 -73
- package/lib/types/TaskDescription.d.ts.map +1 -1
- package/lib/types/TaskDescription.js +15 -12
- package/lib/types/TaskDescription.js.map +1 -1
- package/lib/types/TaskList.d.ts +6 -115
- package/lib/types/TaskList.d.ts.map +1 -1
- package/lib/types/TaskList.js +3 -2
- package/lib/types/TaskList.js.map +1 -1
- package/lib/types/TaskMessage.d.ts +3 -11
- package/lib/types/TaskMessage.d.ts.map +1 -1
- package/lib/types/TaskMessage.js +4 -4
- package/lib/types/TaskMessage.js.map +1 -1
- package/lib/types/TaskMessageLocation.d.ts +2 -6
- package/lib/types/TaskMessageLocation.d.ts.map +1 -1
- package/lib/types/TaskMessageLocation.js +3 -3
- package/lib/types/TaskMessageLocation.js.map +1 -1
- package/lib/types/TaskStats.d.ts +26 -17
- package/lib/types/TaskStats.d.ts.map +1 -1
- package/lib/types/TaskStats.js +4 -3
- package/lib/types/TaskStats.js.map +1 -1
- package/lib/types/Timing.d.ts +8 -18
- package/lib/types/Timing.d.ts.map +1 -1
- package/lib/types/Timing.js +5 -8
- package/lib/types/Timing.js.map +1 -1
- package/lib/utilities/TaskRunner.d.ts +56 -18
- package/lib/utilities/TaskRunner.d.ts.map +1 -1
- package/lib/utilities/TaskRunner.js +177 -98
- package/lib/utilities/TaskRunner.js.map +1 -1
- package/lib/utilities/createBundleTask.d.ts.map +1 -1
- package/lib/utilities/createBundleTask.js +9 -15
- package/lib/utilities/createBundleTask.js.map +1 -1
- package/lib/utilities/matchingZodObject.d.ts +18 -10
- package/lib/utilities/matchingZodObject.d.ts.map +1 -1
- package/lib/utilities/matchingZodObject.js +19 -7
- package/lib/utilities/matchingZodObject.js.map +1 -1
- package/lib/utilities/notifyHost.d.ts +3 -4
- package/lib/utilities/notifyHost.d.ts.map +1 -1
- package/lib/utilities/notifyHost.js.map +1 -1
- package/lib/utilities/notifyReload.d.ts +4 -3
- package/lib/utilities/notifyReload.d.ts.map +1 -1
- package/lib/utilities/notifyReload.js +2 -1
- package/lib/utilities/notifyReload.js.map +1 -1
- package/lib/utilities/waitForBusData.d.ts +2 -2
- package/lib/utilities/waitForBusData.d.ts.map +1 -1
- package/lib/utilities/waitForBusData.js.map +1 -1
- package/package.json +16 -16
- package/lib/types/TaskEndDescription.d.ts +0 -26
- package/lib/types/TaskEndDescription.d.ts.map +0 -1
- package/lib/types/TaskEndDescription.js +0 -8
- package/lib/types/TaskEndDescription.js.map +0 -1
- package/lib/types/TaskStartDescription.d.ts +0 -19
- package/lib/types/TaskStartDescription.d.ts.map +0 -1
- package/lib/types/TaskStartDescription.js +0 -8
- package/lib/types/TaskStartDescription.js.map +0 -1
- package/lib/types/ZodGetLinkConfigOutput.d.ts +0 -4
- package/lib/types/ZodGetLinkConfigOutput.d.ts.map +0 -1
- package/lib/types/ZodGetLinkConfigOutput.js +0 -13
- package/lib/types/ZodGetLinkConfigOutput.js.map +0 -1
- package/lib/types/ZodNotifyLinkChangeInput.d.ts +0 -45
- package/lib/types/ZodNotifyLinkChangeInput.d.ts.map +0 -1
- package/lib/types/ZodNotifyLinkChangeInput.js +0 -8
- package/lib/types/ZodNotifyLinkChangeInput.js.map +0 -1
- package/lib/types/ZodResolveMap.d.ts +0 -4
- package/lib/types/ZodResolveMap.d.ts.map +0 -1
- package/lib/types/ZodResolveMap.js +0 -14
- package/lib/types/ZodResolveMap.js.map +0 -1
package/lib/data/busSources.d.ts
CHANGED
|
@@ -1,269 +1,41 @@
|
|
|
1
|
-
import z from 'zod';
|
|
2
|
-
import { type DataBusPath } from '@ms-cloudpack/data-bus';
|
|
1
|
+
import { z } from 'zod/v4-mini';
|
|
3
2
|
/**
|
|
4
3
|
* Used for tracking the reload count.
|
|
5
4
|
*/
|
|
6
|
-
export declare const reloadCountSource: DataBusPath<z.
|
|
5
|
+
export declare const reloadCountSource: import("@ms-cloudpack/data-bus").DataBusPath<z.ZodMiniNumber<number>>;
|
|
7
6
|
/**
|
|
8
7
|
* Used for tracking the task stats displayed in the badge.
|
|
9
8
|
*/
|
|
10
|
-
export declare const taskStatsSource: DataBusPath<z.
|
|
11
|
-
status: z.ZodUnion<[z.ZodLiteral<"idle">, z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"unknown">]>]>;
|
|
12
|
-
remainingTasks: z.ZodNumber;
|
|
13
|
-
totalTasks: z.ZodNumber;
|
|
14
|
-
totalErrors: z.ZodNumber;
|
|
15
|
-
totalWarnings: z.ZodNumber;
|
|
16
|
-
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
status: "idle" | "unknown" | "pending";
|
|
18
|
-
remainingTasks: number;
|
|
19
|
-
totalTasks: number;
|
|
20
|
-
totalErrors: number;
|
|
21
|
-
totalWarnings: number;
|
|
22
|
-
}, {
|
|
23
|
-
status: "idle" | "unknown" | "pending";
|
|
24
|
-
remainingTasks: number;
|
|
25
|
-
totalTasks: number;
|
|
26
|
-
totalErrors: number;
|
|
27
|
-
totalWarnings: number;
|
|
28
|
-
}>>;
|
|
9
|
+
export declare const taskStatsSource: import("@ms-cloudpack/data-bus").DataBusPath<z.ZodMiniObject<import("../utilities/matchingZodObject.js").MatchingZodShape<import("../index.browser.js").TaskStats>, z.core.$strip>>;
|
|
29
10
|
/**
|
|
30
11
|
* Used for tracking the list of tasks.
|
|
31
12
|
*/
|
|
32
|
-
export declare const taskListSource: DataBusPath<z.
|
|
33
|
-
tasks: z.ZodArray<z.ZodObject<{
|
|
34
|
-
status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"complete">]>>;
|
|
35
|
-
timings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
36
|
-
name: z.ZodString;
|
|
37
|
-
start: z.ZodNumber;
|
|
38
|
-
end: z.ZodOptional<z.ZodNumber>;
|
|
39
|
-
threwException: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
-
}, "strip", z.ZodTypeAny, {
|
|
41
|
-
name: string;
|
|
42
|
-
start: number;
|
|
43
|
-
end?: number | undefined;
|
|
44
|
-
threwException?: boolean | undefined;
|
|
45
|
-
}, {
|
|
46
|
-
name: string;
|
|
47
|
-
start: number;
|
|
48
|
-
end?: number | undefined;
|
|
49
|
-
threwException?: boolean | undefined;
|
|
50
|
-
}>, "many">>;
|
|
51
|
-
startTime: z.ZodNumber;
|
|
52
|
-
durationMilliseconds: z.ZodOptional<z.ZodNumber>;
|
|
53
|
-
lastUpdated: z.ZodOptional<z.ZodNumber>;
|
|
54
|
-
name: z.ZodOptional<z.ZodString>;
|
|
55
|
-
inputPath: z.ZodOptional<z.ZodString>;
|
|
56
|
-
outputPath: z.ZodOptional<z.ZodString>;
|
|
57
|
-
} & {
|
|
58
|
-
id: z.ZodString;
|
|
59
|
-
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
60
|
-
text: z.ZodType<string, z.ZodTypeDef, string>;
|
|
61
|
-
source: z.ZodType<string, z.ZodTypeDef, string>;
|
|
62
|
-
location: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageLocation | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageLocation | undefined>;
|
|
63
|
-
notes: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageNote[] | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageNote[] | undefined>;
|
|
64
|
-
}, "strict", z.ZodTypeAny, import("@ms-cloudpack/common-types").BundleMessage, import("@ms-cloudpack/common-types").BundleMessage>, "many">>;
|
|
65
|
-
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
66
|
-
text: z.ZodType<string, z.ZodTypeDef, string>;
|
|
67
|
-
source: z.ZodType<string, z.ZodTypeDef, string>;
|
|
68
|
-
location: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageLocation | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageLocation | undefined>;
|
|
69
|
-
notes: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageNote[] | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageNote[] | undefined>;
|
|
70
|
-
}, "strict", z.ZodTypeAny, import("@ms-cloudpack/common-types").BundleMessage, import("@ms-cloudpack/common-types").BundleMessage>, "many">>;
|
|
71
|
-
}, "strip", z.ZodTypeAny, {
|
|
72
|
-
id: string;
|
|
73
|
-
startTime: number;
|
|
74
|
-
status?: "pending" | "complete" | undefined;
|
|
75
|
-
name?: string | undefined;
|
|
76
|
-
inputPath?: string | undefined;
|
|
77
|
-
outputPath?: string | undefined;
|
|
78
|
-
errors?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
|
|
79
|
-
warnings?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
|
|
80
|
-
timings?: {
|
|
81
|
-
name: string;
|
|
82
|
-
start: number;
|
|
83
|
-
end?: number | undefined;
|
|
84
|
-
threwException?: boolean | undefined;
|
|
85
|
-
}[] | undefined;
|
|
86
|
-
durationMilliseconds?: number | undefined;
|
|
87
|
-
lastUpdated?: number | undefined;
|
|
88
|
-
}, {
|
|
89
|
-
id: string;
|
|
90
|
-
startTime: number;
|
|
91
|
-
status?: "pending" | "complete" | undefined;
|
|
92
|
-
name?: string | undefined;
|
|
93
|
-
inputPath?: string | undefined;
|
|
94
|
-
outputPath?: string | undefined;
|
|
95
|
-
errors?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
|
|
96
|
-
warnings?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
|
|
97
|
-
timings?: {
|
|
98
|
-
name: string;
|
|
99
|
-
start: number;
|
|
100
|
-
end?: number | undefined;
|
|
101
|
-
threwException?: boolean | undefined;
|
|
102
|
-
}[] | undefined;
|
|
103
|
-
durationMilliseconds?: number | undefined;
|
|
104
|
-
lastUpdated?: number | undefined;
|
|
105
|
-
}>, "many">;
|
|
106
|
-
}, "strip", z.ZodTypeAny, {
|
|
107
|
-
tasks: {
|
|
108
|
-
id: string;
|
|
109
|
-
startTime: number;
|
|
110
|
-
status?: "pending" | "complete" | undefined;
|
|
111
|
-
name?: string | undefined;
|
|
112
|
-
inputPath?: string | undefined;
|
|
113
|
-
outputPath?: string | undefined;
|
|
114
|
-
errors?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
|
|
115
|
-
warnings?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
|
|
116
|
-
timings?: {
|
|
117
|
-
name: string;
|
|
118
|
-
start: number;
|
|
119
|
-
end?: number | undefined;
|
|
120
|
-
threwException?: boolean | undefined;
|
|
121
|
-
}[] | undefined;
|
|
122
|
-
durationMilliseconds?: number | undefined;
|
|
123
|
-
lastUpdated?: number | undefined;
|
|
124
|
-
}[];
|
|
125
|
-
}, {
|
|
126
|
-
tasks: {
|
|
127
|
-
id: string;
|
|
128
|
-
startTime: number;
|
|
129
|
-
status?: "pending" | "complete" | undefined;
|
|
130
|
-
name?: string | undefined;
|
|
131
|
-
inputPath?: string | undefined;
|
|
132
|
-
outputPath?: string | undefined;
|
|
133
|
-
errors?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
|
|
134
|
-
warnings?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
|
|
135
|
-
timings?: {
|
|
136
|
-
name: string;
|
|
137
|
-
start: number;
|
|
138
|
-
end?: number | undefined;
|
|
139
|
-
threwException?: boolean | undefined;
|
|
140
|
-
}[] | undefined;
|
|
141
|
-
durationMilliseconds?: number | undefined;
|
|
142
|
-
lastUpdated?: number | undefined;
|
|
143
|
-
}[];
|
|
144
|
-
}>>;
|
|
13
|
+
export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPath<z.ZodMiniObject<import("../utilities/matchingZodObject.js").MatchingZodShape<import("../index.browser.js").TaskList>, z.core.$strip>>;
|
|
145
14
|
/**
|
|
146
15
|
* Used for tracking entry errors: `Failed to resolve module specifier "${packageName}@${version}${filePath}".`
|
|
147
16
|
* This is used to display errors in the UI and to notify the user of the error when autoUpdateEntries is enabled.
|
|
148
17
|
*/
|
|
149
|
-
export declare const errorEntrySource: DataBusPath<z.
|
|
18
|
+
export declare const errorEntrySource: import("@ms-cloudpack/data-bus").DataBusPath<z.ZodMiniString<string>>;
|
|
150
19
|
/**
|
|
151
20
|
* Used for tracking link updates.
|
|
152
21
|
*/
|
|
153
|
-
export declare const linkUpdateSource: DataBusPath<z.
|
|
154
|
-
packagePath: z.ZodString;
|
|
155
|
-
hash: z.ZodOptional<z.ZodString>;
|
|
156
|
-
definition: z.ZodOptional<z.ZodObject<{
|
|
157
|
-
name: z.ZodString;
|
|
158
|
-
version: z.ZodString;
|
|
159
|
-
exports: z.ZodAny;
|
|
160
|
-
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUndefined, z.ZodString]>>>;
|
|
161
|
-
peerDependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUndefined, z.ZodString]>>>;
|
|
162
|
-
}, "strip", z.ZodTypeAny, {
|
|
163
|
-
name: string;
|
|
164
|
-
version: string;
|
|
165
|
-
exports?: any;
|
|
166
|
-
dependencies?: Record<string, string | undefined> | undefined;
|
|
167
|
-
peerDependencies?: Record<string, string | undefined> | undefined;
|
|
168
|
-
}, {
|
|
169
|
-
name: string;
|
|
170
|
-
version: string;
|
|
171
|
-
exports?: any;
|
|
172
|
-
dependencies?: Record<string, string | undefined> | undefined;
|
|
173
|
-
peerDependencies?: Record<string, string | undefined> | undefined;
|
|
174
|
-
}>>;
|
|
175
|
-
}, "strip", z.ZodTypeAny, {
|
|
176
|
-
packagePath: string;
|
|
177
|
-
hash?: string | undefined;
|
|
178
|
-
definition?: {
|
|
179
|
-
name: string;
|
|
180
|
-
version: string;
|
|
181
|
-
exports?: any;
|
|
182
|
-
dependencies?: Record<string, string | undefined> | undefined;
|
|
183
|
-
peerDependencies?: Record<string, string | undefined> | undefined;
|
|
184
|
-
} | undefined;
|
|
185
|
-
}, {
|
|
186
|
-
packagePath: string;
|
|
187
|
-
hash?: string | undefined;
|
|
188
|
-
definition?: {
|
|
189
|
-
name: string;
|
|
190
|
-
version: string;
|
|
191
|
-
exports?: any;
|
|
192
|
-
dependencies?: Record<string, string | undefined> | undefined;
|
|
193
|
-
peerDependencies?: Record<string, string | undefined> | undefined;
|
|
194
|
-
} | undefined;
|
|
195
|
-
}>>;
|
|
22
|
+
export declare const linkUpdateSource: import("@ms-cloudpack/data-bus").DataBusPath<z.ZodMiniObject<import("../utilities/matchingZodObject.js").MatchingZodShape<import("../index.browser.js").NotifyLinkChangeInput>, z.core.$strip>>;
|
|
196
23
|
/**
|
|
197
24
|
* Used for fetching the host configuration.
|
|
198
25
|
*/
|
|
199
|
-
export declare const linkConfigSource:
|
|
26
|
+
export declare const linkConfigSource: import("@ms-cloudpack/data-bus").DataBusPath<z.ZodMiniObject<import("../utilities/matchingZodObject.js").MatchingZodShape<import("@ms-cloudpack/common-types").CloudpackLinkConfig>, z.core.$loose>>;
|
|
200
27
|
/**
|
|
201
28
|
* Used for tracking linked paths.
|
|
202
29
|
*/
|
|
203
|
-
export declare const linkPathsSource: DataBusPath<z.
|
|
204
|
-
linkedPath: z.ZodObject<{
|
|
205
|
-
path: z.ZodType<string, z.ZodTypeDef, string>;
|
|
206
|
-
rootPath: z.ZodType<string | undefined, z.ZodTypeDef, string | undefined>;
|
|
207
|
-
includeAll: z.ZodType<boolean | undefined, z.ZodTypeDef, boolean | undefined>;
|
|
208
|
-
ignoredPackages: z.ZodType<string[] | undefined, z.ZodTypeDef, string[] | undefined>;
|
|
209
|
-
ignoreResolutions: z.ZodType<boolean | undefined, z.ZodTypeDef, boolean | undefined>;
|
|
210
|
-
resolveStrategy: z.ZodType<"dedupe" | "duplicate" | undefined, z.ZodTypeDef, "dedupe" | "duplicate" | undefined>;
|
|
211
|
-
remote: z.ZodType<{
|
|
212
|
-
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
213
|
-
hostUrl: string;
|
|
214
|
-
packages: import("@ms-cloudpack/common-types").SerializablePackageDefinitionsCache;
|
|
215
|
-
packageHashes: import("@ms-cloudpack/common-types").SerializablePackageHashesCache;
|
|
216
|
-
} | undefined, z.ZodTypeDef, {
|
|
217
|
-
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
218
|
-
hostUrl: string;
|
|
219
|
-
packages: import("@ms-cloudpack/common-types").SerializablePackageDefinitionsCache;
|
|
220
|
-
packageHashes: import("@ms-cloudpack/common-types").SerializablePackageHashesCache;
|
|
221
|
-
} | undefined>;
|
|
222
|
-
}, "strict", z.ZodTypeAny, import("@ms-cloudpack/common-types").LinkedPath, import("@ms-cloudpack/common-types").LinkedPath>;
|
|
223
|
-
}, "strip", z.ZodTypeAny, {
|
|
224
|
-
linkedPath: import("@ms-cloudpack/common-types").LinkedPath;
|
|
225
|
-
}, {
|
|
226
|
-
linkedPath: import("@ms-cloudpack/common-types").LinkedPath;
|
|
227
|
-
}>>;
|
|
30
|
+
export declare const linkPathsSource: import("@ms-cloudpack/data-bus").DataBusPath<z.ZodMiniObject<import("../utilities/matchingZodObject.js").MatchingZodShape<import("../index.browser.js").LinkPathInput>, z.core.$strip>>;
|
|
228
31
|
/**
|
|
229
32
|
* Used for tracking when linking is done.
|
|
230
33
|
*/
|
|
231
|
-
export declare const linkDoneSource: DataBusPath<z.
|
|
232
|
-
resolveMap: z.ZodType<import("@ms-cloudpack/common-types").ResolveMap, z.ZodTypeDef, import("@ms-cloudpack/common-types").ResolveMap>;
|
|
233
|
-
linkedPaths: z.ZodArray<z.ZodObject<{
|
|
234
|
-
path: z.ZodType<string, z.ZodTypeDef, string>;
|
|
235
|
-
rootPath: z.ZodType<string | undefined, z.ZodTypeDef, string | undefined>;
|
|
236
|
-
includeAll: z.ZodType<boolean | undefined, z.ZodTypeDef, boolean | undefined>;
|
|
237
|
-
ignoredPackages: z.ZodType<string[] | undefined, z.ZodTypeDef, string[] | undefined>;
|
|
238
|
-
ignoreResolutions: z.ZodType<boolean | undefined, z.ZodTypeDef, boolean | undefined>;
|
|
239
|
-
resolveStrategy: z.ZodType<"dedupe" | "duplicate" | undefined, z.ZodTypeDef, "dedupe" | "duplicate" | undefined>;
|
|
240
|
-
remote: z.ZodType<{
|
|
241
|
-
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
242
|
-
hostUrl: string;
|
|
243
|
-
packages: import("@ms-cloudpack/common-types").SerializablePackageDefinitionsCache;
|
|
244
|
-
packageHashes: import("@ms-cloudpack/common-types").SerializablePackageHashesCache;
|
|
245
|
-
} | undefined, z.ZodTypeDef, {
|
|
246
|
-
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
247
|
-
hostUrl: string;
|
|
248
|
-
packages: import("@ms-cloudpack/common-types").SerializablePackageDefinitionsCache;
|
|
249
|
-
packageHashes: import("@ms-cloudpack/common-types").SerializablePackageHashesCache;
|
|
250
|
-
} | undefined>;
|
|
251
|
-
}, "strict", z.ZodTypeAny, import("@ms-cloudpack/common-types").LinkedPath, import("@ms-cloudpack/common-types").LinkedPath>, "many">;
|
|
252
|
-
}, "strip", z.ZodTypeAny, {
|
|
253
|
-
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
254
|
-
linkedPaths: import("@ms-cloudpack/common-types").LinkedPath[];
|
|
255
|
-
}, {
|
|
256
|
-
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
257
|
-
linkedPaths: import("@ms-cloudpack/common-types").LinkedPath[];
|
|
258
|
-
}>>;
|
|
34
|
+
export declare const linkDoneSource: import("@ms-cloudpack/data-bus").DataBusPath<z.ZodMiniObject<import("../utilities/matchingZodObject.js").MatchingZodShape<import("../index.js").LinkPathOutput>, z.core.$strip>>;
|
|
259
35
|
/**
|
|
260
36
|
* Used for detecting host disconnection on link.
|
|
261
37
|
*/
|
|
262
|
-
export declare const linkDisconnectedSource: DataBusPath<z.
|
|
263
|
-
reason: z.
|
|
264
|
-
},
|
|
265
|
-
reason: "lost" | "unreachable";
|
|
266
|
-
}, {
|
|
267
|
-
reason: "lost" | "unreachable";
|
|
268
|
-
}>>;
|
|
38
|
+
export declare const linkDisconnectedSource: import("@ms-cloudpack/data-bus").DataBusPath<z.ZodMiniObject<{
|
|
39
|
+
reason: z.ZodMiniLiteral<"lost" | "unreachable">;
|
|
40
|
+
}, z.core.$strip>>;
|
|
269
41
|
//# sourceMappingURL=busSources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"busSources.d.ts","sourceRoot":"","sources":["../../src/data/busSources.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"busSources.d.ts","sourceRoot":"","sources":["../../src/data/busSources.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAQhC;;GAEG;AACH,eAAO,MAAM,iBAAiB,uEAG5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe,qLAG1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc,oLAGzB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,uEAG3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,iMAG3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,sMAG3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe,yLAG1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc,kLAGzB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;kBAGjC,CAAC"}
|
package/lib/data/busSources.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// This file is used in the browser,
|
|
2
2
|
// so it must only import types (ts and zod) to not trigger a trpc server error due to bad tree shaking.
|
|
3
|
-
import z from 'zod';
|
|
3
|
+
import { z } from 'zod/v4-mini';
|
|
4
4
|
import { ZodTaskStats } from '../types/TaskStats.js';
|
|
5
5
|
import { ZodTaskList } from '../types/TaskList.js';
|
|
6
6
|
import { createDataPath } from '@ms-cloudpack/data-bus';
|
|
7
|
-
import { ZodNotifyLinkChangeInput } from '../types/
|
|
7
|
+
import { ZodNotifyLinkChangeInput } from '../types/NotifyLinkChangeInput.js';
|
|
8
8
|
import { ZodLinkPathInput, ZodLinkPathOutput } from '../types/LinkPath.js';
|
|
9
|
-
import { ZodGetLinkConfigOutput } from '../types/
|
|
9
|
+
import { ZodGetLinkConfigOutput } from '../types/GetLinkConfigOutput.js';
|
|
10
10
|
/**
|
|
11
11
|
* Used for tracking the reload count.
|
|
12
12
|
*/
|
|
@@ -69,6 +69,6 @@ export const linkDoneSource = createDataPath({
|
|
|
69
69
|
*/
|
|
70
70
|
export const linkDisconnectedSource = createDataPath({
|
|
71
71
|
path: ['link', 'disconnected'],
|
|
72
|
-
type: z.object({ reason: z.
|
|
72
|
+
type: z.object({ reason: z.literal(['lost', 'unreachable']) }),
|
|
73
73
|
});
|
|
74
74
|
//# sourceMappingURL=busSources.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"busSources.js","sourceRoot":"","sources":["../../src/data/busSources.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,wGAAwG;AACxG,OAAO,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"busSources.js","sourceRoot":"","sources":["../../src/data/busSources.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,wGAAwG;AACxG,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAC;IAC9C,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,CAAU;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAAC;IAC5C,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAU;IAChC,IAAI,EAAE,YAAY;CACnB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;IAC3C,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAU;IAC/B,IAAI,EAAE,WAAW;CAClB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;IAC7C,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,CAAU;IACjC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;IAC7C,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAU;IACjC,IAAI,EAAE,wBAAwB;CAC/B,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;IAC7C,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAU;IACjC,IAAI,EAAE,sBAAsB;CAC7B,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAAC;IAC5C,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAU;IAChC,IAAI,EAAE,gBAAgB;CACvB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;IAC3C,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAU;IAC/B,IAAI,EAAE,iBAAiB;CACxB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,cAAc,CAAC;IACnD,IAAI,EAAE,CAAC,MAAM,EAAE,cAAc,CAAU;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC;CAC/D,CAAC,CAAC","sourcesContent":["// This file is used in the browser,\n// so it must only import types (ts and zod) to not trigger a trpc server error due to bad tree shaking.\nimport { z } from 'zod/v4-mini';\nimport { ZodTaskStats } from '../types/TaskStats.js';\nimport { ZodTaskList } from '../types/TaskList.js';\nimport { createDataPath } from '@ms-cloudpack/data-bus';\nimport { ZodNotifyLinkChangeInput } from '../types/NotifyLinkChangeInput.js';\nimport { ZodLinkPathInput, ZodLinkPathOutput } from '../types/LinkPath.js';\nimport { ZodGetLinkConfigOutput } from '../types/GetLinkConfigOutput.js';\n\n/**\n * Used for tracking the reload count.\n */\nexport const reloadCountSource = createDataPath({\n path: ['session', 'version'] as const,\n type: z.number(),\n});\n\n/**\n * Used for tracking the task stats displayed in the badge.\n */\nexport const taskStatsSource = createDataPath({\n path: ['task', 'stats'] as const,\n type: ZodTaskStats,\n});\n\n/**\n * Used for tracking the list of tasks.\n */\nexport const taskListSource = createDataPath({\n path: ['task', 'list'] as const,\n type: ZodTaskList,\n});\n\n/**\n * Used for tracking entry errors: `Failed to resolve module specifier \"${packageName}@${version}${filePath}\".`\n * This is used to display errors in the UI and to notify the user of the error when autoUpdateEntries is enabled.\n */\nexport const errorEntrySource = createDataPath({\n path: ['error', 'entry'] as const,\n type: z.string(),\n});\n\n/**\n * Used for tracking link updates.\n */\nexport const linkUpdateSource = createDataPath({\n path: ['link', 'update'] as const,\n type: ZodNotifyLinkChangeInput,\n});\n\n/**\n * Used for fetching the host configuration.\n */\nexport const linkConfigSource = createDataPath({\n path: ['link', 'config'] as const,\n type: ZodGetLinkConfigOutput,\n});\n\n/**\n * Used for tracking linked paths.\n */\nexport const linkPathsSource = createDataPath({\n path: ['link', 'paths'] as const,\n type: ZodLinkPathInput,\n});\n\n/**\n * Used for tracking when linking is done.\n */\nexport const linkDoneSource = createDataPath({\n path: ['link', 'done'] as const,\n type: ZodLinkPathOutput,\n});\n\n/**\n * Used for detecting host disconnection on link.\n */\nexport const linkDisconnectedSource = createDataPath({\n path: ['link', 'disconnected'] as const,\n type: z.object({ reason: z.literal(['lost', 'unreachable']) }),\n});\n"]}
|
package/lib/index.browser.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type { TaskMessage } from './types/TaskMessage.js';
|
|
|
4
4
|
export type { TaskList } from './types/TaskList.js';
|
|
5
5
|
export { createCloudpackClient, type CloudpackClient } from './trpc/createCloudpackClient.js';
|
|
6
6
|
export { taskListSource, taskStatsSource, reloadCountSource, errorEntrySource, linkUpdateSource, linkConfigSource, linkPathsSource, linkDoneSource, linkDisconnectedSource, } from './data/busSources.js';
|
|
7
|
-
export type { NotifyLinkChangeInput } from './
|
|
7
|
+
export type { NotifyLinkChangeInput } from './types/NotifyLinkChangeInput.js';
|
|
8
8
|
export type { LinkPathInput } from './types/LinkPath.js';
|
|
9
|
-
export type { GetLinkConfigOutput } from './
|
|
9
|
+
export type { GetLinkConfigOutput } from './types/GetLinkConfigOutput.js';
|
|
10
10
|
//# sourceMappingURL=index.browser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAE9F,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAE9F,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAC9E,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,YAAY,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC"}
|
package/lib/index.browser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAwB,MAAM,iCAAiC,CAAC;AAE9F,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,sBAAsB,GACvB,MAAM,sBAAsB,CAAC","sourcesContent":["export type { TaskStats } from './types/TaskStats.js';\nexport type { TaskDescription } from './types/TaskDescription.js';\nexport type { TaskMessage } from './types/TaskMessage.js';\nexport type { TaskList } from './types/TaskList.js';\n\nexport { createCloudpackClient, type CloudpackClient } from './trpc/createCloudpackClient.js';\n\nexport {\n taskListSource,\n taskStatsSource,\n reloadCountSource,\n errorEntrySource,\n linkUpdateSource,\n linkConfigSource,\n linkPathsSource,\n linkDoneSource,\n linkDisconnectedSource,\n} from './data/busSources.js';\n\n// Link proxy required types\nexport type { NotifyLinkChangeInput } from './
|
|
1
|
+
{"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAwB,MAAM,iCAAiC,CAAC;AAE9F,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,sBAAsB,GACvB,MAAM,sBAAsB,CAAC","sourcesContent":["export type { TaskStats } from './types/TaskStats.js';\nexport type { TaskDescription } from './types/TaskDescription.js';\nexport type { TaskMessage } from './types/TaskMessage.js';\nexport type { TaskList } from './types/TaskList.js';\n\nexport { createCloudpackClient, type CloudpackClient } from './trpc/createCloudpackClient.js';\n\nexport {\n taskListSource,\n taskStatsSource,\n reloadCountSource,\n errorEntrySource,\n linkUpdateSource,\n linkConfigSource,\n linkPathsSource,\n linkDoneSource,\n linkDisconnectedSource,\n} from './data/busSources.js';\n\n// Link proxy required types\nexport type { NotifyLinkChangeInput } from './types/NotifyLinkChangeInput.js';\nexport type { LinkPathInput } from './types/LinkPath.js';\nexport type { GetLinkConfigOutput } from './types/GetLinkConfigOutput.js';\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -3,10 +3,8 @@ export type { BundleInfo, BundleEntryInfo, BundleEntryConsumes } from './types/B
|
|
|
3
3
|
export type { TaskStats } from './types/TaskStats.js';
|
|
4
4
|
export type { Task } from './types/Task.js';
|
|
5
5
|
export type { TaskDescription } from './types/TaskDescription.js';
|
|
6
|
-
export type { TaskEndDescription } from './types/TaskEndDescription.js';
|
|
7
6
|
export type { TaskList } from './types/TaskList.js';
|
|
8
7
|
export type { TaskMessage } from './types/TaskMessage.js';
|
|
9
|
-
export type { TaskStartDescription } from './types/TaskStartDescription.js';
|
|
10
8
|
export type { EnsurePackageBundledContext, EnsurePackageBundledResult } from './apis/ensurePackageBundled.js';
|
|
11
9
|
export type { CloudAppContext } from './types/CloudAppContext.js';
|
|
12
10
|
export type { LinkPathInput, LinkPathOutput } from './types/LinkPath.js';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAClE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC9F,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAClE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC9F,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC9G,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EACL,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC7G,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAG/D,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,KAAK,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvH,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAGzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EACL,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAwB,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAwB,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC7G,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,YAAY;AACZ,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAgC,MAAM,8BAA8B,CAAC;AACvH,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEzF,iDAAiD;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export type { Context, PartialContext } from './types/Context.js';\nexport type { BundleInfo, BundleEntryInfo, BundleEntryConsumes } from './types/BundleInfo.js';\nexport type { TaskStats } from './types/TaskStats.js';\nexport type { Task } from './types/Task.js';\nexport type { TaskDescription } from './types/TaskDescription.js';\nexport type { TaskList } from './types/TaskList.js';\nexport type { TaskMessage } from './types/TaskMessage.js';\nexport type { EnsurePackageBundledContext, EnsurePackageBundledResult } from './apis/ensurePackageBundled.js';\nexport type { CloudAppContext } from './types/CloudAppContext.js';\nexport type { LinkPathInput, LinkPathOutput } from './types/LinkPath.js';\n\nexport { TaskRunner } from './utilities/TaskRunner.js';\nexport {\n taskListSource,\n taskStatsSource,\n errorEntrySource,\n linkConfigSource,\n linkPathsSource,\n linkDoneSource,\n linkDisconnectedSource,\n} from './data/busSources.js';\nexport { createCloudpackClient, type CloudpackClient } from './trpc/createCloudpackClient.js';\nexport { createCloudpackServer, type CloudpackServer, apiServerPort } from './trpc/createCloudpackServer.js';\nexport { getActiveSessionsPath } from './utilities/getActiveSessionsPath.js';\nexport { getConsumedDependencies } from './utilities/getConsumedDependencies.js';\nexport { getConsumedPaths } from './utilities/getConsumedPaths.js';\nexport { waitForBusData } from './utilities/waitForBusData.js';\n\n// Utilities\nexport { createApiContext, createPartialApiContext, type CreateApiContextOptions } from './common/createApiContext.js';\nexport { createMockContext, createPartialMockContext } from './common/createMockContext.js';\nexport { createMockSession, createMockSessionNoFS } from './common/createMockSession.js';\n\n// API methods directly used outside this package\nexport { addPackageOverride } from './apis/addPackageOverride.js';\nexport { ensurePackageBundled } from './apis/ensurePackageBundled.js';\nexport { syncDownload } from './apis/syncDownload.js';\nexport { syncUpload } from './apis/syncUpload.js';\nexport type { SyncResult } from './types/SyncResult.js';\n"]}
|
package/lib/trpc/common.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { type TRPCMutationProcedure, type TRPCQueryProcedure, type TRPCSubscriptionProcedure } from '@trpc/server';
|
|
1
2
|
import type { Context } from '../types/Context.js';
|
|
3
|
+
import type { z } from 'zod/v4-mini';
|
|
4
|
+
import type { ApiParams } from '../types/ApiParams.js';
|
|
5
|
+
import type { Session } from '@ms-cloudpack/common-types';
|
|
2
6
|
export type CreateContext = () => Promise<Context>;
|
|
3
7
|
/** Reusable TRPC router helper. */
|
|
4
8
|
export declare const createRouter: import("@trpc/server").TRPCRouterBuilder<{
|
|
@@ -7,6 +11,41 @@ export declare const createRouter: import("@trpc/server").TRPCRouterBuilder<{
|
|
|
7
11
|
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
8
12
|
transformer: false;
|
|
9
13
|
}>;
|
|
10
|
-
/**
|
|
11
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Generic procedure supertype for the procedure helpers. This should only be used in defining
|
|
16
|
+
* procedure helpers (not as a type on functions) because it expects all Context/Session keys
|
|
17
|
+
* rather than narrowing to only the ones used.
|
|
18
|
+
*/
|
|
19
|
+
type Procedure<TInput, TOutput> = (opts: ApiParams<TInput, keyof Context, keyof Session>) => TOutput | Promise<TOutput>;
|
|
20
|
+
/**
|
|
21
|
+
* tRPC procedure definition type. `metadata` is marked as `never` because we're not currently
|
|
22
|
+
* using the `.metadata()` feature of procedures (could be added later).
|
|
23
|
+
*/
|
|
24
|
+
type ProcedureDef<TInput, TOutput> = {
|
|
25
|
+
input: TInput;
|
|
26
|
+
output: TOutput;
|
|
27
|
+
meta: never;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Mutation procedure helper for tRPC.
|
|
31
|
+
*
|
|
32
|
+
* It's recommended to explicitly specify the type parameters to ensure the original types
|
|
33
|
+
* and any docs are preserved in the procedures exposed on the client.
|
|
34
|
+
*/
|
|
35
|
+
export declare function mutationProcedure<TInput, TOutput>(procedure: Procedure<TInput, TOutput>, input: z.ZodMiniType<TInput, TInput>, output: z.ZodMiniType<TOutput, TOutput>): TRPCMutationProcedure<ProcedureDef<TInput, TOutput>>;
|
|
36
|
+
/**
|
|
37
|
+
* Query procedure helper for tRPC.
|
|
38
|
+
*
|
|
39
|
+
* It's recommended to explicitly specify the type parameters to ensure the original types
|
|
40
|
+
* and any docs are preserved in the procedures exposed on the client.
|
|
41
|
+
*/
|
|
42
|
+
export declare function queryProcedure<TInput, TOutput>(procedure: Procedure<TInput, TOutput>, input: z.ZodMiniType<TInput, TInput>, output: z.ZodMiniType<TOutput, TOutput>): TRPCQueryProcedure<ProcedureDef<TInput, TOutput>>;
|
|
43
|
+
/**
|
|
44
|
+
* Subscription procedure helper for tRPC.
|
|
45
|
+
*
|
|
46
|
+
* It's recommended to explicitly specify the type parameters to ensure the original types
|
|
47
|
+
* and any docs are preserved in the procedures exposed on the client.
|
|
48
|
+
*/
|
|
49
|
+
export declare function subscriptionProcedure<TInput, TOutput>(procedure: Procedure<TInput, TOutput>, input: z.ZodMiniType<TInput, TInput>, output: z.ZodMiniType<TOutput, TOutput>): TRPCSubscriptionProcedure<ProcedureDef<TInput, TOutput>>;
|
|
50
|
+
export {};
|
|
12
51
|
//# sourceMappingURL=common.d.ts.map
|
package/lib/trpc/common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/trpc/common.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/trpc/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC/B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAE1D,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;AAKnD,mCAAmC;AACnC,eAAO,MAAM,YAAY;;;;;EAAW,CAAC;AAErC;;;;GAIG;AACH,KAAK,SAAS,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,OAAO,EAAE,MAAM,OAAO,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAExH;;;GAGG;AACH,KAAK,YAAY,CAAC,MAAM,EAAE,OAAO,IAAI;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC;AAErF;;;;;GAKG;AAKH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAC/C,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,EACrC,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,GACtC,qBAAqB,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAQtD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,EAC5C,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,EACrC,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,GACtC,kBAAkB,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAQnD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,EACnD,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,EACrC,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,GACtC,yBAAyB,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAQ1D"}
|
package/lib/trpc/common.js
CHANGED
|
@@ -1,8 +1,49 @@
|
|
|
1
|
-
import { initTRPC } from '@trpc/server';
|
|
1
|
+
import { initTRPC, } from '@trpc/server';
|
|
2
2
|
// Initialization of tRPC backend. Should be done only once per backend!
|
|
3
3
|
const t = initTRPC.context().create();
|
|
4
4
|
/** Reusable TRPC router helper. */
|
|
5
5
|
export const createRouter = t.router;
|
|
6
|
-
/**
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Mutation procedure helper for tRPC.
|
|
8
|
+
*
|
|
9
|
+
* It's recommended to explicitly specify the type parameters to ensure the original types
|
|
10
|
+
* and any docs are preserved in the procedures exposed on the client.
|
|
11
|
+
*/
|
|
12
|
+
// These helpers exist because for some reason the generic input/output type inference in
|
|
13
|
+
// `t.procedure.mutation` etc (maybe when combined with the way zod defines input/output types)
|
|
14
|
+
// loses the original types during declaration emit, and instead emits copies with all the same
|
|
15
|
+
// properties but no docs.
|
|
16
|
+
export function mutationProcedure(procedure, input, output) {
|
|
17
|
+
return t.procedure
|
|
18
|
+
.input(input)
|
|
19
|
+
.output(output)
|
|
20
|
+
// eslint-disable-next-line
|
|
21
|
+
.mutation(procedure);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Query procedure helper for tRPC.
|
|
25
|
+
*
|
|
26
|
+
* It's recommended to explicitly specify the type parameters to ensure the original types
|
|
27
|
+
* and any docs are preserved in the procedures exposed on the client.
|
|
28
|
+
*/
|
|
29
|
+
export function queryProcedure(procedure, input, output) {
|
|
30
|
+
return t.procedure
|
|
31
|
+
.input(input)
|
|
32
|
+
.output(output)
|
|
33
|
+
// eslint-disable-next-line
|
|
34
|
+
.query(procedure);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Subscription procedure helper for tRPC.
|
|
38
|
+
*
|
|
39
|
+
* It's recommended to explicitly specify the type parameters to ensure the original types
|
|
40
|
+
* and any docs are preserved in the procedures exposed on the client.
|
|
41
|
+
*/
|
|
42
|
+
export function subscriptionProcedure(procedure, input, output) {
|
|
43
|
+
return t.procedure
|
|
44
|
+
.input(input)
|
|
45
|
+
.output(output)
|
|
46
|
+
// eslint-disable-next-line
|
|
47
|
+
.subscription(procedure);
|
|
48
|
+
}
|
|
8
49
|
//# sourceMappingURL=common.js.map
|
package/lib/trpc/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/trpc/common.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/trpc/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,GAIT,MAAM,cAAc,CAAC;AAQtB,wEAAwE;AACxE,MAAM,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAiB,CAAC,MAAM,EAAE,CAAC;AAErD,mCAAmC;AACnC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;AAerC;;;;;GAKG;AACH,yFAAyF;AACzF,+FAA+F;AAC/F,+FAA+F;AAC/F,0BAA0B;AAC1B,MAAM,UAAU,iBAAiB,CAC/B,SAAqC,EACrC,KAAoC,EACpC,MAAuC;IAEvC,OACE,CAAC,CAAC,SAAS;SACR,KAAK,CAAC,KAAK,CAAC;SACZ,MAAM,CAAC,MAAM,CAAC;QACf,2BAA2B;SAC1B,QAAQ,CAAC,SAAgB,CAC7B,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAC5B,SAAqC,EACrC,KAAoC,EACpC,MAAuC;IAEvC,OACE,CAAC,CAAC,SAAS;SACR,KAAK,CAAC,KAAK,CAAC;SACZ,MAAM,CAAC,MAAM,CAAC;QACf,2BAA2B;SAC1B,KAAK,CAAC,SAAgB,CAC1B,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CACnC,SAAqC,EACrC,KAAoC,EACpC,MAAuC;IAEvC,OACE,CAAC,CAAC,SAAS;SACR,KAAK,CAAC,KAAK,CAAC;SACZ,MAAM,CAAC,MAAM,CAAC;QACf,2BAA2B;SAC1B,YAAY,CAAC,SAAgB,CACjC,CAAC;AACJ,CAAC","sourcesContent":["import {\n initTRPC,\n type TRPCMutationProcedure,\n type TRPCQueryProcedure,\n type TRPCSubscriptionProcedure,\n} from '@trpc/server';\nimport type { Context } from '../types/Context.js';\nimport type { z } from 'zod/v4-mini';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport type { Session } from '@ms-cloudpack/common-types';\n\nexport type CreateContext = () => Promise<Context>;\n\n// Initialization of tRPC backend. Should be done only once per backend!\nconst t = initTRPC.context<CreateContext>().create();\n\n/** Reusable TRPC router helper. */\nexport const createRouter = t.router;\n\n/**\n * Generic procedure supertype for the procedure helpers. This should only be used in defining\n * procedure helpers (not as a type on functions) because it expects all Context/Session keys\n * rather than narrowing to only the ones used.\n */\ntype Procedure<TInput, TOutput> = (opts: ApiParams<TInput, keyof Context, keyof Session>) => TOutput | Promise<TOutput>;\n\n/**\n * tRPC procedure definition type. `metadata` is marked as `never` because we're not currently\n * using the `.metadata()` feature of procedures (could be added later).\n */\ntype ProcedureDef<TInput, TOutput> = { input: TInput; output: TOutput; meta: never };\n\n/**\n * Mutation procedure helper for tRPC.\n *\n * It's recommended to explicitly specify the type parameters to ensure the original types\n * and any docs are preserved in the procedures exposed on the client.\n */\n// These helpers exist because for some reason the generic input/output type inference in\n// `t.procedure.mutation` etc (maybe when combined with the way zod defines input/output types)\n// loses the original types during declaration emit, and instead emits copies with all the same\n// properties but no docs.\nexport function mutationProcedure<TInput, TOutput>(\n procedure: Procedure<TInput, TOutput>,\n input: z.ZodMiniType<TInput, TInput>,\n output: z.ZodMiniType<TOutput, TOutput>,\n): TRPCMutationProcedure<ProcedureDef<TInput, TOutput>> {\n return (\n t.procedure\n .input(input)\n .output(output)\n // eslint-disable-next-line\n .mutation(procedure as any) as TRPCMutationProcedure<ProcedureDef<TInput, TOutput>>\n );\n}\n\n/**\n * Query procedure helper for tRPC.\n *\n * It's recommended to explicitly specify the type parameters to ensure the original types\n * and any docs are preserved in the procedures exposed on the client.\n */\nexport function queryProcedure<TInput, TOutput>(\n procedure: Procedure<TInput, TOutput>,\n input: z.ZodMiniType<TInput, TInput>,\n output: z.ZodMiniType<TOutput, TOutput>,\n): TRPCQueryProcedure<ProcedureDef<TInput, TOutput>> {\n return (\n t.procedure\n .input(input)\n .output(output)\n // eslint-disable-next-line\n .query(procedure as any) as TRPCQueryProcedure<ProcedureDef<TInput, TOutput>>\n );\n}\n\n/**\n * Subscription procedure helper for tRPC.\n *\n * It's recommended to explicitly specify the type parameters to ensure the original types\n * and any docs are preserved in the procedures exposed on the client.\n */\nexport function subscriptionProcedure<TInput, TOutput>(\n procedure: Procedure<TInput, TOutput>,\n input: z.ZodMiniType<TInput, TInput>,\n output: z.ZodMiniType<TOutput, TOutput>,\n): TRPCSubscriptionProcedure<ProcedureDef<TInput, TOutput>> {\n return (\n t.procedure\n .input(input)\n .output(output)\n // eslint-disable-next-line\n .subscription(procedure as any) as TRPCSubscriptionProcedure<ProcedureDef<TInput, TOutput>>\n );\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { z } from 'zod/v4-mini';
|
|
2
|
+
import type { CloudpackLinkConfig } from '@ms-cloudpack/common-types';
|
|
3
|
+
export type GetLinkConfigOutput = CloudpackLinkConfig;
|
|
4
|
+
export declare const ZodGetLinkConfigOutput: z.ZodMiniObject<import("../utilities/matchingZodObject.js").MatchingZodShape<CloudpackLinkConfig>, z.core.$loose>;
|
|
5
|
+
//# sourceMappingURL=GetLinkConfigOutput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetLinkConfigOutput.d.ts","sourceRoot":"","sources":["../../src/types/GetLinkConfigOutput.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAChC,OAAO,KAAK,EAAE,mBAAmB,EAA8B,MAAM,4BAA4B,CAAC;AAWlG,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAEtD,eAAO,MAAM,sBAAsB,mHAKjC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// This must be in a separate file because it's imported by busSources.ts, which is also used
|
|
3
|
+
// in the browser, so it must only import zod types.
|
|
4
|
+
//
|
|
5
|
+
import { z } from 'zod/v4-mini';
|
|
6
|
+
import { matchingZodObject, matchingZodObjectLoose } from '../utilities/matchingZodObject.js';
|
|
7
|
+
// Minimum acceptable match object for a low maintenance burden.
|
|
8
|
+
const ZodPackageSettingsMatchObject = matchingZodObject({
|
|
9
|
+
name: z.string(),
|
|
10
|
+
version: z.optional(z.string()),
|
|
11
|
+
});
|
|
12
|
+
const ZodPackageSettingsMatch = z.union([z.string(), z.looseObject({ ...ZodPackageSettingsMatchObject.shape })]);
|
|
13
|
+
const ZodGeneratedPackageSettingsMatch = z.union([z.string(), z.required(ZodPackageSettingsMatchObject)]);
|
|
14
|
+
export const ZodGetLinkConfigOutput = matchingZodObjectLoose({
|
|
15
|
+
packageSettings: z.optional(z.array(z.looseObject({ match: z.union([ZodPackageSettingsMatch, z.array(ZodPackageSettingsMatch)]) }))),
|
|
16
|
+
generated: z.looseObject({ packageSettings: z.array(z.looseObject({ match: ZodGeneratedPackageSettingsMatch })) }),
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=GetLinkConfigOutput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetLinkConfigOutput.js","sourceRoot":"","sources":["../../src/types/GetLinkConfigOutput.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,6FAA6F;AAC7F,oDAAoD;AACpD,EAAE;AACF,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAEhC,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE9F,gEAAgE;AAChE,MAAM,6BAA6B,GAAG,iBAAiB,CAA6B;IAClF,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAChC,CAAC,CAAC;AACH,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,GAAG,6BAA6B,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;AACjH,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC;AAI1G,MAAM,CAAC,MAAM,sBAAsB,GAAG,sBAAsB,CAAsB;IAChF,eAAe,EAAE,CAAC,CAAC,QAAQ,CACzB,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,uBAAuB,EAAE,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CACxG;IACD,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,gCAAgC,EAAE,CAAC,CAAC,EAAE,CAAC;CACnH,CAAC,CAAC","sourcesContent":["//\n// This must be in a separate file because it's imported by busSources.ts, which is also used\n// in the browser, so it must only import zod types.\n//\nimport { z } from 'zod/v4-mini';\nimport type { CloudpackLinkConfig, PackageSettingsMatchObject } from '@ms-cloudpack/common-types';\nimport { matchingZodObject, matchingZodObjectLoose } from '../utilities/matchingZodObject.js';\n\n// Minimum acceptable match object for a low maintenance burden.\nconst ZodPackageSettingsMatchObject = matchingZodObject<PackageSettingsMatchObject>({\n name: z.string(),\n version: z.optional(z.string()),\n});\nconst ZodPackageSettingsMatch = z.union([z.string(), z.looseObject({ ...ZodPackageSettingsMatchObject.shape })]);\nconst ZodGeneratedPackageSettingsMatch = z.union([z.string(), z.required(ZodPackageSettingsMatchObject)]);\n\nexport type GetLinkConfigOutput = CloudpackLinkConfig;\n\nexport const ZodGetLinkConfigOutput = matchingZodObjectLoose<GetLinkConfigOutput>({\n packageSettings: z.optional(\n z.array(z.looseObject({ match: z.union([ZodPackageSettingsMatch, z.array(ZodPackageSettingsMatch)]) })),\n ),\n generated: z.looseObject({ packageSettings: z.array(z.looseObject({ match: ZodGeneratedPackageSettingsMatch })) }),\n});\n"]}
|