openxiangda 1.0.185 → 1.0.186
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.
- package/lib/application-environments.js +8 -0
- package/lib/cli.js +24 -15
- package/package.json +1 -1
|
@@ -376,6 +376,13 @@ function withManagedReleaseForwardedFlags(stepId, args = [], flags = {}) {
|
|
|
376
376
|
return forwarded;
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
+
function withReleaseClientSessionArgs(args = [], flags = {}) {
|
|
380
|
+
const clientSessionId = String(flags['client-session-id'] || '').trim();
|
|
381
|
+
return clientSessionId
|
|
382
|
+
? [...args, '--client-session-id', clientSessionId]
|
|
383
|
+
: [...args];
|
|
384
|
+
}
|
|
385
|
+
|
|
379
386
|
module.exports = {
|
|
380
387
|
bindEnvironmentTarget,
|
|
381
388
|
buildCandidateBundle,
|
|
@@ -393,5 +400,6 @@ module.exports = {
|
|
|
393
400
|
saveCandidate,
|
|
394
401
|
sha256Canonical,
|
|
395
402
|
withManagedReleaseForwardedFlags,
|
|
403
|
+
withReleaseClientSessionArgs,
|
|
396
404
|
writePrivateJsonAtomic,
|
|
397
405
|
};
|
package/lib/cli.js
CHANGED
|
@@ -141,6 +141,7 @@ const {
|
|
|
141
141
|
saveCandidate,
|
|
142
142
|
sha256Canonical,
|
|
143
143
|
withManagedReleaseForwardedFlags,
|
|
144
|
+
withReleaseClientSessionArgs,
|
|
144
145
|
} = require('./application-environments');
|
|
145
146
|
const { startDeveloperCenter } = require('./developer-center');
|
|
146
147
|
const {
|
|
@@ -1472,6 +1473,7 @@ function changeIdFromStep(step) {
|
|
|
1472
1473
|
async function publishWorkspaceRelease(config, target, flags = {}) {
|
|
1473
1474
|
const changeId = readStringFlag(flags, 'change');
|
|
1474
1475
|
const deploymentId = readStringFlag(flags, 'deployment-id') || null;
|
|
1476
|
+
const clientSessionId = readStringFlag(flags, 'client-session-id');
|
|
1475
1477
|
if (!changeId) {
|
|
1476
1478
|
fail('用法: openxiangda release publish --change <id> --profile <name>');
|
|
1477
1479
|
}
|
|
@@ -1614,6 +1616,10 @@ async function publishWorkspaceRelease(config, target, flags = {}) {
|
|
|
1614
1616
|
id: 'lease-and-capture',
|
|
1615
1617
|
command: `openxiangda release begin --change ${changeId} --profile ${target.profileName}${
|
|
1616
1618
|
target.targetName ? ` --environment ${target.targetName}` : ''
|
|
1619
|
+
}${
|
|
1620
|
+
clientSessionId
|
|
1621
|
+
? ` --client-session-id ${clientSessionId}`
|
|
1622
|
+
: ''
|
|
1617
1623
|
} --freeze-app-capture`,
|
|
1618
1624
|
status: 'pending',
|
|
1619
1625
|
},
|
|
@@ -1659,21 +1665,24 @@ async function publishWorkspaceRelease(config, target, flags = {}) {
|
|
|
1659
1665
|
const runnable = [
|
|
1660
1666
|
{
|
|
1661
1667
|
id: 'lease-and-capture',
|
|
1662
|
-
args:
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1668
|
+
args: withReleaseClientSessionArgs(
|
|
1669
|
+
[
|
|
1670
|
+
'release',
|
|
1671
|
+
'begin',
|
|
1672
|
+
'--change',
|
|
1673
|
+
changeId,
|
|
1674
|
+
'--profile',
|
|
1675
|
+
target.profileName,
|
|
1676
|
+
...(target.targetName
|
|
1677
|
+
? ['--environment', target.targetName]
|
|
1678
|
+
: []),
|
|
1679
|
+
...(deploymentId
|
|
1680
|
+
? ['--deployment-id', deploymentId]
|
|
1681
|
+
: []),
|
|
1682
|
+
'--freeze-app-capture',
|
|
1683
|
+
],
|
|
1684
|
+
flags
|
|
1685
|
+
),
|
|
1677
1686
|
},
|
|
1678
1687
|
...steps,
|
|
1679
1688
|
{
|