@kevisual/cli 0.0.93 → 0.0.94

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.
@@ -68872,11 +68872,18 @@ var initLightCode = async (opts) => {
68872
68872
  if (routerItem.path?.includes("auth") || routerItem.path?.includes("router") || routerItem.path?.includes("call")) {
68873
68873
  continue;
68874
68874
  }
68875
+ const metadata = routerItem.metadata || {};
68876
+ if (metadata.tags && Array.isArray(metadata.tags)) {
68877
+ metadata.tags.push("light-code");
68878
+ } else {
68879
+ metadata.tags = ["light-code"];
68880
+ }
68875
68881
  app.route({
68876
68882
  id: routerItem.id,
68877
- path: routerItem.id,
68883
+ path: `${routerItem.id}__${routerItem.path}`,
68884
+ key: routerItem.key,
68878
68885
  description: routerItem.description || "",
68879
- metadata: routerItem.metadata || {},
68886
+ metadata,
68880
68887
  middleware: ["auth"]
68881
68888
  }).define(async (ctx) => {
68882
68889
  const tokenUser = ctx.state?.tokenUser || {};
@@ -68991,7 +68998,8 @@ class AssistantApp extends Manager2 {
68991
68998
  if (isConnect) {
68992
68999
  remoteApp.listenProxy();
68993
69000
  this.remoteIsConnected = true;
68994
- remoteApp.emitter.once("close", () => {
69001
+ remoteApp.emitter.removeAllListeners("close");
69002
+ remoteApp.emitter.on("close", () => {
68995
69003
  setTimeout(() => {
68996
69004
  if (remoteApp.isError) {
68997
69005
  console.error("远程应用发生错误,不重连");
@@ -69091,8 +69099,8 @@ class AssistantApp extends Manager2 {
69091
69099
  remoteApp.listenProxy();
69092
69100
  this.attemptedConnectTimes = 0;
69093
69101
  console.log("重新连接到了远程应用服务器");
69094
- this.reconnectRemoteApp();
69095
69102
  } else {
69103
+ this.reconnectRemoteApp();
69096
69104
  setTimeout(() => {
69097
69105
  this.initRouterApp();
69098
69106
  }, 30 * 1000 + this.attemptedConnectTimes * 10 * 1000);
@@ -111273,11 +111273,18 @@ var initLightCode = async (opts) => {
111273
111273
  if (routerItem.path?.includes("auth") || routerItem.path?.includes("router") || routerItem.path?.includes("call")) {
111274
111274
  continue;
111275
111275
  }
111276
+ const metadata = routerItem.metadata || {};
111277
+ if (metadata.tags && Array.isArray(metadata.tags)) {
111278
+ metadata.tags.push("light-code");
111279
+ } else {
111280
+ metadata.tags = ["light-code"];
111281
+ }
111276
111282
  app.route({
111277
111283
  id: routerItem.id,
111278
- path: routerItem.id,
111284
+ path: `${routerItem.id}__${routerItem.path}`,
111285
+ key: routerItem.key,
111279
111286
  description: routerItem.description || "",
111280
- metadata: routerItem.metadata || {},
111287
+ metadata,
111281
111288
  middleware: ["auth"]
111282
111289
  }).define(async (ctx) => {
111283
111290
  const tokenUser = ctx.state?.tokenUser || {};
@@ -111392,7 +111399,8 @@ class AssistantApp extends Manager2 {
111392
111399
  if (isConnect) {
111393
111400
  remoteApp.listenProxy();
111394
111401
  this.remoteIsConnected = true;
111395
- remoteApp.emitter.once("close", () => {
111402
+ remoteApp.emitter.removeAllListeners("close");
111403
+ remoteApp.emitter.on("close", () => {
111396
111404
  setTimeout(() => {
111397
111405
  if (remoteApp.isError) {
111398
111406
  console.error("远程应用发生错误,不重连");
@@ -111492,8 +111500,8 @@ class AssistantApp extends Manager2 {
111492
111500
  remoteApp.listenProxy();
111493
111501
  this.attemptedConnectTimes = 0;
111494
111502
  console.log("重新连接到了远程应用服务器");
111495
- this.reconnectRemoteApp();
111496
111503
  } else {
111504
+ this.reconnectRemoteApp();
111497
111505
  setTimeout(() => {
111498
111506
  this.initRouterApp();
111499
111507
  }, 30 * 1000 + this.attemptedConnectTimes * 10 * 1000);
package/dist/assistant.js CHANGED
@@ -64124,11 +64124,18 @@ var initLightCode = async (opts) => {
64124
64124
  if (routerItem.path?.includes("auth") || routerItem.path?.includes("router") || routerItem.path?.includes("call")) {
64125
64125
  continue;
64126
64126
  }
64127
+ const metadata = routerItem.metadata || {};
64128
+ if (metadata.tags && Array.isArray(metadata.tags)) {
64129
+ metadata.tags.push("light-code");
64130
+ } else {
64131
+ metadata.tags = ["light-code"];
64132
+ }
64127
64133
  app.route({
64128
64134
  id: routerItem.id,
64129
- path: routerItem.id,
64135
+ path: `${routerItem.id}__${routerItem.path}`,
64136
+ key: routerItem.key,
64130
64137
  description: routerItem.description || "",
64131
- metadata: routerItem.metadata || {},
64138
+ metadata,
64132
64139
  middleware: ["auth"]
64133
64140
  }).define(async (ctx) => {
64134
64141
  const tokenUser = ctx.state?.tokenUser || {};
@@ -64243,7 +64250,8 @@ class AssistantApp extends Manager2 {
64243
64250
  if (isConnect) {
64244
64251
  remoteApp.listenProxy();
64245
64252
  this.remoteIsConnected = true;
64246
- remoteApp.emitter.once("close", () => {
64253
+ remoteApp.emitter.removeAllListeners("close");
64254
+ remoteApp.emitter.on("close", () => {
64247
64255
  setTimeout(() => {
64248
64256
  if (remoteApp.isError) {
64249
64257
  console.error("远程应用发生错误,不重连");
@@ -64343,8 +64351,8 @@ class AssistantApp extends Manager2 {
64343
64351
  remoteApp.listenProxy();
64344
64352
  this.attemptedConnectTimes = 0;
64345
64353
  console.log("重新连接到了远程应用服务器");
64346
- this.reconnectRemoteApp();
64347
64354
  } else {
64355
+ this.reconnectRemoteApp();
64348
64356
  setTimeout(() => {
64349
64357
  this.initRouterApp();
64350
64358
  }, 30 * 1000 + this.attemptedConnectTimes * 10 * 1000);
@@ -64616,8 +64624,8 @@ var assistantConfig2 = new AssistantConfig({
64616
64624
  import fs11 from "fs";
64617
64625
  var version2 = "0.0.1";
64618
64626
  try {
64619
- if ("0.0.7")
64620
- version2 = "0.0.7";
64627
+ if ("0.0.8")
64628
+ version2 = "0.0.8";
64621
64629
  } catch (e) {}
64622
64630
  program.name("asst").description("A CLI tool with envison").version(version2, "-v, --version", "output the current version");
64623
64631
  var ls = new Command("ls").description("List files in the current directory").action(() => {
package/dist/envision.js CHANGED
@@ -22327,8 +22327,8 @@ InitEnv.init();
22327
22327
  var version = useContextKey("version", () => {
22328
22328
  let version2 = "0.0.64";
22329
22329
  try {
22330
- if ("0.0.93")
22331
- version2 = "0.0.93";
22330
+ if ("0.0.94")
22331
+ version2 = "0.0.94";
22332
22332
  } catch (e) {}
22333
22333
  return version2;
22334
22334
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kevisual/cli",
3
- "version": "0.0.93",
3
+ "version": "0.0.94",
4
4
  "description": "envision 命令行工具",
5
5
  "type": "module",
6
6
  "basename": "/root/cli",