@base44-preview/cli 0.3.2-pr.696.f34150b → 0.3.2-pr.699.00cdc4d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -255438,7 +255438,6 @@ var deno2 = Object.freeze({
255438
255438
  });
255439
255439
  globalThis.Deno = deno2;
255440
255440
  globalThis.Buffer = Buffer2;
255441
- if (typeof process !== "undefined") process.version = "v22.23.4";
255442
255441
  try {
255443
255442
  new AsyncLocalStorage().enterWith(void 0);
255444
255443
  } catch {
@@ -256820,20 +256819,30 @@ var Actor = class _Actor extends Server {
256820
256819
  handlePlatformEvent(_event) {
256821
256820
  }
256822
256821
  takenPlatformEvents = [];
256822
+ platformEventsInFlight = /* @__PURE__ */ new Map();
256823
256823
  static REMEMBERED_PLATFORM_EVENTS = 64;
256824
256824
  // Called by the generated wrapper for a verified POST .../events; never user-facing.
256825
256825
  async _b44PlatformEvent(request) {
256826
256826
  const room = request.headers.get("x-partykit-room");
256827
256827
  if (room) await this.setName(room);
256828
256828
  const event = await request.json();
256829
- if (!this.takenPlatformEvents.includes(event.event_id)) {
256830
- await this.handlePlatformEvent(event);
256831
- this.takenPlatformEvents.push(event.event_id);
256832
- if (this.takenPlatformEvents.length > _Actor.REMEMBERED_PLATFORM_EVENTS) this.takenPlatformEvents.shift();
256833
- await this.maintainTicker();
256829
+ const eventId = event.event_id;
256830
+ if (!this.takenPlatformEvents.includes(eventId)) {
256831
+ let delivery = this.platformEventsInFlight.get(eventId);
256832
+ if (!delivery) {
256833
+ delivery = this.takePlatformEvent(event).finally(() => this.platformEventsInFlight.delete(eventId));
256834
+ this.platformEventsInFlight.set(eventId, delivery);
256835
+ }
256836
+ await delivery;
256834
256837
  }
256835
256838
  return new Response(null, { status: 204 });
256836
256839
  }
256840
+ async takePlatformEvent(event) {
256841
+ await this.handlePlatformEvent(event);
256842
+ this.takenPlatformEvents.push(event.event_id);
256843
+ if (this.takenPlatformEvents.length > _Actor.REMEMBERED_PLATFORM_EVENTS) this.takenPlatformEvents.shift();
256844
+ await this.maintainTicker();
256845
+ }
256837
256846
  async schedule(key, at) {
256838
256847
  const when = typeof at === "number" ? at : at.getTime();
256839
256848
  await this.mutateSchedules((m) => {
@@ -258574,7 +258583,7 @@ var TELEMETRY_PATCH = [
258574
258583
  var TELEMETRY_STORE_FIELDS = "reqId: crypto.randomUUID(), respondedAt: null, inflight: new Map(), inflightTotal: 0, hadRejection: false, hadNonOk: false, logBudget: 5";
258575
258584
 
258576
258585
  // ../functions-compiler/src/version.ts
258577
- var COMPILER_VERSION = "0.3.0-beta.3";
258586
+ var COMPILER_VERSION = "0.3.0";
258578
258587
 
258579
258588
  // ../functions-compiler/src/worker-entry.ts
258580
258589
  function denoShimSource() {
@@ -275204,4 +275213,4 @@ export {
275204
275213
  runCLI
275205
275214
  };
275206
275215
 
275207
- //# debugId=C927D843652FACCF64756E2164756E21
275216
+ //# debugId=CB629F837A2727B764756E2164756E21