Skip to content
This repository was archived by the owner on Apr 15, 2021. It is now read-only.

Commit acc535b

Browse files
committed
Replace 'the XDN'
1 parent 5b48bbc commit acc535b

39 files changed

+224
-225
lines changed

constants.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const PRODUCT_NAME = 'Layer0'
2-
export const CLI_NAME = 'l0'
3-
export const PACKAGE_NAME = '@l0'
2+
export const CLI_NAME = 'zero'
3+
export const PACKAGE_NAME = '@layer0'
44

55
export const DOMAIN = 'layer0.co'
66
export const APP_DOMAIN = `app.${DOMAIN}`

guides/caching.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ To cache responses at edge you need to create an [environment](environments). Ea
88

99
## L1 and L2 Caches
1010

11-
Each edge point-of-presence (POP) has its own L1 cache. If a request cannot be fulfilled from the L1 cache, the XDN will attempt to fulfill the request from a single global L2 cache POP in order to maximize your effective cache hit ratio. There is very little difference in time to first byte for responses served from the L1 vs L2 cache. In either case the response is served nearly instantly (typically 25-100ms). Concurrent requests for the same URL on different POPs that result in a cache miss will be coalesced at the L2 cache. This means that only one request at a time for each cacheable URL will reach your origin servers.
11+
Each edge point-of-presence (POP) has its own L1 cache. If a request cannot be fulfilled from the L1 cache, {{ PRODUCT_NAME }} will attempt to fulfill the request from a single global L2 cache POP in order to maximize your effective cache hit ratio. There is very little difference in time to first byte for responses served from the L1 vs L2 cache. In either case the response is served nearly instantly (typically 25-100ms). Concurrent requests for the same URL on different POPs that result in a cache miss will be coalesced at the L2 cache. This means that only one request at a time for each cacheable URL will reach your origin servers.
1212

1313
## Caching a Response
1414

