New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@kapso/cli

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kapso/cli - npm Package Compare versions

Comparing version
0.4.0
to
0.5.0
+1
-0
dist/commands/setup.d.ts

@@ -11,2 +11,3 @@ import { BaseCommand } from '../base-command.js';

language: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
'no-provision-phone-number': import("@oclif/core/interfaces").BooleanFlag<boolean>;
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;

@@ -13,0 +14,0 @@ project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;

@@ -13,3 +13,3 @@ import { Flags } from '@oclif/core';

'connection-type': Flags.string({
description: 'Allowed connection type',
description: 'Allowed connection type (defaults to dedicated)',
multiple: true,

@@ -31,2 +31,7 @@ options: ['coexistence', 'dedicated'],

}),
'no-provision-phone-number': Flags.boolean({
allowNo: false,
default: false,
description: 'Do not auto-provision a phone number during setup',
}),
output: workflowOutputFlag,

@@ -103,3 +108,3 @@ project: projectFlag,

const response = await this.projectContext.withPlatformClient(projectSelection.project.id, (client) => client.createSetupLink(customerSelection.customer.id, {
allowedConnectionTypes: flags['connection-type'],
allowedConnectionTypes: flags['connection-type'] ?? ['dedicated'],
failureRedirectUrl: flags['failure-url'],

@@ -109,3 +114,3 @@ language: flags.language,

phoneNumberCountryIsos: flags.country,
provisionPhoneNumber: true,
provisionPhoneNumber: !flags['no-provision-phone-number'],
successRedirectUrl: flags['success-url'],

@@ -122,3 +127,5 @@ }));

setupLink: {
allowedConnectionTypes: response.data.allowedConnectionTypes ?? ['dedicated'],
id: response.data.id,
provisionPhoneNumber: response.data.provisionPhoneNumber ?? !flags['no-provision-phone-number'],
status: response.data.status,

@@ -169,3 +176,5 @@ url: response.data.url,

['Status', payload.data.setupLink.status],
['Allowed Connection Types', payload.data.setupLink.allowedConnectionTypes?.join(', ')],
['WhatsApp Setup Status', payload.data.setupLink.whatsappSetupStatus ?? undefined],
['Provision Phone Number', stringifyBoolean(payload.data.setupLink.provisionPhoneNumber)],
]),

@@ -181,1 +190,7 @@ ].join('\n\n'), nextCommands);

}
function stringifyBoolean(value) {
if (typeof value !== 'boolean') {
return undefined;
}
return String(value);
}

@@ -0,1 +1,3 @@

import humps from 'humps';
const { decamelizeKeys } = humps;
export function renderData(command, data, format, humanRenderer) {

@@ -6,3 +8,3 @@ if (format === 'human') {

}
command.log(JSON.stringify(data, null, 2));
command.log(JSON.stringify(decamelizeJsonOutput(data), null, 2));
}

@@ -28,1 +30,10 @@ export function renderKeyValueBlock(entries) {

}
function decamelizeJsonOutput(data) {
if (Array.isArray(data) || isPlainObject(data)) {
return decamelizeKeys(data);
}
return data;
}
function isPlainObject(value) {
return typeof value === 'object' && value !== null && !Array.isArray(value);
}
+8
-2

