@sanity/blueprints 0.23.0 → 0.23.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.
Files changed (47) hide show
  1. package/dist/definers/functions/base-event.d.ts +2 -0
  2. package/dist/definers/functions/base-event.js +2 -0
  3. package/dist/definers/functions/base-event.js.map +1 -0
  4. package/dist/definers/functions/document.d.ts +26 -0
  5. package/dist/definers/functions/document.js +43 -0
  6. package/dist/definers/functions/document.js.map +1 -0
  7. package/dist/definers/functions/event.d.ts +20 -0
  8. package/dist/definers/functions/event.js +30 -0
  9. package/dist/definers/functions/event.js.map +1 -0
  10. package/dist/definers/functions/index.d.ts +15 -0
  11. package/dist/definers/functions/index.js +34 -0
  12. package/dist/definers/functions/index.js.map +1 -0
  13. package/dist/definers/functions/media-library.d.ts +23 -0
  14. package/dist/definers/functions/media-library.js +83 -0
  15. package/dist/definers/functions/media-library.js.map +1 -0
  16. package/dist/definers/functions/pipeline.d.ts +26 -0
  17. package/dist/definers/functions/pipeline.js +41 -0
  18. package/dist/definers/functions/pipeline.js.map +1 -0
  19. package/dist/definers/functions/queue.d.ts +30 -0
  20. package/dist/definers/functions/queue.js +47 -0
  21. package/dist/definers/functions/queue.js.map +1 -0
  22. package/dist/definers/functions/scheduled.d.ts +46 -0
  23. package/dist/definers/functions/scheduled.js +91 -0
  24. package/dist/definers/functions/scheduled.js.map +1 -0
  25. package/dist/definers/functions/sync-tag-invalidate.d.ts +31 -0
  26. package/dist/definers/functions/sync-tag-invalidate.js +43 -0
  27. package/dist/definers/functions/sync-tag-invalidate.js.map +1 -0
  28. package/dist/index.d.ts +8 -1
  29. package/dist/index.js +8 -1
  30. package/dist/index.js.map +1 -1
  31. package/dist/types/functions/index.d.ts +51 -31
  32. package/package.json +1 -1
  33. package/src/definers/functions/base-event.ts +4 -0
  34. package/src/definers/functions/document.ts +129 -0
  35. package/src/definers/functions/event.ts +32 -0
  36. package/src/definers/functions/index.ts +39 -0
  37. package/src/definers/functions/media-library.ts +98 -0
  38. package/src/definers/functions/pipeline.ts +42 -0
  39. package/src/definers/functions/queue.ts +49 -0
  40. package/src/definers/functions/scheduled.ts +112 -0
  41. package/src/definers/functions/sync-tag-invalidate.ts +51 -0
  42. package/src/index.ts +8 -1
  43. package/src/types/functions/index.ts +64 -43
  44. package/dist/definers/functions.d.ts +0 -210
  45. package/dist/definers/functions.js +0 -381
  46. package/dist/definers/functions.js.map +0 -1
  47. package/src/definers/functions.ts +0 -540
