@lazycatcloud/lzc-cli 1.3.16 → 1.3.17
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/changelog.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.3.17](https://gitee.com/linakesi/lzc-cli/compare/v1.3.15...v1.3.17) (2026-03-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* dealing with the error prompt of creating a new app ([6069b28](https://gitee.com/linakesi/lzc-cli/commits/6069b282027c7a6ddbcde45a0ff26156e6745030))
|
|
9
|
+
* playground site url ([5afd2ec](https://gitee.com/linakesi/lzc-cli/commits/5afd2ec5edd8aee51579add5daed3ccaabc4650f))
|
|
10
|
+
* submit the app file size ([7dffe90](https://gitee.com/linakesi/lzc-cli/commits/7dffe90b4a18f6f4b8afd8ace23c836d7fba17a7))
|
|
11
|
+
|
|
3
12
|
## [1.3.16](https://gitee.com/linakesi/lzc-cli/compare/v1.3.13...v1.3.16) (2026-02-28)
|
|
4
13
|
|
|
5
14
|
### Bug Fixes
|
package/lib/appstore/publish.js
CHANGED
|
@@ -107,15 +107,33 @@ async function askPublishAppInfo(baseUrl, manifest, locale) {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
async function askWhetherCreateLPK(baseUrl, manifest, locale) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
110
|
+
try {
|
|
111
|
+
// 是否允许创建应用预检请求
|
|
112
|
+
const _options = await request(`${baseUrl}/app/create`, {
|
|
113
|
+
method: 'OPTIONS',
|
|
114
|
+
});
|
|
115
|
+
logger.debug('create app preflight:', { url: _options.url, ok: _options.ok, status: _options.status });
|
|
116
|
+
if (!_options.ok || _options.status < 199 || _options.status > 299) {
|
|
117
|
+
throw undefined;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// 要求输入应用信息
|
|
121
|
+
const answers = await inquirer.prompt([
|
|
122
|
+
{
|
|
123
|
+
name: 'continue',
|
|
124
|
+
type: 'input',
|
|
125
|
+
message: t(
|
|
126
|
+
'lzc_cli.lib.publish.ask_whether_create_lpk_continue_prompt',
|
|
127
|
+
'检测到您当前的应用,还没有在懒猫微服中创建,是否使用当前的安装包中的信息进行创建? [y/n]',
|
|
128
|
+
),
|
|
129
|
+
default: 'y',
|
|
130
|
+
},
|
|
131
|
+
]);
|
|
132
|
+
if (answers.continue.toLowerCase() != 'y') {
|
|
133
|
+
throw undefined;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// 发送创建应用请求
|
|
119
137
|
const appInfo = await askPublishAppInfo(baseUrl, manifest, locale);
|
|
120
138
|
const crateAppRes = await request(`${baseUrl}/app/create`, {
|
|
121
139
|
method: 'POST',
|
|
@@ -127,9 +145,28 @@ async function askWhetherCreateLPK(baseUrl, manifest, locale) {
|
|
|
127
145
|
source_author: appInfo.author,
|
|
128
146
|
}),
|
|
129
147
|
});
|
|
130
|
-
logger.debug('create app res:
|
|
131
|
-
|
|
132
|
-
|
|
148
|
+
logger.debug('create app res:', await crateAppRes.text());
|
|
149
|
+
if (!crateAppRes.ok) {
|
|
150
|
+
const data = await crateAppRes.json();
|
|
151
|
+
throw new Error(data?.message || `status:${crateAppRes.status} statusText:${crateAppRes.statusText}`);
|
|
152
|
+
}
|
|
153
|
+
logger.info(
|
|
154
|
+
t('lzc_cli.lib.publish.ask_whether_create_lpk_success_tips', `创建 {{ package }} 应用成功!`, {
|
|
155
|
+
package: manifest['package'],
|
|
156
|
+
interpolation: { escapeValue: false },
|
|
157
|
+
}),
|
|
158
|
+
);
|
|
159
|
+
} catch (error) {
|
|
160
|
+
if (error) {
|
|
161
|
+
logger.debug('create app failed: ', error.message ?? 'unknown');
|
|
162
|
+
logger.error(
|
|
163
|
+
t('lzc_cli.lib.publish.ask_whether_create_lpk_failed_tips', `创建 {{ package }} 应用失败!`, {
|
|
164
|
+
package: manifest['package'],
|
|
165
|
+
interpolation: { escapeValue: false },
|
|
166
|
+
}),
|
|
167
|
+
error.message || '',
|
|
168
|
+
);
|
|
169
|
+
}
|
|
133
170
|
logger.info(
|
|
134
171
|
t(
|
|
135
172
|
'lzc_cli.lib.publish.ask_whether_create_lpk_fail_tips',
|
|
@@ -212,7 +249,7 @@ export class Publish {
|
|
|
212
249
|
|
|
213
250
|
const { manifest, appIdExisted } = await this.checkAppIdExist(pkgPath);
|
|
214
251
|
if (!appIdExisted) {
|
|
215
|
-
await askWhetherCreateLPK(this.baseUrl, manifest,
|
|
252
|
+
await askWhetherCreateLPK(this.baseUrl, manifest, currentLocale);
|
|
216
253
|
}
|
|
217
254
|
|
|
218
255
|
await autoLogin();
|
|
@@ -239,7 +276,7 @@ export class Publish {
|
|
|
239
276
|
logger.error(
|
|
240
277
|
t('lzc_cli.lib.publish.publish_lpk_fail_tips', `LPK 文件上传失败,err: {{ message }}`, {
|
|
241
278
|
message: lpkInfo?.message ?? lpkInfo,
|
|
242
|
-
interpolation: { escapeValue: false }
|
|
279
|
+
interpolation: { escapeValue: false },
|
|
243
280
|
}),
|
|
244
281
|
);
|
|
245
282
|
throw new Error(lpkInfo?.message ?? lpkInfo);
|
|
@@ -253,7 +290,7 @@ export class Publish {
|
|
|
253
290
|
|
|
254
291
|
// changelogs 本地化
|
|
255
292
|
const langKey = getLanguageForLocale(currentLocale);
|
|
256
|
-
changelogs[langKey] = changelog
|
|
293
|
+
changelogs[langKey] = changelog;
|
|
257
294
|
}
|
|
258
295
|
logger.debug('publish changelogs is', changelogs);
|
|
259
296
|
|
|
@@ -270,6 +307,8 @@ export class Publish {
|
|
|
270
307
|
pkg_path: lpkInfo.url,
|
|
271
308
|
unsupported_platforms: lpkInfo.unsupportedPlatforms,
|
|
272
309
|
min_os_version: lpkInfo.minOsVersion,
|
|
310
|
+
lpk_size: lpkInfo.lpkSize,
|
|
311
|
+
image_size: lpkInfo.imageSize,
|
|
273
312
|
changelogs,
|
|
274
313
|
},
|
|
275
314
|
};
|
|
@@ -197,6 +197,7 @@
|
|
|
197
197
|
"ask_publish_app_info_package_validate": "The application bundle identifier does not comply with the specification. It is recommended to use reverse domain name notation.",
|
|
198
198
|
"ask_publish_app_info_source_prompt": "Please enter the application source (original applications are optional):",
|
|
199
199
|
"ask_whether_create_lpk_continue_prompt": "It is detected that your current application has not been created in Lazycat LCMD. Do you want to use the information in the current installation package to create it? [y/n]",
|
|
200
|
+
"ask_whether_create_lpk_failed_tips": "Failed to create {{package}} application!",
|
|
200
201
|
"ask_whether_create_lpk_fail_tips": "The application you currently want to publish has not been created in the 'Developer Center of Lazy Mao Microservice'. Please follow the steps below to create it:\n\n1. Open the browser https://developer.lazycat.cloud/manage\n2. Log in to your developer account\n3. After logging in successfully, you can view the applications in your account and manage your applications.\n4. Click 'Add' and fill in the information based on your application.\n5. After filling in, click Create\n6. After successful creation, you can publish the application through 'lzc-cli appstore publish'",
|
|
201
202
|
"ask_whether_create_lpk_success_tips": "Created {{package}} application successfully!",
|
|
202
203
|
"check_app_id_exist_fail_tips": "Check whether there is an error in the application. The error status code is:",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"lpk_cmd_devshell_args_force_desc": "强制重新构建",
|
|
23
23
|
"lpk_cmd_devshell_desc": "进入盒子的开发环境",
|
|
24
24
|
"lpk_cmd_index_rags_apk_desc": "是否生成APK(y/n)",
|
|
25
|
-
"lpk_cmd_install_args_ssh_private_key_desc": "指定安装时用于连接设备的 SSH 私钥路径(兼容别名: --ssh-key)",
|
|
26
25
|
"lpk_cmd_init_desc": "初始化懒猫云应用(提供最基础的模板)",
|
|
27
26
|
"lpk_cmd_init_success": "应用初始化完成",
|
|
27
|
+
"lpk_cmd_install_args_ssh_private_key_desc": "指定安装时用于连接设备的 SSH 私钥路径(兼容别名: --ssh-key)",
|
|
28
28
|
"lpk_cmd_install_desc": "部署应用至设备, pkgPath 可以为路径,或者https://,http://请求地址, 如果不填写,将默认为当前目录下的lpk",
|
|
29
29
|
"lpk_cmd_log_args_follow_desc": "持续输出",
|
|
30
30
|
"lpk_cmd_log_desc": "查看某一个app的日志",
|
|
@@ -198,6 +198,7 @@
|
|
|
198
198
|
"ask_publish_app_info_source_prompt": "请输入应用来源(原创应用可不填):",
|
|
199
199
|
"ask_whether_create_lpk_continue_prompt": "检测到您当前的应用,还没有在懒猫微服中创建,是否使用当前的安装包中的信息进行创建? [y/n]",
|
|
200
200
|
"ask_whether_create_lpk_fail_tips": "当前想发布的应用没有在 '懒猫微服的开发者中心' 创建,请按照以下步骤创建:\n\n1. 浏览器打开 https://developer.lazycat.cloud/manage\n2. 登录您的开发者帐号\n3. 登录成功后,您可以查看到您帐号中的应用,同时您也可以对您的应用进行管理\n4. 点击 '新增',根据您的应用信息进行填写\n5. 填写完成后,点击创建即可\n6. 创建成功后,您可以通过 'lzc-cli appstore publish' 来发布应用了\n",
|
|
201
|
+
"ask_whether_create_lpk_failed_tips": "创建 {{ package }} 应用失败!",
|
|
201
202
|
"ask_whether_create_lpk_success_tips": "创建 {{ package }} 应用成功!",
|
|
202
203
|
"check_app_id_exist_fail_tips": "检测应用是否存在出错, 错误状态码为: ",
|
|
203
204
|
"pre_check_fail_tips": "不能发布一个devshell的版本,请重新使用 `lzc-cli project build` 构建",
|