Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
release: 1.20.0 (#2318)
Browse files Browse the repository at this point in the history
This release is part of initial deprecation efforts and includes removing reporter functionality
  • Loading branch information
JacobMGEvans committed Oct 3, 2022
1 parent e774b3a commit d91560d
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 86 deletions.
19 changes: 14 additions & 5 deletions CHANGELOG.md
@@ -1,15 +1,26 @@
# Changelog

## 1.20.0

- ### Maintenance

- **chore: remove reporter - [JacobMGEvans], [pull/2316]**

As part of the deprecation efforts, removed reporter as we will no longer be supporting Wrangler 1

[jacobmgevans]: https://github.com/JacobMGEvans
[pull/2316]: https://github.com/cloudflare/wrangler/pull/2316

## 1.19.13

- ### Fixes

- **Update openssl-src - [imhunterand], [pull/2302]**

Bump openssl-src to patch vulnerability
Bump openssl-src to patch vulnerability

[jspspike]: https://github.com/imhunterand
[pull/2302]: https://github.com/cloudflare/wrangler/pull/2302
[jspspike]: https://github.com/imhunterand
[pull/2302]: https://github.com/cloudflare/wrangler/pull/2302

- ### Maintenance

Expand Down Expand Up @@ -37,8 +48,6 @@
[n0vad3v]: https://github.com/n0vad3v
[pull/2253]: https://github.com/cloudflare/wrangler/pull/2253



## 1.19.12

- ### Fixes
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

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

25 changes: 21 additions & 4 deletions Cargo.toml
@@ -1,13 +1,18 @@
[package]
name = "wrangler"
version = "1.19.13"
version = "1.20.0"
authors = ["The Wrangler Team <wrangler@cloudflare.com>"]
edition = "2018"
license = "MIT/Apache-2.0"
description = "Command-line interface for all things Cloudflare Workers"
readme = "README.md"
repository = "https://github.com/cloudflare/wrangler"
categories = ["wasm", "development-tools", "command-line-utilities", "web-programming"]
categories = [
"wasm",
"development-tools",
"command-line-utilities",
"web-programming",
]

[dependencies]
anyhow = { version = "1.0", features = ["backtrace"] }
Expand All @@ -21,7 +26,12 @@ chrono = "0.4.19"
clap = "2.33.3"
cloudflare = "0.9.0"
colored_json = "2.1.0"
config = { version = "0.11.0", default-features = false, features = ["toml", "json", "yaml", "ini"] }
config = { version = "0.11.0", default-features = false, features = [
"toml",
"json",
"yaml",
"ini",
] }
console = "0.14.1"
dirs = "3.0.1"
env_logger = "0.8.4"
Expand Down Expand Up @@ -61,7 +71,14 @@ sys-info = "0.9"
tempfile = "3.1.0"
term_size = "0.3"
text_io = "0.1.8"
tokio = { version = "1.5.0", default-features = false, features = ["io-std", "time", "macros", "process", "signal", "sync"] }
tokio = { version = "1.5.0", default-features = false, features = [
"io-std",
"time",
"macros",
"process",
"signal",
"sync",
] }
tokio-native-tls = "0.3.0"
tokio-retry = "0.3"
tokio-rustls = "0.23.0"
Expand Down
1 change: 1 addition & 0 deletions changelog-generator/package-lock.json

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

147 changes: 74 additions & 73 deletions npm/README.md
@@ -1,5 +1,7 @@
# 🤠 wrangler

**Note:** If you're looking for the latest version of the `wrangler` package, visit https://github.com/cloudflare/wrangler2

![Banner](/banner.png)

[![crates.io](https://img.shields.io/crates/v/wrangler.svg)](https://crates.io/crates/wrangler) &nbsp;
Expand All @@ -15,11 +17,12 @@

You have many options to install wrangler!

For the latest version, see https://github.com/cloudflare/wrangler2

### Install with `npm`

We strongly recommend you install `npm` with a Node version manager like [`nvm`](https://github.com/nvm-sh/nvm#installing-and-updating), which puts the global `node_modules` in your home directory to eliminate permissions issues with `npm install -g`. Distribution-packaged `npm` installs often use `/usr/lib/node_modules` (which is root) for globally installed `npm` packages, and running `npm install -g` as `root` prevents `wrangler` from installing properly.


Once you've installed `nvm` and configured your system to use the `nvm` managed node install, run:

```bash
Expand Down Expand Up @@ -74,128 +77,126 @@ $ wrangler publish

### 👯 `generate`

Scaffold a project, including boilerplate code for a Rust library and a Cloudflare Worker.
Scaffold a project, including boilerplate code for a Rust library and a Cloudflare Worker.

```bash
wrangler generate <name> <template> --type=["webpack", "javascript", "rust"]
```
```bash
wrangler generate <name> <template> --type=["webpack", "javascript", "rust"]
```

All of the arguments and flags to this command are optional:
All of the arguments and flags to this command are optional:

- `name`: defaults to `worker`
- `template`: defaults to the [`https://github.com/cloudflare/worker-template`](https://github.com/cloudflare/worker-template)
- `type`: defaults to `javascript` based on the ["worker-template"](https://github.com/cloudflare/worker-template/blob/master/wrangler.toml)
- `name`: defaults to `worker`
- `template`: defaults to the [`https://github.com/cloudflare/worker-template`](https://github.com/cloudflare/worker-template)
- `type`: defaults to `javascript` based on the ["worker-template"](https://github.com/cloudflare/worker-template/blob/master/wrangler.toml)

### 📥 `init`

Creates a skeleton `wrangler.toml` in an existing directory. This can be used as an alternative to `generate` if you prefer to clone a repository yourself.
Creates a skeleton `wrangler.toml` in an existing directory. This can be used as an alternative to `generate` if you prefer to clone a repository yourself.

```bash
wrangler init <name> --type=["webpack", "javascript", "rust"]
```
```bash
wrangler init <name> --type=["webpack", "javascript", "rust"]
```

All of the arguments and flags to this command are optional:
All of the arguments and flags to this command are optional:

- `name`: defaults to the name of your working directory
- `type`: defaults to ["webpack"](https://developers.cloudflare.com/workers/tooling/wrangler/webpack).
- `name`: defaults to the name of your working directory
- `type`: defaults to ["webpack"](https://developers.cloudflare.com/workers/tooling/wrangler/webpack).

### 🦀⚙️ `build`

Build your project. This command looks at your `wrangler.toml` file and runs the build steps associated
with the `"type"` declared there.

Additionally, you can configure different [environments](https://developers.cloudflare.com/workers/tooling/wrangler/configuration/environments).
Build your project. This command looks at your `wrangler.toml` file and runs the build steps associated
with the `"type"` declared there.

Additionally, you can configure different [environments](https://developers.cloudflare.com/workers/tooling/wrangler/configuration/environments).

### 🔓 `login`

Authorize Wrangler with your Cloudflare login. This will prompt you with a Cloudflare account login page and a permissions consent page.
This command is the alternative to `wrangler config` and it uses OAuth tokens.
Authorize Wrangler with your Cloudflare login. This will prompt you with a Cloudflare account login page and a permissions consent page.
This command is the alternative to `wrangler config` and it uses OAuth tokens.

```bash
wrangler login --scopes-list --scopes <scopes>
```

All of the arguments and flags to this command are optional:
```bash
wrangler login --scopes-list --scopes <scopes>
```

- `scopes-list`: list all the available OAuth scopes with descriptions.
- `scopes`: allows to choose your set of OAuth scopes.
All of the arguments and flags to this command are optional:

Read more about this command in [Wrangler Login Documentation](https://developers.cloudflare.com/workers/cli-wrangler/commands#login).
- `scopes-list`: list all the available OAuth scopes with descriptions.
- `scopes`: allows to choose your set of OAuth scopes.

Read more about this command in [Wrangler Login Documentation](https://developers.cloudflare.com/workers/cli-wrangler/commands#login).

### 🔧 `config`

Authenticate Wrangler with a Cloudflare API Token. This is an interactive command that will prompt you for your API token:
Authenticate Wrangler with a Cloudflare API Token. This is an interactive command that will prompt you for your API token:

```bash
wrangler config
Enter API token:
superlongapitoken
```
```bash
wrangler config
Enter API token:
superlongapitoken
```

You can also provide your email and global API key (this is not recommended for security reasons):
You can also provide your email and global API key (this is not recommended for security reasons):

```bash
wrangler config --api-key
Enter email:
testuser@example.com
Enter global API key:
superlongapikey
```
```bash
wrangler config --api-key
Enter email:
testuser@example.com
Enter global API key:
superlongapikey
```

You can also [use environment variables](https://developers.cloudflare.com/workers/tooling/wrangler/configuration/) to configure these values.
You can also [use environment variables](https://developers.cloudflare.com/workers/tooling/wrangler/configuration/) to configure these values.

### ☁️ 🆙 `publish`

Publish your Worker to Cloudflare. Several keys in your `wrangler.toml` determine whether you are publishing to a workers.dev subdomain or your own registered domain, proxied through Cloudflare.
Publish your Worker to Cloudflare. Several keys in your `wrangler.toml` determine whether you are publishing to a workers.dev subdomain or your own registered domain, proxied through Cloudflare.

Additionally, you can configure different [environments](https://developers.cloudflare.com/workers/tooling/wrangler/configuration/environments).
Additionally, you can configure different [environments](https://developers.cloudflare.com/workers/tooling/wrangler/configuration/environments).

You can also use environment variables to handle authentication when you publish a Worker.
You can also use environment variables to handle authentication when you publish a Worker.

```bash
# e.g.
CF_API_TOKEN=superlongtoken wrangler publish
# where
# $CF_API_TOKEN -> your Cloudflare API token

CF_API_KEY=superlongapikey CF_EMAIL=testuser@example.com wrangler publish
# where
# $CF_API_KEY -> your Cloudflare API key
# $CF_EMAIL -> your Cloudflare account email
```
```bash
# e.g.
CF_API_TOKEN=superlongtoken wrangler publish
# where
# $CF_API_TOKEN -> your Cloudflare API token

CF_API_KEY=superlongapikey CF_EMAIL=testuser@example.com wrangler publish
# where
# $CF_API_KEY -> your Cloudflare API key
# $CF_EMAIL -> your Cloudflare account email
```

### 🗂 `kv`

Interact with your Workers KV store. This is actually a whole suite of subcommands. Read more about in [Wrangler KV Documentation](https://developers.cloudflare.com/workers/cli-wrangler/commands#kv).
Interact with your Workers KV store. This is actually a whole suite of subcommands. Read more about in [Wrangler KV Documentation](https://developers.cloudflare.com/workers/cli-wrangler/commands#kv).

### 👂 `dev`

`wrangler dev` works very similarly to `wrangler preview` except that instead of opening your browser to preview your worker, it will start a server on localhost that will execute your worker on incoming HTTP requests. From there you can use cURL, Postman, your browser, or any other HTTP client to test the behavior of your worker before publishing it.
`wrangler dev` works very similarly to `wrangler preview` except that instead of opening your browser to preview your worker, it will start a server on localhost that will execute your worker on incoming HTTP requests. From there you can use cURL, Postman, your browser, or any other HTTP client to test the behavior of your worker before publishing it.

You should run wrangler dev from your worker directory, and if your worker makes any requests to a backend, you should specify the host with `--host example.com`.
You should run wrangler dev from your worker directory, and if your worker makes any requests to a backend, you should specify the host with `--host example.com`.

From here you should be able to send HTTP requests to `localhost:8787` along with any headers and paths, and your worker should execute as expected. Additionally, you should see console.log messages and exceptions appearing in your terminal.
From here you should be able to send HTTP requests to `localhost:8787` along with any headers and paths, and your worker should execute as expected. Additionally, you should see console.log messages and exceptions appearing in your terminal.

```bash
```bash
👂 Listening on http://localhost:8787
[2020-02-18 19:37:08] GET example.com/ HTTP/1.1 200 OK
```
[2020-02-18 19:37:08] GET example.com/ HTTP/1.1 200 OK
```

All of the arguments and flags to this command are optional:
All of the arguments and flags to this command are optional:

- `env`: environment to build
- `host`: domain to test behind your worker. defaults to example.com
- `ip`: ip to listen on. defaults to localhost
- `port`: port to listen on. defaults to 8787
- `env`: environment to build
- `host`: domain to test behind your worker. defaults to example.com
- `ip`: ip to listen on. defaults to localhost
- `port`: port to listen on. defaults to 8787

## Additional Documentation

All information regarding wrangler or Cloudflare Workers is located in the [Cloudflare Workers Developer Docs](https://developers.cloudflare.com/workers/). This includes:

- Using wrangler [commands](https://developers.cloudflare.com/workers/tooling/wrangler/commands)
- Wrangler [configuration](https://developers.cloudflare.com/workers/tooling/wrangler/configuration)
- Using wrangler [commands](https://developers.cloudflare.com/workers/wrangler/commands/)
- Wrangler [configuration](https://developers.cloudflare.com/workers/wrangler/configuration)
- General documentation surrounding Workers development
- All wrangler features such as Workers Sites and KV

Expand Down
4 changes: 2 additions & 2 deletions npm/npm-shrinkwrap.json

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

2 changes: 1 addition & 1 deletion npm/package.json
@@ -1,6 +1,6 @@
{
"name": "@cloudflare/wrangler",
"version": "1.19.13",
"version": "1.20.0",
"description": "Command-line interface for all things Cloudflare Workers",
"main": "binary.js",
"scripts": {
Expand Down

0 comments on commit d91560d

Please sign in to comment.