Comparing version 4.10.15 to 4.11.0
@@ -10,3 +10,3 @@ import { Command, Interfaces } from '@oclif/core'; | ||
}; | ||
run(): Promise<void>; | ||
run(): Promise<Interfaces.Manifest>; | ||
private executeCommand; | ||
@@ -13,0 +13,0 @@ private getTarballUrl; |
@@ -113,2 +113,3 @@ "use strict"; | ||
this.log(`wrote manifest to ${file}`); | ||
return plugin.manifest; | ||
} | ||
@@ -115,0 +116,0 @@ async executeCommand(command, options) { |
@@ -6,2 +6,3 @@ import { Command, Interfaces } from '@oclif/core'; | ||
aliases: Interfaces.BooleanFlag<boolean>; | ||
'dry-run': Interfaces.BooleanFlag<boolean>; | ||
multi: Interfaces.BooleanFlag<boolean>; | ||
@@ -17,3 +18,3 @@ 'nested-topics-depth': Interfaces.OptionFlag<number | undefined, Interfaces.CustomOptions>; | ||
private flags; | ||
run(): Promise<void>; | ||
run(): Promise<string>; | ||
} |
@@ -50,2 +50,5 @@ "use strict"; | ||
}), | ||
'dry-run': core_1.Flags.boolean({ | ||
description: 'Prints the generated README without modifying the file.', | ||
}), | ||
multi: core_1.Flags.boolean({ | ||
@@ -111,2 +114,3 @@ description: 'Create a different markdown page for each topic.', | ||
aliases: this.flags.aliases, | ||
dryRun: this.flags['dry-run'], | ||
multi: this.flags.multi, | ||
@@ -120,5 +124,9 @@ nestedTopicsDepth: this.flags['nested-topics-depth'], | ||
}); | ||
await generator.generate(); | ||
const readme = await generator.generate(); | ||
if (this.flags['dry-run']) { | ||
this.log(readme); | ||
} | ||
return readme; | ||
} | ||
} | ||
exports.default = Readme; |
@@ -214,3 +214,4 @@ "use strict"; | ||
async write(file, content) { | ||
await fs.outputFile(file, content); | ||
if (!this.options.dryRun) | ||
await fs.outputFile(file, content); | ||
} | ||
@@ -217,0 +218,0 @@ /** |
@@ -473,2 +473,8 @@ { | ||
}, | ||
"dry-run": { | ||
"description": "Prints the generated README without modifying the file.", | ||
"name": "dry-run", | ||
"allowNo": false, | ||
"type": "boolean" | ||
}, | ||
"multi": { | ||
@@ -1078,3 +1084,3 @@ "description": "Create a different markdown page for each topic.", | ||
}, | ||
"version": "4.10.15" | ||
"version": "4.11.0" | ||
} |
{ | ||
"name": "oclif", | ||
"description": "oclif: create your own CLI", | ||
"version": "4.10.15", | ||
"version": "4.11.0", | ||
"author": "Salesforce", | ||
@@ -37,6 +37,6 @@ "bin": { | ||
"devDependencies": { | ||
"@commitlint/config-conventional": "^18", | ||
"@commitlint/config-conventional": "^19", | ||
"@oclif/plugin-legacy": "^2.0.8", | ||
"@oclif/prettier-config": "^0.2.1", | ||
"@oclif/test": "^3.2.11", | ||
"@oclif/test": "^4", | ||
"@types/async-retry": "^1.4.5", | ||
@@ -48,3 +48,3 @@ "@types/chai": "^4.3.4", | ||
"@types/fs-extra": "^9.0", | ||
"@types/lodash": "^4.17.0", | ||
"@types/lodash": "^4.17.4", | ||
"@types/mocha": "^10.0.2", | ||
@@ -54,5 +54,6 @@ "@types/node": "^18", | ||
"@types/shelljs": "^0.8.11", | ||
"@types/sinon": "^17.0.3", | ||
"@types/validate-npm-package-name": "^4.0.2", | ||
"chai": "^4.4.1", | ||
"commitlint": "^18", | ||
"commitlint": "^19", | ||
"eslint": "^8.57.0", | ||
@@ -70,3 +71,3 @@ "eslint-config-oclif": "^5.2.0", | ||
"shx": "^0.3.4", | ||
"sinon": "^17.0.2", | ||
"sinon": "^18.0.0", | ||
"ts-node": "^10.7.0", | ||
@@ -73,0 +74,0 @@ "typescript": "^5" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
259172
5401
34