@valbuild/next 0.63.1 → 0.63.5

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.
@@ -2,10 +2,11 @@ import { ValConfig, ValModules } from "@valbuild/core";
2
2
  import type { draftMode } from "next/headers";
3
3
  import { NextResponse } from "next/server";
4
4
  declare const initValNextAppRouter: (valModules: ValModules, config: ValConfig, nextConfig: ValServerNextConfig & {
5
- formatter?: ((code: string, filePath: string) => string) | undefined;
5
+ formatter?: ((code: string, filePath: string) => Promise<string> | string) | undefined;
6
6
  }) => (req: Request) => Promise<NextResponse<unknown>>;
7
7
  type ValServerNextConfig = {
8
8
  draftMode: typeof draftMode;
9
+ formatter?: (code: string, filePath: string) => Promise<string> | string;
9
10
  };
10
11
  export declare function initValServer(valModules: ValModules, config: ValConfig & {
11
12
  disableCache?: boolean;
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "next",
9
9
  "react"
10
10
  ],
11
- "version": "0.63.1",
11
+ "version": "0.63.5",
12
12
  "scripts": {
13
13
  "typecheck": "tsc --noEmit",
14
14
  "test": "jest"
@@ -45,10 +45,10 @@
45
45
  "exports": true
46
46
  },
47
47
  "dependencies": {
48
- "@valbuild/core": "~0.63.1",
49
- "@valbuild/react": "~0.63.1",
50
- "@valbuild/server": "~0.63.1",
51
- "@valbuild/ui": "~0.63.1",
48
+ "@valbuild/core": "~0.63.5",
49
+ "@valbuild/react": "~0.63.5",
50
+ "@valbuild/server": "~0.63.5",
51
+ "@valbuild/ui": "~0.63.5",
52
52
  "client-only": "^0.0.1",
53
53
  "server-only": "^0.0.1"
54
54
  },
@@ -51,11 +51,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, isEn
51
51
  console.error("Val: could not fetch patches", patchesRes.error);
52
52
  throw Error(JSON.stringify(patchesRes.error, null, 2));
53
53
  case 3:
54
- allPatches = Object.values(patchesRes.value).flatMap(function (mp) {
55
- return mp.map(function (p) {
56
- return p.patch_id;
57
- });
58
- });
54
+ allPatches = Object.keys(patchesRes.value.patches);
59
55
  return _context.abrupt("return", api.putTree({
60
56
  patchIds: allPatches
61
57
  }).then(function (res) {
@@ -51,11 +51,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, isEn
51
51
  console.error("Val: could not fetch patches", patchesRes.error);
52
52
  throw Error(JSON.stringify(patchesRes.error, null, 2));
53
53
  case 3:
54
- allPatches = Object.values(patchesRes.value).flatMap(function (mp) {
55
- return mp.map(function (p) {
56
- return p.patch_id;
57
- });
58
- });
54
+ allPatches = Object.keys(patchesRes.value.patches);
59
55
  return _context.abrupt("return", api.putTree({
60
56
  patchIds: allPatches
61
57
  }).then(function (res) {
@@ -47,11 +47,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, isEn
47
47
  console.error("Val: could not fetch patches", patchesRes.error);
48
48
  throw Error(JSON.stringify(patchesRes.error, null, 2));
49
49
  case 3:
50
- allPatches = Object.values(patchesRes.value).flatMap(function (mp) {
51
- return mp.map(function (p) {
52
- return p.patch_id;
53
- });
54
- });
50
+ allPatches = Object.keys(patchesRes.value.patches);
55
51
  return _context.abrupt("return", api.putTree({
56
52
  patchIds: allPatches
57
53
  }).then(function (res) {