Skip to content

Commit b9b50d9

Browse files
committed
Sync alphalib
1 parent 856ffe1 commit b9b50d9

16 files changed

+32
-23
lines changed

β€Žsrc/alphalib/types/robots/_instructions-primitives.tsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { z } from 'zod'
22

3+
import { stackVersions } from '../stackVersions.ts'
34
import type { assemblyInstructionsSchema } from '../template'
45

56
export const interpolationSchemaToYieldNumber = z.string().regex(/^[\d.]*\${.+}[\d.]*$/)
@@ -465,7 +466,7 @@ If the value is not specified and the \`preset\` parameter is available, the \`p
465466
.optional().describe(`
466467
Converts a video according to [pre-configured settings](/docs/transcoding/video-encoding/video-presets/).
467468
468-
If you specify your own FFmpeg parameters using the <dfn>Robot</dfn>'s and/or do not not want Transloadit to set any encoding setting, starting \`ffmpeg_stack: "{{stacks.ffmpeg.recommended_version}}"\`, you can use the value \`'empty'\` here.
469+
If you specify your own FFmpeg parameters using the <dfn>Robot</dfn>'s and/or do not not want Transloadit to set any encoding setting, starting \`ffmpeg_stack: "${stackVersions.ffmpeg.recommendedVersion}"\`, you can use the value \`'empty'\` here.
469470
`),
470471
})
471472
.strict()

β€Žsrc/alphalib/types/robots/audio-artwork.tsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { z } from 'zod'
22

33
import { robotFFmpegAudio, robotBase, robotUse } from './_instructions-primitives.ts'
44
import type { RobotMeta } from './_instructions-primitives.ts'
5+
import { stackVersions } from '../stackVersions.ts'
56

67
export const meta: RobotMeta = {
78
allowed_for_url_transform: true,
@@ -13,7 +14,7 @@ export const meta: RobotMeta = {
1314
artwork_extracted: {
1415
robot: '/audio/artwork',
1516
use: ':original',
16-
ffmpeg_stack: '{{ stacks.ffmpeg.recommended_version }}',
17+
ffmpeg_stack: stackVersions.ffmpeg.recommendedVersion,
1718
},
1819
},
1920
},

β€Žsrc/alphalib/types/robots/audio-concat.tsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
robotFFmpegAudio,
99
} from './_instructions-primitives.ts'
1010
import type { RobotMeta } from './_instructions-primitives.ts'
11+
import { stackVersions } from '../stackVersions.ts'
1112

1213
export const meta: RobotMeta = {
1314
allowed_for_url_transform: false,
@@ -25,7 +26,7 @@ export const meta: RobotMeta = {
2526
{ name: ':original', fields: 'third_audio_file', as: 'audio_3' },
2627
],
2728
},
28-
ffmpeg_stack: '{{ stacks.ffmpeg.recommended_version }}',
29+
ffmpeg_stack: stackVersions.ffmpeg.recommendedVersion,
2930
},
3031
},
3132
},

β€Žsrc/alphalib/types/robots/audio-encode.tsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
sampleRateSchema,
99
} from './_instructions-primitives.ts'
1010
import type { RobotMeta } from './_instructions-primitives.ts'
11+
import { stackVersions } from '../stackVersions.ts'
1112

1213
export const meta: RobotMeta = {
1314
allowed_for_url_transform: false,
@@ -21,7 +22,7 @@ export const meta: RobotMeta = {
2122
use: ':original',
2223
preset: 'mp3',
2324
bitrate: 256000,
24-
ffmpeg_stack: '{{ stacks.ffmpeg.recommended_version }}',
25+
ffmpeg_stack: stackVersions.ffmpeg.recommendedVersion,
2526
},
2627
},
2728
},

β€Žsrc/alphalib/types/robots/audio-loop.tsβ€Ž

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
sampleRateSchema,
99
} from './_instructions-primitives.ts'
1010
import type { RobotMeta } from './_instructions-primitives.ts'
11+
import { stackVersions } from '../stackVersions.ts'
1112

1213
export const meta: RobotMeta = {
1314
allowed_for_url_transform: false,
@@ -20,13 +21,13 @@ export const meta: RobotMeta = {
2021
robot: '/audio/loop',
2122
use: ':original',
2223
duration: 300,
23-
ffmpeg_stack: '{{ stacks.ffmpeg.recommended_version }}',
24+
ffmpeg_stack: stackVersions.ffmpeg.recommendedVersion,
2425
},
2526
},
2627
},
2728
example_code_description: 'Loop uploaded audio to achieve a target duration of 300 seconds:',
2829
marketing_intro:
29-
'Whether you’re producing beats, white-noise, or just empty segments as fillers between audio tracks that you’re to stringing together with [πŸ€–/audio/concat]({{robot_links["/audio/concat"]}}), [πŸ€–/audio/loop]({{robot_links["/audio/loop"]}}) has got your back.',
30+
'Whether you’re producing beats, white-noise, or just empty segments as fillers between audio tracks that you’re to stringing together with [πŸ€–/audio/concat](/docs/transcoding/audio-encoding/audio-concat/), [πŸ€–/audio/loop](/docs/transcoding/audio-encoding/audio-loop/) has got your back.',
3031
minimum_charge: 0,
3132
output_factor: 0.8,
3233
override_lvl1: 'Audio Encoding',

β€Žsrc/alphalib/types/robots/audio-merge.tsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
sampleRateSchema,
99
} from './_instructions-primitives.ts'
1010
import type { RobotMeta } from './_instructions-primitives.ts'
11+
import { stackVersions } from '../stackVersions.ts'
1112

1213
export const meta: RobotMeta = {
1314
allowed_for_url_transform: false,
@@ -26,7 +27,7 @@ export const meta: RobotMeta = {
2627
{ name: ':original', fields: 'third_audio_file', as: 'audio' },
2728
],
2829
},
29-
ffmpeg_stack: '{{ stacks.ffmpeg.recommended_version }}',
30+
ffmpeg_stack: stackVersions.ffmpeg.recommendedVersion,
3031
},
3132
},
3233
},

β€Žsrc/alphalib/types/robots/document-ocr.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const meta: RobotMeta = {
2626
extended_description: `
2727
**Warning:** Transloadit aims to be deterministic, but this <dfn>Robot</dfn> uses third-party AI services. The providers (AWS, GCP) will evolve their models over time, giving different responses for the same input PDFs. Avoid relying on exact responses in your tests and application. [{.alert .alert-warning}]
2828
29-
**Note:** Currently, this <dfn>Robot</dfn> only supports character recognition for PDFs. To use this <dfn>Robot</dfn> with other document formats, use [/document/convert]({{robot_links["/document/convert"]}}) first to convert the document into a PDF. [{.alert .alert-note}]
29+
**Note:** Currently, this <dfn>Robot</dfn> only supports character recognition for PDFs. To use this <dfn>Robot</dfn> with other document formats, use [/document/convert](/docs/transcoding/document-processing/document-convert/) first to convert the document into a PDF. [{.alert .alert-note}]
3030
`,
3131
minimum_charge: 1048576,
3232
output_factor: 1,

β€Žsrc/alphalib/types/robots/file-filter.tsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The <dfn>Robot</dfn> has two modes of operation:
4545
- Constructing conditions out of arrays with 3 members each. For example, \`["\${file.size}", "<=", "720"]\`
4646
- Writing conditions in JavaScript. For example, \`\${file.size <= 720}\`. See also [Dynamic Evaluation](/docs/topics/dynamic-evaluation/).
4747
48-
Passing JavaScript allows you to implement logic as complex as you wish, however it’s slower than combining arrays of conditions, and will be charged for per invocation via [πŸ€–/script/run]({{robot_links["/script/run"]}}).
48+
Passing JavaScript allows you to implement logic as complex as you wish, however it’s slower than combining arrays of conditions, and will be charged for per invocation via [πŸ€–/script/run](/docs/transcoding/code-evaluation/script-run/).
4949
5050
### Conditions as arrays
5151
@@ -75,7 +75,7 @@ Examples:
7575
- \`\${/image/.test(file.mime)}\`
7676
- \`\${Math.max(file.meta.width, file.meta.height) > 100}\`
7777
78-
As indicated, we charge for this via [πŸ€–/script/run]({{robot_links["/script/run"]}}). See also [Dynamic Evaluation](/docs/topics/dynamic-evaluation/) for more details on allowed syntax and behavior.
78+
As indicated, we charge for this via [πŸ€–/script/run](/docs/transcoding/code-evaluation/script-run/). See also [Dynamic Evaluation](/docs/topics/dynamic-evaluation/) for more details on allowed syntax and behavior.
7979
`),
8080
accepts: z
8181
.array(

β€Žsrc/alphalib/types/robots/file-serve.tsβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ When you want Transloadit to tranform files on the fly, you can use this <dfn>Ro
2929
3030
πŸ€–/file/serve merely acts as the glue layer between our <dfn>Assembly</dfn> engine and serving files over HTTP. It let's you pick the proper result of a series of <dfn>Steps</dfn> via the \`use\` parameter and configure headers on the original content. That is where its responsibilies end, and πŸ€–/tlcdn/deliver, then takes over to globally distribute this original content across the globe, and make sure that is cached close to your end-users, when they make requests such as <https://my-app.tlcdn.com/resize-img/canoe.jpg?w=500>, another. πŸ€–/tlcdn/deliver is not a part of your <dfn>Assembly Instructions</dfn>, but it may appear on your invoices as bandwidth charges incur when distributing the cached copies. πŸ€–/file/serve only charges when the CDN does not have a cached copy and requests to regenerate the original content, which depending on your caching settings could be just once a month, or year, per file/transformation.
3131
32-
While theoretically possible, you could use [πŸ€–/file/serve]({{robot_links["/file/serve"]}}) directly in HTML files, but we strongly recommend against this, because if your site gets popular and the media URL that /file/serve is handling gets hit one million times, that is one million new image resizes. Wrapping it with a CDN (and thanks to the caching that comes with it) makes sure encoding charges stay low, as well as latencies.
32+
While theoretically possible, you could use [πŸ€–/file/serve](/docs/transcoding/content-delivery/file-serve/) directly in HTML files, but we strongly recommend against this, because if your site gets popular and the media URL that /file/serve is handling gets hit one million times, that is one million new image resizes. Wrapping it with a CDN (and thanks to the caching that comes with it) makes sure encoding charges stay low, as well as latencies.
3333
3434
Also consider configuring caching headers and cache-control directives to control how content is cached and invalidated on the CDN edge servers, balancing between freshness and efficiency.
3535
3636
More information on:
3737
3838
- [Content Delivery](/services/content-delivery/).
39-
- [πŸ€–/file/serve]({{robot_links["/file/serve"]}}) pricing.
40-
- [πŸ€–/tlcdn/deliver]({{robot_links["/tlcdn/deliver"]}}) pricing.
39+
- [πŸ€–/file/serve](/docs/transcoding/content-delivery/file-serve/) pricing.
40+
- [πŸ€–/tlcdn/deliver](/docs/transcoding/content-delivery/tlcdn-deliver/) pricing.
4141
- [File Preview Feature](/blog/2024/06/file-preview-with-smart-cdn/) blog post.
4242
`),
4343
headers: z.record(z.string()).default({

β€Žsrc/alphalib/types/robots/image-resize.tsβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ An array of objects each containing text rules. The following text parameters ar
326326
"watermarked": {
327327
"use": "resized",
328328
"robot": "/image/resize",
329-
"imagemagick_stack": "{{stacks.imagemagick.recommended_version}}",
330329
"text": [
331330
{
332331
"text": "Β© 2018 Transloadit.com",

0 commit comments

Comments
Β (0)