@akanjs/cli 0.9.16 → 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 +11 -6
- package/esm/index.js +11 -6
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -801,15 +801,17 @@ var makeDockerfile = (type, config, props) => {
|
|
|
801
801
|
const command = config.command ?? ["node", "main.js"];
|
|
802
802
|
const content = `${imageScript}
|
|
803
803
|
RUN ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
|
|
804
|
-
RUN apt
|
|
805
|
-
RUN apt
|
|
804
|
+
RUN apt update && apt upgrade -y
|
|
805
|
+
RUN apt install -y git redis build-essential python3 ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils udev ffmpeg
|
|
806
806
|
ARG TARGETARCH
|
|
807
|
-
RUN if [ "$TARGETARCH" = "amd64" ]; then wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-debian92-x86_64-100.3.1.deb && apt
|
|
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/*
|
|
809
810
|
RUN mkdir -p /workspace
|
|
810
811
|
WORKDIR /workspace
|
|
811
812
|
COPY ./package.json ./package.json
|
|
812
813
|
RUN npx pnpm i --prod
|
|
814
|
+
${postRunScripts.join("\n")}
|
|
813
815
|
COPY . .
|
|
814
816
|
ENV PORT=8080
|
|
815
817
|
ENV NODE_OPTIONS=--max_old_space_size=8192
|
|
@@ -818,7 +820,6 @@ ENV NEXT_PUBLIC_SERVE_DOMAIN=${serveDomain}
|
|
|
818
820
|
ENV NEXT_PUBLIC_APP_NAME=${name}
|
|
819
821
|
ENV NEXT_PUBLIC_ENV=${env}
|
|
820
822
|
ENV NEXT_PUBLIC_OPERATION_MODE=cloud
|
|
821
|
-
${postRunScripts.join("\n")}
|
|
822
823
|
CMD [${command.map((c) => `"${c}"`).join(",")}]`;
|
|
823
824
|
return {
|
|
824
825
|
content,
|
|
@@ -4048,7 +4049,7 @@ var ApplicationRunner = class {
|
|
|
4048
4049
|
const { env } = await this.#prepareCommand(app, "build", "frontend");
|
|
4049
4050
|
const akanConfig = await app.getConfig("build");
|
|
4050
4051
|
await app.spawn("npx", ["next", "build", "--no-lint"], { env, ...spawnOptions });
|
|
4051
|
-
const buildResult = await esbuild2.build({
|
|
4052
|
+
const buildResult = process.env.USE_AKANJS_PKGS === "true" ? await esbuild2.build({
|
|
4052
4053
|
entryPoints: [`${app.cwdPath}/next.config.ts`],
|
|
4053
4054
|
outdir: `${app.dist.cwdPath}/frontend`,
|
|
4054
4055
|
bundle: true,
|
|
@@ -4057,7 +4058,11 @@ var ApplicationRunner = class {
|
|
|
4057
4058
|
format: "esm",
|
|
4058
4059
|
write: false,
|
|
4059
4060
|
logLevel: "warning"
|
|
4060
|
-
})
|
|
4061
|
+
}) : {
|
|
4062
|
+
outputFiles: [
|
|
4063
|
+
{ path: `${app.dist.cwdPath}/frontend/next.config.ts`, text: app.readFile("next.config.ts") }
|
|
4064
|
+
]
|
|
4065
|
+
};
|
|
4061
4066
|
const rootPackageJson = app.workspace.readJson("package.json");
|
|
4062
4067
|
const dependencies = extractDependencies(buildResult.outputFiles, rootPackageJson, ["next", "react", "react-dom"]);
|
|
4063
4068
|
buildResult.outputFiles.map((file) => app.dist.writeFile(file.path, file.text));
|
package/esm/index.js
CHANGED
|
@@ -781,15 +781,17 @@ var makeDockerfile = (type, config, props) => {
|
|
|
781
781
|
const command = config.command ?? ["node", "main.js"];
|
|
782
782
|
const content = `${imageScript}
|
|
783
783
|
RUN ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
|
|
784
|
-
RUN apt
|
|
785
|
-
RUN apt
|
|
784
|
+
RUN apt update && apt upgrade -y
|
|
785
|
+
RUN apt install -y git redis build-essential python3 ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils udev ffmpeg
|
|
786
786
|
ARG TARGETARCH
|
|
787
|
-
RUN if [ "$TARGETARCH" = "amd64" ]; then wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-debian92-x86_64-100.3.1.deb && apt
|
|
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/*
|
|
789
790
|
RUN mkdir -p /workspace
|
|
790
791
|
WORKDIR /workspace
|
|
791
792
|
COPY ./package.json ./package.json
|
|
792
793
|
RUN npx pnpm i --prod
|
|
794
|
+
${postRunScripts.join("\n")}
|
|
793
795
|
COPY . .
|
|
794
796
|
ENV PORT=8080
|
|
795
797
|
ENV NODE_OPTIONS=--max_old_space_size=8192
|
|
@@ -798,7 +800,6 @@ ENV NEXT_PUBLIC_SERVE_DOMAIN=${serveDomain}
|
|
|
798
800
|
ENV NEXT_PUBLIC_APP_NAME=${name}
|
|
799
801
|
ENV NEXT_PUBLIC_ENV=${env}
|
|
800
802
|
ENV NEXT_PUBLIC_OPERATION_MODE=cloud
|
|
801
|
-
${postRunScripts.join("\n")}
|
|
802
803
|
CMD [${command.map((c) => `"${c}"`).join(",")}]`;
|
|
803
804
|
return {
|
|
804
805
|
content,
|
|
@@ -4030,7 +4031,7 @@ var ApplicationRunner = class {
|
|
|
4030
4031
|
const { env } = await this.#prepareCommand(app, "build", "frontend");
|
|
4031
4032
|
const akanConfig = await app.getConfig("build");
|
|
4032
4033
|
await app.spawn("npx", ["next", "build", "--no-lint"], { env, ...spawnOptions });
|
|
4033
|
-
const buildResult = await esbuild2.build({
|
|
4034
|
+
const buildResult = process.env.USE_AKANJS_PKGS === "true" ? await esbuild2.build({
|
|
4034
4035
|
entryPoints: [`${app.cwdPath}/next.config.ts`],
|
|
4035
4036
|
outdir: `${app.dist.cwdPath}/frontend`,
|
|
4036
4037
|
bundle: true,
|
|
@@ -4039,7 +4040,11 @@ var ApplicationRunner = class {
|
|
|
4039
4040
|
format: "esm",
|
|
4040
4041
|
write: false,
|
|
4041
4042
|
logLevel: "warning"
|
|
4042
|
-
})
|
|
4043
|
+
}) : {
|
|
4044
|
+
outputFiles: [
|
|
4045
|
+
{ path: `${app.dist.cwdPath}/frontend/next.config.ts`, text: app.readFile("next.config.ts") }
|
|
4046
|
+
]
|
|
4047
|
+
};
|
|
4043
4048
|
const rootPackageJson = app.workspace.readJson("package.json");
|
|
4044
4049
|
const dependencies = extractDependencies(buildResult.outputFiles, rootPackageJson, ["next", "react", "react-dom"]);
|
|
4045
4050
|
buildResult.outputFiles.map((file) => app.dist.writeFile(file.path, file.text));
|