@ones-open/cli 1.0.1-21670.1926 → 1.0.1-24501.1930

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/index.cjs CHANGED
@@ -16,7 +16,6 @@ const envPaths = require("env-paths");
16
16
  const zod = require("zod");
17
17
  const axios = require("axios");
18
18
  const _reduceInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/reduce");
19
- const _defineProperty = require("@babel/runtime-corejs3/helpers/defineProperty");
20
19
  const WebSocket = require("ws");
21
20
  const http = require("node:http");
22
21
  const ora = require("ora");
@@ -25,7 +24,7 @@ const getPort = require("get-port");
25
24
  const uuid = require("uuid");
26
25
  var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
27
26
  const en = {
28
- "desc.ones": "cli for ones",
27
+ "desc.ones": "ONES CLI/{version}",
29
28
  "desc.build": "build the application",
30
29
  "desc.build.output": "specify the output file path",
31
30
  "desc.dev": "develop the application",
@@ -546,11 +545,15 @@ const normalize$9 = async (options) => {
546
545
  const MAX_RELAY_BODY_BYTES = 64 * 1024 * 1024;
547
546
  class TunnelClient {
548
547
  constructor(localPort, baseUrl, appID, hostedToken) {
549
- _defineProperty(this, "ws", null);
548
+ let enableInternalManifestRoute = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true;
549
+ let replaceExisting = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : true;
550
+ this.ws = null;
550
551
  this.localPort = localPort;
551
552
  this.baseUrl = baseUrl;
552
553
  this.appID = appID;
553
554
  this.hostedToken = hostedToken;
555
+ this.enableInternalManifestRoute = enableInternalManifestRoute;
556
+ this.replaceExisting = replaceExisting;
554
557
  }
555
558
  async connect() {
556
559
  const proxyUrl = this.buildProxyUrl();
@@ -588,6 +591,7 @@ class TunnelClient {
588
591
  const url = new URL("/platform/app/relay/", this.baseUrl);
589
592
  url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
590
593
  url.searchParams.set("app_id", this.appID);
594
+ url.searchParams.set("replace_existing", String(this.replaceExisting));
591
595
  return url.toString();
592
596
  }
593
597
  parseMessage(data) {
@@ -608,7 +612,7 @@ class TunnelClient {
608
612
  if (!request) {
609
613
  return;
610
614
  }
611
- if (request.path === ONES_CLI_MANIFEST_PATH) {
615
+ if (this.enableInternalManifestRoute && request.path === ONES_CLI_INTERNAL_MANIFEST_PATH) {
612
616
  const appManifest = getAppManifestJSON().app;
613
617
  const baseURL = await buildTunnelUrl();
614
618
  const reply = {
@@ -791,7 +795,7 @@ class TunnelClient {
791
795
  return null;
792
796
  }
793
797
  }
794
- const ONES_CLI_MANIFEST_PATH = "/__ones_cli_manifest__";
798
+ const ONES_CLI_INTERNAL_MANIFEST_PATH = "/__ones_cli_internal_manifest__";
795
799
  const buildTunnelContext = async () => {
796
800
  var _appManifestJSON$app$, _appManifestJSON$app;
797
801
  const appManifestJSON = getAppManifestJSON();
@@ -834,13 +838,16 @@ const buildTunnelUrl = async () => {
834
838
  const url = new URL(regionURL);
835
839
  return `${url.protocol}//${url.host}/platform/app/relay/dispatch/${appID}`;
836
840
  };
837
- const invokeTunnel = async (port) => {
838
- var _hostedTokenResponse$;
841
+ const invokeTunnel = async function(port) {
842
+ var _options$rebuildWhenE, _hostedTokenResponse$, _options$enableIntern;
843
+ let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
839
844
  const {
840
845
  appManifestJSON,
841
846
  appID,
842
847
  regionURL
843
848
  } = await buildTunnelContext();
849
+ const runnelUrl = await buildTunnelUrl();
850
+ const rebuildWhenExists = (_options$rebuildWhenE = options.rebuildWhenExists) !== null && _options$rebuildWhenE !== void 0 ? _options$rebuildWhenE : true;
844
851
  const onesToken = await getONESToken();
845
852
  if (!onesToken) {
846
853
  consoleUnauthorizedMessage();
@@ -857,9 +864,8 @@ const invokeTunnel = async (port) => {
857
864
  return createOnesApp.throwError(ErrorCode.HOSTED_TOKEN_EMPTY, i18n.t("error.hostedToken.empty"));
858
865
  }
859
866
  process.env.ONES_HOSTED_TOKEN = hostedToken;
860
- const client = new TunnelClient(port, regionURL, appID, hostedToken);
867
+ const client = new TunnelClient(port, regionURL, appID, hostedToken, (_options$enableIntern = options.enableInternalManifestRoute) !== null && _options$enableIntern !== void 0 ? _options$enableIntern : true, rebuildWhenExists);
861
868
  await client.connect();
862
- const runnelUrl = await buildTunnelUrl();
863
869
  console.log(`Relay endpoint: ${runnelUrl}`);
864
870
  };
865
871
  const tunnel = async function() {
@@ -879,7 +885,7 @@ const normalize$8 = async (options) => {
879
885
  const invokeInstall = async () => {
880
886
  const runnelUrl = await buildTunnelUrl();
881
887
  const result = await fetchAppInstall({
882
- manifest_url: `${runnelUrl}${ONES_CLI_MANIFEST_PATH}`
888
+ manifest_url: `${runnelUrl}${ONES_CLI_INTERNAL_MANIFEST_PATH}`
883
889
  });
884
890
  return result;
885
891
  };
@@ -944,6 +950,50 @@ const normalize$7 = async (options) => {
944
950
  install: install2
945
951
  };
946
952
  };
953
+ const isViteReady = (line) => /ready in|VITE\s+v[\d.]+.*ready/i.test(line);
954
+ const isNestReady = (line) => /Found\s+0\s+errors\.\s*Watching|Nest application successfully started|listening on/i.test(line);
955
+ function createDevOutputPipes(onBothReady) {
956
+ const state = {
957
+ viteReady: false,
958
+ nestReady: false,
959
+ summaryPrinted: false
960
+ };
961
+ const tryPrintSummary = () => {
962
+ if (state.summaryPrinted || !state.viteReady || !state.nestReady)
963
+ return;
964
+ state.summaryPrinted = true;
965
+ onBothReady();
966
+ };
967
+ const pipe = (stream, isStderr) => {
968
+ let buffer = "";
969
+ const write = (chunk) => {
970
+ if (isStderr)
971
+ process.stderr.write(chunk);
972
+ else
973
+ process.stdout.write(chunk);
974
+ };
975
+ stream.on("data", (chunk) => {
976
+ var _lines$pop;
977
+ const str = typeof chunk === "string" ? chunk : chunk.toString();
978
+ buffer += str;
979
+ const lines = buffer.split(/\r?\n/);
980
+ buffer = (_lines$pop = lines.pop()) !== null && _lines$pop !== void 0 ? _lines$pop : "";
981
+ for (const line of lines) {
982
+ if (isViteReady(line))
983
+ state.viteReady = true;
984
+ if (isNestReady(line))
985
+ state.nestReady = true;
986
+ tryPrintSummary();
987
+ write(line + "\n");
988
+ }
989
+ });
990
+ stream.on("end", () => {
991
+ if (buffer)
992
+ write(buffer + "\n");
993
+ });
994
+ };
995
+ return pipe;
996
+ }
947
997
  const dev = async function() {
948
998
  var _appPackageJSON$scrip;
949
999
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -976,9 +1026,25 @@ const dev = async function() {
976
1026
  });
977
1027
  const devChild = node_child_process.spawn("npm", ["run", "dev"], {
978
1028
  cwd,
979
- stdio: "inherit",
1029
+ stdio: ["inherit", "pipe", "pipe"],
980
1030
  env
981
1031
  });
1032
+ const onBothReady = () => {
1033
+ console.log("");
1034
+ console.log("Services ready:");
1035
+ console.log(`http://localhost:${port}`);
1036
+ console.log("");
1037
+ if (normalizedOptions.install === InstallOptions.TRUE) {
1038
+ invokeInstall().catch((error) => {
1039
+ console.error(error);
1040
+ });
1041
+ }
1042
+ };
1043
+ const pipe = createDevOutputPipes(onBothReady);
1044
+ if (devChild.stdout)
1045
+ pipe(devChild.stdout, false);
1046
+ if (devChild.stderr)
1047
+ pipe(devChild.stderr, true);
982
1048
  const cleanup = () => {
983
1049
  tunnelChild.kill();
984
1050
  devChild.kill();
@@ -989,14 +1055,6 @@ const dev = async function() {
989
1055
  };
990
1056
  process.on("SIGINT", onSignal);
991
1057
  process.on("SIGTERM", onSignal);
992
- console.log(`Local: http://localhost:${port}`);
993
- if (normalizedOptions.install === InstallOptions.TRUE) {
994
- setTimeout(() => {
995
- invokeInstall().catch((error) => {
996
- console.error(error);
997
- });
998
- }, 2e3);
999
- }
1000
1058
  await new Promise((resolve) => {
1001
1059
  devChild.on("exit", () => {
1002
1060
  cleanup();
package/dist/index.js CHANGED
@@ -14,7 +14,6 @@ import envPaths from "env-paths";
14
14
  import { z } from "zod";
15
15
  import axios from "axios";
16
16
  import _reduceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reduce";
17
- import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
18
17
  import WebSocket from "ws";
19
18
  import http from "node:http";
20
19
  import ora from "ora";
@@ -22,7 +21,7 @@ import open from "open";
22
21
  import getPort from "get-port";
23
22
  import { v4 } from "uuid";
24
23
  const en = {
25
- "desc.ones": "cli for ones",
24
+ "desc.ones": "ONES CLI/{version}",
26
25
  "desc.build": "build the application",
27
26
  "desc.build.output": "specify the output file path",
28
27
  "desc.dev": "develop the application",
@@ -543,11 +542,15 @@ const normalize$9 = async (options) => {
543
542
  const MAX_RELAY_BODY_BYTES = 64 * 1024 * 1024;
544
543
  class TunnelClient {
545
544
  constructor(localPort, baseUrl, appID, hostedToken) {
546
- _defineProperty(this, "ws", null);
545
+ let enableInternalManifestRoute = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true;
546
+ let replaceExisting = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : true;
547
+ this.ws = null;
547
548
  this.localPort = localPort;
548
549
  this.baseUrl = baseUrl;
549
550
  this.appID = appID;
550
551
  this.hostedToken = hostedToken;
552
+ this.enableInternalManifestRoute = enableInternalManifestRoute;
553
+ this.replaceExisting = replaceExisting;
551
554
  }
552
555
  async connect() {
553
556
  const proxyUrl = this.buildProxyUrl();
@@ -585,6 +588,7 @@ class TunnelClient {
585
588
  const url = new URL("/platform/app/relay/", this.baseUrl);
586
589
  url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
587
590
  url.searchParams.set("app_id", this.appID);
591
+ url.searchParams.set("replace_existing", String(this.replaceExisting));
588
592
  return url.toString();
589
593
  }
590
594
  parseMessage(data) {
@@ -605,7 +609,7 @@ class TunnelClient {
605
609
  if (!request) {
606
610
  return;
607
611
  }
608
- if (request.path === ONES_CLI_MANIFEST_PATH) {
612
+ if (this.enableInternalManifestRoute && request.path === ONES_CLI_INTERNAL_MANIFEST_PATH) {
609
613
  const appManifest = getAppManifestJSON().app;
610
614
  const baseURL = await buildTunnelUrl();
611
615
  const reply = {
@@ -788,7 +792,7 @@ class TunnelClient {
788
792
  return null;
789
793
  }
790
794
  }
791
- const ONES_CLI_MANIFEST_PATH = "/__ones_cli_manifest__";
795
+ const ONES_CLI_INTERNAL_MANIFEST_PATH = "/__ones_cli_internal_manifest__";
792
796
  const buildTunnelContext = async () => {
793
797
  var _appManifestJSON$app$, _appManifestJSON$app;
794
798
  const appManifestJSON = getAppManifestJSON();
@@ -831,13 +835,16 @@ const buildTunnelUrl = async () => {
831
835
  const url = new URL(regionURL);
832
836
  return `${url.protocol}//${url.host}/platform/app/relay/dispatch/${appID}`;
833
837
  };
834
- const invokeTunnel = async (port) => {
835
- var _hostedTokenResponse$;
838
+ const invokeTunnel = async function(port) {
839
+ var _options$rebuildWhenE, _hostedTokenResponse$, _options$enableIntern;
840
+ let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
836
841
  const {
837
842
  appManifestJSON,
838
843
  appID,
839
844
  regionURL
840
845
  } = await buildTunnelContext();
846
+ const runnelUrl = await buildTunnelUrl();
847
+ const rebuildWhenExists = (_options$rebuildWhenE = options.rebuildWhenExists) !== null && _options$rebuildWhenE !== void 0 ? _options$rebuildWhenE : true;
841
848
  const onesToken = await getONESToken();
842
849
  if (!onesToken) {
843
850
  consoleUnauthorizedMessage();
@@ -854,9 +861,8 @@ const invokeTunnel = async (port) => {
854
861
  return throwError(ErrorCode.HOSTED_TOKEN_EMPTY, i18n.t("error.hostedToken.empty"));
855
862
  }
856
863
  process.env.ONES_HOSTED_TOKEN = hostedToken;
857
- const client = new TunnelClient(port, regionURL, appID, hostedToken);
864
+ const client = new TunnelClient(port, regionURL, appID, hostedToken, (_options$enableIntern = options.enableInternalManifestRoute) !== null && _options$enableIntern !== void 0 ? _options$enableIntern : true, rebuildWhenExists);
858
865
  await client.connect();
859
- const runnelUrl = await buildTunnelUrl();
860
866
  console.log(`Relay endpoint: ${runnelUrl}`);
861
867
  };
862
868
  const tunnel = async function() {
@@ -876,7 +882,7 @@ const normalize$8 = async (options) => {
876
882
  const invokeInstall = async () => {
877
883
  const runnelUrl = await buildTunnelUrl();
878
884
  const result = await fetchAppInstall({
879
- manifest_url: `${runnelUrl}${ONES_CLI_MANIFEST_PATH}`
885
+ manifest_url: `${runnelUrl}${ONES_CLI_INTERNAL_MANIFEST_PATH}`
880
886
  });
881
887
  return result;
882
888
  };
@@ -941,6 +947,50 @@ const normalize$7 = async (options) => {
941
947
  install: install2
942
948
  };
943
949
  };
950
+ const isViteReady = (line) => /ready in|VITE\s+v[\d.]+.*ready/i.test(line);
951
+ const isNestReady = (line) => /Found\s+0\s+errors\.\s*Watching|Nest application successfully started|listening on/i.test(line);
952
+ function createDevOutputPipes(onBothReady) {
953
+ const state = {
954
+ viteReady: false,
955
+ nestReady: false,
956
+ summaryPrinted: false
957
+ };
958
+ const tryPrintSummary = () => {
959
+ if (state.summaryPrinted || !state.viteReady || !state.nestReady)
960
+ return;
961
+ state.summaryPrinted = true;
962
+ onBothReady();
963
+ };
964
+ const pipe = (stream, isStderr) => {
965
+ let buffer = "";
966
+ const write = (chunk) => {
967
+ if (isStderr)
968
+ process.stderr.write(chunk);
969
+ else
970
+ process.stdout.write(chunk);
971
+ };
972
+ stream.on("data", (chunk) => {
973
+ var _lines$pop;
974
+ const str = typeof chunk === "string" ? chunk : chunk.toString();
975
+ buffer += str;
976
+ const lines = buffer.split(/\r?\n/);
977
+ buffer = (_lines$pop = lines.pop()) !== null && _lines$pop !== void 0 ? _lines$pop : "";
978
+ for (const line of lines) {
979
+ if (isViteReady(line))
980
+ state.viteReady = true;
981
+ if (isNestReady(line))
982
+ state.nestReady = true;
983
+ tryPrintSummary();
984
+ write(line + "\n");
985
+ }
986
+ });
987
+ stream.on("end", () => {
988
+ if (buffer)
989
+ write(buffer + "\n");
990
+ });
991
+ };
992
+ return pipe;
993
+ }
944
994
  const dev = async function() {
945
995
  var _appPackageJSON$scrip;
946
996
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -973,9 +1023,25 @@ const dev = async function() {
973
1023
  });
974
1024
  const devChild = spawn("npm", ["run", "dev"], {
975
1025
  cwd: cwd2,
976
- stdio: "inherit",
1026
+ stdio: ["inherit", "pipe", "pipe"],
977
1027
  env
978
1028
  });
1029
+ const onBothReady = () => {
1030
+ console.log("");
1031
+ console.log("Services ready:");
1032
+ console.log(`http://localhost:${port}`);
1033
+ console.log("");
1034
+ if (normalizedOptions.install === InstallOptions.TRUE) {
1035
+ invokeInstall().catch((error) => {
1036
+ console.error(error);
1037
+ });
1038
+ }
1039
+ };
1040
+ const pipe = createDevOutputPipes(onBothReady);
1041
+ if (devChild.stdout)
1042
+ pipe(devChild.stdout, false);
1043
+ if (devChild.stderr)
1044
+ pipe(devChild.stderr, true);
979
1045
  const cleanup = () => {
980
1046
  tunnelChild.kill();
981
1047
  devChild.kill();
@@ -986,14 +1052,6 @@ const dev = async function() {
986
1052
  };
987
1053
  process.on("SIGINT", onSignal);
988
1054
  process.on("SIGTERM", onSignal);
989
- console.log(`Local: http://localhost:${port}`);
990
- if (normalizedOptions.install === InstallOptions.TRUE) {
991
- setTimeout(() => {
992
- invokeInstall().catch((error) => {
993
- console.error(error);
994
- });
995
- }, 2e3);
996
- }
997
1055
  await new Promise((resolve2) => {
998
1056
  devChild.on("exit", () => {
999
1057
  cleanup();
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/actions/dev/index.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAAuB,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAEvE,eAAO,MAAM,GAAG,GAAU,GAAG,MAAM,gBAAgB,CAAC,iBAAiB,CAAC,uBAoErE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/actions/dev/index.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAAuB,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAyCvE,eAAO,MAAM,GAAG,GAAU,GAAG,MAAM,gBAAgB,CAAC,iBAAiB,CAAC,uBA0ErE,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import type { CommandArguments } from '../../common/command';
2
2
  import type { TunnelCommandOptions } from '../../command';
3
- export { buildTunnelUrl, invokeTunnel, ONES_CLI_MANIFEST_PATH } from './tunnel';
3
+ export { buildTunnelUrl, invokeTunnel, ONES_CLI_INTERNAL_MANIFEST_PATH } from './tunnel';
4
4
  export declare const tunnel: (...args: CommandArguments<TunnelCommandOptions>) => Promise<void>;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/actions/tunnel/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAA0B,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAE7E,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAE/E,eAAO,MAAM,MAAM,GAAU,GAAG,MAAM,gBAAgB,CAAC,oBAAoB,CAAC,kBAO3E,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/actions/tunnel/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAA0B,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAE7E,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAA;AAExF,eAAO,MAAM,MAAM,GAAU,GAAG,MAAM,gBAAgB,CAAC,oBAAoB,CAAC,kBAO3E,CAAA"}
@@ -4,7 +4,9 @@ export declare class TunnelClient {
4
4
  private baseUrl;
5
5
  private appID;
6
6
  private hostedToken;
7
- constructor(localPort: number, baseUrl: string, appID: string, hostedToken: string);
7
+ private enableInternalManifestRoute;
8
+ private replaceExisting;
9
+ constructor(localPort: number, baseUrl: string, appID: string, hostedToken: string, enableInternalManifestRoute?: boolean, replaceExisting?: boolean);
8
10
  connect(): Promise<void>;
9
11
  close(): void;
10
12
  private buildProxyUrl;
@@ -1 +1 @@
1
- {"version":3,"file":"tunnel-client.d.ts","sourceRoot":"","sources":["../../../../src/actions/tunnel/tunnel-client.ts"],"names":[],"mappings":"AA8BA,qBAAa,YAAY;IACvB,OAAO,CAAC,EAAE,CAAyB;IACnC,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,WAAW,CAAQ;gBAEf,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IAO5E,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA+B9B,KAAK,IAAI,IAAI;IAIb,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,YAAY;YAcN,aAAa;IA4C3B,OAAO,CAAC,iBAAiB;YAQX,cAAc;IAiC5B,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,oBAAoB;IAc5B,OAAO,CAAC,YAAY;IAmBpB,OAAO,CAAC,mBAAmB;IAyB3B,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,QAAQ;CAYjB"}
1
+ {"version":3,"file":"tunnel-client.d.ts","sourceRoot":"","sources":["../../../../src/actions/tunnel/tunnel-client.ts"],"names":[],"mappings":"AA8BA,qBAAa,YAAY;IACvB,OAAO,CAAC,EAAE,CAAyB;IACnC,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,2BAA2B,CAAS;IAC5C,OAAO,CAAC,eAAe,CAAS;gBAG9B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,2BAA2B,UAAO,EAClC,eAAe,UAAO;IAUlB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA+B9B,KAAK,IAAI,IAAI;IAIb,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,YAAY;YAcN,aAAa;IA4C3B,OAAO,CAAC,iBAAiB;YAQX,cAAc;IAiC5B,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,oBAAoB;IAc5B,OAAO,CAAC,YAAY;IAmBpB,OAAO,CAAC,mBAAmB;IAyB3B,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,QAAQ;CAYjB"}
@@ -1,4 +1,9 @@
1
- export declare const ONES_CLI_MANIFEST_PATH = "/__ones_cli_manifest__";
1
+ export declare const ONES_CLI_INTERNAL_MANIFEST_PATH = "/__ones_cli_internal_manifest__";
2
+ type InvokeTunnelOptions = {
3
+ enableInternalManifestRoute?: boolean;
4
+ rebuildWhenExists?: boolean;
5
+ };
2
6
  export declare const buildTunnelUrl: () => Promise<string>;
3
- export declare const invokeTunnel: (port: number) => Promise<undefined>;
7
+ export declare const invokeTunnel: (port: number, options?: InvokeTunnelOptions) => Promise<undefined>;
8
+ export {};
4
9
  //# sourceMappingURL=tunnel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tunnel.d.ts","sourceRoot":"","sources":["../../../../src/actions/tunnel/tunnel.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,sBAAsB,2BAA2B,CAAA;AAwC9D,eAAO,MAAM,cAAc,QAAa,OAAO,CAAC,MAAM,CAIrD,CAAA;AAED,eAAO,MAAM,YAAY,GAAU,MAAM,MAAM,uBAwB9C,CAAA"}
1
+ {"version":3,"file":"tunnel.d.ts","sourceRoot":"","sources":["../../../../src/actions/tunnel/tunnel.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,+BAA+B,oCAAoC,CAAA;AAChF,KAAK,mBAAmB,GAAG;IACzB,2BAA2B,CAAC,EAAE,OAAO,CAAA;IACrC,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B,CAAA;AAwCD,eAAO,MAAM,cAAc,QAAa,OAAO,CAAC,MAAM,CAIrD,CAAA;AAED,eAAO,MAAM,YAAY,GAAU,MAAM,MAAM,EAAE,UAAS,mBAAwB,uBAiCjF,CAAA"}
@@ -1,5 +1,5 @@
1
1
  declare const _default: {
2
- readonly 'desc.ones': "cli for ones";
2
+ readonly 'desc.ones': "ONES CLI/{version}";
3
3
  readonly 'desc.build': "build the application";
4
4
  readonly 'desc.build.output': "specify the output file path";
5
5
  readonly 'desc.dev': "develop the application";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-open/cli",
3
- "version": "1.0.1-21670.1926+c1d371f0",
3
+ "version": "1.0.1-24501.1930+9f3ba698",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -62,7 +62,7 @@
62
62
  "chalk": "^5.0.1",
63
63
  "commander": "~9.4.0",
64
64
  "cosmiconfig": "^8.3.6",
65
- "create-ones-app": "1.0.1-21670.1926+c1d371f0",
65
+ "create-ones-app": "1.0.1-24501.1930+9f3ba698",
66
66
  "env-paths": "3.0.0",
67
67
  "execa": "^6.1.0",
68
68
  "fs-extra": "^11.3.0",
@@ -75,5 +75,5 @@
75
75
  "ws": "^8.18.3",
76
76
  "zod": "^3.22.2"
77
77
  },
78
- "gitHead": "c1d371f0bbc77b4c211c8f0c4a9b49e024450e52"
78
+ "gitHead": "9f3ba698c126880fd39166dab9797fcd3a523fd7"
79
79
  }