bdy 1.16.27-dev → 1.16.28-dev
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/distTs/package.json +1 -1
- package/distTs/src/agent/system.js +3 -1
- package/distTs/src/api/client.js +45 -22
- package/distTs/src/command/agent/install.js +1 -1
- package/distTs/src/command/agent/uninstall.js +5 -1
- package/distTs/src/command/package/create.js +59 -0
- package/distTs/src/command/package/delete.js +37 -0
- package/distTs/src/command/package/docker/login.js +26 -0
- package/distTs/src/command/package/docker.js +11 -0
- package/distTs/src/command/package/download.js +1 -2
- package/distTs/src/command/package/get.js +39 -0
- package/distTs/src/command/package/list.js +4 -3
- package/distTs/src/command/package/publish.js +17 -3
- package/distTs/src/command/package/version/delete.js +41 -0
- package/distTs/src/command/package/version/get.js +47 -0
- package/distTs/src/command/package/version/list.js +49 -0
- package/distTs/src/command/package/version.js +16 -0
- package/distTs/src/command/package.js +10 -0
- package/distTs/src/command/pipeline/run.js +1 -2
- package/distTs/src/command/project/list.js +2 -8
- package/distTs/src/command/project/set.js +1 -2
- package/distTs/src/command/sandbox/cp.js +1 -2
- package/distTs/src/command/sandbox/create.js +2 -2
- package/distTs/src/command/sandbox/destroy.js +7 -3
- package/distTs/src/command/sandbox/endpoint/add.js +2 -2
- package/distTs/src/command/sandbox/endpoint/delete.js +7 -2
- package/distTs/src/command/sandbox/endpoint/get.js +2 -3
- package/distTs/src/command/sandbox/endpoint/list.js +2 -2
- package/distTs/src/command/sandbox/exec/command.js +1 -2
- package/distTs/src/command/sandbox/exec/kill.js +6 -2
- package/distTs/src/command/sandbox/exec/list.js +1 -2
- package/distTs/src/command/sandbox/exec/logs.js +1 -2
- package/distTs/src/command/sandbox/exec/status.js +1 -2
- package/distTs/src/command/sandbox/get.js +2 -3
- package/distTs/src/command/sandbox/list.js +2 -3
- package/distTs/src/command/sandbox/restart.js +1 -2
- package/distTs/src/command/sandbox/snapshot/create.js +2 -2
- package/distTs/src/command/sandbox/snapshot/delete.js +7 -2
- package/distTs/src/command/sandbox/snapshot/get.js +2 -3
- package/distTs/src/command/sandbox/snapshot/list.js +1 -2
- package/distTs/src/command/sandbox/start.js +1 -2
- package/distTs/src/command/sandbox/status.js +1 -2
- package/distTs/src/command/sandbox/stop.js +1 -2
- package/distTs/src/command/workspace/list.js +2 -3
- package/distTs/src/command/workspace/set.js +1 -2
- package/distTs/src/input.js +27 -2
- package/distTs/src/output.js +13 -4
- package/distTs/src/texts.js +150 -90
- package/distTs/src/utils.js +95 -16
- package/package.json +1 -1
package/distTs/src/texts.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
3
|
+
exports.ERR_TUNNEL_NOT_FOUND = exports.ERR_WHITELIST_IS_NOT_VALID = exports.ERR_USER_AGENT_IS_NOT_VALID = exports.ERR_BA_IS_NOT_VALID = exports.ERR_BA_LOGIN_NOT_PROVIDED = exports.ERR_BA_PASSWORD_NOT_PROVIDED = exports.ERR_CB_THRESHOLD_IS_NOT_VALID = exports.ERR_CERT_PATH_IS_NOT_VALID = exports.ERR_KEY_PATH_IS_NOT_VALID = exports.ERR_CA_PATH_IS_NOT_VALID = exports.ERR_WRONG_CA = exports.ERR_WRONG_KEY_CERT = exports.ERR_NAME_WITHOUT_ASTERISK = exports.ERR_PORT_IS_NOT_VALID = exports.ERR_REGION_IS_NOT_VALID = exports.ERR_PATH_IS_NOT_DIRECTORY = exports.ERR_DIRECTORY_DOES_NOT_EXISTS = exports.ERR_TERMINATE_IS_NOT_VALID = exports.ERR_TIMEOUT_IS_NOT_VALID = exports.ERR_TYPE_IS_NOT_VALID = exports.ERR_TARGET_IS_NOT_VALID = exports.ERR_SAVING_AGENT_CONFIG = exports.ERR_AGENT_NOT_REGISTERED = exports.ERR_RUN_PIPELINE_WRONG_VARIABLE = exports.ERR_RUN_PIPELINE_WRONG_ACTION = exports.ERR_RUN_PIPELINE_WRONG_DELAY = exports.ERR_RUN_PIPELINE_WRONG_PRIORITY = exports.ERR_RUN_PIPELINE_WAIT_TIMEOUT = exports.ERR_SANDBOX_EXEC_RUNTIME_NOT_FOUND = exports.ERR_PACKAGE_VERSIONS_NOT_FOUND = exports.ERR_PACKAGE_NOT_FOUND = exports.ERR_PACKAGE_VERSION_NOT_FOUND = exports.ERR_PACKAGE_VERSION_EXISTS = exports.ERR_PACKAGE_PUBLISH_NOT_FOUND = exports.ERR_PACKAGE_DOWNLOAD_NOT_FOUND = exports.ERR_PIPELINE_NOT_FOUND = exports.ERR_PROJECT_NOT_FOUND = exports.ERR_WORKSPACE_NOT_FOUND = exports.ERR_REST_API_PROJECT = exports.ERR_REST_API_WORKSPACE = exports.ERR_PATH_NOT_EXISTS = exports.ERR_REST_API_REGION = exports.ERR_REST_API_URL = exports.ERR_REST_API_TOKEN = exports.ERR_REST_API_RATE_LIMIT = exports.ERR_REST_API_RESOURCE_NOT_FOUND = exports.ERR_REST_API_WRONG_TOKEN = exports.ERR_REST_API_CONNECT_ERROR = exports.ERR_REST_API_NOT_RESPONDING = exports.ERR_REST_API_GENERAL_ERROR = void 0;
|
|
4
|
+
exports.ERR_INVALID_COMPARE_LINKS_RESPONSE = exports.ERR_INVALID_STORYBOOK_RESPONSE = exports.ERR_INVALID_DEFAULT_SETTINGS_RESPONSE = exports.ERR_INVALID_CLOSE_SESSION_RESPONSE = exports.ERR_INVALID_SNAPSHOTS_RESPONSE = exports.ERR_INVALID_SNAPSHOT_RESPONSE = exports.ERR_MISSING_URLS = exports.ERR_RESOURCE_NOT_FOUND = exports.ERR_MISSING_EXEC_COMMAND = exports.ERR_PARSING_STORIES = exports.ERR_UNSUPPORTED_STORYBOOK = exports.ERR_MISSING_STORYBOOK_INDEX_FILE = exports.ERR_WRONG_STORYBOOK_DIRECTORY = exports.ERR_MISSING_BUILD_ID = exports.ERR_MISSING_UT_TOKEN = exports.ERR_MISSING_VT_TOKEN = exports.ERR_CONFIG_CORRUPTED = exports.ERR_WRONG_TOKEN = exports.ERR_TOKEN_NOT_PROVIDED = exports.ERR_CANT_CREATE_DIR_IN_HOME = exports.ERR_CONNECTION_ERROR = exports.ERR_CONNECTION_TIMEOUT = exports.ERR_WRONG_STREAM = exports.ERR_WRONG_HANDSHAKE = exports.ERR_FETCH_VERSION = exports.ERR_PACKAGE_DOWNLOAD_REPLACE = exports.ERR_PACKAGE_DOWNLOAD_NOT_EMPTY_DIR = exports.ERR_PACKAGE_DOWNLOAD_IS_FILE = exports.ERR_PACKAGE_DOWNLOAD_READDIR = exports.ERR_PACKAGE_DOWNLOAD_MKDIR = exports.ERR_SWW = exports.ERR_NOT_FOUND = exports.ERR_FAILED_TO_CONNECT_TO_AGENT = exports.ERR_TUNNEL_REMOVED = exports.ERR_TUNNELS_DISABLED = exports.ERR_AGENT_LIMIT_REACHED = exports.ERR_TUNNEL_TARGET_INVALID = exports.ERR_WORKSPACE_FLAGGED = exports.ERR_TUNNEL_LIMIT_REACHED = exports.ERR_DOMAIN_RESTRICTED = exports.ERR_AGENT_REMOVED = exports.ERR_FAILED_TO_CONNECT = exports.ERR_TUNNEL_ALREADY_EXISTS = exports.ERR_AGENT_NOT_SUPPORTED = exports.ERR_AGENT_ADMIN_RIGHTS = exports.ERR_SWW_AGENT_UPDATING = exports.ERR_SWW_AGENT_ENABLING = exports.ERR_AGENT_NOT_FOUND = exports.ERR_AGENT_NOT_RUNNING = exports.ERR_AGENT_NOT_INSTALLED = void 0;
|
|
5
|
+
exports.DESC_COMMAND_CONFIG_REMOVE_TOKEN = exports.DESC_COMMAND_CONFIG_REMOVE_TUNNEL = exports.DESC_COMMAND_CONFIG_GET_WHITELIST = exports.DESC_COMMAND_CONFIG_GET_TUNNELS = exports.DESC_COMMAND_CONFIG_GET_TUNNEL = exports.DESC_COMMAND_CONFIG_GET_TOKEN = exports.DESC_COMMAND_CONFIG_GET_TIMEOUT = exports.DESC_COMMAND_CONFIG_GET_REGION = exports.DESC_COMMAND_CONFIG_ADD_TLS = exports.DESC_COMMAND_CONFIG_ADD_TCP = exports.DESC_COMMAND_CONFIG_ADD_HTTP = exports.AGENT_FETCH_RETRY = exports.NO_TUNNELS_STARTED = exports.TXT_AGENT_STANDALONE_EXITING = exports.TXT_AGENT_STANDALONE_STARTED = exports.TXT_AGENT_STANDALONE_AGENT_REGISTER_ERROR = exports.TXT_AGENT_STANDALONE_AGENT_REGISTERED = exports.TXT_AGENT_STANDALONE_AGENT_REGISTERING = exports.TXT_AGENT_STANDALONE_AGENT_FETCH_ERROR = exports.TXT_AGENT_STANDALONE_AGENT_FETCHED = exports.TXT_AGENT_STANDALONE_AGENT_FETCHING = exports.TXT_TUNNEL_ADDED = exports.TXT_TUNNEL_REMOVED = exports.TXT_REGION_SAVED = exports.TXT_TIMEOUT_SAVED = exports.TXT_TOKEN_REMOVED = exports.TXT_TOKEN_SAVED = exports.TXT_WHITELIST_SAVED = exports.TXT_TUNNEL_STOPPED = exports.TXT_TUNNEL_STARTED = exports.TXY_AGENT_CONFIRM_DELETE = exports.TXT_AGENT_DISABLED = exports.TXT_AGENT_ALREADY_INSTALLED = exports.TXT_AGENT_UPDATED = exports.TXT_AGENT_INSTALLED = exports.TXT_AGENT_TARGET_DISABLED = exports.TXT_AGENT_TARGET_ENABLED = exports.TXT_AGENT_RESTARTED = exports.TXT_AGENT_DEBUG_OFF = exports.TXT_AGENT_DEBUG_ON = exports.TXT_AGENT_STARTED = exports.TXT_AGENT_STOPPED = exports.WARN_BROWSER_VERSION = exports.ERR_RESOURCE_DISCOVERY = exports.ERR_NO_SNAPSHOTS_TO_SEND = exports.ERR_INVALID_SNAPSHOT = exports.ERR_TEST_EXECUTION = exports.ERR_INVALID_JSON = exports.ERR_INVALID_DOWNLOAD_RESPONSE = exports.ERR_INVALID_SCRAPE_RESPONSE = void 0;
|
|
6
|
+
exports.OPTION_UPLOAD_REPORT_GLOB = exports.DESC_COMMAND_UT_UPLOAD = exports.DESC_COMMAND_UT = exports.DESC_COMMAND_VT_INSTALL_BROWSER = exports.DESC_COMMAND_VT_EXEC = exports.DESC_COMMAND_VT_SCRAPE = exports.DESC_COMMAND_VT_COMPARE = exports.DESC_COMMAND_VT_STORYBOOK = exports.DESC_COMMAND_VT_CLOSE = exports.DESC_COMMAND_VT = exports.DESC_COMMAND_PIPELINE_RUN = exports.DESC_COMMAND_PACKAGE_DOWNLOAD = exports.DESC_COMMAND_PACKAGE_PUBLISH = exports.DESC_COMMAND_PACKAGE = exports.DESC_COMMAND_PIPELINE = exports.DESC_PROGRAM = exports.DESC_COMMAND_TLS = exports.DESC_COMMAND_TCP = exports.DESC_COMMAND_START = exports.DESC_COMMAND_TUNNEL = exports.DESC_COMMAND_AGENT = exports.DESC_COMMAND_HTTP = exports.DESC_COMMAND_CONFIG = exports.DESC_COMMAND_AGENT_VERSION = exports.DESC_COMMAND_AGENT_UPDATE = exports.DESC_COMMAND_AGENT_TARGET = exports.DESC_COMMAND_AGENT_TUNNEL = exports.DESC_COMMAND_AGENT_STOP = exports.DESC_COMMAND_AGENT_TARGET_DISABLE = exports.DESC_COMMAND_AGENT_TARGET_ENABLE = exports.DESC_COMMAND_AGENT_TARGET_STATUS = exports.DESC_COMMAND_AGENT_STATUS = exports.DESC_COMMAND_AGENT_RESTART = exports.DESC_COMMAND_AGENT_ENABLE = exports.DESC_COMMAND_AGENT_DEBUG = exports.DESC_COMMAND_AGENT_DISABLE = exports.DESC_COMMAND_AGENT_START = exports.DESC_COMMAND_AGENT_INSTALL = exports.DESC_COMMAND_AGENT_UNINSTALL = exports.DESC_COMMAND_AGENT_TUNNEL_REMOVE = exports.DESC_COMMAND_AGENT_TUNNEL_STATUS = exports.DESC_COMMAND_AGENT_TUNNEL_LIST = exports.DESC_COMMAND_CONFIG_SET = exports.DESC_COMMAND_CONFIG_REMOVE = exports.DESC_COMMAND_CONFIG_GET = exports.DESC_COMMAND_CONFIG_ADD = exports.DESC_COMMAND_CONFIG_SET_WHITELIST = exports.DESC_COMMAND_CONFIG_SET_TOKEN = exports.DESC_COMMAND_CONFIG_SET_TIMEOUT = exports.DESC_COMMAND_CONFIG_SET_REGION = void 0;
|
|
7
|
+
exports.OPTION_PACKAGE_DOWNLOAD_REPLACE = exports.OPTION_PACKAGE_DOWNLOAD_MERGE = exports.OPTION_PACKAGE_PUBLISH_OVERWRITE_VERSION = exports.OPTION_PACKAGE_PUBLISH_CREATE = exports.OPTION_PACKAGE_ID = exports.OPTION_PACKAGE_DOWNLOAD_PATH = exports.OPTION_PACKAGE_PUBLISH_PATH = exports.OPTION_PIPELINE_RUN_ARGUMENT = exports.OPTION_PIPELINE_RUN_DELAY = exports.OPTION_PIPELINE_RUN_VAR = exports.OPTION_PIPELINE_RUN_PRIORITY = exports.OPTION_PIPELINE_RUN_CLEAR_CACHE = exports.OPTION_PIPELINE_RUN_REFRESH = exports.OPTION_PIPELINE_RUN_COMMENT = exports.OPTION_PIPELINE_RUN_PULL_REQUEST = exports.OPTION_PIPELINE_RUN_REVISION = exports.OPTION_PIPELINE_RUN_TAG = exports.OPTION_PIPELINE_RUN_BRANCH = exports.OPTION_REST_API_REGION = exports.OPTION_REST_API_ENDPOINT = exports.OPTION_DEFAULT_REGION = exports.OPTION_REGION = exports.TXT_PACKAGE_UNZIPPING_COUNT = exports.TXT_PACKAGE_UNZIPPED = exports.TXT_PACKAGE_UNZIPPING = exports.TXT_PACKAGE_DOWNLOADED_ZIP = exports.TXT_PACKAGE_DOWNLOADING_ZIP = exports.TXT_PACKAGE_DOWNLOADED = exports.TXT_PACKAGE_PUBLISHED = exports.TXT_PACKAGE_ENTRIES_FOUND = exports.TXT_PACKAGE_UPLOADED = exports.TXT_PACKAGE_UPLOADING = exports.TXT_PACKAGE_ZIPPED = exports.TXT_PACKAGE_ZIP_ENTRIES = exports.TXT_PACKAGE_ONE_ENTRY_FOUND = exports.TXT_PACKAGE_NO_ENTRIES_FOUND = exports.TXT_PACKAGE_SCANNING_DIR = exports.TXT_PIPELINE_RUN_FINISH_FAILED = exports.TXT_PIPELINE_RUN_FINISH_SUCCESSFULLY = exports.TXT_STORIES_AMOUNT = exports.TXT_PIPELINE_RUN_STILL_WAITING = exports.TXT_PIPELINE_RUN_WAIT = exports.TXT_PIPELINE_RUN_SUCCESS = exports.TXT_OPENING_TUNNEL = exports.TXT_UPDATING_AGENT = exports.TXT_ENABLING_AGENT = exports.TXT_NEW_AGENT_VERSION = exports.TXT_NEW_CLI_DOCKER_VERSION = exports.OPTION_UPLOAD_DRY_RUN = exports.OPTION_UPLOAD_REPORT_FORMAT = void 0;
|
|
8
|
+
exports.OPTION_COMPARE_URLS_FILE = exports.OPTION_COMPARE_SITEMAP = exports.OPTION_COMPARE_URLS = exports.OPTION_COMPARE_RESPECT_ROBOTS = exports.OPTION_COMPARE_FOLLOW = exports.OPTION_EXEC_PARALLEL = exports.OPTION_EXEC_ONE_BY_ONE = exports.OPTION_EXEC_SKIP_DISCOVERY = exports.OPTION_EXEC_COMMAND = exports.OPTION_AGENT_DEBUG = exports.OPTION_AGENT_PORT = exports.OPTION_AGENT_TARGET = exports.OPTION_PASS = exports.OPTION_APP = exports.OPTION_USER = exports.OPTION_AGENT_TOKEN = exports.OPTION_AGENT_START = exports.OPTION_AGENT_ID = exports.OPTION_ID = exports.OPTION_NAME = exports.OPTION_TARGET = exports.OPTION_TLS_TERMINATE = exports.OPTION_TLS_CA = exports.OPTION_TLS_CERT = exports.OPTION_TLS_KEY = exports.OPTION_HTTP_CIRCUIT_BREAKER = exports.OPTION_HTTP_COMPRESSION = exports.OPTION_HTTP_2 = exports.OPTION_HTTP_VERIFY = exports.OPTION_HTTP_LOG = exports.OPTION_HTTP_AUTH_BUDDY = exports.OPTION_HTTP_AUTH = exports.OPTION_HTTP_HOST = exports.OPTION_CONFIRM_FORCE = exports.OPTION_FORCE = exports.OPTION_TOKEN = exports.OPTION_TIMEOUT = exports.OPTION_FOLLOW = exports.OPTION_SERVE = exports.OPTION_HEADER_USER_AGENT = exports.OPTION_RESPONSE_HEADER = exports.OPTION_HEADER = exports.OPTION_WHITELIST = exports.OPTION_REST_API_PER_PAGE = exports.OPTION_REST_API_PAGE = exports.OPTION_REST_API_PROJECT = exports.OPTION_REST_API_WORKSPACE = exports.OPTION_PIPELINE_RUN_WAIT = exports.OPTION_PIPELINE_RUN_ACTION = exports.OPTION_REST_API_TOKEN = void 0;
|
|
9
|
+
exports.LOG_TUNNEL_REGISTERED = exports.LOG_ERROR_WHILE_REFRESHING_AGENT = exports.LOG_REGISTERING_TUNNEL = exports.LOG_GETTING_AGENT = exports.LOG_UNREGISTERING_AGENT = exports.LOG_REGION_DETECTED = exports.LOG_AGENT_REGISTERED = exports.LOG_SOCKET_DISCONNECTED = exports.LOG_SOCKET_CONNECTED = exports.LOG_AGENT_NSSM_CLEARING = exports.LOG_AGENT_NSSM_EXTRACTING = exports.LOG_AGENT_NSSM_DOWNLOADING = exports.LOG_AGENT_ENABLED = exports.LOG_AGENT_STARTING_SYSTEM = exports.LOG_AGENT_STOPPING_SYSTEM = exports.LOG_AGENT_ENABLING_SYSTEM = exports.LOG_AGENT_SYSTEM_SERVICE_CONFIG = exports.LOG_AGENT_EXTRACTING_ARCHIVE = exports.LOG_AGENT_DOWNLOADING_ARCHIVE = exports.LOG_AGENT_SYSTEM_DIR = exports.LOG_ERROR_SAVING_AGENT_LOCAL_CONFIG = exports.LOG_ERROR_REMOVING_AGENT_STANDALONE_LOCK_FILE = exports.LOG_ERROR_SAVING_AGENT_STANDALONE_CONFIG = exports.LOG_ERROR_SAVING_AGENT_SYSTEM_CONFIG = exports.LOG_SAVING_AGENT_LOCAL_CONFIG = exports.LOG_REMOVING_AGENT_PROC_ID = exports.LOG_SAVING_AGENT_PROC_ID = exports.LOG_SAVING_AGENT_SYSTEM_CONFIG = exports.LOG_REGISTERING_AGENT = exports.OPTION_SCRAPE_OUTPUT_DIR = exports.OPTION_SCRAPE_DELAY = exports.OPTION_SCRAPE_DARK_MODE = exports.OPTION_SCRAPE_WAIT_FOR_ELEMENT = exports.OPTION_SCRAPE_DEVICE_PIXEL_RATIO = exports.OPTION_SCRAPE_VIEWPORT = exports.OPTION_SCRAPE_BROWSER = exports.OPTION_SCRAPE_XPATH_SELECTOR = exports.OPTION_SCRAPE_CSS_SELECTOR = exports.OPTION_SCRAPE_FULL_PAGE = exports.OPTION_SCRAPE_QUALITY = exports.OPTION_SCRAPE_OUTPUT_TYPE = exports.OPTION_SCRAPE_FOLLOW = exports.OPTION_SCRAPE_URL = exports.OPTION_COMPARE_WAIT_FOR = exports.OPTION_COMPARE_DELAY = exports.OPTION_COMPARE_HEADER = exports.OPTION_COMPARE_COOKIE = exports.OPTION_COMPARE_IGNORE = exports.OPTION_COMPARE_IGNORE_URLS = exports.OPTION_COMPARE_DRY_RUN = void 0;
|
|
10
|
+
exports.DESC_COMMAND_SANDBOX_LIST = exports.DESC_COMMAND_SANDBOX_CREATE = exports.DESC_COMMAND_SANDBOX = exports.DEBUG_WAIT_FOR_IDLE_TIMEOUT = exports.DEBUG_WAIT_FOR_IDLE = exports.DEBUG_RESOURCE_DISCOVERY_TIMEOUT = exports.DEBUG_AUTO_WIDTH = exports.DEBUG_AUTO_SCROLL = exports.DEBUG_RESOURCE_SCRAPPING_URL = exports.DEBUG_SNAPSHOT_PROCESSING = exports.DEBUG_SNAPSHOTS_PROCESSING = exports.DEBUG_EXEC_COMMAND = exports.DEBUG_EXEC_TEST_COMMAND = exports.LOG_INSTALLED_BROWSER = exports.LOG_SESSION_LINK = exports.LOG_SENDING_DATA = exports.LOG_SENDING_REQUEST = exports.LOG_PROCESSING_SNAPSHOTS = exports.LOG_RUNNING_EXEC_COMMAND = exports.LOG_TUNNEL_SSH_STREAM = exports.LOG_TUNNEL_TLS_AGENT_STREAM = exports.LOG_TUNNEL_TLS_REGION_STREAM = exports.LOG_TUNNEL_TLS_TARGET_STREAM = exports.LOG_TUNNEL_HTTP2_STREAM = exports.LOG_TUNNEL_HTTP1_STREAM = exports.LOG_TUNNEL_TCP_STREAM = exports.LOG_TUNNEL_HTTP_WRONG_USER_AGENTS = exports.LOG_TUNNEL_HTTP_CIRCUIT_BREAKER_OPEN = exports.LOG_TUNNEL_HTTP_RATE_LIMIT = exports.LOG_TUNNEL_HTTP_WRON_AUTH = exports.LOG_TUNNEL_IDENTIFIED = exports.LOG_TUNNEL_DISCONNECTED = exports.LOG_TUNNEL_FAILED = exports.LOG_TUNNEL_CONNECTED = exports.LOG_AGENT_STARTED = exports.LOG_AGENT_SERVER_STARTED = exports.LOG_ERROR_STARTING_AGENT_SERVER = exports.LOG_SSH_CONNECTION = exports.LOG_WRONG_STREAM = exports.LOG_DETECTED_STREAM = exports.LOG_HTTP2_REQUEST = exports.LOG_HTTP2_CONNECTION = exports.LOG_HTTP1_REQUEST = exports.LOG_HTTP1_CONNECTION = exports.LOG_ERROR = exports.LOG_STOPPING_TUNNEL = exports.LOG_STARTING_TUNNEL = exports.LOG_ENABLING_AGENT_TARGET = exports.LOG_DISABLING_AGENT_TARGET = exports.LOG_REMOVING_TUNNEL = void 0;
|
|
11
|
+
exports.OPTION_SANDBOX_COMMAND_KILL_CONFIRM = exports.OPTION_SANDBOX_COMMAND_ID = exports.DESC_COMMAND_SANDBOX_EXEC_KILL = exports.DESC_COMMAND_SANDBOX_EXEC_LOGS = exports.DESC_COMMAND_SANDBOX_EXEC_STATUS = exports.DESC_COMMAND_SANDBOX_EXEC_LIST = exports.TXT_SANDBOX_WAITING_START = exports.TXT_SANDBOX_WAITING_STOP = exports.TXT_SANDBOX_WAITING_APP = exports.TXT_SANDBOX_WAITING_SETUP = exports.TXT_SANDBOX_WAITING_RUNNING = exports.TXT_SANDBOX_STOPPED = exports.TXT_SANDBOX_STARTED = exports.TXT_SANDBOX_DESTROYED = exports.TXT_SANDBOX_DESTROY_CONFIRM = exports.TXT_SANDBOX_CREATED = exports.TXT_SANDBOX_CREATING = exports.OPTION_SANDBOX_WAIT = exports.OPTION_SANDBOX_WAIT_APP = exports.OPTION_SANDBOX_WAIT_CONFIGURED = exports.OPTION_SANDBOX_WAIT_RUNNING = exports.ERR_SANDBOX_STOP_FAILED = exports.ERR_SANDBOX_NO_COMMANDS = exports.ERR_SANDBOX_RUNNING_FAILED = exports.ERR_SANDBOX_STOP_TIMEOUT = exports.ERR_SANDBOX_SNAPSHOT_TIMEOUT = exports.ERR_SANDBOX_RUNNING_TIMEOUT = exports.ERR_SANDBOX_APP_TIMEOUT = exports.ERR_SANDBOX_SETUP_TIMEOUT = exports.ERR_SANDBOX_APP_FAILED = exports.ERR_SANDBOX_SETUP_FAILED = exports.ERR_SANDBOX_INVALID_RESOURCES = exports.ERR_SANDBOX_NOT_FOUND = exports.OPTION_SANDBOX_RUNTIME = exports.OPTION_SANDBOX_APP_TYPE = exports.OPTION_SANDBOX_APP_DIR = exports.OPTION_SANDBOX_RUN_COMMAND = exports.OPTION_SANDBOX_TAGS = exports.OPTION_SANDBOX_INSTALL_COMMANDS = exports.OPTION_SANDBOX_RESOURCES = exports.OPTION_SANDBOX_OS = exports.OPTION_SANDBOX_NAME = exports.OPTION_SANDBOX_IDENTIFIER = exports.DESC_COMMAND_SANDBOX_EXEC = exports.DESC_COMMAND_SANDBOX_STATUS = exports.DESC_COMMAND_SANDBOX_RESTART = exports.DESC_COMMAND_SANDBOX_STOP = exports.DESC_COMMAND_SANDBOX_START = exports.DESC_COMMAND_SANDBOX_DESTROY = exports.DESC_COMMAND_SANDBOX_GET = void 0;
|
|
12
|
+
exports.DESC_COMMAND_LOGOUT = exports.DESC_COMMAND_LOGIN = exports.ERR_WHOAMI_LOGOUT = exports.TXT_WHOAMI_NO_PROJECT = exports.TXT_WHOAMI_NO_WORKSPACE = exports.DESC_COMMAND_WHOAMI = exports.TXT_SANDBOX_EXEC_FAILED = exports.TXT_SANDBOX_EXEC_INPROGRESS = exports.TXT_SANDBOX_EXEC_SUCCESS = exports.TXT_SANDBOX_EXEC_BACKGROUND = exports.TXT_SANDBOX_EXEC_ID = exports.ERR_SANDBOX_CP_INVALID_DEST = exports.ERR_SANDBOX_CP_SOURCE_NOT_FOUND = exports.TXT_SANDBOX_CP_DONE = exports.TXT_SANDBOX_CP_PROGRESS = exports.OPTION_SANDBOX_CP_SILENT = exports.OPTION_SANDBOX_CP_DEST = exports.OPTION_SANDBOX_CP_SOURCE = exports.DESC_COMMAND_SANDBOX_CP = exports.ERR_SANDBOX_ENDPOINTS_NOT_FOUND = exports.ERR_SANDBOX_ENDPOINT_NOT_FOUND = exports.ERR_SANDBOX_ENDPOINT_EXISTS = exports.TXT_SANDBOX_ENDPOINT_DELETED = exports.TXT_SANDBOX_ENDPOINT_DELETE_CONFIRM = exports.TXT_SANDBOX_ENDPOINT_ADDED = exports.OPTION_SANDBOX_ENDPOINT_TYPE = exports.OPTION_SANDBOX_ENDPOINT_PORT = exports.OPTION_SANDBOX_ENDPOINT_NAME_ARG = exports.OPTION_SANDBOX_ENDPOINT_NAME = exports.DESC_COMMAND_SANDBOX_ENDPOINT_DELETE = exports.DESC_COMMAND_SANDBOX_ENDPOINT_ADD = exports.DESC_COMMAND_SANDBOX_ENDPOINT_GET = exports.DESC_COMMAND_SANDBOX_ENDPOINT_LIST = exports.DESC_COMMAND_SANDBOX_ENDPOINT = exports.ERR_SANDBOX_SNAPSHOTS_NOT_FOUND = exports.ERR_SANDBOX_SNAPSHOT_NOT_FOUND = exports.ERR_SANDBOX_SNAPSHOT_FAILED = exports.TXT_SANDBOX_SNAPSHOT_WAITING = exports.TXT_SANDBOX_SNAPSHOT_DELETE_CONFIRM = exports.TXT_SANDBOX_SNAPSHOT_DELETED = exports.TXT_SANDBOX_SNAPSHOT_CREATED = exports.OPTION_SANDBOX_FROM_SNAPSHOT = exports.OPTION_SANDBOX_SNAPSHOT_NAME_ARG = exports.OPTION_SANDBOX_SNAPSHOT_NAME = exports.DESC_COMMAND_SANDBOX_SNAPSHOT_DELETE = exports.DESC_COMMAND_SANDBOX_SNAPSHOT_GET = exports.DESC_COMMAND_SANDBOX_SNAPSHOT_CREATE = exports.DESC_COMMAND_SANDBOX_SNAPSHOT_LIST = exports.DESC_COMMAND_SANDBOX_SNAPSHOT = exports.TXT_SANDBOX_COMMAND_KILLED = void 0;
|
|
13
|
+
exports.DESC_COMMAND_PROJECT_GET = exports.ARG_COMMAND_PROJECT_NAME = exports.DESC_COMMAND_PROJECT_SET = exports.DESC_COMMAND_PROJECT_LIST = exports.DESC_COMMAND_PROJECT = exports.TXT_PACKAGE_VERSION_DOWNLOAD = exports.TXT_PACKAGE_CREATED = exports.TXT_PACKAGE_VERSION_DELETED = exports.TXT_PACKAGE_DELETED = exports.ERR_COMMAND_PACKAGE_TYPE = exports.OPT_COMMAND_PACKAGE_VERSION = exports.OPT_COMMAND_PACKAGE_IDENTIFIER = exports.OPT_COMMAND_PACKAGE_CREATE_IDENTIFIER = exports.OPT_COMMAND_PACKAGE_NAME = exports.OPT_COMMAND_PACKAGE_TYPE = exports.DESC_COMMAND_PACKAGE_CREATE = exports.DESC_COMMAND_PACKAGE_GET = exports.TXT_PACKAGE_DOCKER_LOGIN_FAILED = exports.TXT_PACKAGE_DOCKER_LOGIN_SUCCESS = exports.TXT_PACKAGE_VERSION_DELETE_CONFIRM = exports.TXT_PACKAGE_DELETE_CONFIRM = exports.DESC_COMMAND_PACKAGE_DELETE = exports.ERR_COMMAND_PACKAGE_NO_PROJECTS = exports.DESC_COMMAND_PACKAGE_VERSION_GET = exports.DESC_COMMAND_PACKAGE_VERSION_LIST = exports.DESC_COMMAND_PACKAGE_VERSION_DELETE = exports.DESC_COMMAND_PACKAGE_DOCKER_LOGIN = exports.DESC_COMMAND_PACKAGE_LIST = exports.DESC_COMMAND_PACKAGE_VERSION = exports.ERR_API_MESSAGE_REPLACER = exports.ERR_LOGIN_INVALID_BASE_URL = exports.ERR_LOGIN_NO_PROJECT_FOUND = exports.ERR_LOGIN_NO_WORKSPACE_FOUND = exports.ERR_LOGIN_NO_WORKSPACES = exports.ERR_LOGIN_HTTP_SUCCESS = exports.ERR_LOGIN_HTTP_FAILED = exports.TXT_LOGIN_OAUTH = exports.ERR_LOGIN_HTTP_SERVER_PORT_TAKEN = exports.TXT_LOGIN_SUCCESS = exports.TXT_LOGIN_SELECT_WORKSPACE = exports.TXT_LOGIN_ENTER_BASE_URL = exports.TXT_LOGIN_SELECT_REGION = exports.TXT_WORKSPACE_NONE = exports.TXT_WORKSPACE_SET_SUCCESS = exports.ARG_COMMAND_WORKSPACE = exports.DESC_COMMAND_WORKSPACE_GET = exports.DESC_COMMAND_WORKSPACE_SET = exports.DESC_COMMAND_WORKSPACE_LIST = exports.DESC_COMMAND_WORKSPACE = exports.TXT_LOGOUT_SUCCESS = void 0;
|
|
14
|
+
exports.TXT_PROJECT_NONE = exports.ERR_PROJECT_NO_PROJECTS = exports.TXT_LOGIN_SELECT_PROJECT = exports.TXT_PROJECT_SET_CLEARED = exports.TXT_PROJECT_SET_SUCCESS = void 0;
|
|
14
15
|
const utils_1 = require("./utils");
|
|
15
16
|
exports.ERR_REST_API_GENERAL_ERROR = 'Something went wrong';
|
|
16
17
|
exports.ERR_REST_API_NOT_RESPONDING = 'Api endpoint not responding. Try again later...';
|
|
@@ -31,6 +32,8 @@ exports.ERR_PACKAGE_DOWNLOAD_NOT_FOUND = 'Package not found';
|
|
|
31
32
|
exports.ERR_PACKAGE_PUBLISH_NOT_FOUND = 'Package not found. Change package name or use --create to create one';
|
|
32
33
|
exports.ERR_PACKAGE_VERSION_EXISTS = 'Package version exists. Change version name or use --force flag';
|
|
33
34
|
exports.ERR_PACKAGE_VERSION_NOT_FOUND = 'Package version not found';
|
|
35
|
+
exports.ERR_PACKAGE_NOT_FOUND = 'Package not found';
|
|
36
|
+
exports.ERR_PACKAGE_VERSIONS_NOT_FOUND = 'No versions found in this package';
|
|
34
37
|
exports.ERR_SANDBOX_EXEC_RUNTIME_NOT_FOUND = 'Sandbox exec runtime not found';
|
|
35
38
|
exports.ERR_RUN_PIPELINE_WAIT_TIMEOUT = 'Timeout waiting for run to finish';
|
|
36
39
|
exports.ERR_RUN_PIPELINE_WRONG_PRIORITY = 'Priority has wrong value. Possible: LOW, NORMAL, HIGH';
|
|
@@ -160,6 +163,7 @@ exports.TXT_AGENT_INSTALLED = 'Agent installed';
|
|
|
160
163
|
exports.TXT_AGENT_UPDATED = 'Agent updated';
|
|
161
164
|
exports.TXT_AGENT_ALREADY_INSTALLED = 'Agent already installed';
|
|
162
165
|
exports.TXT_AGENT_DISABLED = 'Agent uninstalled';
|
|
166
|
+
exports.TXY_AGENT_CONFIRM_DELETE = 'Are you sure you want to delete agent?';
|
|
163
167
|
const TXT_TUNNEL_STARTED = (type) => `${type} tunnel started`;
|
|
164
168
|
exports.TXT_TUNNEL_STARTED = TXT_TUNNEL_STARTED;
|
|
165
169
|
exports.TXT_TUNNEL_STOPPED = 'Tunnel stopped';
|
|
@@ -228,8 +232,8 @@ exports.DESC_COMMAND_TLS = 'Starts a tunnel listening for TLS traffic on port 44
|
|
|
228
232
|
exports.DESC_PROGRAM = 'Work seamlessly with Buddy from the command line.';
|
|
229
233
|
exports.DESC_COMMAND_PIPELINE = 'Commands to interact with the pipeline service';
|
|
230
234
|
exports.DESC_COMMAND_PACKAGE = 'Commands to interact with the package service';
|
|
231
|
-
exports.DESC_COMMAND_PACKAGE_PUBLISH = 'Publish package. Required scopes: PACKAGE_MANAGE';
|
|
232
|
-
exports.DESC_COMMAND_PACKAGE_DOWNLOAD = 'Download package. Required scopes: PACKAGE_READ';
|
|
235
|
+
exports.DESC_COMMAND_PACKAGE_PUBLISH = 'Publish file package. Required scopes: PACKAGE_MANAGE';
|
|
236
|
+
exports.DESC_COMMAND_PACKAGE_DOWNLOAD = 'Download file package. Required scopes: PACKAGE_READ';
|
|
233
237
|
exports.DESC_COMMAND_PIPELINE_RUN = 'Run pipeline. Required scopes: EXECUTION_INFO, EXECUTION_RUN';
|
|
234
238
|
exports.DESC_COMMAND_VT = 'Commands to interact with the visual test service';
|
|
235
239
|
exports.DESC_COMMAND_VT_CLOSE = 'Close visual test session.';
|
|
@@ -284,63 +288,66 @@ exports.TXT_PACKAGE_UNZIPPING_COUNT = TXT_PACKAGE_UNZIPPING_COUNT;
|
|
|
284
288
|
exports.OPTION_REGION = 'override default region ("eu", "us", "as")';
|
|
285
289
|
exports.OPTION_DEFAULT_REGION = 'default region ("eu", "us", "as")';
|
|
286
290
|
exports.OPTION_REST_API_ENDPOINT = 'API URL for On-Premises installations. Can be set via variable: BUDDY_API_ENDPOINT';
|
|
287
|
-
exports.OPTION_REST_API_REGION = 'Region ("us", "eu", "as").
|
|
288
|
-
exports.OPTION_PIPELINE_RUN_BRANCH = '
|
|
289
|
-
exports.OPTION_PIPELINE_RUN_TAG = '
|
|
290
|
-
exports.OPTION_PIPELINE_RUN_REVISION = '
|
|
291
|
-
exports.OPTION_PIPELINE_RUN_PULL_REQUEST = '
|
|
292
|
-
exports.OPTION_PIPELINE_RUN_COMMENT = '
|
|
293
|
-
exports.OPTION_PIPELINE_RUN_REFRESH = '
|
|
294
|
-
exports.OPTION_PIPELINE_RUN_CLEAR_CACHE = '
|
|
295
|
-
exports.OPTION_PIPELINE_RUN_PRIORITY = '
|
|
296
|
-
exports.OPTION_PIPELINE_RUN_VAR = '
|
|
297
|
-
exports.OPTION_PIPELINE_RUN_DELAY = '
|
|
298
|
-
exports.OPTION_PIPELINE_RUN_ARGUMENT = '
|
|
299
|
-
exports.OPTION_PACKAGE_PUBLISH_PATH = '
|
|
300
|
-
exports.OPTION_PACKAGE_DOWNLOAD_PATH = '
|
|
301
|
-
exports.OPTION_PACKAGE_ID = '
|
|
302
|
-
exports.OPTION_PACKAGE_PUBLISH_CREATE = '
|
|
303
|
-
exports.OPTION_PACKAGE_PUBLISH_OVERWRITE_VERSION = '
|
|
304
|
-
exports.OPTION_PACKAGE_DOWNLOAD_MERGE = '
|
|
305
|
-
exports.OPTION_PACKAGE_DOWNLOAD_REPLACE = '
|
|
291
|
+
exports.OPTION_REST_API_REGION = 'Region ("us", "eu", "as"). Can be set via variable: BUDDY_REGION';
|
|
292
|
+
exports.OPTION_PIPELINE_RUN_BRANCH = 'Repository branch name';
|
|
293
|
+
exports.OPTION_PIPELINE_RUN_TAG = 'Repository tag name';
|
|
294
|
+
exports.OPTION_PIPELINE_RUN_REVISION = 'Repository revision';
|
|
295
|
+
exports.OPTION_PIPELINE_RUN_PULL_REQUEST = 'Repository pull request id';
|
|
296
|
+
exports.OPTION_PIPELINE_RUN_COMMENT = 'Run comment';
|
|
297
|
+
exports.OPTION_PIPELINE_RUN_REFRESH = 'Deploy from scratch';
|
|
298
|
+
exports.OPTION_PIPELINE_RUN_CLEAR_CACHE = 'Clear cache before running the pipeline';
|
|
299
|
+
exports.OPTION_PIPELINE_RUN_PRIORITY = 'Run priority. Can be one of "LOW", "NORMAL" or "HIGH". Default is "NORMAL"';
|
|
300
|
+
exports.OPTION_PIPELINE_RUN_VAR = 'Variable key:value. Can be passed multiple times to pass multiple variables';
|
|
301
|
+
exports.OPTION_PIPELINE_RUN_DELAY = 'The date when the execution should be run. Should be set in the format: 2016-11-18T12:38:16.000Z or 30s, 10m, 3h10m30s';
|
|
302
|
+
exports.OPTION_PIPELINE_RUN_ARGUMENT = 'Human-readable ID of the pipeline';
|
|
303
|
+
exports.OPTION_PACKAGE_PUBLISH_PATH = 'Path to the directory or file';
|
|
304
|
+
exports.OPTION_PACKAGE_DOWNLOAD_PATH = 'Path to the directory or file';
|
|
305
|
+
exports.OPTION_PACKAGE_ID = 'Human-readable ID of the package and optionally version: package@version';
|
|
306
|
+
exports.OPTION_PACKAGE_PUBLISH_CREATE = 'Create package if not exists';
|
|
307
|
+
exports.OPTION_PACKAGE_PUBLISH_OVERWRITE_VERSION = 'Allow overwriting existing version';
|
|
308
|
+
exports.OPTION_PACKAGE_DOWNLOAD_MERGE = 'Merge contents of the directory with package';
|
|
309
|
+
exports.OPTION_PACKAGE_DOWNLOAD_REPLACE = 'Replace contents of the directory with package';
|
|
306
310
|
exports.OPTION_REST_API_TOKEN = 'Personal access token. Can be set via variable: BUDDY_TOKEN';
|
|
307
|
-
exports.OPTION_PIPELINE_RUN_ACTION = "
|
|
308
|
-
exports.OPTION_PIPELINE_RUN_WAIT = '
|
|
311
|
+
exports.OPTION_PIPELINE_RUN_ACTION = "Action ID to be run in this execution. If not sent, it will be run in accordance with the pipeline's definition. Can be passed multiple times to select multiple actions";
|
|
312
|
+
exports.OPTION_PIPELINE_RUN_WAIT = 'Wait for run to finish';
|
|
309
313
|
exports.OPTION_REST_API_WORKSPACE = 'Workspace URL handle. Can be set via variable: BUDDY_WORKSPACE';
|
|
310
314
|
exports.OPTION_REST_API_PROJECT = 'Project name. Can be set via variable: BUDDY_PROJECT';
|
|
311
|
-
exports.
|
|
312
|
-
exports.
|
|
313
|
-
exports.
|
|
314
|
-
exports.
|
|
315
|
-
exports.
|
|
316
|
-
exports.
|
|
317
|
-
exports.
|
|
318
|
-
exports.
|
|
319
|
-
exports.
|
|
320
|
-
exports.
|
|
321
|
-
exports.
|
|
322
|
-
exports.
|
|
323
|
-
exports.
|
|
324
|
-
exports.
|
|
325
|
-
exports.
|
|
326
|
-
exports.
|
|
327
|
-
exports.
|
|
328
|
-
exports.
|
|
329
|
-
exports.
|
|
330
|
-
exports.
|
|
331
|
-
exports.
|
|
332
|
-
exports.
|
|
333
|
-
exports.
|
|
334
|
-
exports.
|
|
335
|
-
exports.
|
|
336
|
-
exports.
|
|
337
|
-
exports.
|
|
315
|
+
exports.OPTION_REST_API_PAGE = 'Page number. Default: 1';
|
|
316
|
+
exports.OPTION_REST_API_PER_PAGE = 'Items per page. Default: 10';
|
|
317
|
+
exports.OPTION_WHITELIST = 'Whitelist provided IP CIDRs. Use "*" to allow all';
|
|
318
|
+
exports.OPTION_HEADER = 'Header key:value to add to the request';
|
|
319
|
+
exports.OPTION_RESPONSE_HEADER = 'Header key:value to add to the response';
|
|
320
|
+
exports.OPTION_HEADER_USER_AGENT = 'Whitelist browser user-agent by contained text or regular expressions (e.g. /my-user-agent/). By Default all are allowed';
|
|
321
|
+
exports.OPTION_SERVE = 'Serve files from a directory';
|
|
322
|
+
exports.OPTION_FOLLOW = 'Follow tunnel details';
|
|
323
|
+
exports.OPTION_TIMEOUT = 'Enforce connection timeout in seconds';
|
|
324
|
+
exports.OPTION_TOKEN = 'Token to authorize agent';
|
|
325
|
+
exports.OPTION_FORCE = 'Overwrite tunnel if it already exist';
|
|
326
|
+
exports.OPTION_CONFIRM_FORCE = 'Skip confirmation prompt';
|
|
327
|
+
exports.OPTION_HTTP_HOST = 'Provide custom HTTP host header';
|
|
328
|
+
exports.OPTION_HTTP_AUTH = 'Enforce HTTP basic authorization';
|
|
329
|
+
exports.OPTION_HTTP_AUTH_BUDDY = 'Enforce HTTP Buddy authorization';
|
|
330
|
+
exports.OPTION_HTTP_LOG = 'Log HTTP requests';
|
|
331
|
+
exports.OPTION_HTTP_VERIFY = 'Enforce TLS verify';
|
|
332
|
+
exports.OPTION_HTTP_2 = 'Enforce HTTP/2';
|
|
333
|
+
exports.OPTION_HTTP_COMPRESSION = 'Turn on HTTP response compression';
|
|
334
|
+
exports.OPTION_HTTP_CIRCUIT_BREAKER = 'Turn on circuit breaker. Provide decimal value between 0 to 1';
|
|
335
|
+
exports.OPTION_TLS_KEY = 'Path to a TLS key';
|
|
336
|
+
exports.OPTION_TLS_CERT = 'Path to a TLS PEM certificate';
|
|
337
|
+
exports.OPTION_TLS_CA = 'Path to a TLS PEM CA certificate for TLS auth';
|
|
338
|
+
exports.OPTION_TLS_TERMINATE = 'Terminate TLS at "target", "agent", "region". By default TLS is terminated at "region"';
|
|
339
|
+
exports.OPTION_TARGET = 'Target address to redirect traffic to. Host is optional and by default local machine. Port is by default 80';
|
|
340
|
+
exports.OPTION_NAME = 'Name of the tunnel';
|
|
341
|
+
exports.OPTION_ID = 'Id of the tunnel';
|
|
342
|
+
exports.OPTION_AGENT_ID = 'Start existing agent';
|
|
343
|
+
exports.OPTION_AGENT_START = 'Start agent right away';
|
|
344
|
+
exports.OPTION_AGENT_TOKEN = 'Token to authorize existing agent agent or token to add a new agent';
|
|
338
345
|
exports.OPTION_USER = 'OS user name. Default: root (macOS/Linux), LocalSystem (Windows. Provide as DOMAIN\\USER (use `whoami` to get full username)';
|
|
339
346
|
exports.OPTION_APP = 'Starts bdy agent as standalone process';
|
|
340
|
-
exports.OPTION_PASS = '
|
|
341
|
-
exports.OPTION_AGENT_TARGET = '
|
|
342
|
-
exports.OPTION_AGENT_PORT = '
|
|
343
|
-
exports.OPTION_AGENT_DEBUG = '
|
|
347
|
+
exports.OPTION_PASS = 'Password of the user. Only set for Windows';
|
|
348
|
+
exports.OPTION_AGENT_TARGET = 'Makes the agent available as a target';
|
|
349
|
+
exports.OPTION_AGENT_PORT = 'Agent API port';
|
|
350
|
+
exports.OPTION_AGENT_DEBUG = 'Turns on debug mode';
|
|
344
351
|
exports.OPTION_EXEC_COMMAND = 'Test runner command';
|
|
345
352
|
exports.OPTION_EXEC_SKIP_DISCOVERY = 'Skip resource discovery';
|
|
346
353
|
exports.OPTION_EXEC_ONE_BY_ONE = 'Send snapshots one by one';
|
|
@@ -492,16 +499,16 @@ exports.DESC_COMMAND_SANDBOX_RESTART = 'Restart a sandbox';
|
|
|
492
499
|
exports.DESC_COMMAND_SANDBOX_STATUS = 'Get sandbox status';
|
|
493
500
|
exports.DESC_COMMAND_SANDBOX_EXEC = 'Execute a command in sandbox';
|
|
494
501
|
// Sandbox options
|
|
495
|
-
exports.OPTION_SANDBOX_IDENTIFIER = '
|
|
496
|
-
exports.OPTION_SANDBOX_NAME = '
|
|
497
|
-
exports.OPTION_SANDBOX_OS = '
|
|
498
|
-
exports.OPTION_SANDBOX_RESOURCES = '
|
|
499
|
-
exports.OPTION_SANDBOX_INSTALL_COMMANDS = '
|
|
500
|
-
exports.OPTION_SANDBOX_TAGS = '
|
|
501
|
-
exports.OPTION_SANDBOX_RUN_COMMAND = '
|
|
502
|
-
exports.OPTION_SANDBOX_APP_DIR = '
|
|
503
|
-
exports.OPTION_SANDBOX_APP_TYPE = '
|
|
504
|
-
exports.OPTION_SANDBOX_RUNTIME = '
|
|
502
|
+
exports.OPTION_SANDBOX_IDENTIFIER = 'Sandbox identifier';
|
|
503
|
+
exports.OPTION_SANDBOX_NAME = 'Sandbox display name';
|
|
504
|
+
exports.OPTION_SANDBOX_OS = 'Operating system image (default: ubuntu:24.04)';
|
|
505
|
+
exports.OPTION_SANDBOX_RESOURCES = 'Resource allocation: 1x2, 2x4, 4x8, 8x16, 12x24 (CPUxRAM)';
|
|
506
|
+
exports.OPTION_SANDBOX_INSTALL_COMMANDS = 'Setup commands to run on creation (can be used multiple times)';
|
|
507
|
+
exports.OPTION_SANDBOX_TAGS = 'Tags to add on creation (can be used multiple times)';
|
|
508
|
+
exports.OPTION_SANDBOX_RUN_COMMAND = 'Command to run on startup';
|
|
509
|
+
exports.OPTION_SANDBOX_APP_DIR = 'Application directory of the sandbox';
|
|
510
|
+
exports.OPTION_SANDBOX_APP_TYPE = 'Application type of the sandbox (CMD, SERVICE)';
|
|
511
|
+
exports.OPTION_SANDBOX_RUNTIME = 'Command runtime: BASH, JAVASCRIPT, TYPESCRIPT, PYTHON (default: BASH)';
|
|
505
512
|
// Sandbox errors
|
|
506
513
|
exports.ERR_SANDBOX_NOT_FOUND = 'Sandbox not found';
|
|
507
514
|
const ERR_SANDBOX_INVALID_RESOURCES = (resources) => `Invalid resources: ${resources}. Use: 1x2, 2x4, 4x8, 8x16, 12x24`;
|
|
@@ -516,10 +523,10 @@ exports.ERR_SANDBOX_STOP_TIMEOUT = 'Timeout waiting for sandbox stop';
|
|
|
516
523
|
exports.ERR_SANDBOX_RUNNING_FAILED = 'Sandbox failed to start';
|
|
517
524
|
exports.ERR_SANDBOX_NO_COMMANDS = 'No commands found for this sandbox';
|
|
518
525
|
exports.ERR_SANDBOX_STOP_FAILED = 'Sandbox failed to stop';
|
|
519
|
-
exports.OPTION_SANDBOX_WAIT_RUNNING = '
|
|
520
|
-
exports.OPTION_SANDBOX_WAIT_CONFIGURED = '
|
|
521
|
-
exports.OPTION_SANDBOX_WAIT_APP = '
|
|
522
|
-
exports.OPTION_SANDBOX_WAIT = '
|
|
526
|
+
exports.OPTION_SANDBOX_WAIT_RUNNING = 'Wait until sandbox is running';
|
|
527
|
+
exports.OPTION_SANDBOX_WAIT_CONFIGURED = 'Wait until sandbox ran setup commands';
|
|
528
|
+
exports.OPTION_SANDBOX_WAIT_APP = 'Wait until sandbox ran ran app commands';
|
|
529
|
+
exports.OPTION_SANDBOX_WAIT = 'Wait until operation completes';
|
|
523
530
|
// Sandbox success messages
|
|
524
531
|
const TXT_SANDBOX_CREATING = (name, identifier) => `Creating sandbox: ${name} (${identifier})`;
|
|
525
532
|
exports.TXT_SANDBOX_CREATING = TXT_SANDBOX_CREATING;
|
|
@@ -527,6 +534,8 @@ const TXT_SANDBOX_CREATED = (identifier, htmlUrl) => htmlUrl
|
|
|
527
534
|
? `Sandbox created: ${identifier}\n${htmlUrl}`
|
|
528
535
|
: `Sandbox created: ${identifier}`;
|
|
529
536
|
exports.TXT_SANDBOX_CREATED = TXT_SANDBOX_CREATED;
|
|
537
|
+
const TXT_SANDBOX_DESTROY_CONFIRM = (identifier) => `Are you sure you want to destroy sandbox '${identifier}'?`;
|
|
538
|
+
exports.TXT_SANDBOX_DESTROY_CONFIRM = TXT_SANDBOX_DESTROY_CONFIRM;
|
|
530
539
|
const TXT_SANDBOX_DESTROYED = (identifier) => `Sandbox destroyed: ${identifier}`;
|
|
531
540
|
exports.TXT_SANDBOX_DESTROYED = TXT_SANDBOX_DESTROYED;
|
|
532
541
|
const TXT_SANDBOX_STARTED = (identifier) => `Sandbox started: ${identifier}`;
|
|
@@ -543,7 +552,9 @@ exports.DESC_COMMAND_SANDBOX_EXEC_LIST = 'List all commands';
|
|
|
543
552
|
exports.DESC_COMMAND_SANDBOX_EXEC_STATUS = 'Get command status';
|
|
544
553
|
exports.DESC_COMMAND_SANDBOX_EXEC_LOGS = 'Get command logs';
|
|
545
554
|
exports.DESC_COMMAND_SANDBOX_EXEC_KILL = 'Kill a running command';
|
|
546
|
-
exports.OPTION_SANDBOX_COMMAND_ID = '
|
|
555
|
+
exports.OPTION_SANDBOX_COMMAND_ID = 'Command ID';
|
|
556
|
+
const OPTION_SANDBOX_COMMAND_KILL_CONFIRM = (identifier, commandId) => `Are you sure you want to kill sandbox '${identifier}' command '${commandId}'?`;
|
|
557
|
+
exports.OPTION_SANDBOX_COMMAND_KILL_CONFIRM = OPTION_SANDBOX_COMMAND_KILL_CONFIRM;
|
|
547
558
|
const TXT_SANDBOX_COMMAND_KILLED = (commandId) => `Command killed: ${commandId}`;
|
|
548
559
|
exports.TXT_SANDBOX_COMMAND_KILLED = TXT_SANDBOX_COMMAND_KILLED;
|
|
549
560
|
// Sandbox snapshot subcommands
|
|
@@ -552,13 +563,15 @@ exports.DESC_COMMAND_SANDBOX_SNAPSHOT_LIST = 'List snapshots';
|
|
|
552
563
|
exports.DESC_COMMAND_SANDBOX_SNAPSHOT_CREATE = 'Create a snapshot';
|
|
553
564
|
exports.DESC_COMMAND_SANDBOX_SNAPSHOT_GET = 'Get snapshot details';
|
|
554
565
|
exports.DESC_COMMAND_SANDBOX_SNAPSHOT_DELETE = 'Delete a snapshot';
|
|
555
|
-
exports.OPTION_SANDBOX_SNAPSHOT_NAME = '
|
|
556
|
-
exports.OPTION_SANDBOX_SNAPSHOT_NAME_ARG = '
|
|
557
|
-
exports.OPTION_SANDBOX_FROM_SNAPSHOT = '
|
|
566
|
+
exports.OPTION_SANDBOX_SNAPSHOT_NAME = 'Snapshot name (optional, auto-generated if not provided)';
|
|
567
|
+
exports.OPTION_SANDBOX_SNAPSHOT_NAME_ARG = 'Snapshot name';
|
|
568
|
+
exports.OPTION_SANDBOX_FROM_SNAPSHOT = 'Create from snapshot name (instead of OS)';
|
|
558
569
|
const TXT_SANDBOX_SNAPSHOT_CREATED = (snapshotName) => `Snapshot created: ${snapshotName}`;
|
|
559
570
|
exports.TXT_SANDBOX_SNAPSHOT_CREATED = TXT_SANDBOX_SNAPSHOT_CREATED;
|
|
560
571
|
const TXT_SANDBOX_SNAPSHOT_DELETED = (snapshotName) => `Snapshot deleted: ${snapshotName}`;
|
|
561
572
|
exports.TXT_SANDBOX_SNAPSHOT_DELETED = TXT_SANDBOX_SNAPSHOT_DELETED;
|
|
573
|
+
const TXT_SANDBOX_SNAPSHOT_DELETE_CONFIRM = (identifier, snapshotName) => `Are you sure you want to delete sandbox '${identifier}' snapshot '${snapshotName}'?`;
|
|
574
|
+
exports.TXT_SANDBOX_SNAPSHOT_DELETE_CONFIRM = TXT_SANDBOX_SNAPSHOT_DELETE_CONFIRM;
|
|
562
575
|
exports.TXT_SANDBOX_SNAPSHOT_WAITING = 'Waiting for snapshot to be ready...';
|
|
563
576
|
exports.ERR_SANDBOX_SNAPSHOT_FAILED = 'Snapshot creation failed';
|
|
564
577
|
exports.ERR_SANDBOX_SNAPSHOT_NOT_FOUND = 'Snapshot not found';
|
|
@@ -569,12 +582,14 @@ exports.DESC_COMMAND_SANDBOX_ENDPOINT_LIST = 'List endpoints';
|
|
|
569
582
|
exports.DESC_COMMAND_SANDBOX_ENDPOINT_GET = 'Get endpoint details';
|
|
570
583
|
exports.DESC_COMMAND_SANDBOX_ENDPOINT_ADD = 'Add an endpoint';
|
|
571
584
|
exports.DESC_COMMAND_SANDBOX_ENDPOINT_DELETE = 'Delete an endpoint';
|
|
572
|
-
exports.OPTION_SANDBOX_ENDPOINT_NAME = '
|
|
573
|
-
exports.OPTION_SANDBOX_ENDPOINT_NAME_ARG = '
|
|
585
|
+
exports.OPTION_SANDBOX_ENDPOINT_NAME = 'Endpoint name';
|
|
586
|
+
exports.OPTION_SANDBOX_ENDPOINT_NAME_ARG = 'Endpoint name';
|
|
574
587
|
exports.OPTION_SANDBOX_ENDPOINT_PORT = '[ip:]port';
|
|
575
|
-
exports.OPTION_SANDBOX_ENDPOINT_TYPE = '
|
|
588
|
+
exports.OPTION_SANDBOX_ENDPOINT_TYPE = 'Endpoint type (HTTP, TLS, or TCP)';
|
|
576
589
|
const TXT_SANDBOX_ENDPOINT_ADDED = (name, url) => url ? `Endpoint added: ${name}\n${url}` : `Endpoint added: ${name}`;
|
|
577
590
|
exports.TXT_SANDBOX_ENDPOINT_ADDED = TXT_SANDBOX_ENDPOINT_ADDED;
|
|
591
|
+
const TXT_SANDBOX_ENDPOINT_DELETE_CONFIRM = (identifier, name) => `Are you sure you want to delete sandbox '${identifier}' endpoint '${name}'?`;
|
|
592
|
+
exports.TXT_SANDBOX_ENDPOINT_DELETE_CONFIRM = TXT_SANDBOX_ENDPOINT_DELETE_CONFIRM;
|
|
578
593
|
const TXT_SANDBOX_ENDPOINT_DELETED = (name) => `Endpoint deleted: ${name}`;
|
|
579
594
|
exports.TXT_SANDBOX_ENDPOINT_DELETED = TXT_SANDBOX_ENDPOINT_DELETED;
|
|
580
595
|
const ERR_SANDBOX_ENDPOINT_EXISTS = (name) => `Endpoint already exists: ${name}`;
|
|
@@ -583,9 +598,9 @@ exports.ERR_SANDBOX_ENDPOINT_NOT_FOUND = 'Endpoint not found';
|
|
|
583
598
|
exports.ERR_SANDBOX_ENDPOINTS_NOT_FOUND = 'No endpoints found';
|
|
584
599
|
// Sandbox cp command
|
|
585
600
|
exports.DESC_COMMAND_SANDBOX_CP = 'Copy files/directories to sandbox';
|
|
586
|
-
exports.OPTION_SANDBOX_CP_SOURCE = '
|
|
587
|
-
exports.OPTION_SANDBOX_CP_DEST = '
|
|
588
|
-
exports.OPTION_SANDBOX_CP_SILENT = '
|
|
601
|
+
exports.OPTION_SANDBOX_CP_SOURCE = 'Local file or directory path';
|
|
602
|
+
exports.OPTION_SANDBOX_CP_DEST = 'Sandbox destination (sandbox-id:/path). Full file path for single file upload. Remote directory if local directory upload';
|
|
603
|
+
exports.OPTION_SANDBOX_CP_SILENT = 'Suppress progress output';
|
|
589
604
|
const TXT_SANDBOX_CP_PROGRESS = (current, total, file) => `[${current}/${total}] ${file}`;
|
|
590
605
|
exports.TXT_SANDBOX_CP_PROGRESS = TXT_SANDBOX_CP_PROGRESS;
|
|
591
606
|
const TXT_SANDBOX_CP_DONE = (count) => `Copied ${count} file(s)`;
|
|
@@ -653,8 +668,53 @@ const ERR_API_MESSAGE_REPLACER = (message, path, baseUrl) => {
|
|
|
653
668
|
};
|
|
654
669
|
exports.ERR_API_MESSAGE_REPLACER = ERR_API_MESSAGE_REPLACER;
|
|
655
670
|
// package commands
|
|
656
|
-
exports.
|
|
671
|
+
exports.DESC_COMMAND_PACKAGE_VERSION = 'Manage package versions';
|
|
672
|
+
exports.DESC_COMMAND_PACKAGE_LIST = 'List packages. Required scopes: PACKAGE_READ';
|
|
673
|
+
exports.DESC_COMMAND_PACKAGE_DOCKER_LOGIN = 'Login to Buddy Docker registry';
|
|
674
|
+
exports.DESC_COMMAND_PACKAGE_VERSION_DELETE = 'Delete a package version. Required scopes: PACKAGE_MANAGE';
|
|
675
|
+
exports.DESC_COMMAND_PACKAGE_VERSION_LIST = 'List all versions of a package. Required scopes: PACKAGE_READ';
|
|
676
|
+
exports.DESC_COMMAND_PACKAGE_VERSION_GET = 'Get version details. Required scopes: PACKAGE_READ';
|
|
657
677
|
exports.ERR_COMMAND_PACKAGE_NO_PROJECTS = 'No packages found';
|
|
678
|
+
exports.DESC_COMMAND_PACKAGE_DELETE = 'Delete a package and all its versions. Required scopes: PACKAGE_MANAGE';
|
|
679
|
+
const TXT_PACKAGE_DELETE_CONFIRM = (name) => `Are you sure you want to delete package '${name}' and all its versions?`;
|
|
680
|
+
exports.TXT_PACKAGE_DELETE_CONFIRM = TXT_PACKAGE_DELETE_CONFIRM;
|
|
681
|
+
const TXT_PACKAGE_VERSION_DELETE_CONFIRM = (name, version) => `Are you sure you want to delete package '${name}' version '${version}'?`;
|
|
682
|
+
exports.TXT_PACKAGE_VERSION_DELETE_CONFIRM = TXT_PACKAGE_VERSION_DELETE_CONFIRM;
|
|
683
|
+
exports.TXT_PACKAGE_DOCKER_LOGIN_SUCCESS = 'Login succeeded';
|
|
684
|
+
exports.TXT_PACKAGE_DOCKER_LOGIN_FAILED = 'Login failed. Check your token and try again later...';
|
|
685
|
+
exports.DESC_COMMAND_PACKAGE_GET = 'Get package by identifier. Required scopes: PACKAGE_READ';
|
|
686
|
+
exports.DESC_COMMAND_PACKAGE_CREATE = 'Create a new package. Required scopes: PACKAGE_WRITE';
|
|
687
|
+
exports.OPT_COMMAND_PACKAGE_TYPE = 'Package type: "FILE" or "CONTAINER" (default: FILE)';
|
|
688
|
+
exports.OPT_COMMAND_PACKAGE_NAME = 'Package name';
|
|
689
|
+
exports.OPT_COMMAND_PACKAGE_CREATE_IDENTIFIER = 'Package identifier (auto-generated from name if omitted)';
|
|
690
|
+
exports.OPT_COMMAND_PACKAGE_IDENTIFIER = 'Package identifier (human-readable)';
|
|
691
|
+
exports.OPT_COMMAND_PACKAGE_VERSION = 'Package version';
|
|
692
|
+
exports.ERR_COMMAND_PACKAGE_TYPE = 'Wrong package type. Allowed: FILE, CONTAINER';
|
|
693
|
+
exports.TXT_PACKAGE_DELETED = 'Package deleted successfully';
|
|
694
|
+
exports.TXT_PACKAGE_VERSION_DELETED = 'Package version deleted successfully';
|
|
695
|
+
const TXT_PACKAGE_CREATED = (workspace, pkg) => {
|
|
696
|
+
let txt = `Package added: ${pkg.name} (${pkg.identifier})\n${pkg.html_url}\n\n`;
|
|
697
|
+
if (pkg.type === utils_1.PACKAGE_TYPE.FILE) {
|
|
698
|
+
txt += 'To publish a version:\n';
|
|
699
|
+
txt += ` bdy pkg publish ${pkg.identifier}@1.0.0 ./dist`;
|
|
700
|
+
}
|
|
701
|
+
return txt;
|
|
702
|
+
};
|
|
703
|
+
exports.TXT_PACKAGE_CREATED = TXT_PACKAGE_CREATED;
|
|
704
|
+
const TXT_PACKAGE_VERSION_DOWNLOAD = (type, identifier, version, versionUrl) => {
|
|
705
|
+
let txt = '';
|
|
706
|
+
if (type === utils_1.PACKAGE_TYPE.FILE) {
|
|
707
|
+
txt += 'To download a version:\n';
|
|
708
|
+
txt += ` bdy pkg download ${identifier}@${version} ./output\n`;
|
|
709
|
+
}
|
|
710
|
+
else {
|
|
711
|
+
txt += 'To pull an image:\n';
|
|
712
|
+
txt += ` bdy pkg docker login\n`;
|
|
713
|
+
txt += ` docker pull ${versionUrl}\n`;
|
|
714
|
+
}
|
|
715
|
+
return txt;
|
|
716
|
+
};
|
|
717
|
+
exports.TXT_PACKAGE_VERSION_DOWNLOAD = TXT_PACKAGE_VERSION_DOWNLOAD;
|
|
658
718
|
// Project commands
|
|
659
719
|
exports.DESC_COMMAND_PROJECT = 'Manage projects';
|
|
660
720
|
exports.DESC_COMMAND_PROJECT_LIST = 'List projects in current workspace';
|
package/distTs/src/utils.js
CHANGED
|
@@ -36,17 +36,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
40
|
-
exports.getBasicCommandTls = exports.getBasicCommandHttp = exports.getBasicCommandSandboxEndpoint = exports.getBasicCommandTcp = exports.createSshHostKey = exports.getRealTargetHost = exports.isWindows = void 0;
|
|
39
|
+
exports.getLatestVersion = exports.getVersionEnv = exports.getCurrentVersionWithoutEnv = exports.getVersionWithoutEnv = exports.getVersion = exports.isInstalledByChoco = exports.isInstalledByApt = exports.isInstalledByBrew = exports.isInstalledByNpm = exports.execLocally = exports.getHomeDirectory = exports.newCommand = exports.formatBytes = exports.formatHelp = exports.getPlatform = exports.getHostname = exports.isStringRegExp = exports.getRootDir = exports.TARGET_ONLY_PORT_REGEX = exports.TARGET_HTTP_REGEX = exports.TARGET_TCP_TLS_REGEX = exports.ApiErrorTunnelsDisabled = exports.ApiErrorWorkspaceFlagged = exports.ApiErrorTunnelLimitReached = exports.ApiErrorAgentLimitReached = exports.ApiErrorDomainRestricted = exports.ApiErrorTargetInvalid = exports.ApiErrorWrongToken = exports.ApiErrorFailedToConnect = exports.ApiErrorAgentNotFound = exports.PACKAGE_AUTH_TYPE = exports.PACKAGE_SCOPE = exports.PACKAGE_TYPE = exports.SANDBOX_APP_STATUS = exports.SANDBOX_SNAPSHOT_STATUS = exports.SANDBOX_SETUP_STATUS = exports.SANDBOX_EXEC_STATUS = exports.SANDBOX_EXEC_RUNTIME = exports.SANDBOX_STATUS = exports.REST_API_ENDPOINT = exports.REST_API_REGION = exports.SUGGESTED_BROWSER_VERSION = exports.DEFAULT_TIMEOUT = exports.TUNNEL_HTTP_CB_MIN_REQUESTS = exports.TUNNEL_HTTP_CB_WINDOW = exports.TUNNEL_MAX_REQUEST_SIZE_TO_SYNC = exports.TUNNEL_HTTP_LOG_MAX_REQUESTS = exports.TUNNEL_HTTP_LOG_MAX_BODY = exports.TUNNEL_HTTP_RATE_WINDOW = exports.TUNNEL_HTTP_RATE_LIMIT = void 0;
|
|
40
|
+
exports.getBasicCommandTls = exports.getBasicCommandHttp = exports.getBasicCommandSandboxEndpoint = exports.getBasicCommandTcp = exports.createSshHostKey = exports.getRealTargetHost = exports.isWindows = exports.isLinux = exports.isOsx = exports.isDocker = exports.sleep = void 0;
|
|
41
41
|
exports.apiErrorCodeToClass = apiErrorCodeToClass;
|
|
42
42
|
exports.isFile = isFile;
|
|
43
43
|
exports.getAppWorkspaceUrl = getAppWorkspaceUrl;
|
|
44
44
|
exports.getAppWorkspaceSettingsUrl = getAppWorkspaceSettingsUrl;
|
|
45
|
-
exports.getAppProjectUrl = getAppProjectUrl;
|
|
46
|
-
exports.getAppSandboxUrl = getAppSandboxUrl;
|
|
47
45
|
exports.getAppUrl = getAppUrl;
|
|
46
|
+
exports.getDockerRegistryHostByApiBaseUrl = getDockerRegistryHostByApiBaseUrl;
|
|
48
47
|
exports.getAppHostByApiBaseUrl = getAppHostByApiBaseUrl;
|
|
49
|
-
exports.asyncWait = asyncWait;
|
|
50
48
|
const node_path_1 = __importStar(require("node:path"));
|
|
51
49
|
const node_fs_1 = require("node:fs");
|
|
52
50
|
const texts_1 = require("./texts");
|
|
@@ -119,6 +117,23 @@ var SANDBOX_APP_STATUS;
|
|
|
119
117
|
SANDBOX_APP_STATUS["RUNNING"] = "RUNNING";
|
|
120
118
|
SANDBOX_APP_STATUS["FAILED"] = "FAILED";
|
|
121
119
|
})(SANDBOX_APP_STATUS || (exports.SANDBOX_APP_STATUS = SANDBOX_APP_STATUS = {}));
|
|
120
|
+
var PACKAGE_TYPE;
|
|
121
|
+
(function (PACKAGE_TYPE) {
|
|
122
|
+
PACKAGE_TYPE["FILE"] = "FILE";
|
|
123
|
+
PACKAGE_TYPE["CONTAINER"] = "CONTAINER";
|
|
124
|
+
})(PACKAGE_TYPE || (exports.PACKAGE_TYPE = PACKAGE_TYPE = {}));
|
|
125
|
+
var PACKAGE_SCOPE;
|
|
126
|
+
(function (PACKAGE_SCOPE) {
|
|
127
|
+
PACKAGE_SCOPE["WORKSPACE"] = "WORKSPACE";
|
|
128
|
+
PACKAGE_SCOPE["PROJECT"] = "PROJECT";
|
|
129
|
+
PACKAGE_SCOPE["ENVIRONMENT"] = "ENVIRONMENT";
|
|
130
|
+
})(PACKAGE_SCOPE || (exports.PACKAGE_SCOPE = PACKAGE_SCOPE = {}));
|
|
131
|
+
var PACKAGE_AUTH_TYPE;
|
|
132
|
+
(function (PACKAGE_AUTH_TYPE) {
|
|
133
|
+
PACKAGE_AUTH_TYPE["NONE"] = "NONE";
|
|
134
|
+
PACKAGE_AUTH_TYPE["BUDDY"] = "BUDDY";
|
|
135
|
+
PACKAGE_AUTH_TYPE["BASIC"] = "BASIC";
|
|
136
|
+
})(PACKAGE_AUTH_TYPE || (exports.PACKAGE_AUTH_TYPE = PACKAGE_AUTH_TYPE = {}));
|
|
122
137
|
function apiErrorCodeToClass(code, host) {
|
|
123
138
|
if (code === 234031) {
|
|
124
139
|
return new ApiErrorTargetInvalid();
|
|
@@ -274,6 +289,19 @@ const formatHelp = (cmd, helper) => {
|
|
|
274
289
|
return output.join('\n');
|
|
275
290
|
};
|
|
276
291
|
exports.formatHelp = formatHelp;
|
|
292
|
+
const formatBytes = (bytes) => {
|
|
293
|
+
if (bytes < 1024)
|
|
294
|
+
return `${bytes}B`;
|
|
295
|
+
bytes = Math.round(bytes / 1024);
|
|
296
|
+
if (bytes < 1024)
|
|
297
|
+
return `${bytes}kB`;
|
|
298
|
+
bytes = Math.round(bytes / 1024);
|
|
299
|
+
if (bytes < 1024)
|
|
300
|
+
return `${bytes}MB`;
|
|
301
|
+
bytes = Math.round(bytes / 1024);
|
|
302
|
+
return `${bytes}GB`;
|
|
303
|
+
};
|
|
304
|
+
exports.formatBytes = formatBytes;
|
|
277
305
|
const newCommand = (name, desc) => {
|
|
278
306
|
const cmd = new commander_1.Command(name);
|
|
279
307
|
if (desc)
|
|
@@ -546,15 +574,71 @@ function getAppWorkspaceUrl(baseUrl, workspace) {
|
|
|
546
574
|
function getAppWorkspaceSettingsUrl(baseUrl, workspace) {
|
|
547
575
|
return `${getAppWorkspaceUrl(baseUrl, workspace)}/-/workspace`;
|
|
548
576
|
}
|
|
549
|
-
function getAppProjectUrl(baseUrl, workspace, project) {
|
|
550
|
-
return `${getAppWorkspaceUrl(baseUrl, workspace)}/${encodeURIComponent(project)}`;
|
|
551
|
-
}
|
|
552
|
-
function getAppSandboxUrl(baseUrl, workspace, project, sandboxId) {
|
|
553
|
-
return `${getAppProjectUrl(baseUrl, workspace, project)}/sandboxes/${encodeURIComponent(sandboxId)}`;
|
|
554
|
-
}
|
|
555
577
|
function getAppUrl(baseUrl, path) {
|
|
556
578
|
return `https://${getAppHostByApiBaseUrl(baseUrl)}${path}`;
|
|
557
579
|
}
|
|
580
|
+
function getDockerRegistryHostByApiBaseUrl(baseUrl) {
|
|
581
|
+
if (baseUrl.hostname.includes('api.buddy.works')) {
|
|
582
|
+
return 'container-pkg.buddy.works';
|
|
583
|
+
}
|
|
584
|
+
else if (baseUrl.hostname.includes('api.eu.buddy.works')) {
|
|
585
|
+
return 'container-pkg.eu.buddy.works';
|
|
586
|
+
}
|
|
587
|
+
else if (baseUrl.hostname.includes('api.as.buddy.works')) {
|
|
588
|
+
return 'container-pkg.as.buddy.works';
|
|
589
|
+
}
|
|
590
|
+
else if (baseUrl.hostname.includes('api.awsdev.net')) {
|
|
591
|
+
return 'container-pkg.awsdev.net';
|
|
592
|
+
}
|
|
593
|
+
else if (baseUrl.hostname.includes('api.awsstage.net')) {
|
|
594
|
+
return 'container-pkg.awsstage.net';
|
|
595
|
+
}
|
|
596
|
+
else if (baseUrl.hostname.includes('api.buddysd.com')) {
|
|
597
|
+
return 'container-pkg.buddysd.com';
|
|
598
|
+
}
|
|
599
|
+
else if (baseUrl.hostname.includes('api.e2e.com')) {
|
|
600
|
+
return 'container-pkg.e2e.com';
|
|
601
|
+
}
|
|
602
|
+
else if (baseUrl.hostname.includes('api.sd1.com')) {
|
|
603
|
+
return 'container-pkg.sd1.com';
|
|
604
|
+
}
|
|
605
|
+
else if (baseUrl.hostname.includes('api.sd2.com')) {
|
|
606
|
+
return 'container-pkg.sd2.com';
|
|
607
|
+
}
|
|
608
|
+
else if (baseUrl.hostname.includes('api.sd3.com')) {
|
|
609
|
+
return 'container-pkg.sd3.com';
|
|
610
|
+
}
|
|
611
|
+
else if (baseUrl.hostname.includes('api.sd4.com')) {
|
|
612
|
+
return 'container-pkg.sd4.com';
|
|
613
|
+
}
|
|
614
|
+
else if (baseUrl.hostname.includes('api.sd5.com')) {
|
|
615
|
+
return 'container-pkg.sd5.com';
|
|
616
|
+
}
|
|
617
|
+
else if (baseUrl.hostname.includes('api.sd6.com')) {
|
|
618
|
+
return 'container-pkg.sd6.com';
|
|
619
|
+
}
|
|
620
|
+
else if (baseUrl.hostname.includes('api.sd7.com')) {
|
|
621
|
+
return 'container-pkg.sd7.com';
|
|
622
|
+
}
|
|
623
|
+
else if (baseUrl.hostname.includes('api.sd8.com')) {
|
|
624
|
+
return 'container-pkg.sd8.com';
|
|
625
|
+
}
|
|
626
|
+
else if (baseUrl.hostname.includes('api.sd9.com')) {
|
|
627
|
+
return 'container-pkg.sd9.com';
|
|
628
|
+
}
|
|
629
|
+
else if (baseUrl.hostname.includes('api.eu.awsstage.net')) {
|
|
630
|
+
return 'container-pkg.eu.awsstage.net';
|
|
631
|
+
}
|
|
632
|
+
else if (baseUrl.hostname.includes('api.awsmaster.net')) {
|
|
633
|
+
return 'container-pkg.awsmaster.net';
|
|
634
|
+
}
|
|
635
|
+
else if (baseUrl.hostname.includes('api.buddy.mom')) {
|
|
636
|
+
return 'container-pkg.buddy.mom';
|
|
637
|
+
}
|
|
638
|
+
else {
|
|
639
|
+
return baseUrl.hostname;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
558
642
|
function getAppHostByApiBaseUrl(baseUrl) {
|
|
559
643
|
if (baseUrl.hostname.includes('api.buddy.works')) {
|
|
560
644
|
return 'app.buddy.works';
|
|
@@ -617,8 +701,3 @@ function getAppHostByApiBaseUrl(baseUrl) {
|
|
|
617
701
|
return baseUrl.hostname;
|
|
618
702
|
}
|
|
619
703
|
}
|
|
620
|
-
async function asyncWait(ms) {
|
|
621
|
-
return new Promise((resolve) => {
|
|
622
|
-
setTimeout(resolve, ms);
|
|
623
|
-
});
|
|
624
|
-
}
|