@commercelayer/cli-core
Advanced tools
Comparing version 0.0.1-alpha.2 to 0.0.1-alpha.3
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.execMode=exports.extractDomain=exports.baseURL=void 0;const config_1=require("./config"),baseURL=(e,t)=>`https://${e.toLowerCase()}.${t||config_1.config.api.default_domain}`;exports.baseURL=baseURL;const extractDomain=e=>{if(e)return e.substring(e.indexOf(".")+1)};exports.extractDomain=extractDomain;const execMode=e=>e===!0||e==="live"?"live":"test";exports.execMode=execMode; | ||
"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.execMode=exports.extractDomain=exports.baseURL=void 0;const config_1=__importDefault(require("./config")),baseURL=(e,t)=>`https://${e.toLowerCase()}.${t||config_1.default.api.default_domain}`;exports.baseURL=baseURL;const extractDomain=e=>{if(!!e)return e.substring(e.indexOf(".")+1)};exports.extractDomain=extractDomain;const execMode=e=>e===!0||e==="live"?"live":"test";exports.execMode=execMode; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.commandFlags=void 0;const commandFlags=(s,e)=>{const o=Object.assign({},s);if(e)for(const t of e)delete o[t];return o};exports.commandFlags=commandFlags; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.commandFlags=void 0;const commandFlags=(t,e)=>{const s=Object.assign({},t);if(e)for(const o of e)delete s[o];return s};exports.commandFlags=commandFlags; |
@@ -17,2 +17,2 @@ declare const config: { | ||
}; | ||
export { config }; | ||
export default config; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.config=void 0;const IMPORTS_RESOURCE_TYPES=["orders","coupons","skus","sku_lists","sku_list_items","prices","stock_items","gift_cards","customers","customer_subscriptions","tax_categories"],IMPORTS_STATUSES=["in_progress","pending","completed","interrupted"],config={api:{default_domain:"commercelayer.io",default_token_expiration_mins:60*2,requests_max_num_burst:50,requests_max_secs_burst:10,requests_max_num_avg:600,requests_max_secs_avg:5*60,page_max_size:25,page_default_size:10},imports:{statuses:IMPORTS_STATUSES,types:IMPORTS_RESOURCE_TYPES}};exports.config=config; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const IMPORTS_RESOURCE_TYPES=["orders","coupons","skus","sku_lists","sku_list_items","prices","stock_items","gift_cards","customers","customer_subscriptions","tax_categories"],IMPORTS_STATUSES=["in_progress","pending","completed","interrupted"],config={api:{default_domain:"commercelayer.io",default_token_expiration_mins:60*2,requests_max_num_burst:50,requests_max_secs_burst:10,requests_max_num_avg:600,requests_max_secs_avg:5*60,page_max_size:25,page_default_size:10},imports:{statuses:IMPORTS_STATUSES,types:IMPORTS_RESOURCE_TYPES}};exports.default=config; |
export * as api from './api'; | ||
export * from './config'; | ||
export { default as config } from './config'; | ||
export * as command from './command'; | ||
@@ -4,0 +4,0 @@ export * as output from './output'; |
@@ -1,1 +0,1 @@ | ||
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,i){i===void 0&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&__createBinding(t,e,r);return __setModuleDefault(t,e),t},__exportStar=this&&this.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&__createBinding(t,e,r)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.utils=exports.token=exports.style=exports.output=exports.command=exports.api=void 0,exports.api=__importStar(require("./api")),__exportStar(require("./config"),exports),exports.command=__importStar(require("./command")),exports.output=__importStar(require("./output")),exports.style=__importStar(require("./style")),exports.token=__importStar(require("./token")),exports.utils=__importStar(require("./util")); | ||
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,u){u===void 0&&(u=r),Object.defineProperty(e,u,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,u){u===void 0&&(u=r),e[u]=t[r]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&__createBinding(t,e,r);return __setModuleDefault(t,e),t},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.utils=exports.token=exports.style=exports.output=exports.command=exports.config=exports.api=void 0,exports.api=__importStar(require("./api"));var config_1=require("./config");Object.defineProperty(exports,"config",{enumerable:!0,get:function(){return __importDefault(config_1).default}}),exports.command=__importStar(require("./command")),exports.output=__importStar(require("./output")),exports.style=__importStar(require("./style")),exports.token=__importStar(require("./token")),exports.utils=__importStar(require("./util")); |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatError=exports.formatOutput=exports.cleanDate=exports.maxLength=exports.center=exports.jsonObject=exports.printObject=void 0;const util_1=require("util"),printObject=(t,{color:r,sort:e,width:o})=>(0,util_1.inspect)(t,{showHidden:!1,depth:null,colors:r||!0,sorted:e||!1,maxArrayLength:1/0,breakLength:o||120});exports.printObject=printObject;const jsonObject=(t,{unformatted:r})=>JSON.stringify(t,null,r?void 0:4);exports.jsonObject=jsonObject;const center=(t,r)=>t.padStart(t.length+Math.floor((r-t.length)/2)," ").padEnd(r," ");exports.center=center;const maxLength=(t,r)=>t.reduce((e,o)=>{const n=Array.isArray(o[r])?o[r].join():o[r];return Math.max(e,String(n).length)},0);exports.maxLength=maxLength;const cleanDate=t=>t.replace("T"," ").replace("Z","").substring(0,t.lastIndexOf("."));exports.cleanDate=cleanDate;const formatOutput=(t,r,{color:e=!0}={})=>t?typeof t=="string"?t:printObject(t,{color:e}):"";exports.formatOutput=formatOutput;const formatError=(t,r)=>formatOutput(t.errors,r);exports.formatError=formatError; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatError=exports.formatOutput=exports.cleanDate=exports.maxLength=exports.center=exports.jsonObject=exports.printObject=void 0;const util_1=require("util"),printObject=(r,{color:t,sort:e,width:n})=>(0,util_1.inspect)(r,{showHidden:!1,depth:null,colors:t||!0,sorted:e||!1,maxArrayLength:1/0,breakLength:n||120});exports.printObject=printObject;const jsonObject=(r,{unformatted:t})=>JSON.stringify(r,null,t?void 0:4);exports.jsonObject=jsonObject;const center=(r,t)=>r.padStart(r.length+Math.floor((t-r.length)/2)," ").padEnd(t," ");exports.center=center;const maxLength=(r,t)=>r.reduce((e,n)=>{const o=Array.isArray(n[t])?n[t].join():n[t];return Math.max(e,String(o).length)},0);exports.maxLength=maxLength;const cleanDate=r=>r.replace("T"," ").replace("Z","").substring(0,r.lastIndexOf("."));exports.cleanDate=cleanDate;const formatOutput=(r,t,{color:e=!0}={})=>r?typeof r=="string"?r:printObject(r,{color:e}):"";exports.formatOutput=formatOutput;const formatError=(r,t)=>formatOutput(r.errors,t);exports.formatError=formatError; |
@@ -1,1 +0,1 @@ | ||
import{config as o}from"./config";const a=(e,i)=>`https://${e.toLowerCase()}.${i||o.api.default_domain}`,s=e=>{if(e)return e.substring(e.indexOf(".")+1)},t=e=>e===!0||e==="live"?"live":"test";export{a as baseURL,s as extractDomain,t as execMode}; | ||
import n from"./config";const r=(t,e)=>`https://${t.toLowerCase()}.${e||n.api.default_domain}`,o=t=>{if(!!t)return t.substring(t.indexOf(".")+1)},i=t=>t===!0||t==="live"?"live":"test";export{r as baseURL,o as extractDomain,i as execMode}; |
@@ -1,1 +0,1 @@ | ||
const s=(e,o)=>{const t=Object.assign({},e);if(o)for(const n of o)delete t[n];return t};export{s as commandFlags}; | ||
const n=(o,t)=>{const e=Object.assign({},o);if(t)for(const s of t)delete e[s];return e};export{n as commandFlags}; |
@@ -17,2 +17,2 @@ declare const config: { | ||
}; | ||
export { config }; | ||
export default config; |
@@ -1,1 +0,1 @@ | ||
const s=["orders","coupons","skus","sku_lists","sku_list_items","prices","stock_items","gift_cards","customers","customer_subscriptions","tax_categories"],e=["in_progress","pending","completed","interrupted"],t={api:{default_domain:"commercelayer.io",default_token_expiration_mins:60*2,requests_max_num_burst:50,requests_max_secs_burst:10,requests_max_num_avg:600,requests_max_secs_avg:5*60,page_max_size:25,page_default_size:10},imports:{statuses:e,types:s}};export{t as config}; | ||
const s=["orders","coupons","skus","sku_lists","sku_list_items","prices","stock_items","gift_cards","customers","customer_subscriptions","tax_categories"],e=["in_progress","pending","completed","interrupted"],t={api:{default_domain:"commercelayer.io",default_token_expiration_mins:60*2,requests_max_num_burst:50,requests_max_secs_burst:10,requests_max_num_avg:600,requests_max_secs_avg:5*60,page_max_size:25,page_default_size:10},imports:{statuses:e,types:s}};export default t; |
export * as api from './api'; | ||
export * from './config'; | ||
export { default as config } from './config'; | ||
export * as command from './command'; | ||
@@ -4,0 +4,0 @@ export * as output from './output'; |
@@ -1,1 +0,1 @@ | ||
import*as o from"./api";export{o as api};export*from"./config";import*as t from"./command";export{t as command};import*as r from"./output";export{r as output};import*as m from"./style";export{m as style};import*as p from"./token";export{p as token};import*as a from"./util";export{a as utils}; | ||
import*as o from"./api";export{o as api};export{default as config}from"./config";import*as t from"./command";export{t as command};import*as a from"./output";export{a as output};import*as r from"./style";export{r as style};import*as m from"./token";export{m as token};import*as p from"./util";export{p as utils}; |
@@ -1,1 +0,1 @@ | ||
import{inspect as l}from"util";const n=(r,{color:t,sort:a,width:e})=>l(r,{showHidden:!1,depth:null,colors:t||!0,sorted:a||!1,maxArrayLength:1/0,breakLength:e||120}),c=(r,{unformatted:t})=>JSON.stringify(r,null,t?void 0:4),i=(r,t)=>r.padStart(r.length+Math.floor((t-r.length)/2)," ").padEnd(t," "),d=(r,t)=>r.reduce((a,e)=>{const s=Array.isArray(e[t])?e[t].join():e[t];return Math.max(a,String(s).length)},0),h=r=>r.replace("T"," ").replace("Z","").substring(0,r.lastIndexOf(".")),o=(r,t,{color:a=!0}={})=>r?typeof r=="string"?r:n(r,{color:a}):"",g=(r,t)=>o(r.errors,t);export{n as printObject,c as jsonObject,i as center,d as maxLength,h as cleanDate,o as formatOutput,g as formatError}; | ||
import{inspect as c}from"util";const a=(r,{color:n,sort:t,width:e})=>c(r,{showHidden:!1,depth:null,colors:n||!0,sorted:t||!1,maxArrayLength:1/0,breakLength:e||120}),l=(r,{unformatted:n})=>JSON.stringify(r,null,n?void 0:4),i=(r,n)=>r.padStart(r.length+Math.floor((n-r.length)/2)," ").padEnd(n," "),u=(r,n)=>r.reduce((t,e)=>{const s=Array.isArray(e[n])?e[n].join():e[n];return Math.max(t,String(s).length)},0),f=r=>r.replace("T"," ").replace("Z","").substring(0,r.lastIndexOf(".")),o=(r,n,{color:t=!0}={})=>r?typeof r=="string"?r:a(r,{color:t}):"",g=(r,n)=>o(r.errors,n);export{a as printObject,l as jsonObject,i as center,u as maxLength,f as cleanDate,o as formatOutput,g as formatError}; |
@@ -1,1 +0,1 @@ | ||
import l from"chalk";export const red=e=>l.red(e),green=e=>l.green(e),yellow=e=>l.yellow(e),blue=e=>l.blue(e),cyan=e=>l.cyan(e),magenta=e=>l.magenta(e),slug=e=>l.yellow(e),id=e=>l.magenta(e),command=e=>l.cyan(e),flag=e=>l.magenta(e),error=e=>l.red(e),success=e=>l.green(e),warning=e=>l.yellow(e),hilight=e=>l.yellowBright(e); | ||
import e from"chalk";export const red=r=>e.red(r),green=r=>e.green(r),yellow=r=>e.yellow(r),blue=r=>e.blue(r),cyan=r=>e.cyan(r),magenta=r=>e.magenta(r),slug=r=>e.yellow(r),id=r=>e.magenta(r),command=r=>e.cyan(r),flag=r=>e.magenta(r),error=r=>e.red(r),success=r=>e.green(r),warning=r=>e.yellow(r),hilight=r=>e.yellowBright(r); |
@@ -1,1 +0,1 @@ | ||
import r from"jsonwebtoken";const n=e=>{const o=r.decode(e);if(o===null)throw new Error("Error deconding access token");return o};export{n as decodeAccessToken}; | ||
import n from"jsonwebtoken";const r=e=>{const o=n.decode(e);if(o===null)throw new Error("Error deconding access token");return o};export{r as decodeAccessToken}; |
{ | ||
"name": "@commercelayer/cli-core", | ||
"version": "0.0.1-alpha.2", | ||
"main": "lib/cjs/index.js", | ||
"types": "lib/cjs/index.d.ts", | ||
"module": "lib/esm/index.js", | ||
"version": "0.0.1-alpha.3", | ||
"main": "./lib/cjs/index.js", | ||
"exports": { | ||
"import": "./lib/esm/index.js", | ||
"require": "./lib/cjs/index.js" | ||
}, | ||
"type": "module", | ||
"scripts": { | ||
"lint": "eslint ./src --ext .ts", | ||
"lintspec": "eslint ./specs/ --ext .spec.ts", | ||
"build": "tsc -b tsconfig.json tsconfig.esm.json --verbose", | ||
"build": "rm -rf lib && tsc -b tsconfig.json tsconfig.esm.json --verbose", | ||
"start": "ts-node src/index.ts", | ||
@@ -12,0 +15,0 @@ "prepare": "npm run build", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Yes
115854
37
210