npm package diff
Package: @forge/cli
Versions: 11.4.0-next.1-experimental-5364136 - 11.4.0-next.14
File: package/out/service/version-service.js
Index: package/out/service/version-service.js
===================================================================
--- package/out/service/version-service.js
+++ package/out/service/version-service.js
@@ -5,9 +5,9 @@
const cli_shared_1 = require("@forge/cli-shared");
const manifest_1 = require("@forge/manifest");
class MissingVersionUpgradeParameters extends Error {
constructor() {
- super(cli_shared_1.Text.version.upgrade.error.missingVersionUpgradeParameters);
+ super(cli_shared_1.Text.version.upgrade.start.error.missingVersionUpgradeParameters);
}
}
exports.MissingVersionUpgradeParameters = MissingVersionUpgradeParameters;
class VersionService {
@@ -187,23 +187,33 @@
async getUpgradableVersions(environmentKey, sourceVersionId) {
const { id: appId } = await this.getAppConfig();
return await this.versionDetailsClient.getAppUpgradableToList(appId, environmentKey, sourceVersionId);
}
- async createAppVersionUpgradeRollout(environmentKey, sourceVersionId, targetVersionId) {
+ async createAppVersionUpgradeRollout(environmentKey, sourceVersionId, targetVersionId, sourceVersionNumber, targetVersionNumber) {
if (!sourceVersionId || !targetVersionId) {
throw new MissingVersionUpgradeParameters();
}
- return await this.versionDetailsClient.createAppVersionUpgradeRollout(environmentKey, sourceVersionId, targetVersionId);
+ return await this.versionDetailsClient.createAppVersionUpgradeRollout(environmentKey, sourceVersionId, targetVersionId, sourceVersionNumber, targetVersionNumber);
}
async createAppVersionUpgradeRolloutNonInteractively(environmentKey, sourceMajorVersion, targetMajorVersion) {
if (!sourceMajorVersion || !targetMajorVersion) {
throw new MissingVersionUpgradeParameters();
}
const { id: appId } = await this.getAppConfig();
const selectedSourceVersion = await this.versionDetailsClient.getAppVersionIdentity(appId, environmentKey, sourceMajorVersion);
const selectedTargetVersion = await this.versionDetailsClient.getAppVersionIdentity(appId, environmentKey, targetMajorVersion);
- return await this.createAppVersionUpgradeRollout(environmentKey, selectedSourceVersion.id, selectedTargetVersion.id);
+ return await this.createAppVersionUpgradeRollout(environmentKey, selectedSourceVersion.id, selectedTargetVersion.id, sourceMajorVersion.toString(), targetMajorVersion.toString());
}
+ async getAppVersionUpgradeRolloutsList(environmentKey) {
+ const { id: appId } = await this.getAppConfig();
+ return await this.versionDetailsClient.getAppVersionRolloutsList(appId, environmentKey);
+ }
+ async cancelAppVersionRollout(appRolloutId, environmentKey) {
+ return await this.versionDetailsClient.cancelAppVersionUpgradeRollout(appRolloutId, environmentKey);
+ }
+ async getAppVersionRollout(appRolloutId) {
+ return await this.versionDetailsClient.getAppVersionRollout(appRolloutId);
+ }
applyPropertyAdapter(appDetails) {
for (const adapter of this.adapters) {
for (const [property, propertyDetails] of Object.entries(appDetails)) {
const [propertyKey, updatedPropertyDetails] = adapter([property, propertyDetails]);