Skip to content

Commit

Permalink
refactor(eleventy-plugin-text-to-speech): wip big changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdbd committed Jan 28, 2024
1 parent 8b9d99a commit e3f9397
Show file tree
Hide file tree
Showing 163 changed files with 10,563 additions and 7,884 deletions.
4 changes: 4 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export CLOUDFLARE_ACCOUNT_ID=43f9884041661b778e95a26992850715
# export DEBUG="Eleventy:EleventyErrorHandler,11ty-test-utils"
export DEBUG="Eleventy:EleventyErrorHandler,11ty-test-utils,11ty-plugin*"
# export DEBUG="DevEleventy:*,Eleventy*"
Expand All @@ -6,6 +7,9 @@ export NODE_ENV=production
export SKIP_TELEGRAM_MESSAGES=1

# secrets exposed as environment variables
export CLOUDFLARE_R2=$(cat /run/secrets/cloudflare_r2/personal)
export ELEVENLABS_API_KEY=$(cat /run/secrets/elevenlabs/api_key)
# export GOOGLE_APPLICATION_CREDENTIALS=/run/secrets/prj-kitchen-sink/sa-storage-uploader
export PLAUSIBLE=$(cat /run/secrets/plausible/test_site)
# export SKIP_VALIDATION=1
export TELEGRAM=$(cat /run/secrets/telegram/personal_bot)
20 changes: 18 additions & 2 deletions custom-types/11ty__eleventy/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,32 @@ declare module '@11ty/eleventy' {

type EventHandler = (arg: EventArguments) => void | Promise<void>

type TransformHandler = (
export interface EleventyTemplate {
outputPath: string
}

// https://www.11ty.dev/docs/collections/#collection-api-methods
export interface CollectionApi {
getAll: () => EleventyTemplate[]
getAllSorted: () => EleventyTemplate[]
getFilteredByTag: (tagName: string) => EleventyTemplate[]
getFilteredByTags: (...args: string[]) => EleventyTemplate[]
getFilteredByGlob: (glob: any) => EleventyTemplate[]
}

type CollectionFn = (collectionApi: CollectionApi) => void

type TransformFn = (
content: string,
outputPath: string
) => string | Promise<string>

export interface EleventyConfig {
userConfig: any
verbose: boolean
addCollection(collectionName: string, fn: CollectionFn): Promise<void>
addPlugin(pluginFn: () => void, pluginOptions: Object): Promise<void>
addTransform(transformName: string, fn: TransformHandler): Promise<void>
addTransform(transformName: string, fn: TransformFn): Promise<void>
on(eventName: EventName, fn: EventHandler): Promise<void>
}

Expand Down
3 changes: 2 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ The **API docs** are generated by [api-extractor](https://api-extractor.com/) +
- [eleventy-plugin-plausible](./eleventy-plugin-plausible/index.html) (and [API docs](https://github.com/jackdbd/undici/tree/main/packages/eleventy-plugin-plausible/api-docs/index.md))
- [eleventy-plugin-telegram](./eleventy-plugin-telegram/index.html) (and [API docs](https://github.com/jackdbd/undici/tree/main/packages/eleventy-plugin-telegram/api-docs/index.md))
- [eleventy-plugin-text-to-speech](./eleventy-plugin-text-to-speech/index.html) (and [API docs](https://github.com/jackdbd/undici/tree/main/packages/eleventy-plugin-text-to-speech/api-docs/index.md))
- [eleventy-test-utils](./eleventy-test-utils/index.html) (and [API docs](https://github.com/jackdbd/undici/tree/main/packages/eleventy-test-utils/api-docs/index.md))
- [eleventy-test-utils](./eleventy-test-utils/index.html) (and [API docs](https://github.com/jackdbd/undici/tree/main/packages/eleventy-test-utils/api-docs/index.md))
- [zod-schemas](./zod-schemas/index.html) (and [API docs](https://github.com/jackdbd/undici/tree/main/packages/zod-schemas/api-docs/index.md))
2 changes: 1 addition & 1 deletion docs/eleventy-plugin-ensure-env-vars/assets/search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/eleventy-plugin-ensure-env-vars/interfaces/Options.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/eleventy-plugin-telegram/assets/search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/eleventy-plugin-telegram/functions/telegramPlugin.html

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions docs/eleventy-plugin-telegram/interfaces/EleventyConfig.html

Large diffs are not rendered by default.

Loading

0 comments on commit e3f9397

Please sign in to comment.