openxiangda 1.0.193 → 1.0.194

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.
@@ -206,6 +206,25 @@ function bindEnvironmentTarget(state, input) {
206
206
  resources,
207
207
  updatedAt: new Date().toISOString(),
208
208
  };
209
+ if (input.replaceAppScopedState) {
210
+ const seedAppScopedState = input.seedAppScopedState || {};
211
+ for (const key of [
212
+ 'lastDeploymentId',
213
+ 'lastCandidateId',
214
+ 'lastDeploymentStatus',
215
+ 'runtime',
216
+ ]) {
217
+ delete state.targets[targetName][key];
218
+ if (
219
+ Object.prototype.hasOwnProperty.call(seedAppScopedState, key) &&
220
+ seedAppScopedState[key] !== undefined
221
+ ) {
222
+ state.targets[targetName][key] = cloneJsonValue(
223
+ seedAppScopedState[key]
224
+ );
225
+ }
226
+ }
227
+ }
209
228
  if (!state.currentTarget || kind === 'preproduction') {
210
229
  state.currentTarget = targetName;
211
230
  }
package/lib/cli.js CHANGED
@@ -1877,6 +1877,8 @@ function saveEnvironmentWorkspaceState(state, setDetail, environmentDetail, inpu
1877
1877
  sideEffectPolicy: environmentDetail.sideEffectPolicy,
1878
1878
  seedResources,
1879
1879
  replaceResources: input.replaceResources,
1880
+ seedAppScopedState: input.seedAppScopedState,
1881
+ replaceAppScopedState: input.replaceAppScopedState,
1880
1882
  });
1881
1883
  ensureResourceBuckets(bound);
1882
1884
  saveProjectState(state);
@@ -2114,6 +2116,8 @@ async function environment(args) {
2114
2116
  profile.profileName,
2115
2117
  seedResources: previousAppTarget?.resources,
2116
2118
  replaceResources: true,
2119
+ seedAppScopedState: previousAppTarget,
2120
+ replaceAppScopedState: true,
2117
2121
  })
2118
2122
  );
2119
2123
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openxiangda",
3
- "version": "1.0.193",
3
+ "version": "1.0.194",
4
4
  "description": "OpenXiangda CLI, workspace build tools, runtime SDK, and form components.",
5
5
  "private": false,
6
6
  "bin": {