@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.js +13 -0
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +13 -0
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -4756,6 +4756,18 @@ async function publishCommand(options) {
|
|
|
4756
4756
|
process.exit(1);
|
|
4757
4757
|
}
|
|
4758
4758
|
logger.info(`Logged in as: ${tokens.user.email}`);
|
|
4759
|
+
try {
|
|
4760
|
+
const payload = JSON.parse(
|
|
4761
|
+
Buffer.from(tokens.idToken.split(".")[1], "base64").toString("utf-8")
|
|
4762
|
+
);
|
|
4763
|
+
logger.info(`[DEBUG] Token sub=${payload.sub}`);
|
|
4764
|
+
logger.info(`[DEBUG] Token company=${payload["custom:company_id"] || "(none)"}`);
|
|
4765
|
+
logger.info(`[DEBUG] Token exp=${new Date((payload.exp || 0) * 1e3).toISOString()}`);
|
|
4766
|
+
logger.info(`[DEBUG] Token iat=${new Date((payload.iat || 0) * 1e3).toISOString()}`);
|
|
4767
|
+
logger.info(`[DEBUG] API URL=${getApiUrl()}`);
|
|
4768
|
+
} catch {
|
|
4769
|
+
logger.info("[DEBUG] Could not decode token payload");
|
|
4770
|
+
}
|
|
4759
4771
|
let themePath;
|
|
4760
4772
|
if (options.theme) {
|
|
4761
4773
|
themePath = path9__default.default.resolve(options.theme);
|
|
@@ -4824,6 +4836,7 @@ async function publishCommand(options) {
|
|
|
4824
4836
|
);
|
|
4825
4837
|
const regData = await regResponse.json();
|
|
4826
4838
|
const regBody = regData.statusCode ? regData.body : regData;
|
|
4839
|
+
logger.info(`[DEBUG] Register status=${regResponse.status} body=${JSON.stringify(regBody).slice(0, 300)}`);
|
|
4827
4840
|
if (!regResponse.ok) {
|
|
4828
4841
|
const errMsg = regBody.error || regBody.message || "Registration failed";
|
|
4829
4842
|
if (!errMsg.includes("already registered")) {
|