@@ -30,10 +30,10 @@ router.get('/some/path', ({ cache }) => {
3030
serviceWorkerSeconds: 60 * 60,
3131
},
3232
edge: {
33-
// Sets the TTL for a response in the XDN's edge cache
33+
// Sets the TTL for a response in {{ PRODUCT_NAME }}'s edge cache
3434
maxAgeSeconds: 60 * 60 * 24,
3535

36-
// Sets the amount of time a stale response will be served from the cache. When a stale response is sent, the XDN
36+
// Sets the amount of time a stale response will be served from the cache. When a stale response is sent, {{ PRODUCT_NAME }}
3737
// will simultaneously fetch a new response to serve subsequent requests.
3838
// Using stale-while-revalidate helps raise your effective cache hit rate to near 100%.
3939
staleWhileRevalidateSeconds: 60 * 60, // serve stale responses for up to 1 hour while fetching a new response
@@ -68,7 +68,7 @@ To ensure that your site is resilient to [cache poisoning attacks](security#sect
6868

6969
#### Customizing the Cache Key
7070

71-
It is often useful to customize the cache key, either to improve the cache hit ratio or to account for complexities of your site. As seen above, the XDN provides an easy way to customize the keys by using the `CustomCacheKey` class. Here we will focus on three common examples:
71+
It is often useful to customize the cache key, either to improve the cache hit ratio or to account for complexities of your site. As seen above, {{ PRODUCT_NAME }} provides an easy way to customize the keys by using the `CustomCacheKey` class. Here we will focus on three common examples:
7272

7373
- Increasing the cache hit ratio by excluding query parameters that are not used in the rendering of the content:
7474

@@ -168,7 +168,7 @@ Note that this feature cannot be safely used with caching of `POST` and similar
168168

169169
## Preventing a response from being cached
170170

171-
By default, the XDN will cache responses that satisfy all of the following conditions:
171+
By default, {{ PRODUCT_NAME }} will cache responses that satisfy all of the following conditions:
172172

173173
1. The response must correspond to a `GET` or `HEAD` request. To override this see [POST and other non-GET/HEAD](#section_caching_responses_for_post_and_other_non_get_head_requests) section.
174174
2. The response status must be 1xx, 2xx or 3xx. You cannot override this.
@@ -295,7 +295,7 @@ The cache can also be [cleared via the REST API](/guides/rest_api#section_clear_
295295

296296
## Static prerendering after clearing the cache
297297

298-
If you have [static prerendering] enabled, the cache will automatically be repopulated when you clear all entries from the cache (when you select "Purge all entries" in the XDN Developer Console or run `xdn cache-clear` without providing `--path` or `--surrogate-key`). You can view the prerendering progress by clicking on the active deployment for the environment that was cleared.
298+
If you have [static prerendering] enabled, the cache will automatically be repopulated when you clear all entries from the cache (when you select "Purge all entries" in {{ PRODUCT_NAME }} Developer Console or run `xdn cache-clear` without providing `--path` or `--surrogate-key`). You can view the prerendering progress by clicking on the active deployment for the environment that was cleared.
299299

300300
## Preserving the cache when deploying a new version of your site
301301

@@ -336,7 +336,7 @@ This guide walks you through clearing the cache on your site at a scheduled day
336336

337337
## NPM script
338338

339-
Here is an example script you can add to your `package.json` to handle cache clearing for each environment. You can also configure scripts to clear by surrogate key, path, or group (As defined in the XDN Console)
339+
Here is an example script you can add to your `package.json` to handle cache clearing for each environment. You can also configure scripts to clear by surrogate key, path, or group (As defined in {{ PRODUCT_NAME }} Console)
340340

341341
These scripts assume that you have created environments called "production", "staging", and "development and you have created a deploy key for your site and added it as a secret in your repo called "xdn_deploy_token".
342342

guides/cli.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# CLI
22

3-
This guide shows you everything you can do with the XDN command line interface.
3+
This guide shows you everything you can do with {{ PRODUCT_NAME }} command line interface.
44

55
## Installation
66

7-
To install the XDN CLI run
7+
To install the {{ PRODUCT_NAME }} CLI run
88

99
```bash
1010
npm i -g {{ PACKAGE_NAME }}/cli
@@ -24,11 +24,11 @@ Creates a build of your app optimized for production
2424

2525
#### Options
2626

27-
| Name | Description |
28-
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29-
| `--skip-framework` | Alias: "-s". Skips the framework (Next.js, Vue, Angular, etc..) build and simply rebundles your router |
30-
| `--disable-permanent-assets` | Set this to true to suppress errors like "Immutable file (...) content was changed" during deployment. |
31-
| `--include-sources` | Includes all non-gitignored source files in the bundle uploaded to the XDN. This can be helpful when debugging, especially when working with Moovweb support. You can limit the files that are uploaded using the [sources](/guides/xdn_config#section_sources) config in xdn.config.js. |
27+
| Name | Description |
28+
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29+
| `--skip-framework` | Alias: "-s". Skips the framework (Next.js, Vue, Angular, etc..) build and simply rebundles your router |
30+
| `--disable-permanent-assets` | Set this to true to suppress errors like "Immutable file (...) content was changed" during deployment. |
31+
| `--include-sources` | Includes all non-gitignored source files in the bundle uploaded to {{ PRODUCT_NAME }}. This can be helpful when debugging, especially when working with Moovweb support. You can limit the files that are uploaded using the [sources](/guides/xdn_config#section_sources) config in xdn.config.js. |
3232

3333
#### Example
3434

@@ -91,16 +91,16 @@ Builds and deploys your site on {{ PRODUCT_NAME }}.
9191

9292
#### Options
9393

94-
| Name | Description |
95-
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
96-
| `--site` | The name of the site to deploy. By default the `name` field in `package.json` is used. |
97-
| `--environment` | The environment to deploy to. By default the `default` environment is used. |
98-
| `--branch` | The name of the source control branch. This is automatically set when using Git. |
99-
| `--skip-build` | Skips the build step |
100-
| `--token` | Authenticates using a deploy token rather than your user credentials. Use this option when deploying from CI. |
101-
| `--commit-url` | The URL at which the commit can be viewed in your source control provided. If your package.json provides the repository attribute the commit URL will be derived automatically if you use GitHub, GitLab, or BitBucket. |
102-
| `--include-sources` | Includes all non-gitignored source files in the bundle uploaded to the XDN. This can be helpful when debugging, especially when working with Moovweb support. You can limit the files that are uploaded using the [sources](/guides/xdn_config#section_sources) config in xdn.config.js. |
103-
| `--disable-permanent-assets` | Set this to true to suppress errors like "Immutable file (...) content was changed" during deployment. |
94+
| Name | Description |
95+
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
96+
| `--site` | The name of the site to deploy. By default the `name` field in `package.json` is used. |
97+
| `--environment` | The environment to deploy to. By default the `default` environment is used. |
98+
| `--branch` | The name of the source control branch. This is automatically set when using Git. |
99+
| `--skip-build` | Skips the build step |
100+
| `--token` | Authenticates using a deploy token rather than your user credentials. Use this option when deploying from CI. |
101+
| `--commit-url` | The URL at which the commit can be viewed in your source control provided. If your package.json provides the repository attribute the commit URL will be derived automatically if you use GitHub, GitLab, or BitBucket. |
102+
| `--include-sources` | Includes all non-gitignored source files in the bundle uploaded to {{ PRODUCT_NAME }}. This can be helpful when debugging, especially when working with Moovweb support. You can limit the files that are uploaded using the [sources](/guides/xdn_config#section_sources) config in xdn.config.js. |
103+
| `--disable-permanent-assets` | Set this to true to suppress errors like "Immutable file (...) content was changed" during deployment. |
104104

105105
#### Example
106106

@@ -110,7 +110,7 @@ xdn deploy my-team --environment=production
110110

111111
### docs
112112

113-
Open the XDN documentation in your browser.
113+
Open the {{ PRODUCT_NAME }} documentation in your browser.
114114

115115
#### Example
116116

@@ -120,7 +120,7 @@ xdn docs
120120

121121
### dev
122122

123-
Runs your project in development mode, simulating the XDN cloud environment. This command is a simplified version of `xdn run`, with only the --cache option being supported.
123+
Runs your project in development mode, simulating the {{ PRODUCT_NAME }} cloud environment. This command is a simplified version of `xdn run`, with only the --cache option being supported.
124124

125125
#### Options
126126

@@ -152,7 +152,7 @@ xdn init
152152

153153
### login
154154

155-
Logs into the XDN via the developer console.
155+
Logs into {{ PRODUCT_NAME }} via the developer console.
156156

157157
#### Example
158158

@@ -162,7 +162,7 @@ xdn login
162162

163163
### logout
164164

165-
Logs out of the XDN
165+
Logs out of {{ PRODUCT_NAME }}
166166

167167
#### Example
168168

@@ -187,7 +187,7 @@ Runs your app locally. Uses port 3000 by default. You can change this by setting
187187
xdn run --production
188188
```
189189

190-
Or to run a deployment bundle downloaded from the XDN Developer Console, use:
190+
Or to run a deployment bundle downloaded from {{ PRODUCT_NAME }} Developer Console, use:
191191

192192
```bash
193193
xdn run /path/to/bundle.zip

0 commit comments

Comments
 (0)