Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

@commercelayer/cli-plugin-checkout

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercelayer/cli-plugin-checkout - npm Package Compare versions

Comparing version 4.3.1 to 4.4.0

import { ChildProcess } from 'node:child_process';
declare const buildCheckoutUrl: (organization: string, id: string, accessToken: string, staging?: boolean) => string;
declare const buildCheckoutUrl: (organization: string, orderId: string, accessToken: string, staging?: boolean) => string;
declare const openCheckoutUrl: (checkoutUrl: string) => Promise<ChildProcess>;
export { buildCheckoutUrl, openCheckoutUrl };

@@ -7,6 +7,7 @@ "use strict";

const open_1 = tslib_1.__importDefault(require("open"));
const buildCheckoutUrl = (organization, id, accessToken, staging) => {
const subdomain = staging ? 'checkout-stg' : 'checkout';
const baseUrl = cli_core_1.clApi.baseURL(organization, `${subdomain}.${cli_core_1.clConfig.api.default_app_domain}`);
const checkoutUrl = `${baseUrl}/${id}?accessToken=${accessToken}`;
const buildCheckoutUrl = (organization, orderId, accessToken, staging) => {
const subdomain = staging ? 'stg.' : '';
const domain = `${subdomain}${cli_core_1.clConfig.api.default_app_domain}`;
const baseUrl = cli_core_1.clApi.baseURL(organization, domain);
const checkoutUrl = `${baseUrl}/checkout/${orderId}?accessToken=${accessToken}`;
return checkoutUrl;

@@ -13,0 +14,0 @@ };

{
"version": "4.3.1",
"version": "4.4.0",
"commands": {

@@ -4,0 +4,0 @@ "checkout": {

{
"name": "@commercelayer/cli-plugin-checkout",
"description": "Commerce Layer CLI Checkout plugin",
"version": "4.3.1",
"version": "4.4.0",
"author": "Pierluigi Viti <pierluigi@commercelayer.io>",

@@ -46,9 +46,9 @@ "bugs": "https://github.com/commercelayer/commercelayer-cli-plugin-checkout/issues",

"devDependencies": {
"@commercelayer/cli-dev": "^1.0.1",
"@commercelayer/cli-dev": "^2.0.5",
"@commercelayer/eslint-config-ts": "^0.1.4",
"@oclif/plugin-help": "^5.2.8",
"@oclif/test": "^2.3.10",
"@oclif/test": "^2.3.11",
"@types/chai": "^4.3.4",
"@types/mocha": "^10.0.1",
"@types/node": "^18.15.3",
"@types/node": "^18.15.5",
"chai": "^4.3.7",

@@ -62,6 +62,6 @@ "eslint": "^8.36.0",

"dependencies": {
"@commercelayer/cli-core": "^3.3.6",
"@commercelayer/cli-core": "^3.4.0",
"@commercelayer/js-auth": "^2.3.0",
"@commercelayer/sdk": "^4.25.0",
"@oclif/core": "^2.6.3",
"@commercelayer/sdk": "^4.26.0",
"@oclif/core": "^2.6.4",
"open": "^8.4.2",

@@ -68,0 +68,0 @@ "tslib": "^2.5.0"

@@ -74,3 +74,3 @@ # @commercelayer/cli-plugin-checkout

USAGE
$ commercelayer checkout:order [ID] (-a <value> ) [--open]
$ commercelayer checkout:order ID (-a <value> ) [--open]

@@ -77,0 +77,0 @@ ARGUMENTS