@settlemint/dalp-cli 3.1.32-main.42593324632 → 3.1.32-main.42600267094
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/dalp.js +12 -3
- package/dist/dalp.js.map +4 -4
- package/package.json +4 -4
- package/src/commands/login.ts +12 -1
package/dist/dalp.js
CHANGED
|
@@ -53056,7 +53056,7 @@ async function runCommand(context, operation, errorContext = UNKNOWN_COMMAND_ERR
|
|
|
53056
53056
|
// package.json
|
|
53057
53057
|
var package_default = {
|
|
53058
53058
|
name: "@settlemint/dalp-cli",
|
|
53059
|
-
version: "3.1.32-main.
|
|
53059
|
+
version: "3.1.32-main.42600267094",
|
|
53060
53060
|
private: false,
|
|
53061
53061
|
description: "CLI for the Digital Asset Lifecycle Platform \u2014 manage tokens, identities, compliance, and more from the command line.",
|
|
53062
53062
|
homepage: "https://settlemint.com",
|
|
@@ -53528,6 +53528,15 @@ var apiKeyResponseSchema = object({
|
|
|
53528
53528
|
var MAX_LOGIN_RESPONSE_BYTES = 1024 * 1024;
|
|
53529
53529
|
var CLI_API_KEY_EXPIRES_IN_SECONDS = 90 * 24 * 60 * 60;
|
|
53530
53530
|
var DEVICE_CLIENT_ID = "dalp-cli";
|
|
53531
|
+
var SERVER_API_KEY_NAME_MAX_LENGTH = 32;
|
|
53532
|
+
var cliApiKeyName = (machine) => {
|
|
53533
|
+
const name = `${DEVICE_CLIENT_ID} (${machine})`;
|
|
53534
|
+
if (name.length <= SERVER_API_KEY_NAME_MAX_LENGTH) {
|
|
53535
|
+
return name;
|
|
53536
|
+
}
|
|
53537
|
+
const room = SERVER_API_KEY_NAME_MAX_LENGTH - `${DEVICE_CLIENT_ID} (\u2026)`.length;
|
|
53538
|
+
return `${DEVICE_CLIENT_ID} (${machine.slice(0, room)}\u2026)`;
|
|
53539
|
+
};
|
|
53531
53540
|
var isLoopbackHost = (host) => host === "localhost" || host === "127.0.0.1" || host === "::1" || host === "[::1]";
|
|
53532
53541
|
function validateLoginBaseUrl(apiUrl) {
|
|
53533
53542
|
let parsed;
|
|
@@ -53757,7 +53766,7 @@ Open this URL in your browser:
|
|
|
53757
53766
|
}
|
|
53758
53767
|
const { walletFactor } = c.options;
|
|
53759
53768
|
const walletCode = await readWalletCode(walletFactor, c.env.DALP_WALLET_CODE, c.agent === true);
|
|
53760
|
-
const apiKeyName =
|
|
53769
|
+
const apiKeyName = cliApiKeyName(hostname3());
|
|
53761
53770
|
const apiKeyResponse = await postJson(`${baseUrl}/api/auth/api-key/create`, {
|
|
53762
53771
|
name: apiKeyName,
|
|
53763
53772
|
expiresIn: CLI_API_KEY_EXPIRES_IN_SECONDS,
|
|
@@ -55004,4 +55013,4 @@ if (false) {}
|
|
|
55004
55013
|
// src/bin.ts
|
|
55005
55014
|
await cli.serve();
|
|
55006
55015
|
|
|
55007
|
-
//# debugId=
|
|
55016
|
+
//# debugId=9A6D1338301FCC5464756E2164756E21
|