Skip to content

Commit 8804236

Browse files
test nextjs. Server
+ add some TS
1 parent e3e060e commit 8804236

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

packages/devextreme-cli/src/templates/nextjs/application/src/app/auth/[type]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const formText = {
1717
}
1818
}
1919

20-
function AuthForm({name}) {
20+
function AuthForm({name}<%=#isTypeScript%>: Record<string, any><%=/isTypeScript%>) {
2121
switch (name) {
2222
case 'login': return <LoginForm />;
2323
case 'create-account': return <CreateAccountForm />;

packages/devextreme-cli/testing/dev-server.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ module.exports = class DevServer {
1414

1515
async start() {
1616
if(this.env.engine.indexOf('nextjs') === 0) {
17+
if(startedPromise) {
18+
startedPromise.kill();
19+
startedPromise = null;
20+
}
1721
startedPromise = runCommand('npm', ['run', 'start'], {
1822
cwd: this.env.appPath,
1923
// https://github.com/facebook/create-react-app/issues/3657
@@ -26,7 +30,10 @@ module.exports = class DevServer {
2630

2731
async stop() {
2832
if(this.env.engine.indexOf('nextjs') === 0) {
29-
await startedPromise.kill();
33+
if(startedPromise) {
34+
await startedPromise.kill();
35+
startedPromise = null;
36+
}
3037
} else {
3138
await webServer.stop();
3239
}

0 commit comments

Comments
 (0)