INNER CODE UNIT · TypeScript

promise

cloudflare/miniflare · packages/core/src/index.ts:949

    const promise = this.#watcherCallbackMutex!.runWith(async () => {
      // If wrangler config changed, re-init any changed plugins
      if (eventPath === this.#wranglerConfigPath) {
        await this.#init();
      }

      // Re-run hooks that returned the paths to watch originally
      let ranBeforeSetup = false;
      for (const [name] of this.#plugins) {
        if (this.#beforeSetupWatch!.get(name)?.has(eventPath)) {
          await this.#runBeforeSetup(name);
          ranBeforeSetup = true;

          // Ignore script updates for 1s
          this.#ignoreScriptUpdates = true;
          clearTimeout(this.#ignoreScriptUpdatesTimeout);
          this.#ignoreScriptUpdatesTimeout = setTimeout(
            () => (this.#ignoreScriptUpdates = false),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…