Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Non-interactive mode #712

Merged
merged 1 commit into from
Mar 28, 2022
Merged

feat: Non-interactive mode #712

merged 1 commit into from
Mar 28, 2022

Conversation

threepointone
Copy link
Contributor

Continuing the work from #325, this detects when wrangler is running inside an environment where "raw" mode is not available on stdin, and disables the features for hot keys and the shortcut bar. This also adds stubs for testing local mode functionality in local-mode-tests, and deletes the previous hacky dev2.test.tsx.

Fixes #322

@changeset-bot
Copy link

changeset-bot bot commented Mar 27, 2022

🦋 Changeset detected

Latest commit: 1cdc470

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Mar 27, 2022

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/2048067903/npm-package-wrangler-712

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/712/npm-package-wrangler-712

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/2048067903/npm-package-wrangler-712 dev path/to/script.js

@threepointone threepointone force-pushed the local-mode-tests branch 2 times, most recently from f0d93ea to d11662b Compare March 27, 2022 14:31
Continuing the work from #325, this detects when wrangler is running inside an environment where "raw" mode is not available on stdin, and disables the features for hot keys and the shortcut bar. This also adds stubs for testing local mode functionality in `local-mode-tests`, and deletes the previous hacky `dev2.test.tsx`.

Fixes #322
"description": "",
"main": "index.js",
"scripts": {
"test": "npx jest --forceExit"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is forceExit still needed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately yes. Something about our script that hangs on windows even when we try to kill it. I'll investigate that separately when making a first class api for calling this in tests.

@threepointone threepointone merged commit fb53fda into main Mar 28, 2022
@threepointone threepointone deleted the local-mode-tests branch March 28, 2022 11:08
@github-actions github-actions bot mentioned this pull request Mar 28, 2022
mrbbot added a commit that referenced this pull request Oct 31, 2023
* Add Content-Length and FixedLengthStream to R2 get response

Before this, we would see that the following code wouldn't work:
```
  const res = await env.BUCKET.get(name);
  await env.BUCKET.put(name, res!.body);
```

As it would throw:
	TypeError: Provided readable stream must have a known length (request/response body or readable half of FixedLengthStream)

* Test fixed length R2 get responses

---------

Co-authored-by: bcoll <[email protected]>
mrbbot added a commit that referenced this pull request Nov 1, 2023
* Add Content-Length and FixedLengthStream to R2 get response

Before this, we would see that the following code wouldn't work:
```
  const res = await env.BUCKET.get(name);
  await env.BUCKET.put(name, res!.body);
```

As it would throw:
	TypeError: Provided readable stream must have a known length (request/response body or readable half of FixedLengthStream)

* Test fixed length R2 get responses

---------

Co-authored-by: bcoll <[email protected]>
mrbbot added a commit that referenced this pull request Nov 1, 2023
* Add Content-Length and FixedLengthStream to R2 get response

Before this, we would see that the following code wouldn't work:
```
  const res = await env.BUCKET.get(name);
  await env.BUCKET.put(name, res!.body);
```

As it would throw:
	TypeError: Provided readable stream must have a known length (request/response body or readable half of FixedLengthStream)

* Test fixed length R2 get responses

---------

Co-authored-by: bcoll <[email protected]>
mrbbot added a commit that referenced this pull request Nov 1, 2023
* Add Content-Length and FixedLengthStream to R2 get response

Before this, we would see that the following code wouldn't work:
```
  const res = await env.BUCKET.get(name);
  await env.BUCKET.put(name, res!.body);
```

As it would throw:
	TypeError: Provided readable stream must have a known length (request/response body or readable half of FixedLengthStream)

* Test fixed length R2 get responses

---------

Co-authored-by: bcoll <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running wrangler dev from an E2E test throws Ink errors
2 participants