@layr-labs/ecloud-sdk 0.0.1-dev.2 → 0.0.1-dev.3

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/VERSION CHANGED
@@ -1,2 +1,2 @@
1
- version=0.0.1-dev.2
2
- commit=8ca3b7787d03d9489c9526633de1d19f1ea48513
1
+ version=0.0.1-dev.3
2
+ commit=132bf294c352e04717bc6bfa0bd81f4bba205656
package/dist/index.cjs CHANGED
@@ -2512,7 +2512,7 @@ var CanViewAppLogsPermission = "0x2fd3f2fe";
2512
2512
  var CanViewSensitiveAppInfoPermission = "0x0e67b22f";
2513
2513
  var CanUpdateAppProfilePermission = "0x036fef61";
2514
2514
  function getDefaultClientId() {
2515
- const version = true ? "0.0.1-dev.2" : "0.0.0";
2515
+ const version = true ? "0.0.1-dev.3" : "0.0.0";
2516
2516
  return `ecloud-sdk/v${version}`;
2517
2517
  }
2518
2518
  var UserApiClient = class {
@@ -4838,8 +4838,8 @@ var WATCH_POLL_INTERVAL_SECONDS = 5;
4838
4838
  var APP_STATUS_RUNNING = "Running";
4839
4839
  var APP_STATUS_FAILED = "Failed";
4840
4840
  async function watchUntilRunning(options, logger) {
4841
- const { environmentConfig, appId, privateKey, rpcUrl } = options;
4842
- const userApiClient = new UserApiClient(environmentConfig, privateKey, rpcUrl);
4841
+ const { environmentConfig, appId, privateKey, rpcUrl, clientId } = options;
4842
+ const userApiClient = new UserApiClient(environmentConfig, privateKey, rpcUrl, clientId);
4843
4843
  let initialStatus;
4844
4844
  let initialIP;
4845
4845
  let hasChanged = false;
@@ -4888,8 +4888,8 @@ async function watchUntilRunning(options, logger) {
4888
4888
  }
4889
4889
  var APP_STATUS_STOPPED = "Stopped";
4890
4890
  async function watchUntilUpgradeComplete(options, logger) {
4891
- const { environmentConfig, appId, privateKey, rpcUrl } = options;
4892
- const userApiClient = new UserApiClient(environmentConfig, privateKey, rpcUrl);
4891
+ const { environmentConfig, appId, privateKey, rpcUrl, clientId } = options;
4892
+ const userApiClient = new UserApiClient(environmentConfig, privateKey, rpcUrl, clientId);
4893
4893
  let initialStatus;
4894
4894
  let initialIP;
4895
4895
  let hasChanged = false;
@@ -5537,7 +5537,7 @@ async function executeDeploy(prepared, gas, logger = defaultLogger) {
5537
5537
  imageRef: prepared.imageRef
5538
5538
  };
5539
5539
  }
5540
- async function watchDeployment(appId, privateKey, rpcUrl, environment, logger = defaultLogger) {
5540
+ async function watchDeployment(appId, privateKey, rpcUrl, environment, logger = defaultLogger, clientId) {
5541
5541
  const environmentConfig = getEnvironmentConfig(environment);
5542
5542
  logger.info("Waiting for app to start...");
5543
5543
  return watchUntilRunning(
@@ -5545,7 +5545,8 @@ async function watchDeployment(appId, privateKey, rpcUrl, environment, logger =
5545
5545
  privateKey,
5546
5546
  rpcUrl,
5547
5547
  environmentConfig,
5548
- appId
5548
+ appId,
5549
+ clientId
5549
5550
  },
5550
5551
  logger
5551
5552
  );
@@ -5745,7 +5746,7 @@ async function executeUpgrade(prepared, gas, logger = defaultLogger) {
5745
5746
  txHash
5746
5747
  };
5747
5748
  }
5748
- async function watchUpgrade(appId, privateKey, rpcUrl, environment, logger = defaultLogger) {
5749
+ async function watchUpgrade(appId, privateKey, rpcUrl, environment, logger = defaultLogger, clientId) {
5749
5750
  const environmentConfig = getEnvironmentConfig(environment);
5750
5751
  logger.info("Waiting for upgrade to complete...");
5751
5752
  await watchUntilUpgradeComplete(
@@ -5753,7 +5754,8 @@ async function watchUpgrade(appId, privateKey, rpcUrl, environment, logger = def
5753
5754
  privateKey,
5754
5755
  rpcUrl,
5755
5756
  environmentConfig,
5756
- appId
5757
+ appId,
5758
+ clientId
5757
5759
  },
5758
5760
  logger
5759
5761
  );
@@ -6317,7 +6319,12 @@ async function logs(options, logger = defaultLogger) {
6317
6319
  }
6318
6320
  const appID = validateAppID(options.appID);
6319
6321
  const formattedApp = formatAppDisplay(environmentConfig.name, appID, "");
6320
- const userApiClient = new UserApiClient(environmentConfig, options.privateKey, rpcUrl);
6322
+ const userApiClient = new UserApiClient(
6323
+ environmentConfig,
6324
+ options.privateKey,
6325
+ rpcUrl,
6326
+ options.clientId
6327
+ );
6321
6328
  let logsText;
6322
6329
  let logsError = null;
6323
6330
  try {
@@ -6473,7 +6480,8 @@ function createAppModule(ctx) {
6473
6480
  privateKey,
6474
6481
  appID: opts.appID,
6475
6482
  watch: opts.watch,
6476
- environment: ctx.environment
6483
+ environment: ctx.environment,
6484
+ clientId: ctx.clientId
6477
6485
  },
6478
6486
  logger
6479
6487
  );
@@ -6934,12 +6942,13 @@ function generateNewPrivateKey() {
6934
6942
  }
6935
6943
 
6936
6944
  // src/client/common/utils/instance.ts
6937
- async function getCurrentInstanceType(preflightCtx, appID, logger) {
6945
+ async function getCurrentInstanceType(preflightCtx, appID, logger, clientId) {
6938
6946
  try {
6939
6947
  const userApiClient = new UserApiClient(
6940
6948
  preflightCtx.environmentConfig,
6941
6949
  preflightCtx.privateKey,
6942
- preflightCtx.rpcUrl
6950
+ preflightCtx.rpcUrl,
6951
+ clientId
6943
6952
  );
6944
6953
  const infos = await userApiClient.getInfos([appID], 1);
6945
6954
  if (infos.length === 0) {