@lazycatcloud/lzc-cli 1.1.1 → 1.1.4

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.
Files changed (67) hide show
  1. package/cmds/app.js +137 -0
  2. package/cmds/config.js +55 -0
  3. package/cmds/create.js +55 -0
  4. package/cmds/dev.js +122 -0
  5. package/cmds/init.js +125 -0
  6. package/cmds/log.js +103 -0
  7. package/cmds/publish.js +116 -0
  8. package/lib/api.js +34 -36
  9. package/lib/archiver.js +50 -31
  10. package/lib/box/check_qemu.js +27 -0
  11. package/lib/box/hportal.js +114 -0
  12. package/lib/box/index.js +152 -0
  13. package/lib/box/qemu_vm_mgr.js +625 -0
  14. package/lib/box/schemes/vm_box_system_debian.json +47 -0
  15. package/lib/builder.js +154 -35
  16. package/lib/dev.js +51 -32
  17. package/lib/env.js +276 -57
  18. package/lib/generator.js +31 -0
  19. package/lib/git/git-commit.sh +7 -0
  20. package/lib/git/git-reset.sh +15 -0
  21. package/lib/key.js +14 -11
  22. package/lib/sdk.js +7 -10
  23. package/lib/utils.js +149 -53
  24. package/package.json +18 -5
  25. package/scripts/cli.js +134 -70
  26. package/template/_lazycat/app-config +1 -0
  27. package/template/_lazycat/docker-compose.yml.in +3 -5
  28. package/template/golang/README.md +3 -4
  29. package/template/golang/assets/css/bootstrap-responsive.css +26 -23
  30. package/template/golang/assets/css/bootstrap-responsive.min.css +1065 -1
  31. package/template/golang/assets/css/bootstrap.css +733 -362
  32. package/template/golang/assets/css/bootstrap.min.css +5299 -1
  33. package/template/golang/assets/css/rego.css +17 -17
  34. package/template/golang/assets/js/bootstrap.js +1340 -1311
  35. package/template/golang/assets/js/bootstrap.min.js +1240 -5
  36. package/template/golang/assets/js/rego.js +80 -69
  37. package/template/golang/index.html +61 -59
  38. package/template/ionic_vue3/README.md +46 -0
  39. package/template/ionic_vue3/_eslintrc.cjs +24 -0
  40. package/template/ionic_vue3/_gitignore +29 -0
  41. package/template/ionic_vue3/_vscode/extensions.json +6 -0
  42. package/template/ionic_vue3/capacitor.config.ts +10 -0
  43. package/template/ionic_vue3/env.d.ts +1 -0
  44. package/template/ionic_vue3/index.html +13 -0
  45. package/template/ionic_vue3/ionic.config.json +7 -0
  46. package/template/ionic_vue3/package.json +52 -0
  47. package/template/ionic_vue3/postcss.config.js +6 -0
  48. package/template/ionic_vue3/public/favicon.ico +0 -0
  49. package/template/ionic_vue3/src/App.vue +11 -0
  50. package/template/ionic_vue3/src/assets/logo.svg +1 -0
  51. package/template/ionic_vue3/src/index.css +3 -0
  52. package/template/ionic_vue3/src/main.ts +35 -0
  53. package/template/ionic_vue3/src/router/index.ts +15 -0
  54. package/template/ionic_vue3/src/theme/variables.css +231 -0
  55. package/template/ionic_vue3/src/views/Home.vue +38 -0
  56. package/template/ionic_vue3/tailwind.config.js +7 -0
  57. package/template/ionic_vue3/tsconfig.json +16 -0
  58. package/template/ionic_vue3/tsconfig.vite-config.json +8 -0
  59. package/template/ionic_vue3/vite.config.ts +28 -0
  60. package/template/release/golang/build.sh +1 -2
  61. package/template/release/ionic_vue3/Dockerfile +10 -0
  62. package/template/release/ionic_vue3/build.sh +9 -0
  63. package/template/release/ionic_vue3/docker-compose.yml.in +8 -0
  64. package/template/release/vue/Dockerfile +3 -2
  65. package/template/release/vue/build.sh +4 -2
  66. package/template/vue/README.md +5 -0
  67. package/template/vue/babel.config.js +2 -4
