@commercelayer/cli-core
Advanced tools
Comparing version 0.0.1-alpha.3 to 0.0.1-alpha.6
/** Copy command flags excluding a subset */ | ||
declare const commandFlags: (flags: any, exclude?: string[] | undefined) => any; | ||
declare const commandFlags: <T extends object>(flags: T, exclude?: string[] | undefined) => T; | ||
export { commandFlags }; |
@@ -7,2 +7,6 @@ export * as api from './api'; | ||
export * as token from './token'; | ||
export * as utils from './util'; | ||
export * as update from './update'; | ||
export * as util from './util'; | ||
/** Types **/ | ||
export type { ApiMode } from './api'; | ||
export type { AppKey, AppAuth, AppInfo } from './application'; |
@@ -1,1 +0,1 @@ | ||
"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")); | ||
"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.util=exports.update=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.update=__importStar(require("./update")),exports.util=__importStar(require("./util")); |
@@ -1,8 +0,7 @@ | ||
import { ApiError } from '@commercelayer/sdk'; | ||
/** Print a formatted object */ | ||
declare const printObject: (object: any, { color, sort, width }: { | ||
declare const printObject: (object: any, options?: { | ||
color?: boolean | undefined; | ||
sort?: boolean | undefined; | ||
width?: number | undefined; | ||
}) => string; | ||
} | undefined) => string; | ||
/** Print object in JSON format */ | ||
@@ -23,3 +22,3 @@ declare const jsonObject: (obj: any, { unformatted }: { | ||
/** Format error message */ | ||
declare const formatError: (error: ApiError, flags: any) => string; | ||
declare const formatError: (error: any, flags: any) => string; | ||
export { printObject, jsonObject, center, maxLength, cleanDate, formatOutput, formatError }; |
@@ -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=(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; | ||
"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=(e,r)=>(0,util_1.inspect)(e,{showHidden:!1,depth:null,colors:(r==null?void 0:r.color)||!0,sorted:(r==null?void 0:r.sort)||!1,maxArrayLength:1/0,breakLength:(r==null?void 0:r.width)||120});exports.printObject=printObject;const jsonObject=(e,{unformatted:r})=>JSON.stringify(e,null,r?void 0:4);exports.jsonObject=jsonObject;const center=(e,r)=>e.padStart(e.length+Math.floor((r-e.length)/2)," ").padEnd(r," ");exports.center=center;const maxLength=(e,r)=>e.reduce((t,n)=>{const o=Array.isArray(n[r])?n[r].join():n[r];return Math.max(t,String(o).length)},0);exports.maxLength=maxLength;const cleanDate=e=>e.replace("T"," ").replace("Z","").substring(0,e.lastIndexOf("."));exports.cleanDate=cleanDate;const formatOutput=(e,r,{color:t=!0}={})=>e?typeof e=="string"?e:printObject(e,{color:t}):"";exports.formatOutput=formatOutput;const formatError=(e,r)=>formatOutput(e.errors||e,r);exports.formatError=formatError; |
/** Copy command flags excluding a subset */ | ||
declare const commandFlags: (flags: any, exclude?: string[] | undefined) => any; | ||
declare const commandFlags: <T extends object>(flags: T, exclude?: string[] | undefined) => T; | ||
export { commandFlags }; |
@@ -7,2 +7,6 @@ export * as api from './api'; | ||
export * as token from './token'; | ||
export * as utils from './util'; | ||
export * as update from './update'; | ||
export * as util from './util'; | ||
/** Types **/ | ||
export type { ApiMode } from './api'; | ||
export type { AppKey, AppAuth, AppInfo } from './application'; |
@@ -1,1 +0,1 @@ | ||
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}; | ||
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 p from"./style";export{p as style};import*as r from"./token";export{r as token};import*as m from"./update";export{m as update};import*as e from"./util";export{e as util}; |
@@ -1,8 +0,7 @@ | ||
import { ApiError } from '@commercelayer/sdk'; | ||
/** Print a formatted object */ | ||
declare const printObject: (object: any, { color, sort, width }: { | ||
declare const printObject: (object: any, options?: { | ||
color?: boolean | undefined; | ||
sort?: boolean | undefined; | ||
width?: number | undefined; | ||
}) => string; | ||
} | undefined) => string; | ||
/** Print object in JSON format */ | ||
@@ -23,3 +22,3 @@ declare const jsonObject: (obj: any, { unformatted }: { | ||
/** Format error message */ | ||
declare const formatError: (error: ApiError, flags: any) => string; | ||
declare const formatError: (error: any, flags: any) => string; | ||
export { printObject, jsonObject, center, maxLength, cleanDate, formatOutput, formatError }; |
@@ -1,1 +0,1 @@ | ||
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}; | ||
import{inspect as u}from"util";const l=(e,r)=>u(e,{showHidden:!1,depth:null,colors:(r==null?void 0:r.color)||!0,sorted:(r==null?void 0:r.sort)||!1,maxArrayLength:1/0,breakLength:(r==null?void 0:r.width)||120}),d=(e,{unformatted:r})=>JSON.stringify(e,null,r?void 0:4),s=(e,r)=>e.padStart(e.length+Math.floor((r-e.length)/2)," ").padEnd(r," "),f=(e,r)=>e.reduce((n,t)=>{const c=Array.isArray(t[r])?t[r].join():t[r];return Math.max(n,String(c).length)},0),i=e=>e.replace("T"," ").replace("Z","").substring(0,e.lastIndexOf(".")),a=(e,r,{color:n=!0}={})=>e?typeof e=="string"?e:l(e,{color:n}):"",o=(e,r)=>a(e.errors||e,r);export{l as printObject,d as jsonObject,s as center,f as maxLength,i as cleanDate,a as formatOutput,o as formatError}; |
{ | ||
"name": "@commercelayer/cli-core", | ||
"version": "0.0.1-alpha.3", | ||
"main": "./lib/cjs/index.js", | ||
"exports": { | ||
"import": "./lib/esm/index.js", | ||
"require": "./lib/cjs/index.js" | ||
}, | ||
"type": "module", | ||
"version": "0.0.1-alpha.6", | ||
"main": "lib/cjs/index.js", | ||
"types": "lib/cjs/index.d.ts", | ||
"module": "lib/esm/index.js", | ||
"scripts": { | ||
@@ -38,5 +35,6 @@ "lint": "eslint ./src --ext .ts", | ||
"dependencies": { | ||
"@commercelayer/sdk": "^2.3.12", | ||
"chalk": "^5.0.0", | ||
"jsonwebtoken": "^8.5.1" | ||
"@commercelayer/js-auth": "^2.2.7", | ||
"chalk": "^4.1.0", | ||
"jsonwebtoken": "^8.5.1", | ||
"update-notifier": "^5.1.0" | ||
}, | ||
@@ -50,2 +48,3 @@ "devDependencies": { | ||
"@types/node": "^16.11.0", | ||
"@types/update-notifier": "^5.1.0", | ||
"@typescript-eslint/eslint-plugin": "^5.2.0", | ||
@@ -52,0 +51,0 @@ "eslint": "^8.1.0", |
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
146
45
283
88565
4
13
8
No
+ Addedupdate-notifier@^5.1.0
+ Added@commercelayer/js-auth@2.3.0(transitive)
+ Added@servie/events@1.0.0(transitive)
+ Added@sindresorhus/is@0.14.0(transitive)
+ Added@szmarczak/http-timer@1.1.2(transitive)
+ Added@types/tough-cookie@4.0.5(transitive)
+ Addedansi-align@3.0.1(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedboxen@5.1.2(transitive)
+ Addedbyte-length@1.0.2(transitive)
+ Addedcacheable-request@6.1.0(transitive)
+ Addedcamelcase@6.3.0(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedci-info@2.0.0(transitive)
+ Addedcli-boxes@2.2.1(transitive)
+ Addedclient-oauth2@4.3.3(transitive)
+ Addedclone-response@1.0.3(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedconfigstore@5.0.1(transitive)
+ Addedcrypto-random-string@2.0.0(transitive)
+ Addeddecompress-response@3.3.0(transitive)
+ Addeddeep-extend@0.6.0(transitive)
+ Addeddefer-to-connect@1.1.3(transitive)
+ Addeddot-prop@5.3.0(transitive)
+ Addedduplexer3@0.1.5(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedescape-goat@2.1.1(transitive)
+ Addedget-stream@4.1.05.2.0(transitive)
+ Addedglobal-dirs@3.0.1(transitive)
+ Addedgot@9.6.0(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedhas-yarn@2.1.0(transitive)
+ Addedhttp-cache-semantics@4.1.1(transitive)
+ Addedimport-lazy@2.1.0(transitive)
+ Addedimurmurhash@0.1.4(transitive)
+ Addedini@1.3.82.0.0(transitive)
+ Addedis-ci@2.0.0(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedis-installed-globally@0.4.0(transitive)
+ Addedis-npm@5.0.0(transitive)
+ Addedis-obj@2.0.0(transitive)
+ Addedis-path-inside@3.0.3(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedis-yarn-global@0.3.0(transitive)
+ Addedjson-buffer@3.0.0(transitive)
+ Addedkeyv@3.1.0(transitive)
+ Addedlatest-version@5.1.0(transitive)
+ Addedlowercase-keys@1.0.12.0.0(transitive)
+ Addedmake-dir@3.1.0(transitive)
+ Addedmake-error@1.3.6(transitive)
+ Addedmake-error-cause@2.3.0(transitive)
+ Addedmimic-response@1.0.1(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addednormalize-url@4.5.1(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedp-cancelable@1.1.0(transitive)
+ Addedpackage-json@6.5.0(transitive)
+ Addedpopsicle@12.1.2(transitive)
+ Addedpopsicle-content-encoding@1.0.0(transitive)
+ Addedpopsicle-cookie-jar@1.0.1(transitive)
+ Addedpopsicle-redirects@1.1.1(transitive)
+ Addedpopsicle-transport-http@1.2.1(transitive)
+ Addedpopsicle-transport-xhr@2.0.0(transitive)
+ Addedpopsicle-user-agent@1.0.0(transitive)
+ Addedprepend-http@2.0.0(transitive)
+ Addedpsl@1.15.0(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedpupa@2.1.1(transitive)
+ Addedquerystringify@2.2.0(transitive)
+ Addedrc@1.2.8(transitive)
+ Addedregistry-auth-token@4.2.2(transitive)
+ Addedregistry-url@5.1.0(transitive)
+ Addedrequires-port@1.0.0(transitive)
+ Addedresponselike@1.0.2(transitive)
+ Addedsemver@6.3.17.6.3(transitive)
+ Addedsemver-diff@3.1.1(transitive)
+ Addedservie@4.3.3(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedthrowback@4.1.0(transitive)
+ Addedto-readable-stream@1.0.0(transitive)
+ Addedtough-cookie@4.1.4(transitive)
+ Addedts-expect@1.3.0(transitive)
+ Addedtslib@2.8.1(transitive)
+ Addedtype-fest@0.20.2(transitive)
+ Addedtypedarray-to-buffer@3.1.5(transitive)
+ Addedunique-string@2.0.0(transitive)
+ Addeduniversalify@0.2.0(transitive)
+ Addedupdate-notifier@5.1.0(transitive)
+ Addedurl-parse@1.5.10(transitive)
+ Addedurl-parse-lax@3.0.0(transitive)
+ Addedwidest-line@3.1.0(transitive)
+ Addedwrap-ansi@7.0.0(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedwrite-file-atomic@3.0.3(transitive)
+ Addedxdg-basedir@4.0.0(transitive)
- Removed@commercelayer/sdk@^2.3.12
- Removed@commercelayer/sdk@2.5.0(transitive)
- Removedaxios@0.24.0(transitive)
- Removedchalk@5.4.1(transitive)
- Removedfollow-redirects@1.15.9(transitive)
Updatedchalk@^4.1.0