-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
82 changed files
with
6,702 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
- Favor `contentGapItemSchema = z.object()` over `ContentGapItemSchema = z.object()` | ||
- Favor `async run() {` over `run = async () => {` inside ES6 classes | ||
- Favor `from './PosterboyCommand.ts'` over `from './PosterboyCommand'` | ||
- Favor `return ideas.filter(isPresent)` over `ideas.filter((idea): idea is Idea => idea !== null)` | ||
- Favor `if (!(err instanceof Error)) { throw new Error(`Was thrown a non-error: ${err}`) }` inside | ||
`catch` blocks to ensure the `error` is always an instance of `Error` | ||
- Favor using real paths (`../lib/schemas.ts`) over aliases (`@/app/lib/schemas`). | ||
- Favor using `.tsx` over `.jsx`. | ||
- Favor `for (const comment of comments) {` over `comments.forEach((comment) => {` | ||
- Do not touch `.env` files! | ||
- Favor `satisfies` over `as`, consider `as` a sin | ||
- Favor `unknown` over `any`, consider `any` a sin | ||
- Favor validating data with Zod over using `any` or custom type guards | ||
- Favor Yarn (4) over npm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
import { z } from 'zod' | ||
|
||
import { robotAudioArtworkInstructionsSchema } from './audio-artwork.ts' | ||
import { robotAudioConcatInstructionsSchema } from './audio-concat.ts' | ||
import { robotAudioEncodeInstructionsSchema } from './audio-encode.ts' | ||
import { robotAudioLoopInstructionsSchema } from './audio-loop.ts' | ||
import { robotAudioMergeInstructionsSchema } from './audio-merge.ts' | ||
import { robotAudioWaveformInstructionsSchema } from './audio-waveform.ts' | ||
import { robotAzureImportInstructionsSchema } from './azure-import.ts' | ||
import { robotAzureStoreInstructionsSchema } from './azure-store.ts' | ||
import { robotBackblazeImportInstructionsSchema } from './backblaze-import.ts' | ||
import { robotBackblazeStoreInstructionsSchema } from './backblaze-store.ts' | ||
import { robotCloudfilesImportInstructionsSchema } from './cloudfiles-import.ts' | ||
import { robotCloudfilesStoreInstructionsSchema } from './cloudfiles-store.ts' | ||
import { robotCloudflareImportInstructionsSchema } from './cloudflare-import.ts' | ||
import { robotCloudflareStoreInstructionsSchema } from './cloudflare-store.ts' | ||
import { robotDigitaloceanImportInstructionsSchema } from './digitalocean-import.ts' | ||
import { robotDigitaloceanStoreInstructionsSchema } from './digitalocean-store.ts' | ||
import { robotDocumentAutorotateInstructionsSchema } from './document-autorotate.ts' | ||
import { robotDocumentConvertInstructionsSchema } from './document-convert.ts' | ||
import { robotDocumentMergeInstructionsSchema } from './document-merge.ts' | ||
import { robotDocumentOcrInstructionsSchema } from './document-ocr.ts' | ||
import { robotDocumentThumbsInstructionsSchema } from './document-thumbs.ts' | ||
import { robotDropboxImportInstructionsSchema } from './dropbox-import.ts' | ||
import { robotDropboxStoreInstructionsSchema } from './dropbox-store.ts' | ||
import { robotEdglyDeliverInstructionsSchema } from './edgly-deliver.ts' | ||
import { robotFileCompressInstructionsSchema } from './file-compress.ts' | ||
import { robotFileDecompressInstructionsSchema } from './file-decompress.ts' | ||
import { robotFileFilterInstructionsSchema } from './file-filter.ts' | ||
import { robotFileHashInstructionsSchema } from './file-hash.ts' | ||
import { robotFilePreviewInstructionsSchema } from './file-preview.ts' | ||
import { robotFileReadInstructionsSchema } from './file-read.ts' | ||
import { robotFileServeInstructionsSchema } from './file-serve.ts' | ||
import { robotFileVerifyInstructionsSchema } from './file-verify.ts' | ||
import { robotFileVirusscanInstructionsSchema } from './file-virusscan.ts' | ||
import { robotFileWatermarkInstructionsSchema } from './file-watermark.ts' | ||
import { robotFtpImportInstructionsSchema } from './ftp-import.ts' | ||
import { robotFtpStoreInstructionsSchema } from './ftp-store.ts' | ||
import { robotGoogleImportInstructionsSchema } from './google-import.ts' | ||
import { robotGoogleStoreInstructionsSchema } from './google-store.ts' | ||
import { robotHtmlConvertInstructionsSchema } from './html-convert.ts' | ||
import { robotHttpImportInstructionsSchema } from './http-import.ts' | ||
import { robotImageDescribeInstructionsSchema } from './image-describe.ts' | ||
import { robotImageFacedetectInstructionsSchema } from './image-facedetect.ts' | ||
import { robotImageGenerateInstructionsSchema } from './image-generate.ts' | ||
import { robotImageMergeInstructionsSchema } from './image-merge.ts' | ||
import { robotImageOcrInstructionsSchema } from './image-ocr.ts' | ||
import { robotImageOptimizeInstructionsSchema } from './image-optimize.ts' | ||
import { robotImageRemoveBackgroundInstructionsSchema } from './image-remove-background.ts' | ||
import { robotImageResizeInstructionsSchema } from './image-resize.ts' | ||
import { robotMediaPlaylistInstructionsSchema } from './media-playlist.ts' | ||
import { robotMetaWriteInstructionsSchema } from './meta-write.ts' | ||
import { robotMinioImportInstructionsSchema } from './minio-import.ts' | ||
import { robotMinioStoreInstructionsSchema } from './minio-store.ts' | ||
import { robotProgressSimulateInstructionsSchema } from './progress-simulate.ts' | ||
import { robotS3ImportInstructionsSchema } from './s3-import.ts' | ||
import { robotS3StoreInstructionsSchema } from './s3-store.ts' | ||
import { robotScriptRunInstructionsSchema } from './script-run.ts' | ||
import { robotSftpImportInstructionsSchema } from './sftp-import.ts' | ||
import { robotSftpStoreInstructionsSchema } from './sftp-store.ts' | ||
import { robotSpeechTranscribeInstructionsSchema } from './speech-transcribe.ts' | ||
import { robotSupabaseImportInstructionsSchema } from './supabase-import.ts' | ||
import { robotSupabaseStoreInstructionsSchema } from './supabase-store.ts' | ||
import { robotSwiftImportInstructionsSchema } from './swift-import.ts' | ||
import { robotSwiftStoreInstructionsSchema } from './swift-store.ts' | ||
import { robotTextSpeakInstructionsSchema } from './text-speak.ts' | ||
import { robotTextTranslateInstructionsSchema } from './text-translate.ts' | ||
import { robotTlcdnDeliverInstructionsSchema } from './tlcdn-deliver.ts' | ||
import { robotTusStoreInstructionsSchema } from './tus-store.ts' | ||
import { robotUploadHandleInstructionsSchema } from './upload-handle.ts' | ||
import { robotVideoAdaptiveInstructionsSchema } from './video-adaptive.ts' | ||
import { robotVideoConcatInstructionsSchema } from './video-concat.ts' | ||
import { robotVideoEncodeInstructionsSchema } from './video-encode.ts' | ||
import { robotVideoMergeInstructionsSchema } from './video-merge.ts' | ||
import { robotVideoSubtitleInstructionsSchema } from './video-subtitle.ts' | ||
import { robotVideoThumbsInstructionsSchema } from './video-thumbs.ts' | ||
import { robotVimeoStoreInstructionsSchema } from './vimeo-store.ts' | ||
import { robotWasabiImportInstructionsSchema } from './wasabi-import.ts' | ||
import { robotWasabiStoreInstructionsSchema } from './wasabi-store.ts' | ||
import { robotYoutubeStoreInstructionsSchema } from './youtube-store.ts' | ||
|
||
const robotStepsInstructions = [ | ||
robotAudioArtworkInstructionsSchema, | ||
robotAudioConcatInstructionsSchema, | ||
robotAudioEncodeInstructionsSchema, | ||
robotAudioLoopInstructionsSchema, | ||
robotAudioMergeInstructionsSchema, | ||
robotAudioWaveformInstructionsSchema, | ||
robotAzureImportInstructionsSchema, | ||
robotAzureStoreInstructionsSchema, | ||
robotBackblazeImportInstructionsSchema, | ||
robotBackblazeStoreInstructionsSchema, | ||
robotCloudfilesImportInstructionsSchema, | ||
robotCloudfilesStoreInstructionsSchema, | ||
robotCloudflareImportInstructionsSchema, | ||
robotCloudflareStoreInstructionsSchema, | ||
robotDigitaloceanImportInstructionsSchema, | ||
robotDigitaloceanStoreInstructionsSchema, | ||
robotDocumentAutorotateInstructionsSchema, | ||
robotDocumentConvertInstructionsSchema, | ||
robotDocumentMergeInstructionsSchema, | ||
robotDocumentOcrInstructionsSchema, | ||
robotFileReadInstructionsSchema, | ||
robotDocumentThumbsInstructionsSchema, | ||
robotDropboxImportInstructionsSchema, | ||
robotDropboxStoreInstructionsSchema, | ||
robotEdglyDeliverInstructionsSchema, | ||
robotFileCompressInstructionsSchema, | ||
robotFileDecompressInstructionsSchema, | ||
robotFileFilterInstructionsSchema, | ||
robotFileHashInstructionsSchema, | ||
robotFilePreviewInstructionsSchema, | ||
robotFileServeInstructionsSchema, | ||
robotFileVerifyInstructionsSchema, | ||
robotFileVirusscanInstructionsSchema, | ||
robotFtpImportInstructionsSchema, | ||
robotFtpStoreInstructionsSchema, | ||
robotGoogleImportInstructionsSchema, | ||
robotGoogleStoreInstructionsSchema, | ||
robotHtmlConvertInstructionsSchema, | ||
robotHttpImportInstructionsSchema, | ||
robotImageDescribeInstructionsSchema, | ||
robotImageFacedetectInstructionsSchema, | ||
robotImageMergeInstructionsSchema, | ||
robotImageOcrInstructionsSchema, | ||
robotImageOptimizeInstructionsSchema, | ||
robotImageResizeInstructionsSchema, | ||
robotMediaPlaylistInstructionsSchema, | ||
robotMetaWriteInstructionsSchema, | ||
robotMinioImportInstructionsSchema, | ||
robotMinioStoreInstructionsSchema, | ||
robotS3ImportInstructionsSchema, | ||
robotS3StoreInstructionsSchema, | ||
robotScriptRunInstructionsSchema, | ||
robotSftpImportInstructionsSchema, | ||
robotSftpStoreInstructionsSchema, | ||
robotSpeechTranscribeInstructionsSchema, | ||
robotSupabaseImportInstructionsSchema, | ||
robotSupabaseStoreInstructionsSchema, | ||
robotSwiftImportInstructionsSchema, | ||
robotSwiftStoreInstructionsSchema, | ||
robotTextSpeakInstructionsSchema, | ||
robotTextTranslateInstructionsSchema, | ||
robotTlcdnDeliverInstructionsSchema, | ||
robotTusStoreInstructionsSchema, | ||
robotUploadHandleInstructionsSchema, | ||
robotVideoAdaptiveInstructionsSchema, | ||
robotVideoConcatInstructionsSchema, | ||
robotVideoEncodeInstructionsSchema, | ||
robotVideoMergeInstructionsSchema, | ||
robotVideoSubtitleInstructionsSchema, | ||
robotVideoThumbsInstructionsSchema, | ||
robotVimeoStoreInstructionsSchema, | ||
robotWasabiImportInstructionsSchema, | ||
robotWasabiStoreInstructionsSchema, | ||
robotYoutubeStoreInstructionsSchema, | ||
] as const | ||
|
||
/** | ||
* Public robot instructions | ||
*/ | ||
export const robotStepsInstructionsSchema = z.union(robotStepsInstructions) | ||
|
||
/** | ||
* All robot instructions, including private ones. | ||
*/ | ||
export const robotAnyInstructionsSchema = z.union([ | ||
...robotStepsInstructions, | ||
robotFileWatermarkInstructionsSchema, | ||
robotImageGenerateInstructionsSchema, | ||
robotImageRemoveBackgroundInstructionsSchema, | ||
robotProgressSimulateInstructionsSchema, | ||
]) | ||
export type RobotAnyInstructions = z.infer<typeof robotAnyInstructionsSchema> |
Oops, something went wrong.