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

Better messaging in dev console #7986

Merged
merged 6 commits into from
Feb 6, 2025
Merged

Conversation

andyjessop
Copy link
Contributor

@andyjessop andyjessop commented Jan 31, 2025

Fixes #000.

In the developer's console output:

  • adds "[Simulated Locally]" to local bindings
  • adds "[Connected to Remote Resource]" to remote bindings
  • adds explanation after Wrangler banner explaining that the resources are simulated locally via Miniflare.
  • adds link to doc
    add brief explanation of --remote flag and link to relevant doc.
    e.g.
⛅️ wrangler 3.102.0
--------------------------------------------------------

Your Worker and resources are simulated locally via Miniflare. For more information, see: https://developers.cloudflare.com/workers/testing/local-development/#develop-using-remote-resources-and-bindings

Your Worker has access to the following bindings:

Durable Objects:
  - MY_DO: MyDo [Simulated locally]
KV Namespaces:
  - MY_KV: c8dsdfhh258c94d91239ed7nj6f33e163 [Simulated locally]
Vectorize Indexes:
  - MY_INDEX: my-index [Connected to Remote Resource]
Use "wrangler dev --remote" to run both your Worker and all bindings remotely
  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because:
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because:
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: This is documentation in itself.

Copy link

changeset-bot bot commented Jan 31, 2025

🦋 Changeset detected

Latest commit: 630a1ff

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

This PR includes changesets to release 2 packages
Name Type
wrangler Patch
@cloudflare/vitest-pool-workers 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

Copy link
Contributor

github-actions bot commented Jan 31, 2025

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

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13180983373/npm-package-wrangler-7986

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

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7986/npm-package-wrangler-7986

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13180983373/npm-package-wrangler-7986 dev path/to/script.js
Additional artifacts:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13180983373/npm-package-cloudflare-workers-bindings-extension-7986 -O ./cloudflare-workers-bindings-extension.0.0.0-vdadd48691.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vdadd48691.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13180983373/npm-package-create-cloudflare-7986 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13180983373/npm-package-cloudflare-kv-asset-handler-7986

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13180983373/npm-package-miniflare-7986

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13180983373/npm-package-cloudflare-pages-shared-7986

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13180983373/npm-package-cloudflare-unenv-preset-7986

@cloudflare/vite-plugin:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13180983373/npm-package-cloudflare-vite-plugin-7986

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13180983373/npm-package-cloudflare-vitest-pool-workers-7986

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13180983373/npm-package-cloudflare-workers-editor-shared-7986

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13180983373/npm-package-cloudflare-workers-shared-7986

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13180983373/npm-package-cloudflare-workflows-shared-7986

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.107.3 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20250129.0
workerd 1.20250204.0 1.20250204.0
workerd --version 1.20250204.0 2025-02-04

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@andyjessop andyjessop force-pushed the aj/local-dev-console-improvements branch from f085b4c to 0445eb5 Compare February 3, 2025 14:00
@andyjessop andyjessop marked this pull request as ready for review February 3, 2025 14:03
@andyjessop andyjessop requested a review from a team as a code owner February 3, 2025 14:03
@andyjessop andyjessop added the e2e Run e2e tests on a PR label Feb 3, 2025
@andyjessop andyjessop force-pushed the aj/local-dev-console-improvements branch 4 times, most recently from 22145c1 to 7153b16 Compare February 4, 2025 08:06
packages/wrangler/src/utils/print-bindings.ts Outdated Show resolved Hide resolved
packages/wrangler/src/utils/print-bindings.ts Outdated Show resolved Hide resolved
packages/wrangler/src/utils/print-bindings.ts Outdated Show resolved Hide resolved
packages/wrangler/src/utils/print-bindings.ts Show resolved Hide resolved
packages/wrangler/src/utils/print-bindings.ts Outdated Show resolved Hide resolved
packages/wrangler/src/utils/print-bindings.ts Show resolved Hide resolved
@petebacondarwin
Copy link
Contributor

Looks like the e2e tests failed snapshots that were missing an extra blank line?

@andyjessop andyjessop force-pushed the aj/local-dev-console-improvements branch from 1812ff0 to 08e80df Compare February 6, 2025 09:45
@andyjessop andyjessop force-pushed the aj/local-dev-console-improvements branch from 592978c to d56f91f Compare February 6, 2025 14:16
Comment on lines +120 to +122
clearHistory() {
this.onceHistory.clear();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Love this!

@andyjessop andyjessop merged commit 88514c8 into main Feb 6, 2025
29 checks passed
@andyjessop andyjessop deleted the aj/local-dev-console-improvements branch February 6, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e tests on a PR
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants