Skip to content

Commit 87622d8

Browse files
committed
fix: publish schemas
1 parent 0cbab37 commit 87622d8

File tree

4 files changed

+133
-14
lines changed

4 files changed

+133
-14
lines changed

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"devDependencies": {
1313
"@oclif/dev-cli": "^1",
14-
"@oclif/plugin-command-snapshot": "^2.0.0",
14+
"@oclif/plugin-command-snapshot": "^2.1.1",
1515
"@salesforce/cli-plugins-testkit": "^0.0.8",
1616
"@salesforce/dev-config": "^2.1.0",
1717
"@salesforce/dev-scripts": "^0.9.1",
@@ -53,7 +53,8 @@
5353
"files": [
5454
"/lib",
5555
"/messages",
56-
"/oclif.manifest.json"
56+
"/oclif.manifest.json",
57+
"/schemas"
5758
],
5859
"homepage": "https://github.com/salesforcecli/plugin-project",
5960
"keywords": [
@@ -91,13 +92,14 @@
9192
"format": "sf-format",
9293
"lint": "sf-lint",
9394
"postpack": "shx rm -f oclif.manifest.json",
94-
"posttest": "yarn lint && yarn test:deprecation-policy && yarn test:command-reference",
95+
"posttest": "yarn lint && yarn test:deprecation-policy && yarn test:json-schema && yarn test:command-reference",
9596
"prepack": "sf-prepack",
9697
"prepare": "sf-install",
9798
"pretest": "sf-compile-test",
9899
"test": "sf-test",
99100
"test:command-reference": "./bin/dev commandreference:generate --erroronwarnings",
100101
"test:deprecation-policy": "./bin/dev snapshot:compare",
102+
"test:json-schema": "./bin/dev schema:compare",
101103
"test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
102104
"version": "oclif-dev readme"
103105
},

schemas/project-deploy.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$ref": "#/definitions/DeployResult",
4+
"definitions": {
5+
"DeployResult": {
6+
"type": "object",
7+
"additionalProperties": {}
8+
}
9+
}
10+
}

src/commands/project/deploy.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77

88
import * as os from 'os';
99
import { Command, Flags } from '@oclif/core';
10-
import { AnyJson } from '@salesforce/ts-types';
1110
import { Messages } from '@salesforce/core';
1211

1312
Messages.importMessagesDirectory(__dirname);
1413

1514
const messages = Messages.loadMessages('@salesforce/plugin-project', 'project');
1615

16+
export type DeployResult = Record<string, unknown>;
17+
1718
export default class ProjectDeploy extends Command {
1819
public static description = messages.getMessage('deploy.commandDescription');
1920

@@ -32,7 +33,7 @@ export default class ProjectDeploy extends Command {
3233
}),
3334
};
3435

