@lazycatcloud/lzc-cli 1.2.15 → 1.2.16

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.
@@ -71,16 +71,22 @@ export class LpkManifest {
71
71
 
72
72
  async askLpkInfo() {
73
73
  const noEmpty = (value) => value != "";
74
+ const smartAppId = `cloud.lazycat.app.${this.defaultAppID}`;
75
+ const getAppName = (answers) => {
76
+ const fields = answers["package"].split(".");
77
+ return fields[fields.length - 1];
78
+ };
74
79
  return await inquirer.prompt([
75
80
  {
76
81
  type: "input",
77
82
  name: "package",
78
- message: "请输入应用ID, 如 cloud.lazycat.app.video",
83
+ message: `请输入应用ID, 如 ${smartAppId}`,
84
+ default: smartAppId,
79
85
  validate: (input) => {
80
86
  if (isValidPackageName(input)) {
81
87
  return true;
82
88
  } else {
83
- return "应用ID错误,请输入正确的格式, 如 cloud.lazycat.app.video";
89
+ return `应用ID错误,请输入正确的格式, 如 ${smartAppId}`;
84
90
  }
85
91
  },
86
92
  },
@@ -95,9 +101,7 @@ export class LpkManifest {
95
101
  type: "input",
96
102
  name: "subdomain",
97
103
  message: "请输入应用子域名",
98
- default: (answers) => {
99
- return answers["package"].trim();
100
- },
104
+ default: getAppName,
101
105
  validate: (input) => {
102
106
  if (!/^([a-z]|[0-9]|[\-])+$/.test(input)) {
103
107
  return "应用名称只能包含(减号,小写字母,数字),请重新输入";
@@ -109,10 +113,7 @@ export class LpkManifest {
109
113
  type: "input",
110
114
  name: "name",
111
115
  message: "请输入应用名称",
112
- default: (answers) => {
113
- const p = answers["package"];
114
- return `${p}-懒猫云`;
115
- },
116
+ default: getAppName,
116
117
  validate: noEmpty,
117
118
  },
118
119
  {
@@ -353,7 +353,7 @@ export class AppDevShell {
353
353
  logger.debug("use default lzc-cli/devshell image");
354
354
  manifest["application"][
355
355
  "image"
356
- ] = `registry.lazycat.cloud/lzc-cli/devshell:latest`;
356
+ ] = `registry.lazycat.cloud/lzc-cli/devshell:v0.0.5`;
357
357
  return manifest;
358
358
  });
359
359
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazycatcloud/lzc-cli",
3
- "version": "1.2.15",
3
+ "version": "1.2.16",
4
4
  "description": "lazycat cloud developer kit",
5
5
  "files": [
6
6
  "template",
@@ -2,17 +2,5 @@ FROM alpine
2
2
 
3
3
  RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
4
4
 
5
- COPY --from=golang:1.18-alpine /usr/local/go/ /usr/local/go/
6
-
7
- RUN apk add --no-cache openssh musl-dev curl openssl curl nodejs npm sshfs rsync \
5
+ RUN apk add --no-cache openssh musl-dev openssl curl rsync \
8
6
  && echo "root:root" | chpasswd
9
-
10
- EXPOSE 22
11
-
12
- COPY sshd_config /etc/ssh/sshd_config
13
-
14
- COPY entrypoint.sh /entrypoint.sh
15
-
16
- RUN chmod +x /entrypoint.sh
17
-
18
- CMD ["./entrypoint.sh"]
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/sh
2
2
 
3
- VERSION=0.0.4
4
- docker build -f Dockerfile . -t registry.lazycat.cloud/lzc-cli/devshell:$VERSION
5
- docker push registry.lazycat.cloud/lzc-cli/devshell:$VERSION
3
+ VERSION=0.0.5
4
+ docker build -f Dockerfile . -t registry.lazycat.cloud/lzc-cli/devshell:v$VERSION
5
+ docker push registry.lazycat.cloud/lzc-cli/devshell:v$VERSION
@@ -21,7 +21,7 @@ icon: ./lazycat.png
21
21
  # devshell 自定义应用的开发容器环境
22
22
  # - routers 指定应用容器的访问路由
23
23
 
24
- # devshell 没有指定 image 的情况,将会默认使用 registry.lazycat.cloud/lzc-cli/devshell:latest
24
+ # devshell 没有指定 image 的情况,将会默认使用 registry.lazycat.cloud/lzc-cli/devshell:v0.0.5
25
25
  # devshell:
26
26
  # routers:
27
27
  # - /=http://127.0.0.1:8080
@@ -21,7 +21,7 @@ icon: ./lazycat.png
21
21
  # devshell 自定义应用的开发容器环境
22
22
  # - routers 指定应用容器的访问路由
23
23
 
24
- # devshell 没有指定 image 的情况,将会默认使用 registry.lazycat.cloud/lzc-cli/devshell:latest
24
+ # devshell 没有指定 image 的情况,将会默认使用 registry.lazycat.cloud/lzc-cli/devshell:v0.0.5
25
25
  # devshell:
26
26
  # routers:
27
27
  # - /=http://127.0.0.1:8080
@@ -21,7 +21,7 @@ icon: ./lazycat.png
21
21
  # devshell 自定义应用的开发容器环境
22
22
  # - routers 指定应用容器的访问路由
23
23
 
24
- # devshell 没有指定 image 的情况,将会默认使用 registry.lazycat.cloud/lzc-cli/devshell:latest
24
+ # devshell 没有指定 image 的情况,将会默认使用 registry.lazycat.cloud/lzc-cli/devshell:v0.0.5
25
25
  # devshell:
26
26
  # routers:
27
27
  # - /=http://127.0.0.1:8080
@@ -17,11 +17,10 @@ pkgout: ./
17
17
  # icon 指定 lpk 包 icon 的路径路径,如果不指定将会警告
18
18
  # icon 仅仅允许 png 后缀的文件
19
19
  icon: ./lazycat.png
20
-
21
20
  # devshell 自定义应用的开发容器环境
22
21
  # - routers 指定应用容器的访问路由
23
22
 
24
- # devshell 没有指定 image 的情况,将会默认使用 registry.lazycat.cloud/lzc-cli/devshell:latest
23
+ # devshell 没有指定 image 的情况,将会默认使用 registry.lazycat.cloud/lzc-cli/devshell:v0.0.5
25
24
  # devshell:
26
25
  # routers:
27
26
  # - /=http://127.0.0.1:8080
@@ -1,8 +0,0 @@
1
- #!/bin/sh
2
- set -ex
3
-
4
- # generate host keys if not present
5
- ssh-keygen -A
6
-
7
- # do not detach (-D), log to stderr (-e), passthrough other arguments
8
- exec /usr/sbin/sshd -D -e "$@"
@@ -1,117 +0,0 @@
1
- # $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $
2
-
3
- # This is the sshd server system-wide configuration file. See
4
- # sshd_config(5) for more information.
5
-
6
- # This sshd was compiled with PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
7
-
8
- # The strategy used for options in the default sshd_config shipped with
9
- # OpenSSH is to specify options with their default value where
10
- # possible, but leave them commented. Uncommented options override the
11
- # default value.
12
-
13
- # Port 22
14
- #AddressFamily any
15
- #ListenAddress 0.0.0.0
16
- #ListenAddress ::
17
-
18
- #HostKey /etc/ssh/ssh_host_rsa_key
19
- #HostKey /etc/ssh/ssh_host_ecdsa_key
20
- #HostKey /etc/ssh/ssh_host_ed25519_key
21
-
22
- # Ciphers and keying
23
- #RekeyLimit default none
24
-
25
- # Logging
26
- #SyslogFacility AUTH
27
- #LogLevel INFO
28
-
29
- # Authentication:
30
-
31
- #LoginGraceTime 2m
32
- PermitRootLogin yes
33
- #StrictModes yes
34
- #MaxAuthTries 6
35
- #MaxSessions 10
36
-
37
- PubkeyAuthentication yes
38
-
39
- # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
40
- # but this is overridden so installations will only check .ssh/authorized_keys
41
- AuthorizedKeysFile /lzcapp/pkg/content/devshell/authorized_keys
42
-
43
- #AuthorizedPrincipalsFile none
44
-
45
- #AuthorizedKeysCommand none
46
- #AuthorizedKeysCommandUser nobody
47
-
48
- # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
49
- #HostbasedAuthentication no
50
- # Change to yes if you don't trust ~/.ssh/known_hosts for
51
- # HostbasedAuthentication
52
- #IgnoreUserKnownHosts no
53
- # Don't read the user's ~/.rhosts and ~/.shosts files
54
- #IgnoreRhosts yes
55
-
56
- # To disable tunneled clear text passwords, change to no here!
57
- PasswordAuthentication no
58
- PermitEmptyPasswords no
59
-
60
- # Change to no to disable s/key passwords
61
- #KbdInteractiveAuthentication yes
62
-
63
- # Kerberos options
64
- #KerberosAuthentication no
65
- #KerberosOrLocalPasswd yes
66
- #KerberosTicketCleanup yes
67
- #KerberosGetAFSToken no
68
-
69
- # GSSAPI options
70
- #GSSAPIAuthentication no
71
- #GSSAPICleanupCredentials yes
72
-
73
- # Set this to 'yes' to enable PAM authentication, account processing,
74
- # and session processing. If this is enabled, PAM authentication will
75
- # be allowed through the KbdInteractiveAuthentication and
76
- # PasswordAuthentication. Depending on your PAM configuration,
77
- # PAM authentication via KbdInteractiveAuthentication may bypass
78
- # the setting of "PermitRootLogin without-password".
79
- # If you just want the PAM account and session checks to run without
80
- # PAM authentication, then enable this but set PasswordAuthentication
81
- # and KbdInteractiveAuthentication to 'no'.
82
- #UsePAM no
83
-
84
- #AllowAgentForwarding yes
85
- # Feel free to re-enable these if your use case requires them.
86
- AllowTcpForwarding yes
87
- GatewayPorts yes
88
- X11Forwarding no
89
- #X11DisplayOffset 10
90
- #X11UseLocalhost yes
91
- #PermitTTY yes
92
- #PrintMotd yes
93
- #PrintLastLog yes
94
- #TCPKeepAlive yes
95
- #PermitUserEnvironment no
96
- #Compression delayed
97
- ClientAliveInterval 3
98
- ClientAliveCountMax 0
99
- #UseDNS no
100
- #PidFile /run/sshd.pid
101
- #MaxStartups 10:30:100
102
- #PermitTunnel no
103
- #ChrootDirectory none
104
- #VersionAddendum none
105
-
106
- # no default banner path
107
- #Banner none
108
-
109
- # override default of no subsystems
110
- Subsystem sftp /usr/lib/ssh/sftp-server
111
-
112
- # Example of overriding settings on a per-user basis
113
- #Match User anoncvs
114
- # X11Forwarding no
115
- # AllowTcpForwarding no
116
- # PermitTTY no
117
- # ForceCommand cvs server