@akanjs/cli 0.9.28 → 0.9.30
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/cjs/index.js +10 -5
- package/esm/index.js +10 -5
- package/package.json +1 -1
- package/src/application/application.script.d.ts +2 -1
package/cjs/index.js
CHANGED
|
@@ -4441,18 +4441,23 @@ var ApplicationScript = class {
|
|
|
4441
4441
|
await this.syncApplication(app);
|
|
4442
4442
|
await Promise.all([this.buildBackend(app, { sync: false }), this.buildFrontend(app, { sync: false })]);
|
|
4443
4443
|
}
|
|
4444
|
-
async start(app, { open: open2 = false } = {}) {
|
|
4444
|
+
async start(app, { dbup = true, open: open2 = false } = {}) {
|
|
4445
|
+
const needDbup = app.getEnv() === "local" && dbup;
|
|
4445
4446
|
await this.syncApplication(app);
|
|
4446
|
-
if (
|
|
4447
|
+
if (needDbup)
|
|
4447
4448
|
await this.dbup(app.workspace);
|
|
4448
|
-
const backend
|
|
4449
|
-
|
|
4450
|
-
|
|
4449
|
+
const [backend, frontend, { server: csrServer, eventEmitter: csr }] = await Promise.all([
|
|
4450
|
+
this.startBackend(app, { open: open2, withInk: true, sync: false }),
|
|
4451
|
+
this.startFrontend(app, { open: open2, withInk: true, sync: false }),
|
|
4452
|
+
this.startCsr(app, { open: open2, withInk: true })
|
|
4453
|
+
]);
|
|
4451
4454
|
process.on("SIGINT", async () => {
|
|
4452
4455
|
await csrServer.close();
|
|
4453
4456
|
backend.kill();
|
|
4454
4457
|
frontend.kill();
|
|
4455
4458
|
csr.removeAllListeners();
|
|
4459
|
+
if (needDbup)
|
|
4460
|
+
await this.dbdown(app.workspace);
|
|
4456
4461
|
process.exit(0);
|
|
4457
4462
|
});
|
|
4458
4463
|
Interface.Start(app.name, backend, frontend, csr);
|
package/esm/index.js
CHANGED
|
@@ -4423,18 +4423,23 @@ var ApplicationScript = class {
|
|
|
4423
4423
|
await this.syncApplication(app);
|
|
4424
4424
|
await Promise.all([this.buildBackend(app, { sync: false }), this.buildFrontend(app, { sync: false })]);
|
|
4425
4425
|
}
|
|
4426
|
-
async start(app, { open: open2 = false } = {}) {
|
|
4426
|
+
async start(app, { dbup = true, open: open2 = false } = {}) {
|
|
4427
|
+
const needDbup = app.getEnv() === "local" && dbup;
|
|
4427
4428
|
await this.syncApplication(app);
|
|
4428
|
-
if (
|
|
4429
|
+
if (needDbup)
|
|
4429
4430
|
await this.dbup(app.workspace);
|
|
4430
|
-
const backend
|
|
4431
|
-
|
|
4432
|
-
|
|
4431
|
+
const [backend, frontend, { server: csrServer, eventEmitter: csr }] = await Promise.all([
|
|
4432
|
+
this.startBackend(app, { open: open2, withInk: true, sync: false }),
|
|
4433
|
+
this.startFrontend(app, { open: open2, withInk: true, sync: false }),
|
|
4434
|
+
this.startCsr(app, { open: open2, withInk: true })
|
|
4435
|
+
]);
|
|
4433
4436
|
process.on("SIGINT", async () => {
|
|
4434
4437
|
await csrServer.close();
|
|
4435
4438
|
backend.kill();
|
|
4436
4439
|
frontend.kill();
|
|
4437
4440
|
csr.removeAllListeners();
|
|
4441
|
+
if (needDbup)
|
|
4442
|
+
await this.dbdown(app.workspace);
|
|
4438
4443
|
process.exit(0);
|
|
4439
4444
|
});
|
|
4440
4445
|
Interface.Start(app.name, backend, frontend, csr);
|
package/package.json
CHANGED
|
@@ -11,7 +11,8 @@ export declare class ApplicationScript {
|
|
|
11
11
|
syncApplication(app: App): Promise<import("@akanjs/config").AppScanResult | import("@akanjs/config").LibScanResult>;
|
|
12
12
|
script(app: App, filename: string | null): Promise<void>;
|
|
13
13
|
build(app: App): Promise<void>;
|
|
14
|
-
start(app: App, { open }?: {
|
|
14
|
+
start(app: App, { dbup, open }?: {
|
|
15
|
+
dbup?: boolean;
|
|
15
16
|
open?: boolean;
|
|
16
17
|
}): Promise<void>;
|
|
17
18
|
buildBackend(app: App, { sync }?: {
|