cmyr-template-cli 1.24.0 → 1.24.2

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/dist/plopfile.js CHANGED
@@ -537,7 +537,7 @@ async function init(projectPath, answers) {
537
537
  cwd: projectPath,
538
538
  });
539
539
  try {
540
- await asyncExec('mvn clean install -Dmaven.test.skip=true', {
540
+ await asyncExec('mvn dependency:go-offline -B -Dmaven.test.skip=true', {
541
541
  cwd: projectPath,
542
542
  });
543
543
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cmyr-template-cli",
3
- "version": "1.24.0",
3
+ "version": "1.24.2",
4
4
  "description": "草梅友仁自制的项目模板创建器",
5
5
  "author": "CaoMeiYouRen",
6
6
  "license": "MIT",
@@ -1,14 +1,16 @@
1
1
  # 阶段一:下载依赖
2
- FROM golang:alpine as dependencies
2
+ FROM golang:1.21-alpine as dependencies
3
3
 
4
4
  WORKDIR /home/app
5
5
 
6
6
  COPY go.mod go.sum /home/app/
7
7
 
8
- ENV GO111MODULE=on
9
- ENV GOPROXY=https://mirrors.aliyun.com/goproxy/
10
-
11
- RUN go mod download
8
+ RUN go version && \
9
+ go env -w CGO_ENABLED=0 && \
10
+ go env -w GO111MODULE=on && \
11
+ go env -w GOPROXY=https://goproxy.cn,direct && \
12
+ go clean --modcache && \
13
+ go mod download
12
14
 
13
15
  # 阶段二:构建阶段
14
16
  FROM dependencies as builder
@@ -17,7 +19,8 @@ WORKDIR /home/app
17
19
 
18
20
  COPY . /home/app
19
21
 
20
- RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build main.go
22
+ RUN go version && \
23
+ go build main.go
21
24
 
22
25
  # 阶段三:生产阶段
23
26
  FROM scratch
@@ -1,11 +1,9 @@
1
- FROM alpine:latest
1
+ FROM python:3.10-alpine
2
2
 
3
- # 安装python环境
4
- RUN echo "http://mirrors.aliyun.com/alpine/edge/main/" > /etc/apk/repositories \
5
- && echo "http://mirrors.aliyun.com/alpine/edge/community/" >> /etc/apk/repositories \
6
- && apk update \
7
- && apk add --no-cache --update python3 py3-pip \
8
- && python3 -V && pip3 -V \
3
+ WORKDIR /home/app
4
+
5
+ # 安装python3环境和gunicorn环境
6
+ RUN python3 -V && pip3 -V\
9
7
  && ln -sf /usr/bin/pip3 /usr/bin/pip \
10
8
  && mkdir -p ~/.pip \
11
9
  && echo "[global]" > ~/.pip/pip.conf \
@@ -14,14 +12,10 @@ RUN echo "http://mirrors.aliyun.com/alpine/edge/main/" > /etc/apk/repositories \
14
12
  && echo "trusted-host=pypi.tuna.tsinghua.edu.cn" >> ~/.pip/pip.conf \
15
13
  && pip install --upgrade pip && pip install wheel
16
14
 
17
- WORKDIR /home/app
18
-
19
15
  COPY ./requirements.txt /home/app
20
16
 
21
17
  RUN pip install -r requirements.txt
22
18
 
23
19
  COPY . /home/app
24
20
 
25
- EXPOSE 8080
26
-
27
- CMD ["gunicorn", "app:app", "-p", "app.pid", "-b", "0.0.0.0:8080"]
21
+ CMD ["gunicorn", "app:app", "-p", "app.pid", "-b", "0.0.0.0:80"]
@@ -13,6 +13,9 @@ const files = [pkg.main || 'dist/index.js'].map((file) => path.join(projectRoot,
13
13
  console.log('Start analyzing, project root:', projectRoot)
14
14
  const { fileList: fileSet } = await nodeFileTrace(files, {
15
15
  base: projectRoot,
16
+ paths: {
17
+ '@/': 'dist/',
18
+ },
16
19
  })
17
20
  let fileList = Array.from(fileSet)
18
21
  console.log('Total touchable files:', fileList.length)