Skip to content

Commit

Permalink
docs:
Browse files Browse the repository at this point in the history
  • Loading branch information
jayair committed Sep 18, 2024
1 parent 06053c8 commit 5c31b2d
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions platform/src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ interface $APP
* The providers currently being used in the app.
*/
providers: App["providers"];
}> {}
}> { }

declare global {
// @ts-expect-error
Expand Down Expand Up @@ -240,19 +240,25 @@ declare global {
export const $transform: typeof import("./components/component").$transform;

/**
* Packages a file or directory into a Pulumi asset.
* Packages a file or directory into a Pulumi asset. This can be used for Pulumi resources that
* take an asset as input.
*
* When the asset path is a file, this returns a `FileAsset`.
* When the asset path is a directory, this returns a `FileArchive` with the contents of the directory.
* When the given path is a file, it returns a
* [`FileAsset`](https://www.pulumi.com/docs/iac/concepts/assets-archives/#assets). If the
* path is a directory, it returns a
* [`FileArchive`](https://www.pulumi.com/docs/iac/concepts/assets-archives/#assets) with the
* zipped contents of the directory.
*
* If the asset path is absolute, it'll be used as is. Otherwise, it'll be relative to the root of the app.
* :::tip
* This automatically resolves paths relative to the root of the app.
* :::
*
* @example
* Relative paths are resolved relative to the root of the app. While, absolute paths are used as is.
*
* #### Uploading a file to S3
* @example
*
* If you have a file inside the `images` directory at the root of your app, you can upload it
* to S3 like this.
* to S3 on deploy.
*
* ```ts title="sst.config.ts" {7}
* const bucket = new aws.s3.Bucket("MyBucket");
Expand All @@ -265,9 +271,7 @@ declare global {
* });
* ```
*
* #### Uploading a directory as a zip
*
* You can also use this to zip up the files in the "files" directory and upload it to S3.
* You can also use this to zip up the files in the `files/` directory and upload it to S3.
*
* ```ts title="sst.config.ts" {5}
* new aws.s3.BucketObjectv2("MyZip", {
Expand Down

0 comments on commit 5c31b2d

Please sign in to comment.