Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"mp3"
],
"author": "Tim Koschuetzki <tim@transloadit.com>",
"packageManager": "yarn@4.9.4",
"packageManager": "yarn@4.10.3",
"engines": {
"node": ">= 20"
},
Expand Down
4 changes: 2 additions & 2 deletions src/alphalib/types/robots/assembly-savejson.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { z } from 'zod'

import { interpolateRobot, type RobotMetaInput, robotBase } from './_instructions-primitives.ts'
import type { RobotMetaInput } from './_instructions-primitives.ts'
import { interpolateRobot, robotBase } from './_instructions-primitives.ts'

// @ts-expect-error - AssemblySavejsonRobot is not ready yet @TODO please supply missing keys
export const meta: RobotMetaInput = {
Expand Down
5 changes: 3 additions & 2 deletions src/alphalib/types/robots/audio-concat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `If you have a form with 3 file input fields and want to concatenate the uploaded audios in a specific order, instruct Transloadit using the \`name\` attribute of each input field. Use this attribute as the value for the \`fields\` key in the JSON, and set \`as\` to \`audio_[[index]]\`. Transloadit will concatenate the files based on the ascending index order:`,
example_code_description:
'If you have a form with 3 file input fields and want to concatenate the uploaded audios in a specific order, instruct Transloadit using the `name` attribute of each input field. Use this attribute as the value for the `fields` key in the JSON, and set `as` to `audio_[[index]]`. Transloadit will concatenate the files based on the ascending index order:',
minimum_charge: 0,
output_factor: 0.8,
override_lvl1: 'Audio Encoding',
Expand Down Expand Up @@ -74,7 +75,7 @@ export const robotAudioConcatInstructionsSchema = robotBase
result: z
.boolean()
.optional()
.describe(`Whether the results of this Step should be present in the Assembly Status JSON`),
.describe('Whether the results of this Step should be present in the Assembly Status JSON'),
robot: z.literal('/audio/concat').describe(`
This Robot can concatenate an almost infinite number of audio files.
`),
Expand Down
2 changes: 1 addition & 1 deletion src/alphalib/types/robots/audio-encode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const robotAudioEncodeInstructionsSchema = robotBase
result: z
.boolean()
.optional()
.describe(`Whether the results of this Step should be present in the Assembly Status JSON`),
.describe('Whether the results of this Step should be present in the Assembly Status JSON'),
robot: z.literal('/audio/encode'),
bitrate: bitrateSchema.optional().describe(`
Bit rate of the resulting audio file, in bits per second. If not specified will default to the bit rate of the input audio file.
Expand Down
3 changes: 2 additions & 1 deletion src/alphalib/types/robots/audio-merge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `If you have a form with 3 file input fields and wish to overlay the uploaded audios, instruct Transloadit using the \`name\` attribute of each input field. Use this attribute as the value for the \`fields\` key in the JSON, and set \`as\` to \`audio\`:`,
example_code_description:
'If you have a form with 3 file input fields and wish to overlay the uploaded audios, instruct Transloadit using the `name` attribute of each input field. Use this attribute as the value for the `fields` key in the JSON, and set `as` to `audio`:',
minimum_charge: 0,
output_factor: 0.8,
override_lvl1: 'Audio Encoding',
Expand Down
3 changes: 2 additions & 1 deletion src/alphalib/types/robots/audio-waveform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Generate a 400×200 waveform in \`#0099cc\` color from an uploaded audio file:`,
example_code_description:
'Generate a 400×200 waveform in `#0099cc` color from an uploaded audio file:',
extended_description: `
Here is an example waveform image:

Expand Down
3 changes: 2 additions & 1 deletion src/alphalib/types/robots/azure-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Import files from the \`path/to/files\` directory and its subdirectories:`,
example_code_description:
'Import files from the `path/to/files` directory and its subdirectories:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/alphalib/types/robots/azure-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Export uploaded files to \`my_target_folder\` on Azure:`,
example_code_description: 'Export uploaded files to `my_target_folder` on Azure:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
3 changes: 2 additions & 1 deletion src/alphalib/types/robots/backblaze-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Import files from the \`path/to/files\` directory and its subdirectories:`,
example_code_description:
'Import files from the `path/to/files` directory and its subdirectories:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/alphalib/types/robots/backblaze-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Export uploaded files to \`my_target_folder\` on Backblaze:`,
example_code_description: 'Export uploaded files to `my_target_folder` on Backblaze:',
extended_description: `
## Access

Expand Down
3 changes: 2 additions & 1 deletion src/alphalib/types/robots/cloudfiles-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Import files from the \`path/to/files\` directory and its subdirectories:`,
example_code_description:
'Import files from the `path/to/files` directory and its subdirectories:',
minimum_charge: 0,
output_factor: 1,
override_lvl1: 'File Importing',
Expand Down
2 changes: 1 addition & 1 deletion src/alphalib/types/robots/cloudfiles-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Export uploaded files to \`my_target_folder\` on Rackspace Cloud Files:`,
example_code_description: 'Export uploaded files to `my_target_folder` on Rackspace Cloud Files:',
extended_description: `
<a id="export-to-rackspace-cloudfiles" aria-hidden="true"></a>

Expand Down
3 changes: 2 additions & 1 deletion src/alphalib/types/robots/cloudflare-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Import files from the \`path/to/files\` directory and its subdirectories:`,
example_code_description:
'Import files from the `path/to/files` directory and its subdirectories:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/alphalib/types/robots/cloudflare-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Export uploaded files to \`my_target_folder\` on cloudflare R2:`,
example_code_description: 'Export uploaded files to `my_target_folder` on cloudflare R2:',
extended_description: `
The URL to the result file will be returned in the <dfn>Assembly Status JSON</dfn>.
`,
Expand Down
3 changes: 2 additions & 1 deletion src/alphalib/types/robots/digitalocean-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Import files from the \`path/to/files\` directory and its subdirectories:`,
example_code_description:
'Import files from the `path/to/files` directory and its subdirectories:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/alphalib/types/robots/digitalocean-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Export uploaded files to \`my_target_folder\` on DigitalOcean Spaces:`,
example_code_description: 'Export uploaded files to `my_target_folder` on DigitalOcean Spaces:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
3 changes: 2 additions & 1 deletion src/alphalib/types/robots/dropbox-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Import files from the \`path/to/files\` directory and its subdirectories:`,
example_code_description:
'Import files from the `path/to/files` directory and its subdirectories:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/alphalib/types/robots/dropbox-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Export uploaded files to \`my_target_folder\` on Dropbox:`,
example_code_description: 'Export uploaded files to `my_target_folder` on Dropbox:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
4 changes: 2 additions & 2 deletions src/alphalib/types/robots/edgly-deliver.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { z } from 'zod'

import { interpolateRobot, type RobotMetaInput, robotBase } from './_instructions-primitives.ts'
import type { RobotMetaInput } from './_instructions-primitives.ts'
import { interpolateRobot, robotBase } from './_instructions-primitives.ts'

export const meta: RobotMetaInput = {
allowed_for_url_transform: false,
Expand Down
9 changes: 9 additions & 0 deletions src/alphalib/types/robots/file-decompress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ A possible array member is only \`"meta"\`.
You might see an error when trying to extract metadata from the files inside your archive. This happens, for example, for files with a size of zero bytes. Setting this to \`true\` will cause the <dfn>Robot</dfn> to not stop the file decompression (and the entire <dfn>Assembly</dfn>) when that happens.

To keep backwards compatibility, setting this parameter to \`true\` will set it to \`["meta"]\` internally.
`),
stack: z
.enum(['v1', 'v2'])
.default('v1')
.describe(`
Temporary parameter for backwards compatibility while we roll out new underlying tooling for the robot.

- \`v1\` uses the old decompression.
- \`v2\` uses the new decompression with better support for unicode and nested archives.
`),
})
.strict()
Expand Down
3 changes: 2 additions & 1 deletion src/alphalib/types/robots/file-verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { interpolateRobot, robotBase, robotUse } from './_instructions-primitive
export const meta: RobotMetaInput = {
allowed_for_url_transform: true,
bytescount: 4,
description: `/file/verify is a simple Robot that helps ensure that the files you upload are of the type you initially intended. This is especially useful when handling user-generated content, where you may not want to run certain Steps in your Template if the user hasn’t uploaded a file of the correct type. Another use case for /file/verify is when a user uploads a ZIP file, but we find that it has a few damaged files inside when we extract it. Perhaps you don’t want to error out, but only send the good files to a next processing step. With /file/verify, you can do exactly that (assuming the default of \`error_on_decline\`: \`true\`).`,
description:
'/file/verify is a simple Robot that helps ensure that the files you upload are of the type you initially intended. This is especially useful when handling user-generated content, where you may not want to run certain Steps in your Template if the user hasn’t uploaded a file of the correct type. Another use case for /file/verify is when a user uploads a ZIP file, but we find that it has a few damaged files inside when we extract it. Perhaps you don’t want to error out, but only send the good files to a next processing step. With /file/verify, you can do exactly that (assuming the default of `error_on_decline`: `true`).',
discount_factor: 0.25,
discount_pct: 75,
example_code: {
Expand Down
3 changes: 2 additions & 1 deletion src/alphalib/types/robots/ftp-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Import files from the \`path/to/files\` directory and its subdirectories:`,
example_code_description:
'Import files from the `path/to/files` directory and its subdirectories:',
minimum_charge: 0,
output_factor: 1,
override_lvl1: 'File Importing',
Expand Down
2 changes: 1 addition & 1 deletion src/alphalib/types/robots/ftp-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Export uploaded files to \`my_target_folder\` on an FTP server:`,
example_code_description: 'Export uploaded files to `my_target_folder` on an FTP server:',
minimum_charge: 0,
output_factor: 1,
override_lvl1: 'File Exporting',
Expand Down
3 changes: 2 additions & 1 deletion src/alphalib/types/robots/google-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Import files from the \`path/to/files\` directory and its subdirectories:`,
example_code_description:
'Import files from the `path/to/files` directory and its subdirectories:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
4 changes: 2 additions & 2 deletions src/alphalib/types/robots/google-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Export uploaded files to \`my_target_folder\` on Google Storage:`,
example_code_description: 'Export uploaded files to `my_target_folder` on Google Storage:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down Expand Up @@ -51,7 +51,7 @@ The URL to the exported file in your Google bucket will be presented in the Tran
result: z
.boolean()
.optional()
.describe(`Whether the results of this Step should be present in the Assembly Status JSON`),
.describe('Whether the results of this Step should be present in the Assembly Status JSON'),
credentials: z.string().describe(`
Create a new [Google service account](https://cloud.google.com/storage/docs/authentication). Set its role to "Storage Object Creator". Choose "JSON" for the key file format and download it to your computer. You will need to upload this file when creating your <dfn>Template Credentials</dfn>.

Expand Down
6 changes: 3 additions & 3 deletions src/alphalib/types/robots/meta-read.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { z } from 'zod'

import { interpolateRobot, type RobotMetaInput, robotBase } from './_instructions-primitives.ts'
import type { RobotMetaInput } from './_instructions-primitives.ts'
import { interpolateRobot, robotBase } from './_instructions-primitives.ts'

// @ts-expect-error - MetaReadRobot is not ready yet @TODO please supply missing keys
export const meta: RobotMetaInput = {
Expand All @@ -15,7 +15,7 @@ export const meta: RobotMetaInput = {

export const robotMetaReadInstructionsSchema = robotBase
.extend({
robot: z.literal('/meta/read').describe(`Reads metadata from a file.`),
robot: z.literal('/meta/read').describe('Reads metadata from a file.'),
})
.strict()

Expand Down
3 changes: 2 additions & 1 deletion src/alphalib/types/robots/minio-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Import files from the \`path/to/files\` directory and its subdirectories:`,
example_code_description:
'Import files from the `path/to/files` directory and its subdirectories:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/alphalib/types/robots/minio-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Export uploaded files to \`my_target_folder\` on MinIO:`,
example_code_description: 'Export uploaded files to `my_target_folder` on MinIO:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
3 changes: 2 additions & 1 deletion src/alphalib/types/robots/s3-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Import files from the \`path/to/files\` directory and its subdirectories:`,
example_code_description:
'Import files from the `path/to/files` directory and its subdirectories:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/alphalib/types/robots/s3-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Export uploaded files to \`my_target_folder\` in an S3 bucket:`,
example_code_description: 'Export uploaded files to `my_target_folder` in an S3 bucket:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
3 changes: 2 additions & 1 deletion src/alphalib/types/robots/sftp-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Import files from the \`path/to/files\` directory and its subdirectories:`,
example_code_description:
'Import files from the `path/to/files` directory and its subdirectories:',
minimum_charge: 0,
output_factor: 1,
override_lvl1: 'File Importing',
Expand Down
2 changes: 1 addition & 1 deletion src/alphalib/types/robots/sftp-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Export uploaded files to \`my_target_folder\` on an SFTP server:`,
example_code_description: 'Export uploaded files to `my_target_folder` on an SFTP server:',
minimum_charge: 0,
output_factor: 1,
override_lvl1: 'File Exporting',
Expand Down
3 changes: 2 additions & 1 deletion src/alphalib/types/robots/supabase-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Import files from the \`path/to/files\` directory and its subdirectories:`,
example_code_description:
'Import files from the `path/to/files` directory and its subdirectories:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/alphalib/types/robots/supabase-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Export uploaded files to \`my_target_folder\` on supabase R2:`,
example_code_description: 'Export uploaded files to `my_target_folder` on supabase R2:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
3 changes: 2 additions & 1 deletion src/alphalib/types/robots/swift-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Import files from the \`path/to/files\` directory and its subdirectories:`,
example_code_description:
'Import files from the `path/to/files` directory and its subdirectories:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/alphalib/types/robots/swift-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Export uploaded files to \`my_target_folder\` on Swift:`,
example_code_description: 'Export uploaded files to `my_target_folder` on Swift:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down
5 changes: 3 additions & 2 deletions src/alphalib/types/robots/tigris-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export const meta: RobotMetaInput = {
},
},
},
example_code_description: `Import files from the \`path/to/files\` directory and its subdirectories:`,
example_code_description:
'Import files from the `path/to/files` directory and its subdirectories:',
has_small_icon: true,
minimum_charge: 0,
output_factor: 1,
Expand Down Expand Up @@ -85,7 +86,7 @@ The pagination page size. This only works when recursive is \`true\` for now, in
bucket_region: z
.string()
.optional()
.describe(`The region of your Tigris bucket. This is optional as it can often be derived.`),
.describe('The region of your Tigris bucket. This is optional as it can often be derived.'),
})
.strict()

Expand Down
Loading