Skip to content

Commit

Permalink
fix: add package.promote method
Browse files Browse the repository at this point in the history
  • Loading branch information
WillieRuemmele committed Aug 18, 2022
1 parent bd36d28 commit de5867b
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 5 additions & 1 deletion src/package/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -66,6 +66,10 @@ export class Package extends AsyncCreatable<PackageOptions> implements IPackage
return Promise.resolve(undefined);
}

public async promote(id: string): Promise<SaveResult> {
return await this.options.connection.tooling.update('Package2Version', { IsReleased: true, Id: id });
}

public create(): Promise<void> {
return Promise.resolve(undefined);
}
Expand Down
36 changes: 34 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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==
Expand All @@ -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"
Expand Down Expand Up @@ -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==
Expand All @@ -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"
Expand Down

0 comments on commit de5867b

Please sign in to comment.