From d887076220e095cb62a640eb7b0856b6a9beda21 Mon Sep 17 00:00:00 2001 From: David Boyne Date: Mon, 23 Sep 2024 10:15:44 +0100 Subject: [PATCH] chore(docs): refactored wing libs into a list and new header items (#1018) - Remove the folder in the Winglibs navigation for docs, now flat navigation (suggestion from @eladb ) - Added new header item for Libraries, also combined Playground and Examples into Explore (for UX issues). Co-authored-by: David Boyne --- docusaurus.config.js | 31 +++++++----- scripts/winglibDocs.ts | 49 ++++++++++++++----- .../version-latest/04-winglibs/04-toc.md | 2 +- .../04-winglibs/05-winglibs/_category_.yml | 6 --- .../cloudv2.md => 10-winglib-cloudv2.md} | 5 +- .../cognito.md => 11-winglib-cognito.md} | 5 +- ...containers.md => 12-winglib-containers.md} | 4 +- .../dynamodb.md => 13-winglib-dynamodb.md} | 5 +- ...entbridge.md => 14-winglib-eventbridge.md} | 5 +- .../fifoqueue.md => 15-winglib-fifoqueue.md} | 5 +- .../github.md => 16-winglib-github.md} | 5 +- .../{05-winglibs/jwt.md => 17-winglib-jwt.md} | 5 +- .../{05-winglibs/k8s.md => 18-winglib-k8s.md} | 5 +- .../lock.md => 19-winglib-lock.md} | 5 +- ...efanout.md => 20-winglib-messagefanout.md} | 5 +- .../momento.md => 21-winglib-momento.md} | 5 +- .../ngrok.md => 22-winglib-ngrok.md} | 5 +- .../openai.md => 23-winglib-openai.md} | 5 +- .../postgres.md => 24-winglib-postgres.md} | 5 +- .../python.md => 25-winglib-python.md} | 5 +- .../react.md => 26-winglib-react.md} | 5 +- .../redis.md => 27-winglib-redis.md} | 4 +- .../sagemaker.md => 28-winglib-sagemaker.md} | 5 +- .../{05-winglibs/ses.md => 29-winglib-ses.md} | 5 +- .../simtools.md => 30-winglib-simtools.md} | 5 +- .../slack.md => 31-winglib-slack.md} | 5 +- .../{05-winglibs/sns.md => 32-winglib-sns.md} | 5 +- .../{05-winglibs/tf.md => 33-winglib-tf.md} | 5 +- .../tsoa.md => 34-winglib-tsoa.md} | 5 +- .../vite.md => 35-winglib-vite.md} | 5 +- ...websockets.md => 36-winglib-websockets.md} | 5 +- .../bedrock.md => 7-winglib-bedrock.md} | 5 +- .../budget.md => 8-winglib-budget.md} | 5 +- .../checks.md => 9-winglib-checks.md} | 4 +- 34 files changed, 88 insertions(+), 147 deletions(-) delete mode 100644 versioned_docs/version-latest/04-winglibs/05-winglibs/_category_.yml rename versioned_docs/version-latest/04-winglibs/{05-winglibs/cloudv2.md => 10-winglib-cloudv2.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/cognito.md => 11-winglib-cognito.md} (97%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/containers.md => 12-winglib-containers.md} (98%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/dynamodb.md => 13-winglib-dynamodb.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/eventbridge.md => 14-winglib-eventbridge.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/fifoqueue.md => 15-winglib-fifoqueue.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/github.md => 16-winglib-github.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/jwt.md => 17-winglib-jwt.md} (98%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/k8s.md => 18-winglib-k8s.md} (98%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/lock.md => 19-winglib-lock.md} (98%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/messagefanout.md => 20-winglib-messagefanout.md} (98%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/momento.md => 21-winglib-momento.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/ngrok.md => 22-winglib-ngrok.md} (98%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/openai.md => 23-winglib-openai.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/postgres.md => 24-winglib-postgres.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/python.md => 25-winglib-python.md} (97%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/react.md => 26-winglib-react.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/redis.md => 27-winglib-redis.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/sagemaker.md => 28-winglib-sagemaker.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/ses.md => 29-winglib-ses.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/simtools.md => 30-winglib-simtools.md} (97%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/slack.md => 31-winglib-slack.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/sns.md => 32-winglib-sns.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/tf.md => 33-winglib-tf.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/tsoa.md => 34-winglib-tsoa.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/vite.md => 35-winglib-vite.md} (98%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/websockets.md => 36-winglib-websockets.md} (99%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/bedrock.md => 7-winglib-bedrock.md} (98%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/budget.md => 8-winglib-budget.md} (98%) rename versioned_docs/version-latest/04-winglibs/{05-winglibs/checks.md => 9-winglib-checks.md} (99%) diff --git a/docusaurus.config.js b/docusaurus.config.js index 334890d9..373588a9 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -262,11 +262,10 @@ const config = { { to: "docs", position: "left", - label: "Install", + label: "Getting started", className: "header-text-link", target: "_self", }, - { to: "docs/learn", position: "left", @@ -282,20 +281,30 @@ const config = { target: "_self", }, { - // href: "https://github.com/winglang/examples", - to: "docs/examples", + to: "docs/winglibs/all-winglibs", position: "left", - label: "Examples", + label: "Libraries", className: "header-text-link", + target: "_self", }, { - href: "https://www.winglang.io/play/", - position: "left", - label: "Playground", - className: "header-text-link", - target: "_self", + position: 'left', + label: 'Explore', + items: [ + { + // href: "https://github.com/winglang/examples", + to: "docs/examples", + label: "Examples", + className: "header-text-link", + }, + { + href: "https://www.winglang.io/play/", + label: "Playground", + className: "header-text-link", + target: "_self", + }, + ] }, - { position: 'left', label: 'Community & Support', diff --git a/scripts/winglibDocs.ts b/scripts/winglibDocs.ts index de887542..48b8e655 100644 --- a/scripts/winglibDocs.ts +++ b/scripts/winglibDocs.ts @@ -7,7 +7,9 @@ import { readFileSync, existsSync } from 'fs'; const authorization = `token ${process.env.GITHUB_TOKEN}`; -const WINGLIB_DIR = join(process.cwd(), 'versioned_docs', 'version-latest', '04-winglibs', '05-winglibs'); +const WINGLIB_DIR_TEMP_DIR = join(process.cwd(), 'versioned_docs', 'version-latest', '04-winglibs', '05-winglibs'); +const WINGLIB_DIR = join(WINGLIB_DIR_TEMP_DIR, '../'); + const categoryFile = `label: winglibs collapsible: true collapsed: true @@ -106,16 +108,24 @@ const buildUrlsForPlatforms = (platforms: string[]) => { }); // Write files to WINGLIB_DIR - await fs.rm(WINGLIB_DIR, { force: true, recursive: true }); - await fs.mkdir(WINGLIB_DIR, { recursive: true }); + await fs.rm(WINGLIB_DIR_TEMP_DIR, { force: true, recursive: true }); + await fs.mkdir(WINGLIB_DIR_TEMP_DIR, { recursive: true }); + + // read all files in teh WINGLIB_DIR and find any that have winglib in the filename and remove it + const filesInDir = await fs.readdir(join(WINGLIB_DIR)); + for (const file of filesInDir) { + if(file.includes('-winglib-')) { + await fs.rm(join(WINGLIB_DIR, file)); + } + } // Write required docusuarus file for category - await fs.writeFile(join(WINGLIB_DIR, '_category_.yml'), categoryFile); + await fs.writeFile(join(WINGLIB_DIR_TEMP_DIR, '_category_.yml'), categoryFile); let table = `--- title: List of winglibs id: all-winglibs -sidebar_label: List of winglibs +sidebar_label: Explore all Wing libraries description: Table of all Wing libraries keywords: [winglib, Wing library] --- @@ -127,7 +137,7 @@ keywords: [winglib, Wing library] // Create the table. // @ts-ignore for (const { title, version, description, platforms, demoURL, packageJson, winglib } of winglibs) { - table += `\n| [${title}](/docs/winglibs/winglibs/${winglib}) | [${packageJson.name}](/docs/winglibs/winglibs/${winglib}) | v${version} | ${description} ${demoURL ? `([Example](${demoURL}))` : ''} | ${buildUrlsForPlatforms(platforms)} |`; + table += `\n| [${title}](/docs/winglibs/${winglib}) | [${packageJson.name}](/docs/winglibs/${winglib}) | v${version} | ${description} ${demoURL ? `([Example](${demoURL}))` : ''} | ${buildUrlsForPlatforms(platforms)} |`; } // contributing to winglibs @@ -137,7 +147,7 @@ keywords: [winglib, Wing library] ` - await fs.writeFile(join(WINGLIB_DIR, '../04-toc.md'), table); + await fs.writeFile(join(WINGLIB_DIR_TEMP_DIR, '../04-toc.md'), table); for (const { winglib, readme, packageJson, title } of winglibs) { @@ -153,24 +163,39 @@ keywords: [winglib, Wing library] } // remove any markdown images from the content (for now) - const contentWithoutImages = content.replace(/!\[.*\]\(.*\)/g, ''); - console.log(join(WINGLIB_DIR, `${winglib}.md`)) + let updatedContent = content.replace(/!\[.*\]\(.*\)/g, ''); + console.log(join(WINGLIB_DIR_TEMP_DIR, `${winglib}.md`)) + + // Remove first header from README use docusuarus + updatedContent = updatedContent.replace(/^#\s.*$/m, ''); + updatedContent = updatedContent.trim(); + const file = `--- title: ${title} id: ${winglib} -sidebar_label: ${title} +sidebar_label: ${title} (winglib) description: ${packageJson.wing?.docs?.summary || packageJson.description} keywords: [winglib, Wing library] --- -${contentWithoutImages} +${updatedContent} --- ${apiFileContent} ` - await fs.writeFile(join(WINGLIB_DIR, `${winglib}.md`), file); + await fs.writeFile(join(WINGLIB_DIR_TEMP_DIR, `${winglib}.md`), file); + } + + // Move all the winglibs into the correct directory + const filesInWingLib = await fs.readdir(join(WINGLIB_DIR)); + let fileIndex = filesInWingLib.length; + for (const { winglib } of winglibs) { + fileIndex = fileIndex + 1; + await fs.rename(join(WINGLIB_DIR_TEMP_DIR, `${winglib}.md`), join(WINGLIB_DIR, `${fileIndex}-winglib-${winglib}.md`)); } + await fs.rm(WINGLIB_DIR_TEMP_DIR, { force: true, recursive: true }); + console.log("Cleaning up..."); await fs.rm("winglibs.tgz"); await fs.rm("winglibs", { diff --git a/versioned_docs/version-latest/04-winglibs/04-toc.md b/versioned_docs/version-latest/04-winglibs/04-toc.md index 62c2db3d..74a3404f 100644 --- a/versioned_docs/version-latest/04-winglibs/04-toc.md +++ b/versioned_docs/version-latest/04-winglibs/04-toc.md @@ -1,7 +1,7 @@ --- title: List of winglibs id: all-winglibs -sidebar_label: List of winglibs +sidebar_label: Explore all Wing libraries description: Table of all Wing libraries keywords: [winglib, Wing library] --- diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/_category_.yml b/versioned_docs/version-latest/04-winglibs/05-winglibs/_category_.yml deleted file mode 100644 index 1a556118..00000000 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/_category_.yml +++ /dev/null @@ -1,6 +0,0 @@ -label: winglibs -collapsible: true -collapsed: true -link: - type: generated-index - title: Wing Libs (winglibs) diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/cloudv2.md b/versioned_docs/version-latest/04-winglibs/10-winglib-cloudv2.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/cloudv2.md rename to versioned_docs/version-latest/04-winglibs/10-winglib-cloudv2.md index f62c4fe2..22fa66b7 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/cloudv2.md +++ b/versioned_docs/version-latest/04-winglibs/10-winglib-cloudv2.md @@ -1,12 +1,10 @@ --- title: cloudv2 id: cloudv2 -sidebar_label: cloudv2 +sidebar_label: cloudv2 (winglib) description: Standard cloud library for Wing keywords: [winglib, Wing library] --- -# cloudv2 - This module contains a Wing-based implementation of the built-in `cloud` library. It's a work in progresss as part of a migration for our internal codebase. Here are the resources available so far: @@ -33,7 +31,6 @@ let counter = new cloud.Counter(); ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/cognito.md b/versioned_docs/version-latest/04-winglibs/11-winglib-cognito.md similarity index 97% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/cognito.md rename to versioned_docs/version-latest/04-winglibs/11-winglib-cognito.md index 6b5c2163..4e5e3676 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/cognito.md +++ b/versioned_docs/version-latest/04-winglibs/11-winglib-cognito.md @@ -1,12 +1,10 @@ --- title: Amazon Cognito id: cognito -sidebar_label: Amazon Cognito +sidebar_label: Amazon Cognito (winglib) description: A wing library to work with Amazon Cognito keywords: [winglib, Wing library] --- -# cognito - A wing library to work with AWS Cognito. ## Prerequisites @@ -86,6 +84,5 @@ curl -H "Authorization: ${TOKEN}" https://5b0y949eik.execute-api.us-east-1.amazo ## License This library is licensed under the [MIT License](./LICENSE). - --- diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/containers.md b/versioned_docs/version-latest/04-winglibs/12-winglib-containers.md similarity index 98% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/containers.md rename to versioned_docs/version-latest/04-winglibs/12-winglib-containers.md index aeeb24c8..e9158b77 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/containers.md +++ b/versioned_docs/version-latest/04-winglibs/12-winglib-containers.md @@ -1,12 +1,10 @@ --- title: Containers id: containers -sidebar_label: Containers +sidebar_label: Containers (winglib) description: Deploy containers with Wing keywords: [winglib, Wing library] --- -# Wing Containers Support - This library allows deploying arbitrary containers with Wing. ## Installation diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/dynamodb.md b/versioned_docs/version-latest/04-winglibs/13-winglib-dynamodb.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/dynamodb.md rename to versioned_docs/version-latest/04-winglibs/13-winglib-dynamodb.md index 61dee6c3..0508ef0d 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/dynamodb.md +++ b/versioned_docs/version-latest/04-winglibs/13-winglib-dynamodb.md @@ -1,12 +1,10 @@ --- title: Amazon DynamoDB id: dynamodb -sidebar_label: Amazon DynamoDB +sidebar_label: Amazon DynamoDB (winglib) description: A Wing library for Amazon DynamoDB keywords: [winglib, Wing library] --- -# dynamodb - ## Prerequisites - [winglang](https://winglang.io). @@ -74,7 +72,6 @@ new DynamoDB(table.connection.clientConfig); ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/eventbridge.md b/versioned_docs/version-latest/04-winglibs/14-winglib-eventbridge.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/eventbridge.md rename to versioned_docs/version-latest/04-winglibs/14-winglib-eventbridge.md index 3ca36efb..c05aef07 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/eventbridge.md +++ b/versioned_docs/version-latest/04-winglibs/14-winglib-eventbridge.md @@ -1,12 +1,10 @@ --- title: Amazon EventBridge id: eventbridge -sidebar_label: Amazon EventBridge +sidebar_label: Amazon EventBridge (winglib) description: A Wing library for working with Amazon EventBridge keywords: [winglib, Wing library] --- -# eventbridge - A Wing library for working with [Amazon EventBridge](https://aws.amazon.com/eventbridge/). ## Prerequisites @@ -60,7 +58,6 @@ wing compile -t @winglang/platform-awscdk -v eventBridgeName="my-bus" main.w ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/fifoqueue.md b/versioned_docs/version-latest/04-winglibs/15-winglib-fifoqueue.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/fifoqueue.md rename to versioned_docs/version-latest/04-winglibs/15-winglib-fifoqueue.md index c9bd1949..cb21c8ab 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/fifoqueue.md +++ b/versioned_docs/version-latest/04-winglibs/15-winglib-fifoqueue.md @@ -1,12 +1,10 @@ --- title: FIFO Queue id: fifoqueue -sidebar_label: FIFO Queue +sidebar_label: FIFO Queue (winglib) description: A wing library to work with FIFO (first-in first-out) Queues keywords: [winglib, Wing library] --- -# fifoqueue - A wing library to work with FIFO (first-in first-out) Queues. To use the queue, set `groupId` to group messages and process them in an ordered fashion. @@ -40,7 +38,6 @@ test "will push to queue" { ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/github.md b/versioned_docs/version-latest/04-winglibs/16-winglib-github.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/github.md rename to versioned_docs/version-latest/04-winglibs/16-winglib-github.md index 35738296..85eb1e4a 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/github.md +++ b/versioned_docs/version-latest/04-winglibs/16-winglib-github.md @@ -1,12 +1,10 @@ --- title: GitHub id: github -sidebar_label: GitHub +sidebar_label: GitHub (winglib) description: A wing library to work with GitHub Probot keywords: [winglib, Wing library] --- -# github - A Wing library for working with [GitHub Probot](https://github.com/probot/probot) @@ -140,7 +138,6 @@ let markdown = new github.ProbotApp( ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/jwt.md b/versioned_docs/version-latest/04-winglibs/17-winglib-jwt.md similarity index 98% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/jwt.md rename to versioned_docs/version-latest/04-winglibs/17-winglib-jwt.md index dd77c6dd..bd1a0f09 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/jwt.md +++ b/versioned_docs/version-latest/04-winglibs/17-winglib-jwt.md @@ -1,12 +1,10 @@ --- title: JWT authentication id: jwt -sidebar_label: JWT authentication +sidebar_label: JWT authentication (winglib) description: Wing library for JWT authentication keywords: [winglib, Wing library] --- -# jwt - A Wing library for working with JWT authentication. ## Prerequisites @@ -35,7 +33,6 @@ test "will sign and verify" { ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/k8s.md b/versioned_docs/version-latest/04-winglibs/18-winglib-k8s.md similarity index 98% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/k8s.md rename to versioned_docs/version-latest/04-winglibs/18-winglib-k8s.md index a61e3108..8ca95db0 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/k8s.md +++ b/versioned_docs/version-latest/04-winglibs/18-winglib-k8s.md @@ -1,12 +1,10 @@ --- title: Kubernetes (k8s) id: k8s -sidebar_label: Kubernetes (k8s) +sidebar_label: Kubernetes (k8s) (winglib) description: Wing for Kubernetes keywords: [winglib, Wing library] --- -# Wing for Kubernetes - A framework for synthesizing Kubernetes manifests using Winglang. ## Installation @@ -133,7 +131,6 @@ deployment.exposeViaService(serviceType: k8s.ServiceType.LOAD_BALANCER); ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/lock.md b/versioned_docs/version-latest/04-winglibs/19-winglib-lock.md similarity index 98% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/lock.md rename to versioned_docs/version-latest/04-winglibs/19-winglib-lock.md index c43dbc14..bb22a51c 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/lock.md +++ b/versioned_docs/version-latest/04-winglibs/19-winglib-lock.md @@ -1,12 +1,10 @@ --- title: Lock id: lock -sidebar_label: Lock +sidebar_label: Lock (winglib) description: Wing library for cloud lock keywords: [winglib, Wing library] --- -# lock - ## Prerequisites * [winglang](https://winglang.io). @@ -82,7 +80,6 @@ test "count with expiry" { ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/messagefanout.md b/versioned_docs/version-latest/04-winglibs/20-winglib-messagefanout.md similarity index 98% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/messagefanout.md rename to versioned_docs/version-latest/04-winglibs/20-winglib-messagefanout.md index c7cbb4c0..778e4ab4 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/messagefanout.md +++ b/versioned_docs/version-latest/04-winglibs/20-winglib-messagefanout.md @@ -1,12 +1,10 @@ --- title: Message Fanout id: messagefanout -sidebar_label: Message Fanout +sidebar_label: Message Fanout (winglib) description: Wing library to fan out messages keywords: [winglib, Wing library] --- -# messagefanout - ## Prerequisites * [winglang](https://winglang.io). @@ -36,7 +34,6 @@ test "push a message to fanout" { ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/momento.md b/versioned_docs/version-latest/04-winglibs/21-winglib-momento.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/momento.md rename to versioned_docs/version-latest/04-winglibs/21-winglib-momento.md index 3a47ccec..73630101 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/momento.md +++ b/versioned_docs/version-latest/04-winglibs/21-winglib-momento.md @@ -1,12 +1,10 @@ --- title: Momento id: momento -sidebar_label: Momento +sidebar_label: Momento (winglib) description: Wing library for [momento](https://www.gomomento.com/) keywords: [winglib, Wing library] --- -# momento - ## Prerequisites * [winglang](https://winglang.io) @@ -44,7 +42,6 @@ See the [Momento documentation](https://docs.momentohq.com/cache/develop/authent ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/ngrok.md b/versioned_docs/version-latest/04-winglibs/22-winglib-ngrok.md similarity index 98% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/ngrok.md rename to versioned_docs/version-latest/04-winglibs/22-winglib-ngrok.md index db80b8b4..43391a06 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/ngrok.md +++ b/versioned_docs/version-latest/04-winglibs/22-winglib-ngrok.md @@ -1,12 +1,10 @@ --- title: ngrok id: ngrok -sidebar_label: ngrok +sidebar_label: ngrok (winglib) description: Wing library for [ngrok](https://ngrok.com/). Create local tunnels to Wing endpoints. keywords: [winglib, Wing library] --- -# Wing ngrok support - This library can be used to create an [ngrok](https://ngrok.com) tunnel for local development that forwards HTTP requests to a localhost endpoint. @@ -70,7 +68,6 @@ endpoint. ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/openai.md b/versioned_docs/version-latest/04-winglibs/23-winglib-openai.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/openai.md rename to versioned_docs/version-latest/04-winglibs/23-winglib-openai.md index b61114b0..f35f80fe 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/openai.md +++ b/versioned_docs/version-latest/04-winglibs/23-winglib-openai.md @@ -1,12 +1,10 @@ --- title: OpenAI id: openai -sidebar_label: OpenAI +sidebar_label: OpenAI (winglib) description: Wing library for [OpenAI](https://openai.com/) keywords: [winglib, Wing library] --- -# openai - An [OpenAI](https://openai.com) library for Winglang. > This is an initial version of this library which currently exposes a very small subset of the @@ -84,7 +82,6 @@ Methods: ## License Licensed under the [MIT License](/LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/postgres.md b/versioned_docs/version-latest/04-winglibs/24-winglib-postgres.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/postgres.md rename to versioned_docs/version-latest/04-winglibs/24-winglib-postgres.md index 6ef97e7d..d315e8a4 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/postgres.md +++ b/versioned_docs/version-latest/04-winglibs/24-winglib-postgres.md @@ -1,12 +1,10 @@ --- title: Postgres id: postgres -sidebar_label: Postgres +sidebar_label: Postgres (winglib) description: Wing library for [Postgres](https://www.postgresql.org/) keywords: [winglib, Wing library] --- -# postgres - This library allows using postgres with Wing. ## Prerequisites @@ -133,7 +131,6 @@ When you deploy Terraform that uses the `Database` class, you will need to have ## License Licensed under the [MIT License](../LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/python.md b/versioned_docs/version-latest/04-winglibs/25-winglib-python.md similarity index 97% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/python.md rename to versioned_docs/version-latest/04-winglibs/25-winglib-python.md index 4bc0bb99..c9472a19 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/python.md +++ b/versioned_docs/version-latest/04-winglibs/25-winglib-python.md @@ -1,12 +1,10 @@ --- title: Python id: python -sidebar_label: Python +sidebar_label: Python (winglib) description: A Wing library for running [Python](https://www.python.org/) code in [inflight](https://www.winglang.io/docs/concepts/inflights#inflight-code). keywords: [winglib, Wing library] --- -# python - A Wing library for running Python code in inflight. ## Prerequisites @@ -67,6 +65,5 @@ def handler(event, context): ## License This library is licensed under the [MIT License](./LICENSE). - --- diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/react.md b/versioned_docs/version-latest/04-winglibs/26-winglib-react.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/react.md rename to versioned_docs/version-latest/04-winglibs/26-winglib-react.md index f51871ea..f5b47595 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/react.md +++ b/versioned_docs/version-latest/04-winglibs/26-winglib-react.md @@ -1,12 +1,10 @@ --- title: React id: react -sidebar_label: React +sidebar_label: React (winglib) description: A Wing library for [React](https://react.dev/) keywords: [winglib, Wing library] --- -# React - Use React in your project. ## Prerequisites @@ -104,7 +102,6 @@ export default App; ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/redis.md b/versioned_docs/version-latest/04-winglibs/27-winglib-redis.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/redis.md rename to versioned_docs/version-latest/04-winglibs/27-winglib-redis.md index 98d694ff..657ba53a 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/redis.md +++ b/versioned_docs/version-latest/04-winglibs/27-winglib-redis.md @@ -1,12 +1,10 @@ --- title: Redis id: redis -sidebar_label: Redis +sidebar_label: Redis (winglib) description: A Wing library for [Redis](https://redis.io/) keywords: [winglib, Wing library] --- -# Redis support for Winglang - This library provides a Wing client for Redis. ## Installation diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/sagemaker.md b/versioned_docs/version-latest/04-winglibs/28-winglib-sagemaker.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/sagemaker.md rename to versioned_docs/version-latest/04-winglibs/28-winglib-sagemaker.md index 73492083..38f4ab42 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/sagemaker.md +++ b/versioned_docs/version-latest/04-winglibs/28-winglib-sagemaker.md @@ -1,12 +1,10 @@ --- title: Amazon SageMaker id: sagemaker -sidebar_label: Amazon SageMaker +sidebar_label: Amazon SageMaker (winglib) description: The library enables owners of a trained sagemaker model, to access its Endpoints from a winglang [inflight](https://www.winglang.io/docs/concepts/inflights#inflight-code) code. keywords: [winglib, Wing library] --- -# sagemaker - ## Prerequisites - [winglang](https://winglang.io). @@ -76,7 +74,6 @@ new cloud.Function(handler, env: { ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/ses.md b/versioned_docs/version-latest/04-winglibs/29-winglib-ses.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/ses.md rename to versioned_docs/version-latest/04-winglibs/29-winglib-ses.md index 4a989775..4b029588 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/ses.md +++ b/versioned_docs/version-latest/04-winglibs/29-winglib-ses.md @@ -1,12 +1,10 @@ --- title: Amazon SES id: ses -sidebar_label: Amazon SES +sidebar_label: Amazon SES (winglib) description: Wing library for interacting with Amazon SES. keywords: [winglib, Wing library] --- -# ses - This library allows you to interact with the AWS SES Service ## Prerequisites @@ -30,7 +28,6 @@ let emailService = new ses.EmailService(emailIdentities: ["bot@wing.cloud"]); ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/simtools.md b/versioned_docs/version-latest/04-winglibs/30-winglib-simtools.md similarity index 97% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/simtools.md rename to versioned_docs/version-latest/04-winglibs/30-winglib-simtools.md index 41c00c23..9b226c83 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/simtools.md +++ b/versioned_docs/version-latest/04-winglibs/30-winglib-simtools.md @@ -1,12 +1,10 @@ --- title: Wing simulator utils id: simtools -sidebar_label: Wing simulator utils +sidebar_label: Wing simulator utils (winglib) description: '[Wing simulator](https://www.winglang.io/docs/platforms/sim) utility library' keywords: [winglib, Wing library] --- -# simtools - This library is a set of tools that are supposed to make the user of the simulator a happier developer. For the time being, it contains only one function, `addMacro()`. @@ -58,7 +56,6 @@ npm i @winglibs/simtools ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/slack.md b/versioned_docs/version-latest/04-winglibs/31-winglib-slack.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/slack.md rename to versioned_docs/version-latest/04-winglibs/31-winglib-slack.md index c34d0058..d884ed58 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/slack.md +++ b/versioned_docs/version-latest/04-winglibs/31-winglib-slack.md @@ -1,12 +1,10 @@ --- title: Slack id: slack -sidebar_label: Slack +sidebar_label: Slack (winglib) description: A Wing library for working with [Slack](https://slack.com/) keywords: [winglib, Wing library] --- -# slack - This library allows using Slack with Wing. ## Prerequisites @@ -138,7 +136,6 @@ let postMessage = new cloud.Function(inflight () => { ### Finding a Channel ID If you prefer to use a channel ID over a channel name, you can find the channel ID by right-clicking on the channel name and select `View channel details`. The channel ID will be at the bottom of the popup modal. - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/sns.md b/versioned_docs/version-latest/04-winglibs/32-winglib-sns.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/sns.md rename to versioned_docs/version-latest/04-winglibs/32-winglib-sns.md index 1bcf3e6d..81e6c3dc 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/sns.md +++ b/versioned_docs/version-latest/04-winglibs/32-winglib-sns.md @@ -1,12 +1,10 @@ --- title: Amazon SNS id: sns -sidebar_label: Amazon SNS +sidebar_label: Amazon SNS (winglib) description: A Wing library for working with [Amazon SNS](https://aws.amazon.com/sns/) keywords: [winglib, Wing library] --- -# sns - This library allows you to interact with the Amazon SNS Service. ## Prerequisites @@ -34,7 +32,6 @@ test "sending an SMS" { ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/tf.md b/versioned_docs/version-latest/04-winglibs/33-winglib-tf.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/tf.md rename to versioned_docs/version-latest/04-winglibs/33-winglib-tf.md index a60ef5f8..1d81527f 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/tf.md +++ b/versioned_docs/version-latest/04-winglibs/33-winglib-tf.md @@ -1,12 +1,10 @@ --- title: Terraform utilities id: tf -sidebar_label: Terraform utilities +sidebar_label: Terraform utilities (winglib) description: Terraform utilities library for Wing keywords: [winglib, Wing library] --- -# Terraform Utilities - This Wing library includes some useful utilities to work with Terraform. ## Prerequisites @@ -219,7 +217,6 @@ The above example will add a `provider` section to the output Terraform with a s ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/tsoa.md b/versioned_docs/version-latest/04-winglibs/34-winglib-tsoa.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/tsoa.md rename to versioned_docs/version-latest/04-winglibs/34-winglib-tsoa.md index 265faa1d..b5491b55 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/tsoa.md +++ b/versioned_docs/version-latest/04-winglibs/34-winglib-tsoa.md @@ -1,12 +1,10 @@ --- title: tsoa id: tsoa -sidebar_label: tsoa +sidebar_label: tsoa (winglib) description: A Wing library for working with [TSOA](https://tsoa-community.github.io/docs/) - An OpenAPI-compliant Web APIs using TypeScript. keywords: [winglib, Wing library] --- -# tsoa - A Wing library for working with [TSOA](https://tsoa-community.github.io/docs/) - An OpenAPI-compliant Web APIs using TypeScript. ## Prerequisites @@ -72,7 +70,6 @@ public async getUser( ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/vite.md b/versioned_docs/version-latest/04-winglibs/35-winglib-vite.md similarity index 98% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/vite.md rename to versioned_docs/version-latest/04-winglibs/35-winglib-vite.md index c60444a4..9c8acc6f 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/vite.md +++ b/versioned_docs/version-latest/04-winglibs/35-winglib-vite.md @@ -1,12 +1,10 @@ --- title: Vite id: vite -sidebar_label: Vite +sidebar_label: Vite (winglib) description: A Wing library to deploy [Vite applications](https://vitejs.dev/) to the cloud. keywords: [winglib, Wing library] --- -# vite - `@winglibs/vite` allows using a [Vite](https://vitejs.dev/) project with Wing. ## Prerequisites @@ -45,7 +43,6 @@ let url = website.url; ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/websockets.md b/versioned_docs/version-latest/04-winglibs/36-winglib-websockets.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/websockets.md rename to versioned_docs/version-latest/04-winglibs/36-winglib-websockets.md index c83920fa..d299711e 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/websockets.md +++ b/versioned_docs/version-latest/04-winglibs/36-winglib-websockets.md @@ -1,12 +1,10 @@ --- title: WebSocket id: websockets -sidebar_label: WebSocket +sidebar_label: WebSocket (winglib) description: A Wing library that enables you to create WebSockets using Wing. keywords: [winglib, Wing library] --- -# Websockets - This library enables you to create WebSockets using Wing. WebSockets offer a persistent, bidirectional communication channel between a client and a server, facilitating real-time, low-latency communication. @@ -88,7 +86,6 @@ To compile to `awscdk`, we need to import the `@winglang/platform-awscdk`. ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/bedrock.md b/versioned_docs/version-latest/04-winglibs/7-winglib-bedrock.md similarity index 98% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/bedrock.md rename to versioned_docs/version-latest/04-winglibs/7-winglib-bedrock.md index 24ef05e4..99b2fe6d 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/bedrock.md +++ b/versioned_docs/version-latest/04-winglibs/7-winglib-bedrock.md @@ -1,12 +1,10 @@ --- title: Amazon Bedrock id: bedrock -sidebar_label: Amazon Bedrock +sidebar_label: Amazon Bedrock (winglib) description: A Wing library for Amazon Bedrock keywords: [winglib, Wing library] --- -# bedrock - A Wing library for working with [Amazon Bedrock](https://aws.amazon.com/bedrock/). ## Prerequisites @@ -63,7 +61,6 @@ handled by the mocked service. ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/budget.md b/versioned_docs/version-latest/04-winglibs/8-winglib-budget.md similarity index 98% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/budget.md rename to versioned_docs/version-latest/04-winglibs/8-winglib-budget.md index 0dfaf527..37cff047 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/budget.md +++ b/versioned_docs/version-latest/04-winglibs/8-winglib-budget.md @@ -1,12 +1,10 @@ --- title: AWS Budget id: budget -sidebar_label: AWS Budget +sidebar_label: AWS Budget (winglib) description: A Wing library for working with [AWS Budgets] keywords: [winglib, Wing library] --- -# budget - A Wing library for working with [AWS Budgets](https://docs.aws.amazon.com/cost-management/latest/userguide/budgets-managing-costs.html) ## Prerequisites @@ -47,7 +45,6 @@ You get an alert when your monthly payment goes over your budget. ## License This library is licensed under the [MIT License](./LICENSE). - --- ## API Reference diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/checks.md b/versioned_docs/version-latest/04-winglibs/9-winglib-checks.md similarity index 99% rename from versioned_docs/version-latest/04-winglibs/05-winglibs/checks.md rename to versioned_docs/version-latest/04-winglibs/9-winglib-checks.md index aef37012..433fe2e3 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/checks.md +++ b/versioned_docs/version-latest/04-winglibs/9-winglib-checks.md @@ -1,12 +1,10 @@ --- title: Cloud checks id: checks -sidebar_label: Cloud checks +sidebar_label: Cloud checks (winglib) description: A self-validation mechanism for cloud applications keywords: [winglib, Wing library] --- -# Checks - The `Check` resource is a self-validation mechanism for cloud applications. Checks can be defined at any level and can be used to check if the system is healthy at that level.