35-
public async run(): Promise<AnyJson> {
36+
public async run(): Promise<DeployResult> {
3637
const { flags } = await this.parse(ProjectDeploy);
3738
this.log(JSON.stringify(flags));
3839
return {};

yarn.lock

Lines changed: 115 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -447,15 +447,18 @@
447447
chalk "^2.4.2"
448448
tslib "^1.9.3"
449449

450-
"@oclif/plugin-command-snapshot@^2.0.0":
451-
version "2.0.0"
452-
resolved "https://registry.yarnpkg.com/@oclif/plugin-command-snapshot/-/plugin-command-snapshot-2.0.0.tgz#61ee06fc191a34d096024a49fdae0026c88095dc"
453-
integrity sha512-DfEydDlic4TUY4MpgP1UGrRpdAzJZGH2RN0CxEkJ9mM4Z+q61YBjR56IVW2m4mz26DpOHAn7l6luA2WvRVHXXA==
450+
"@oclif/plugin-command-snapshot@^2.1.1":
451+
version "2.1.1"
452+
resolved "https://registry.npmjs.org/@oclif/plugin-command-snapshot/-/plugin-command-snapshot-2.1.1.tgz#ae35ff08f6e8ed535b63c9e8b5ef7454b37a3e99"
453+
integrity sha512-Q59YH9H8q6Zd5ODnxNQYEbPa1NF9XHti32t41h07e+LxiIlV569GzvdHElEaMoQc346sZ1VssPQaDneuwkCTCQ==
454454
dependencies:
455455
"@oclif/command" "^1.6.0"
456456
"@oclif/config" "^1"
457-
chalk "^4.0.0"
458-
sinon "^9.0.0"
457+
chalk "^4.1.1"
458+
just-diff "^3.1.1"
459+
semver "^7.3.5"
460+
sinon "^10.0.0"
461+
ts-json-schema-generator "^0.93.0"
459462
tslib "^2"
460463

461464
"@oclif/plugin-help@^2.2.0":
@@ -696,6 +699,13 @@
696699
dependencies:
697700
"@sinonjs/commons" "^1.7.0"
698701

702+
"@sinonjs/fake-timers@^7.0.4":
703+
version "7.1.2"
704+
resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz#2524eae70c4910edccf99b2f4e6efc5894aff7b5"
705+
integrity sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==
706+
dependencies:
707+
"@sinonjs/commons" "^1.7.0"
708+
699709
"@sinonjs/formatio@^2.0.0":
700710
version "2.0.0"
701711
resolved "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz#84db7e9eb5531df18a8c5e0bfb6e449e55e654b2"
@@ -729,6 +739,15 @@
729739
lodash.get "^4.4.2"
730740
type-detect "^4.0.8"
731741

742+
"@sinonjs/samsam@^6.0.1":
743+
version "6.0.2"
744+
resolved "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.0.2.tgz#a0117d823260f282c04bff5f8704bdc2ac6910bb"
745+
integrity sha512-jxPRPp9n93ci7b8hMfJOFDPRLFYadN6FSpeROFTR4UNF4i5b+EK6m4QXPO46BDhFgRy1JuS87zAnFOzCUwMJcQ==
746+
dependencies:
747+
"@sinonjs/commons" "^1.6.0"
748+
lodash.get "^4.4.2"
749+
type-detect "^4.0.8"
750+
732751
"@sinonjs/text-encoding@^0.7.1":
733752
version "0.7.1"
734753
resolved "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5"
@@ -771,6 +790,11 @@
771790
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0"
772791
integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==
773792

793+
"@types/json-schema@^7.0.7":
794+
version "7.0.7"
795+
resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad"
796+
integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==
797+
774798
"@types/json5@^0.0.29":
775799
version "0.0.29"
776800
resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
@@ -1437,6 +1461,14 @@ chalk@^3.0.0:
14371461
ansi-styles "^4.1.0"
14381462
supports-color "^7.1.0"
14391463

1464+
chalk@^4.1.1:
1465+
version "4.1.1"
1466+
resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad"
1467+
integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==
1468+
dependencies:
1469+
ansi-styles "^4.1.0"
1470+
supports-color "^7.1.0"
1471+
14401472
chardet@^0.7.0:
14411473
version "0.7.0"
14421474
resolved "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
@@ -1709,6 +1741,11 @@ commander@^6.2.0:
17091741
resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c"
17101742
integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==
17111743

1744+
commander@^7.2.0:
1745+
version "7.2.0"
1746+
resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
1747+
integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==
1748+
17121749
comment-parser@^0.7.5:
17131750
version "0.7.6"
17141751
resolved "https://registry.npmjs.org/comment-parser/-/comment-parser-0.7.6.tgz#0e743a53c8e646c899a1323db31f6cd337b10f12"
@@ -2617,7 +2654,7 @@ fast-glob@^3.0.3, fast-glob@^3.1.1:
26172654
micromatch "^4.0.2"
26182655
picomatch "^2.2.1"
26192656

2620-
fast-json-stable-stringify@^2.0.0:
2657+
fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0:
26212658
version "2.1.0"
26222659
resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
26232660
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
@@ -3019,6 +3056,18 @@ glob@^6.0.1:
30193056
once "^1.3.0"
30203057
path-is-absolute "^1.0.0"
30213058

3059+
glob@^7.1.7:
3060+
version "7.1.7"
3061+
resolved "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90"
3062+
integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==
3063+
dependencies:
3064+
fs.realpath "^1.0.0"
3065+
inflight "^1.0.4"
3066+
inherits "2"
3067+
minimatch "^3.0.4"
3068+
once "^1.3.0"
3069+
path-is-absolute "^1.0.0"
3070+
30223071
global-dirs@^0.1.1:
30233072
version "0.1.1"
30243073
resolved "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445"
@@ -3792,6 +3841,13 @@ json-stable-stringify-without-jsonify@^1.0.1:
37923841
resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
37933842
integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
37943843

3844+
json-stable-stringify@^1.0.1:
3845+
version "1.0.1"
3846+
resolved "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af"
3847+
integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=
3848+
dependencies:
3849+
jsonify "~0.0.0"
3850+
37953851
json-stringify-safe@~5.0.1:
37963852
version "5.0.1"
37973853
resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
@@ -3827,6 +3883,11 @@ jsonfile@^6.0.1:
38273883
optionalDependencies:
38283884
graceful-fs "^4.1.6"
38293885

3886+
jsonify@~0.0.0:
3887+
version "0.0.0"
3888+
resolved "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
3889+
integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=
3890+
38303891
jsonparse@^1.2.0:
38313892
version "1.3.1"
38323893
resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
@@ -3858,6 +3919,11 @@ jsprim@^1.2.2:
38583919
json-schema "0.2.3"
38593920
verror "1.10.0"
38603921

3922+
just-diff@^3.1.1:
3923+
version "3.1.1"
3924+
resolved "https://registry.npmjs.org/just-diff/-/just-diff-3.1.1.tgz#d50c597c6fd4776495308c63bdee1b6839082647"
3925+
integrity sha512-sdMWKjRq8qWZEjDcVA6llnUT8RDEBIfOiGpYFPYa9u+2c39JCsejktSP7mj5eRid5EIvTzIpQ2kDOCw1Nq9BjQ==
3926+
38613927
just-extend@^4.0.2:
38623928
version "4.1.0"
38633929
resolved "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz#7278a4027d889601640ee0ce0e5a00b992467da4"
@@ -4527,6 +4593,17 @@ nise@^4.0.4:
45274593
just-extend "^4.0.2"
45284594
path-to-regexp "^1.7.0"
45294595

4596+
nise@^5.0.1:
4597+
version "5.1.0"
4598+
resolved "https://registry.npmjs.org/nise/-/nise-5.1.0.tgz#713ef3ed138252daef20ec035ab62b7a28be645c"
4599+
integrity sha512-W5WlHu+wvo3PaKLsJJkgPup2LrsXCcm7AWwyNZkUnn5rwPkuPBi3Iwk5SQtN0mv+K65k7nKKjwNQ30wg3wLAQQ==
4600+
dependencies:
4601+
"@sinonjs/commons" "^1.7.0"
4602+
"@sinonjs/fake-timers" "^7.0.4"
4603+
"@sinonjs/text-encoding" "^0.7.1"
4604+
just-extend "^4.0.2"
4605+
path-to-regexp "^1.7.0"
4606+
45304607
node-preload@^0.2.1:
45314608
version "0.2.1"
45324609
resolved "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz#c03043bb327f417a18fee7ab7ee57b408a144301"
@@ -5503,7 +5580,7 @@ semver@^6.0.0, semver@^6.1.2, semver@^6.3.0:
55035580
resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
55045581
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
55055582

5506-
semver@^7.1.1, semver@^7.3.2:
5583+
semver@^7.1.1, semver@^7.3.2, semver@^7.3.5:
55075584
version "7.3.5"
55085585
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
55095586
integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
@@ -5617,7 +5694,19 @@ [email protected]:
56175694
supports-color "^5.4.0"
56185695
type-detect "^4.0.8"
56195696

5620-
sinon@^9.0.0, sinon@^9.0.2:
5697+
sinon@^10.0.0:
5698+
version "10.0.1"
5699+
resolved "https://registry.npmjs.org/sinon/-/sinon-10.0.1.tgz#0d1a13ecb86f658d15984f84273e57745b1f4c57"
5700+
integrity sha512-1rf86mvW4Mt7JitEIgmNaLXaWnrWd/UrVKZZlL+kbeOujXVf9fmC4kQEQ/YeHoiIA23PLNngYWK+dngIx/AumA==
5701+
dependencies:
5702+
"@sinonjs/commons" "^1.8.1"
5703+
"@sinonjs/fake-timers" "^7.0.4"
5704+
"@sinonjs/samsam" "^6.0.1"
5705+
diff "^4.0.2"
5706+
nise "^5.0.1"
5707+
supports-color "^7.1.0"
5708+
5709+
sinon@^9.0.2:
56215710
version "9.2.4"
56225711
resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.2.4.tgz#e55af4d3b174a4443a8762fa8421c2976683752b"
56235712
integrity sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==
@@ -6177,6 +6266,18 @@ trim-off-newlines@^1.0.0:
61776266
resolved "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3"
61786267
integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM=
61796268

6269+
ts-json-schema-generator@^0.93.0:
6270+
version "0.93.0"
6271+
resolved "https://registry.npmjs.org/ts-json-schema-generator/-/ts-json-schema-generator-0.93.0.tgz#3d6adf99446a1b3d0887dbad7cca015a49394d3a"
6272+
integrity sha512-JYacSIgw4KqsOXF/zRSY4pE/v6jUk7aMDXhwK5MdopN0UeKH58TRZHrQADy9uxTf78jqUfFLzARQKNOb9H+jVQ==
6273+
dependencies:
6274+
"@types/json-schema" "^7.0.7"
6275+
commander "^7.2.0"
6276+
fast-json-stable-stringify "^2.1.0"
6277+
glob "^7.1.7"
6278+
json-stable-stringify "^1.0.1"
6279+
typescript "~4.3.2"
6280+
61806281
ts-node@^8.10.2:
61816282
version "8.10.2"
61826283
resolved "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz#eee03764633b1234ddd37f8db9ec10b75ec7fb8d"
@@ -6302,6 +6403,11 @@ typescript@^4.1.3:
63026403
resolved "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7"
63036404
integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==
63046405

6406+
typescript@~4.3.2:
6407+
version "4.3.2"
6408+
resolved "https://registry.npmjs.org/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805"
6409+
integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==
6410+
63056411
uglify-js@^3.1.4:
63066412
version "3.10.1"
63076413
resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.1.tgz#dd14767eb7150de97f2573a5ff210db14fffe4ad"

0 commit comments

Comments
 (0)