@commercelayer/cli-dev
Advanced tools
Comparing version 2.1.4-oclif3.1 to 3.0.0-oclif3.1
@@ -5,2 +5,4 @@ "use strict"; | ||
class Noc extends core_1.Command { | ||
static hidden = true; | ||
static flags = {}; | ||
async run() { | ||
@@ -12,4 +14,2 @@ const output = '-= NoC =-'; | ||
} | ||
Noc.hidden = true; | ||
Noc.flags = {}; | ||
exports.default = Noc; |
@@ -23,2 +23,18 @@ "use strict"; | ||
class Readme extends core_1.Command { | ||
static description = `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 --> | ||
Customize the code URL prefix by setting oclif.repositoryPrefix in package.json. | ||
`; | ||
static flags = { | ||
dir: core_1.Flags.string({ description: 'output directory for multi docs', default: 'docs', required: true }), | ||
multi: core_1.Flags.boolean({ description: 'create a different markdown page for each topic' }), | ||
plugin: core_1.Flags.boolean({ description: 'create a plugin readme doc' }), | ||
bin: core_1.Flags.string({ description: 'optional main cli command', dependsOn: ['plugin'] }) | ||
}; | ||
HelpClass; | ||
async run() { | ||
@@ -37,3 +53,3 @@ const { flags } = await this.parse(Readme); | ||
} | ||
catch (_a) { } | ||
catch { } | ||
await (config).runHook('init', { id: 'readme', argv: this.argv }); | ||
@@ -183,6 +199,5 @@ this.HelpClass = await (0, core_1.loadHelpClass)(config); | ||
repo(plugin) { | ||
var _a; | ||
const pjson = Object.assign({}, plugin.pjson); | ||
const pjson = { ...plugin.pjson }; | ||
normalize(pjson); | ||
const repo = (_a = pjson.repository) === null || _a === void 0 ? void 0 : _a.url; | ||
const repo = pjson.repository?.url; | ||
if (!repo) | ||
@@ -200,3 +215,2 @@ return; | ||
commandPath(plugin, c) { | ||
var _a, _b; | ||
const commandsDir = plugin.pjson.oclif.commands; | ||
@@ -213,3 +227,3 @@ if (!commandsDir) | ||
} | ||
else if ((_a = plugin.pjson.devDependencies) === null || _a === void 0 ? void 0 : _a.typescript) { | ||
else if (plugin.pjson.devDependencies?.typescript) { | ||
// check if non-compiled scripts are available | ||
@@ -230,3 +244,3 @@ const base = p.replace(plugin.root + path.sep, ''); | ||
p = p.replace(plugin.root + path.sep, ''); | ||
if ((_b = plugin.pjson.devDependencies) === null || _b === void 0 ? void 0 : _b.typescript) { | ||
if (plugin.pjson.devDependencies?.typescript) { | ||
p = p.replace(libRegex, 'src' + path.sep); | ||
@@ -258,17 +272,2 @@ p = p.replace(/\.js$/, '.ts'); | ||
} | ||
Readme.description = `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 --> | ||
Customize the code URL prefix by setting oclif.repositoryPrefix in package.json. | ||
`; | ||
Readme.flags = { | ||
dir: core_1.Flags.string({ description: 'output directory for multi docs', default: 'docs', required: true }), | ||
multi: core_1.Flags.boolean({ description: 'create a different markdown page for each topic' }), | ||
plugin: core_1.Flags.boolean({ description: 'create a plugin readme doc' }), | ||
bin: core_1.Flags.string({ description: 'optional main cli command', dependsOn: ['plugin'] }) | ||
}; | ||
exports.default = Readme; |
@@ -5,8 +5,6 @@ "use strict"; | ||
class IncompatibleHelpError extends Error { | ||
constructor() { | ||
super(...arguments); | ||
this.message = 'Please implement `formatCommand` in your custom help class.\nSee https://oclif.io/docs/help_classes for more.'; | ||
} | ||
message = 'Please implement `formatCommand` in your custom help class.\nSee https://oclif.io/docs/help_classes for more.'; | ||
} | ||
class HelpCompatibilityWrapper { | ||
inner; | ||
constructor(inner) { | ||
@@ -13,0 +11,0 @@ this.inner = inner; |
@@ -76,3 +76,3 @@ { | ||
}, | ||
"version": "2.1.4-oclif3.1" | ||
"version": "3.0.0-oclif3.1" | ||
} |
{ | ||
"name": "@commercelayer/cli-dev", | ||
"description": "Commerce Layer CLI development tools and helpers", | ||
"version": "2.1.4-oclif3.1", | ||
"version": "3.0.0-oclif3.1", | ||
"author": "Pierluigi Viti <pierluigi@commercelayer.io>", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/commercelayer/commercelayer-cli-dev/issues", |
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
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
25495
509