@akanjs/cli 0.9.29 → 0.9.31
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 -6
- package/esm/index.js +10 -6
- package/package.json +1 -1
- package/src/application/application.script.d.ts +2 -1
package/cjs/index.js
CHANGED
|
@@ -806,7 +806,6 @@ RUN apt install -y git redis build-essential python3 ca-certificates fonts-liber
|
|
|
806
806
|
ARG TARGETARCH
|
|
807
807
|
RUN if [ "$TARGETARCH" = "amd64" ]; then wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-debian92-x86_64-100.3.1.deb && apt install -y ./mongodb-database-tools-*.deb && rm -f mongodb-database-tools-*.deb; fi
|
|
808
808
|
${preRunScripts.join("\n")}
|
|
809
|
-
RUN rm -rf /var/lib/apt/lists/*
|
|
810
809
|
RUN mkdir -p /workspace
|
|
811
810
|
WORKDIR /workspace
|
|
812
811
|
COPY ./package.json ./package.json
|
|
@@ -4441,18 +4440,23 @@ var ApplicationScript = class {
|
|
|
4441
4440
|
await this.syncApplication(app);
|
|
4442
4441
|
await Promise.all([this.buildBackend(app, { sync: false }), this.buildFrontend(app, { sync: false })]);
|
|
4443
4442
|
}
|
|
4444
|
-
async start(app, { open: open2 = false } = {}) {
|
|
4443
|
+
async start(app, { dbup = true, open: open2 = false } = {}) {
|
|
4444
|
+
const needDbup = app.getEnv() === "local" && dbup;
|
|
4445
4445
|
await this.syncApplication(app);
|
|
4446
|
-
if (
|
|
4446
|
+
if (needDbup)
|
|
4447
4447
|
await this.dbup(app.workspace);
|
|
4448
|
-
const backend
|
|
4449
|
-
|
|
4450
|
-
|
|
4448
|
+
const [backend, frontend, { server: csrServer, eventEmitter: csr }] = await Promise.all([
|
|
4449
|
+
this.startBackend(app, { open: open2, withInk: true, sync: false }),
|
|
4450
|
+
this.startFrontend(app, { open: open2, withInk: true, sync: false }),
|
|
4451
|
+
this.startCsr(app, { open: open2, withInk: true })
|
|
4452
|
+
]);
|
|
4451
4453
|
process.on("SIGINT", async () => {
|
|
4452
4454
|
await csrServer.close();
|
|
4453
4455
|
backend.kill();
|
|
4454
4456
|
frontend.kill();
|
|
4455
4457
|
csr.removeAllListeners();
|
|
4458
|
+
if (needDbup)
|
|
4459
|
+
await this.dbdown(app.workspace);
|
|
4456
4460
|
process.exit(0);
|
|
4457
4461
|
});
|
|
4458
4462
|
Interface.Start(app.name, backend, frontend, csr);
|
package/esm/index.js
CHANGED
|
@@ -786,7 +786,6 @@ RUN apt install -y git redis build-essential python3 ca-certificates fonts-liber
|
|
|
786
786
|
ARG TARGETARCH
|
|
787
787
|
RUN if [ "$TARGETARCH" = "amd64" ]; then wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-debian92-x86_64-100.3.1.deb && apt install -y ./mongodb-database-tools-*.deb && rm -f mongodb-database-tools-*.deb; fi
|
|
788
788
|
${preRunScripts.join("\n")}
|
|
789
|
-
RUN rm -rf /var/lib/apt/lists/*
|
|
790
789
|
RUN mkdir -p /workspace
|
|
791
790
|
WORKDIR /workspace
|
|
792
791
|
COPY ./package.json ./package.json
|
|
@@ -4423,18 +4422,23 @@ var ApplicationScript = class {
|
|
|
4423
4422
|
await this.syncApplication(app);
|
|
4424
4423
|
await Promise.all([this.buildBackend(app, { sync: false }), this.buildFrontend(app, { sync: false })]);
|
|
4425
4424
|
}
|
|
4426
|
-
async start(app, { open: open2 = false } = {}) {
|
|
4425
|
+
async start(app, { dbup = true, open: open2 = false } = {}) {
|
|
4426
|
+
const needDbup = app.getEnv() === "local" && dbup;
|
|
4427
4427
|
await this.syncApplication(app);
|
|
4428
|
-
if (
|
|
4428
|
+
if (needDbup)
|
|
4429
4429
|
await this.dbup(app.workspace);
|
|
4430
|
-
const backend
|
|
4431
|
-
|
|
4432
|
-
|
|
4430
|
+
const [backend, frontend, { server: csrServer, eventEmitter: csr }] = await Promise.all([
|
|
4431
|
+
this.startBackend(app, { open: open2, withInk: true, sync: false }),
|
|
4432
|
+
this.startFrontend(app, { open: open2, withInk: true, sync: false }),
|
|
4433
|
+
this.startCsr(app, { open: open2, withInk: true })
|
|
4434
|
+
]);
|
|
4433
4435
|
process.on("SIGINT", async () => {
|
|
4434
4436
|
await csrServer.close();
|
|
4435
4437
|
backend.kill();
|
|
4436
4438
|
frontend.kill();
|
|
4437
4439
|
csr.removeAllListeners();
|
|
4440
|
+
if (needDbup)
|
|
4441
|
+
await this.dbdown(app.workspace);
|
|
4438
4442
|
process.exit(0);
|
|
4439
4443
|
});
|
|
4440
4444
|
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 }?: {
|