Skip to content

Commit 81e32c2

Browse files
fix: don't wait for archiver finalize
* fix: don't wait for archiver finalize * chore: auto-update metadata coverage in METADATA_SUPPORT.md * test: record perf * style: explain archiver types weirdness * test: record perf Co-authored-by: svc-cli-bot <[email protected]>
1 parent b1d5ec9 commit 81e32c2

File tree

8 files changed

+33
-27
lines changed

8 files changed

+33
-27
lines changed

METADATA_SUPPORT.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,7 @@ v57 introduces the following new types. Here's their current level of support
532532
|:---|:---|:---|
533533
|ActionableListDefinition||Not supported, but support could be added|
534534
|AffinityScoreDefinition||Not supported, but support could be added|
535+
|ClaimFinancialSettings|||
535536
|ClauseCatgConfiguration|||
536537
|CommerceRuleSettings|||
537538
|DisclosureDefinition|||
@@ -541,8 +542,9 @@ v57 introduces the following new types. Here's their current level of support
541542
|ExternalClientAppSettings|||
542543
|ExternalClientApplication|||
543544
|ExternalDocStorageConfig||Not supported, but support could be added|
545+
|ExtlClntAppMobilePolicies||Not supported, but support could be added|
544546
|ExtlClntAppMobileSettings|||
545-
|ExtlClntAppOauthPlcyCnfg||Not supported, but support could be added|
547+
|ExtlClntAppOauthConfigurablePolicies|||
546548
|ExtlClntAppOauthSettings|||
547549
|IdentityProviderSettings|||
548550
|IntegrationProviderDef||Not supported, but support could be added|
@@ -580,7 +582,6 @@ v57 introduces the following new types. Here's their current level of support
580582
- CustomFieldTranslation
581583
- MatchingRule
582584
- MarketingResourceType
583-
- ExtlClntAppOauthConfigurablePolicies
584585
- CustomExperience
585586
- ManagedTopic
586587
- DataPipeline

src/convert/transformers/staticResourceMetadataTransformer.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ export class StaticResourceMetadataTransformer extends BaseMetadataTransformer {
3939
public async toMetadataFormat(component: SourceComponent): Promise<WriteInfo[]> {
4040
const { content, type, xml } = component;
4141

42+
// archiver/zip.finalize looks like it is async, because it extends streams, but it is not meant to be used that way
43+
// the typings on it are misleading and unintended. More info https://github.com/archiverjs/node-archiver/issues/476
44+
// If you await it, bad things happen, like the convert process exiting silently. https://github.com/forcedotcom/cli/issues/1791
45+
// leave the void as it is
46+
// eslint-disable-next-line @typescript-eslint/require-await
4247
const zipIt = async (): Promise<Archiver> => {
4348
// toolbelt was using level 9 for static resources, so we'll do the same.
4449
// Otherwise, you'll see errors like https://github.com/forcedotcom/cli/issues/1098
@@ -53,7 +58,7 @@ export class StaticResourceMetadataTransformer extends BaseMetadataTransformer {
5358
zip.append(replacementStream, { name: relative(content, path) });
5459
}
5560
}
56-
await zip.finalize();
61+
void zip.finalize();
5762
return zip;
5863
};
5964

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[
22
{
33
"name": "componentSetCreate",
4-
"duration": 258.7272329999978
4+
"duration": 240.1729839999898
55
},
66
{
77
"name": "sourceToMdapi",
8-
"duration": 7064.5000979999895
8+
"duration": 5893.712117000003
99
},
1010
{
1111
"name": "sourceToZip",
12-
"duration": 5043.188347000003
12+
"duration": 6712.079133000007
1313
},
1414
{
1515
"name": "mdapiToSource",
16-
"duration": 4514.134340000019
16+
"duration": 4511.380858000019
1717
}
1818
]
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[
22
{
33
"name": "componentSetCreate",
4-
"duration": 479.82419299997855
4+
"duration": 505.1115040000004
55
},
66
{
77
"name": "sourceToMdapi",
8-
"duration": 8941.918268000009
8+
"duration": 10536.354740999988
99
},
1010
{
1111
"name": "sourceToZip",
12-
"duration": 10533.41592499998
12+
"duration": 7629.889922000002
1313
},
1414
{
1515
"name": "mdapiToSource",
16-
"duration": 5452.256045999995
16+
"duration": 5711.929862999998
1717
}
1818
]
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[
22
{
33
"name": "componentSetCreate",
4-
"duration": 830.0290470000182
4+
"duration": 848.9497269999993
55
},
66
{
77
"name": "sourceToMdapi",
8-
"duration": 12821.065571999992
8+
"duration": 14420.913567999989
99
},
1010
{
1111
"name": "sourceToZip",
12-
"duration": 11678.985925000015
12+
"duration": 12225.230517000018
1313
},
1414
{
1515
"name": "mdapiToSource",
16-
"duration": 13113.897208999988
16+
"duration": 14027.158036999987
1717
}
1818
]
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[
22
{
33
"name": "componentSetCreate",
4-
"duration": 212.75168799998937
4+
"duration": 211.11101899998903
55
},
66
{
77
"name": "sourceToMdapi",
8-
"duration": 4968.247083999973
8+
"duration": 5271.692285000012
99
},
1010
{
1111
"name": "sourceToZip",
12-
"duration": 4913.3930489999475
12+
"duration": 4380.870213999995
1313
},
1414
{
1515
"name": "mdapiToSource",
16-
"duration": 3678.5225419999915
16+
"duration": 3751.995666999981
1717
}
1818
]
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[
22
{
33
"name": "componentSetCreate",
4-
"duration": 427.1703989999951
4+
"duration": 442.0649090000079
55
},
66
{
77
"name": "sourceToMdapi",
8-
"duration": 8699.61532500002
8+
"duration": 7637.912526
99
},
1010
{
1111
"name": "sourceToZip",
12-
"duration": 7062.340872999979
12+
"duration": 7133.890660000005
1313
},
1414
{
1515
"name": "mdapiToSource",
16-
"duration": 4507.392125000013
16+
"duration": 4296.643390000012
1717
}
1818
]
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[
22
{
33
"name": "componentSetCreate",
4-
"duration": 708.247853000008
4+
"duration": 714.2424170000013
55
},
66
{
77
"name": "sourceToMdapi",
8-
"duration": 11350.272353000008
8+
"duration": 10538.031634999992
99
},
1010
{
1111
"name": "sourceToZip",
12-
"duration": 10826.725208999997
12+
"duration": 9512.72887000002
1313
},
1414
{
1515
"name": "mdapiToSource",
16-
"duration": 9852.030005000008
16+
"duration": 8187.150167999993
1717
}
1818
]

0 commit comments

Comments
 (0)