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

@commercelayer/cli-dev

Package Overview
Dependencies
Maintainers
6
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercelayer/cli-dev - npm Package Compare versions

Comparing version 0.1.10 to 1.0.0

12

lib/commands/readme.js

@@ -12,3 +12,5 @@ "use strict";

const normalize = require('normalize-package-data');
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const columns = Number.parseInt(process.env.COLUMNS, 10) || 120;
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
const slugify = new (require('github-slugger'))();

@@ -143,3 +145,3 @@ const formatDescription = (d) => {

try {
const commandFormatted = wrapper.formatCommand(c).trim(); //.replace(/\$ /g, '')
const commandFormatted = wrapper.formatCommand(c).trim(); // .replace(/\$ /g, '')
return (0, util_1.compact)([

@@ -179,5 +181,6 @@ header(),

repo(plugin) {
var _a;
const pjson = Object.assign({}, plugin.pjson);
normalize(pjson);
const repo = pjson.repository && pjson.repository.url;
const repo = (_a = pjson.repository) === null || _a === void 0 ? void 0 : _a.url;
if (!repo)

@@ -195,2 +198,3 @@ return;

commandPath(plugin, c) {
var _a, _b;
const commandsDir = plugin.pjson.oclif.commands;

@@ -207,3 +211,3 @@ if (!commandsDir)

}
else if (plugin.pjson.devDependencies && plugin.pjson.devDependencies.typescript) {
else if ((_a = plugin.pjson.devDependencies) === null || _a === void 0 ? void 0 : _a.typescript) {
// check if non-compiled scripts are available

@@ -224,3 +228,3 @@ const base = p.replace(plugin.root + path.sep, '');

p = p.replace(plugin.root + path.sep, '');
if (plugin.pjson.devDependencies && plugin.pjson.devDependencies.typescript) {
if ((_b = plugin.pjson.devDependencies) === null || _b === void 0 ? void 0 : _b.typescript) {
p = p.replace(libRegex, 'src' + path.sep);

@@ -227,0 +231,0 @@ p = p.replace(/\.js$/, '.ts');

@@ -19,3 +19,3 @@ "use strict";

if (this.inner.command) {
return command.description + '\n\n' + this.inner.command(command);
return `${command.description}\n\n${this.inner.command(command)}`;
}

@@ -22,0 +22,0 @@ throw new IncompatibleHelpError();

export declare function castArray<T>(input?: T | T[]): T[];
export declare function uniqBy<T>(arr: T[], fn: (cur: T) => any): T[];
export declare function compact<T>(a: (T | undefined)[]): T[];
export declare function compact<T>(a: Array<T | undefined>): T[];
export declare function sortBy<T>(arr: T[], fn: (i: T) => sort.Types | sort.Types[]): T[];

@@ -5,0 +5,0 @@ export declare namespace sort {

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

{"version":"0.1.10","commands":{"readme":{"id":"readme","description":"adds commands to README.md in current directory\nThe readme must have any of the following tags inside of it for it to be replaced or else it will do nothing:\n## Usage\n<!-- usage -->\n## Commands\n<!-- commands -->\n\nCustomize the code URL prefix by setting oclif.repositoryPrefix in package.json.\n","strict":true,"pluginName":"@commercelayer/cli-dev","pluginAlias":"@commercelayer/cli-dev","pluginType":"core","aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"output directory for multi docs","required":true,"multiple":false,"default":"docs"},"multi":{"name":"multi","type":"boolean","description":"create a different markdown page for each topic","allowNo":false},"plugin":{"name":"plugin","type":"boolean","description":"create a plugin readme doc","allowNo":false},"bin":{"name":"bin","type":"option","description":"optional main cli command","multiple":false,"dependsOn":["plugin"]}},"args":[]}}}
{"version":"1.0.0","commands":{"readme":{"id":"readme","description":"adds commands to README.md in current directory\nThe readme must have any of the following tags inside of it for it to be replaced or else it will do nothing:\n## Usage\n<!-- usage -->\n## Commands\n<!-- commands -->\n\nCustomize the code URL prefix by setting oclif.repositoryPrefix in package.json.\n","strict":true,"pluginName":"@commercelayer/cli-dev","pluginAlias":"@commercelayer/cli-dev","pluginType":"core","aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"output directory for multi docs","required":true,"multiple":false,"default":"docs"},"multi":{"name":"multi","type":"boolean","description":"create a different markdown page for each topic","allowNo":false},"plugin":{"name":"plugin","type":"boolean","description":"create a plugin readme doc","allowNo":false},"bin":{"name":"bin","type":"option","description":"optional main cli command","multiple":false,"dependsOn":["plugin"]}},"args":[]}}}
{
"name": "@commercelayer/cli-dev",
"description": "Commerce Layer CLI development tools and helpers",
"version": "0.1.10",
"version": "1.0.0",
"author": "Pierluigi Viti <pierluigi@commercelayer.io>",

@@ -10,21 +10,2 @@ "bugs": "https://github.com/commercelayer/commercelayer-cli-dev/issues",

},
"devDependencies": {
"@oclif/plugin-help": "^5.1.11",
"@oclif/test": "^2.1.0",
"@types/chai": "^4.3.0",
"@types/fs-extra": "^9.0.13",
"@types/lodash": "^4.14.178",
"@types/mocha": "^9.1.0",
"@types/node": "^17.0.21",
"chai": "^4.3.6",
"eslint": "^5.16.0",
"eslint-config-oclif": "^3.1.0",
"eslint-config-oclif-typescript": "^0.2.0",
"globby": "^10.0.2",
"lodash": "^4.17.21",
"mocha": "^9.2.1",
"nyc": "^15.1.0",
"ts-node": "^10.6.0",
"typescript": "^4.5.5"
},
"engines": {

@@ -62,23 +43,41 @@ "node": ">=16"

"repository": "commercelayer/commercelayer-cli-dev",
"scripts": {
"lint": "eslint . --ext .ts --config .eslintrc",
"postpack": "rm -f oclif.manifest.json",
"posttest": "npx lint",
"prepack": "npm run build && oclif manifest && npm run readme",
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
"readme": "./bin/run readme && git add README.md",
"pretest": "npm run build --noEmit && echo 'Skipping test dir compile check in CI for now (3rd party type error) but you should compile it locally'",
"build": "rm -rf lib && tsc"
"types": "lib/index.d.ts",
"devDependencies": {
"@commercelayer/eslint-config-ts": "^0.1.4",
"@oclif/plugin-help": "^5.1.19",
"@oclif/test": "^2.2.12",
"@types/chai": "^4.3.4",
"@types/fs-extra": "^9.0.13",
"@types/lodash": "^4.14.189",
"@types/mocha": "^10.0.0",
"@types/node": "^18.11.9",
"chai": "^4.3.7",
"eslint": "^8.28.0",
"globby": "^10.0.2",
"lodash": "^4.17.21",
"mocha": "^10.1.0",
"nyc": "^15.1.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.3"
},
"types": "lib/index.d.ts",
"dependencies": {
"@oclif/core": "^1.4.2",
"fs-extra": "^10.0.1",
"github-slugger": "^1.4.0",
"normalize-package-data": "^3.0.3",
"tslib": "^2.3.1"
"@oclif/core": "^1.20.4",
"fs-extra": "^10.1.0",
"github-slugger": "^1.5.0",
"normalize-package-data": "^5.0.0",
"tslib": "^2.4.1"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"pretest": "npm run build --noEmit && echo 'Skipping test dir compile check in CI for now (3rd party type error) but you should compile it locally'",
"posttest": "npx lint",
"build": "rm -rf lib && tsc",
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
"readme": "./bin/run readme && git add README.md",
"lint": "eslint . --ext .ts --config .eslintrc",
"lintspec": "eslint ./specs/ --ext .spec.ts",
"lint:fix": "eslint src --fix"
}
}
}

@@ -48,11 +48,6 @@ # @oclif/dev-cli

adds commands to README.md in current directory
The readme must have any of the following tags inside of it for it to be replaced or else it will do nothing:
## Usage
<!-- usage -->
## Commands
<!-- commands -->

@@ -59,0 +54,0 @@

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