diff --git a/package.json b/package.json index 0a08fb52c..433e92eca 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,8 @@ "!lib/**/*.map" ], "dependencies": { - "@salesforce/core": "^3.24.0", - "@salesforce/kit": "^1.5.44", + "@salesforce/core": "^3.26.2", + "@salesforce/kit": "^1.6.0", "@salesforce/schemas": "^1.2.0", "@salesforce/source-deploy-retrieve": "^6.2.0", "@salesforce/ts-types": "^1.5.20", diff --git a/src/package/package.ts b/src/package/package.ts index a8a59aa8e..3d359ec6a 100644 --- a/src/package/package.ts +++ b/src/package/package.ts @@ -6,7 +6,7 @@ */ import { Messages, sfdc } from '@salesforce/core'; import { AsyncCreatable, Duration } from '@salesforce/kit'; -import { QueryResult } from 'jsforce'; +import { QueryResult, SaveResult } from 'jsforce'; import { Optional } from '@salesforce/ts-types'; import { IPackage, PackageOptions, PackagingSObjects } from '../interfaces'; import { @@ -66,6 +66,10 @@ export class Package extends AsyncCreatable implements IPackage return Promise.resolve(undefined); } + public async promote(id: string): Promise { + return await this.options.connection.tooling.update('Package2Version', { IsReleased: true, Id: id }); + } + public create(): Promise { return Promise.resolve(undefined); } diff --git a/yarn.lock b/yarn.lock index ab6460e86..2def7ef32 100644 --- a/yarn.lock +++ b/yarn.lock @@ -711,7 +711,7 @@ strip-ansi "6.0.1" ts-retry-promise "^0.6.0" -"@salesforce/core@^3.20.1", "@salesforce/core@^3.21.1", "@salesforce/core@^3.24.0": +"@salesforce/core@^3.20.1", "@salesforce/core@^3.21.1": version "3.25.0" resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-3.25.0.tgz#ae163d45d640326c999da1664a1e6111ce7d6482" integrity sha512-Rfj9uOXu/rABXJ6gLgO39Epw8FlRL7QNpVj0Q0VN+vHkxCs+icuQQ3iBAczkKfjXRqRLfjGZc+iiJBDWUyWdXw== @@ -734,6 +734,29 @@ jsonwebtoken "8.5.1" ts-retry-promise "^0.6.0" +"@salesforce/core@^3.26.2": + version "3.26.2" + resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-3.26.2.tgz#94b361bd62967feb3eedc624fc6cf444e7347f84" + integrity sha512-GDrho8jbh1UDjcsYRRUzhNv4KUsMcBtux/yEqB2ycvHXhjVnrNkJcl99KESiU1eZMl2DGZEE1IO8yxnb2rSvgg== + dependencies: + "@salesforce/bunyan" "^2.0.0" + "@salesforce/kit" "^1.5.41" + "@salesforce/schemas" "^1.1.0" + "@salesforce/ts-types" "^1.5.20" + "@types/graceful-fs" "^4.1.5" + "@types/semver" "^7.3.9" + ajv "^8.11.0" + archiver "^5.3.0" + change-case "^4.1.2" + debug "^3.2.7" + faye "^1.4.0" + form-data "^4.0.0" + graceful-fs "^4.2.9" + js2xmlparser "^4.0.1" + jsforce beta + jsonwebtoken "8.5.1" + ts-retry-promise "^0.6.0" + "@salesforce/dev-config@^3.0.0", "@salesforce/dev-config@^3.0.1": version "3.1.0" resolved "https://registry.yarnpkg.com/@salesforce/dev-config/-/dev-config-3.1.0.tgz#8eb5b35860ff60d1c1dc3fd9329b01a28475d5b9" @@ -779,7 +802,7 @@ typedoc-plugin-missing-exports "0.23.0" typescript "^4.1.3" -"@salesforce/kit@^1.5.41", "@salesforce/kit@^1.5.42", "@salesforce/kit@^1.5.44": +"@salesforce/kit@^1.5.41", "@salesforce/kit@^1.5.42": version "1.5.44" resolved "https://registry.yarnpkg.com/@salesforce/kit/-/kit-1.5.44.tgz#f070257679f40750e67919020c7e8240b219bf26" integrity sha512-QHwmJFgvF0YyBAvPkSMy2opyIgKzATF8lwYHewCr2obyqDiVi9OJkYWgQETkKTpfLzSjWqdsfiVAdlnRcj+xQQ== @@ -788,6 +811,15 @@ shx "^0.3.3" tslib "^2.2.0" +"@salesforce/kit@^1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@salesforce/kit/-/kit-1.6.0.tgz#0305dea2c9847d4b08068c4a9d436da5c9a5ce5e" + integrity sha512-8VZvWYl61jBaUIqo+pNoDvVqaZKPmqauvkhJHvcr/+D7+EXsjne9PDMggy5mNQJvonD6iegR/h3BqcWrppSaeQ== + dependencies: + "@salesforce/ts-types" "^1.5.20" + shx "^0.3.3" + tslib "^2.2.0" + "@salesforce/prettier-config@^0.0.2": version "0.0.2" resolved "https://registry.yarnpkg.com/@salesforce/prettier-config/-/prettier-config-0.0.2.tgz#ded39bf7cb75238edc9db6dd093649111350f8bc"