@salesforce/plugin-marketplace 0.0.2-dev.1 → 0.1.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/README.md +1 -1
- package/lib/commands/plugins/discover.d.ts +0 -1
- package/lib/commands/plugins/discover.js +15 -20
- package/lib/commands/plugins/discover.js.map +1 -1
- package/lib/shared/discoverQuery.d.ts +1 -1
- package/lib/shared/discoverQuery.js +1 -2
- package/lib/shared/discoverQuery.js.map +1 -1
- package/lib/shared/plugins.d.ts +1 -0
- package/lib/shared/plugins.js +24 -0
- package/lib/shared/plugins.js.map +1 -0
- package/messages/plugins.discover.md +2 -2
- package/oclif.manifest.json +2 -3
- package/package.json +4 -3
- package/schemas/plugins-discover.json +2 -2
package/README.md
CHANGED
|
@@ -3,7 +3,6 @@ import { DiscoverResult } from '../../shared/discoverQuery';
|
|
|
3
3
|
export type DiscoverResults = DiscoverResult[];
|
|
4
4
|
export default class PluginsDiscover extends SfCommand<DiscoverResults> {
|
|
5
5
|
static readonly summary: string;
|
|
6
|
-
static readonly description: string;
|
|
7
6
|
static readonly examples: string[];
|
|
8
7
|
run(): Promise<DiscoverResults>;
|
|
9
8
|
}
|
|
@@ -6,49 +6,44 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
* Licensed under the BSD 3-Clause license.
|
|
7
7
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
8
8
|
*/
|
|
9
|
+
const node_os_1 = require("node:os");
|
|
9
10
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
10
11
|
const core_1 = require("@salesforce/core");
|
|
11
12
|
const discoverQuery_1 = require("../../shared/discoverQuery");
|
|
13
|
+
const plugins_1 = require("../../shared/plugins");
|
|
12
14
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
13
15
|
const messages = core_1.Messages.loadMessages('@salesforce/plugin-marketplace', 'plugins.discover');
|
|
14
16
|
class PluginsDiscover extends sf_plugins_core_1.SfCommand {
|
|
15
17
|
async run() {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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), {
|
|
18
|
+
await this.parse(PluginsDiscover);
|
|
19
|
+
const results = (0, discoverQuery_1.transform)(await (0, discoverQuery_1.query)(plugins_1.packages)).map(limitJson);
|
|
20
|
+
this.table(results.map(formatRow).map(colorizeRow), {
|
|
31
21
|
name: { header: 'Package' },
|
|
32
22
|
description: { header: 'Description' },
|
|
33
23
|
homepage: { header: 'Homepage' },
|
|
34
|
-
downloads: { header: '
|
|
35
|
-
|
|
24
|
+
downloads: { header: 'DL/Wk' },
|
|
25
|
+
published: { header: 'Published' },
|
|
36
26
|
});
|
|
27
|
+
this.log(); // Add a blank line before the disclaimer
|
|
37
28
|
this.warn(messages.getMessage('disclaimer'));
|
|
38
29
|
return results;
|
|
39
30
|
}
|
|
40
31
|
}
|
|
41
32
|
PluginsDiscover.summary = messages.getMessage('summary');
|
|
42
|
-
PluginsDiscover.description = messages.getMessage('description');
|
|
43
33
|
PluginsDiscover.examples = messages.getMessages('examples');
|
|
44
34
|
exports.default = PluginsDiscover;
|
|
45
35
|
/* 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,
|
|
36
|
+
const limitJson = ({ name, description, homepage, downloads, published }) => ({
|
|
47
37
|
name,
|
|
48
38
|
description,
|
|
49
39
|
homepage,
|
|
50
40
|
downloads,
|
|
51
|
-
|
|
41
|
+
published,
|
|
42
|
+
});
|
|
43
|
+
const formatRow = (dr) => ({
|
|
44
|
+
...dr,
|
|
45
|
+
name: dr.name.split('/').join(`/${node_os_1.EOL} `),
|
|
46
|
+
description: (0, discoverQuery_1.descriptionTransform)(dr.description),
|
|
52
47
|
});
|
|
53
48
|
const colorizeRow = (row, index) => index % 2 === 0
|
|
54
49
|
? row
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../../src/commands/plugins/discover.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,iEAAwE;AACxE,2CAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../../src/commands/plugins/discover.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,qCAA8B;AAC9B,iEAAwE;AACxE,2CAA4C;AAC5C,8DAAoG;AACpG,kDAAgD;AAEhD,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;IAI9D,KAAK,CAAC,GAAG;QACd,MAAM,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QAClC,MAAM,OAAO,GAAG,IAAA,yBAAS,EAAC,MAAM,IAAA,qBAAK,EAAC,kBAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAEhE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;YAClD,IAAI,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE;YAC3B,WAAW,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE;YACtC,QA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AAG,EAAE,gCAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAC1D,CAAC"}
|
|
@@ -15,7 +15,7 @@ export type SearchInfo = {
|
|
|
15
15
|
}>;
|
|
16
16
|
};
|
|
17
17
|
export type DiscoverResult = NpmInfo & StarInfo & {
|
|
18
|
-
|
|
18
|
+
published: string;
|
|
19
19
|
};
|
|
20
20
|
type QueryResult = [NpmInfo, StarInfo, SearchInfo];
|
|
21
21
|
export declare const query: (packages: string[]) => Promise<Array<[NpmInfo, StarInfo, SearchInfo]>>;
|
|
@@ -18,11 +18,10 @@ const query = async (packages) => Promise.all(packages.map((pkg) => Promise.all(
|
|
|
18
18
|
])));
|
|
19
19
|
exports.query = query;
|
|
20
20
|
const transform = (queryResult) => queryResult
|
|
21
|
-
.map((y) => ({ ...y[0], ...y[1],
|
|
21
|
+
.map((y) => ({ ...y[0], ...y[1], published: dateFromSearchObjects(y[0].name, y[2]) }))
|
|
22
22
|
.sort((a, b) => (b.downloads > a.downloads ? 1 : -1))
|
|
23
23
|
.map((y) => ({
|
|
24
24
|
...y,
|
|
25
|
-
description: (0, exports.descriptionTransform)(y.description),
|
|
26
25
|
homepage: y.homepage.replace('https://github.com/https://github.com', 'https://github.com'),
|
|
27
26
|
}));
|
|
28
27
|
exports.transform = transform;
|
|
@@ -1 +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,8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AAC,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 @@
|
|
|
1
|
+
export declare const packages: string[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.packages = 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
|
+
exports.packages = [
|
|
11
|
+
'mo-dx-plugin',
|
|
12
|
+
'sfdx-hardis',
|
|
13
|
+
'heat-sfdx-cli',
|
|
14
|
+
'shane-sfdx-plugins',
|
|
15
|
+
'@dx-cli-toolbox/sfdx-toolbox-package-utils',
|
|
16
|
+
'@dxatscale/sfpowerscripts',
|
|
17
|
+
'sfdx-git-packager',
|
|
18
|
+
'texei-sfdx-plugin',
|
|
19
|
+
'sfdx-git-delta',
|
|
20
|
+
'sfdmu',
|
|
21
|
+
'aura-helper-sfdx',
|
|
22
|
+
'sfdx-plugin-source-read',
|
|
23
|
+
];
|
|
24
|
+
//# sourceMappingURL=plugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../src/shared/plugins.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACU,QAAA,QAAQ,GAAG;IACtB,cAAc;IACd,aAAa;IACb,eAAe;IACf,oBAAoB;IACpB,4CAA4C;IAC5C,2BAA2B;IAC3B,mBAAmB;IACnB,mBAAmB;IACnB,gBAAgB;IAChB,OAAO;IACP,kBAAkB;IAClB,yBAAyB;CAC1B,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# summary
|
|
2
2
|
|
|
3
|
-
See a list of sf plugins you can install.
|
|
3
|
+
See a list of 3rd-party sf plugins you can install.
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Lists plugins you can add to `sf` that aren't from Salesforce. To add your plugin to the list, contribute it to https://github.com/salesforcecli/plugin-marketplace.
|
|
8
8
|
|
|
9
9
|
# examples
|
|
10
10
|
|
package/oclif.manifest.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.1.1",
|
|
3
3
|
"commands": {
|
|
4
4
|
"plugins:discover": {
|
|
5
5
|
"id": "plugins:discover",
|
|
6
|
-
"summary": "See a list of sf plugins you can install.",
|
|
7
|
-
"description": "Description of a command.",
|
|
6
|
+
"summary": "See a list of 3rd-party sf plugins you can install.",
|
|
8
7
|
"strict": true,
|
|
9
8
|
"pluginName": "@salesforce/plugin-marketplace",
|
|
10
9
|
"pluginAlias": "@salesforce/plugin-marketplace",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-marketplace",
|
|
3
3
|
"description": "Find sf plugins",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"@salesforce/core": "^5.2.0",
|
|
10
10
|
"@salesforce/kit": "^3.0.9",
|
|
11
11
|
"@salesforce/sf-plugins-core": "^3.1.14",
|
|
12
|
+
"got": "^11",
|
|
12
13
|
"proxy-agent": "^6.3.0",
|
|
13
14
|
"tslib": "^2"
|
|
14
15
|
},
|
|
@@ -210,7 +211,7 @@
|
|
|
210
211
|
}
|
|
211
212
|
},
|
|
212
213
|
"sfdx": {
|
|
213
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-marketplace/0.
|
|
214
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-marketplace/0.
|
|
214
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-marketplace/0.1.1.crt",
|
|
215
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-marketplace/0.1.1.sig"
|
|
215
216
|
}
|
|
216
217
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"type": "object",
|
|
13
13
|
"additionalProperties": false,
|
|
14
14
|
"properties": {
|
|
15
|
-
"
|
|
15
|
+
"published": {
|
|
16
16
|
"type": "string"
|
|
17
17
|
},
|
|
18
18
|
"downloads": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"type": "string"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
|
-
"required": ["
|
|
31
|
+
"required": ["description", "downloads", "homepage", "name", "published"]
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|