@absolutejs/absolute 0.19.0-beta.461 → 0.19.0-beta.462

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/index.js CHANGED
@@ -180959,11 +180959,12 @@ var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avi
180959
180959
  avifInProgress.delete(avifKey);
180960
180960
  }
180961
180961
  });
180962
- }, imageOptimizer = (config, buildDir) => (app) => {
180962
+ }, imageOptimizer = (config, buildDir) => {
180963
+ const plugin = new Elysia2({ name: "image-optimizer" });
180963
180964
  if (!config && config !== undefined)
180964
- return app;
180965
+ return plugin;
180965
180966
  if (config?.unoptimized)
180966
- return app;
180967
+ return plugin;
180967
180968
  const endpointPath = config?.path ?? OPTIMIZATION_ENDPOINT;
180968
180969
  const allowedSizes = new Set([
180969
180970
  ...config?.deviceSizes ?? DEFAULT_DEVICE_SIZES,
@@ -180975,7 +180976,7 @@ var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avi
180975
180976
  const configuredFormats = config?.formats ?? ["webp"];
180976
180977
  const remotePatterns = config?.remotePatterns ?? [];
180977
180978
  const cacheDir = getCacheDir(buildDir);
180978
- const plugin = new Elysia2({ name: "image-optimizer" }).get(endpointPath, async ({ query, request }) => {
180979
+ return plugin.get(endpointPath, async ({ query, request }) => {
180979
180980
  const parsed = parseQueryParams(query, allowedSizes, defaultQuality);
180980
180981
  if ("error" in parsed)
180981
180982
  return parsed.error;
@@ -181047,7 +181048,6 @@ var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avi
181047
181048
  }
181048
181049
  });
181049
181050
  });
181050
- return app.use(plugin);
181051
181051
  };
181052
181052
  var init_imageOptimizer = __esm(() => {
181053
181053
  init_imageProcessing();
@@ -188609,5 +188609,5 @@ export {
188609
188609
  ANGULAR_INIT_TIMEOUT_MS
188610
188610
  };
188611
188611
 
188612
- //# debugId=15C7CEABE55F554864756E2164756E21
188612
+ //# debugId=638BBFFC66CA51C564756E2164756E21
188613
188613
  //# sourceMappingURL=index.js.map