@@ -1,540 +0,0 @@
1
- import {
2
- type BlueprintBaseFunctionConfig,
3
- type BlueprintBaseFunctionResource,
4
- type BlueprintDocumentFunctionConfig,
5
- type BlueprintDocumentFunctionResource,
6
- type BlueprintDocumentFunctionResourceEvent,
7
- type BlueprintEventFunctionConfig,
8
- type BlueprintEventFunctionResource,
9
- type BlueprintFunctionBaseResourceEvent,
10
- type BlueprintMediaLibraryAssetFunctionConfig,
11
- type BlueprintMediaLibraryAssetFunctionResource,
12
- type BlueprintMediaLibraryFunctionResourceEvent,
13
- type BlueprintPipelineConfig,
14
- type BlueprintPipelineResource,
15
- type BlueprintQueueFunctionConfig,
16
- type BlueprintQueueFunctionResource,
17
- type BlueprintScheduledFunctionConfig,
18
- type BlueprintScheduledFunctionConfigEvent,
19
- type BlueprintScheduledFunctionExplicitResourceEvent,
20
- type BlueprintScheduledFunctionExpressionResourceEvent,
21
- type BlueprintScheduledFunctionResource,
22
- type BlueprintScheduledFunctionResourceEvent,
23
- type BlueprintSyncTagInvalidateFunctionConfig,
24
- type BlueprintSyncTagInvalidateFunctionResource,
25
- validateDocumentFunction,
26
- validateEventFunction,
27
- validateFunction,
28
- validateMediaLibraryAssetFunction,
29
- validatePipelineFunction,
30
- validateQueueFunction,
31
- validateScheduledFunction,
32
- validateSyncTagInvalidateFunction,
33
- } from '../index.js'
34
- import {parseScheduledExpression} from '../utils/schedule-parser.js'
35
- import {runValidation} from '../utils/validation.js'
36
-
37
- type BaseFunctionEventKey = keyof BlueprintFunctionBaseResourceEvent
38
- const BASE_EVENT_KEYS = new Set<BaseFunctionEventKey>(['on', 'filter', 'projection', 'includeDrafts'])
39
- type DocumentFunctionEventKey = keyof BlueprintDocumentFunctionResourceEvent
40
- const DOCUMENT_EVENT_KEYS = new Set<DocumentFunctionEventKey>(['includeAllVersions', 'resource', ...BASE_EVENT_KEYS.values()])
41
- type MediaLibraryFunctionEventKey = keyof BlueprintMediaLibraryFunctionResourceEvent
42
- const MEDIA_LIBRARY_EVENT_KEYS = new Set<MediaLibraryFunctionEventKey>(['resource', ...BASE_EVENT_KEYS.values()])
43
- type ScheduledFunctionEventKey =
44
- | keyof BlueprintScheduledFunctionExplicitResourceEvent
45
- | keyof BlueprintScheduledFunctionExpressionResourceEvent
46
- const SCHEDULED_EVENT_KEYS = new Set<ScheduledFunctionEventKey>(['minute', 'hour', 'dayOfWeek', 'month', 'dayOfMonth', 'expression'])
47
-
48
- /*
49
- * FUTURE example (move below @example when ready)
50
- * @example With robot token reference
51
- * ```ts
52
- * defineRole({
53
- * name: 'fn-role',
54
- * title: 'Function Role',
55
- * appliesToRobots: true,
56
- * permissions: [{name: 'sanity-project-dataset', action: 'read'}],
57
- * })
58
- *
59
- * defineRobotToken({
60
- * name: 'fn-robot',
61
- * memberships: [{
62
- * roleNames: ['$.resources.fn-role'],
63
- * }],
64
- * })
65
- *
66
- * defineDocumentFunction({
67
- * name: 'sync-to-external',
68
- * src: 'functions/sync',
69
- * memory: 3,
70
- * timeout: 300,
71
- * robotToken: '$.resources.fn-robot',
72
- * event: {
73
- * on: ['create', 'update'],
74
- * filter: "_type == 'product'",
75
- * projection: "{_id, title, slug}",
76
- * includeDrafts: false,
77
- * },
78
- * env: {
79
- * EXTERNAL_API_URL: 'https://api.example.com',
80
- * SUPER_SECRET: process.env.SUPER_SECRET,
81
- * },
82
- * })
83
- * ```
84
- */
85
- /**
86
- * Defines a function that is triggered by document events in Sanity datasets.
87
- *
88
- * ```ts
89
- * defineDocumentFunction({
90
- * name: 'my-document-function',
91
- * event: {
92
- * on: ['create', 'update'],
93
- * filter: "_type == 'post'",
94
- * projection: "{_id, title, slug}",
95
- * },
96
- * })
97
- * ```
98
- * @param functionConfig The configuration for the document function
99
- * @public
100
- * @category Definers
101
- * @expandType BlueprintDocumentFunctionConfig
102
- * @returns The validated document function resource
103
- */
104
- export function defineDocumentFunction(functionConfig: BlueprintDocumentFunctionConfig): BlueprintDocumentFunctionResource
105
- /**
106
- * @deprecated Define event properties under the 'event' key instead of specifying them at the top level
107
- * @hidden
108
- */
109
- export function defineDocumentFunction(
110
- functionConfig: BlueprintDocumentFunctionConfig & Partial<BlueprintDocumentFunctionResourceEvent>,
111
- ): BlueprintDocumentFunctionResource
112
-
113
- export function defineDocumentFunction(
114
- functionConfig: BlueprintDocumentFunctionConfig & Partial<BlueprintDocumentFunctionResourceEvent>,
115
- ): BlueprintDocumentFunctionResource {
116
- let {name, src, event, timeout, memory, env, robotToken, project, runtime, ...maybeEvent} = functionConfig
117
-
118
- // event validation and normalization
119
- if (event) {
120
- // `event` was specified, but event keys (aggregated in `maybeEvent`) were also specified at the top level. ambiguous and deprecated usage.
121
- const duplicateKeys = Array.from(DOCUMENT_EVENT_KEYS).filter((key) => key in maybeEvent)
122
- if (duplicateKeys.length > 0) {
123
- throw new Error(
124
- `\`event\` properties should be specified under the \`event\` key - specifying them at the top level is deprecated. The following keys were specified at the top level: ${duplicateKeys.map((k) => `\`${k}\``).join(', ')}`,
125
- )
126
- }
127
-
128
- event = buildDocumentFunctionEvent(event)
129
- } else {
130
- event = buildDocumentFunctionEvent(maybeEvent)
131
- // deprecated usage of putting event properties at the top level, warn about this.
132
- console.warn(
133
- '⚠️ Deprecated usage of `defineDocumentFunction`: prefer to put `event` properties under the `event` key rather than at the top level.',
134
- )
135
- }
136
-
137
- const functionResource: BlueprintDocumentFunctionResource = {
138
- ...defineFunction(functionConfig, {skipValidation: true}),
139
- type: 'sanity.function.document',
140
- event,
141
- }
142
-
143
- runValidation(() => validateDocumentFunction(functionResource))
144
-
145
- return functionResource
146
- }
147
-
148
- /*
149
- * FUTURE example (move below @example when ready)
150
- * @example With robot token reference
151
- * ```ts
152
- * defineRobotToken({
153
- * name: 'media-robot',
154
- * memberships: [{
155
- * resourceType: 'project',
156
- * resourceId: projectId,
157
- * roleNames: ['editor'],
158
- * }],
159
- * })
160
- *
161
- * defineMediaLibraryAssetFunction({
162
- * name: 'process-uploads',
163
- * src: 'functions/process-uploads-v2',
164
- * robotToken: '$.resources.media-robot',
165
- * event: {
166
- * on: ['create', 'update'],
167
- * resource: {
168
- * type: 'media-library',
169
- * id: 'my-media-library-id',
170
- * },
171
- * filter: "type == 'image'",
172
- * projection: "{_id}",
173
- * },
174
- * env: {
175
- * CDN_BUCKET: 'my-cdn-bucket',
176
- * },
177
- * })
178
- * ```
179
- */
180
- /**
181
- * Defines a function that is triggered by media library events.
182
- *
183
- * ```ts
184
- * defineMediaLibraryAssetFunction({
185
- * name: 'my-media-library-function',
186
- * event: {
187
- * on: ['create'],
188
- * resource: {
189
- * type: 'media-library',
190
- * id: 'my-media-library-id',
191
- * },
192
- * },
193
- * })
194
- * ```
195
- * @param functionConfig The configuration for the media library asset function
196
- * @public
197
- * @category Definers
198
- * @expandType BlueprintMediaLibraryAssetFunctionConfig
199
- * @returns The validated media library asset function resource
200
- */
201
- export function defineMediaLibraryAssetFunction(
202
- functionConfig: BlueprintMediaLibraryAssetFunctionConfig,
203
- ): BlueprintMediaLibraryAssetFunctionResource {
204
- const {event} = functionConfig
205
-
206
- const functionResource: BlueprintMediaLibraryAssetFunctionResource = {
207
- ...defineFunction(functionConfig, {skipValidation: true}),
208
- type: 'sanity.function.media-library.asset',
209
- event: buildMediaLibraryFunctionEvent(event),
210
- }
211
-
212
- runValidation(() => validateMediaLibraryAssetFunction(functionResource))
213
-
214
- return functionResource
215
- }
216
-
217
- /**
218
- * Defines a function that is triggered on a schedule.
219
- * Supports cron expressions or natural language schedules.
220
- *
221
- * @remarks
222
- * Using a cron expression:
223
- * ```ts
224
- * defineScheduledFunction({
225
- * name: 'daily-cleanup',
226
- * event: {expression: '0 9 * * *'},
227
- * })
228
- * ```
229
- *
230
- * Using explicit cron fields:
231
- * ```ts
232
- * defineScheduledFunction({
233
- * name: 'daily-cleanup',
234
- * event: {minute: '0', hour: '9', dayOfMonth: '*', month: '*', dayOfWeek: '*'},
235
- * })
236
- * ```
237
- *
238
- * The `event.expression` field accepts standard cron expressions or natural language:
239
- * `'every 15 minutes'`, `'weekdays at 8am'`, `'fridays in the evening'`,
240
- * `'mon, wed, fri at 9am'`, `'first of the month at noon'`
241
- *
242
- * ```ts
243
- * defineScheduledFunction({
244
- * name: 'daily-cleanup',
245
- * event: {expression: 'every day at 9am'},
246
- * })
247
- * ```
248
- * @public
249
- * @alpha Deploying Scheduled Functions via Blueprints is experimental. This feature is not available publicly yet.
250
- * @hidden
251
- * @category Definers
252
- * @expandType BlueprintScheduledFunctionConfig
253
- * @param functionConfig The configuration for the scheduled function
254
- * @returns The validated scheduled function resource
255
- */
256
- export function defineScheduledFunction(functionConfig: BlueprintScheduledFunctionConfig): BlueprintScheduledFunctionResource {
257
- const {event, timezone} = functionConfig
258
-
259
- const functionResource: BlueprintScheduledFunctionResource = {
260
- ...defineFunction(functionConfig, {skipValidation: true, scopeType: 'organization'}),
261
- type: 'sanity.function.cron',
262
- event: buildScheduledFunctionEvent(event),
263
- }
264
-
265
- if (timezone) functionResource.timezone = timezone
266
-
267
- // Always normalize to explicit fields (minute, hour, dayOfWeek, month, dayOfMonth)
268
- if ('expression' in functionResource.event && typeof functionResource.event.expression === 'string') {
269
- const cron = parseScheduledExpression(functionResource.event.expression)
270
- functionResource.event = cronStringToExplicitEvent(cron)
271
- }
272
-
273
- runValidation(() => validateScheduledFunction(functionResource))
274
-
275
- return functionResource
276
- }
277
-
278
- /**
279
- * @deprecated Define scheduled functions using `defineScheduledFunction` instead
280
- * @hidden
281
- */
282
- export function defineScheduleFunction(functionConfig: BlueprintScheduledFunctionConfig): BlueprintScheduledFunctionResource {
283
- return defineScheduledFunction(functionConfig)
284
- }
285
-
286
- /**
287
- * Defines a function that is triggered on a sync tag invalidate event.
288
- *
289
- * @remarks
290
- * Using implicit event scoping to all datasets in the function project:
291
- * ```ts
292
- * defineSyncTagInvalidateFunction({
293
- * name: 'bustin-caches',
294
- * })
295
- * ```
296
- *
297
- * Using explicit event scoping to a particular dataset in the function project:
298
- * ```ts
299
- * defineSyncTagInvalidateFunction({
300
- * name: 'bustin-caches',
301
- * event: {
302
- * resource: {
303
- * type: 'dataset',
304
- * id: 'myProj.myDataset',
305
- * },
306
- * },
307
- * })
308
- * ```
309
- * @public
310
- * @category Definers
311
- * @expandType BlueprintSyncTagInvalidateFunctionConfig
312
- * @param functionConfig The configuration for the sync tag invalidate function
313
- * @returns The validated sync tag invalidate function resource
314
- */
315
- export function defineSyncTagInvalidateFunction(
316
- functionConfig: BlueprintSyncTagInvalidateFunctionConfig,
317
- ): BlueprintSyncTagInvalidateFunctionResource {
318
- const {event} = functionConfig
319
-
320
- const functionResource: BlueprintSyncTagInvalidateFunctionResource = {
321
- ...defineFunction(functionConfig, {skipValidation: true}),
322
- type: 'sanity.function.sync-tag-invalidate',
323
- ...(event?.resource ? {event} : {}),
324
- }
325
-
326
- runValidation(() => validateSyncTagInvalidateFunction(functionResource))
327
-
328
- return functionResource
329
- }
330
-
331
- /**
332
- * Defines a function that provide queueing behaviour.
333
- *
334
- * @remarks
335
- * Using the reasonable defaults of concurrency: 1, fifo: true, and dlq: true
336
- * ```ts
337
- * defineQueueFunction({
338
- * name: 'send-email',
339
- * })
340
- * ```
341
- *
342
- * Specifying a concurrency of 5
343
- * ```ts
344
- * defineQueueFunction({
345
- * name: 'bustin-caches',
346
- * concurrency: 5,
347
- * fifo: true,
348
- * dlq: true,
349
- * })
350
- * ```
351
- * @public
352
- * @alpha Deploying Queue Functions via Blueprints is experimental. This feature is not available publicly yet.
353
- * @hidden
354
- * @category Definers
355
- * @expandType BlueprintQueueFunctionConfig
356
- * @param functionConfig The configuration for the queue function
357
- * @returns The validated queue function resource
358
- */
359
- export function defineQueueFunction(functionConfig: BlueprintQueueFunctionConfig): BlueprintQueueFunctionResource {
360
- const {concurrency = 1, fifo = true, dlq = true, event} = functionConfig
361
-
362
- const functionResource: BlueprintQueueFunctionResource = {
363
- ...defineFunction(functionConfig, {skipValidation: true}),
364
- type: 'sanity.function.queue',
365
- ...(concurrency !== undefined && {concurrency}),
366
- ...(fifo !== undefined && {fifo}),
367
- ...(dlq !== undefined && {dlq}),
368
- ...(event !== undefined && {event}),
369
- }
370
-
371
- runValidation(() => validateQueueFunction(functionResource))
372
-
373
- return functionResource
374
- }
375
-
376
- /**
377
- * Defines a function that provide event behaviour.
378
- *
379
- * @remarks
380
- * A barebones event function
381
- * ```ts
382
- * defineEventFunction({
383
- * name: 'send-email',
384
- * })
385
- * ```
386
- * @public
387
- * @alpha Deploying Event Functions via Blueprints is experimental. This feature is not available publicly yet.
388
- * @hidden
389
- * @category Definers
390
- * @expandType BlueprintEventFunctionConfig
391
- * @param functionConfig The configuration for the event function
392
- * @returns The validated event function resource
393
- */
394
- export function defineEventFunction(functionConfig: BlueprintEventFunctionConfig): BlueprintEventFunctionResource {
395
- const functionResource: BlueprintEventFunctionResource = {
396
- ...defineFunction(functionConfig, {skipValidation: true}),
397
- type: 'sanity.function.event',
398
- }
399
-
400
- runValidation(() => validateEventFunction(functionResource))
401
-
402
- return functionResource
403
- }
404
-
405
- /**
406
- * Defines a base function resource with common properties.
407
- *
408
- * @param functionConfig The configuration for the function
409
- * @param options Optional configuration including validation options
410
- * @category Definers
411
- * @internal
412
- * @expandType BlueprintBaseFunctionConfig
413
- * @returns The validated function resource
414
- */
415
- export function defineFunction(
416
- functionConfig: BlueprintBaseFunctionConfig,
417
- options?: {skipValidation?: boolean; scopeType?: 'organization'},
418
- ): BlueprintBaseFunctionResource {
419
- const {name, displayName, src, timeout, memory, env, robotToken, project, runtime, lifecycle} = functionConfig
420
-
421
- const functionResource: BlueprintBaseFunctionResource = {
422
- type: 'sanity.function.document',
423
- name,
424
- src: src ?? `functions/${name}`,
425
- displayName,
426
- timeout,
427
- memory,
428
- env,
429
- robotToken,
430
- runtime,
431
- }
432
-
433
- if (options?.scopeType !== 'organization' && project) functionResource.project = project
434
-
435
- if (lifecycle) functionResource.lifecycle = lifecycle
436
-
437
- if (options?.skipValidation !== true) runValidation(() => validateFunction(functionResource))
438
-
439
- return functionResource
440
- }
441
-
442
- /**
443
- * Builds a document function event configuration from partial event properties.
444
- * Filters out non-event properties and applies defaults.
445
- * @param event Partial document function event configuration
446
- * @returns Complete document function event configuration
447
- */
448
- function buildDocumentFunctionEvent(event: Partial<BlueprintDocumentFunctionResourceEvent>): BlueprintDocumentFunctionResourceEvent {
449
- const cleanEvent = Object.fromEntries(
450
- Object.entries(event).filter(([key]) => DOCUMENT_EVENT_KEYS.has(key as DocumentFunctionEventKey)),
451
- ) as Partial<BlueprintDocumentFunctionResourceEvent>
452
-
453
- return {
454
- on: cleanEvent.on || ['publish'],
455
- ...cleanEvent,
456
- }
457
- }
458
-
459
- /**
460
- * Builds a media library function event configuration.
461
- * Filters out non-event properties and applies defaults.
462
- * @param event Media library function event configuration
463
- * @returns Complete media library function event configuration
464
- */
465
- function buildMediaLibraryFunctionEvent(event: BlueprintMediaLibraryFunctionResourceEvent): BlueprintMediaLibraryFunctionResourceEvent {
466
- const cleanEvent = Object.fromEntries(
467
- Object.entries(event).filter(([key]) => MEDIA_LIBRARY_EVENT_KEYS.has(key as MediaLibraryFunctionEventKey)),
468
- ) as BlueprintMediaLibraryFunctionResourceEvent
469
-
470
- const fullEvent = {
471
- on: cleanEvent.on || ['publish'],
472
- ...cleanEvent,
473
- }
474
- return fullEvent
475
- }
476
-
477
- /**
478
- * Builds a scheduled function event configuration.
479
- * Filters out non-event properties. Does not parse expressions.
480
- * @param event Scheduled function event configuration
481
- * @returns Cleaned scheduled function event configuration
482
- */
483
- function buildScheduledFunctionEvent(event: BlueprintScheduledFunctionConfigEvent): BlueprintScheduledFunctionResourceEvent {
484
- return Object.fromEntries(
485
- Object.entries(event).filter(([key]) => SCHEDULED_EVENT_KEYS.has(key as ScheduledFunctionEventKey)),
486
- ) as BlueprintScheduledFunctionResourceEvent
487
- }
488
-
489
- /**
490
- * Converts a cron expression string (minute hour dayOfMonth month dayOfWeek) to explicit event fields.
491
- * @param cron Cron string with five space-separated fields
492
- * @returns Explicit scheduled event with minute, hour, dayOfMonth, month, dayOfWeek
493
- */
494
- function cronStringToExplicitEvent(cron: string): BlueprintScheduledFunctionExplicitResourceEvent {
495
- const parts = cron.trim().split(/\s+/)
496
- if (parts.length !== 5) {
497
- throw new Error(`Invalid cron string: expected 5 fields, got ${parts.length}`)
498
- }
499
- const [minute, hour, dayOfMonth, month, dayOfWeek] = parts
500
- return {minute, hour, dayOfMonth, month, dayOfWeek}
501
- }
502
-
503
- /**
504
- * Defines a pipeline function resource.
505
- *
506
- * @remarks
507
- *
508
- * ```ts
509
- * definePipeline({
510
- * name: 'daily-cleanup',
511
- * event: {type: 'document', on: ['create'], filter: "_type == 'post'"},
512
- * concurrency: 5,
513
- * debounce: 10,
514
- * debounceKey: 'document._id',
515
- * })
516
- * ```
517
- *
518
- *
519
- * @param functionConfig The configuration for the function
520
- * @category Definers
521
- * @alpha Deploying Pipeline Functions via Blueprints is experimental. This feature is not available publicly yet.
522
- * @public
523
- * @hidden
524
- * @expandType BlueprintPipelineConfig
525
- * @returns The validated pipeline function resource
526
- */
527
- export function definePipeline(functionConfig: BlueprintPipelineConfig): BlueprintPipelineResource {
528
- const {name, event, concurrency, debounce, debounceKey, src} = functionConfig
529
- const functionResource: BlueprintPipelineResource = {
530
- ...defineFunction({...functionConfig, src: src ?? `functions/${name}`}, {skipValidation: true}),
531
- type: 'sanity.function.pipeline',
532
- ...(event !== undefined && {event}),
533
- ...(concurrency !== undefined && {concurrency}),
534
- ...(debounce !== undefined && {debounce}),
535
- ...(debounceKey !== undefined && {debounceKey}),
536
- }
537
-
538
- runValidation(() => validatePipelineFunction(functionResource))
539
- return functionResource
540
- }