@akanjs/cli 0.0.147 → 0.0.148
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 +11 -3
- package/esm/index.js +11 -3
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -602,7 +602,7 @@ var withBase = (appName, config, libs, routes = []) => {
|
|
|
602
602
|
eslint: { ...config.eslint, ignoreDuringBuilds: true },
|
|
603
603
|
env: {
|
|
604
604
|
...config.env,
|
|
605
|
-
basePaths: routes.map(({ basePath: basePath2 }) => basePath2).join(",")
|
|
605
|
+
basePaths: [...new Set(routes.map(({ basePath: basePath2 }) => basePath2))].join(",")
|
|
606
606
|
},
|
|
607
607
|
transpilePackages: ["swiper", "ssr-window", "dom7"],
|
|
608
608
|
reactStrictMode: commandType === "start" ? false : true,
|
|
@@ -768,6 +768,7 @@ CMD ["npm", "start"]`,
|
|
|
768
768
|
config.libs ?? [],
|
|
769
769
|
config.frontend?.routes
|
|
770
770
|
),
|
|
771
|
+
routes: config.frontend?.routes,
|
|
771
772
|
explicitDependencies: config.frontend?.explicitDependencies ?? []
|
|
772
773
|
},
|
|
773
774
|
mobile: {
|
|
@@ -3586,6 +3587,8 @@ var ApplicationRunner = class {
|
|
|
3586
3587
|
async #getViteConfig(app, command) {
|
|
3587
3588
|
const { env } = await this.#prepareCommand(app, command, "csr");
|
|
3588
3589
|
const tsconfig = app.workspace.getTsConfig();
|
|
3590
|
+
const akanConfig = await app.getConfig();
|
|
3591
|
+
const basePaths = akanConfig.frontend.routes ? [...new Set(akanConfig.frontend.routes.map(({ basePath: basePath2 }) => basePath2))].join(",") : void 0;
|
|
3589
3592
|
const processEnv = env;
|
|
3590
3593
|
const akanjsPrefix = process.env.USE_AKANJS_PKGS === "true" ? `${app.workspace.workspaceRoot}/pkgs/` : "";
|
|
3591
3594
|
const config = vite.defineConfig({
|
|
@@ -3649,7 +3652,8 @@ var ApplicationRunner = class {
|
|
|
3649
3652
|
APP_OPERATION_MODE: processEnv.APP_OPERATION_MODE ?? "local",
|
|
3650
3653
|
AKAN_WORKSPACE_ROOT: app.workspace.workspaceRoot,
|
|
3651
3654
|
AKAN_APP_ROOT: app.cwdPath,
|
|
3652
|
-
RENDER_ENV: "csr"
|
|
3655
|
+
RENDER_ENV: "csr",
|
|
3656
|
+
basePaths
|
|
3653
3657
|
},
|
|
3654
3658
|
"process.platform": JSON.stringify("browser"),
|
|
3655
3659
|
"process.version": JSON.stringify(process.version)
|
|
@@ -3959,7 +3963,11 @@ var ApplicationScript = class {
|
|
|
3959
3963
|
await this.syncApplication(app);
|
|
3960
3964
|
if (app.workspace.getBaseDevEnv().env === "local")
|
|
3961
3965
|
await this.dbup(app.workspace);
|
|
3962
|
-
await Promise.all([
|
|
3966
|
+
await Promise.all([
|
|
3967
|
+
this.startBackend(app, { open: open2, sync: false }),
|
|
3968
|
+
this.startFrontend(app, { open: open2, sync: false }),
|
|
3969
|
+
this.startCsr(app, { open: open2, sync: false })
|
|
3970
|
+
]);
|
|
3963
3971
|
}
|
|
3964
3972
|
async buildBackend(app, { sync = true } = {}) {
|
|
3965
3973
|
if (sync)
|
package/esm/index.js
CHANGED
|
@@ -589,7 +589,7 @@ var withBase = (appName, config, libs, routes = []) => {
|
|
|
589
589
|
eslint: { ...config.eslint, ignoreDuringBuilds: true },
|
|
590
590
|
env: {
|
|
591
591
|
...config.env,
|
|
592
|
-
basePaths: routes.map(({ basePath: basePath2 }) => basePath2).join(",")
|
|
592
|
+
basePaths: [...new Set(routes.map(({ basePath: basePath2 }) => basePath2))].join(",")
|
|
593
593
|
},
|
|
594
594
|
transpilePackages: ["swiper", "ssr-window", "dom7"],
|
|
595
595
|
reactStrictMode: commandType === "start" ? false : true,
|
|
@@ -755,6 +755,7 @@ CMD ["npm", "start"]`,
|
|
|
755
755
|
config.libs ?? [],
|
|
756
756
|
config.frontend?.routes
|
|
757
757
|
),
|
|
758
|
+
routes: config.frontend?.routes,
|
|
758
759
|
explicitDependencies: config.frontend?.explicitDependencies ?? []
|
|
759
760
|
},
|
|
760
761
|
mobile: {
|
|
@@ -3578,6 +3579,8 @@ var ApplicationRunner = class {
|
|
|
3578
3579
|
async #getViteConfig(app, command) {
|
|
3579
3580
|
const { env } = await this.#prepareCommand(app, command, "csr");
|
|
3580
3581
|
const tsconfig = app.workspace.getTsConfig();
|
|
3582
|
+
const akanConfig = await app.getConfig();
|
|
3583
|
+
const basePaths = akanConfig.frontend.routes ? [...new Set(akanConfig.frontend.routes.map(({ basePath: basePath2 }) => basePath2))].join(",") : void 0;
|
|
3581
3584
|
const processEnv = env;
|
|
3582
3585
|
const akanjsPrefix = process.env.USE_AKANJS_PKGS === "true" ? `${app.workspace.workspaceRoot}/pkgs/` : "";
|
|
3583
3586
|
const config = vite.defineConfig({
|
|
@@ -3641,7 +3644,8 @@ var ApplicationRunner = class {
|
|
|
3641
3644
|
APP_OPERATION_MODE: processEnv.APP_OPERATION_MODE ?? "local",
|
|
3642
3645
|
AKAN_WORKSPACE_ROOT: app.workspace.workspaceRoot,
|
|
3643
3646
|
AKAN_APP_ROOT: app.cwdPath,
|
|
3644
|
-
RENDER_ENV: "csr"
|
|
3647
|
+
RENDER_ENV: "csr",
|
|
3648
|
+
basePaths
|
|
3645
3649
|
},
|
|
3646
3650
|
"process.platform": JSON.stringify("browser"),
|
|
3647
3651
|
"process.version": JSON.stringify(process.version)
|
|
@@ -3951,7 +3955,11 @@ var ApplicationScript = class {
|
|
|
3951
3955
|
await this.syncApplication(app);
|
|
3952
3956
|
if (app.workspace.getBaseDevEnv().env === "local")
|
|
3953
3957
|
await this.dbup(app.workspace);
|
|
3954
|
-
await Promise.all([
|
|
3958
|
+
await Promise.all([
|
|
3959
|
+
this.startBackend(app, { open: open2, sync: false }),
|
|
3960
|
+
this.startFrontend(app, { open: open2, sync: false }),
|
|
3961
|
+
this.startCsr(app, { open: open2, sync: false })
|
|
3962
|
+
]);
|
|
3955
3963
|
}
|
|
3956
3964
|
async buildBackend(app, { sync = true } = {}) {
|
|
3957
3965
|
if (sync)
|