Skip to content

Commit dfc9556

Browse files
authored
feat: update project creation payload (#388)
* feat: pass answers and source params to project creation endpoint * 1.19.0
1 parent 7922a66 commit dfc9556

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules/
22
lib/
33
.DS_*
4-
**/node_modules
4+
**/node_modules
5+
tmp

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "superplate-cli",
3-
"version": "1.18.2",
3+
"version": "1.19.0",
44
"description": "The frontend boilerplate with superpowers",
55
"license": "MIT",
66
"repository": {

src/saofile.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,14 @@ const saoConfig: GeneratorConfig = {
189189
method: "POST",
190190
body: JSON.stringify({
191191
email: emailPromptResult.userEmail || answers.userEmail,
192+
answers: {
193+
...answers,
194+
projectType: sao.opts.extras.projectType,
195+
},
196+
source:
197+
sao.opts.extras.apiMode === false
198+
? "CREATE_REFINE_APP"
199+
: "REFINE_NEW",
192200
}),
193201
headers: { "Content-Type": "application/json" },
194202
},

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"exclude": ["template/", "lib/", "templates/"],
2+
"exclude": ["template/", "lib/", "templates/", "tmp/"],
33
"compilerOptions": {
44
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
55
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
@@ -25,7 +25,7 @@
2525
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */,
2626
"paths": {
2727
"@Helper": ["./Helper"],
28-
"@Helper/*": ["./Helper/*"],
28+
"@Helper/*": ["./Helper/*"]
2929
}
3030
}
3131
}

0 commit comments

Comments
 (0)