@peaje/next 0.2.2 → 0.2.3

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.d.cts CHANGED
@@ -26,9 +26,8 @@ type RewritesObjeto = {
26
26
  type ResultadoRewrites = ReglaRewrite[] | RewritesObjeto;
27
27
  type ConfigConRewrites = {
28
28
  rewrites?: () => ResultadoRewrites | Promise<ResultadoRewrites>;
29
- [clave: string]: unknown;
30
29
  };
31
- type ConfigOFuncion<C extends ConfigConRewrites = ConfigConRewrites> = C | ((phase: string, contexto: {
30
+ type ConfigOFuncion<C extends object = ConfigConRewrites> = C | ((phase: string, contexto: {
32
31
  defaultConfig: unknown;
33
32
  }) => C | Promise<C>);
34
33
  /** Base `${gateway}/${slug}` sin barra final, con el env como override. */
@@ -43,6 +42,6 @@ declare function fusionarRewrites(previo: ResultadoRewrites | undefined, reglas:
43
42
  * Acepta la config como objeto o como función `(phase, { defaultConfig })`,
44
43
  * y un `rewrites()` sync o async que devuelva array u objeto.
45
44
  */
46
- declare function withPeaje<C extends ConfigConRewrites>(nextConfig: ConfigOFuncion<C>, opciones: OpcionesPeaje): ConfigOFuncion<C>;
45
+ declare function withPeaje<C extends object>(nextConfig: ConfigOFuncion<C>, opciones: OpcionesPeaje): ConfigOFuncion<C>;
47
46
 
48
47
  export { type ConfigConRewrites, type ConfigOFuncion, GATEWAY_POR_DEFECTO, type OpcionesPeaje, type ReglaRewrite, type ResultadoRewrites, type RewritesObjeto, baseDe, withPeaje as default, fusionarRewrites, withPeaje };
package/dist/index.d.ts CHANGED
@@ -26,9 +26,8 @@ type RewritesObjeto = {
26
26
  type ResultadoRewrites = ReglaRewrite[] | RewritesObjeto;
27
27
  type ConfigConRewrites = {
28
28
  rewrites?: () => ResultadoRewrites | Promise<ResultadoRewrites>;
29
- [clave: string]: unknown;
30
29
  };
31
- type ConfigOFuncion<C extends ConfigConRewrites = ConfigConRewrites> = C | ((phase: string, contexto: {
30
+ type ConfigOFuncion<C extends object = ConfigConRewrites> = C | ((phase: string, contexto: {
32
31
  defaultConfig: unknown;
33
32
  }) => C | Promise<C>);
34
33
  /** Base `${gateway}/${slug}` sin barra final, con el env como override. */
@@ -43,6 +42,6 @@ declare function fusionarRewrites(previo: ResultadoRewrites | undefined, reglas:
43
42
  * Acepta la config como objeto o como función `(phase, { defaultConfig })`,
44
43
  * y un `rewrites()` sync o async que devuelva array u objeto.
45
44
  */
46
- declare function withPeaje<C extends ConfigConRewrites>(nextConfig: ConfigOFuncion<C>, opciones: OpcionesPeaje): ConfigOFuncion<C>;
45
+ declare function withPeaje<C extends object>(nextConfig: ConfigOFuncion<C>, opciones: OpcionesPeaje): ConfigOFuncion<C>;
47
46
 
48
47
  export { type ConfigConRewrites, type ConfigOFuncion, GATEWAY_POR_DEFECTO, type OpcionesPeaje, type ReglaRewrite, type ResultadoRewrites, type RewritesObjeto, baseDe, withPeaje as default, fusionarRewrites, withPeaje };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peaje/next",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Peaje for Next.js: runtime proxy, rewrites and the head block that make your site answer 402 (MPP, x402), MCP and OpenAPI on your own domain.",
5
5
  "license": "MIT",
6
6
  "type": "module",