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

@commercelayer/cli-core

Package Overview
Dependencies
Maintainers
2
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercelayer/cli-core - npm Package Compare versions

Comparing version 4.5.0 to 4.5.1

2

lib/cjs/command.js

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.fixDashedFlagValue=exports.findLongStringFlag=exports.fixValueType=exports.commandFlags=void 0;const commandFlags=(t,e)=>{const f=Object.assign({},t);if(e)for(const l of e)delete f[l];return f};exports.commandFlags=commandFlags;const fixValueType=t=>{let e=t;return e==="null"?e=null:Number(e)==e?e=Number(e):e=e==="true"?!0:e==="false"?!1:e,e};exports.fixValueType=fixValueType;const findLongStringFlag=(t,e)=>{const f=e.startsWith("--")?e:`--${e}`;let l;const n=t.findIndex(s=>s.startsWith(f));let a=!1;if(n>-1){const s=t[n];if(s.includes("=")){const r=s.split("=");l=r.length===2?r[1]:"",a=!0}else l=t[n+1];return{value:l,index:n,single:a}}else return};exports.findLongStringFlag=findLongStringFlag;const fixDashedFlagValue=(t,e,f)=>{const l="____",n=e.name||f,a=e.char;if(!n&&!a)return t;const s=n?n.startsWith("--")?n:`--${n}`:void 0,r=a?e.char.startsWith("-")?a:`-${a}`:void 0;let c=t.findIndex(d=>r&&d.startsWith(r)||s&&d.startsWith(s));if(c<0)return t;let o=t[c],i="",u="";if(r&&o.startsWith(r))i=o.replace(r,"").trim(),o=r;else if(s&&o.startsWith(s))i=o.replace(s,"").trim(),o=s;else return t;i.startsWith("=")?(i=i.slice(1),u=o+"="):i=t[++c];const p=i.startsWith(`${l}-`)?i.replace(`${l}-`,"-"):i.replace("-",`${l}-`);return t[c]=u+p,t};exports.fixDashedFlagValue=fixDashedFlagValue;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.fixDashedFlagValue=exports.findLongStringFlag=exports.fixValueType=exports.commandFlags=void 0;const commandFlags=(t,e)=>{const f=Object.assign({},t);if(e)for(const i of e)delete f[i];return f};exports.commandFlags=commandFlags;const fixValueType=t=>{let e=t;return e==="null"?e=null:Number(e)==e?e=Number(e):e=e==="true"?!0:e==="false"?!1:e,e};exports.fixValueType=fixValueType;const findLongStringFlag=(t,e)=>{const f=e.startsWith("--")?e:`--${e}`;let i;const l=t.findIndex(n=>n.startsWith(f));let a=!1;if(l>-1){const n=t[l];if(n.includes("=")){const r=n.split("=");i=r.length===2?r[1]:"",a=!0}else i=t[l+1];return{value:i,index:l,single:a}}else return};exports.findLongStringFlag=findLongStringFlag;const fixDashedFlagValue=(t,e,f)=>{const i="____",l=e.name||f,a=e.char;if(!l&&!a)return t;const n=l?l.startsWith("--")?l:`--${l}`:void 0,r=a?e.char.startsWith("-")?a:`-${a}`:void 0;let c=t.findIndex(u=>r&&u.startsWith(r)||n&&u.startsWith(n));if(c<0)return t;let o=t[c],s="",d="";if(r&&o.startsWith(r))s=o.replace(r,"").trim(),o=r;else if(n&&o.startsWith(n))s=o.replace(n,"").trim(),o=n;else return t;if(s.startsWith("=")?(s=s.slice(1),d=o+"="):s||(s=t[++c]),s.startsWith("-")||s.startsWith(i)){const u=s.startsWith(`${i}-`)?s.replace(`${i}-`,"-"):s.replace("-",`${i}-`);t[c]=d+u}return t};exports.fixDashedFlagValue=fixDashedFlagValue;

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

const W=(e,t)=>{const a=Object.assign({},e);if(t)for(const l of t)delete a[l];return a};export{W as commandFlags};const p=e=>{let t=e;return t==="null"?t=null:Number(t)==t?t=Number(t):t=t==="true"?!0:t==="false"?!1:t,t},x=(e,t)=>{const a=t.startsWith("--")?t:`--${t}`;let l;const n=e.findIndex(s=>s.startsWith(a));let c=!1;if(n>-1){const s=e[n];if(s.includes("=")){const i=s.split("=");l=i.length===2?i[1]:"",c=!0}else l=e[n+1];return{value:l,index:n,single:c}}else return},_=(e,t,a)=>{const l="____",n=t.name||a,c=t.char;if(!n&&!c)return e;const s=n?n.startsWith("--")?n:`--${n}`:void 0,i=c?t.char.startsWith("-")?c:`-${c}`:void 0;let u=e.findIndex(d=>i&&d.startsWith(i)||s&&d.startsWith(s));if(u<0)return e;let f=e[u],r="",o="";if(i&&f.startsWith(i))r=f.replace(i,"").trim(),f=i;else if(s&&f.startsWith(s))r=f.replace(s,"").trim(),f=s;else return e;r.startsWith("=")?(r=r.slice(1),o=f+"="):r=e[++u];const h=r.startsWith(`${l}-`)?r.replace(`${l}-`,"-"):r.replace("-",`${l}-`);return e[u]=o+h,e};export{p as fixValueType,x as findLongStringFlag,_ as fixDashedFlagValue};
const h=(e,t)=>{const a=Object.assign({},e);if(t)for(const i of t)delete a[i];return a};export{h as commandFlags};const W=e=>{let t=e;return t==="null"?t=null:Number(t)==t?t=Number(t):t=t==="true"?!0:t==="false"?!1:t,t},p=(e,t)=>{const a=t.startsWith("--")?t:`--${t}`;let i;const l=e.findIndex(n=>n.startsWith(a));let c=!1;if(l>-1){const n=e[l];if(n.includes("=")){const r=n.split("=");i=r.length===2?r[1]:"",c=!0}else i=e[l+1];return{value:i,index:l,single:c}}else return},x=(e,t,a)=>{const i="____",l=t.name||a,c=t.char;if(!l&&!c)return e;const n=l?l.startsWith("--")?l:`--${l}`:void 0,r=c?t.char.startsWith("-")?c:`-${c}`:void 0;let u=e.findIndex(o=>r&&o.startsWith(r)||n&&o.startsWith(n));if(u<0)return e;let f=e[u],s="",d="";if(r&&f.startsWith(r))s=f.replace(r,"").trim(),f=r;else if(n&&f.startsWith(n))s=f.replace(n,"").trim(),f=n;else return e;if(s.startsWith("=")?(s=s.slice(1),d=f+"="):s||(s=e[++u]),s.startsWith("-")||s.startsWith(i)){const o=s.startsWith(`${i}-`)?s.replace(`${i}-`,"-"):s.replace("-",`${i}-`);e[u]=d+o}return e};export{W as fixValueType,p as findLongStringFlag,x as fixDashedFlagValue};
{
"name": "@commercelayer/cli-core",
"version": "4.5.0",
"version": "4.5.1",
"main": "lib/cjs/index.js",

@@ -5,0 +5,0 @@ "types": "lib/cjs/index.d.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc