@salesforce/plugin-marketplace 0.0.2-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.txt ADDED
@@ -0,0 +1,12 @@
1
+ Copyright (c) 2023, Salesforce.com, Inc.
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
+
6
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
+
8
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
+
10
+ * Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11
+
12
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md ADDED
@@ -0,0 +1,94 @@
1
+ # plugin-marketplace
2
+
3
+ [![NPM](https://img.shields.io/npm/v/@salesforce/plugin-marketplace.svg?label=@salesforce/plugin-marketplace)](https://www.npmjs.com/package/@salesforce/plugin-marketplace) [![Downloads/week](https://img.shields.io/npm/dw/@salesforce/plugin-marketplace.svg)](https://npmjs.org/package/@salesforce/plugin-marketplace) [![License](https://img.shields.io/badge/License-BSD%203--Clause-brightgreen.svg)](https://raw.githubusercontent.com/salesforcecli/plugin-marketplace/main/LICENSE.txt)
4
+
5
+ ## Add a plugin to the list
6
+
7
+ Submit a PR. We require that your source code be publicly available.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ sf plugins install @salesforce/plugin-marketplace@x.y.z
13
+ ```
14
+
15
+ ## Issues
16
+
17
+ Please report any issues at https://github.com/forcedotcom/cli/issues
18
+
19
+ ## Contributing
20
+
21
+ 1. Please read our [Code of Conduct](CODE_OF_CONDUCT.md)
22
+ 2. Create a new issue before starting your project so that we can keep track of
23
+ what you are trying to add/fix. That way, we can also offer suggestions or
24
+ let you know if there is already an effort in progress.
25
+ 3. Fork this repository.
26
+ 4. [Build the plugin locally](#build)
27
+ 5. Create a _topic_ branch in your fork. Note, this step is recommended but technically not required if contributing using a fork.
28
+ 6. Edit the code in your fork.
29
+ 7. Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request will be accepted without unit tests.
30
+ 8. Sign CLA (see [CLA](#cla) below).
31
+ 9. Send us a pull request when you are done. We'll review your code, suggest any needed changes, and merge it in.
32
+
33
+ ### CLA
34
+
35
+ External contributors will be required to sign a Contributor's License
36
+ Agreement. You can do so by going to https://cla.salesforce.com/sign-cla.
37
+
38
+ ### Build
39
+
40
+ To build the plugin locally, make sure to have yarn installed and run the following commands:
41
+
42
+ ```bash
43
+ # Clone the repository
44
+ git clone git@github.com:salesforcecli/plugin-marketplace
45
+
46
+ # Install the dependencies and compile
47
+ yarn && yarn build
48
+ ```
49
+
50
+ To use your plugin, run using the local `./bin/dev` or `./bin/dev.cmd` file.
51
+
52
+ ```bash
53
+ # Run using local run file.
54
+ ./bin/dev plugins discover
55
+ ```
56
+
57
+ There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.
58
+
59
+ ```bash
60
+ # Link your plugin to the sf cli
61
+ sf plugins link .
62
+ # To verify
63
+ sf plugins
64
+ ```
65
+
66
+ ## Commands
67
+
68
+ <!-- commands -->
69
+
70
+ - [`sf plugins discover`](#sf-plugins-discover)
71
+
72
+ ## `sf plugins discover`
73
+
74
+ See a list of sf plugins you can install.
75
+
76
+ ```
77
+ USAGE
78
+ $ sf plugins discover [--json]
79
+
80
+ GLOBAL FLAGS
81
+ --json Format output as json.
82
+
83
+ DESCRIPTION
84
+ See a list of sf plugins you can install.
85
+
86
+ Description of a command.
87
+
88
+ EXAMPLES
89
+ $ sf plugins discover
90
+ ```
91
+
92
+ _See code: [src/commands/plugins/discover.ts](https://github.com/salesforcecli/plugin-marketplace/blob/v0.0.1/src/commands/plugins/discover.ts)_
93
+
94
+ <!-- commandsstop -->
@@ -0,0 +1,9 @@
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ import { DiscoverResult } from '../../shared/discoverQuery';
3
+ export type DiscoverResults = DiscoverResult[];
4
+ export default class PluginsDiscover extends SfCommand<DiscoverResults> {
5
+ static readonly summary: string;
6
+ static readonly description: string;
7
+ static readonly examples: string[];
8
+ run(): Promise<DiscoverResults>;
9
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /*
4
+ * Copyright (c) 2023, salesforce.com, inc.
5
+ * All rights reserved.
6
+ * Licensed under the BSD 3-Clause license.
7
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
8
+ */
9
+ const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
10
+ const core_1 = require("@salesforce/core");
11
+ const discoverQuery_1 = require("../../shared/discoverQuery");
12
+ core_1.Messages.importMessagesDirectory(__dirname);
13
+ const messages = core_1.Messages.loadMessages('@salesforce/plugin-marketplace', 'plugins.discover');
14
+ class PluginsDiscover extends sf_plugins_core_1.SfCommand {
15
+ async run() {
16
+ const packages = [
17
+ 'mo-dx-plugin',
18
+ 'sfdx-hardis',
19
+ 'sfdx-affirm',
20
+ 'heat-sfdx-cli',
21
+ 'shane-sfdx-plugins',
22
+ 'etcopydata',
23
+ 'sfdx-migration-automatic',
24
+ '@dx-cli-toolbox/sfdx-toolbox-package-utils',
25
+ '@dxatscale/sfpowerscripts',
26
+ 'sfdx-git-packager',
27
+ 'texei-sfdx-plugin',
28
+ ];
29
+ const results = (0, discoverQuery_1.transform)(await (0, discoverQuery_1.query)(packages)).map(limitJson);
30
+ this.table(results.map(colorizeRow), {
31
+ name: { header: 'Package' },
32
+ description: { header: 'Description' },
33
+ homepage: { header: 'Homepage' },
34
+ downloads: { header: 'Downloads/Week' },
35
+ date: { header: 'Published' },
36
+ });
37
+ this.warn(messages.getMessage('disclaimer'));
38
+ return results;
39
+ }
40
+ }
41
+ PluginsDiscover.summary = messages.getMessage('summary');
42
+ PluginsDiscover.description = messages.getMessage('description');
43
+ PluginsDiscover.examples = messages.getMessages('examples');
44
+ exports.default = PluginsDiscover;
45
+ /* there's a LOT more properties outside out types coming back from the APIs that we don't want people to build dependencies on */
46
+ const limitJson = ({ name, description, homepage, downloads, date }) => ({
47
+ name,
48
+ description,
49
+ homepage,
50
+ downloads,
51
+ date,
52
+ });
53
+ const colorizeRow = (row, index) => index % 2 === 0
54
+ ? row
55
+ : Object.fromEntries(Object.entries(row).map(([key, value]) => [key, sf_plugins_core_1.StandardColors.info(value)]));
56
+ //# sourceMappingURL=discover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discover.js","sourceRoot":"","sources":["../../../src/commands/plugins/discover.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,iEAAwE;AACxE,2CAA4C;AAC5C,8DAA8E;AAE9E,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,gCAAgC,EAAE,kBAAkB,CAAC,CAAC;AAI7F,MAAqB,eAAgB,SAAQ,2BAA0B;IAK9D,KAAK,CAAC,GAAG;QACd,MAAM,QAAQ,GAAG;YACf,cAAc;YACd,aAAa;YACb,aAAa;YACb,eAAe;YACf,oBAAoB;YACpB,YAAY;YACZ,0BAA0B;YAC1B,4CAA4C;YAC5C,2BAA2B;YAC3B,mBAAmB;YACnB,mBAAmB;SACpB,CAAC;QAEF,MAAM,OAAO,GAAG,IAAA,yBAAS,EAAC,MAAM,IAAA,qBAAK,EAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAChE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;YACnC,IAAI,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE;YAC3B,WAAW,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE;YACtC,QAAQ,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE;YAChC,SAAS,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE;YACvC,IAAI,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;SAC9B,CAAC,CAAC;QAEH,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;QAC7C,OAAO,OAAO,CAAC;IACjB,CAAC;;AA9BsB,uBAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACzC,2BAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACjD,wBAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;kBAHhD,eAAe;AAkCpC,mIAAmI;AACnI,MAAM,SAAS,GAAG,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAkB,EAAkB,EAAE,CAAC,CAAC;IACvG,IAAI;IACJ,WAAW;IACX,QAAQ;IACR,SAAS;IACT,IAAI;CACL,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,CAAC,GAAmB,EAAE,KAAa,EAAkB,EAAE,CACzE,KAAK,GAAG,CAAC,KAAK,CAAC;IACb,CAAC,CAAC,GAAG;IACL,CAAC,CAAE,MAAM,CAAC,WAAW,CACjB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,gCAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAC1D,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export = _default;
package/lib/index.js ADDED
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2021, salesforce.com, inc.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ module.exports = {};
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,iBAAS,EAAE,CAAC"}
@@ -0,0 +1,25 @@
1
+ export type NpmInfo = {
2
+ name: string;
3
+ description: string;
4
+ homepage: string;
5
+ };
6
+ export type StarInfo = {
7
+ downloads: string;
8
+ };
9
+ export type SearchInfo = {
10
+ objects: Array<{
11
+ package: {
12
+ name: string;
13
+ date: string;
14
+ };
15
+ }>;
16
+ };
17
+ export type DiscoverResult = NpmInfo & StarInfo & {
18
+ date: string;
19
+ };
20
+ type QueryResult = [NpmInfo, StarInfo, SearchInfo];
21
+ export declare const query: (packages: string[]) => Promise<Array<[NpmInfo, StarInfo, SearchInfo]>>;
22
+ export declare const transform: (queryResult: QueryResult[]) => DiscoverResult[];
23
+ /** word wrap inside the description. Also removes line empty lines and markdown dividers */
24
+ export declare const descriptionTransform: (description: string) => string;
25
+ export {};
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.descriptionTransform = exports.transform = exports.query = void 0;
4
+ /*
5
+ * Copyright (c) 2023, salesforce.com, inc.
6
+ * All rights reserved.
7
+ * Licensed under the BSD 3-Clause license.
8
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
+ */
10
+ const got_1 = require("got");
11
+ const proxy_agent_1 = require("proxy-agent");
12
+ const agent = { https: new proxy_agent_1.ProxyAgent() };
13
+ const query = async (packages) => Promise.all(packages.map((pkg) => Promise.all([
14
+ (0, got_1.default)(`https://registry.npmjs.org/${pkg}/latest`, { agent }).json(),
15
+ (0, got_1.default)(`https://api.npmjs.org/downloads/point/last-week/${pkg}`, { agent }).json(),
16
+ // use yarn to spread the load around some
17
+ (0, got_1.default)(`https://registry.yarnpkg.com/-/v1/search?text=${pkg}`, { agent }).json(),
18
+ ])));
19
+ exports.query = query;
20
+ const transform = (queryResult) => queryResult
21
+ .map((y) => ({ ...y[0], ...y[1], date: dateFromSearchObjects(y[0].name, y[2]) }))
22
+ .sort((a, b) => (b.downloads > a.downloads ? 1 : -1))
23
+ .map((y) => ({
24
+ ...y,
25
+ description: (0, exports.descriptionTransform)(y.description),
26
+ homepage: y.homepage.replace('https://github.com/https://github.com', 'https://github.com'),
27
+ }));
28
+ exports.transform = transform;
29
+ const dateFromSearchObjects = (pkgName, searchInfo) => searchInfo.objects.find((o) => o.package.name === pkgName)?.package.date.split('T')[0] ?? '';
30
+ /** word wrap inside the description. Also removes line empty lines and markdown dividers */
31
+ const descriptionTransform = (description) => (description
32
+ // line dividers
33
+ .replace(/={2,}/g, '')
34
+ .trim()
35
+ // separate into shorter lines
36
+ .match(/(.{1,50})(?:\s|$)/g)
37
+ ?.map((line) => line.trim())
38
+ .join('\n') ?? '')
39
+ // remove empty lines
40
+ .replace(/\n{2,}/gm, '\n');
41
+ exports.descriptionTransform = descriptionTransform;
42
+ //# sourceMappingURL=discoverQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discoverQuery.js","sourceRoot":"","sources":["../../src/shared/discoverQuery.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAAsB;AACtB,6CAAyC;AA2BzC,MAAM,KAAK,GAAG,EAAE,KAAK,EAAE,IAAI,wBAAU,EAAE,EAAE,CAAC;AAEnC,MAAM,KAAK,GAAG,KAAK,EAAE,QAAkB,EAAmD,EAAE,CACjG,OAAO,CAAC,GAAG,CACT,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CACnB,OAAO,CAAC,GAAG,CAAC;IACV,IAAA,aAAG,EAAU,8BAA8B,GAAG,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,EAAW;IACnF,IAAA,aAAG,EAAW,mDAAmD,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,EAAY;IACnG,0CAA0C;IAC1C,IAAA,aAAG,EAAa,iDAAiD,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,EAAc;CACtG,CAAC,CACH,CACF,CAAC;AAVS,QAAA,KAAK,SAUd;AAEG,MAAM,SAAS,GAAG,CAAC,WAA0B,EAAoB,EAAE,CACxE,WAAW;KACR,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;KAChF,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACpD,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACX,GAAG,CAAC;IACJ,WAAW,EAAE,IAAA,4BAAoB,EAAC,CAAC,CAAC,WAAW,CAAC;IAChD,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,uCAAuC,EAAE,oBAAoB,CAAC;CAC5F,CAAC,CAAC,CAAC;AARK,QAAA,SAAS,aAQd;AAER,MAAM,qBAAqB,GAAG,CAAC,OAAe,EAAE,UAAsB,EAAU,EAAE,CAChF,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAE/F,6FAA6F;AACtF,MAAM,oBAAoB,GAAG,CAAC,WAAmB,EAAU,EAAE,CAClE,CACE,WAAW;IACT,gBAAgB;KACf,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;KACrB,IAAI,EAAE;IACP,8BAA8B;KAC7B,KAAK,CAAC,oBAAoB,CAAC;IAC5B,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;KAC3B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CACpB;IACC,qBAAqB;KACpB,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AAZlB,QAAA,oBAAoB,wBAYF"}
@@ -0,0 +1,15 @@
1
+ # summary
2
+
3
+ See a list of sf plugins you can install.
4
+
5
+ # description
6
+
7
+ Description of a command.
8
+
9
+ # examples
10
+
11
+ - <%= config.bin %> <%= command.id %>
12
+
13
+ # disclaimer
14
+
15
+ These plugins are not created by Salesforce. Ensure that you trust the creator of the plugin or have reviewed the code. Install at your own risk.
@@ -0,0 +1,28 @@
1
+ {
2
+ "version": "0.0.2-dev.1",
3
+ "commands": {
4
+ "plugins:discover": {
5
+ "id": "plugins:discover",
6
+ "summary": "See a list of sf plugins you can install.",
7
+ "description": "Description of a command.",
8
+ "strict": true,
9
+ "pluginName": "@salesforce/plugin-marketplace",
10
+ "pluginAlias": "@salesforce/plugin-marketplace",
11
+ "pluginType": "core",
12
+ "aliases": [],
13
+ "examples": [
14
+ "<%= config.bin %> <%= command.id %>"
15
+ ],
16
+ "flags": {
17
+ "json": {
18
+ "name": "json",
19
+ "type": "boolean",
20
+ "description": "Format output as json.",
21
+ "helpGroup": "GLOBAL",
22
+ "allowNo": false
23
+ }
24
+ },
25
+ "args": {}
26
+ }
27
+ }
28
+ }
package/package.json ADDED
@@ -0,0 +1,216 @@
1
+ {
2
+ "name": "@salesforce/plugin-marketplace",
3
+ "description": "Find sf plugins",
4
+ "version": "0.0.2-dev.1",
5
+ "author": "Salesforce",
6
+ "bugs": "https://github.com/forcedotcom/cli/issues",
7
+ "dependencies": {
8
+ "@oclif/core": "^2.11.7",
9
+ "@salesforce/core": "^5.2.0",
10
+ "@salesforce/kit": "^3.0.9",
11
+ "@salesforce/sf-plugins-core": "^3.1.14",
12
+ "proxy-agent": "^6.3.0",
13
+ "tslib": "^2"
14
+ },
15
+ "devDependencies": {
16
+ "@oclif/plugin-command-snapshot": "^4.0.11",
17
+ "@salesforce/cli-plugins-testkit": "^4.2.9",
18
+ "@salesforce/dev-config": "^4.0.1",
19
+ "@salesforce/dev-scripts": "^5.4.3",
20
+ "@salesforce/plugin-command-reference": "^3.0.25",
21
+ "@salesforce/prettier-config": "^0.0.3",
22
+ "@salesforce/ts-sinon": "1.4.8",
23
+ "@swc/core": "1.3.39",
24
+ "@types/inquirer": "^9.0.3",
25
+ "@typescript-eslint/eslint-plugin": "^5.61.0",
26
+ "@typescript-eslint/parser": "^5.62.0",
27
+ "chai": "^4.3.7",
28
+ "eslint": "^8.45.0",
29
+ "eslint-config-prettier": "^8.10.0",
30
+ "eslint-config-salesforce": "^2.0.2",
31
+ "eslint-config-salesforce-license": "^0.2.0",
32
+ "eslint-config-salesforce-typescript": "^1.1.2",
33
+ "eslint-plugin-header": "^3.1.1",
34
+ "eslint-plugin-import": "2.27.5",
35
+ "eslint-plugin-jsdoc": "^43.0.5",
36
+ "eslint-plugin-sf-plugin": "^1.16.2",
37
+ "husky": "^7.0.4",
38
+ "mocha": "^9.2.2",
39
+ "nyc": "^15.1.0",
40
+ "oclif": "^3.11.3",
41
+ "prettier": "^2.8.8",
42
+ "pretty-quick": "^3.1.3",
43
+ "shx": "0.3.4",
44
+ "sinon": "10.0.0",
45
+ "ts-node": "^10.9.1",
46
+ "typescript": "^5.1.6",
47
+ "wireit": "^0.10.0"
48
+ },
49
+ "engines": {
50
+ "node": ">=16.0.0"
51
+ },
52
+ "files": [
53
+ "/lib",
54
+ "/messages",
55
+ "/oclif.manifest.json",
56
+ "/schemas"
57
+ ],
58
+ "homepage": "https://github.com/salesforcecli/plugin-template-sf",
59
+ "keywords": [
60
+ "force",
61
+ "salesforce",
62
+ "sfdx",
63
+ "salesforcedx",
64
+ "sfdx-plugin",
65
+ "sf-plugin",
66
+ "sf"
67
+ ],
68
+ "license": "BSD-3-Clause",
69
+ "main": "lib/index.js",
70
+ "oclif": {
71
+ "commands": "./lib/commands",
72
+ "bin": "sf",
73
+ "topicSeparator": " ",
74
+ "devPlugins": [
75
+ "@oclif/plugin-help",
76
+ "@oclif/plugin-command-snapshot",
77
+ "@salesforce/plugin-command-reference"
78
+ ],
79
+ "topics": {
80
+ "plugins": {
81
+ "external": true,
82
+ "description": "Find and manage plugins"
83
+ }
84
+ }
85
+ },
86
+ "repository": "salesforcecli/plugin-template-sf",
87
+ "scripts": {
88
+ "build": "wireit",
89
+ "clean": "sf-clean",
90
+ "clean-all": "sf-clean all",
91
+ "clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json",
92
+ "compile": "wireit",
93
+ "docs": "sf-docs",
94
+ "format": "wireit",
95
+ "lint": "wireit",
96
+ "postpack": "shx rm -f oclif.manifest.json",
97
+ "prepack": "sf-prepack",
98
+ "prepare": "sf-install",
99
+ "test": "wireit",
100
+ "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
101
+ "test:only": "wireit",
102
+ "version": "oclif readme"
103
+ },
104
+ "publishConfig": {
105
+ "access": "public"
106
+ },
107
+ "wireit": {
108
+ "build": {
109
+ "dependencies": [
110
+ "compile",
111
+ "lint"
112
+ ]
113
+ },
114
+ "compile": {
115
+ "command": "tsc -p . --pretty --incremental",
116
+ "files": [
117
+ "src/**/*.ts",
118
+ "**/tsconfig.json",
119
+ "messages/**"
120
+ ],
121
+ "output": [
122
+ "lib/**",
123
+ "*.tsbuildinfo"
124
+ ],
125
+ "clean": "if-file-deleted"
126
+ },
127
+ "format": {
128
+ "command": "prettier --write \"+(src|test|schemas)/**/*.+(ts|js|json)|command-snapshot.json\"",
129
+ "files": [
130
+ "src/**/*.ts",
131
+ "test/**/*.ts",
132
+ "schemas/**/*.json",
133
+ "command-snapshot.json",
134
+ ".prettier*"
135
+ ],
136
+ "output": []
137
+ },
138
+ "lint": {
139
+ "command": "eslint src test --color --cache --cache-location .eslintcache",
140
+ "files": [
141
+ "src/**/*.ts",
142
+ "test/**/*.ts",
143
+ "messages/**",
144
+ "**/.eslint*",
145
+ "**/tsconfig.json"
146
+ ],
147
+ "output": []
148
+ },
149
+ "test:compile": {
150
+ "command": "tsc -p \"./test\" --pretty",
151
+ "files": [
152
+ "test/**/*.ts",
153
+ "**/tsconfig.json"
154
+ ],
155
+ "output": []
156
+ },
157
+ "test": {
158
+ "dependencies": [
159
+ "test:compile",
160
+ "test:only",
161
+ "test:command-reference",
162
+ "test:deprecation-policy",
163
+ "lint",
164
+ "test:json-schema"
165
+ ]
166
+ },
167
+ "test:only": {
168
+ "command": "nyc mocha \"test/**/*.test.ts\"",
169
+ "env": {
170
+ "FORCE_COLOR": "2"
171
+ },
172
+ "files": [
173
+ "test/**/*.ts",
174
+ "src/**/*.ts",
175
+ "**/tsconfig.json",
176
+ ".mocha*",
177
+ "!*.nut.ts",
178
+ ".nycrc"
179
+ ],
180
+ "output": []
181
+ },
182
+ "test:command-reference": {
183
+ "command": "\"./bin/dev\" commandreference:generate --erroronwarnings",
184
+ "files": [
185
+ "src/**/*.ts",
186
+ "messages/**",
187
+ "package.json"
188
+ ],
189
+ "output": [
190
+ "tmp/root"
191
+ ]
192
+ },
193
+ "test:deprecation-policy": {
194
+ "command": "\"./bin/dev\" snapshot:compare",
195
+ "files": [
196
+ "src/**/*.ts"
197
+ ],
198
+ "output": [],
199
+ "dependencies": [
200
+ "compile"
201
+ ]
202
+ },
203
+ "test:json-schema": {
204
+ "command": "\"./bin/dev\" schema:compare",
205
+ "files": [
206
+ "src/**/*.ts",
207
+ "schemas"
208
+ ],
209
+ "output": []
210
+ }
211
+ },
212
+ "sfdx": {
213
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-marketplace/0.0.2-dev.1.crt",
214
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-marketplace/0.0.2-dev.1.sig"
215
+ }
216
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/DiscoverResults",
4
+ "definitions": {
5
+ "DiscoverResults": {
6
+ "type": "array",
7
+ "items": {
8
+ "$ref": "#/definitions/DiscoverResult"
9
+ }
10
+ },
11
+ "DiscoverResult": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "properties": {
15
+ "date": {
16
+ "type": "string"
17
+ },
18
+ "downloads": {
19
+ "type": "string"
20
+ },
21
+ "name": {
22
+ "type": "string"
23
+ },
24
+ "description": {
25
+ "type": "string"
26
+ },
27
+ "homepage": {
28
+ "type": "string"
29
+ }
30
+ },
31
+ "required": ["date", "description", "downloads", "homepage", "name"]
32
+ }
33
+ }
34
+ }