diff --git a/versioned_docs/version-latest/01-start-here/02-installation.md b/versioned_docs/version-latest/01-start-here/02-installation.md index 3057edcc4..79dfd3b23 100644 --- a/versioned_docs/version-latest/01-start-here/02-installation.md +++ b/versioned_docs/version-latest/01-start-here/02-installation.md @@ -81,12 +81,6 @@ wing --version This extension adds syntax highlighting and other conveniences for the Wing language in [VSCode]. You don't *have* to use it, but it's great. It's available through the VSCode Marketplace [here](https://marketplace.visualstudio.com/items?itemName=Monada.vscode-wing). -## Wing Console - -The Wing Console is a web application that provides a developer-friendly interface for viewing, exploring, and interacting with your Wing applications running on the local cloud simulator. - -The Wing Console is included as part of the Wing CLI package. There is no need to install it separately. Once the Wing CLI is successfully installed, you can directly access the Wing Console and begin utilizing its features. - [AWS account]: https://portal.aws.amazon.com/billing/signup [AWS CLI]: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html [AWS credentials]: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html diff --git a/versioned_docs/version-latest/01-start-here/04-run-locally.md b/versioned_docs/version-latest/01-start-here/04-run-locally.md index dadecaa9d..80f1869fb 100644 --- a/versioned_docs/version-latest/01-start-here/04-run-locally.md +++ b/versioned_docs/version-latest/01-start-here/04-run-locally.md @@ -8,13 +8,6 @@ The Wing Console is a web application that provides a developer-friendly interfa ## Opening your app in the console -:::info - -Make sure you have [installed](./installation#wing-console) the Wing Console on your system -before getting started with this step. - -::: - Use the Wing CLI to start the console with our newly created Wing source file: ```sh diff --git a/versioned_docs/version-latest/02-concepts/01-preflight-and-inflight.md b/versioned_docs/version-latest/02-concepts/01-preflight-and-inflight.md index e0c3ada05..65ce51abc 100644 --- a/versioned_docs/version-latest/02-concepts/01-preflight-and-inflight.md +++ b/versioned_docs/version-latest/02-concepts/01-preflight-and-inflight.md @@ -5,16 +5,15 @@ description: "Wing's two execution phases: preflight and inflight" keywords: [Inflights, Inflight functions, Preflight, Preflight code] --- -Wing has two execution phases: +One of the main differences between Wing and other languages is that it unifies both infrastructure definitions and application logic under the same programming model. +This is enabled by the concepts of the *preflight* and *inflight* execution phases: -- **preflight**: code that runs once, at compile time, to generate the infrastructure configuration of your cloud application. For example, setting up databases, queues, storage buckets, API endpoints, etc. -- **inflight**: code that runs at runtime to perform your application logic. For example, handling API requests, processing queue messages, etc. Inflight code can be executed on compute platforms in the cloud, such as function services (lambda), containers, VMs or physical servers. - -One of the main differences between Wing and other languages is that it unifies both execution phases under the same programming model, through the concepts of preflight code and inflight code. +- **Preflight**: Code that runs once, at compile time, and generates the infrastructure configuration of your cloud application. For example, setting up databases, queues, storage buckets, API endpoints, etc. +- **Inflight**: Code that runs at runtime and implements your application's behavior. For example, handling API requests, processing queue messages, etc. Inflight code can be executed on various compute platforms in the cloud, such as function services (such as AWS Lambda or Azure Functions), containers (such as ECS or Kubernetes), VMs or even physical servers. ## Preflight code -Preflight code is code that runs once, at compile time, to generate the app's infrastructure configuration. +Your preflight code runs once, at compile time, and defines your application's infrastructure configuration. This configuration is then consumed by an infrastructure provisioning engine such as Terraform, CloudFormation, Pulumi or Kubernetes. For example, this code snippet defines a storage bucket using a class from the standard library: diff --git a/versioned_docs/version-latest/02-concepts/03-compile-targets.md b/versioned_docs/version-latest/02-concepts/03-compile-targets.md index c61a05b96..3bc6687e9 100644 --- a/versioned_docs/version-latest/02-concepts/03-compile-targets.md +++ b/versioned_docs/version-latest/02-concepts/03-compile-targets.md @@ -90,4 +90,13 @@ if util.env("WING_TARGET") == "sim" { } ``` -In this example, we're creating a verbose logger service only when the `WING_TARGET` environment variable is set to "sim". The `onStart` function of this service lists the files in the bucket and logs them every 10 seconds. \ No newline at end of file +In this example, we're creating a verbose logger service only when the `WING_TARGET` environment variable is set to "sim". The `onStart` function of this service lists the files in the bucket and logs them every 10 seconds. + +## Compiler plugins + +Compiler plugins serve to extend the capabilities of the Wing compiler. They offer customization for the compilation output, such as infrastructure definitions. For instance, a compiler plugin can be employed to enforce a specific tagging convention on all resources within the resulting infrastructure. + +Learn more about compiler plugins [here](https://www.winglang.io/docs/tools/compiler-plugins) + + + diff --git a/versioned_docs/version-latest/04-standard-library/01-cloud/api.md b/versioned_docs/version-latest/04-standard-library/01-cloud/api.md index cb78514f6..2d00d1596 100644 --- a/versioned_docs/version-latest/04-standard-library/01-cloud/api.md +++ b/versioned_docs/version-latest/04-standard-library/01-cloud/api.md @@ -119,4 +119,4 @@ The AWS implementation of `cloud.Api` uses [Amazon API Gateway](https://aws.amaz ## API Reference -The full list of APIs for `cloud.Api` is available in the [API Reference](../api-reference). +The full list of APIs for `cloud.Api` is available in the [API Reference](./api-reference). diff --git a/versioned_docs/version-latest/04-standard-library/01-cloud/bucket.md b/versioned_docs/version-latest/04-standard-library/01-cloud/bucket.md index 878ba296e..7d0806db8 100644 --- a/versioned_docs/version-latest/04-standard-library/01-cloud/bucket.md +++ b/versioned_docs/version-latest/04-standard-library/01-cloud/bucket.md @@ -117,4 +117,4 @@ The Google Cloud implementation of `cloud.Bucket` uses [Google Cloud Storage](ht ## API Reference -The full list of APIs for `cloud.Bucket` is available in the [API Reference](../api-reference). +The full list of APIs for `cloud.Bucket` is available in the [API Reference](./api-reference). diff --git a/versioned_docs/version-latest/04-standard-library/01-cloud/counter.md b/versioned_docs/version-latest/04-standard-library/01-cloud/counter.md index ed69ec3b2..7374f018e 100644 --- a/versioned_docs/version-latest/04-standard-library/01-cloud/counter.md +++ b/versioned_docs/version-latest/04-standard-library/01-cloud/counter.md @@ -65,4 +65,4 @@ The AWS implementation of `cloud.Counter` uses [Amazon DynamoDB](https://aws.ama ## API Reference -The full list of APIs for `cloud.Counter` is available in the [API Reference](../api-reference). +The full list of APIs for `cloud.Counter` is available in the [API Reference](./api-reference). diff --git a/versioned_docs/version-latest/04-standard-library/01-cloud/function.md b/versioned_docs/version-latest/04-standard-library/01-cloud/function.md index 51d9cb909..5d4945564 100644 --- a/versioned_docs/version-latest/04-standard-library/01-cloud/function.md +++ b/versioned_docs/version-latest/04-standard-library/01-cloud/function.md @@ -63,4 +63,4 @@ The Azure implementation of `cloud.Function` uses [Azure Function](https://azure ## API Reference -The full list of APIs for `cloud.Function` is available in the [API Reference](../api-reference). \ No newline at end of file +The full list of APIs for `cloud.Function` is available in the [API Reference](./api-reference). diff --git a/versioned_docs/version-latest/04-standard-library/01-cloud/queue.md b/versioned_docs/version-latest/04-standard-library/01-cloud/queue.md index 86bb045e4..bf765a046 100644 --- a/versioned_docs/version-latest/04-standard-library/01-cloud/queue.md +++ b/versioned_docs/version-latest/04-standard-library/01-cloud/queue.md @@ -82,4 +82,4 @@ The AWS implementation of `cloud.Queue` uses [Amazon Simple Queue Service](https ## API Reference -The full list of APIs for `cloud.Queue` is available in the [API Reference](../api-reference). \ No newline at end of file +The full list of APIs for `cloud.Queue` is available in the [API Reference](./api-reference). diff --git a/versioned_docs/version-latest/04-standard-library/01-cloud/schedule.md b/versioned_docs/version-latest/04-standard-library/01-cloud/schedule.md index a4aea92a0..94f0468d5 100644 --- a/versioned_docs/version-latest/04-standard-library/01-cloud/schedule.md +++ b/versioned_docs/version-latest/04-standard-library/01-cloud/schedule.md @@ -61,4 +61,4 @@ See [Amazon CloudWatch](https://aws.amazon.com/cloudwatch/). ## API Reference -The full list of APIs for `cloud.Schedule` is available in the [API Reference](../api-reference). +The full list of APIs for `cloud.Schedule` is available in the [API Reference](./api-reference). diff --git a/versioned_docs/version-latest/04-standard-library/01-cloud/secret.md b/versioned_docs/version-latest/04-standard-library/01-cloud/secret.md index efb91ec2e..3f3d0b963 100644 --- a/versioned_docs/version-latest/04-standard-library/01-cloud/secret.md +++ b/versioned_docs/version-latest/04-standard-library/01-cloud/secret.md @@ -78,4 +78,4 @@ See [AWS documentation](https://docs.aws.amazon.com/secretsmanager/latest/usergu ## API Reference -The full list of APIs for `cloud.Secret` is available in the [API Reference](../api-reference). +The full list of APIs for `cloud.Secret` is available in the [API Reference](./api-reference). diff --git a/versioned_docs/version-latest/04-standard-library/01-cloud/service.md b/versioned_docs/version-latest/04-standard-library/01-cloud/service.md index c42a865a6..1591c7b49 100644 --- a/versioned_docs/version-latest/04-standard-library/01-cloud/service.md +++ b/versioned_docs/version-latest/04-standard-library/01-cloud/service.md @@ -110,4 +110,4 @@ Within the context of the simulator, services are just spawned processes ran wit ## API Reference -The full list of APIs for `cloud.Service` is available in the [API Reference](../api-reference). +The full list of APIs for `cloud.Service` is available in the [API Reference](./api-reference). diff --git a/versioned_docs/version-latest/04-standard-library/01-cloud/topic.md b/versioned_docs/version-latest/04-standard-library/01-cloud/topic.md index 900ea7147..8aa08a3b1 100644 --- a/versioned_docs/version-latest/04-standard-library/01-cloud/topic.md +++ b/versioned_docs/version-latest/04-standard-library/01-cloud/topic.md @@ -96,4 +96,4 @@ AWS implementations of `cloud.Topic` use [AWS SNS](https://docs.aws.amazon.com/s ## API Reference -The full list of APIs for `cloud.Topic` is available in the [API Reference](../api-reference). +The full list of APIs for `cloud.Topic` is available in the [API Reference](./api-reference). diff --git a/versioned_docs/version-latest/04-standard-library/01-cloud/website.md b/versioned_docs/version-latest/04-standard-library/01-cloud/website.md index 0e13e4d13..da721b114 100644 --- a/versioned_docs/version-latest/04-standard-library/01-cloud/website.md +++ b/versioned_docs/version-latest/04-standard-library/01-cloud/website.md @@ -62,4 +62,4 @@ AWS implementations of `cloud.Website` uses [Amazon S3](https://aws.amazon.com/s ## API Reference -The full list of APIs for `cloud.Website` is available in the [API Reference](../api-reference). +The full list of APIs for `cloud.Website` is available in the [API Reference](./api-reference). diff --git a/versioned_docs/version-latest/06-tools/01-cli.md b/versioned_docs/version-latest/06-tools/01-cli.md index 33fa89617..01a3a4bb8 100644 --- a/versioned_docs/version-latest/06-tools/01-cli.md +++ b/versioned_docs/version-latest/06-tools/01-cli.md @@ -25,7 +25,7 @@ $ wing ## Run: `wing run` / `wing it` You can use the `run` command (or `it`) when you want to interact with your Wing program in the -[Wing Console](/start-here/local). +[Wing Console](/docs/start-here/local). Usage: @@ -70,7 +70,7 @@ $ wing compile --target sim ENTRYPOINT.w The output will be under `target/ENTRYPOINT.wsim` and can be opened in one two ways: -* Interactively using [Wing Console](/start-here/local) using `wing it target/hello.wsim`. +* Interactively using [Wing Console](/docs/start-here/local) using `wing it target/hello.wsim`. ### `tf-aws` Target @@ -86,7 +86,8 @@ $ wing compile --target tf-aws ENTRYPOINT.w The output includes both a Terraform configuration file (under `target/cdktf.out/stacks/root`) and JavaScript bundles that include inflight code that executes on compute platform such as AWS Lambda. -You can deploy your stack to AWS using Terraform ([instructions](/start-here/aws)). +You can deploy your stack to AWS using Terraform ([instructions](/docs/start-here/aws)). + ### `tf-azure` Target diff --git a/versioned_docs/version-latest/src/components/CodeComparison.jsx b/versioned_docs/version-latest/src/components/CodeComparison.jsx index 682d8784c..7df783b1d 100644 --- a/versioned_docs/version-latest/src/components/CodeComparison.jsx +++ b/versioned_docs/version-latest/src/components/CodeComparison.jsx @@ -3,6 +3,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import FileCodeBlock from './FileCodeBlock'; +import helloWPath from '!file-loader!../examples/function-upload-to-bucket/wing/hello.w'; import getExamplePlatforms from '../examples/getExamplePlatforms'; import getExampleWingFile from '../examples/getExampleWingFile'; diff --git a/versioned_docs/version-latest/src/examples/function-upload-to-bucket/platforms.js b/versioned_docs/version-latest/src/examples/function-upload-to-bucket/platforms.js index a0151d558..b1da72491 100644 --- a/versioned_docs/version-latest/src/examples/function-upload-to-bucket/platforms.js +++ b/versioned_docs/version-latest/src/examples/function-upload-to-bucket/platforms.js @@ -2,23 +2,21 @@ // Also js files are js.txt files until we find a way to make Docusaurus not minify them +import pulumiIndexPath from '!file-loader!./pulumi/index.js.txt'; +import pulumiMainPath from '!file-loader!./pulumi/main.ts'; +import pulumiPulumiPath from '!file-loader!./pulumi/pulumi.yaml'; -import pulumiIndexPath from '!file-loader?outputPath=docs!./pulumi/index.js.txt'; -import pulumiMainPath from '!file-loader?outputPath=docs!./pulumi/main.ts'; -import pulumiPulumiPath from '!file-loader?outputPath=docs!./pulumi/pulumi.yaml'; +import terraformIndexPath from '!file-loader!./terraform/index.js.txt'; +import terraformMainPath from '!file-loader!./terraform/main.tf'; -import terraformIndexPath from '!file-loader?outputPath=docs!./terraform/index.js.txt'; +import cdkHelloPath from '!file-loader!./aws-cdk/hello.js.txt'; +import cdkIndexPath from '!file-loader!./aws-cdk/index.js.txt'; -import terraformMainPath from '!file-loader?outputPath=docs!./terraform/main.tf'; +import cdktfIndexPath from '!file-loader!./cdktf/index.js.txt'; +import cdktfMainPath from '!file-loader!./cdktf/main.ts'; -import cdkHelloPath from '!file-loader?outputPath=docs!./aws-cdk/hello.js.txt'; -import cdkIndexPath from '!file-loader?outputPath=docs!./aws-cdk/index.js.txt'; - -import cdktfIndexPath from '!file-loader?outputPath=docs!./cdktf/index.js.txt'; -import cdktfMainPath from '!file-loader?outputPath=docs!./cdktf/main.ts'; - -import cloudformationIndexPath from '!file-loader?outputPath=docs!./cloudformation/index.js.txt'; -import cloudformationTemplatePath from '!file-loader?outputPath=docs!./cloudformation/template.yaml'; +import cloudformationIndexPath from '!file-loader!./cloudformation/index.js.txt'; +import cloudformationTemplatePath from '!file-loader!./cloudformation/template.yaml'; const allPlatforms = [ { diff --git a/versioned_docs/version-latest/src/examples/function-upload-to-bucket/wing.js b/versioned_docs/version-latest/src/examples/function-upload-to-bucket/wing.js index d1a3462f9..d0eee29c3 100644 --- a/versioned_docs/version-latest/src/examples/function-upload-to-bucket/wing.js +++ b/versioned_docs/version-latest/src/examples/function-upload-to-bucket/wing.js @@ -1,5 +1,5 @@ // We cannot parse the folder structure at runtime because of Docusaurus and webpack limitations -import wingHelloPath from '!file-loader?outputPath=docs!./wing/hello.w'; +import wingHelloPath from '!file-loader!./wing/hello.w'; export default { name: "hello.js", path: wingHelloPath };