@akanjs/cli 0.9.17 → 0.9.18
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 +7 -3
- package/esm/index.js +7 -3
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -811,6 +811,7 @@ RUN mkdir -p /workspace
|
|
|
811
811
|
WORKDIR /workspace
|
|
812
812
|
COPY ./package.json ./package.json
|
|
813
813
|
RUN npx pnpm i --prod
|
|
814
|
+
${postRunScripts.join("\n")}
|
|
814
815
|
COPY . .
|
|
815
816
|
ENV PORT=8080
|
|
816
817
|
ENV NODE_OPTIONS=--max_old_space_size=8192
|
|
@@ -819,7 +820,6 @@ ENV NEXT_PUBLIC_SERVE_DOMAIN=${serveDomain}
|
|
|
819
820
|
ENV NEXT_PUBLIC_APP_NAME=${name}
|
|
820
821
|
ENV NEXT_PUBLIC_ENV=${env}
|
|
821
822
|
ENV NEXT_PUBLIC_OPERATION_MODE=cloud
|
|
822
|
-
${postRunScripts.join("\n")}
|
|
823
823
|
CMD [${command.map((c) => `"${c}"`).join(",")}]`;
|
|
824
824
|
return {
|
|
825
825
|
content,
|
|
@@ -4049,7 +4049,7 @@ var ApplicationRunner = class {
|
|
|
4049
4049
|
const { env } = await this.#prepareCommand(app, "build", "frontend");
|
|
4050
4050
|
const akanConfig = await app.getConfig("build");
|
|
4051
4051
|
await app.spawn("npx", ["next", "build", "--no-lint"], { env, ...spawnOptions });
|
|
4052
|
-
const buildResult = await esbuild2.build({
|
|
4052
|
+
const buildResult = process.env.USE_AKANJS_PKGS === "true" ? await esbuild2.build({
|
|
4053
4053
|
entryPoints: [`${app.cwdPath}/next.config.ts`],
|
|
4054
4054
|
outdir: `${app.dist.cwdPath}/frontend`,
|
|
4055
4055
|
bundle: true,
|
|
@@ -4058,7 +4058,11 @@ var ApplicationRunner = class {
|
|
|
4058
4058
|
format: "esm",
|
|
4059
4059
|
write: false,
|
|
4060
4060
|
logLevel: "warning"
|
|
4061
|
-
})
|
|
4061
|
+
}) : {
|
|
4062
|
+
outputFiles: [
|
|
4063
|
+
{ path: `${app.dist.cwdPath}/frontend/next.config.ts`, text: app.readFile("next.config.ts") }
|
|
4064
|
+
]
|
|
4065
|
+
};
|
|
4062
4066
|
const rootPackageJson = app.workspace.readJson("package.json");
|
|
4063
4067
|
const dependencies = extractDependencies(buildResult.outputFiles, rootPackageJson, ["next", "react", "react-dom"]);
|
|
4064
4068
|
buildResult.outputFiles.map((file) => app.dist.writeFile(file.path, file.text));
|
package/esm/index.js
CHANGED
|
@@ -791,6 +791,7 @@ RUN mkdir -p /workspace
|
|
|
791
791
|
WORKDIR /workspace
|
|
792
792
|
COPY ./package.json ./package.json
|
|
793
793
|
RUN npx pnpm i --prod
|
|
794
|
+
${postRunScripts.join("\n")}
|
|
794
795
|
COPY . .
|
|
795
796
|
ENV PORT=8080
|
|
796
797
|
ENV NODE_OPTIONS=--max_old_space_size=8192
|
|
@@ -799,7 +800,6 @@ ENV NEXT_PUBLIC_SERVE_DOMAIN=${serveDomain}
|
|
|
799
800
|
ENV NEXT_PUBLIC_APP_NAME=${name}
|
|
800
801
|
ENV NEXT_PUBLIC_ENV=${env}
|
|
801
802
|
ENV NEXT_PUBLIC_OPERATION_MODE=cloud
|
|
802
|
-
${postRunScripts.join("\n")}
|
|
803
803
|
CMD [${command.map((c) => `"${c}"`).join(",")}]`;
|
|
804
804
|
return {
|
|
805
805
|
content,
|
|
@@ -4031,7 +4031,7 @@ var ApplicationRunner = class {
|
|
|
4031
4031
|
const { env } = await this.#prepareCommand(app, "build", "frontend");
|
|
4032
4032
|
const akanConfig = await app.getConfig("build");
|
|
4033
4033
|
await app.spawn("npx", ["next", "build", "--no-lint"], { env, ...spawnOptions });
|
|
4034
|
-
const buildResult = await esbuild2.build({
|
|
4034
|
+
const buildResult = process.env.USE_AKANJS_PKGS === "true" ? await esbuild2.build({
|
|
4035
4035
|
entryPoints: [`${app.cwdPath}/next.config.ts`],
|
|
4036
4036
|
outdir: `${app.dist.cwdPath}/frontend`,
|
|
4037
4037
|
bundle: true,
|
|
@@ -4040,7 +4040,11 @@ var ApplicationRunner = class {
|
|
|
4040
4040
|
format: "esm",
|
|
4041
4041
|
write: false,
|
|
4042
4042
|
logLevel: "warning"
|
|
4043
|
-
})
|
|
4043
|
+
}) : {
|
|
4044
|
+
outputFiles: [
|
|
4045
|
+
{ path: `${app.dist.cwdPath}/frontend/next.config.ts`, text: app.readFile("next.config.ts") }
|
|
4046
|
+
]
|
|
4047
|
+
};
|
|
4044
4048
|
const rootPackageJson = app.workspace.readJson("package.json");
|
|
4045
4049
|
const dependencies = extractDependencies(buildResult.outputFiles, rootPackageJson, ["next", "react", "react-dom"]);
|
|
4046
4050
|
buildResult.outputFiles.map((file) => app.dist.writeFile(file.path, file.text));
|