@@ -60,3 +60,3 @@ {

"connection-type": {
"description": "Allowed connection type",
"description": "Allowed connection type (defaults to dedicated)",
"name": "connection-type",

@@ -99,2 +99,8 @@ "hasDynamicHelp": false,

},
"no-provision-phone-number": {
"description": "Do not auto-provision a phone number during setup",
"name": "no-provision-phone-number",
"allowNo": false,
"type": "boolean"
},
"output": {

@@ -1435,3 +1441,3 @@ "description": "Output format",

},
"version": "0.4.0"
"version": "0.5.0"
}
{
"name": "@kapso/cli",
"description": "Kapso CLI for operating Kapso WhatsApp projects, numbers, conversations, messages, and templates",
"version": "0.4.0",
"version": "0.5.0",
"author": "Andrés Matte",

@@ -6,0 +6,0 @@ "bin": {

+28
-27

@@ -23,3 +23,3 @@ @kapso/cli

$ kapso (--version)
@kapso/cli/0.4.0 linux-x64 node-v24.12.0
@kapso/cli/0.5.0 linux-x64 node-v24.12.0
$ kapso --help [COMMAND]

@@ -89,3 +89,3 @@ USAGE

_See code: [src/commands/customers/get.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/customers/get.ts)_
_See code: [src/commands/customers/get.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/customers/get.ts)_

@@ -109,3 +109,3 @@ ## `kapso customers list`

_See code: [src/commands/customers/list.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/customers/list.ts)_
_See code: [src/commands/customers/list.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/customers/list.ts)_

@@ -131,3 +131,3 @@ ## `kapso customers new`

_See code: [src/commands/customers/new.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/customers/new.ts)_
_See code: [src/commands/customers/new.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/customers/new.ts)_

@@ -169,3 +169,3 @@ ## `kapso help [COMMAND]`

_See code: [src/commands/login.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/login.ts)_
_See code: [src/commands/login.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/login.ts)_

@@ -187,3 +187,3 @@ ## `kapso logout`

_See code: [src/commands/logout.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/logout.ts)_
_See code: [src/commands/logout.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/logout.ts)_

@@ -206,3 +206,3 @@ ## `kapso projects current`

_See code: [src/commands/projects/current.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/projects/current.ts)_
_See code: [src/commands/projects/current.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/projects/current.ts)_

@@ -225,3 +225,3 @@ ## `kapso projects list`

_See code: [src/commands/projects/list.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/projects/list.ts)_
_See code: [src/commands/projects/list.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/projects/list.ts)_

@@ -243,3 +243,3 @@ ## `kapso projects use PROJECTID`

_See code: [src/commands/projects/use.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/projects/use.ts)_
_See code: [src/commands/projects/use.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/projects/use.ts)_

@@ -253,8 +253,8 @@ ## `kapso setup`

$ kapso setup [--area-code <value>] [--connection-type coexistence|dedicated...] [--country <value>...]
[--customer <value>] [--failure-url <value>] [--language <value>] [--output json|human] [--project <value>]
[--success-url <value>]
[--customer <value>] [--failure-url <value>] [--language <value>] [--no-provision-phone-number] [--output
json|human] [--project <value>] [--success-url <value>]
FLAGS
--area-code=<value> Preferred phone number area code
--connection-type=<option>... Allowed connection type
--connection-type=<option>... Allowed connection type (defaults to dedicated)
<options: coexistence|dedicated>

@@ -265,2 +265,3 @@ --country=<value>... Preferred phone number country ISO

--language=<value> Setup link language
--no-provision-phone-number Do not auto-provision a phone number during setup
--output=<option> [default: human] Output format

@@ -275,3 +276,3 @@ <options: json|human>

_See code: [src/commands/setup.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/setup.ts)_
_See code: [src/commands/setup.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/setup.ts)_

@@ -294,3 +295,3 @@ ## `kapso status`

_See code: [src/commands/status.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/status.ts)_
_See code: [src/commands/status.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/status.ts)_

@@ -317,3 +318,3 @@ ## `kapso whatsapp conversations get CONVERSATIONID`

_See code: [src/commands/whatsapp/conversations/get.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/whatsapp/conversations/get.ts)_
_See code: [src/commands/whatsapp/conversations/get.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/whatsapp/conversations/get.ts)_

@@ -349,3 +350,3 @@ ## `kapso whatsapp conversations list`

_See code: [src/commands/whatsapp/conversations/list.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/whatsapp/conversations/list.ts)_
_See code: [src/commands/whatsapp/conversations/list.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/whatsapp/conversations/list.ts)_

@@ -376,3 +377,3 @@ ## `kapso whatsapp messages get MESSAGEID`

_See code: [src/commands/whatsapp/messages/get.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/whatsapp/messages/get.ts)_
_See code: [src/commands/whatsapp/messages/get.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/whatsapp/messages/get.ts)_

@@ -414,3 +415,3 @@ ## `kapso whatsapp messages list`

_See code: [src/commands/whatsapp/messages/list.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/whatsapp/messages/list.ts)_
_See code: [src/commands/whatsapp/messages/list.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/whatsapp/messages/list.ts)_

@@ -442,3 +443,3 @@ ## `kapso whatsapp messages send`

_See code: [src/commands/whatsapp/messages/send.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/whatsapp/messages/send.ts)_
_See code: [src/commands/whatsapp/messages/send.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/whatsapp/messages/send.ts)_

@@ -469,3 +470,3 @@ ## `kapso whatsapp numbers get [NUMBERREF]`

_See code: [src/commands/whatsapp/numbers/get.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/whatsapp/numbers/get.ts)_
_See code: [src/commands/whatsapp/numbers/get.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/whatsapp/numbers/get.ts)_

@@ -496,3 +497,3 @@ ## `kapso whatsapp numbers health [NUMBERREF]`

_See code: [src/commands/whatsapp/numbers/health.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/whatsapp/numbers/health.ts)_
_See code: [src/commands/whatsapp/numbers/health.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/whatsapp/numbers/health.ts)_

@@ -520,3 +521,3 @@ ## `kapso whatsapp numbers list`

_See code: [src/commands/whatsapp/numbers/list.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/whatsapp/numbers/list.ts)_
_See code: [src/commands/whatsapp/numbers/list.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/whatsapp/numbers/list.ts)_

@@ -551,3 +552,3 @@ ## `kapso whatsapp numbers new`

_See code: [src/commands/whatsapp/numbers/new.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/whatsapp/numbers/new.ts)_
_See code: [src/commands/whatsapp/numbers/new.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/whatsapp/numbers/new.ts)_

@@ -578,3 +579,3 @@ ## `kapso whatsapp numbers resolve [NUMBERREF]`

_See code: [src/commands/whatsapp/numbers/resolve.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/whatsapp/numbers/resolve.ts)_
_See code: [src/commands/whatsapp/numbers/resolve.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/whatsapp/numbers/resolve.ts)_

@@ -605,3 +606,3 @@ ## `kapso whatsapp templates get TEMPLATEID`

_See code: [src/commands/whatsapp/templates/get.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/whatsapp/templates/get.ts)_
_See code: [src/commands/whatsapp/templates/get.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/whatsapp/templates/get.ts)_

@@ -641,3 +642,3 @@ ## `kapso whatsapp templates list`

_See code: [src/commands/whatsapp/templates/list.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/whatsapp/templates/list.ts)_
_See code: [src/commands/whatsapp/templates/list.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/whatsapp/templates/list.ts)_

@@ -667,3 +668,3 @@ ## `kapso whatsapp templates new`

_See code: [src/commands/whatsapp/templates/new.ts](https://github.com/gokapso/kapso-cli/blob/v0.4.0/src/commands/whatsapp/templates/new.ts)_
_See code: [src/commands/whatsapp/templates/new.ts](https://github.com/gokapso/kapso-cli/blob/v0.5.0/src/commands/whatsapp/templates/new.ts)_
<!-- commandsstop -->