@valbuild/init 0.84.3 → 0.85.1
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.
|
@@ -504,7 +504,7 @@ function transformNextAppRouterValProvider(fileInfo, api, options) {
|
|
|
504
504
|
|
|
505
505
|
var packageJson = {
|
|
506
506
|
name: "@valbuild/init",
|
|
507
|
-
version: "0.
|
|
507
|
+
version: "0.85.1",
|
|
508
508
|
description: "Initialize a new val.build project",
|
|
509
509
|
exports: {
|
|
510
510
|
"./main": {
|
|
@@ -555,10 +555,10 @@ var packageJson = {
|
|
|
555
555
|
};
|
|
556
556
|
|
|
557
557
|
var VAL_CLIENT = function VAL_CLIENT(configImportPath) {
|
|
558
|
-
return "import \"client-only\";\nimport { initValClient } from \"@valbuild/next/client\";\nimport { config } from \"".concat(configImportPath, "\";\n\nconst {
|
|
558
|
+
return "import \"client-only\";\nimport { initValClient } from \"@valbuild/next/client\";\nimport { config } from \"".concat(configImportPath, "\";\n\nconst {\n useValStega: useVal,\n useValRouteStega: useValRoute,\n useValRouteUrl,\n} = initValClient(config);\n\nexport { useVal, useValRoute, useValRouteUrl };\n");
|
|
559
559
|
};
|
|
560
560
|
var VAL_RSC = function VAL_RSC(configImportPath, valModulesImportPath) {
|
|
561
|
-
return "import \"server-only\";\nimport { initValRsc } from \"@valbuild/next/rsc\";\nimport { config } from \"".concat(configImportPath, "\";\nimport valModules from \"").concat(valModulesImportPath, "\";\nimport { cookies, draftMode, headers } from \"next/headers\";\n\nconst {
|
|
561
|
+
return "import \"server-only\";\nimport { initValRsc } from \"@valbuild/next/rsc\";\nimport { config } from \"".concat(configImportPath, "\";\nimport valModules from \"").concat(valModulesImportPath, "\";\nimport { cookies, draftMode, headers } from \"next/headers\";\n\nconst {\n fetchValStega: fetchVal,\n fetchValRouteStega: fetchValRoute,\n fetchValRouteUrl,\n} =\n initValRsc(config, valModules, {\n draftMode,\n headers,\n cookies,\n });\n\nexport { fetchVal, fetchValRoute, fetchValRouteUrl };\n");
|
|
562
562
|
};
|
|
563
563
|
var VAL_SERVER = function VAL_SERVER(configImportPath, valModulesImportPath) {
|
|
564
564
|
return "import \"server-only\";\nimport { initValServer } from \"@valbuild/next/server\";\nimport { config } from \"".concat(configImportPath, "\";\nimport { draftMode } from \"next/headers\";\nimport valModules from \"").concat(valModulesImportPath, "\";\n\nconst { valNextAppRouter } = initValServer(\n valModules,\n { ...config },\n {\n draftMode,\n }\n);\n\nexport { valNextAppRouter };\n");
|
|
@@ -504,7 +504,7 @@ function transformNextAppRouterValProvider(fileInfo, api, options) {
|
|
|
504
504
|
|
|
505
505
|
var packageJson = {
|
|
506
506
|
name: "@valbuild/init",
|
|
507
|
-
version: "0.
|
|
507
|
+
version: "0.85.1",
|
|
508
508
|
description: "Initialize a new val.build project",
|
|
509
509
|
exports: {
|
|
510
510
|
"./main": {
|
|
@@ -555,10 +555,10 @@ var packageJson = {
|
|
|
555
555
|
};
|
|
556
556
|
|
|
557
557
|
var VAL_CLIENT = function VAL_CLIENT(configImportPath) {
|
|
558
|
-
return "import \"client-only\";\nimport { initValClient } from \"@valbuild/next/client\";\nimport { config } from \"".concat(configImportPath, "\";\n\nconst {
|
|
558
|
+
return "import \"client-only\";\nimport { initValClient } from \"@valbuild/next/client\";\nimport { config } from \"".concat(configImportPath, "\";\n\nconst {\n useValStega: useVal,\n useValRouteStega: useValRoute,\n useValRouteUrl,\n} = initValClient(config);\n\nexport { useVal, useValRoute, useValRouteUrl };\n");
|
|
559
559
|
};
|
|
560
560
|
var VAL_RSC = function VAL_RSC(configImportPath, valModulesImportPath) {
|
|
561
|
-
return "import \"server-only\";\nimport { initValRsc } from \"@valbuild/next/rsc\";\nimport { config } from \"".concat(configImportPath, "\";\nimport valModules from \"").concat(valModulesImportPath, "\";\nimport { cookies, draftMode, headers } from \"next/headers\";\n\nconst {
|
|
561
|
+
return "import \"server-only\";\nimport { initValRsc } from \"@valbuild/next/rsc\";\nimport { config } from \"".concat(configImportPath, "\";\nimport valModules from \"").concat(valModulesImportPath, "\";\nimport { cookies, draftMode, headers } from \"next/headers\";\n\nconst {\n fetchValStega: fetchVal,\n fetchValRouteStega: fetchValRoute,\n fetchValRouteUrl,\n} =\n initValRsc(config, valModules, {\n draftMode,\n headers,\n cookies,\n });\n\nexport { fetchVal, fetchValRoute, fetchValRouteUrl };\n");
|
|
562
562
|
};
|
|
563
563
|
var VAL_SERVER = function VAL_SERVER(configImportPath, valModulesImportPath) {
|
|
564
564
|
return "import \"server-only\";\nimport { initValServer } from \"@valbuild/next/server\";\nimport { config } from \"".concat(configImportPath, "\";\nimport { draftMode } from \"next/headers\";\nimport valModules from \"").concat(valModulesImportPath, "\";\n\nconst { valNextAppRouter } = initValServer(\n valModules,\n { ...config },\n {\n draftMode,\n }\n);\n\nexport { valNextAppRouter };\n");
|
|
@@ -492,7 +492,7 @@ function transformNextAppRouterValProvider(fileInfo, api, options) {
|
|
|
492
492
|
|
|
493
493
|
var packageJson = {
|
|
494
494
|
name: "@valbuild/init",
|
|
495
|
-
version: "0.
|
|
495
|
+
version: "0.85.1",
|
|
496
496
|
description: "Initialize a new val.build project",
|
|
497
497
|
exports: {
|
|
498
498
|
"./main": {
|
|
@@ -543,10 +543,10 @@ var packageJson = {
|
|
|
543
543
|
};
|
|
544
544
|
|
|
545
545
|
var VAL_CLIENT = function VAL_CLIENT(configImportPath) {
|
|
546
|
-
return "import \"client-only\";\nimport { initValClient } from \"@valbuild/next/client\";\nimport { config } from \"".concat(configImportPath, "\";\n\nconst {
|
|
546
|
+
return "import \"client-only\";\nimport { initValClient } from \"@valbuild/next/client\";\nimport { config } from \"".concat(configImportPath, "\";\n\nconst {\n useValStega: useVal,\n useValRouteStega: useValRoute,\n useValRouteUrl,\n} = initValClient(config);\n\nexport { useVal, useValRoute, useValRouteUrl };\n");
|
|
547
547
|
};
|
|
548
548
|
var VAL_RSC = function VAL_RSC(configImportPath, valModulesImportPath) {
|
|
549
|
-
return "import \"server-only\";\nimport { initValRsc } from \"@valbuild/next/rsc\";\nimport { config } from \"".concat(configImportPath, "\";\nimport valModules from \"").concat(valModulesImportPath, "\";\nimport { cookies, draftMode, headers } from \"next/headers\";\n\nconst {
|
|
549
|
+
return "import \"server-only\";\nimport { initValRsc } from \"@valbuild/next/rsc\";\nimport { config } from \"".concat(configImportPath, "\";\nimport valModules from \"").concat(valModulesImportPath, "\";\nimport { cookies, draftMode, headers } from \"next/headers\";\n\nconst {\n fetchValStega: fetchVal,\n fetchValRouteStega: fetchValRoute,\n fetchValRouteUrl,\n} =\n initValRsc(config, valModules, {\n draftMode,\n headers,\n cookies,\n });\n\nexport { fetchVal, fetchValRoute, fetchValRouteUrl };\n");
|
|
550
550
|
};
|
|
551
551
|
var VAL_SERVER = function VAL_SERVER(configImportPath, valModulesImportPath) {
|
|
552
552
|
return "import \"server-only\";\nimport { initValServer } from \"@valbuild/next/server\";\nimport { config } from \"".concat(configImportPath, "\";\nimport { draftMode } from \"next/headers\";\nimport valModules from \"").concat(valModulesImportPath, "\";\n\nconst { valNextAppRouter } = initValServer(\n valModules,\n { ...config },\n {\n draftMode,\n }\n);\n\nexport { valNextAppRouter };\n");
|
package/package.json
CHANGED
package/src/templates.ts
CHANGED
|
@@ -2,10 +2,13 @@ export const VAL_CLIENT = (configImportPath: string) => `import "client-only";
|
|
|
2
2
|
import { initValClient } from "@valbuild/next/client";
|
|
3
3
|
import { config } from "${configImportPath}";
|
|
4
4
|
|
|
5
|
-
const {
|
|
6
|
-
|
|
5
|
+
const {
|
|
6
|
+
useValStega: useVal,
|
|
7
|
+
useValRouteStega: useValRoute,
|
|
8
|
+
useValRouteUrl,
|
|
9
|
+
} = initValClient(config);
|
|
7
10
|
|
|
8
|
-
export { useVal, useValRoute };
|
|
11
|
+
export { useVal, useValRoute, useValRouteUrl };
|
|
9
12
|
`;
|
|
10
13
|
|
|
11
14
|
export const VAL_RSC = (
|
|
@@ -17,14 +20,18 @@ import { config } from "${configImportPath}";
|
|
|
17
20
|
import valModules from "${valModulesImportPath}";
|
|
18
21
|
import { cookies, draftMode, headers } from "next/headers";
|
|
19
22
|
|
|
20
|
-
const {
|
|
23
|
+
const {
|
|
24
|
+
fetchValStega: fetchVal,
|
|
25
|
+
fetchValRouteStega: fetchValRoute,
|
|
26
|
+
fetchValRouteUrl,
|
|
27
|
+
} =
|
|
21
28
|
initValRsc(config, valModules, {
|
|
22
29
|
draftMode,
|
|
23
30
|
headers,
|
|
24
31
|
cookies,
|
|
25
32
|
});
|
|
26
33
|
|
|
27
|
-
export { fetchVal, fetchValRoute };
|
|
34
|
+
export { fetchVal, fetchValRoute, fetchValRouteUrl };
|
|
28
35
|
`;
|
|
29
36
|
|
|
30
37
|
export const VAL_SERVER = (
|