@remotion/cloudrun 4.0.87 → 4.0.89
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/.turbo/turbo-build.log +3 -3
- package/dist/api/render-media-on-cloudrun.js +2 -0
- package/dist/api/render-still-on-cloudrun.js +2 -0
- package/dist/functions/helpers/payloads.d.ts +18 -12
- package/dist/functions/helpers/payloads.js +2 -0
- package/dist/functions/render-media-single-thread.js +9 -0
- package/dist/functions/render-still-single-thread.js +7 -0
- package/dist/internals.d.ts +1 -1
- package/package.json +6 -6
- package/.turbo/turbo-lint.log +0 -27
- package/dist/functions/helpers/hi.d.ts +0 -11
- package/dist/functions/helpers/hi.js +0 -39
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
> @remotion/cloudrun@4.0.
|
|
2
|
+
> @remotion/cloudrun@4.0.88 build /Users/jonathanburger/remotion/packages/cloudrun
|
|
3
3
|
> tsc -d && cp src/shared/sa-permissions.json dist/shared/sa-permissions.json && pnpm run buildContainer && pnpm run tarInstaller
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @remotion/cloudrun@4.0.
|
|
6
|
+
> @remotion/cloudrun@4.0.88 buildContainer /Users/jonathanburger/remotion/packages/cloudrun
|
|
7
7
|
> ts-node src/admin/bundle-renderLogic.ts
|
|
8
8
|
|
|
9
9
|
distribution bundled.
|
|
10
10
|
|
|
11
|
-
> @remotion/cloudrun@4.0.
|
|
11
|
+
> @remotion/cloudrun@4.0.88 tarInstaller /Users/jonathanburger/remotion/packages/cloudrun
|
|
12
12
|
> ts-node src/admin/bundle-installer.ts
|
|
13
13
|
|
|
14
14
|
Making reproducible build with gtar
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.renderMediaOnCloudrun = exports.internalRenderMediaOnCloudrun = void 0;
|
|
4
4
|
const pure_1 = require("@remotion/renderer/pure");
|
|
5
5
|
const no_react_1 = require("remotion/no-react");
|
|
6
|
+
const version_1 = require("remotion/version");
|
|
6
7
|
const validate_gcp_codec_1 = require("../shared/validate-gcp-codec");
|
|
7
8
|
const validate_privacy_1 = require("../shared/validate-privacy");
|
|
8
9
|
const validate_serveurl_1 = require("../shared/validate-serveurl");
|
|
@@ -60,6 +61,7 @@ const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, regi
|
|
|
60
61
|
preferLossless: preferLossless !== null && preferLossless !== void 0 ? preferLossless : false,
|
|
61
62
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
|
|
62
63
|
colorSpace: colorSpace !== null && colorSpace !== void 0 ? colorSpace : 'default',
|
|
64
|
+
clientVersion: version_1.VERSION,
|
|
63
65
|
};
|
|
64
66
|
const client = await (0, get_auth_client_for_url_1.getAuthClientForUrl)(cloudRunEndpoint);
|
|
65
67
|
const postResponse = await client.request({
|
|
@@ -4,6 +4,7 @@ exports.renderStillOnCloudrun = void 0;
|
|
|
4
4
|
const client_1 = require("@remotion/renderer/client");
|
|
5
5
|
const pure_1 = require("@remotion/renderer/pure");
|
|
6
6
|
const no_react_1 = require("remotion/no-react");
|
|
7
|
+
const version_1 = require("remotion/version");
|
|
7
8
|
const validate_privacy_1 = require("../shared/validate-privacy");
|
|
8
9
|
const validate_serveurl_1 = require("../shared/validate-serveurl");
|
|
9
10
|
const get_or_create_bucket_1 = require("./get-or-create-bucket");
|
|
@@ -66,6 +67,7 @@ const renderStillOnCloudrunRaw = async ({ cloudRunUrl, serviceName, region, serv
|
|
|
66
67
|
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
|
|
67
68
|
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds !== null && delayRenderTimeoutInMilliseconds !== void 0 ? delayRenderTimeoutInMilliseconds : client_1.BrowserSafeApis.DEFAULT_TIMEOUT,
|
|
68
69
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
|
|
70
|
+
clientVersion: version_1.VERSION,
|
|
69
71
|
};
|
|
70
72
|
const client = await (0, get_auth_client_for_url_1.getAuthClientForUrl)(cloudRunEndpoint);
|
|
71
73
|
const postResponse = await client.request({
|
|
@@ -53,6 +53,7 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
53
53
|
preferLossless: z.ZodBoolean;
|
|
54
54
|
offthreadVideoCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
|
|
55
55
|
colorSpace: z.ZodEnum<["default", "bt709", "bt2020-ncl"]>;
|
|
56
|
+
clientVersion: z.ZodString;
|
|
56
57
|
}, "strip", z.ZodTypeAny, {
|
|
57
58
|
type: "media";
|
|
58
59
|
serveUrl: string;
|
|
@@ -77,13 +78,14 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
77
78
|
envVariables: Record<string, string>;
|
|
78
79
|
muted: boolean;
|
|
79
80
|
outputBucket: string;
|
|
80
|
-
logLevel: "
|
|
81
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
81
82
|
delayRenderTimeoutInMilliseconds: number | null;
|
|
82
83
|
concurrency: string | number | null;
|
|
83
84
|
enforceAudioTrack: boolean;
|
|
84
85
|
preferLossless: boolean;
|
|
85
86
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
86
87
|
colorSpace: "default" | "bt709" | "bt2020-ncl";
|
|
88
|
+
clientVersion: string;
|
|
87
89
|
forceHeight?: number | null | undefined;
|
|
88
90
|
forceWidth?: number | null | undefined;
|
|
89
91
|
chromiumOptions?: {
|
|
@@ -119,13 +121,14 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
119
121
|
envVariables: Record<string, string>;
|
|
120
122
|
muted: boolean;
|
|
121
123
|
outputBucket: string;
|
|
122
|
-
logLevel: "
|
|
124
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
123
125
|
delayRenderTimeoutInMilliseconds: number | null;
|
|
124
126
|
concurrency: string | number | null;
|
|
125
127
|
enforceAudioTrack: boolean;
|
|
126
128
|
preferLossless: boolean;
|
|
127
129
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
128
130
|
colorSpace: "default" | "bt709" | "bt2020-ncl";
|
|
131
|
+
clientVersion: string;
|
|
129
132
|
forceHeight?: number | null | undefined;
|
|
130
133
|
forceWidth?: number | null | undefined;
|
|
131
134
|
chromiumOptions?: {
|
|
@@ -174,6 +177,7 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
174
177
|
delayRenderTimeoutInMilliseconds: z.ZodNumber;
|
|
175
178
|
logLevel: z.ZodEnum<["verbose", "info", "warn", "error"]>;
|
|
176
179
|
offthreadVideoCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
|
|
180
|
+
clientVersion: z.ZodString;
|
|
177
181
|
}, "strip", z.ZodTypeAny, {
|
|
178
182
|
type: "still";
|
|
179
183
|
serveUrl: string;
|
|
@@ -184,9 +188,10 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
184
188
|
envVariables: Record<string, string>;
|
|
185
189
|
outputBucket: string;
|
|
186
190
|
privacy: "public" | "private";
|
|
187
|
-
logLevel: "
|
|
191
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
188
192
|
delayRenderTimeoutInMilliseconds: number;
|
|
189
193
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
194
|
+
clientVersion: string;
|
|
190
195
|
frame: number;
|
|
191
196
|
forceHeight?: number | null | undefined;
|
|
192
197
|
forceWidth?: number | null | undefined;
|
|
@@ -209,9 +214,10 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
209
214
|
envVariables: Record<string, string>;
|
|
210
215
|
outputBucket: string;
|
|
211
216
|
privacy: "public" | "private";
|
|
212
|
-
logLevel: "
|
|
217
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
213
218
|
delayRenderTimeoutInMilliseconds: number;
|
|
214
219
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
220
|
+
clientVersion: string;
|
|
215
221
|
frame: number;
|
|
216
222
|
forceHeight?: number | null | undefined;
|
|
217
223
|
forceWidth?: number | null | undefined;
|
|
@@ -231,13 +237,13 @@ declare const renderFailResponsePayload: z.ZodObject<{
|
|
|
231
237
|
name: z.ZodString;
|
|
232
238
|
stack: z.ZodString;
|
|
233
239
|
}, "strip", z.ZodTypeAny, {
|
|
234
|
-
message: string;
|
|
235
240
|
type: "error";
|
|
241
|
+
message: string;
|
|
236
242
|
name: string;
|
|
237
243
|
stack: string;
|
|
238
244
|
}, {
|
|
239
|
-
message: string;
|
|
240
245
|
type: "error";
|
|
246
|
+
message: string;
|
|
241
247
|
name: string;
|
|
242
248
|
stack: string;
|
|
243
249
|
}>;
|
|
@@ -250,19 +256,19 @@ declare const renderStillOnCloudrunResponsePayload: z.ZodObject<{
|
|
|
250
256
|
renderId: z.ZodString;
|
|
251
257
|
privacy: z.ZodEnum<["public-read", "project-private"]>;
|
|
252
258
|
}, "strip", z.ZodTypeAny, {
|
|
253
|
-
bucketName: string;
|
|
254
259
|
type: "success";
|
|
255
260
|
privacy: "public-read" | "project-private";
|
|
256
261
|
cloudStorageUri: string;
|
|
257
262
|
size: number;
|
|
263
|
+
bucketName: string;
|
|
258
264
|
renderId: string;
|
|
259
265
|
publicUrl?: string | null | undefined;
|
|
260
266
|
}, {
|
|
261
|
-
bucketName: string;
|
|
262
267
|
type: "success";
|
|
263
268
|
privacy: "public-read" | "project-private";
|
|
264
269
|
cloudStorageUri: string;
|
|
265
270
|
size: number;
|
|
271
|
+
bucketName: string;
|
|
266
272
|
renderId: string;
|
|
267
273
|
publicUrl?: string | null | undefined;
|
|
268
274
|
}>;
|
|
@@ -275,19 +281,19 @@ declare const renderMediaOnCloudrunResponsePayload: z.ZodObject<{
|
|
|
275
281
|
renderId: z.ZodString;
|
|
276
282
|
privacy: z.ZodEnum<["public-read", "project-private"]>;
|
|
277
283
|
}, "strip", z.ZodTypeAny, {
|
|
278
|
-
bucketName: string;
|
|
279
284
|
type: "success";
|
|
280
285
|
privacy: "public-read" | "project-private";
|
|
281
286
|
cloudStorageUri: string;
|
|
282
287
|
size: number;
|
|
288
|
+
bucketName: string;
|
|
283
289
|
renderId: string;
|
|
284
290
|
publicUrl?: string | null | undefined;
|
|
285
291
|
}, {
|
|
286
|
-
bucketName: string;
|
|
287
292
|
type: "success";
|
|
288
293
|
privacy: "public-read" | "project-private";
|
|
289
294
|
cloudStorageUri: string;
|
|
290
295
|
size: number;
|
|
296
|
+
bucketName: string;
|
|
291
297
|
renderId: string;
|
|
292
298
|
publicUrl?: string | null | undefined;
|
|
293
299
|
}>;
|
|
@@ -299,15 +305,15 @@ declare const cloudRunCrashResponse: z.ZodObject<{
|
|
|
299
305
|
requestCrashTime: z.ZodString;
|
|
300
306
|
requestElapsedTimeInSeconds: z.ZodNumber;
|
|
301
307
|
}, "strip", z.ZodTypeAny, {
|
|
302
|
-
message: "Service crashed without sending a response. Check the logs in GCP console.";
|
|
303
308
|
type: "crash";
|
|
309
|
+
message: "Service crashed without sending a response. Check the logs in GCP console.";
|
|
304
310
|
cloudRunEndpoint: string;
|
|
305
311
|
requestStartTime: string;
|
|
306
312
|
requestCrashTime: string;
|
|
307
313
|
requestElapsedTimeInSeconds: number;
|
|
308
314
|
}, {
|
|
309
|
-
message: "Service crashed without sending a response. Check the logs in GCP console.";
|
|
310
315
|
type: "crash";
|
|
316
|
+
message: "Service crashed without sending a response. Check the logs in GCP console.";
|
|
311
317
|
cloudRunEndpoint: string;
|
|
312
318
|
requestStartTime: string;
|
|
313
319
|
requestCrashTime: string;
|
|
@@ -55,6 +55,7 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
|
|
|
55
55
|
preferLossless: zod_1.z.boolean(),
|
|
56
56
|
offthreadVideoCacheSizeInBytes: zod_1.z.number().nullable(),
|
|
57
57
|
colorSpace: zod_1.z.enum(client_1.BrowserSafeApis.validColorSpaces),
|
|
58
|
+
clientVersion: zod_1.z.string(),
|
|
58
59
|
}),
|
|
59
60
|
zod_1.z.object({
|
|
60
61
|
type: zod_1.z.literal('still'),
|
|
@@ -75,6 +76,7 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
|
|
|
75
76
|
delayRenderTimeoutInMilliseconds: zod_1.z.number(),
|
|
76
77
|
logLevel,
|
|
77
78
|
offthreadVideoCacheSizeInBytes: zod_1.z.number().nullable(),
|
|
79
|
+
clientVersion: zod_1.z.string(),
|
|
78
80
|
}),
|
|
79
81
|
]);
|
|
80
82
|
const renderFailResponsePayload = zod_1.z.object({
|
|
@@ -4,6 +4,7 @@ exports.renderMediaSingleThread = void 0;
|
|
|
4
4
|
const storage_1 = require("@google-cloud/storage");
|
|
5
5
|
const renderer_1 = require("@remotion/renderer");
|
|
6
6
|
const no_react_1 = require("remotion/no-react");
|
|
7
|
+
const version_1 = require("remotion/version");
|
|
7
8
|
const random_hash_1 = require("../shared/random-hash");
|
|
8
9
|
const get_composition_from_body_1 = require("./helpers/get-composition-from-body");
|
|
9
10
|
const write_cloudrun_error_1 = require("./helpers/write-cloudrun-error");
|
|
@@ -12,6 +13,12 @@ const renderMediaSingleThread = async (body, res) => {
|
|
|
12
13
|
if (body.type !== 'media') {
|
|
13
14
|
throw new Error('expected type media');
|
|
14
15
|
}
|
|
16
|
+
if (body.clientVersion !== version_1.VERSION) {
|
|
17
|
+
if (!body.clientVersion) {
|
|
18
|
+
throw new Error(`Version mismatch: When calling renderMediaOnCloudRun(), you called a service which has the version ${version_1.VERSION} but the @remotion/cloudrun package is an older version. Deploy a new service with matchin version and use it to call renderMediaOnCloudRun().`);
|
|
19
|
+
}
|
|
20
|
+
throw new Error(`Version mismatch: When calling renderMediaOnCloudRun(), you called a service, which has the version ${version_1.VERSION}, but the @remotion/cloudrun package you used to invoke the function has version ${version_1.VERSION}. Deploy a new service and use it to call renderMediaOnCloudrun().`);
|
|
21
|
+
}
|
|
15
22
|
const renderId = (0, random_hash_1.randomHash)({ randomInTests: true });
|
|
16
23
|
try {
|
|
17
24
|
const composition = await (0, get_composition_from_body_1.getCompositionFromBody)(body);
|
|
@@ -85,6 +92,8 @@ const renderMediaSingleThread = async (body, res) => {
|
|
|
85
92
|
server: undefined,
|
|
86
93
|
offthreadVideoCacheSizeInBytes: body.offthreadVideoCacheSizeInBytes,
|
|
87
94
|
colorSpace: body.colorSpace,
|
|
95
|
+
repro: false,
|
|
96
|
+
finishRenderProgress: () => undefined,
|
|
88
97
|
});
|
|
89
98
|
const storage = new storage_1.Storage();
|
|
90
99
|
const publicUpload = body.privacy === 'public' || !body.privacy;
|
|
@@ -4,6 +4,7 @@ exports.renderStillSingleThread = void 0;
|
|
|
4
4
|
const storage_1 = require("@google-cloud/storage");
|
|
5
5
|
const renderer_1 = require("@remotion/renderer");
|
|
6
6
|
const no_react_1 = require("remotion/no-react");
|
|
7
|
+
const version_1 = require("remotion/version");
|
|
7
8
|
const log_1 = require("../cli/log");
|
|
8
9
|
const random_hash_1 = require("../shared/random-hash");
|
|
9
10
|
const get_composition_from_body_1 = require("./helpers/get-composition-from-body");
|
|
@@ -13,6 +14,12 @@ const renderStillSingleThread = async (body, res) => {
|
|
|
13
14
|
if (body.type !== 'still') {
|
|
14
15
|
throw new Error('expected type still');
|
|
15
16
|
}
|
|
17
|
+
if (body.clientVersion !== version_1.VERSION) {
|
|
18
|
+
if (!body.clientVersion) {
|
|
19
|
+
throw new Error(`Version mismatch: When calling renderMediaOnCloudRun(), you called a service which has the version ${version_1.VERSION} but the @remotion/cloudrun package is an older version. Deploy a new service with matchin version and use it to call renderMediaOnCloudRun().`);
|
|
20
|
+
}
|
|
21
|
+
throw new Error(`Version mismatch: When calling renderMediaOnCloudRun(), you called a service, which has the version ${version_1.VERSION}, but the @remotion/cloudrun package you used to invoke the function has version ${version_1.VERSION}. Deploy a new service and use it to call renderMediaOnCloudrun().`);
|
|
22
|
+
}
|
|
16
23
|
const renderId = (0, random_hash_1.randomHash)({ randomInTests: true });
|
|
17
24
|
try {
|
|
18
25
|
log_1.Log.verbose({ indent: false, logLevel: body.logLevel }, 'Rendering still frame', body);
|
package/dist/internals.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const CloudrunInternals: {
|
|
2
|
-
executeCommand: (args: string[], remotionRoot: string, logLevel: "
|
|
2
|
+
executeCommand: (args: string[], remotionRoot: string, logLevel: "error" | "verbose" | "info" | "warn") => Promise<void>;
|
|
3
3
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cloudrun",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.89",
|
|
4
4
|
"description": "GCP Cloud Run alternative to lambda rendering",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"dependencies": {
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"@google-cloud/logging": "^10.5.0",
|
|
13
13
|
"google-auth-library": "^8.7.0",
|
|
14
14
|
"zod": "^3.22.3",
|
|
15
|
-
"@remotion/bundler": "4.0.
|
|
16
|
-
"@remotion/
|
|
17
|
-
"
|
|
18
|
-
"remotion": "4.0.
|
|
15
|
+
"@remotion/bundler": "4.0.89",
|
|
16
|
+
"@remotion/cli": "4.0.89",
|
|
17
|
+
"remotion": "4.0.89",
|
|
18
|
+
"@remotion/renderer": "4.0.89"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@jonny/eslint-config": "3.0.276",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"prettier-plugin-organize-imports": "^3.2.4",
|
|
27
27
|
"ts-node": "^10.8.0",
|
|
28
28
|
"vitest": "0.31.1",
|
|
29
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
29
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.89"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|
|
32
32
|
"./package.json": "./package.json",
|
package/.turbo/turbo-lint.log
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @remotion/cloudrun@4.0.84 lint /Users/jonathanburger/remotion/packages/cloudrun
|
|
3
|
-
> eslint src --ext ts,tsx
|
|
4
|
-
|
|
5
|
-
Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.
|
|
6
|
-
|
|
7
|
-
/Users/jonathanburger/remotion/packages/cloudrun/src/api/check-if-service-exists.ts
|
|
8
|
-
56:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
9
|
-
|
|
10
|
-
/Users/jonathanburger/remotion/packages/cloudrun/src/api/render-media-on-cloudrun.ts
|
|
11
|
-
222:3 warning Unexpected 'todo' comment: 'TODO: Add any sort of type safety' no-warning-comments
|
|
12
|
-
231:17 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
13
|
-
|
|
14
|
-
/Users/jonathanburger/remotion/packages/cloudrun/src/api/render-still-on-cloudrun.ts
|
|
15
|
-
153:17 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
16
|
-
|
|
17
|
-
/Users/jonathanburger/remotion/packages/cloudrun/src/cli/commands/render/helpers/renderArgsCheck.ts
|
|
18
|
-
76:4 warning Unexpected 'todo' comment: 'TODO: Log if there is an incompatible...' no-warning-comments
|
|
19
|
-
|
|
20
|
-
/Users/jonathanburger/remotion/packages/cloudrun/src/cli/commands/render/index.ts
|
|
21
|
-
126:2 warning Unexpected 'todo' comment: 'Todo: Check cloudRunUrl is valid, as the...' no-warning-comments
|
|
22
|
-
|
|
23
|
-
/Users/jonathanburger/remotion/packages/cloudrun/src/cli/commands/still.ts
|
|
24
|
-
112:2 warning Unexpected 'todo' comment: 'Todo: Check cloudRunUrl is valid, as the...' no-warning-comments
|
|
25
|
-
|
|
26
|
-
✖ 7 problems (0 errors, 7 warnings)
|
|
27
|
-
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as z from 'zod';
|
|
2
|
-
export declare const Abc: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3
|
-
type: z.ZodLiteral<"media">;
|
|
4
|
-
hi: z.ZodNullable<z.ZodString>;
|
|
5
|
-
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
type: "media";
|
|
7
|
-
hi: string | null;
|
|
8
|
-
}, {
|
|
9
|
-
type: "media";
|
|
10
|
-
hi: string | null;
|
|
11
|
-
}>]>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Abc = void 0;
|
|
27
|
-
const z = __importStar(require("zod"));
|
|
28
|
-
exports.Abc = z.discriminatedUnion('type', [
|
|
29
|
-
z.object({
|
|
30
|
-
type: z.literal('media'),
|
|
31
|
-
hi: z.string().nullable(),
|
|
32
|
-
}),
|
|
33
|
-
]);
|
|
34
|
-
const a = {
|
|
35
|
-
type: 'media',
|
|
36
|
-
hi: null,
|
|
37
|
-
};
|
|
38
|
-
exports.Abc.parse(a);
|
|
39
|
-
console.log(a);
|