diff --git a/.changeset/rich-bears-press.md b/.changeset/rich-bears-press.md deleted file mode 100644 index 090d6c5ff93f..000000000000 --- a/.changeset/rich-bears-press.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -"wrangler": patch ---- - -worker_metadata binding - -Added new binding `worker_metadata` in top level Wrangler config. Which will be used to provide a custom namespace for accessing your Workers -metadata from the `Env` in runtime. - -example: - -```toml -main = "./src/index.ts" -compatibility_date = "2022-09-29" -name = "website" -worker_metadata = "my-worker-metadata" -``` - -resolves #2113 diff --git a/packages/wrangler/src/__tests__/api-devregistry.test.js b/packages/wrangler/src/__tests__/api-devregistry.test.js index c5aeb0442b0c..35718fab99a8 100644 --- a/packages/wrangler/src/__tests__/api-devregistry.test.js +++ b/packages/wrangler/src/__tests__/api-devregistry.test.js @@ -1,9 +1,8 @@ import { unstable_dev } from "../api"; import { fetch } from "undici"; -jest.unmock("undici"); +// jest.unmock("undici"); -//TODO Fix Tests extremely flakey /** * a huge caveat to how testing multi-worker scripts works: * you can't shutdown the first worker you spun up, or it'll kill the devRegistry diff --git a/packages/wrangler/src/__tests__/configuration.test.ts b/packages/wrangler/src/__tests__/configuration.test.ts index 646ed96932c1..1eac11892d5c 100644 --- a/packages/wrangler/src/__tests__/configuration.test.ts +++ b/packages/wrangler/src/__tests__/configuration.test.ts @@ -69,7 +69,6 @@ describe("normalizeAndValidateConfig()", () => { dispatch_namespaces: [], usage_model: undefined, vars: {}, - metadata_binding: undefined, define: {}, wasm_modules: undefined, data_blobs: undefined, @@ -2490,7 +2489,6 @@ describe("normalizeAndValidateConfig()", () => { minify: false, node_compat: false, first_party_worker: false, - metadata_binding: "METADATA_ENV", logpush: false, }; const rawConfig: RawConfig = { @@ -2515,7 +2513,6 @@ describe("normalizeAndValidateConfig()", () => { minify: true, node_compat: true, first_party_worker: true, - metadata_binding: "METADATA_RAW", logpush: true, env: { ENV1: rawEnv, @@ -2701,7 +2698,6 @@ describe("normalizeAndValidateConfig()", () => { const kv_namespaces: RawConfig["kv_namespaces"] = []; const r2_buckets: RawConfig["r2_buckets"] = []; const unsafe: RawConfig["unsafe"] = { bindings: [] }; - const metadata_binding: RawConfig["metadata_binding"] = ""; const rawConfig: RawConfig = { define, vars, @@ -2709,7 +2705,6 @@ describe("normalizeAndValidateConfig()", () => { kv_namespaces, r2_buckets, unsafe, - metadata_binding, env: { ENV1: {}, }, @@ -2739,9 +2734,6 @@ describe("normalizeAndValidateConfig()", () => { - \\"vars\\" exists at the top level, but not on \\"env.ENV1\\". This is not what you probably want, since \\"vars\\" is not inherited by environments. Please add \\"vars\\" to \\"env.ENV1\\". - - \\"metadata_binding\\" exists at the top level, but not on \\"env.ENV1\\". - This is not what you probably want, since \\"metadata_binding\\" is not inherited by environments. - Please add \\"metadata_binding\\" to \\"env.ENV1\\". - \\"define\\" exists at the top level, but not on \\"env.ENV1\\". This is not what you probably want, since \\"define\\" is not inherited by environments. Please add \\"define\\" to \\"env.ENV1\\". @@ -3979,45 +3971,6 @@ describe("normalizeAndValidateConfig()", () => { expect(result2.diagnostics.hasWarnings()).toBe(false); }); }); - describe("[metadata_binding]", () => { - it("should error if metadata_binding is a number", () => { - const { diagnostics } = normalizeAndValidateConfig( - { env: { ENV1: { metadata_binding: 999 } } } as unknown as RawConfig, - undefined, - { env: "ENV1" } - ); - - expect(diagnostics.renderWarnings()).toMatchInlineSnapshot(` - "Processing wrangler configuration: - " - `); - expect(diagnostics.renderErrors()).toMatchInlineSnapshot(` - "Processing wrangler configuration: - - - \\"env.ENV1\\" environment configuration - - Expected \\"metadata_binding\\" to be of type string but got 999." - `); - }); - - it("should error if metadata_binding is null", () => { - const { diagnostics } = normalizeAndValidateConfig( - { env: { ENV1: { metadata_binding: null } } } as unknown as RawConfig, - undefined, - { env: "ENV1" } - ); - - expect(diagnostics.renderWarnings()).toMatchInlineSnapshot(` - "Processing wrangler configuration: - " - `); - expect(diagnostics.renderErrors()).toMatchInlineSnapshot(` - "Processing wrangler configuration: - - - \\"env.ENV1\\" environment configuration - - Expected \\"metadata_binding\\" to be of type string but got null." - `); - }); - }); }); }); diff --git a/packages/wrangler/src/__tests__/deployments.test.ts b/packages/wrangler/src/__tests__/deployments.test.ts index 504d023e2480..f9d0dc150aad 100644 --- a/packages/wrangler/src/__tests__/deployments.test.ts +++ b/packages/wrangler/src/__tests__/deployments.test.ts @@ -58,13 +58,11 @@ describe("deployments", () => { Deployment ID: Intrepid-Class - Deployment number: NCC-74656 Created on: 2021-02-02T00:00:00.000000Z Author: Kathryn-Janeway@federation.org Source: Wrangler Deployment ID: Galaxy-Class - Deployment number: 1701-E Created on: 2021-01-01T00:00:00.000000Z Author: Jean-Luc-Picard@federation.org Source: Wrangler @@ -79,13 +77,11 @@ describe("deployments", () => { Deployment ID: Intrepid-Class - Deployment number: NCC-74656 Created on: 2021-02-02T00:00:00.000000Z Author: Kathryn-Janeway@federation.org Source: Wrangler Deployment ID: Galaxy-Class - Deployment number: 1701-E Created on: 2021-01-01T00:00:00.000000Z Author: Jean-Luc-Picard@federation.org Source: Wrangler diff --git a/packages/wrangler/src/__tests__/publish.test.ts b/packages/wrangler/src/__tests__/publish.test.ts index abcd8970e469..25df880dfd80 100644 --- a/packages/wrangler/src/__tests__/publish.test.ts +++ b/packages/wrangler/src/__tests__/publish.test.ts @@ -107,7 +107,7 @@ describe("publish", () => { Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); }); }); @@ -144,7 +144,7 @@ describe("publish", () => { Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.warn).toMatchInlineSnapshot(`""`); expect(std.err).toMatchInlineSnapshot(`""`); @@ -166,7 +166,7 @@ describe("publish", () => { Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.warn).toMatchInlineSnapshot(` "▲ [WARNING] It looks like you have used Wrangler 1's \`config\` command to login with an API token. @@ -207,7 +207,7 @@ describe("publish", () => { Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -232,7 +232,7 @@ describe("publish", () => { Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -335,7 +335,7 @@ describe("publish", () => { Uploaded test-name-some-env (TIMINGS) Published test-name-some-env (TIMINGS) https://test-name-some-env.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -355,7 +355,7 @@ describe("publish", () => { Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -375,7 +375,7 @@ describe("publish", () => { Uploaded test-name-some-env (TIMINGS) Published test-name-some-env (TIMINGS) https://test-name-some-env.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -395,7 +395,7 @@ describe("publish", () => { Uploaded test-name-some-env (TIMINGS) Published test-name-some-env (TIMINGS) https://test-name-some-env.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -466,7 +466,7 @@ describe("publish", () => { Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -493,7 +493,7 @@ describe("publish", () => { Uploaded test-name (some-env) (TIMINGS) Published test-name (some-env) (TIMINGS) https://some-env.test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -540,7 +540,7 @@ describe("publish", () => { Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -575,7 +575,7 @@ describe("publish", () => { Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "▲ [WARNING] Processing wrangler.toml configuration: - The \\"route\\" field in your configuration is an empty string and will be ignored. @@ -626,7 +626,7 @@ describe("publish", () => { *another-boring-website.com (zone name: some-zone.com) example.com/some-route/* (zone id: JGHFHG654gjcj) more-examples.com/* - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "", } `); @@ -688,7 +688,7 @@ describe("publish", () => { *another-boring-website.com (zone name: some-zone.com) example.com/some-route/* (zone id: JGHFHG654gjcj) more-examples.com/* - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "▲ [WARNING] Processing wrangler.toml configuration: - Experimental: Service environments are in beta, and their behaviour is guaranteed to change in @@ -791,7 +791,7 @@ describe("publish", () => { Uploaded test-name (TIMINGS) Published test-name (TIMINGS) example.com/some-route/* - Current Deployment: 2" + Current Deployment ID: undefined" `); }); @@ -1072,7 +1072,7 @@ Update them to point to this script instead?`, Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -1090,7 +1090,7 @@ Update them to point to this script instead?`, Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -1108,7 +1108,7 @@ Update them to point to this script instead?`, Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -1128,7 +1128,7 @@ Update them to point to this script instead?`, Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -1146,7 +1146,7 @@ Update them to point to this script instead?`, Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -1183,7 +1183,7 @@ Update them to point to this script instead?`, Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -1234,7 +1234,7 @@ Update them to point to this script instead?`, Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -1254,7 +1254,7 @@ Update them to point to this script instead?`, Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -1286,7 +1286,7 @@ export default{ Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -1304,7 +1304,7 @@ export default{ Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -1399,7 +1399,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -1482,7 +1482,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "▲ [WARNING] Processing wrangler.toml configuration: - Deprecation: \\"site.entry-point\\": @@ -1535,7 +1535,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(normalizeSlashes(std.warn)).toMatchInlineSnapshot(` @@ -1625,7 +1625,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "▲ [WARNING] The --assets argument is experimental and may change or break at any time @@ -1674,7 +1674,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -1715,7 +1715,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "▲ [WARNING] The --assets argument is experimental and may change or break at any time ", @@ -1900,7 +1900,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "▲ [WARNING] The --assets argument is experimental and may change or break at any time ", @@ -1947,7 +1947,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "▲ [WARNING] Processing wrangler.toml configuration: - \\"assets\\" fields are experimental and may change or break at any time. @@ -2004,7 +2004,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -2062,7 +2062,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -2114,7 +2114,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -2164,7 +2164,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (some-env) (TIMINGS) Published test-name (some-env) (TIMINGS) https://some-env.test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -2215,7 +2215,7 @@ addEventListener('fetch', event => {});` Uploaded test-name-some-env (TIMINGS) Published test-name-some-env (TIMINGS) https://test-name-some-env.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -2259,7 +2259,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -2300,7 +2300,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -2341,7 +2341,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -2383,7 +2383,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -2425,7 +2425,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -2467,7 +2467,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -2509,7 +2509,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -2553,7 +2553,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -2601,7 +2601,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -2751,7 +2751,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "", } `); @@ -2851,7 +2851,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -2906,7 +2906,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -2948,7 +2948,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "", } `); @@ -2991,7 +2991,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "▲ [WARNING] The --assets argument is experimental and may change or break at any time ", @@ -3014,7 +3014,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -3035,7 +3035,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -3055,7 +3055,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -3074,7 +3074,7 @@ addEventListener('fetch', event => {});` "Total Upload: xx KiB / gzip: xx KiB Uploaded test-name (TIMINGS) No publish targets for test-name (TIMINGS) - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -3095,7 +3095,7 @@ addEventListener('fetch', event => {});` "Total Upload: xx KiB / gzip: xx KiB Uploaded test-name (TIMINGS) No publish targets for test-name (TIMINGS) - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -3120,7 +3120,7 @@ addEventListener('fetch', event => {});` "Total Upload: xx KiB / gzip: xx KiB Uploaded test-name (dev) (TIMINGS) No publish targets for test-name (dev) (TIMINGS) - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -3146,7 +3146,7 @@ addEventListener('fetch', event => {});` "Total Upload: xx KiB / gzip: xx KiB Uploaded test-name (dev) (TIMINGS) No publish targets for test-name (dev) (TIMINGS) - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -3173,7 +3173,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (dev) (TIMINGS) Published test-name (dev) (TIMINGS) https://dev.test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -3201,7 +3201,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (dev) (TIMINGS) Published test-name (dev) (TIMINGS) https://dev.test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -3230,7 +3230,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (dev) (TIMINGS) Published test-name (dev) (TIMINGS) https://dev.test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -3262,7 +3262,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (dev) (TIMINGS) Published test-name (dev) (TIMINGS) https://dev.test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -3296,7 +3296,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (dev) (TIMINGS) Published test-name (dev) (TIMINGS) https://dev.test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -3357,7 +3357,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -3376,7 +3376,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -3419,7 +3419,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) http://example.com/* - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -3454,7 +3454,7 @@ addEventListener('fetch', event => {});` Uploaded test-name-production (TIMINGS) Published test-name-production (TIMINGS) http://production.example.com/* - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -3488,7 +3488,7 @@ addEventListener('fetch', event => {});` Uploaded test-name-production (TIMINGS) Published test-name-production (TIMINGS) http://production.example.com/* - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -3516,7 +3516,7 @@ addEventListener('fetch', event => {});` Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev http://example.com/* - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -3552,7 +3552,7 @@ addEventListener('fetch', event => {});` Published test-name-production (TIMINGS) https://test-name-production.test-sub-domain.workers.dev http://production.example.com/* - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -3588,7 +3588,7 @@ addEventListener('fetch', event => {});` Published test-name-production (TIMINGS) https://test-name-production.test-sub-domain.workers.dev http://production.example.com/* - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -3623,7 +3623,7 @@ addEventListener('fetch', event => {});` Uploaded test-name-production (TIMINGS) Published test-name-production (TIMINGS) http://production.example.com/* - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -3658,7 +3658,7 @@ addEventListener('fetch', event => {});` Uploaded test-name-production (TIMINGS) Published test-name-production (TIMINGS) http://production.example.com/* - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -3810,7 +3810,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -3836,7 +3836,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -3943,7 +3943,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -3983,7 +3983,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (testEnv) (TIMINGS) Published test-name (testEnv) (TIMINGS) https://testEnv.test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -4011,7 +4011,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -4062,7 +4062,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -4107,7 +4107,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -4159,7 +4159,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "", } `); @@ -4204,7 +4204,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "", } `); @@ -4251,7 +4251,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -4315,7 +4315,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (xyz) (TIMINGS) Published test-name (xyz) (TIMINGS) https://xyz.test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -4382,7 +4382,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "▲ [WARNING] Processing wrangler.toml configuration: - Experimental: Service environments are in beta, and their behaviour is guaranteed to change in @@ -4452,7 +4452,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (xyz) (TIMINGS) Published test-name (xyz) (TIMINGS) https://xyz.test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "▲ [WARNING] Processing wrangler.toml configuration: - Experimental: Service environments are in beta, and their behaviour is guaranteed to change in @@ -4671,7 +4671,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -5052,7 +5052,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -5123,7 +5123,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -5157,7 +5157,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -5195,7 +5195,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -5270,7 +5270,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -5308,7 +5308,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -5383,7 +5383,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -5427,7 +5427,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -5451,7 +5451,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "", } `); @@ -5480,7 +5480,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -5533,7 +5533,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -5580,7 +5580,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -5621,7 +5621,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -5667,7 +5667,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -5731,7 +5731,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -5774,7 +5774,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -5821,7 +5821,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -5865,7 +5865,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -5882,33 +5882,6 @@ addEventListener('fetch', event => {});` `); }); }); - - describe("[metadata_binding]", () => { - it("should pass metadata binding to backend", async () => { - writeWranglerToml({ - metadata_binding: "nasm_A19750603000", - }); - writeWorkerSource(); - mockSubDomainRequest(); - mockUploadWorkerRequest({ - expectedBindings: [{ name: "nasm_A19750603000", type: "metadata" }], - }); - - await runWrangler("publish index.js"); - expect(std.out).toMatchInlineSnapshot(` - "Total Upload: xx KiB / gzip: xx KiB - Your worker has access to the following bindings: - - Metadata Binding: - - metadata: nasm_A19750603000 - Uploaded test-name (TIMINGS) - Published test-name (TIMINGS) - https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" - `); - expect(std.err).toMatchInlineSnapshot(`""`); - expect(std.warn).toMatchInlineSnapshot(`""`); - }); - }); }); describe("upload rules", () => { @@ -5939,7 +5912,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -5969,7 +5942,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -6003,7 +5976,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -6053,7 +6026,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -6151,7 +6124,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -6182,7 +6155,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -6212,7 +6185,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -6244,7 +6217,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` @@ -6274,7 +6247,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(`""`); @@ -6316,7 +6289,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "", } `); @@ -6347,7 +6320,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "", } `); @@ -6371,7 +6344,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "", } `); @@ -6516,7 +6489,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "", } `); @@ -6912,7 +6885,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2", + Current Deployment ID: undefined", "warn": "", } `); @@ -6975,7 +6948,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); }); @@ -7012,7 +6985,7 @@ addEventListener('fetch', event => {});` Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev Consumer for queue1 - Current Deployment: 2" + Current Deployment ID: undefined" `); }); @@ -7084,7 +7057,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -7109,7 +7082,7 @@ addEventListener('fetch', event => {});` Uploaded test-name (TIMINGS) Published test-name (TIMINGS) https://test-name.test-sub-domain.workers.dev - Current Deployment: 2" + Current Deployment ID: undefined" `); expect(std.err).toMatchInlineSnapshot(`""`); }); diff --git a/packages/wrangler/src/config/environment.ts b/packages/wrangler/src/config/environment.ts index 442430a427a0..b1e84f787e86 100644 --- a/packages/wrangler/src/config/environment.ts +++ b/packages/wrangler/src/config/environment.ts @@ -290,14 +290,6 @@ interface EnvironmentNonInheritable { */ vars: { [key: string]: unknown }; - /** - * Specifies namespace binding that is bound to this Worker environment. - * It allows for access at runtime to the Workers metadata. - * @default `undefined` - * @nonInheritable - **/ - metadata_binding: string | undefined; - /** * A list of durable objects that your worker should be bound to. * diff --git a/packages/wrangler/src/config/index.ts b/packages/wrangler/src/config/index.ts index 1681e0920236..9ec602279e09 100644 --- a/packages/wrangler/src/config/index.ts +++ b/packages/wrangler/src/config/index.ts @@ -96,7 +96,6 @@ export function printBindings(bindings: CfWorkerInit["bindings"]) { text_blobs, unsafe, vars, - metadata_binding, wasm_modules, dispatch_namespaces, } = bindings; @@ -252,13 +251,6 @@ export function printBindings(bindings: CfWorkerInit["bindings"]) { }); } - if (metadata_binding !== undefined && metadata_binding.length > 0) { - output.push({ - type: "Metadata Binding", - entries: [{ key: "metadata", value: metadata_binding }], - }); - } - if (wasm_modules !== undefined && Object.keys(wasm_modules).length > 0) { output.push({ type: "Wasm Modules", diff --git a/packages/wrangler/src/config/validation.ts b/packages/wrangler/src/config/validation.ts index 5a05b9dcb43e..8c245b4a41cc 100644 --- a/packages/wrangler/src/config/validation.ts +++ b/packages/wrangler/src/config/validation.ts @@ -1043,16 +1043,6 @@ function normalizeAndValidateEnvironment( validateVars(envName), {} ), - metadata_binding: notInheritable( - diagnostics, - topLevelEnv, - rawConfig, - rawEnv, - envName, - "metadata_binding", - isString, - undefined - ), define: notInheritable( diagnostics, topLevelEnv, diff --git a/packages/wrangler/src/create-worker-upload-form.ts b/packages/wrangler/src/create-worker-upload-form.ts index f7af547cf776..6bbc3a38d9ac 100644 --- a/packages/wrangler/src/create-worker-upload-form.ts +++ b/packages/wrangler/src/create-worker-upload-form.ts @@ -48,8 +48,7 @@ type WorkerMetadataBinding = type: "logfwdr"; name: string; destination: string; - } - | { type: "metadata"; name: string }; + }; export interface WorkerMetadata { /** The name of the entry point module. Only exists when the worker is in the ES module format */ @@ -86,13 +85,6 @@ export function createWorkerUploadForm(worker: CfWorkerInit): FormData { const metadataBindings: WorkerMetadata["bindings"] = []; - if (bindings.metadata_binding) { - metadataBindings.push({ - name: bindings.metadata_binding, - type: "metadata", - }); - } - Object.entries(bindings.vars || {})?.forEach(([key, value]) => { if (typeof value === "string") { metadataBindings.push({ name: key, type: "plain_text", text: value }); diff --git a/packages/wrangler/src/deployments.ts b/packages/wrangler/src/deployments.ts index 44026f5815aa..f821d7c4d517 100644 --- a/packages/wrangler/src/deployments.ts +++ b/packages/wrangler/src/deployments.ts @@ -47,7 +47,6 @@ export async function deployments( const versionMessages = deploys.map( (versions) => `\nDeployment ID: ${versions.id} -Deployment number: ${versions.number} Created on: ${versions.metadata.created_on} Author: ${versions.metadata.author_email} Source: ${sourceStr(versions.metadata.source)}\n` diff --git a/packages/wrangler/src/dev.tsx b/packages/wrangler/src/dev.tsx index d60513605430..1e851c36b51f 100644 --- a/packages/wrangler/src/dev.tsx +++ b/packages/wrangler/src/dev.tsx @@ -822,7 +822,6 @@ async function getBindings( ...getVarsForDev(configParam, env), ...args.vars, }, - metadata_binding: configParam.metadata_binding, wasm_modules: configParam.wasm_modules, text_blobs: configParam.text_blobs, data_blobs: configParam.data_blobs, diff --git a/packages/wrangler/src/publish/publish.ts b/packages/wrangler/src/publish/publish.ts index 0a2e4de25912..6688d8f3a783 100644 --- a/packages/wrangler/src/publish/publish.ts +++ b/packages/wrangler/src/publish/publish.ts @@ -524,7 +524,6 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m : [] ), vars: { ...config.vars, ...props.vars }, - metadata_binding: config.metadata_binding, wasm_modules: config.wasm_modules, text_blobs: { ...config.text_blobs, @@ -825,7 +824,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m `/accounts/${accountId}/workers/versions/by-script/${scriptTag}` ); - logger.log("Current Deployment:", deploymentsList.latest.number); + logger.log("Current Deployment ID:", deploymentsList.latest.id); } catch (e) { if ((e as { code: number }).code === 10023) { // TODO: remove this try/catch once versions is completely rolled out diff --git a/packages/wrangler/src/secret/index.ts b/packages/wrangler/src/secret/index.ts index 2d95d1421c13..1c0838dcfc95 100644 --- a/packages/wrangler/src/secret/index.ts +++ b/packages/wrangler/src/secret/index.ts @@ -103,7 +103,6 @@ export const secret = (secretYargs: Argv) => { bindings: { kv_namespaces: [], vars: {}, - metadata_binding: undefined, durable_objects: { bindings: [] }, queues: [], r2_buckets: [], diff --git a/packages/wrangler/src/worker.ts b/packages/wrangler/src/worker.ts index d54ad2051437..bec00e4bd4a1 100644 --- a/packages/wrangler/src/worker.ts +++ b/packages/wrangler/src/worker.ts @@ -194,7 +194,6 @@ export interface CfWorkerInit { */ bindings: { vars: CfVars | undefined; - metadata_binding: string | undefined; kv_namespaces: CfKvNamespace[] | undefined; wasm_modules: CfWasmModuleBindings | undefined; text_blobs: CfTextBlobBindings | undefined;