create-plasmic-app 0.0.146 → 0.0.147
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/cpa-out/gatsby-codegen-js/package.json +1 -1
- package/cpa-out/gatsby-codegen-ts/package.json +1 -1
- package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +1 -0
- package/cpa-out/gatsby-loader-js/package.json +1 -1
- package/cpa-out/gatsby-loader-ts/package.json +1 -1
- package/cpa-out/nextjs-app-codegen-js/app/plasmic-host/page.jsx +2 -0
- package/cpa-out/nextjs-app-codegen-js/package.json +1 -1
- package/cpa-out/nextjs-app-codegen-ts/app/plasmic-host/page.tsx +2 -0
- package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicButton.tsx +1 -0
- package/cpa-out/nextjs-app-codegen-ts/package.json +1 -1
- package/cpa-out/nextjs-app-loader-js/package.json +1 -1
- package/cpa-out/nextjs-app-loader-ts/package.json +1 -1
- package/cpa-out/nextjs-pages-codegen-js/package.json +1 -1
- package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicButton.tsx +1 -0
- package/cpa-out/nextjs-pages-codegen-ts/package.json +1 -1
- package/cpa-out/nextjs-pages-loader-js/package.json +1 -1
- package/cpa-out/nextjs-pages-loader-ts/package.json +1 -1
- package/cpa-out/react-codegen-js/package.json +1 -1
- package/cpa-out/react-codegen-ts/package.json +1 -1
- package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +1 -0
- package/cpa-out/tanstack-codegen-ts/package.json +2 -2
- package/cpa-out/tanstack-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +1 -0
- package/dist/nextjs/nextjs.js +8 -8
- package/dist/nextjs/templates/app-codegen/plasmic-host.d.ts +1 -0
- package/dist/nextjs/templates/app-codegen/plasmic-host.js +10 -0
- package/package.json +2 -2
- package/src/nextjs/nextjs.ts +2 -1
- package/src/nextjs/templates/app-codegen/plasmic-host.ts +7 -0
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@plasmicapp/cli": "^0.1.361",
|
|
16
|
-
"@plasmicapp/react-web": "^1.0.
|
|
16
|
+
"@plasmicapp/react-web": "^1.0.8",
|
|
17
17
|
"@tailwindcss/vite": "^4.1.18",
|
|
18
18
|
"@tanstack/react-devtools": "latest",
|
|
19
|
-
"@tanstack/react-query": "^5.100.
|
|
19
|
+
"@tanstack/react-query": "^5.100.10",
|
|
20
20
|
"@tanstack/react-router": "latest",
|
|
21
21
|
"@tanstack/react-router-devtools": "latest",
|
|
22
22
|
"@tanstack/router-plugin": "^1.132.0",
|
package/dist/nextjs/nextjs.js
CHANGED
|
@@ -22,15 +22,16 @@ const file_utils_1 = require("../utils/file-utils");
|
|
|
22
22
|
const lang_utils_1 = require("../utils/lang-utils");
|
|
23
23
|
const npm_utils_1 = require("../utils/npm-utils");
|
|
24
24
|
const layout_1 = require("./templates/app-codegen/layout");
|
|
25
|
+
const plasmic_host_1 = require("./templates/app-codegen/plasmic-host");
|
|
25
26
|
const plasmic_init_client_1 = require("./templates/app-codegen/plasmic-init-client");
|
|
26
27
|
const catchall_page_1 = require("./templates/app-loader/catchall-page");
|
|
27
|
-
const
|
|
28
|
+
const plasmic_host_2 = require("./templates/app-loader/plasmic-host");
|
|
28
29
|
const plasmic_init_1 = require("./templates/app-loader/plasmic-init");
|
|
29
30
|
const plasmic_init_client_2 = require("./templates/app-loader/plasmic-init-client");
|
|
30
31
|
const app_1 = require("./templates/pages-codegen/app");
|
|
31
|
-
const
|
|
32
|
+
const plasmic_host_3 = require("./templates/pages-codegen/plasmic-host");
|
|
32
33
|
const catchall_page_2 = require("./templates/pages-loader/catchall-page");
|
|
33
|
-
const
|
|
34
|
+
const plasmic_host_4 = require("./templates/pages-loader/plasmic-host");
|
|
34
35
|
const plasmic_init_2 = require("./templates/pages-loader/plasmic-init");
|
|
35
36
|
exports.nextjsStrategy = {
|
|
36
37
|
create: (args) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -101,7 +102,7 @@ function generateFilesAppDir(args) {
|
|
|
101
102
|
yield fs_1.promises.writeFile(path_1.default.join(projectPath, `plasmic-init-client.${jsOrTs}x`), (0, plasmic_init_client_2.makePlasmicInitClient_app_loader)(jsOrTs));
|
|
102
103
|
// ./app/plasmic-host/page.tsx
|
|
103
104
|
yield fs_1.promises.mkdir(path_1.default.join(projectPath, "app", "plasmic-host"));
|
|
104
|
-
yield fs_1.promises.writeFile(path_1.default.join(projectPath, "app", "plasmic-host", `page.${jsOrTs}x`), (0,
|
|
105
|
+
yield fs_1.promises.writeFile(path_1.default.join(projectPath, "app", "plasmic-host", `page.${jsOrTs}x`), (0, plasmic_host_2.makePlasmicHostPage_app_loader)());
|
|
105
106
|
// ./app/[[...catchall]]/page.tsx
|
|
106
107
|
yield fs_1.promises.mkdir(path_1.default.join(projectPath, "app", "[[...catchall]]"));
|
|
107
108
|
yield fs_1.promises.writeFile(path_1.default.join(projectPath, "app", "[[...catchall]]", `page.${jsOrTs}x`), (0, catchall_page_1.makeCatchallPage_app_loader)(jsOrTs));
|
|
@@ -115,8 +116,7 @@ function generateFilesAppDir(args) {
|
|
|
115
116
|
yield fs_1.promises.writeFile(path_1.default.join(projectPath, `plasmic-init-client.${jsOrTs}x`), (0, plasmic_init_client_1.makePlasmicInitClient_app_codegen)(jsOrTs));
|
|
116
117
|
// ./app/plasmic-host/page.tsx
|
|
117
118
|
yield fs_1.promises.mkdir(path_1.default.join(projectPath, "app", "plasmic-host"));
|
|
118
|
-
yield fs_1.promises.writeFile(path_1.default.join(projectPath, "app", "plasmic-host", `page.${jsOrTs}x`), (0,
|
|
119
|
-
);
|
|
119
|
+
yield fs_1.promises.writeFile(path_1.default.join(projectPath, "app", "plasmic-host", `page.${jsOrTs}x`), (0, plasmic_host_1.makePlasmicHostPage_app_codegen)());
|
|
120
120
|
// This should generate
|
|
121
121
|
// ./plasmic.json
|
|
122
122
|
// ./app/page.tsx
|
|
@@ -144,7 +144,7 @@ function generateFilesPagesDir(args) {
|
|
|
144
144
|
// ./plasmic-init.ts
|
|
145
145
|
yield fs_1.promises.writeFile(path_1.default.join(projectPath, `plasmic-init.${jsOrTs}`), (0, plasmic_init_2.makePlasmicInit_pages_loader)(projectId, (0, lang_utils_1.ensure)(projectApiToken, "Missing projectApiToken")));
|
|
146
146
|
// ./pages/plasmic-host.tsx
|
|
147
|
-
yield fs_1.promises.writeFile(path_1.default.join(projectPath, "pages", `plasmic-host.${jsOrTs}x`), (0,
|
|
147
|
+
yield fs_1.promises.writeFile(path_1.default.join(projectPath, "pages", `plasmic-host.${jsOrTs}x`), (0, plasmic_host_4.makePlasmicHostPage_pages_loader)());
|
|
148
148
|
// ./pages/[[...catchall]].tsx
|
|
149
149
|
yield fs_1.promises.writeFile(path_1.default.join(projectPath, "pages", `[[...catchall]].${jsOrTs}x`), (0, catchall_page_2.makeCatchallPage_pages_loader)(jsOrTs));
|
|
150
150
|
}
|
|
@@ -152,7 +152,7 @@ function generateFilesPagesDir(args) {
|
|
|
152
152
|
// ./pages/_app.tsx
|
|
153
153
|
yield fs_1.promises.writeFile(path_1.default.join(projectPath, "pages", `_app.${jsOrTs}x`), (0, app_1.makeCustomApp_pages_codegen)(jsOrTs));
|
|
154
154
|
// ./pages/plasmic-host.tsx
|
|
155
|
-
yield fs_1.promises.writeFile(path_1.default.join(projectPath, "pages", `plasmic-host.${jsOrTs}x`), (0,
|
|
155
|
+
yield fs_1.promises.writeFile(path_1.default.join(projectPath, "pages", `plasmic-host.${jsOrTs}x`), (0, plasmic_host_3.makePlasmicHostPage_pages_codegen)());
|
|
156
156
|
// This should generate
|
|
157
157
|
// ./plasmic.json
|
|
158
158
|
// ./pages/index.tsx
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function makePlasmicHostPage_app_codegen(): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makePlasmicHostPage_app_codegen = void 0;
|
|
4
|
+
const plasmic_host_1 = require("../pages-codegen/plasmic-host");
|
|
5
|
+
function makePlasmicHostPage_app_codegen() {
|
|
6
|
+
return `"use client";
|
|
7
|
+
|
|
8
|
+
${(0, plasmic_host_1.makePlasmicHostPage_pages_codegen)()}`;
|
|
9
|
+
}
|
|
10
|
+
exports.makePlasmicHostPage_app_codegen = makePlasmicHostPage_app_codegen;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-plasmic-app",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.147",
|
|
4
4
|
"description": "Create Plasmic-powered React apps",
|
|
5
5
|
"main": "./dist/lib.js",
|
|
6
6
|
"types": "./dist/lib.d.ts",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"validate-npm-package-name": "^3.0.0",
|
|
48
48
|
"yargs": "^16.2.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "2e811068a089e1c86ca9213174860726042db0a9"
|
|
51
51
|
}
|
package/src/nextjs/nextjs.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { ensure } from "../utils/lang-utils";
|
|
|
12
12
|
import { installUpgrade } from "../utils/npm-utils";
|
|
13
13
|
import { CPAStrategy, GenerateFilesArgs } from "../utils/strategy";
|
|
14
14
|
import { makeLayout_app_codegen } from "./templates/app-codegen/layout";
|
|
15
|
+
import { makePlasmicHostPage_app_codegen } from "./templates/app-codegen/plasmic-host";
|
|
15
16
|
import { makePlasmicInitClient_app_codegen } from "./templates/app-codegen/plasmic-init-client";
|
|
16
17
|
import { makeCatchallPage_app_loader } from "./templates/app-loader/catchall-page";
|
|
17
18
|
import { makePlasmicHostPage_app_loader } from "./templates/app-loader/plasmic-host";
|
|
@@ -137,7 +138,7 @@ async function generateFilesAppDir(args: GenerateFilesArgs) {
|
|
|
137
138
|
await fs.mkdir(path.join(projectPath, "app", "plasmic-host"));
|
|
138
139
|
await fs.writeFile(
|
|
139
140
|
path.join(projectPath, "app", "plasmic-host", `page.${jsOrTs}x`),
|
|
140
|
-
|
|
141
|
+
makePlasmicHostPage_app_codegen()
|
|
141
142
|
);
|
|
142
143
|
|
|
143
144
|
// This should generate
|