@salesforce/plugin-release-management 4.5.27 → 4.6.0
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 +18 -41
- package/bin/dev.js +8 -6
- package/bin/run.js +7 -5
- package/lib/amazonS3.d.ts +4 -8
- package/lib/amazonS3.js +76 -81
- package/lib/amazonS3.js.map +1 -1
- package/lib/codeSigning/NpmName.js +5 -9
- package/lib/codeSigning/NpmName.js.map +1 -1
- package/lib/codeSigning/SimplifiedSigning.d.ts +1 -1
- package/lib/codeSigning/SimplifiedSigning.js +16 -21
- package/lib/codeSigning/SimplifiedSigning.js.map +1 -1
- package/lib/codeSigning/error.js +2 -6
- package/lib/codeSigning/error.js.map +1 -1
- package/lib/codeSigning/packAndSign.d.ts +2 -2
- package/lib/codeSigning/packAndSign.js +45 -44
- package/lib/codeSigning/packAndSign.js.map +1 -1
- package/lib/codeSigning/upload.d.ts +1 -1
- package/lib/codeSigning/upload.js +4 -8
- package/lib/codeSigning/upload.js.map +1 -1
- package/lib/commands/channel/promote.d.ts +11 -4
- package/lib/commands/channel/promote.js +113 -115
- package/lib/commands/channel/promote.js.map +1 -1
- package/lib/commands/cli/artifacts/compare.js +58 -52
- package/lib/commands/cli/artifacts/compare.js.map +1 -1
- package/lib/commands/cli/install/jit/test.d.ts +1 -1
- package/lib/commands/cli/install/jit/test.js +18 -21
- package/lib/commands/cli/install/jit/test.js.map +1 -1
- package/lib/commands/cli/install/test.d.ts +4 -4
- package/lib/commands/cli/install/test.js +114 -106
- package/lib/commands/cli/install/test.js.map +1 -1
- package/lib/commands/cli/release/automerge.d.ts +5 -5
- package/lib/commands/cli/release/automerge.js +44 -47
- package/lib/commands/cli/release/automerge.js.map +1 -1
- package/lib/commands/cli/release/build.d.ts +12 -12
- package/lib/commands/cli/release/build.js +78 -81
- package/lib/commands/cli/release/build.js.map +1 -1
- package/lib/commands/cli/releasenotes.d.ts +4 -4
- package/lib/commands/cli/releasenotes.js +49 -54
- package/lib/commands/cli/releasenotes.js.map +1 -1
- package/lib/commands/cli/tarballs/prepare.js +31 -33
- package/lib/commands/cli/tarballs/prepare.js.map +1 -1
- package/lib/commands/cli/tarballs/smoke.js +32 -31
- package/lib/commands/cli/tarballs/smoke.js.map +1 -1
- package/lib/commands/cli/tarballs/verify.d.ts +1 -1
- package/lib/commands/cli/tarballs/verify.js +58 -62
- package/lib/commands/cli/tarballs/verify.js.map +1 -1
- package/lib/commands/cli/versions/inspect.d.ts +4 -3
- package/lib/commands/cli/versions/inspect.js +79 -84
- package/lib/commands/cli/versions/inspect.js.map +1 -1
- package/lib/commands/dependabot/automerge.d.ts +6 -6
- package/lib/commands/dependabot/automerge.js +48 -48
- package/lib/commands/dependabot/automerge.js.map +1 -1
- package/lib/commands/github/check/closed.d.ts +7 -5
- package/lib/commands/github/check/closed.js +25 -28
- package/lib/commands/github/check/closed.js.map +1 -1
- package/lib/commands/npm/dependencies/pin.d.ts +3 -3
- package/lib/commands/npm/dependencies/pin.js +21 -24
- package/lib/commands/npm/dependencies/pin.js.map +1 -1
- package/lib/commands/npm/package/release.d.ts +11 -12
- package/lib/commands/npm/package/release.js +58 -61
- package/lib/commands/npm/package/release.js.map +1 -1
- package/lib/commands/repositories/index.d.ts +4 -3
- package/lib/commands/repositories/index.js +17 -20
- package/lib/commands/repositories/index.js.map +1 -1
- package/lib/dependabot.d.ts +1 -1
- package/lib/dependabot.js +13 -17
- package/lib/dependabot.js.map +1 -1
- package/lib/dependencies.d.ts +1 -1
- package/lib/dependencies.js +3 -7
- package/lib/dependencies.js.map +1 -1
- package/lib/index.d.ts +1 -2
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/jit.js +18 -22
- package/lib/jit.js.map +1 -1
- package/lib/package.d.ts +0 -2
- package/lib/package.js +36 -59
- package/lib/package.js.map +1 -1
- package/lib/registry.js +19 -18
- package/lib/registry.js.map +1 -1
- package/lib/repositories.js +5 -9
- package/lib/repositories.js.map +1 -1
- package/lib/repository.d.ts +5 -7
- package/lib/repository.js +41 -43
- package/lib/repository.js.map +1 -1
- package/lib/types.js +4 -7
- package/lib/types.js.map +1 -1
- package/npm-shrinkwrap.json +2952 -2228
- package/oclif.manifest.json +17 -69
- package/package.json +9 -9
- package/lib/commands/cli/schemas/compare.d.ts +0 -19
- package/lib/commands/cli/schemas/compare.js +0 -114
- package/lib/commands/cli/schemas/compare.js.map +0 -1
- package/messages/cli.schemas.compare.md +0 -7
package/oclif.manifest.json
CHANGED
|
@@ -144,8 +144,7 @@
|
|
|
144
144
|
"strict": true,
|
|
145
145
|
"summary": "promote a s3 channel",
|
|
146
146
|
"enableJsonFlag": true,
|
|
147
|
-
"
|
|
148
|
-
"isESM": false,
|
|
147
|
+
"isESM": true,
|
|
149
148
|
"relativePath": [
|
|
150
149
|
"lib",
|
|
151
150
|
"commands",
|
|
@@ -211,8 +210,7 @@
|
|
|
211
210
|
"strict": true,
|
|
212
211
|
"summary": "pull all relevant information for writing release notes.\nRequires the GH_TOKEN to be set in the environment.",
|
|
213
212
|
"enableJsonFlag": true,
|
|
214
|
-
"
|
|
215
|
-
"isESM": false,
|
|
213
|
+
"isESM": true,
|
|
216
214
|
"relativePath": [
|
|
217
215
|
"lib",
|
|
218
216
|
"commands",
|
|
@@ -311,8 +309,7 @@
|
|
|
311
309
|
"strict": true,
|
|
312
310
|
"summary": "automatically merge one green, mergeable PR up to the specified maximum bump type",
|
|
313
311
|
"enableJsonFlag": true,
|
|
314
|
-
"
|
|
315
|
-
"isESM": false,
|
|
312
|
+
"isESM": true,
|
|
316
313
|
"relativePath": [
|
|
317
314
|
"lib",
|
|
318
315
|
"commands",
|
|
@@ -423,8 +420,7 @@
|
|
|
423
420
|
"strict": true,
|
|
424
421
|
"summary": "list repositories owned and supported by Salesforce CLI\nFor more information on the list of repositories, visit https://github.com/salesforcecli/status.",
|
|
425
422
|
"enableJsonFlag": true,
|
|
426
|
-
"
|
|
427
|
-
"isESM": false,
|
|
423
|
+
"isESM": true,
|
|
428
424
|
"relativePath": [
|
|
429
425
|
"lib",
|
|
430
426
|
"commands",
|
|
@@ -480,8 +476,7 @@
|
|
|
480
476
|
"strict": true,
|
|
481
477
|
"summary": "Look for breaking changes in artifacts (schemas and snapshots) from plugins. Must be run in CLI directory.",
|
|
482
478
|
"enableJsonFlag": true,
|
|
483
|
-
"
|
|
484
|
-
"isESM": false,
|
|
479
|
+
"isESM": true,
|
|
485
480
|
"relativePath": [
|
|
486
481
|
"lib",
|
|
487
482
|
"commands",
|
|
@@ -569,8 +564,7 @@
|
|
|
569
564
|
"strict": true,
|
|
570
565
|
"summary": "install sf or sfdx",
|
|
571
566
|
"enableJsonFlag": true,
|
|
572
|
-
"
|
|
573
|
-
"isESM": false,
|
|
567
|
+
"isESM": true,
|
|
574
568
|
"relativePath": [
|
|
575
569
|
"lib",
|
|
576
570
|
"commands",
|
|
@@ -650,8 +644,7 @@
|
|
|
650
644
|
"strict": true,
|
|
651
645
|
"summary": "Attempt to automerge nightly PR",
|
|
652
646
|
"enableJsonFlag": true,
|
|
653
|
-
"
|
|
654
|
-
"isESM": false,
|
|
647
|
+
"isESM": true,
|
|
655
648
|
"relativePath": [
|
|
656
649
|
"lib",
|
|
657
650
|
"commands",
|
|
@@ -782,8 +775,7 @@
|
|
|
782
775
|
"strict": true,
|
|
783
776
|
"summary": "builds a new release from a designated starting point and optionally creates PR in Github",
|
|
784
777
|
"enableJsonFlag": true,
|
|
785
|
-
"
|
|
786
|
-
"isESM": false,
|
|
778
|
+
"isESM": true,
|
|
787
779
|
"relativePath": [
|
|
788
780
|
"lib",
|
|
789
781
|
"commands",
|
|
@@ -792,42 +784,6 @@
|
|
|
792
784
|
"build.js"
|
|
793
785
|
]
|
|
794
786
|
},
|
|
795
|
-
"cli:schemas:compare": {
|
|
796
|
-
"aliases": [],
|
|
797
|
-
"args": {},
|
|
798
|
-
"description": "compare schemas from installed plugins",
|
|
799
|
-
"examples": [
|
|
800
|
-
"<%= config.bin %> <%= command.id %>"
|
|
801
|
-
],
|
|
802
|
-
"flags": {
|
|
803
|
-
"json": {
|
|
804
|
-
"description": "Format output as json.",
|
|
805
|
-
"helpGroup": "GLOBAL",
|
|
806
|
-
"name": "json",
|
|
807
|
-
"allowNo": false,
|
|
808
|
-
"type": "boolean"
|
|
809
|
-
}
|
|
810
|
-
},
|
|
811
|
-
"hasDynamicHelp": false,
|
|
812
|
-
"hiddenAliases": [],
|
|
813
|
-
"id": "cli:schemas:compare",
|
|
814
|
-
"pluginAlias": "@salesforce/plugin-release-management",
|
|
815
|
-
"pluginName": "@salesforce/plugin-release-management",
|
|
816
|
-
"pluginType": "core",
|
|
817
|
-
"state": "deprecated",
|
|
818
|
-
"strict": true,
|
|
819
|
-
"summary": "compare schemas from installed plugins",
|
|
820
|
-
"enableJsonFlag": true,
|
|
821
|
-
"SF_ENV": "SF_ENV",
|
|
822
|
-
"isESM": false,
|
|
823
|
-
"relativePath": [
|
|
824
|
-
"lib",
|
|
825
|
-
"commands",
|
|
826
|
-
"cli",
|
|
827
|
-
"schemas",
|
|
828
|
-
"compare.js"
|
|
829
|
-
]
|
|
830
|
-
},
|
|
831
787
|
"cli:tarballs:prepare": {
|
|
832
788
|
"aliases": [],
|
|
833
789
|
"args": {},
|
|
@@ -873,8 +829,7 @@
|
|
|
873
829
|
"strict": true,
|
|
874
830
|
"summary": "remove unnecessary files from node_modules",
|
|
875
831
|
"enableJsonFlag": true,
|
|
876
|
-
"
|
|
877
|
-
"isESM": false,
|
|
832
|
+
"isESM": true,
|
|
878
833
|
"relativePath": [
|
|
879
834
|
"lib",
|
|
880
835
|
"commands",
|
|
@@ -915,8 +870,7 @@
|
|
|
915
870
|
"strict": true,
|
|
916
871
|
"summary": "smoke tests for the sf CLI\nTests that the CLI and every command can be initialized.",
|
|
917
872
|
"enableJsonFlag": true,
|
|
918
|
-
"
|
|
919
|
-
"isESM": false,
|
|
873
|
+
"isESM": true,
|
|
920
874
|
"relativePath": [
|
|
921
875
|
"lib",
|
|
922
876
|
"commands",
|
|
@@ -974,8 +928,7 @@
|
|
|
974
928
|
"strict": true,
|
|
975
929
|
"summary": "verify that tarballs are ready to be uploaded",
|
|
976
930
|
"enableJsonFlag": true,
|
|
977
|
-
"
|
|
978
|
-
"isESM": false,
|
|
931
|
+
"isESM": true,
|
|
979
932
|
"relativePath": [
|
|
980
933
|
"lib",
|
|
981
934
|
"commands",
|
|
@@ -1076,8 +1029,7 @@
|
|
|
1076
1029
|
"strict": true,
|
|
1077
1030
|
"summary": "inspect the CLI version across all install paths",
|
|
1078
1031
|
"enableJsonFlag": true,
|
|
1079
|
-
"
|
|
1080
|
-
"isESM": false,
|
|
1032
|
+
"isESM": true,
|
|
1081
1033
|
"relativePath": [
|
|
1082
1034
|
"lib",
|
|
1083
1035
|
"commands",
|
|
@@ -1130,8 +1082,7 @@
|
|
|
1130
1082
|
"strict": true,
|
|
1131
1083
|
"summary": "Show open Github issues with GUS WI",
|
|
1132
1084
|
"enableJsonFlag": true,
|
|
1133
|
-
"
|
|
1134
|
-
"isESM": false,
|
|
1085
|
+
"isESM": true,
|
|
1135
1086
|
"relativePath": [
|
|
1136
1087
|
"lib",
|
|
1137
1088
|
"commands",
|
|
@@ -1178,8 +1129,7 @@
|
|
|
1178
1129
|
"strict": true,
|
|
1179
1130
|
"summary": "lock a list of dependencies to a target tag or default to 'latest', place these entries in 'pinnedDependencies' entry in the package.json",
|
|
1180
1131
|
"enableJsonFlag": true,
|
|
1181
|
-
"
|
|
1182
|
-
"isESM": false,
|
|
1132
|
+
"isESM": true,
|
|
1183
1133
|
"relativePath": [
|
|
1184
1134
|
"lib",
|
|
1185
1135
|
"commands",
|
|
@@ -1268,8 +1218,7 @@
|
|
|
1268
1218
|
"strict": true,
|
|
1269
1219
|
"summary": "publish npm package",
|
|
1270
1220
|
"enableJsonFlag": true,
|
|
1271
|
-
"
|
|
1272
|
-
"isESM": false,
|
|
1221
|
+
"isESM": true,
|
|
1273
1222
|
"relativePath": [
|
|
1274
1223
|
"lib",
|
|
1275
1224
|
"commands",
|
|
@@ -1310,8 +1259,7 @@
|
|
|
1310
1259
|
"strict": true,
|
|
1311
1260
|
"summary": "Test that all JIT plugins can be successfully installed.",
|
|
1312
1261
|
"enableJsonFlag": true,
|
|
1313
|
-
"
|
|
1314
|
-
"isESM": false,
|
|
1262
|
+
"isESM": true,
|
|
1315
1263
|
"relativePath": [
|
|
1316
1264
|
"lib",
|
|
1317
1265
|
"commands",
|
|
@@ -1322,5 +1270,5 @@
|
|
|
1322
1270
|
]
|
|
1323
1271
|
}
|
|
1324
1272
|
},
|
|
1325
|
-
"version": "4.
|
|
1273
|
+
"version": "4.6.0"
|
|
1326
1274
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-release-management",
|
|
3
3
|
"description": "A plugin for preparing and publishing npm packages",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.6.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
|
+
"type": "module",
|
|
7
8
|
"bin": {
|
|
8
9
|
"sf-release": "bin/run.js"
|
|
9
10
|
},
|
|
10
11
|
"dependencies": {
|
|
11
|
-
"@oclif/core": "^3",
|
|
12
|
+
"@oclif/core": "^3.18.1",
|
|
12
13
|
"@octokit/core": "^4.2.4",
|
|
13
14
|
"@octokit/plugin-paginate-rest": "^6.1.2",
|
|
14
15
|
"@octokit/plugin-throttling": "^5.2.3",
|
|
@@ -16,20 +17,19 @@
|
|
|
16
17
|
"@salesforce/core": "^6.4.7",
|
|
17
18
|
"@salesforce/kit": "^3.0.15",
|
|
18
19
|
"@salesforce/plugin-command-reference": "^3.0.61",
|
|
19
|
-
"@salesforce/plugin-trust": "^
|
|
20
|
-
"@salesforce/sf-plugins-core": "^
|
|
20
|
+
"@salesforce/plugin-trust": "^3.3.1",
|
|
21
|
+
"@salesforce/sf-plugins-core": "^7.1.1",
|
|
21
22
|
"@salesforce/ts-types": "^2.0.9",
|
|
22
23
|
"aws-sdk": "^2.1535.0",
|
|
23
|
-
"chalk": "^
|
|
24
|
+
"chalk": "^5.3.0",
|
|
24
25
|
"fast-glob": "^3.3.2",
|
|
25
|
-
"got": "^
|
|
26
|
+
"got": "^13",
|
|
26
27
|
"just-diff": "^5.2.0",
|
|
27
28
|
"proxy-agent": "^6.3.1",
|
|
28
29
|
"semver": "^7.5.2",
|
|
29
|
-
"shelljs": "^0.8.
|
|
30
|
+
"shelljs": "^0.8.5",
|
|
30
31
|
"standard-version": "^9.0.0",
|
|
31
32
|
"strip-ansi": "^6",
|
|
32
|
-
"tslib": "^2",
|
|
33
33
|
"yarn-deduplicate": "^3.1.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@types/shelljs": "^0.8.15",
|
|
41
41
|
"aws-sdk-mock": "^5.8.0",
|
|
42
42
|
"eslint-plugin-sf-plugin": "^1.17.0",
|
|
43
|
-
"oclif": "^4",
|
|
43
|
+
"oclif": "^4.3.1",
|
|
44
44
|
"shx": "0.3.4",
|
|
45
45
|
"ts-node": "^10.9.2",
|
|
46
46
|
"typescript": "^5.3.3"
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import { JsonMap } from '@salesforce/ts-types';
|
|
3
|
-
type Result = {
|
|
4
|
-
correspondingFile: string | null;
|
|
5
|
-
matches: boolean;
|
|
6
|
-
reason?: string;
|
|
7
|
-
};
|
|
8
|
-
type Results = Record<string, Result>;
|
|
9
|
-
export default class Compare extends SfCommand<Results> {
|
|
10
|
-
static readonly summary: string;
|
|
11
|
-
static readonly description: string;
|
|
12
|
-
static readonly examples: string[];
|
|
13
|
-
static readonly flags: {};
|
|
14
|
-
static readonly state = "deprecated";
|
|
15
|
-
run(): Promise<Results>;
|
|
16
|
-
}
|
|
17
|
-
export declare const getExistingSchemaFiles: () => Promise<string[]>;
|
|
18
|
-
export declare const deepEqual: (a: JsonMap, b: JsonMap) => boolean;
|
|
19
|
-
export {};
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2020, 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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.deepEqual = exports.getExistingSchemaFiles = void 0;
|
|
10
|
-
const path = require("node:path");
|
|
11
|
-
const fs = require("node:fs/promises");
|
|
12
|
-
const node_assert_1 = require("node:assert");
|
|
13
|
-
const kit_1 = require("@salesforce/kit");
|
|
14
|
-
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
15
|
-
const core_1 = require("@salesforce/core");
|
|
16
|
-
const fg = require("fast-glob");
|
|
17
|
-
core_1.Messages.importMessagesDirectory(__dirname);
|
|
18
|
-
const messages = core_1.Messages.loadMessages('@salesforce/plugin-release-management', 'cli.schemas.compare');
|
|
19
|
-
class Compare extends sf_plugins_core_1.SfCommand {
|
|
20
|
-
async run() {
|
|
21
|
-
// The "existing schema" is the schema that is stored at the CLI level
|
|
22
|
-
const existing = await (0, exports.getExistingSchemaFiles)();
|
|
23
|
-
// The "latest schema" is the schema that is found in the node_modules
|
|
24
|
-
const latest = await getLatestSchemaFiles();
|
|
25
|
-
// If there are more latest schema than existing schema, that means that new
|
|
26
|
-
// schema was added without also being added at the CLI level.
|
|
27
|
-
if (latest.length > existing.length) {
|
|
28
|
-
const normalized = latest.map((c) => normalizeFilename(c));
|
|
29
|
-
const missing = normalized.filter((f) => !existing.includes(f));
|
|
30
|
-
throw new core_1.SfError(`Missing files: ${missing.join(', ')}`, 'MissingFilesError', [
|
|
31
|
-
'This error means that a new schema file was found in an installed plugin. Try running cli:schemas:collect first.',
|
|
32
|
-
], 1);
|
|
33
|
-
}
|
|
34
|
-
const results = Object.fromEntries(await Promise.all(existing.map(async (file) => {
|
|
35
|
-
const correspondingFile = latest.find((f) => normalizeFilename(f) === file);
|
|
36
|
-
if (correspondingFile) {
|
|
37
|
-
const [fileData, correspondingFileData] = await Promise.all([
|
|
38
|
-
fs.readFile(file, 'utf8'),
|
|
39
|
-
fs.readFile(correspondingFile, 'utf8'),
|
|
40
|
-
]);
|
|
41
|
-
const fileContents = (0, kit_1.parseJsonMap)(fileData, file);
|
|
42
|
-
const correspondingFileContents = (0, kit_1.parseJsonMap)(correspondingFileData, correspondingFile);
|
|
43
|
-
const matches = (0, exports.deepEqual)(fileContents, correspondingFileContents);
|
|
44
|
-
return [file, { correspondingFile, matches }];
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
return [
|
|
48
|
-
file,
|
|
49
|
-
{
|
|
50
|
-
correspondingFile: null,
|
|
51
|
-
matches: false,
|
|
52
|
-
reason: 'No corresponding file found in node_modules',
|
|
53
|
-
},
|
|
54
|
-
];
|
|
55
|
-
}
|
|
56
|
-
})));
|
|
57
|
-
const data = Object.entries(results).reduce((x, [file, d]) => x.concat(Object.assign({ file }, d)), []);
|
|
58
|
-
const columns = {
|
|
59
|
-
file: { header: 'File' },
|
|
60
|
-
correspondingFile: { header: 'Corresponding File' },
|
|
61
|
-
matches: { header: 'Matches?' },
|
|
62
|
-
};
|
|
63
|
-
this.table(data, columns);
|
|
64
|
-
const hasErrors = Object.values(results).some((result) => result.matches === false);
|
|
65
|
-
if (hasErrors) {
|
|
66
|
-
throw new core_1.SfError('Found schema changes', 'SchemaMismatchError', [
|
|
67
|
-
'This error means that the schema in an installed plugin have changed. If this is intentional, try running cli:schemas:collect first.',
|
|
68
|
-
], 1);
|
|
69
|
-
}
|
|
70
|
-
return results;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
Compare.summary = messages.getMessage('description');
|
|
74
|
-
Compare.description = messages.getMessage('description');
|
|
75
|
-
Compare.examples = messages.getMessages('examples');
|
|
76
|
-
Compare.flags = {};
|
|
77
|
-
Compare.state = 'deprecated';
|
|
78
|
-
exports.default = Compare;
|
|
79
|
-
const normalizeFilename = (file) => {
|
|
80
|
-
const normalized = file
|
|
81
|
-
.split(path.sep)
|
|
82
|
-
.filter((p) => !['node_modules', 'schemas'].includes(p))
|
|
83
|
-
.join(path.sep);
|
|
84
|
-
return path.join('schemas', normalized);
|
|
85
|
-
};
|
|
86
|
-
const getLatestSchemaFiles = async () => {
|
|
87
|
-
const fileData = await fs.readFile(path.join(process.cwd(), 'package.json'), 'utf-8');
|
|
88
|
-
const pjson = (0, kit_1.parseJsonMap)(fileData, path.join(process.cwd(), 'package.json'));
|
|
89
|
-
const globs = (pjson.oclif?.plugins || []).map((plugin) => {
|
|
90
|
-
const normalized = plugin.replace(/\\/g, '/');
|
|
91
|
-
return `node_modules/${normalized}/schemas/**/*.json`; // We need to use / for path sep since fg only works with Unix paths
|
|
92
|
-
});
|
|
93
|
-
const schemaFiles = (await fg(globs))
|
|
94
|
-
.map((f) => path.normalize(f)) // normalize paths so this will work on Windows since fg only returns Unix paths
|
|
95
|
-
.filter((f) => !f.includes(path.join('@salesforce', 'schemas')));
|
|
96
|
-
return schemaFiles;
|
|
97
|
-
};
|
|
98
|
-
const getExistingSchemaFiles = async () => {
|
|
99
|
-
const globs = ['schemas/**/*.json'];
|
|
100
|
-
const schemaFiles = await fg(globs);
|
|
101
|
-
return schemaFiles;
|
|
102
|
-
};
|
|
103
|
-
exports.getExistingSchemaFiles = getExistingSchemaFiles;
|
|
104
|
-
const deepEqual = (a, b) => {
|
|
105
|
-
try {
|
|
106
|
-
node_assert_1.strict.deepEqual(a, b);
|
|
107
|
-
return true;
|
|
108
|
-
}
|
|
109
|
-
catch {
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
exports.deepEqual = deepEqual;
|
|
114
|
-
//# sourceMappingURL=compare.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compare.js","sourceRoot":"","sources":["../../../../src/commands/cli/schemas/compare.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,kCAAkC;AAClC,uCAAuC;AACvC,6CAA+C;AAC/C,yCAA+C;AAC/C,iEAAwD;AACxD,2CAAqD;AACrD,gCAAgC;AAGhC,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,uCAAuC,EAAE,qBAAqB,CAAC,CAAC;AASvG,MAAqB,OAAQ,SAAQ,2BAAkB;IAO9C,KAAK,CAAC,GAAG;QACd,sEAAsE;QACtE,MAAM,QAAQ,GAAG,MAAM,IAAA,8BAAsB,GAAE,CAAC;QAChD,sEAAsE;QACtE,MAAM,MAAM,GAAG,MAAM,oBAAoB,EAAE,CAAC;QAE5C,4EAA4E;QAC5E,8DAA8D;QAC9D,IAAI,MAAM,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;YACpC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3D,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;YAChE,MAAM,IAAI,cAAO,CACf,kBAAkB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EACtC,mBAAmB,EACnB;gBACE,kHAAkH;aACnH,EACD,CAAC,CACF,CAAC;QACJ,CAAC;QAED,MAAM,OAAO,GAAY,MAAM,CAAC,WAAW,CACzC,MAAM,OAAO,CAAC,GAAG,CACf,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI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