@@ -0,0 +1,35 @@
1
+ import { createApp } from "vue"
2
+ import { createPinia } from "pinia"
3
+ import App from "@/App.vue"
4
+ import router from "./router"
5
+ // tailwind
6
+ import "./index.css"
7
+
8
+ // ionic
9
+ import { IonicVue } from "@ionic/vue"
10
+
11
+ // Core CSS required for Ionic components to work properly
12
+ import "@ionic/vue/css/core.css"
13
+
14
+ // /* Basic CSS for apps built with Ionic */
15
+ import "@ionic/vue/css/normalize.css"
16
+ import "@ionic/vue/css/structure.css"
17
+ import "@ionic/vue/css/typography.css"
18
+
19
+ // /* Optional CSS utils that can be commented out */
20
+ import "@ionic/vue/css/padding.css"
21
+ import "@ionic/vue/css/float-elements.css"
22
+ import "@ionic/vue/css/text-alignment.css"
23
+ import "@ionic/vue/css/text-transformation.css"
24
+ import "@ionic/vue/css/flex-utils.css"
25
+ import "@ionic/vue/css/display.css"
26
+
27
+ // import "@/theme/variables.css";
28
+
29
+ const app = createApp(App)
30
+ app.use(IonicVue)
31
+ app.use(createPinia())
32
+ app.use(router)
33
+ router.isReady().then(() => {
34
+ app.mount("#app")
35
+ })
@@ -0,0 +1,15 @@
1
+ import HomeVue from "@/views/Home.vue"
2
+ import { createRouter, createWebHistory } from "@ionic/vue-router"
3
+
4
+ const router = createRouter({
5
+ history: createWebHistory(import.meta.env.BASE_URL),
6
+ routes: [
7
+ {
8
+ path: "/",
9
+ name: "home",
10
+ component: HomeVue,
11
+ },
12
+ ],
13
+ })
14
+
15
+ export default router
@@ -0,0 +1,231 @@
1
+ /* Ionic Variables and Theming. For more info, please see:
2
+ http://ionicframework.com/docs/theming/ */
3
+
4
+ /** Ionic CSS Variables **/
5
+ :root {
6
+ /** primary **/
7
+ --ion-color-primary: #3880ff;
8
+ --ion-color-primary-rgb: 56, 128, 255;
9
+ --ion-color-primary-contrast: #ffffff;
10
+ --ion-color-primary-contrast-rgb: 255, 255, 255;
11
+ --ion-color-primary-shade: #3171e0;
12
+ --ion-color-primary-tint: #4c8dff;
13
+
14
+ /** secondary **/
15
+ --ion-color-secondary: #3dc2ff;
16
+ --ion-color-secondary-rgb: 61, 194, 255;
17
+ --ion-color-secondary-contrast: #ffffff;
18
+ --ion-color-secondary-contrast-rgb: 255, 255, 255;
19
+ --ion-color-secondary-shade: #36abe0;
20
+ --ion-color-secondary-tint: #50c8ff;
21
+
22
+ /** tertiary **/
23
+ --ion-color-tertiary: #5260ff;
24
+ --ion-color-tertiary-rgb: 82, 96, 255;
25
+ --ion-color-tertiary-contrast: #ffffff;
26
+ --ion-color-tertiary-contrast-rgb: 255, 255, 255;
27
+ --ion-color-tertiary-shade: #4854e0;
28
+ --ion-color-tertiary-tint: #6370ff;
29
+
30
+ /** success **/
31
+ --ion-color-success: #2dd36f;
32
+ --ion-color-success-rgb: 45, 211, 111;
33
+ --ion-color-success-contrast: #ffffff;
34
+ --ion-color-success-contrast-rgb: 255, 255, 255;
35
+ --ion-color-success-shade: #28ba62;
36
+ --ion-color-success-tint: #42d77d;
37
+
38
+ /** warning **/
39
+ --ion-color-warning: #ffc409;
40
+ --ion-color-warning-rgb: 255, 196, 9;
41
+ --ion-color-warning-contrast: #000000;
42
+ --ion-color-warning-contrast-rgb: 0, 0, 0;
43
+ --ion-color-warning-shade: #e0ac08;
44
+ --ion-color-warning-tint: #ffca22;
45
+
46
+ /** danger **/
47
+ --ion-color-danger: #eb445a;
48
+ --ion-color-danger-rgb: 235, 68, 90;
49
+ --ion-color-danger-contrast: #ffffff;
50
+ --ion-color-danger-contrast-rgb: 255, 255, 255;
51
+ --ion-color-danger-shade: #cf3c4f;
52
+ --ion-color-danger-tint: #ed576b;
53
+
54
+ /** dark **/
55
+ --ion-color-dark: #222428;
56
+ --ion-color-dark-rgb: 34, 36, 40;
57
+ --ion-color-dark-contrast: #ffffff;
58
+ --ion-color-dark-contrast-rgb: 255, 255, 255;
59
+ --ion-color-dark-shade: #1e2023;
60
+ --ion-color-dark-tint: #383a3e;
61
+
62
+ /** medium **/
63
+ --ion-color-medium: #92949c;
64
+ --ion-color-medium-rgb: 146, 148, 156;
65
+ --ion-color-medium-contrast: #ffffff;
66
+ --ion-color-medium-contrast-rgb: 255, 255, 255;
67
+ --ion-color-medium-shade: #808289;
68
+ --ion-color-medium-tint: #9d9fa6;
69
+
70
+ /** light **/
71
+ --ion-color-light: #f4f5f8;
72
+ --ion-color-light-rgb: 244, 245, 248;
73
+ --ion-color-light-contrast: #000000;
74
+ --ion-color-light-contrast-rgb: 0, 0, 0;
75
+ --ion-color-light-shade: #d7d8da;
76
+ --ion-color-light-tint: #f5f6f9;
77
+ }
78
+
79
+ @media (prefers-color-scheme: dark) {
80
+ /*
81
+ * Dark Colors
82
+ * -------------------------------------------
83
+ */
84
+
85
+ body {
86
+ --ion-color-primary: #428cff;
87
+ --ion-color-primary-rgb: 66, 140, 255;
88
+ --ion-color-primary-contrast: #ffffff;
89
+ --ion-color-primary-contrast-rgb: 255, 255, 255;
90
+ --ion-color-primary-shade: #3a7be0;
91
+ --ion-color-primary-tint: #5598ff;
92
+
93
+ --ion-color-secondary: #50c8ff;
94
+ --ion-color-secondary-rgb: 80, 200, 255;
95
+ --ion-color-secondary-contrast: #ffffff;
96
+ --ion-color-secondary-contrast-rgb: 255, 255, 255;
97
+ --ion-color-secondary-shade: #46b0e0;
98
+ --ion-color-secondary-tint: #62ceff;
99
+
100
+ --ion-color-tertiary: #6a64ff;
101
+ --ion-color-tertiary-rgb: 106, 100, 255;
102
+ --ion-color-tertiary-contrast: #ffffff;
103
+ --ion-color-tertiary-contrast-rgb: 255, 255, 255;
104
+ --ion-color-tertiary-shade: #5d58e0;
105
+ --ion-color-tertiary-tint: #7974ff;
106
+
107
+ --ion-color-success: #2fdf75;
108
+ --ion-color-success-rgb: 47, 223, 117;
109
+ --ion-color-success-contrast: #000000;
110
+ --ion-color-success-contrast-rgb: 0, 0, 0;
111
+ --ion-color-success-shade: #29c467;
112
+ --ion-color-success-tint: #44e283;
113
+
114
+ --ion-color-warning: #ffd534;
115
+ --ion-color-warning-rgb: 255, 213, 52;
116
+ --ion-color-warning-contrast: #000000;
117
+ --ion-color-warning-contrast-rgb: 0, 0, 0;
118
+ --ion-color-warning-shade: #e0bb2e;
119
+ --ion-color-warning-tint: #ffd948;
120
+
121
+ --ion-color-danger: #ff4961;
122
+ --ion-color-danger-rgb: 255, 73, 97;
123
+ --ion-color-danger-contrast: #ffffff;
124
+ --ion-color-danger-contrast-rgb: 255, 255, 255;
125
+ --ion-color-danger-shade: #e04055;
126
+ --ion-color-danger-tint: #ff5b71;
127
+
128
+ --ion-color-dark: #f4f5f8;
129
+ --ion-color-dark-rgb: 244, 245, 248;
130
+ --ion-color-dark-contrast: #000000;
131
+ --ion-color-dark-contrast-rgb: 0, 0, 0;
132
+ --ion-color-dark-shade: #d7d8da;
133
+ --ion-color-dark-tint: #f5f6f9;
134
+
135
+ --ion-color-medium: #989aa2;
136
+ --ion-color-medium-rgb: 152, 154, 162;
137
+ --ion-color-medium-contrast: #000000;
138
+ --ion-color-medium-contrast-rgb: 0, 0, 0;
139
+ --ion-color-medium-shade: #86888f;
140
+ --ion-color-medium-tint: #a2a4ab;
141
+
142
+ --ion-color-light: #222428;
143
+ --ion-color-light-rgb: 34, 36, 40;
144
+ --ion-color-light-contrast: #ffffff;
145
+ --ion-color-light-contrast-rgb: 255, 255, 255;
146
+ --ion-color-light-shade: #1e2023;
147
+ --ion-color-light-tint: #383a3e;
148
+ }
149
+
150
+ /*
151
+ * iOS Dark Theme
152
+ * -------------------------------------------
153
+ */
154
+
155
+ .ios body {
156
+ --ion-background-color: #000000;
157
+ --ion-background-color-rgb: 0, 0, 0;
158
+
159
+ --ion-text-color: #ffffff;
160
+ --ion-text-color-rgb: 255, 255, 255;
161
+
162
+ --ion-color-step-50: #0d0d0d;
163
+ --ion-color-step-100: #1a1a1a;
164
+ --ion-color-step-150: #262626;
165
+ --ion-color-step-200: #333333;
166
+ --ion-color-step-250: #404040;
167
+ --ion-color-step-300: #4d4d4d;
168
+ --ion-color-step-350: #595959;
169
+ --ion-color-step-400: #666666;
170
+ --ion-color-step-450: #737373;
171
+ --ion-color-step-500: #808080;
172
+ --ion-color-step-550: #8c8c8c;
173
+ --ion-color-step-600: #999999;
174
+ --ion-color-step-650: #a6a6a6;
175
+ --ion-color-step-700: #b3b3b3;
176
+ --ion-color-step-750: #bfbfbf;
177
+ --ion-color-step-800: #cccccc;
178
+ --ion-color-step-850: #d9d9d9;
179
+ --ion-color-step-900: #e6e6e6;
180
+ --ion-color-step-950: #f2f2f2;
181
+
182
+ --ion-toolbar-background: #0d0d0d;
183
+
184
+ --ion-item-background: #000000;
185
+
186
+ --ion-card-background: #1c1c1d;
187
+ }
188
+
189
+ /*
190
+ * Material Design Dark Theme
191
+ * -------------------------------------------
192
+ */
193
+
194
+ .md body {
195
+ --ion-background-color: #121212;
196
+ --ion-background-color-rgb: 18, 18, 18;
197
+
198
+ --ion-text-color: #ffffff;
199
+ --ion-text-color-rgb: 255, 255, 255;
200
+
201
+ --ion-border-color: #222222;
202
+
203
+ --ion-color-step-50: #1e1e1e;
204
+ --ion-color-step-100: #2a2a2a;
205
+ --ion-color-step-150: #363636;
206
+ --ion-color-step-200: #414141;
207
+ --ion-color-step-250: #4d4d4d;
208
+ --ion-color-step-300: #595959;
209
+ --ion-color-step-350: #656565;
210
+ --ion-color-step-400: #717171;
211
+ --ion-color-step-450: #7d7d7d;
212
+ --ion-color-step-500: #898989;
213
+ --ion-color-step-550: #949494;
214
+ --ion-color-step-600: #a0a0a0;
215
+ --ion-color-step-650: #acacac;
216
+ --ion-color-step-700: #b8b8b8;
217
+ --ion-color-step-750: #c4c4c4;
218
+ --ion-color-step-800: #d0d0d0;
219
+ --ion-color-step-850: #dbdbdb;
220
+ --ion-color-step-900: #e7e7e7;
221
+ --ion-color-step-950: #f3f3f3;
222
+
223
+ --ion-item-background: #1e1e1e;
224
+
225
+ --ion-toolbar-background: #1f1f1f;
226
+
227
+ --ion-tab-bar-background: #1f1f1f;
228
+
229
+ --ion-card-background: #1e1e1e;
230
+ }
231
+ }
@@ -0,0 +1,38 @@
1
+ <script lang="ts" setup>
2
+ import {
3
+ IonContent,
4
+ IonHeader,
5
+ IonPage,
6
+ IonTitle,
7
+ IonToolbar,
8
+ } from "@ionic/vue"
9
+ </script>
10
+
11
+ <template>
12
+ <ion-page>
13
+ <ion-header :translucent="true">
14
+ <ion-toolbar>
15
+ <ion-title>Lazycat App Template</ion-title>
16
+ </ion-toolbar>
17
+ </ion-header>
18
+
19
+ <ion-content :fullscreen="true">
20
+ <div id="container" class="h-full w-full flex flex-col justify-center">
21
+ <div class="mx-auto">
22
+ <strong>非常滴very good</strong>
23
+ <p>
24
+ We are LNKS
25
+ <a
26
+ target="_blank"
27
+ rel="noopener noreferrer"
28
+ href="https://linakesi.com">
29
+ Click Me!
30
+ </a>
31
+ </p>
32
+ </div>
33
+ </div>
34
+ </ion-content>
35
+ </ion-page>
36
+ </template>
37
+
38
+ <style scoped></style>
@@ -0,0 +1,7 @@
1
+ module.exports = {
2
+ content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"],
3
+ theme: {
4
+ extend: {},
5
+ },
6
+ plugins: [],
7
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "extends": "@vue/tsconfig/tsconfig.web.json",
3
+ "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
4
+ "compilerOptions": {
5
+ "baseUrl": ".",
6
+ "paths": {
7
+ "@/*": ["./src/*"]
8
+ }
9
+ },
10
+
11
+ "references": [
12
+ {
13
+ "path": "./tsconfig.vite-config.json"
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "@vue/tsconfig/tsconfig.node.json",
3
+ "include": ["vite.config.*"],
4
+ "compilerOptions": {
5
+ "composite": true,
6
+ "types": ["node"]
7
+ }
8
+ }
@@ -0,0 +1,28 @@
1
+ import { fileURLToPath, URL } from "url"
2
+
3
+ import { defineConfig } from "vite"
4
+ import vue from "@vitejs/plugin-vue"
5
+ import vueJsx from "@vitejs/plugin-vue-jsx"
6
+
7
+ // https://vitejs.dev/config/
8
+ export default defineConfig({
9
+ plugins: [
10
+ vue({
11
+ // template: {
12
+ // compilerOptions: {
13
+ // // treat all tags with a dash as custom elements
14
+ // isCustomElement: (tag) => tag.includes("-"),
15
+ // },
16
+ // },
17
+ }),
18
+ vueJsx(),
19
+ ],
20
+ resolve: {
21
+ alias: {
22
+ "@": fileURLToPath(new URL("./src", import.meta.url)),
23
+ },
24
+ },
25
+ server: {
26
+ port: 8080,
27
+ },
28
+ })
@@ -1,7 +1,6 @@
1
1
  #!/bin/sh
2
2
  set -ex
3
-
4
- SHELLDIR="$(dirname "$(realpath "$0")")"
3
+ SHELLDIR="$(dirname "$(python -c "import os; print(os.path.abspath('.'))")")"
5
4
 
6
5
  cd "$SHELLDIR"
7
6
 
@@ -0,0 +1,10 @@
1
+ FROM registry.lazycat.cloud/lzc/lzcapp:0.1
2
+
3
+ ARG HTTP_SERVICE_PORT
4
+
5
+ WORKDIR /app
6
+ COPY dist .
7
+ EXPOSE $HTTP_SERVICE_PORT
8
+
9
+ ENV HTTP_SERVICE_PORT ${HTTP_SERVICE_PORT}
10
+ CMD /usr/bin/lzcapp --listen :$HTTP_SERVICE_PORT --www .
@@ -0,0 +1,9 @@
1
+ #!/bin/sh
2
+ set -ex
3
+
4
+
5
+ SHELLDIR="$(dirname "$(python -c "import os; print(os.path.abspath('.'))")")"
6
+
7
+ cd "$SHELLDIR"
8
+
9
+ npm run build
@@ -0,0 +1,8 @@
1
+ services:
2
+ ${APP_ID}:
3
+ image: ${APP_IMAGE_NAME}
4
+ volumes:
5
+ - lzcapis-lzcapp:/lzcapp
6
+
7
+ volumes:
8
+ lzcapis-lzcapp:
@@ -1,4 +1,5 @@
1
- FROM caddy:alpine
1
+ FROM registry.lazycat.cloud/lzc/lzcapp:0.1
2
+
2
3
  ARG HTTP_SERVICE_PORT
3
4
 
4
5
  WORKDIR /app
@@ -6,4 +7,4 @@ COPY dist .
6
7
  EXPOSE $HTTP_SERVICE_PORT
7
8
 
8
9
  ENV HTTP_SERVICE_PORT ${HTTP_SERVICE_PORT}
9
- CMD caddy file-server --listen :$HTTP_SERVICE_PORT
10
+ CMD /usr/bin/lzcapp --listen :$HTTP_SERVICE_PORT --www .
@@ -2,8 +2,10 @@
2
2
  set -ex
3
3
 
4
4
 
5
- SHELLDIR="$(dirname "$(realpath "$0")")"
5
+ SHELLDIR="$(dirname "$(python -c "import os; print(os.path.abspath('.'))")")"
6
6
 
7
- cd "$SHELLDIR"
7
+ # cd "$SHELLDIR"
8
+
9
+ ## 该文件运行时路径为 .lazycat 对应的目录
8
10
 
9
11
  npm run build
@@ -1,24 +1,29 @@
1
1
  # hc_test
2
2
 
3
3
  ## Project setup
4
+
4
5
  ```
5
6
  npm install
6
7
  ```
7
8
 
8
9
  ### Compiles and hot-reloads for development
10
+
9
11
  ```
10
12
  npm run serve
11
13
  ```
12
14
 
13
15
  ### Compiles and minifies for production
16
+
14
17
  ```
15
18
  npm run build
16
19
  ```
17
20
 
18
21
  ### Lints and fixes files
22
+
19
23
  ```
20
24
  npm run lint
21
25
  ```
22
26
 
23
27
  ### Customize configuration
28
+
24
29
  See [Configuration Reference](https://cli.vuejs.org/config/).
@@ -1,5 +1,3 @@
1
1
  module.exports = {
2
- presets: [
3
- '@vue/cli-plugin-babel/preset'
4
- ]
5
- }
2
+ presets: ["@vue/cli-plugin-babel/preset"],
3
+ };