@onexapis/cli 1.1.54 → 1.1.55

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/cli.mjs CHANGED
@@ -4713,6 +4713,18 @@ async function publishCommand(options) {
4713
4713
  process.exit(1);
4714
4714
  }
4715
4715
  logger.info(`Logged in as: ${tokens.user.email}`);
4716
+ try {
4717
+ const payload = JSON.parse(
4718
+ Buffer.from(tokens.idToken.split(".")[1], "base64").toString("utf-8")
4719
+ );
4720
+ logger.info(`[DEBUG] Token sub=${payload.sub}`);
4721
+ logger.info(`[DEBUG] Token company=${payload["custom:company_id"] || "(none)"}`);
4722
+ logger.info(`[DEBUG] Token exp=${new Date((payload.exp || 0) * 1e3).toISOString()}`);
4723
+ logger.info(`[DEBUG] Token iat=${new Date((payload.iat || 0) * 1e3).toISOString()}`);
4724
+ logger.info(`[DEBUG] API URL=${getApiUrl()}`);
4725
+ } catch {
4726
+ logger.info("[DEBUG] Could not decode token payload");
4727
+ }
4716
4728
  let themePath;
4717
4729
  if (options.theme) {
4718
4730
  themePath = path9.resolve(options.theme);
@@ -4781,6 +4793,7 @@ async function publishCommand(options) {
4781
4793
  );
4782
4794
  const regData = await regResponse.json();
4783
4795
  const regBody = regData.statusCode ? regData.body : regData;
4796
+ logger.info(`[DEBUG] Register status=${regResponse.status} body=${JSON.stringify(regBody).slice(0, 300)}`);
4784
4797
  if (!regResponse.ok) {
4785
4798
  const errMsg = regBody.error || regBody.message || "Registration failed";
4786
4799
  if (!errMsg.includes("already registered")) {